mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-21 04:32:03 +00:00
Tidy up use of white space so we have it after if/for/while and not after (
or before ) or padding at end of line. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20773 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c5f49ccbcb
commit
0708409c1b
180 changed files with 2181 additions and 2156 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
|||
2005-02-22 11:12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSFFCallInvocation.m:
|
||||
* Source/GSFormat.m:
|
||||
* Source/GSString.m:
|
||||
* Source/GSTemplateValue.m:
|
||||
* Source/NSAutoreleasePool.m:
|
||||
* Source/NSData.m:
|
||||
* Source/NSDebug.m:
|
||||
* Source/NSDecimal.m:
|
||||
* Source/NSInvocation.m:
|
||||
* Source/NSMethodSignature.m:
|
||||
* Source/NSScanner.m:
|
||||
* Source/NSThread.m:
|
||||
* Source/NSTimeZone.m:
|
||||
* Source/NSUserDefaults.m:
|
||||
* Source/libgnustep-base-entry.m:
|
||||
* Source/thr-mach.m:
|
||||
* Source/thr-pthread.m:
|
||||
* Source/Additions/GSCategories.m:
|
||||
* Source/Additions/GSObjCRuntime.m:
|
||||
* Source/Additions/Unicode.m:
|
||||
* Source/Additions/behavior.m:
|
||||
Tidy up use of white space a little.
|
||||
|
||||
2005-02-21 20:30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSFormat.m: Modified code to rewrite output to use correct
|
||||
|
|
|
@ -360,7 +360,7 @@ static Class gcClass = 0;
|
|||
_isGCObject = (BOOL*)&_contents[_maxCount];
|
||||
memmove(_isGCObject, optr, sizeof(BOOL)*old);
|
||||
}
|
||||
for(i = _count; i > index; i--)
|
||||
for (i = _count; i > index; i--)
|
||||
{
|
||||
_contents[i] = _contents[i - 1];
|
||||
_isGCObject[i] = _isGCObject[i - 1];
|
||||
|
|
|
@ -393,7 +393,7 @@ static void MD5Final (unsigned char digest[16], struct MD5Context *ctx)
|
|||
|
||||
/* This is the central step in the MD5 algorithm. */
|
||||
#define MD5STEP(f, w, x, y, z, data, s) \
|
||||
( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x )
|
||||
(w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x)
|
||||
|
||||
/*
|
||||
* The core of the MD5 algorithm, this alters an existing MD5 hash to
|
||||
|
|
|
@ -141,7 +141,7 @@ GSDebugFunctionMsg(const char *func, const char *file, int line, NSString *fmt)
|
|||
|
||||
+ (void) setDebug: (int)val
|
||||
{
|
||||
if([self respondsToSelector:@selector(_enableLogging:)])
|
||||
if ([self respondsToSelector:@selector(_enableLogging:)])
|
||||
[self _enableLogging:!!val];
|
||||
}
|
||||
@end
|
||||
|
@ -363,7 +363,7 @@ BOOL GSDebugSet(NSString *level)
|
|||
- (NSMutableSet *) debugSet
|
||||
// Derived from GNUStep's
|
||||
{
|
||||
if(_debug_set == nil){
|
||||
if (_debug_set == nil){
|
||||
int argc = [[self arguments] count];
|
||||
NSMutableSet *mySet;
|
||||
int i;
|
||||
|
|
|
@ -220,7 +220,7 @@ objc_alignof_type(const char* type)
|
|||
case _C_STRUCT_B:
|
||||
{
|
||||
struct { int x; double y; } fooalign;
|
||||
while(*type != _C_STRUCT_E && *type++ != '=') /* do nothing */;
|
||||
while (*type != _C_STRUCT_E && *type++ != '=') /* do nothing */;
|
||||
if (*type != _C_STRUCT_E)
|
||||
return MAX (objc_alignof_type (type), __alignof__ (fooalign));
|
||||
else
|
||||
|
@ -359,7 +359,7 @@ objc_skip_typespec (const char* type)
|
|||
case _C_ARY_B:
|
||||
/* skip digits, typespec and closing ']' */
|
||||
|
||||
while(isdigit(*++type));
|
||||
while (isdigit(*++type));
|
||||
type = objc_skip_typespec(type);
|
||||
if (*type == _C_ARY_E)
|
||||
return ++type;
|
||||
|
@ -399,7 +399,7 @@ objc_skip_offset (const char* type)
|
|||
{
|
||||
if (*type == '+') type++;
|
||||
if (*type == '-') type++;
|
||||
while(isdigit(*++type));
|
||||
while (isdigit(*++type));
|
||||
return type;
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ void *
|
|||
objc_malloc(size_t size)
|
||||
{
|
||||
void* res = (void*) (*_objc_malloc)(size);
|
||||
if(!res)
|
||||
if (!res)
|
||||
objc_error(nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n");
|
||||
return res;
|
||||
}
|
||||
|
@ -508,7 +508,7 @@ void *
|
|||
objc_atomic_malloc(size_t size)
|
||||
{
|
||||
void* res = (void*) (*_objc_atomic_malloc)(size);
|
||||
if(!res)
|
||||
if (!res)
|
||||
objc_error(nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n");
|
||||
return res;
|
||||
}
|
||||
|
@ -517,7 +517,7 @@ void *
|
|||
objc_valloc(size_t size)
|
||||
{
|
||||
void* res = (void*) (*_objc_valloc)(size);
|
||||
if(!res)
|
||||
if (!res)
|
||||
objc_error(nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n");
|
||||
return res;
|
||||
}
|
||||
|
@ -526,7 +526,7 @@ void *
|
|||
objc_realloc(void *mem, size_t size)
|
||||
{
|
||||
void* res = (void*) (*_objc_realloc)(mem, size);
|
||||
if(!res)
|
||||
if (!res)
|
||||
objc_error(nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n");
|
||||
return res;
|
||||
}
|
||||
|
@ -535,7 +535,7 @@ void *
|
|||
objc_calloc(size_t nelem, size_t size)
|
||||
{
|
||||
void* res = (void*) (*_objc_calloc)(nelem, size);
|
||||
if(!res)
|
||||
if (!res)
|
||||
objc_error(nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n");
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ GSObjCMethodNames(id obj)
|
|||
{
|
||||
void *iterator = 0;
|
||||
|
||||
while ((methods = class_nextMethodList(class, &iterator)) )
|
||||
while ((methods = class_nextMethodList(class, &iterator)))
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -675,7 +675,7 @@ search_for_method_in_class (Class cls, SEL op)
|
|||
return NULL;
|
||||
|
||||
/* If not found then we'll search the list. */
|
||||
while ( (method_list = class_nextMethodList(cls, &iterator)) )
|
||||
while ((method_list = class_nextMethodList(cls, &iterator)))
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -953,13 +953,13 @@ GSMethodListForSelector(Class cls,
|
|||
cls = cls->class_pointer;
|
||||
}
|
||||
|
||||
if(sel_is_mapped(selector))
|
||||
if (sel_is_mapped(selector))
|
||||
{
|
||||
void **iterator_pointer;
|
||||
GSMethodList method_list;
|
||||
|
||||
iterator_pointer = (iterator == 0 ? &local_iterator : iterator);
|
||||
while((method_list = class_nextMethodList(cls, iterator_pointer)))
|
||||
while ((method_list = class_nextMethodList(cls, iterator_pointer)))
|
||||
{
|
||||
/* Search the method in the current list. */
|
||||
if (GSMethodFromList(method_list, selector, NO) != 0)
|
||||
|
@ -989,7 +989,7 @@ GSMethodFromList(GSMethodList list,
|
|||
isFree = NO;
|
||||
#endif
|
||||
|
||||
for(i = 0; i < list->method_count; ++i)
|
||||
for (i = 0; i < list->method_count; ++i)
|
||||
{
|
||||
GSMethod method = &list->method_list[i];
|
||||
SEL method_name = method->method_name;
|
||||
|
@ -1241,7 +1241,7 @@ gs_find_protocol_named(const char *name)
|
|||
|
||||
clsListStart = clsList;
|
||||
|
||||
while(p == NULL && (cls = *clsList++))
|
||||
while (p == NULL && (cls = *clsList++))
|
||||
{
|
||||
p = gs_find_protocol_named_in_protocol_list(name, cls->protocols);
|
||||
}
|
||||
|
@ -1251,7 +1251,7 @@ gs_find_protocol_named(const char *name)
|
|||
#else
|
||||
void *iterator = NULL;
|
||||
|
||||
while(p == NULL && (cls = objc_next_class(&iterator)))
|
||||
while (p == NULL && (cls = objc_next_class(&iterator)))
|
||||
{
|
||||
p = gs_find_protocol_named_in_protocol_list(name, cls->protocols);
|
||||
}
|
||||
|
|
|
@ -457,7 +457,7 @@ GSEncodingForRegistry (NSString *registry, NSString *encoding)
|
|||
return NSKoreanEUCStringEncoding;
|
||||
}
|
||||
else if ([registry isEqualToString:@"utf8"]
|
||||
|| [registry isEqualToString:@"utf-8"] )
|
||||
|| [registry isEqualToString:@"utf-8"])
|
||||
{
|
||||
return NSUTF8StringEncoding;
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ behavior_class_add_class (Class class, Class behavior)
|
|||
void *iterator = 0;
|
||||
struct objc_method_list *method_list;
|
||||
|
||||
while ( (method_list = class_nextMethodList(behavior, &iterator)) )
|
||||
while ((method_list = class_nextMethodList(behavior, &iterator)))
|
||||
behavior_class_add_methods (class, method_list);
|
||||
}
|
||||
#else
|
||||
|
@ -131,8 +131,8 @@ behavior_class_add_class (Class class, Class behavior)
|
|||
void *iterator = 0;
|
||||
struct objc_method_list *method_list;
|
||||
|
||||
while ( (method_list =
|
||||
class_nextMethodList(behavior->class_pointer, &iterator)) )
|
||||
while ((method_list =
|
||||
class_nextMethodList(behavior->class_pointer, &iterator)))
|
||||
behavior_class_add_methods (class->class_pointer, method_list);
|
||||
}
|
||||
#else
|
||||
|
@ -239,7 +239,7 @@ search_for_method_in_list (Class class, SEL op)
|
|||
return NULL;
|
||||
|
||||
/* If not found then we'll search the list. */
|
||||
while ( (method_list = class_nextMethodList(class, &iterator)) )
|
||||
while ((method_list = class_nextMethodList(class, &iterator)))
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -726,7 +726,7 @@ gs_protocol_selector(const char *types)
|
|||
}
|
||||
while (*types != '\0')
|
||||
{
|
||||
if (*types == '-' )
|
||||
if (*types == '-')
|
||||
{
|
||||
types++;
|
||||
}
|
||||
|
|
|
@ -1700,7 +1700,7 @@ NSDictionary *locale)
|
|||
--width; /* Account for the character itself. */
|
||||
if (!left)
|
||||
PAD (' ');
|
||||
outchar ( ((unsigned char)
|
||||
outchar (((unsigned char)
|
||||
args_value[specs[nspecs_done].data_arg].pa_char));
|
||||
if (left)
|
||||
PAD (' ');
|
||||
|
@ -1980,7 +1980,7 @@ printf_unknown (GSStr s, const struct printf_info *info,
|
|||
static unichar *
|
||||
group_number (unichar *w, unichar *rear_ptr, const char *grouping,
|
||||
NSString *thousands_sep
|
||||
)
|
||||
)
|
||||
{
|
||||
int len;
|
||||
unichar *src, *s;
|
||||
|
@ -2017,7 +2017,7 @@ group_number (unichar *w, unichar *rear_ptr, const char *grouping,
|
|||
#if CHAR_MIN < 0
|
||||
|| *grouping < 0
|
||||
#endif
|
||||
)
|
||||
)
|
||||
{
|
||||
/* No further grouping to be done.
|
||||
Copy the rest of the number. */
|
||||
|
|
|
@ -1774,7 +1774,7 @@ rangeOfSequence_u(GSStr self, unsigned anIndex)
|
|||
start--;
|
||||
end = start + 1;
|
||||
if (end < self->_count)
|
||||
while ((end < self->_count) && (uni_isnonsp(self->_contents.u[end])) )
|
||||
while ((end < self->_count) && (uni_isnonsp(self->_contents.u[end])))
|
||||
end++;
|
||||
return (NSRange){start, end-start};
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
format: @"Cannot copy value into NULL buffer"];
|
||||
/* NOT REACHED */
|
||||
}
|
||||
memcpy( value, &data, objc_sizeof_type([self objCType]) );
|
||||
memcpy(value, &data, objc_sizeof_type([self objCType]));
|
||||
}
|
||||
|
||||
- (BOOL) isEqual: (id)other
|
||||
|
|
|
@ -401,7 +401,7 @@ static IMP initImp;
|
|||
- (void) _reallyDealloc
|
||||
{
|
||||
struct autorelease_array_list *a;
|
||||
for (a = _released_head; a; )
|
||||
for (a = _released_head; a;)
|
||||
{
|
||||
void *n = a->next;
|
||||
NSZoneFree(NSDefaultMallocZone(), a);
|
||||
|
|
|
@ -1350,7 +1350,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
resources = [NSMutableArray arrayWithCapacity: 2];
|
||||
allfiles = (extension == nil || [extension length] == 0);
|
||||
|
||||
while((path = [pathlist nextObject]))
|
||||
while ((path = [pathlist nextObject]))
|
||||
{
|
||||
NSEnumerator *filelist;
|
||||
NSString *match;
|
||||
|
|
|
@ -763,7 +763,7 @@ static unsigned gsu32Align;
|
|||
|
||||
while (l-- > 0)
|
||||
{
|
||||
ret = (ret << 5 ) + ret + buf[l];
|
||||
ret = (ret << 5) + ret + buf[l];
|
||||
}
|
||||
// Again, match NSString
|
||||
if (ret == 0)
|
||||
|
|
|
@ -857,10 +857,10 @@ GSDebugMethodMsg(id obj, SEL sel, const char *file, int line, NSString *fmt)
|
|||
void *NSFrameAddress(int offset)
|
||||
{
|
||||
switch (offset) {
|
||||
_NS_FRAME_HACK( 0); _NS_FRAME_HACK( 1); _NS_FRAME_HACK( 2);
|
||||
_NS_FRAME_HACK( 3); _NS_FRAME_HACK( 4); _NS_FRAME_HACK( 5);
|
||||
_NS_FRAME_HACK( 6); _NS_FRAME_HACK( 7); _NS_FRAME_HACK( 8);
|
||||
_NS_FRAME_HACK( 9); _NS_FRAME_HACK(10); _NS_FRAME_HACK(11);
|
||||
_NS_FRAME_HACK(0); _NS_FRAME_HACK(1); _NS_FRAME_HACK(2);
|
||||
_NS_FRAME_HACK(3); _NS_FRAME_HACK(4); _NS_FRAME_HACK(5);
|
||||
_NS_FRAME_HACK(6); _NS_FRAME_HACK(7); _NS_FRAME_HACK(8);
|
||||
_NS_FRAME_HACK(9); _NS_FRAME_HACK(10); _NS_FRAME_HACK(11);
|
||||
_NS_FRAME_HACK(12); _NS_FRAME_HACK(13); _NS_FRAME_HACK(14);
|
||||
_NS_FRAME_HACK(15); _NS_FRAME_HACK(16); _NS_FRAME_HACK(17);
|
||||
_NS_FRAME_HACK(18); _NS_FRAME_HACK(19); _NS_FRAME_HACK(20);
|
||||
|
@ -908,10 +908,10 @@ unsigned NSCountFrames(void)
|
|||
void *NSReturnAddress(int offset)
|
||||
{
|
||||
switch (offset) {
|
||||
_NS_RETURN_HACK( 0); _NS_RETURN_HACK( 1); _NS_RETURN_HACK( 2);
|
||||
_NS_RETURN_HACK( 3); _NS_RETURN_HACK( 4); _NS_RETURN_HACK( 5);
|
||||
_NS_RETURN_HACK( 6); _NS_RETURN_HACK( 7); _NS_RETURN_HACK( 8);
|
||||
_NS_RETURN_HACK( 9); _NS_RETURN_HACK(10); _NS_RETURN_HACK(11);
|
||||
_NS_RETURN_HACK(0); _NS_RETURN_HACK(1); _NS_RETURN_HACK(2);
|
||||
_NS_RETURN_HACK(3); _NS_RETURN_HACK(4); _NS_RETURN_HACK(5);
|
||||
_NS_RETURN_HACK(6); _NS_RETURN_HACK(7); _NS_RETURN_HACK(8);
|
||||
_NS_RETURN_HACK(9); _NS_RETURN_HACK(10); _NS_RETURN_HACK(11);
|
||||
_NS_RETURN_HACK(12); _NS_RETURN_HACK(13); _NS_RETURN_HACK(14);
|
||||
_NS_RETURN_HACK(15); _NS_RETURN_HACK(16); _NS_RETURN_HACK(17);
|
||||
_NS_RETURN_HACK(18); _NS_RETURN_HACK(19); _NS_RETURN_HACK(20);
|
||||
|
|
|
@ -1550,7 +1550,7 @@ GSSimpleDivide(NSDecimal *result, const NSDecimal *l, const NSDecimal *r,
|
|||
k = 0;
|
||||
used = 0;
|
||||
|
||||
while ((k < l->length ) || (n1.length))
|
||||
while ((k < l->length) || (n1.length))
|
||||
{
|
||||
while (NSOrderedAscending == NSDecimalCompare(&n1, r))
|
||||
{
|
||||
|
|
|
@ -616,7 +616,7 @@ _arg_addr(NSInvocation *inv, int index)
|
|||
self, \
|
||||
_selector ? GSNameFromSelector(_selector) : "nil", \
|
||||
_target ? GSNameFromClass([_target class]) : "nil" \
|
||||
);
|
||||
);
|
||||
|
||||
return [NSString stringWithCString: buffer];
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
&& [self frameLength] == [other frameLength]
|
||||
&& *[self methodReturnType] == *[other methodReturnType]
|
||||
&& [self isOneway] == [other isOneway]);
|
||||
if(isEqual == NO)
|
||||
if (isEqual == NO)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
@ -149,9 +149,9 @@
|
|||
{
|
||||
int i, n;
|
||||
n = [self numberOfArguments];
|
||||
for(i = 0; i < n; i++)
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if ( (*[self getArgumentTypeAtIndex:i]
|
||||
if ((*[self getArgumentTypeAtIndex:i]
|
||||
== *[other getArgumentTypeAtIndex:i]) == NO)
|
||||
{
|
||||
return NO;
|
||||
|
|
|
@ -389,7 +389,7 @@ static char **_gnu_noobjc_env = NULL;
|
|||
}
|
||||
|
||||
/* copy the environment strings */
|
||||
for(count = 0; vectors[count]; count++)
|
||||
for (count = 0; vectors[count]; count++)
|
||||
;
|
||||
_gnu_noobjc_env = (char**)malloc(sizeof(char*) * (count + 1));
|
||||
if (!_gnu_noobjc_env)
|
||||
|
@ -411,7 +411,7 @@ static char **_gnu_noobjc_env = NULL;
|
|||
}
|
||||
|
||||
/* copy the argument strings */
|
||||
for(_gnu_noobjc_argc = 0; vectors[_gnu_noobjc_argc]; _gnu_noobjc_argc++)
|
||||
for (_gnu_noobjc_argc = 0; vectors[_gnu_noobjc_argc]; _gnu_noobjc_argc++)
|
||||
;
|
||||
_gnu_noobjc_argv = (char**)malloc(sizeof(char*) * (_gnu_noobjc_argc + 1));
|
||||
if (!_gnu_noobjc_argv)
|
||||
|
|
|
@ -466,7 +466,7 @@ typedef struct {
|
|||
}
|
||||
}
|
||||
}
|
||||
if ( [self scanUnsignedInt_: value radix: radix gotDigits: gotDigits])
|
||||
if ([self scanUnsignedInt_: value radix: radix gotDigits: gotDigits])
|
||||
return YES;
|
||||
_scanLocation = saveScanLocation;
|
||||
return NO;
|
||||
|
|
|
@ -2411,7 +2411,7 @@ handle_printf_atsign (FILE *stream,
|
|||
{
|
||||
BOOL found = NO;
|
||||
end = aRange.location;
|
||||
if(aRange.length)
|
||||
if (aRange.length)
|
||||
{
|
||||
end += (aRange.length - 1);
|
||||
}
|
||||
|
|
|
@ -848,7 +848,7 @@ static NSDate *theFuture;
|
|||
* work.
|
||||
*/
|
||||
#ifndef __MINGW__
|
||||
for (i = 0; i < count; i++ )
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
[loop addEvent: (void*)inputFd
|
||||
type: ET_RDESC
|
||||
|
|
|
@ -1220,12 +1220,12 @@ static NSMapTable *absolutes = 0;
|
|||
}
|
||||
}
|
||||
#endif
|
||||
if ( localZoneString != nil && [localZoneString hasPrefix: tzdir] )
|
||||
if (localZoneString != nil && [localZoneString hasPrefix: tzdir])
|
||||
{
|
||||
/* This must be the time zone name */
|
||||
localZoneString = [[localZoneString mutableCopy] autorelease];
|
||||
[(NSMutableString *)localZoneString deletePrefix: tzdir];
|
||||
if ( [localZoneString hasPrefix: @"/"] )
|
||||
if ([localZoneString hasPrefix: @"/"])
|
||||
{
|
||||
[(NSMutableString *)localZoneString deletePrefix: @"/"];
|
||||
}
|
||||
|
@ -1857,7 +1857,7 @@ int dayOfCommonEra(NSTimeInterval when);
|
|||
timeZoneName = [[NSString stringWithCString:standardName] retain];
|
||||
|
||||
/* Abbr generated here is IMHO a bit suspicous but I kept it */
|
||||
for(a=0,b=0;standardName[a];a++)
|
||||
for (a=0,b=0;standardName[a];a++)
|
||||
{
|
||||
if (isupper(standardName[a]))
|
||||
standardName[b++]=standardName[a];
|
||||
|
@ -1875,7 +1875,7 @@ int dayOfCommonEra(NSTimeInterval when);
|
|||
daylightZoneName = [[NSString stringWithCString:daylightName] retain];
|
||||
|
||||
/* Abbr generated here is IMHO a bit suspicous but I kept it */
|
||||
for(a=0,b=0;daylightName[a];a++)
|
||||
for (a=0,b=0;daylightName[a];a++)
|
||||
{
|
||||
if (isupper(daylightName[a]))
|
||||
daylightName[b++]=daylightName[a];
|
||||
|
|
|
@ -345,9 +345,9 @@
|
|||
[_redoStack removeObjectAtIndex: 0];
|
||||
}
|
||||
|
||||
if(g != nil)
|
||||
if (g != nil)
|
||||
{
|
||||
if([[g actions] count] > 0)
|
||||
if ([[g actions] count] > 0)
|
||||
[_redoStack addObject: g];
|
||||
}
|
||||
}
|
||||
|
@ -358,9 +358,9 @@
|
|||
[_undoStack removeObjectAtIndex: 0];
|
||||
}
|
||||
|
||||
if(g != nil)
|
||||
if (g != nil)
|
||||
{
|
||||
if([[g actions] count] > 0)
|
||||
if ([[g actions] count] > 0)
|
||||
[_undoStack addObject: g];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1753,7 +1753,7 @@ static BOOL isPlistObject(id o)
|
|||
|
||||
while ((obj = (*nImp)(enumerator, nextObjectSel)) != nil)
|
||||
{
|
||||
if ( (dict = (*pImp)(_persDomains, objectForKeySel, obj)) != nil
|
||||
if ((dict = (*pImp)(_persDomains, objectForKeySel, obj)) != nil
|
||||
|| (dict = (*tImp)(_tempDomains, objectForKeySel, obj)) != nil)
|
||||
(*addImp)(dictRep, addSel, dict);
|
||||
}
|
||||
|
|
|
@ -420,7 +420,7 @@ callframe_do_call (DOContext *ctxt,
|
|||
(*decoder) (ctxt);
|
||||
}
|
||||
}
|
||||
/* End of the for() loop that enumerates the method's arguments. */
|
||||
/* End of the for () loop that enumerates the method's arguments. */
|
||||
ctxt->type = 0;
|
||||
ctxt->datum = 0;
|
||||
(*decoder) (ctxt);
|
||||
|
|
|
@ -212,7 +212,7 @@ cifframe_from_info (NSArgumentInfo *info, int numargs, void **retval)
|
|||
cframe->values = buf + offset;
|
||||
}
|
||||
|
||||
if (ffi_prep_cif(&cframe->cif, FFI_DEFAULT_ABI, cframe->nargs,
|
||||
if (ffi_prep_cif (&cframe->cif, FFI_DEFAULT_ABI, cframe->nargs,
|
||||
rtype, cframe->arg_types) != FFI_OK)
|
||||
{
|
||||
free(cframe);
|
||||
|
@ -817,7 +817,7 @@ cifframe_do_call (DOContext *ctxt,
|
|||
(*decoder) (ctxt);
|
||||
}
|
||||
}
|
||||
/* End of the for() loop that enumerates the method's arguments. */
|
||||
/* End of the for () loop that enumerates the method's arguments. */
|
||||
ctxt->type = 0;
|
||||
ctxt->datum = 0;
|
||||
(*decoder) (ctxt);
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
/* Only if using Microsoft's tools and libraries */
|
||||
#ifdef __MS_WIN32__
|
||||
#include <stdio.h>
|
||||
WINBOOL WINAPI _CRT_INIT( HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
LPVOID lpReserved );
|
||||
WINBOOL WINAPI _CRT_INIT(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
LPVOID lpReserved);
|
||||
|
||||
// Global errno isn't defined in Microsoft's thread safe C library
|
||||
void errno()
|
||||
|
|
|
@ -1044,7 +1044,7 @@ mframe_do_call (DOContext *ctxt,
|
|||
(*decoder) (ctxt);
|
||||
}
|
||||
}
|
||||
/* End of the for() loop that enumerates the method's arguments. */
|
||||
/* End of the for () loop that enumerates the method's arguments. */
|
||||
ctxt->type = 0;
|
||||
ctxt->datum = 0;
|
||||
(*decoder) (ctxt);
|
||||
|
|
|
@ -46,7 +46,7 @@ id next_objc_msg_sendv(id object, SEL op, void* frame)
|
|||
stack on i386 machines. This happens with NeXT runtime and 2.7.2
|
||||
compiler. If the result value is floating point don't call
|
||||
__builtin_return anymore. */
|
||||
if(*m->method_types == _C_FLT || *m->method_types == _C_DBL) {
|
||||
if (*m->method_types == _C_FLT || *m->method_types == _C_DBL) {
|
||||
long double value = *(long double*)(((char*)result) + 8);
|
||||
asm("fld %0" : : "f" (value));
|
||||
}
|
||||
|
|
|
@ -234,7 +234,7 @@ __objc_thread_detach(void (*func)(void *arg), void *arg)
|
|||
/* create thread */
|
||||
new_thread_handle = cthread_fork((cthread_fn_t)func, arg);
|
||||
|
||||
if(new_thread_handle)
|
||||
if (new_thread_handle)
|
||||
{
|
||||
/* this is not terribly portable */
|
||||
thread_id = *(objc_thread_t *)&new_thread_handle;
|
||||
|
@ -297,13 +297,13 @@ objc_thread_get_priority(void)
|
|||
|
||||
maxPriority = __mach_get_max_thread_priority(cT, &basePriority);
|
||||
|
||||
if(maxPriority == -1)
|
||||
if (maxPriority == -1)
|
||||
return -1;
|
||||
|
||||
if (basePriority > ( (maxPriority * 2) / 3))
|
||||
if (basePriority > ((maxPriority * 2) / 3))
|
||||
return OBJC_THREAD_INTERACTIVE_PRIORITY;
|
||||
|
||||
if (basePriority > ( maxPriority / 3))
|
||||
if (basePriority > (maxPriority / 3))
|
||||
return OBJC_THREAD_BACKGROUND_PRIORITY;
|
||||
|
||||
return OBJC_THREAD_LOW_PRIORITY;
|
||||
|
|
|
@ -210,7 +210,7 @@ __objc_thread_detach(void (*func)(void *arg), void *arg)
|
|||
objc_thread_t thread_id;
|
||||
pthread_t new_thread_handle;
|
||||
|
||||
if ( !(pthread_create(&new_thread_handle, NULL, (void *)func, arg)) )
|
||||
if (!(pthread_create(&new_thread_handle, NULL, (void *)func, arg)))
|
||||
thread_id = *(objc_thread_t *)&new_thread_handle;
|
||||
else
|
||||
thread_id = NULL;
|
||||
|
|
|
@ -42,7 +42,7 @@ volatile int counter = 0;
|
|||
volatile int threadExitCounter;
|
||||
|
||||
void
|
||||
wait_a_while()
|
||||
wait_a_while ()
|
||||
{
|
||||
volatile int i;
|
||||
for (i = 0; i < 5; i++)
|
||||
|
@ -84,7 +84,7 @@ wait_a_while()
|
|||
[lock lock];
|
||||
|
||||
temp = counter;
|
||||
wait_a_while();
|
||||
wait_a_while ();
|
||||
|
||||
if (makeMulti && i == 49 )
|
||||
{
|
||||
|
@ -96,7 +96,7 @@ wait_a_while()
|
|||
|
||||
|
||||
counter = temp + 1;
|
||||
wait_a_while();
|
||||
wait_a_while ();
|
||||
|
||||
[lock unlock];
|
||||
}
|
||||
|
|
|
@ -52,13 +52,13 @@ void printAttrString(NSAttributedString *attrStr)
|
|||
effectiveRange = NSMakeRange(0,0);
|
||||
tmpLength = [attrStr length];
|
||||
puts("Attributed string looks like this:");
|
||||
while(NSMaxRange(effectiveRange) < tmpLength)
|
||||
while (NSMaxRange(effectiveRange) < tmpLength)
|
||||
{
|
||||
tmpAttrDict = [attrStr attributesAtIndex:NSMaxRange(effectiveRange)
|
||||
effectiveRange:&effectiveRange];
|
||||
printf("String: %s attributes: ",[[attrStr string] cString]);
|
||||
keyEnumerator = [tmpAttrDict keyEnumerator];
|
||||
while((tmpStr = [keyEnumerator nextObject]))
|
||||
while ((tmpStr = [keyEnumerator nextObject]))
|
||||
printf("%s ",[tmpStr cString]);
|
||||
printf("location: %ld length: %ld\n",
|
||||
(long)effectiveRange.location,
|
||||
|
|
|
@ -40,7 +40,7 @@ int main()
|
|||
@"http:/www.foobar.org/PageWithAValid.plist"];
|
||||
data = [currentURL resourceDataUsingCache: NO];
|
||||
|
||||
if( data )
|
||||
if ( data )
|
||||
printf(" YES \n");
|
||||
printf(" NO\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue