diff --git a/FoundationAdditions.m b/FoundationAdditions.m index b7de0cd2..05a88cd9 100644 --- a/FoundationAdditions.m +++ b/FoundationAdditions.m @@ -143,7 +143,7 @@ - (NSArray *)arrayByMakingObjectsPerformSelector:(SEL)aSelector withObject:anObj - (NSArray *)arrayByMakingObjectsPerformSelector:(SEL)aSelector withObject:anObject withObject:anObject2 { - unsigned i, count = [self count]; + NSUInteger i, count = [self count]; NSMutableArray *array = [NSMutableArray arrayWithCapacity:count]; for(i=0; i 0 && [letterSet characterIsMember:[aKeyWord characterAtIndex:0]]; BOOL wasCaseSensitive = [scanner caseSensitive]; BOOL foundKeyword; @@ -124,7 +124,7 @@ - (BOOL)eatKeyWord:(NSString *)aKeyWord fromScanner:(NSScanner *)scanner if (foundKeyword && isAlphaKeyword) { NSString *string = [scanner string]; - int currLocation = [scanner scanLocation]; + NSUInteger currLocation = [scanner scanLocation]; /* If we're at the end of the string, or the next char is not a letter, we're good. Otherwise abort. */ if (currLocation < [string length] && diff --git a/MiscMerge/MiscMergeEngine.m b/MiscMerge/MiscMergeEngine.m index 66f02cb9..f09c0136 100755 --- a/MiscMerge/MiscMergeEngine.m +++ b/MiscMerge/MiscMergeEngine.m @@ -427,7 +427,7 @@ - (void)removeContextObject:(id)anObject [contextStack removeObjectIdenticalTo:anObject]; if ( anObject == localSymbols ) { - int i; + NSInteger i; localSymbols = nil; @@ -569,7 +569,7 @@ - (MiscMergeCommandExitType)executeCommandBlock:(MiscMergeCommandBlock *)block { NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init]; NSArray *commandArray = [block commandArray]; - int i, count = [commandArray count]; + NSInteger i, count = [commandArray count]; MiscMergeCommandExitType exitCode = MiscMergeCommandExitNormal; /* * Maintain the execution stack. This stack isn't being used at the @@ -603,7 +603,7 @@ - (MiscMergeCommandExitType)executeCommandBlock:(MiscMergeCommandBlock *)block "*/ - (id)valueForField:(NSString *)fieldName quoted:(int)quoted { - int i; + NSInteger i; id value = nil; id prevValue = nil; id returnValue = nil; diff --git a/MiscMerge/MiscMergeExpression.m b/MiscMerge/MiscMergeExpression.m index 1d43922c..40dc58ea 100755 --- a/MiscMerge/MiscMergeExpression.m +++ b/MiscMerge/MiscMergeExpression.m @@ -441,7 +441,7 @@ - (NSString *)nameDescription - (NSString *)description { - int index, count = [expressions count]; + NSInteger index, count = [expressions count]; NSMutableString *string = [NSMutableString stringWithFormat:@"%@(", [self nameDescription]]; for ( index = 0; index < count; index++ ) { diff --git a/MiscMerge/MiscMergeFunctions.m b/MiscMerge/MiscMergeFunctions.m index 89ccefad..6c8bec4b 100755 --- a/MiscMerge/MiscMergeFunctions.m +++ b/MiscMerge/MiscMergeFunctions.m @@ -112,8 +112,8 @@ Class MMCommonAnscestorClass(id obj1, id obj2) else { NSCharacterSet *whitespaceSet = [NSCharacterSet whitespaceCharacterSet]; NSCharacterSet *newlineSet = [NSCharacterSet newlineCharacterSet]; - int start = 0, end = [string length]-1; - int i; + NSInteger start = 0, end = [string length]-1; + NSInteger i; for ( i = 0; i <= end; i++ ) { unichar character = [string characterAtIndex:i]; diff --git a/MiscMerge/NSScanner+MiscMerge.m b/MiscMerge/NSScanner+MiscMerge.m index 4289844f..aecceff4 100755 --- a/MiscMerge/NSScanner+MiscMerge.m +++ b/MiscMerge/NSScanner+MiscMerge.m @@ -51,7 +51,7 @@ - (BOOL)scanString:(NSString *)aString "*/ - (NSRange)remainingRange { - unsigned location = [self scanLocation]; + NSUInteger location = [self scanLocation]; return NSMakeRange(location, [[self string] length] - location); } @@ -84,7 +84,7 @@ - (void)skipPastSkipCharacters - (BOOL)scanCharacter:(unichar)targetCharacter { - unsigned scanLocation = [self scanLocation]; + NSUInteger scanLocation = [self scanLocation]; NSString *myString = [self string]; [self skipPastSkipCharacters]; @@ -104,7 +104,7 @@ - (BOOL)scanCharacter:(unichar)targetCharacter - (unichar)peekNextCharacter { - unsigned scanLocation; + NSUInteger scanLocation; NSString *myString; [self skipPastSkipCharacters]; diff --git a/MiscMerge/NSString+MiscAdditions.h b/MiscMerge/NSString+MiscAdditions.h index 3bad4b37..fc1de2f7 100755 --- a/MiscMerge/NSString+MiscAdditions.h +++ b/MiscMerge/NSString+MiscAdditions.h @@ -40,7 +40,7 @@ enum /*" "Letter" manipulation "*/ - (NSString *)letterAtIndex:(unsigned)anIndex; - (NSString *)firstLetter; -- (unsigned)letterCount; +- (NSUInteger)letterCount; /*" Getting "words" "*/ - (NSArray *)wordArray; diff --git a/MiscMerge/NSString+MiscAdditions.m b/MiscMerge/NSString+MiscAdditions.m index 68e49bff..397c562b 100755 --- a/MiscMerge/NSString+MiscAdditions.m +++ b/MiscMerge/NSString+MiscAdditions.m @@ -123,11 +123,11 @@ - (NSString *)firstLetter return [self letterAtIndex:0]; } -- (unsigned)letterCount +- (NSUInteger)letterCount { - unsigned count = 0; - unsigned selfLength = [self length]; - unsigned currIndex = 0; + NSUInteger count = 0; + NSUInteger selfLength = [self length]; + NSUInteger currIndex = 0; NSRange letterRange; while (currIndex < selfLength) @@ -227,7 +227,7 @@ - (NSString *)firstWord } static NSRange _nextSearchRange(NSString *string, unsigned mask, - NSRange *foundRange, unsigned lastIndex, unsigned firstIndex) + NSRange *foundRange, NSUInteger lastIndex, NSUInteger firstIndex) { /* * The char range stuff is if we want to use @@ -241,7 +241,7 @@ static NSRange _nextSearchRange(NSString *string, unsigned mask, if (mask & NSBackwardsSearch) { - unsigned endLocation; + NSUInteger endLocation; if (mask & MiscOverlappingSearch) { @@ -282,7 +282,7 @@ static NSRange _nextSearchRange(NSString *string, unsigned mask, NSRange foundRange; NSRange betweenRange; unsigned searchOptions = (mask & (NSCaseInsensitiveSearch|NSLiteralSearch)); - unsigned selfLength = [self length]; + NSUInteger selfLength = [self length]; NSMutableString *newString = [NSMutableString stringWithCapacity:selfLength]; mask &= ~NSBackwardsSearch; @@ -347,7 +347,7 @@ static NSRange _nextSearchRange(NSString *string, unsigned mask, if ([scanner scanCharactersFromSet:aSet intoString:&betweenString]) { - int i, count = [betweenString length]; + NSInteger i, count = [betweenString length]; // int i, count = [betweenString letterCount]; for (i=0;i