From: helge Date: Mon, 3 Jul 2006 22:30:58 +0000 (+0000) Subject: 64bit fixes X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=817cf1d0e5cc25f0746e15743f7e7e3786068fad;p=sope 64bit fixes git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1292 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-mime/NGMail/NGMBoxReader.h b/sope-mime/NGMail/NGMBoxReader.h index 6c0ee544..b16397ba 100644 --- a/sope-mime/NGMail/NGMBoxReader.h +++ b/sope-mime/NGMail/NGMBoxReader.h @@ -1,5 +1,6 @@ /* - Copyright (C) 2000-2005 SKYRIX Software AG + Copyright (C) 2000-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -37,7 +38,7 @@ NSString *separator; BOOL isEndOfStream; - IMP readByte; + int (*readByte)(id, SEL); } + (id)readerForMBox:(NSString *)_path; diff --git a/sope-mime/NGMail/NGMBoxReader.m b/sope-mime/NGMail/NGMBoxReader.m index 9ac60c8a..7c34986a 100644 --- a/sope-mime/NGMail/NGMBoxReader.m +++ b/sope-mime/NGMail/NGMBoxReader.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2000-2005 SKYRIX Software AG + Copyright (C) 2000-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -64,7 +65,8 @@ __appendByte(NGMBoxReader *self, NSMutableData *_data, IMP _readBytes, int _c); self->readByte = [self->source respondsToSelector:@selector(methodForSelector:)] - ? [(NSObject *)self->source methodForSelector:@selector(readByte)] + ? (int(*)(id, SEL))[(NSObject *)self->source + methodForSelector:@selector(readByte)] : NULL; } return self; @@ -224,7 +226,7 @@ __appendByte(NGMBoxReader *self, NSMutableData *_data, IMP _readBytes, int _c); - (NSString *)description { return [NSString stringWithFormat:@"<%@[0x%p] source=%@ endOfStream=%@", - NSStringFromClass([self class]), (unsigned)self, + NSStringFromClass([self class]), self, self->source, self->isEndOfStream ? @"YES" : @"NO"]; } @@ -233,7 +235,7 @@ __appendByte(NGMBoxReader *self, NSMutableData *_data, IMP _readBytes, int _c); static inline int __readByte(NGMBoxReader *self) { return (self->readByte) - ? (int)self->readByte(self->source, @selector(readByte)) + ? self->readByte(self->source, @selector(readByte)) : [self->source readByte]; } @@ -243,4 +245,4 @@ static inline void __appendByte(NGMBoxReader *self, NSMutableData *_data, _readBytes(_data, @selector(appendBytes:length:), &c, 1); } -@end +@end /* NGMBoxReader */ diff --git a/sope-mime/NGMail/NGMailAddressParser.m b/sope-mime/NGMail/NGMailAddressParser.m index 80968dda..20d11105 100644 --- a/sope-mime/NGMail/NGMailAddressParser.m +++ b/sope-mime/NGMail/NGMailAddressParser.m @@ -1001,8 +1001,7 @@ static inline id parseDomainLiteral(NGMailAddressParser *self, BOOL _guessMode) - (NSString *)description { return [StrClass stringWithFormat:@"<%@[0x%p]>", - NSStringFromClass([self class]), - (unsigned)self]; + NSStringFromClass([self class]), self]; } @end /* NGMailAddressParser */ diff --git a/sope-mime/NGMail/NGPop3Client.m b/sope-mime/NGMail/NGPop3Client.m index 1890355f..f4900092 100644 --- a/sope-mime/NGMail/NGPop3Client.m +++ b/sope-mime/NGMail/NGPop3Client.m @@ -617,11 +617,11 @@ return nil; } -// description +/* description */ - (NSString *)description { return [NSString stringWithFormat:@"", - (unsigned)self, [self socket]]; + self, [self socket]]; } -@end +@end /* NGPop3Client */ diff --git a/sope-mime/NGMail/NGPop3Support.m b/sope-mime/NGMail/NGPop3Support.m index 4cb9d4d8..9e918c85 100644 --- a/sope-mime/NGMail/NGPop3Support.m +++ b/sope-mime/NGMail/NGPop3Support.m @@ -58,7 +58,7 @@ - (NSString *)description { return [NSString stringWithFormat:@"", - (unsigned)self, + self, [self isPositive] ? "YES" : "NO", [self line]]; } @@ -107,7 +107,7 @@ - (NSString *)description { return [NSString stringWithFormat:@"", - (unsigned)self, [self messageNumber], [self size]]; + self, [self messageNumber], [self size]]; } @end /* NGPop3Response */ diff --git a/sope-mime/NGMail/NGSmtpClient.m b/sope-mime/NGMail/NGSmtpClient.m index 80f364b5..d7f23357 100644 --- a/sope-mime/NGMail/NGSmtpClient.m +++ b/sope-mime/NGMail/NGSmtpClient.m @@ -459,11 +459,11 @@ return NO; } -// description +/* description */ - (NSString *)description { return [NSString stringWithFormat:@"", - (unsigned)self, [self socket]]; + self, [self socket]]; } -@end +@end /* NGSmtpClient */ diff --git a/sope-mime/NGMime/NGMimeContentLengthHeaderFieldParser.m b/sope-mime/NGMime/NGMimeContentLengthHeaderFieldParser.m index eaf85e82..3afee94e 100644 --- a/sope-mime/NGMime/NGMimeContentLengthHeaderFieldParser.m +++ b/sope-mime/NGMime/NGMimeContentLengthHeaderFieldParser.m @@ -48,12 +48,12 @@ } } -// description +/* description */ - (NSString *)description { return [NSString stringWithFormat: @"", - (unsigned)self]; + self]; } @end /* NGMimeContentLengthHeaderFieldParser */ diff --git a/sope-mime/NGMime/NGMimeContentTypeHeaderFieldParser.m b/sope-mime/NGMime/NGMimeContentTypeHeaderFieldParser.m index 79112db3..74bb6bd2 100644 --- a/sope-mime/NGMime/NGMimeContentTypeHeaderFieldParser.m +++ b/sope-mime/NGMime/NGMimeContentTypeHeaderFieldParser.m @@ -75,12 +75,12 @@ static BOOL MimeLogEnabled = NO; return [NGMimeType mimeType:typeString]; } -// description +/* description */ - (NSString *)description { return [NSString stringWithFormat: @"", - (unsigned)self]; + self]; } @end /* NGMimeContentTypeHeaderFieldParser */ diff --git a/sope-mime/NGMime/NGMimeHeaderFieldParserSet.m b/sope-mime/NGMime/NGMimeHeaderFieldParserSet.m index 101a11ca..a32736aa 100644 --- a/sope-mime/NGMime/NGMimeHeaderFieldParserSet.m +++ b/sope-mime/NGMime/NGMimeHeaderFieldParserSet.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2000-2005 SKYRIX Software AG + Copyright (C) 2000-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -96,7 +97,8 @@ static NGMimeHeaderFieldParserSet *rfc822set = nil; } - (id)initWithDefaultParser:(id)_parser { if ((self = [super init])) { - self->fieldNameToParser = [[NSMutableDictionary alloc] initWithCapacity:32]; + self->fieldNameToParser = + [[NSMutableDictionary alloc] initWithCapacity:32]; [self setDefaultParser:_parser]; } return self; @@ -114,7 +116,7 @@ static NGMimeHeaderFieldParserSet *rfc822set = nil; [super dealloc]; } -// accessors +/* accessors */ - (void)setParser:(id)_parser forField:(NSString *)_name { @@ -154,20 +156,21 @@ static NGMimeHeaderFieldParserSet *rfc822set = nil; [self defaultParser]]; keys = [self->fieldNameToParser keyEnumerator]; - while ((key = [keys nextObject])) { - id value = [self->fieldNameToParser objectForKey:key]; + while ((key = [keys nextObject]) != nil) { + id value; + value = [self->fieldNameToParser objectForKey:key]; [copy setParser:value forField:key]; } return copy; } -// description +/* description */ - (NSString *)description { return [NSString stringWithFormat: @"", - (unsigned)self, self->fieldNameToParser, + self, self->fieldNameToParser, [self defaultParser]]; } diff --git a/sope-mime/NGMime/NGMimeStringHeaderFieldParser.m b/sope-mime/NGMime/NGMimeStringHeaderFieldParser.m index 7749fbe7..c7f4a105 100644 --- a/sope-mime/NGMime/NGMimeStringHeaderFieldParser.m +++ b/sope-mime/NGMime/NGMimeStringHeaderFieldParser.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2000-2005 SKYRIX Software AG + Copyright (C) 2000-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -85,7 +86,7 @@ static BOOL StripLeadingSpaces = NO; return [NSString stringWithFormat: @"", - (unsigned)self, self->removeComments ? "YES" : "NO"]; + self, self->removeComments ? "YES" : "NO"]; } @end /* NGMimeStringHeaderFieldParser */