From d6f02033516b24d07fffa230d0d3c033dfb7cb41 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 29 May 2012 18:56:15 +0000 Subject: [PATCH] Patch applied from bug #1664 Monotone-Parent: 1e79eab4c546452715e5171f1c326b7d36f1c195 Monotone-Revision: 99dc7d9dce88b8a323b1e7aab60de99ed2bfda60 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-05-29T18:56:15 --- SOPE/NGCards/CardGroup.m | 6 +++--- SoObjects/Mailer/SOGoMailObject+Draft.m | 8 ++++---- SoObjects/SOGo/NSString+Utilities.m | 3 ++- .../UIxMailPartAlternativeViewer.m | 18 +++++++++--------- UI/MailerUI/UIxMailEditor.m | 2 +- UI/MailerUI/UIxMailMainFrame.m | 14 +++++++------- UI/Scheduler/UIxCalView.m | 7 ++++--- UI/Scheduler/UIxComponentEditor.m | 12 ++++++------ 8 files changed, 36 insertions(+), 34 deletions(-) diff --git a/SOPE/NGCards/CardGroup.m b/SOPE/NGCards/CardGroup.m index d19b1a321..702257148 100644 --- a/SOPE/NGCards/CardGroup.m +++ b/SOPE/NGCards/CardGroup.m @@ -354,7 +354,7 @@ static NGCardsSaxHandler *sax = nil; - (void) setChildrenAsCopy: (NSMutableArray *) someChildren { - unsigned int count, max; + NSUInteger count, max; ASSIGN (children, someChildren); @@ -399,7 +399,7 @@ static NGCardsSaxHandler *sax = nil; - (NSString *) description { NSMutableString *str; - unsigned int count, max; + NSUInteger count, max; str = [NSMutableString stringWithCapacity:64]; [str appendFormat:@"<%p[%@]:%@", @@ -421,7 +421,7 @@ static NGCardsSaxHandler *sax = nil; - (void) replaceThisElement: (CardElement *) oldElement withThisOne: (CardElement *) newElement { - unsigned int index; + NSUInteger index; index = [children indexOfObject: oldElement]; if (index != NSNotFound) diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.m b/SoObjects/Mailer/SOGoMailObject+Draft.m index aede6309e..40eb060e5 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.m +++ b/SoObjects/Mailer/SOGoMailObject+Draft.m @@ -53,7 +53,7 @@ nil }; BOOL hasPrefix; - unsigned int i; + NSUInteger i; NSString *subject, *newSubject; hasPrefix = NO; @@ -101,7 +101,7 @@ NSDictionary *parts; NSString *rawPart, *content, *contentKey; SOGoUserDefaults *ud; - int index; + NSUInteger index; BOOL htmlComposition, htmlContent; content = @""; @@ -191,7 +191,7 @@ static NSString *sescape[] = { @"/", @"..", @"~", @"\"", @"'", @" ", @".", nil }; - unsigned int count, length; + NSUInteger count, length; subject = [self decodedSubject]; length = [subject length]; @@ -300,7 +300,7 @@ NSString *newPath; NSArray *subparts; NSString *type; - unsigned int i; + NSUInteger i; type = [[part objectForKey: @"type"] lowercaseString]; if ([type isEqualToString: @"multipart"]) diff --git a/SoObjects/SOGo/NSString+Utilities.m b/SoObjects/SOGo/NSString+Utilities.m index 9cfe2788f..64f87f010 100644 --- a/SoObjects/SOGo/NSString+Utilities.m +++ b/SoObjects/SOGo/NSString+Utilities.m @@ -471,7 +471,8 @@ static int cssEscapingCount; - (int) timeValue { - int i, time; + int time; + NSInteger i; if ([self length] > 0) { diff --git a/UI/MailPartViewers/UIxMailPartAlternativeViewer.m b/UI/MailPartViewers/UIxMailPartAlternativeViewer.m index 9174a205c..16e15d24d 100644 --- a/UI/MailPartViewers/UIxMailPartAlternativeViewer.m +++ b/UI/MailPartViewers/UIxMailPartAlternativeViewer.m @@ -43,7 +43,7 @@ @interface UIxMailPartAlternativeViewer : UIxMailPartViewer { id childInfo; - unsigned int childIndex; + NSUInteger childIndex; } @end @@ -70,7 +70,7 @@ - (NSArray *) childPartTypes { NSMutableArray *types; - unsigned i, count; + NSUInteger i, count; NSArray *childParts; childParts = [[self bodyInfo] valueForKey:@"parts"]; @@ -89,10 +89,10 @@ return types; } -- (unsigned int) _preferredTypesPart: (NSArray *) types +- (NSUInteger) _preferredTypesPart: (NSArray *) types { - unsigned int count, max; - unsigned int part; + NSUInteger count, max; + NSUInteger part; const NSString *priorities[] = { @"multipart/related", @"multipart/mixed", @"text/calendar", @"text/html", @"text/plain" }; @@ -113,7 +113,7 @@ - (int) _selectPartIndexFromTypes: (NSArray *) _types { /* returns the index of the selected part or NSNotFound */ - unsigned count, max, part; + NSUInteger count, max, part; part = [self _preferredTypesPart: _types]; if (part == NSNotFound) @@ -136,7 +136,7 @@ - (void) selectChildInfo { - unsigned idx; + NSUInteger idx; [childInfo release]; childInfo = nil; childIndex = 0; @@ -164,7 +164,7 @@ return childInfo; } -- (unsigned int) childIndex +- (NSUInteger) childIndex { if (!childIndex) [self selectChildInfo]; @@ -176,7 +176,7 @@ { char buf[8]; - sprintf (buf, "%d", [self childIndex] + 1); + sprintf (buf, "%"PRIuPTR"", [self childIndex] + 1); return [NSString stringWithCString:buf]; } diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index 95609e19b..e10b02ac6 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -394,7 +394,7 @@ static NSArray *infoKeys = nil; { if (![_info isNotNull]) return; [self debugWithFormat:@"loading info ..."]; - [self takeValuesFromDictionary:_info]; + [self setValuesForKeysWithDictionary:_info]; } - (NSDictionary *) storeInfo diff --git a/UI/MailerUI/UIxMailMainFrame.m b/UI/MailerUI/UIxMailMainFrame.m index 0d121651b..8db3cf656 100644 --- a/UI/MailerUI/UIxMailMainFrame.m +++ b/UI/MailerUI/UIxMailMainFrame.m @@ -125,8 +125,8 @@ // TODO: this is ugly, create reusable link facility in SOPE // TODO: remove 'search' and 'filterpopup', preserve sorting NSMutableString *ms; - NSArray *qp; - unsigned i, count; + NSArray *qp; + NSUInteger i, count; qp = [[u substringFromIndex:(r.location + r.length)] componentsSeparatedByString:@"&"]; @@ -193,8 +193,8 @@ SOGoMailAccounts *co; SOGoContactFolders *folders; SOGoParentFolder *folder; - WORequest *request; - int i, count; + WORequest *request; + NSUInteger i, count; parameters = nil; co = [self clientObject]; @@ -549,7 +549,7 @@ NSArray *available; NSDictionary *metaData; SOGoUserDefaults *ud; - unsigned int i; + NSUInteger i; if (!columnsOrder) { @@ -636,8 +636,8 @@ NSMutableArray *folders; NSMutableString *path; SOGoUserDefaults *ud; - NSString *s; - int i, j, k; + NSString *s; + NSUInteger i, j, k; ud = [[context activeUser] userDefaults]; folders = [NSMutableArray array]; diff --git a/UI/Scheduler/UIxCalView.m b/UI/Scheduler/UIxCalView.m index 5b594dbce..2ed982b00 100644 --- a/UI/Scheduler/UIxCalView.m +++ b/UI/Scheduler/UIxCalView.m @@ -118,7 +118,7 @@ - (NSArray *) filterAppointments:(NSArray *) _apts { NSMutableArray *filtered; - unsigned i, count, p, pCount; + NSUInteger i, count, p, pCount; NSString *email, *partmailsString, *state, *pEmail; NSDictionary *info, *primaryIdentity; NSArray *partmails, *partstates; @@ -370,7 +370,7 @@ { NSArray *apts; NSMutableArray *filtered; - unsigned i, count; + NSUInteger i, count; if (allDayApts) return allDayApts; @@ -532,7 +532,8 @@ NSString *uidsString, *loc, *prevMethod, *userFolderID; id r; BOOL useGroups; - unsigned index; + NSUInteger index; + uidsString = [self queryParameterForKey: @"userUIDString"]; uidsString = [uidsString stringByTrimmingSpaces]; diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index e2186e180..3813f9646 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -525,7 +525,7 @@ iRANGE(2); iCalTrigger *aTrigger; NSString *duration, *quantity; unichar c; - unsigned int i; + NSUInteger i; if ([component hasAlarms]) { @@ -1289,7 +1289,7 @@ iRANGE(2); NSString *currentOwner; SOGoAppointmentFolder *currentCalendar; SOGoUser *currentUser; - unsigned i; + NSUInteger i; calendars = [self calendarList]; owners = [NSMutableArray arrayWithCapacity: [calendars count]]; @@ -1562,7 +1562,7 @@ RANGE(2); { NSString *cycleRep; NSArray *cycles; - unsigned i, count; + NSUInteger i, count; if (!_rrule) return [[self cycles] objectAtIndex:0]; @@ -1721,7 +1721,7 @@ RANGE(2); // s = [self queryParameterForKey:_qp]; // if(s && [s length] > 0) { // NSArray *es; -// unsigned i, count; +// NSUInteger i, count; // es = [s componentsSeparatedByString: @","]; // count = [es count]; @@ -1766,7 +1766,7 @@ RANGE(2); - (void) _handleAttendeesEdition { NSMutableArray *newAttendees; - unsigned int count, max; + NSUInteger count, max; NSString *currentEmail; iCalPerson *currentAttendee; NSString *json, *role, *partstat; @@ -2189,7 +2189,7 @@ RANGE(2); iCalTrigger *aTrigger; iCalAlarm *anAlarm; NSString *aValue; - unsigned int index; + NSUInteger index; anAlarm = [iCalAlarm new];