+2005-12-13 Helge Hess <helge.hess@opengroupware.org>
+
+ * v4.5.238
+
+ * NGImap4: fixed QP handling in IMAP4 envelopes (#1587)
+
+ * NGMime: code cleanups
+
2005-11-17 Helge Hess <helge.hess@opengroupware.org>
* properly include string.h where required to avoid warnings (v4.5.237)
+2005-12-13 Helge Hess <helge.hess@opengroupware.org>
+
+ * NGImap4ResponseParser.m: properly decode quoted-printable headers
+ when the QP marker starts somewhere inside the header value
+
2005-07-27 Helge Hess <helge.hess@skyrix.com>
* NGImap4Connection.m: fixed gcc 4.0 warnings
if ([_string isKindOfClass:StrClass]) {
if ([_string length] <= 6 /* minimum size */)
return _string;
- if ([_string characterAtIndex:0] == '=' &&
- [_string characterAtIndex:1] == '?') {
+
+ if ([_string rangeOfString:@"=?"].length > 0) {
NSData *data;
if (debugOn)
/* parse personal name, can be with quoted printable encoding! */
pname = [self _parseQuotedStringOrNIL];
- if ([pname isNotNull])
+ if ([pname isNotNull]) // TODO: headerField 'subject'?? explain!
pname = [self _decodeQP:pname headerField:@"subject"];
[self _consumeOptionalSpace];
+2005-12-13 Helge Hess <helge.hess@opengroupware.org>
+
+ * NGMimeAddressHeaderFieldGenerator.m: use -warnWithFormat:
+
+ * NGMimeUtilities.h: code cleanups
+
2005-11-17 Helge Hess <helge.hess@opengroupware.org>
* properly include string.h where required to avoid warnings
enumerator = [[parser parseAddressList] objectEnumerator];
result = [[NSMutableString alloc] initWithCapacity:128];
- while ((obj = [enumerator nextObject])) {
+ while ((obj = [enumerator nextObject]) != nil) {
NSString *tmp;
char *buffer;
unsigned bufLen, cnt;
length:(cnt + isoLen + desLen + isoEndLen)];
}
else {
- [self logWithFormat:@"WARNING(%s:%i): An error occour during "
- @"quoted-printable decoding",
+ [self warnWithFormat:
+ @"%s:%i: An error occour during quoted-printable decoding",
__PRETTY_FUNCTION__, __LINE__];
}
if (des) free(des);
}
static inline NSData *_quotedPrintableEncoding(NSData *_data) {
- const char *bytes = [_data bytes];
- unsigned int length = [_data length];
+ const char *bytes;
+ unsigned int length;
NSData *result = nil;
char *des = NULL;
unsigned int desLen = 0;
- unsigned cnt = length;
- const char *test = bytes;
+ unsigned cnt;
+ const char *test;
BOOL doEnc = NO;
- while (cnt > 0) {
+ bytes = [_data bytes];
+ length = [_data length];
+ cnt = length;
+ test = bytes;
+
+ for (cnt = length, test = bytes; cnt > 0; test++, cnt--) {
if ((unsigned char)*test > 127) {
doEnc = YES;
break;
}
- test++;
- cnt--;
}
- if (!doEnc) return _data;
+ if (!doEnc)
+ return _data;
+
desLen = length *3;
des = NGMallocAtomic(sizeof(char) * desLen + 2);
MAJOR_VERSION:=4
MINOR_VERSION:=5
-SUBMINOR_VERSION:=237
+SUBMINOR_VERSION:=238
# v4.5.214 requires libNGExtensions v4.5.146
# v4.2.149 requires libNGStreams v4.2.34