mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
trivial formating tweaks ... add missing white space
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34374 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
44de775895
commit
f7b8b22bae
10 changed files with 92 additions and 91 deletions
|
@ -158,7 +158,8 @@
|
|||
forMode: (NSString*)mode
|
||||
{
|
||||
int fd = (int)(intptr_t)data;
|
||||
if(fileDesc != fd)
|
||||
|
||||
if (fileDesc != fd)
|
||||
{
|
||||
//Not good
|
||||
return;
|
||||
|
|
|
@ -812,7 +812,7 @@ gs_protocol_selector(const char *types)
|
|||
{
|
||||
types++;
|
||||
}
|
||||
while(isdigit(*types))
|
||||
while (isdigit(*types))
|
||||
{
|
||||
types++;
|
||||
}
|
||||
|
|
|
@ -516,7 +516,7 @@ gs_protocol_selector(const char *types)
|
|||
{
|
||||
types++;
|
||||
}
|
||||
while(isdigit(*types))
|
||||
while (isdigit(*types))
|
||||
{
|
||||
types++;
|
||||
}
|
||||
|
|
|
@ -1501,7 +1501,7 @@ static void DNSSD_API
|
|||
|
||||
TXTRecordCreate(&txt, 0, NULL);
|
||||
|
||||
for(; i < count; i++)
|
||||
for (; i < count; i++)
|
||||
{
|
||||
int length = 0;
|
||||
int used = 0;
|
||||
|
@ -1632,7 +1632,7 @@ static void DNSSD_API
|
|||
if (result)
|
||||
{
|
||||
// go through all keys
|
||||
for(; i < count; i++)
|
||||
for (; i < count; i++)
|
||||
{
|
||||
char key[256];
|
||||
uint8_t valLen = 0;
|
||||
|
|
|
@ -2314,10 +2314,10 @@ IF_NO_GC(
|
|||
if (object == nil || [object length] == 0)
|
||||
{
|
||||
object = [[self infoDictionary] objectForKey: @"CFBundleExecutable"];
|
||||
if(object == nil || [object length] == 0)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
if (object == nil || [object length] == 0)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
if (_bundleType == NSBUNDLE_FRAMEWORK)
|
||||
{
|
||||
|
|
|
@ -900,7 +900,7 @@ _gnu_noobjc_free_vars(void)
|
|||
if (self == [NSProcessInfo class]
|
||||
&& !_gnu_processName && !_gnu_arguments && !_gnu_environment)
|
||||
{
|
||||
if(_gnu_noobjc_argv == 0 || _gnu_noobjc_env == 0)
|
||||
if (_gnu_noobjc_argv == 0 || _gnu_noobjc_env == 0)
|
||||
{
|
||||
_NSLog_printf_handler(_GNU_MISSING_MAIN_FUNCTION_CALL);
|
||||
exit(1);
|
||||
|
|
|
@ -872,10 +872,10 @@ static Class NSMutableSet_concrete_class;
|
|||
FOR_IN (id, obj, enumerator)
|
||||
{
|
||||
CALL_BLOCK(aBlock, obj, &shouldStop);
|
||||
if(shouldStop)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (shouldStop)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
END_FOR_IN(enumerator)
|
||||
}
|
||||
|
|
|
@ -84,10 +84,10 @@
|
|||
options: (NSUInteger)mask
|
||||
error: (NSError**)error
|
||||
{
|
||||
if((self = [super init]) != nil)
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
NSXMLParser *parser = [[NSXMLParser alloc] initWithData: data];
|
||||
if(parser != nil)
|
||||
if (parser != nil)
|
||||
{
|
||||
_standalone = YES;
|
||||
_children = [[NSMutableArray alloc] initWithCapacity: 10];
|
||||
|
@ -102,7 +102,7 @@
|
|||
|
||||
- (id) initWithRootElement: (NSXMLElement*)element
|
||||
{
|
||||
if([_children containsObject: element] || [element parent] != nil)
|
||||
if ([_children containsObject: element] || [element parent] != nil)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"%@ cannot be used as root of %@",
|
||||
|
@ -110,7 +110,7 @@
|
|||
self];
|
||||
}
|
||||
self = [self initWithData: nil options: 0 error: 0];
|
||||
if(self != nil)
|
||||
if (self != nil)
|
||||
{
|
||||
[self setRootElement: (NSXMLNode*)element];
|
||||
}
|
||||
|
@ -296,7 +296,7 @@
|
|||
|
||||
[_elementStack insertObject: currentElement
|
||||
atIndex: 0];
|
||||
if(_rootElement == nil)
|
||||
if (_rootElement == nil)
|
||||
{
|
||||
[self setRootElement: currentElement];
|
||||
}
|
||||
|
@ -310,10 +310,10 @@
|
|||
namespaceURI:(NSString *)namespaceURI
|
||||
qualifiedName:(NSString *)qName
|
||||
{
|
||||
if([_elementStack count] > 0)
|
||||
if ([_elementStack count] > 0)
|
||||
{
|
||||
NSXMLElement *currentElement = [_elementStack objectAtIndex: 0];
|
||||
if([[currentElement name] isEqualToString: elementName])
|
||||
if ([[currentElement name] isEqualToString: elementName])
|
||||
{
|
||||
[_elementStack removeObjectAtIndex: 0];
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
- (id) initWithName: (NSString*)name URI: (NSString*)URI
|
||||
{
|
||||
if((self = [super initWithKind:NSXMLElementKind]) != nil)
|
||||
if ((self = [super initWithKind:NSXMLElementKind]) != nil)
|
||||
{
|
||||
ASSIGN(_name, name);
|
||||
}
|
||||
|
@ -87,10 +87,10 @@
|
|||
NSXMLNode *node = nil;
|
||||
int index = 0;
|
||||
|
||||
while((node = [en nextObject]) != nil)
|
||||
while ((node = [en nextObject]) != nil)
|
||||
{
|
||||
NSString *nodeName = [node name];
|
||||
if([nodeName isEqualToString: name])
|
||||
if ([nodeName isEqualToString: name])
|
||||
{
|
||||
[_attributes removeObjectAtIndex: index];
|
||||
}
|
||||
|
@ -113,7 +113,7 @@
|
|||
{
|
||||
NSEnumerator *ken = [attributes keyEnumerator];
|
||||
id key = nil;
|
||||
while((key = [ken nextObject]) != nil)
|
||||
while ((key = [ken nextObject]) != nil)
|
||||
{
|
||||
id value = [attributes objectForKey: key];
|
||||
NSXMLNode *node = [NSXMLNode attributeWithName: key
|
||||
|
|
|
@ -274,9 +274,9 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
|||
{
|
||||
Class theSubclass = [NSXMLNode class];
|
||||
if (nil == (self = [super init]))
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
GS_CREATE_INTERNAL(NSXMLNode)
|
||||
|
||||
|
@ -284,34 +284,34 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
|||
* We find the correct subclass for specific node kinds:
|
||||
*/
|
||||
switch (kind)
|
||||
{
|
||||
case NSXMLDocumentKind:
|
||||
{
|
||||
theSubclass = [NSXMLDocument class];
|
||||
break;
|
||||
case NSXMLDocumentKind:
|
||||
{
|
||||
theSubclass = [NSXMLDocument class];
|
||||
break;
|
||||
}
|
||||
case NSXMLElementKind:
|
||||
{
|
||||
theSubclass = [NSXMLElement class];
|
||||
break;
|
||||
}
|
||||
case NSXMLDTDKind:
|
||||
{
|
||||
theSubclass = [NSXMLDTD class];
|
||||
break;
|
||||
}
|
||||
case NSXMLEntityDeclarationKind:
|
||||
case NSXMLElementDeclarationKind:
|
||||
case NSXMLNotationDeclarationKind:
|
||||
{
|
||||
theSubclass = [NSXMLDTDNode class];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
case NSXMLElementKind:
|
||||
{
|
||||
theSubclass = [NSXMLElement class];
|
||||
break;
|
||||
}
|
||||
case NSXMLDTDKind:
|
||||
{
|
||||
theSubclass = [NSXMLDTD class];
|
||||
break;
|
||||
}
|
||||
case NSXMLEntityDeclarationKind:
|
||||
case NSXMLElementDeclarationKind:
|
||||
case NSXMLNotationDeclarationKind:
|
||||
{
|
||||
theSubclass = [NSXMLDTDNode class];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check whether we are already initializing an instance of the given
|
||||
|
@ -319,11 +319,11 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
|||
* instead.
|
||||
*/
|
||||
if (NO == [self isKindOfClass: theSubclass])
|
||||
{
|
||||
[self release];
|
||||
return [[theSubclass alloc] initWithKind: kind
|
||||
options: theOptions];
|
||||
}
|
||||
{
|
||||
[self release];
|
||||
return [[theSubclass alloc] initWithKind: kind
|
||||
options: theOptions];
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are initializing for the correct class, we can actually perform
|
||||
|
@ -371,56 +371,56 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
|||
|
||||
/* Node walking is a depth-first thingy. Hence, we consider children first: */
|
||||
if (0 != internal->childCount)
|
||||
{
|
||||
NSUInteger theIndex = 0;
|
||||
if (NO == forward)
|
||||
{
|
||||
theIndex = (internal->childCount) - 1;
|
||||
NSUInteger theIndex = 0;
|
||||
if (NO == forward)
|
||||
{
|
||||
theIndex = (internal->childCount) - 1;
|
||||
}
|
||||
candidate = [internal->children objectAtIndex: theIndex];
|
||||
}
|
||||
candidate = [internal->children objectAtIndex: theIndex];
|
||||
}
|
||||
|
||||
/* If there are no children, we move on to siblings: */
|
||||
if (nil == candidate)
|
||||
{
|
||||
if (forward)
|
||||
{
|
||||
candidate = internal->nextSibling;
|
||||
if (forward)
|
||||
{
|
||||
candidate = internal->nextSibling;
|
||||
}
|
||||
else
|
||||
{
|
||||
candidate = internal->previousSibling;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
candidate = internal->previousSibling;
|
||||
}
|
||||
}
|
||||
|
||||
/* If there are no siblings left for the receiver, we recurse down to the root
|
||||
* of the tree until we find an ancestor with further siblings: */
|
||||
while ((nil == candidate) && (nil != ancestor))
|
||||
{
|
||||
if (forward)
|
||||
{
|
||||
candidate = [ancestor nextSibling];
|
||||
if (forward)
|
||||
{
|
||||
candidate = [ancestor nextSibling];
|
||||
}
|
||||
else
|
||||
{
|
||||
candidate = [ancestor previousSibling];
|
||||
}
|
||||
ancestor = ancestor->_parent;
|
||||
}
|
||||
else
|
||||
{
|
||||
candidate = [ancestor previousSibling];
|
||||
}
|
||||
ancestor = ancestor->_parent;
|
||||
}
|
||||
|
||||
/* No children, no next siblings, no next siblings for any ancestor: We are
|
||||
* the last node */
|
||||
if (nil == candidate)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
/* Sanity check: Namespace and attribute nodes are skipped: */
|
||||
if ((NSXMLAttributeKind == candidate->_kind)
|
||||
|| (NSXMLNamespaceKind == candidate->_kind))
|
||||
{
|
||||
return [candidate _nodeFollowingInNaturalDirection: forward];
|
||||
}
|
||||
{
|
||||
return [candidate _nodeFollowingInNaturalDirection: forward];
|
||||
}
|
||||
return candidate;
|
||||
}
|
||||
|
||||
|
@ -468,9 +468,9 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
|||
* dereferenced:
|
||||
*/
|
||||
while ((ancestor != nil) && (NSXMLDocumentKind != ancestor->_kind))
|
||||
{
|
||||
ancestor = ancestor->_parent;
|
||||
}
|
||||
{
|
||||
ancestor = ancestor->_parent;
|
||||
}
|
||||
return (NSXMLDocument*)ancestor;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue