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:
CaS 2005-02-22 11:22:44 +00:00
parent c5f49ccbcb
commit 0708409c1b
180 changed files with 2181 additions and 2156 deletions

View file

@ -1,4 +1,4 @@
/**
/**
<title>AGSHtml ... a class to output html for a gsdoc file</title>
Copyright (C) 2001 Free Software Foundation, Inc.
@ -847,7 +847,7 @@ static NSString *mainFont = nil;
}
else if ([name isEqual: @"email"] == YES)
{
NSString *ename;
NSString *ename;
ename = [prop objectForKey: @"address"];
if (ename == nil)
@ -1562,7 +1562,7 @@ static NSString *mainFont = nil;
linkRef = [NSMutableString stringWithCapacity: [sel length]];
[linkRef setString:sel];
[linkRef replaceString: @"&nbsp;" withString: @""];
s = [self makeLink: linkRef ofType: @"method" inUnit: nil isRef: NO];
if (s != nil)
{
@ -2227,7 +2227,7 @@ static NSString *mainFont = nil;
else if ([node type] == XML_ENTITY_REF_NODE)
{
[buf appendString: @"&"];
[buf appendString: [node name]];
[buf appendString: [node name]];
[buf appendString: @";"];
}
else if ([node type] == XML_ELEMENT_NODE)

View file

@ -1,4 +1,4 @@
/**
/**
<title>AGSIndex ... a class to create references for a gsdoc file</title>
Copyright (C) 2001 Free Software Foundation, Inc.
@ -465,7 +465,7 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
* Merge a dictionary containing references into the current
* index. The flag may be used to specify that references
* being merged in should override any pre-existing values.
*/
*/
- (void) mergeRefs: (NSDictionary*)more override: (BOOL)flag
{
mergeDictionaries(refs, more, flag);

View file

@ -357,7 +357,7 @@ static BOOL snuggleStart(NSString *t)
[self reformat: author withIndent: 4 to: str];
}
}
/*
* The version element is optional ... fill in if available.
*/
@ -366,7 +366,7 @@ static BOOL snuggleStart(NSString *t)
{
[self reformat: tmp withIndent: 4 to: str];
}
/*
* The date element is optional ... fill in if available.
*/
@ -375,7 +375,7 @@ static BOOL snuggleStart(NSString *t)
{
[self reformat: tmp withIndent: 4 to: str];
}
/*
* The abstract element is optional ... fill in if available.
*/
@ -384,7 +384,7 @@ static BOOL snuggleStart(NSString *t)
{
[self reformat: tmp withIndent: 4 to: str];
}
/*
* The copy element is optional ... fill in if available.
*/
@ -393,7 +393,7 @@ static BOOL snuggleStart(NSString *t)
{
[self reformat: tmp withIndent: 4 to: str];
}
[str appendString: @" </head>\n"];
[str appendString: @" <body>\n"];
@ -492,7 +492,7 @@ static BOOL snuggleStart(NSString *t)
}
[m appendString: @" </chapter>\n"];
tmp = [self mergeMarkup: m ofKind: @"Typedefs"];
if (tmp == nil)
{
@ -773,7 +773,7 @@ static BOOL snuggleStart(NSString *t)
* Check special markup which should be removed from the text
* actually placed in the gsdoc method documentation ... the
* special markup is included in the gsdoc markup differently.
*/
*/
if (comment != nil)
{
NSMutableString *m = nil;
@ -999,7 +999,7 @@ static BOOL snuggleStart(NSString *t)
* Check special markup which should be removed from the text
* actually placed in the gsdoc method documentation ... the
* special markup is included in the gsdoc markup differently.
*/
*/
if (comment != nil)
{
NSMutableString *m = nil;
@ -1242,7 +1242,7 @@ static BOOL snuggleStart(NSString *t)
NSLog(@"Unterminated <unit> in comment for %@", name);
return;
}
if (pos == 0)
{
if (NSMaxRange(r) == [comment length])
@ -1358,7 +1358,7 @@ static BOOL snuggleStart(NSString *t)
[self reformat: comment withIndent: ind + 2 to: str];
for (j = 0; j < ind; j++) [str appendString: @" "];
[str appendString: @"</desc>\n"];
names = [[ivars allKeys] sortedArrayUsingSelector: @selector(compare:)];
for (i = 0; i < [names count]; i++)
{
@ -1934,7 +1934,7 @@ static BOOL snuggleStart(NSString *t)
}
if (pos < ePos && (c == '+' || c == '-'))
{
{
unsigned mStart = pos;
pos++;
@ -2116,7 +2116,7 @@ static BOOL snuggleStart(NSString *t)
}
continue;
}
/*
* Now handle bare method names for current class ... outside brackets.
*/

View file

@ -215,7 +215,7 @@
fmt = [fmt stringByAppendingString: @"\n"];
}
msg = [fmt lossyCString];
fwrite(msg, strlen(msg), 1, stderr);
fwrite(msg, strlen(msg), 1, stderr);
}
- (void) log: (NSString*)fmt, ...
@ -806,7 +806,7 @@
{
NSString *s = [NSString stringWithFormat: @"<%@>", key];
NSString *e = [NSString stringWithFormat: @"</%@>", key];
/*
* Read date information if available
*/
@ -1262,7 +1262,7 @@
[t appendString: @">"];
[a removeAllObjects];
}
[d setObject: t forKey: @"BaseType"];
RELEASE(t);
/*
@ -1283,7 +1283,7 @@
else
{
[d setObject: @"Variables" forKey: @"Kind"];
}
}
if (s == nil)
{
@ -2073,7 +2073,7 @@ try:
RELEASE(tmp);
if ([val length] > 0)
{
if ([val isEqualToString: @"//"] == YES)
{
[self skipToEndOfLine];
@ -3613,7 +3613,7 @@ fail:
* Special method to skip a statement and up to the end of the last
* line it was on, discarding any comments so they don't get used by
* the next construct that actually needs documenting.
*/
*/
- (unsigned) skipStatementLine
{
[self skipStatement];

View file

@ -49,7 +49,7 @@
synopsis: <code>autogsdoc (options) (files)</code><br/>
&#160;&#160;&#160;&#160;(options) described below<br/>
&#160;&#160;&#160;&#160;(files) <code>.h</code>, <code>.m</code>, <code>.gsdoc</code>, and/or <code>.html</code> files, in any order.
</p>
</p>
<p>
The most common usage this is to run the command with one or more
header file names as arguments ... the tool will automatically
@ -546,7 +546,7 @@
</p>
<example>
&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.1//EN"
&lt;!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.1//EN"
"http://www.gnustep.org/gsdoc-1_0_1.xml"&gt;
&lt;gsdoc base="index"&gt;
&lt;head&gt;
@ -1438,7 +1438,7 @@ main(int argc, char **argv, char **env)
/*
* 6) Now move to "gsdoc files" (including both command-line given ones and
* just-generated ones).. and generate the index.
*
*
*/
count = [gFiles count];
if (count > 0)
@ -1566,7 +1566,7 @@ main(int argc, char **argv, char **env)
}
globalRefs = [AGSIndex new];
/*
* 8) If we are either generating html output, or relocating existing
* html documents, we must build up the indexing information needed
@ -1660,7 +1660,7 @@ main(int argc, char **argv, char **env)
while ((file = [enumerator nextObject]) != nil)
{
NSString *ext = [file pathExtension];
if ([ext isEqualToString: @"igsdoc"] == YES
&& [[file lastPathComponent] isEqual: refsName] == NO)
@ -1780,7 +1780,7 @@ main(int argc, char **argv, char **env)
@" </body>\n"
@"</gsdoc>\n"];
[tocSkel replaceString: @"[prjName]" withString: project];
// file for top-left frame (header only; rest appended below)
idxIndexFile = [@"MainIndex" stringByAppendingPathExtension: @"html"];
[idxIndex setString: @"<HTML>\n <BODY>\n"
@ -1805,7 +1805,7 @@ main(int argc, char **argv, char **env)
@" </FRAMESET>\n"
@"</HTML>\n"];
[frameset replaceString: @"[prjName]" withString: project];
// generate the table of contents gsdoc files
for (i = 0; i < [idxTypes count]; i++)
{
@ -1894,7 +1894,7 @@ main(int argc, char **argv, char **env)
}
}
/*
* 10) Next pass ... generate html output from gsdoc files if required.
*/

View file

@ -10,8 +10,8 @@
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
You should have received a copy of the GNU General Public
You should have received a copy of the GNU General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -149,7 +149,7 @@ main(int argc, char** argv, char **env)
iEnc = enc;
oEnc = NSUnicodeStringEncoding;
}
myString = [[NSString alloc] initWithData: myData
encoding: iEnc];
RELEASE(myData);
@ -189,11 +189,11 @@ main(int argc, char** argv, char **env)
v <<= 4;
c = u[i++];
v |= char2num(c);
v <<= 4;
c = u[i++];
v |= char2num(c);
v <<= 4;
c = u[i++];
v |= char2num(c);

View file

@ -10,8 +10,8 @@
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
You should have received a copy of the GNU General Public
You should have received a copy of the GNU General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View file

@ -10,8 +10,8 @@
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
You should have received a copy of the GNU General Public
You should have received a copy of the GNU General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -528,7 +528,7 @@ ihandler(int sig)
}
/*
* If possible use an existing string as the key.
*/
*/
if ([objList count] > 0)
{
GDNCObserver *tmp = [objList objectAtIndex: 0];
@ -552,7 +552,7 @@ ihandler(int sig)
}
/*
* If possible use an existing string as the key.
*/
*/
if ([namList count] > 0)
{
GDNCObserver *tmp = [namList objectAtIndex: 0];
@ -632,7 +632,7 @@ ihandler(int sig)
format: @"registration with unknown connection"];
}
if (NSMapGet(table, client) != 0)
{
{
[NSException raise: NSInternalInconsistencyException
format: @"registration with registered client"];
}
@ -873,7 +873,7 @@ ihandler(int sig)
if ([byObject indexOfObjectIdenticalTo: obs] != NSNotFound)
{
[self removeObserver: obs];
}
}
}
for (pos = [byObject count]; pos > 0; pos--)
{
@ -883,7 +883,7 @@ ihandler(int sig)
if ([byName indexOfObjectIdenticalTo: obs] != NSNotFound)
{
[self removeObserver: obs];
}
}
}
}
}
@ -906,7 +906,7 @@ ihandler(int sig)
}
info = (GDNCClient*)NSMapGet(table, client);
if (info != nil)
{
{
unsigned pos = [info->observers count];
while (pos > 0)
@ -964,7 +964,7 @@ ihandler(int sig)
}
info = (GDNCClient*)NSMapGet(table, client);
if (info == nil)
{
{
[NSException raise: NSInternalInconsistencyException
format: @"unregistration with unregistered client"];
}

View file

@ -62,11 +62,11 @@ loc_read_file(const char *dir, const char *file)
if (strlen(country) > 0 && strcmp(country, language) != 0)
{
strcat(country, language);
[dict setObject: [NSString stringWithCString: country]
[dict setObject: [NSString stringWithCString: country]
forKey: [NSString stringWithCString: locale]];
}
locale[2] = '\0';
[dict setObject: [NSString stringWithCString: language]
[dict setObject: [NSString stringWithCString: language]
forKey: [NSString stringWithCString: locale]];
fclose(fp);
return 0;

View file

@ -25,7 +25,7 @@
@implementation SourceEntry
- initWithKey: (NSString *)k comment: (NSString *)c file: (NSString *)f
- initWithKey: (NSString *)k comment: (NSString *)c file: (NSString *)f
line: (unsigned int)l
{
self=[super init];

View file

@ -531,7 +531,7 @@ int main(int argc, char **argv)
/* Remove any empty language from the list. */
{
int k;
for (k = [languages count] - 1; k >= 0; k--)
{
NSString *language = [languages objectAtIndex: k];
@ -541,7 +541,7 @@ int main(int argc, char **argv)
}
}
}
if (![languages count])
{

View file

@ -1,20 +1,20 @@
/*
pl.m
/*
pl.m
This file is the main driver for the plist parsing program.
Copyright (C) 1996,1999,2000 Free Software Foundation, Inc.
Author: Gregory John Casamento
Date: 17 Jan 2000
Date: 17 Jan 2000
This file is part of GNUstep
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@ -24,7 +24,7 @@
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
*/
#import <Foundation/Foundation.h>
@ -42,7 +42,7 @@ void create_output(id propertyList)
{
const char *buffer = [[propertyList description] cString];
NSData *outputData;
outputData = [NSData dataWithBytes: buffer length: strlen(buffer)];
// setup the file handle.
fileHandle = [NSFileHandle fileHandleWithStandardOutput];
@ -78,7 +78,7 @@ id process_plist(NSData *inputData)
NS_HANDLER
NSLog([localException description]);
NS_ENDHANDLER
// return the results
return propertyList;
}
@ -134,7 +134,7 @@ int main (int argc, const char *argv[])
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSData *inputData = nil;
id propertyList = nil;
// put your code here.
if (argc == 1 || argc == 3|| argc == 5)
{
@ -160,7 +160,7 @@ int main (int argc, const char *argv[])
" - Writes an ASCII propert list to standard out, or a serialized one");
puts(" if -output is specified.");
}
[pool release];
exit(0); // insure the process exit status is 0
return 0; // ...and make main fit the ANSI spec.

View file

@ -1,5 +1,5 @@
/*
This tool produces a desktop link file for KDE and Gnome out of a GNUstep
/*
This tool produces a desktop link file for KDE and Gnome out of a GNUstep
property list.
Copyright (C) 20010 Free Software Foundation, Inc.
@ -96,9 +96,9 @@ main(int argc, char** argv, char **env)
}
fileContents = [NSMutableString stringWithCapacity: 200];
[fileContents appendString:
[fileContents appendString:
@"[Desktop Entry]\nEncoding=UTF-8\nType=Application\n"];
[fileContents appendString:
[fileContents appendString:
@"Version=0.94\nCategories=GNUstep\n"];
entry = [plist objectForKey: @"ApplicationName"];
if (entry != nil)
@ -153,7 +153,7 @@ main(int argc, char** argv, char **env)
[fileContents appendString: @"\n"];
}
if ([[fileContents dataUsingEncoding: NSUTF8StringEncoding]
if ([[fileContents dataUsingEncoding: NSUTF8StringEncoding]
writeToFile: destName atomically: YES] == NO)
{
GSPrintf(stderr, @"Error writing property list to '%@'\n", destName);

View file

@ -10,8 +10,8 @@
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
You should have received a copy of the GNU General Public
You should have received a copy of the GNU General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View file

@ -10,8 +10,8 @@
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
You should have received a copy of the GNU General Public
You should have received a copy of the GNU General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View file

@ -10,8 +10,8 @@
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
You should have received a copy of the GNU General Public
You should have received a copy of the GNU General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View file

@ -10,8 +10,8 @@
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
You should have received a copy of the GNU General Public
You should have received a copy of the GNU General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -39,7 +39,7 @@ convert_unicode(NSArray *args)
for (i = 2; i < [args count]; i++)
{
NSString *file = [args objectAtIndex: i];
NS_DURING
{
NSData *data;
@ -79,7 +79,7 @@ convert_utf8(NSArray *args)
for (i = 2; i < [args count]; i++)
{
NSString *file = [args objectAtIndex: i];
NS_DURING
{
NSData *data;