PRIVATE char *intlmime_encode_qp_buf(char *subject) { char *output = 0; unsigned char *p, *pDest ; int i, n, len ; if (subject == NULL || *subject == '\0') return NULL; len = strlen(subject); output = XP_ALLOC(len * 3 + 1); if (output == NULL) return NULL; p = (unsigned char*)subject; pDest = (unsigned char*)output ; for (i = 0; i < len; i++) { /* XP_IS_ALPHA(*p) || XP_IS_DIGIT(*p)) */ if ((*p < 0x80) && (((*p >= 'a') && (*p <= 'z')) || ((*p >= 'A') && (*p <= 'Z')) || ((*p >= '0') && (*p <= '9'))) ) *pDest = *p; else { *pDest++ = '='; n = (*p & 0xF0) >> 4; /* high byte */ if (n < 10) *pDest = '0' + n; else *pDest = 'A' + n - 10; pDest ++ ; n = *p & 0x0F; /* low byte */ if (n < 10) *pDest = '0' + n; else *pDest = 'A' + n - 10; } p ++; pDest ++; } *pDest = '\0'; return output; }
file: /Techref/method/codec/qpencode.htm, 1KB, , updated: 1999/12/21 11:24, local time: 2024/11/25 23:57,
3.138.181.90:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://techref.massmind.org/Techref/method/codec/qpencode.htm"> method codec qpencode</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to techref.massmind.org! |
.