mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
printf style format tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36799 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
be2e93e98e
commit
bddd1e734f
14 changed files with 33 additions and 30 deletions
|
@ -208,7 +208,7 @@ static Class gcClass = 0;
|
|||
if (index >= _count)
|
||||
{
|
||||
[NSException raise: NSRangeException
|
||||
format: @"[%@-%@]: index: %u",
|
||||
format: @"[%@-%@]: index: %"PRIuPTR,
|
||||
NSStringFromClass([self class]), NSStringFromSelector(_cmd), index];
|
||||
}
|
||||
return _contents[index];
|
||||
|
@ -333,7 +333,7 @@ static Class gcClass = 0;
|
|||
if (index > _count)
|
||||
{
|
||||
[NSException raise: NSRangeException
|
||||
format: @"[%@-%@]: bad index %u",
|
||||
format: @"[%@-%@]: bad index %"PRIuPTR,
|
||||
NSStringFromClass([self class]), NSStringFromSelector(_cmd), index];
|
||||
}
|
||||
|
||||
|
@ -419,7 +419,7 @@ static Class gcClass = 0;
|
|||
if (index >= _count)
|
||||
{
|
||||
[NSException raise: NSRangeException
|
||||
format: @"[%@-%@]: bad index %u",
|
||||
format: @"[%@-%@]: bad index %"PRIuPTR,
|
||||
NSStringFromClass([self class]), NSStringFromSelector(_cmd), index];
|
||||
}
|
||||
ASSIGN(_contents[index], anObject);
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
+ (id) notImplemented: (SEL)selector
|
||||
{
|
||||
[NSException raise: NSGenericException
|
||||
format: @"method %@ not implemented in %s(class)",
|
||||
format: @"method %@ not implemented in %@(class)",
|
||||
selector ? (id)NSStringFromSelector(selector) : (id)@"(null)",
|
||||
NSStringFromClass(self)];
|
||||
return nil;
|
||||
|
|
|
@ -525,7 +525,8 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
|||
else
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Unknown event (%d) passed to _sendEvent:", event];
|
||||
format: @"Unknown event (%"PRIuPTR") passed to _sendEvent:",
|
||||
event];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5517,9 +5517,9 @@ literalIsEqual(NXConstantString *self, id anObject)
|
|||
NSUInteger index = 0;
|
||||
|
||||
if (NSNotFound == aRange.location)
|
||||
[NSException raise: NSRangeException
|
||||
format: @"in %s, range { %u, %u } extends beyond string",
|
||||
GSNameFromSelector(_cmd), aRange.location, aRange.length];
|
||||
[NSException raise: NSRangeException format:
|
||||
@"in %s, range { %"PRIuPTR", %"PRIuPTR" } extends beyond string",
|
||||
GSNameFromSelector(_cmd), aRange.location, aRange.length];
|
||||
|
||||
while (index < aRange.location && (i < nxcslen || n > 0))
|
||||
{
|
||||
|
@ -5536,9 +5536,9 @@ literalIsEqual(NXConstantString *self, id anObject)
|
|||
}
|
||||
if (index != max)
|
||||
{
|
||||
[NSException raise: NSRangeException
|
||||
format: @"in %s, range { %u, %u } extends beyond string",
|
||||
GSNameFromSelector(_cmd), aRange.location, aRange.length];
|
||||
[NSException raise: NSRangeException format:
|
||||
@"in %s, range { %"PRIuPTR", %"PRIuPTR" } extends beyond string",
|
||||
GSNameFromSelector(_cmd), aRange.location, aRange.length];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3453,7 +3453,7 @@ static NSLock *cached_proxies_gate = nil;
|
|||
}
|
||||
if (raiseException == YES)
|
||||
{
|
||||
[NSException raise: NSPortTimeoutException format: text];
|
||||
[NSException raise: NSPortTimeoutException format: @"%@", text];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -297,7 +297,7 @@ static NSIndexPath *dummy = nil;
|
|||
NSZoneFree(NSDefaultMallocZone(), dst);
|
||||
}
|
||||
[NSException raise: NSGenericException format:
|
||||
@"Unable to decode unsigned integers of size %u", s];
|
||||
@"Unable to decode unsigned integers of size %"PRIuPTR, s];
|
||||
}
|
||||
self = [self initWithIndexes: dst length: length];
|
||||
if ((void*)dst != src)
|
||||
|
|
|
@ -342,9 +342,9 @@ static id ValueForKey(NSObject *self, const char *key, unsigned size)
|
|||
}
|
||||
#endif
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"%@ -- %@ 0x%x: Given nil value to set for key \"%@\"",
|
||||
format: @"%@ -- %@ 0x%"PRIxPTR": Given nil value to set for key \"%@\"",
|
||||
NSStringFromSelector(_cmd), NSStringFromClass([self class]),
|
||||
self, aKey];
|
||||
(NSUInteger)self, aKey];
|
||||
}
|
||||
|
||||
|
||||
|
@ -898,9 +898,10 @@ static id ValueForKey(NSObject *self, const char *key, unsigned size)
|
|||
- (void) unableToSetNilForKey: (NSString*)aKey
|
||||
{
|
||||
GSOnceMLog(@"This method is deprecated, use -setNilValueForKey:");
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"%@ -- %@ 0x%x: Given nil value to set for key \"%@\"",
|
||||
NSStringFromSelector(_cmd), NSStringFromClass([self class]), self, aKey];
|
||||
[NSException raise: NSInvalidArgumentException format:
|
||||
@"%@ -- %@ 0x%"PRIxPTR": Given nil value to set for key \"%@\"",
|
||||
NSStringFromSelector(_cmd), NSStringFromClass([self class]),
|
||||
(NSUInteger)self, aKey];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -418,13 +418,13 @@ static NSMapTable *globalClassMap = 0;
|
|||
if (strcmp([o type], type) != 0)
|
||||
{
|
||||
[NSException raise: NSInvalidUnarchiveOperationException
|
||||
format: @"[%@ +%@]: type missmatch",
|
||||
format: @"[%@ +%@]: type missmatch for %@",
|
||||
NSStringFromClass([self class]), NSStringFromSelector(_cmd), o];
|
||||
}
|
||||
if ([o count] != expected)
|
||||
{
|
||||
[NSException raise: NSInvalidUnarchiveOperationException
|
||||
format: @"[%@ +%@]: count missmatch",
|
||||
format: @"[%@ +%@]: count missmatch for %@",
|
||||
NSStringFromClass([self class]), NSStringFromSelector(_cmd), o];
|
||||
}
|
||||
NSGetSizeAndAlignment(type, 0, &size);
|
||||
|
|
|
@ -1835,7 +1835,8 @@ static id gs_weak_load(id obj)
|
|||
[NSException
|
||||
raise: NSGenericException
|
||||
format: @"Autorelease would release object too many times.\n"
|
||||
@"%d release(s) versus %d retain(s)", release_count, retain_count];
|
||||
@"%"PRIuPTR" release(s) versus %"PRIuPTR" retain(s)",
|
||||
release_count, retain_count];
|
||||
}
|
||||
|
||||
(*autorelease_imp)(autorelease_class, autorelease_sel, self);
|
||||
|
|
|
@ -718,7 +718,7 @@ static NSOperationQueue *mainQueue = nil;
|
|||
if (YES == invalidArg)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"[%@-%@] object at index %u is not an NSOperation",
|
||||
format: @"[%@-%@] object at index %"PRIuPTR" is not an NSOperation",
|
||||
NSStringFromClass([self class]), NSStringFromSelector(_cmd),
|
||||
index];
|
||||
}
|
||||
|
@ -813,7 +813,7 @@ static NSOperationQueue *mainQueue = nil;
|
|||
&& cnt != NSOperationQueueDefaultMaxConcurrentOperationCount)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"[%@-%@] cannot set negative (%d) count",
|
||||
format: @"[%@-%@] cannot set negative (%"PRIdPTR") count",
|
||||
NSStringFromClass([self class]), NSStringFromSelector(_cmd), cnt];
|
||||
}
|
||||
[internal->lock lock];
|
||||
|
|
|
@ -494,7 +494,7 @@ static unsigned encodingVersion;
|
|||
if (count != expected)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"expected array count %u and got %u",
|
||||
format: @"expected array count %"PRIuPTR" and got %"PRIuPTR,
|
||||
expected, count];
|
||||
}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ static BOOL initialized = NO;
|
|||
if (key == nil)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: _(@"Passed nil key when initializing "
|
||||
format: @"%@", _(@"Passed nil key when initializing "
|
||||
@"an NSSortDescriptor.")];
|
||||
}
|
||||
if (selector == NULL)
|
||||
|
|
|
@ -735,7 +735,7 @@ unregisterActiveThread(NSThread *thread)
|
|||
if (_active == NO)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"[%@-$@] called on inactive thread",
|
||||
format: @"[%@-%@] called on inactive thread",
|
||||
NSStringFromClass([self class]),
|
||||
NSStringFromSelector(_cmd)];
|
||||
}
|
||||
|
@ -821,21 +821,21 @@ static void *nsthreadLauncher(void* thread)
|
|||
if (_active == YES)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"[%@-$@] called on active thread",
|
||||
format: @"[%@-%@] called on active thread",
|
||||
NSStringFromClass([self class]),
|
||||
NSStringFromSelector(_cmd)];
|
||||
}
|
||||
if (_cancelled == YES)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"[%@-$@] called on cancelled thread",
|
||||
format: @"[%@-%@] called on cancelled thread",
|
||||
NSStringFromClass([self class]),
|
||||
NSStringFromSelector(_cmd)];
|
||||
}
|
||||
if (_finished == YES)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"[%@-$@] called on finished thread",
|
||||
format: @"[%@-%@] called on finished thread",
|
||||
NSStringFromClass([self class]),
|
||||
NSStringFromSelector(_cmd)];
|
||||
}
|
||||
|
|
|
@ -587,7 +587,7 @@ static unsigned encodingVersion;
|
|||
if (count != expected)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"expected array count %u and got %u",
|
||||
format: @"expected array count %"PRIuPTR" and got %"PRIuPTR"",
|
||||
expected, count];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue