mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 17:51:01 +00:00
tidyup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12506 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ba026f85dc
commit
72e9ea20f1
7 changed files with 258 additions and 62 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2002-02-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Tools/AGSHtml.m: support for merging types and functions etc.
|
||||||
|
* Tools/AGSIndex.m: ditto
|
||||||
|
* Tools/AGSOutput.h: ditto
|
||||||
|
* Tools/AGSOutput.m: ditto
|
||||||
|
* Tools/autogsdoc.m: ditto
|
||||||
|
Put stuff in place for merging info
|
||||||
|
revert key-value coding changes.
|
||||||
|
|
||||||
Mon Feb 11 15:11:31 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
Mon Feb 11 15:11:31 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
|
|
||||||
* Source/GSString.m (NSImmutableString): Implemented copy,
|
* Source/GSString.m (NSImmutableString): Implemented copy,
|
||||||
|
|
|
@ -150,7 +150,7 @@ static Class NSClassDescriptionClass = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the attribute keys supplied by the
|
* Returns the attribute keys supplied by the
|
||||||
* <ref id="NSClassDescription" type="class" />
|
* <ref id="NSClassDescription" type="class"/>
|
||||||
* object for the receivers class.
|
* object for the receivers class.
|
||||||
*/
|
*/
|
||||||
- (NSArray*) attributeKeys
|
- (NSArray*) attributeKeys
|
||||||
|
|
|
@ -373,7 +373,7 @@ static NSMutableSet *textNodes = nil;
|
||||||
NSArray *catNames;
|
NSArray *catNames;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For a clss, we want to list methods in any associated
|
* For a class, we want to list methods in any associated
|
||||||
* categories as well as those of the class itsself.
|
* categories as well as those of the class itsself.
|
||||||
*/
|
*/
|
||||||
catNames = [[[refs objectForKey: @"categories"]
|
catNames = [[[refs objectForKey: @"categories"]
|
||||||
|
@ -1324,6 +1324,7 @@ static NSMutableSet *textNodes = nil;
|
||||||
{
|
{
|
||||||
NSString *type = [prop objectForKey: @"type"];
|
NSString *type = [prop objectForKey: @"type"];
|
||||||
NSString *r = [prop objectForKey: @"id"];
|
NSString *r = [prop objectForKey: @"id"];
|
||||||
|
GSXMLNode *tmp = [node children];
|
||||||
NSString *s;
|
NSString *s;
|
||||||
|
|
||||||
if ([type isEqual: @"method"] || [type isEqual: @"ivariable"])
|
if ([type isEqual: @"method"] || [type isEqual: @"ivariable"])
|
||||||
|
@ -1338,13 +1339,27 @@ static NSMutableSet *textNodes = nil;
|
||||||
if (s == nil)
|
if (s == nil)
|
||||||
{
|
{
|
||||||
NSLog(@"ref '%@' not found for %@", r, type);
|
NSLog(@"ref '%@' not found for %@", r, type);
|
||||||
[self outputText: [node children] to: buf];
|
if (tmp == nil)
|
||||||
|
{
|
||||||
|
[buf appendString: r];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self outputText: tmp to: buf];
|
||||||
|
}
|
||||||
[buf appendString: @"\n"];
|
[buf appendString: @"\n"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[buf appendString: s];
|
[buf appendString: s];
|
||||||
[self outputText: [node children] to: buf];
|
if (tmp == nil)
|
||||||
|
{
|
||||||
|
[buf appendString: r];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[self outputText: tmp to: buf];
|
||||||
|
}
|
||||||
[buf appendString: @"</a>\n"];
|
[buf appendString: @"</a>\n"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1940,7 +1955,7 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
|
||||||
[buf appendString: @"<hr width=\"50%\" align=\"left\" />\n"];
|
[buf appendString: @"<hr width=\"50%\" align=\"left\" />\n"];
|
||||||
while (node != nil)
|
while (node != nil)
|
||||||
{
|
{
|
||||||
if([[node name] isEqual: @"method"] == YES)
|
if ([[node name] isEqual: @"method"] == YES)
|
||||||
{
|
{
|
||||||
[self outputNode: node to: buf];
|
[self outputNode: node to: buf];
|
||||||
}
|
}
|
||||||
|
|
|
@ -516,11 +516,8 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NSString *tmp = ref;
|
u = ref;
|
||||||
|
ref = unit;
|
||||||
ref = u;
|
|
||||||
u = tmp;
|
|
||||||
// type ... unit ... ref ... file
|
|
||||||
}
|
}
|
||||||
|
|
||||||
t = [refs objectForKey: type];
|
t = [refs objectForKey: type];
|
||||||
|
|
|
@ -39,8 +39,9 @@
|
||||||
to: (unsigned)end
|
to: (unsigned)end
|
||||||
maxSize: (unsigned)limit
|
maxSize: (unsigned)limit
|
||||||
output: (NSMutableString*)buf;
|
output: (NSMutableString*)buf;
|
||||||
- (NSString*) output: (NSDictionary*)d;
|
- (BOOL) output: (NSDictionary*)d
|
||||||
- (BOOL) output: (NSDictionary*)d file: (NSString*)name;
|
file: (NSString*)name
|
||||||
|
directory: (NSString*)dest;
|
||||||
- (void) outputDecl: (NSDictionary*)d
|
- (void) outputDecl: (NSDictionary*)d
|
||||||
kind: (NSString*)kind
|
kind: (NSString*)kind
|
||||||
to: (NSMutableString*)str;
|
to: (NSMutableString*)str;
|
||||||
|
|
|
@ -22,6 +22,12 @@
|
||||||
|
|
||||||
#include "AGSOutput.h"
|
#include "AGSOutput.h"
|
||||||
|
|
||||||
|
@interface AGSOutput (Private)
|
||||||
|
- (BOOL) mergeMarkup: (NSString*)markup
|
||||||
|
ofKind: (NSString*)kind
|
||||||
|
directory: (NSString*)dest;
|
||||||
|
@end
|
||||||
|
|
||||||
static NSString *escapeType(NSString *str)
|
static NSString *escapeType(NSString *str)
|
||||||
{
|
{
|
||||||
str = [str stringByReplacingString: @"<" withString: @"<"];
|
str = [str stringByReplacingString: @"<" withString: @"<"];
|
||||||
|
@ -69,6 +75,18 @@ static BOOL snuggleStart(NSString *t)
|
||||||
*/
|
*/
|
||||||
@implementation AGSOutput
|
@implementation AGSOutput
|
||||||
|
|
||||||
|
+ (void) initialize
|
||||||
|
{
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
|
[ud registerDefaults: [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
|
@"TypesAndConstants", @"ConstantsTemplate",
|
||||||
|
@"Functions", @"FunctionsTemplate",
|
||||||
|
@"TypesAndConstants", @"TypedefsTemplate",
|
||||||
|
@"TypesAndConstants", @"VariablesTemplate",
|
||||||
|
nil]];
|
||||||
|
}
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
DESTROY(identifier);
|
DESTROY(identifier);
|
||||||
|
@ -183,7 +201,9 @@ static BOOL snuggleStart(NSString *t)
|
||||||
* Return a string containing a gsdoc document generated from d (the
|
* Return a string containing a gsdoc document generated from d (the
|
||||||
* parse tree)
|
* parse tree)
|
||||||
*/
|
*/
|
||||||
- (NSString*) output: (NSDictionary*)d
|
- (BOOL) output: (NSDictionary*)d
|
||||||
|
file: (NSString*)name
|
||||||
|
directory: (NSString*)dest
|
||||||
{
|
{
|
||||||
NSMutableString *str = [NSMutableString stringWithCapacity: 10240];
|
NSMutableString *str = [NSMutableString stringWithCapacity: 10240];
|
||||||
NSDictionary *classes;
|
NSDictionary *classes;
|
||||||
|
@ -394,14 +414,14 @@ static BOOL snuggleStart(NSString *t)
|
||||||
|
|
||||||
if ([types count] > 0)
|
if ([types count] > 0)
|
||||||
{
|
{
|
||||||
NSArray *names;
|
NSMutableString *m = [NSMutableString new];
|
||||||
unsigned i;
|
NSArray *names;
|
||||||
unsigned c = [types count];
|
unsigned i;
|
||||||
|
unsigned c = [types count];
|
||||||
|
|
||||||
[str appendString: @" <chapter>\n"];
|
[m appendString: @" <chapter>\n"];
|
||||||
[str appendString:
|
[m appendString: @" <heading>Types</heading>\n"];
|
||||||
@" <heading>Types</heading>\n"];
|
[m appendString: @" <p></p>\n"];
|
||||||
[str appendString: @" <p></p>\n"];
|
|
||||||
|
|
||||||
chapters++;
|
chapters++;
|
||||||
names = [types allKeys];
|
names = [types allKeys];
|
||||||
|
@ -411,22 +431,29 @@ static BOOL snuggleStart(NSString *t)
|
||||||
NSString *name = [names objectAtIndex: i];
|
NSString *name = [names objectAtIndex: i];
|
||||||
NSDictionary *d = [types objectForKey: name];
|
NSDictionary *d = [types objectForKey: name];
|
||||||
|
|
||||||
[self outputDecl: d kind: @"type" to: str];
|
[self outputDecl: d kind: @"type" to: m];
|
||||||
}
|
}
|
||||||
|
|
||||||
[str appendString: @" </chapter>\n"];
|
[m appendString: @" </chapter>\n"];
|
||||||
|
|
||||||
|
if ([self mergeMarkup: m ofKind: @"Typedefs" directory: dest] == NO)
|
||||||
|
{
|
||||||
|
[str appendString: m];
|
||||||
|
chapters++;
|
||||||
|
}
|
||||||
|
RELEASE(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([constants count] > 0)
|
if ([constants count] > 0)
|
||||||
{
|
{
|
||||||
NSArray *names;
|
NSMutableString *m = [NSMutableString new];
|
||||||
unsigned i;
|
NSArray *names;
|
||||||
unsigned c = [constants count];
|
unsigned i;
|
||||||
|
unsigned c = [constants count];
|
||||||
|
|
||||||
[str appendString: @" <chapter>\n"];
|
[m appendString: @" <chapter>\n"];
|
||||||
[str appendString:
|
[m appendString: @" <heading>Constants</heading>\n"];
|
||||||
@" <heading>Constants</heading>\n"];
|
[m appendString: @" <p></p>\n"];
|
||||||
[str appendString: @" <p></p>\n"];
|
|
||||||
|
|
||||||
chapters++;
|
chapters++;
|
||||||
names = [constants allKeys];
|
names = [constants allKeys];
|
||||||
|
@ -436,22 +463,29 @@ static BOOL snuggleStart(NSString *t)
|
||||||
NSString *name = [names objectAtIndex: i];
|
NSString *name = [names objectAtIndex: i];
|
||||||
NSDictionary *d = [constants objectForKey: name];
|
NSDictionary *d = [constants objectForKey: name];
|
||||||
|
|
||||||
[self outputDecl: d kind: @"constant" to: str];
|
[self outputDecl: d kind: @"constant" to: m];
|
||||||
}
|
}
|
||||||
|
|
||||||
[str appendString: @" </chapter>\n"];
|
[m appendString: @" </chapter>\n"];
|
||||||
|
|
||||||
|
if ([self mergeMarkup: m ofKind: @"Constants" directory: dest] == NO)
|
||||||
|
{
|
||||||
|
[str appendString: m];
|
||||||
|
chapters++;
|
||||||
|
}
|
||||||
|
RELEASE(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([variables count] > 0)
|
if ([variables count] > 0)
|
||||||
{
|
{
|
||||||
NSArray *names;
|
NSMutableString *m = [NSMutableString new];
|
||||||
unsigned i;
|
NSArray *names;
|
||||||
unsigned c = [variables count];
|
unsigned i;
|
||||||
|
unsigned c = [variables count];
|
||||||
|
|
||||||
[str appendString: @" <chapter>\n"];
|
[m appendString: @" <chapter>\n"];
|
||||||
[str appendString:
|
[m appendString: @" <heading>Variables</heading>\n"];
|
||||||
@" <heading>Variables</heading>\n"];
|
[m appendString: @" <p></p>\n"];
|
||||||
[str appendString: @" <p></p>\n"];
|
|
||||||
|
|
||||||
chapters++;
|
chapters++;
|
||||||
names = [variables allKeys];
|
names = [variables allKeys];
|
||||||
|
@ -461,24 +495,30 @@ static BOOL snuggleStart(NSString *t)
|
||||||
NSString *name = [names objectAtIndex: i];
|
NSString *name = [names objectAtIndex: i];
|
||||||
NSDictionary *d = [variables objectForKey: name];
|
NSDictionary *d = [variables objectForKey: name];
|
||||||
|
|
||||||
[self outputDecl: d kind: @"variable" to: str];
|
[self outputDecl: d kind: @"variable" to: m];
|
||||||
}
|
}
|
||||||
|
|
||||||
[str appendString: @" </chapter>\n"];
|
[m appendString: @" </chapter>\n"];
|
||||||
|
|
||||||
|
if ([self mergeMarkup: m ofKind: @"Variables" directory: dest] == NO)
|
||||||
|
{
|
||||||
|
[str appendString: m];
|
||||||
|
chapters++;
|
||||||
|
}
|
||||||
|
RELEASE(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([functions count] > 0)
|
if ([functions count] > 0)
|
||||||
{
|
{
|
||||||
NSArray *names;
|
NSMutableString *m = [NSMutableString new];
|
||||||
unsigned i;
|
NSArray *names;
|
||||||
unsigned c = [functions count];
|
unsigned i;
|
||||||
|
unsigned c = [functions count];
|
||||||
|
|
||||||
[str appendString: @" <chapter>\n"];
|
[m appendString: @" <chapter>\n"];
|
||||||
[str appendString:
|
[m appendString: @" <heading>Functions</heading>\n"];
|
||||||
@" <heading>Functions</heading>\n"];
|
[m appendString: @" <p></p>\n"];
|
||||||
[str appendString: @" <p></p>\n"];
|
|
||||||
|
|
||||||
chapters++;
|
|
||||||
names = [functions allKeys];
|
names = [functions allKeys];
|
||||||
names = [names sortedArrayUsingSelector: @selector(compare:)];
|
names = [names sortedArrayUsingSelector: @selector(compare:)];
|
||||||
for (i = 0; i < c; i++)
|
for (i = 0; i < c; i++)
|
||||||
|
@ -486,10 +526,16 @@ static BOOL snuggleStart(NSString *t)
|
||||||
NSString *name = [names objectAtIndex: i];
|
NSString *name = [names objectAtIndex: i];
|
||||||
NSDictionary *d = [functions objectForKey: name];
|
NSDictionary *d = [functions objectForKey: name];
|
||||||
|
|
||||||
[self outputFunction: d to: str];
|
[self outputFunction: d to: m];
|
||||||
}
|
}
|
||||||
|
|
||||||
[str appendString: @" </chapter>\n"];
|
[m appendString: @" </chapter>\n"];
|
||||||
|
if ([self mergeMarkup: m ofKind: @"Functions" directory: dest] == NO)
|
||||||
|
{
|
||||||
|
[str appendString: m];
|
||||||
|
chapters++;
|
||||||
|
}
|
||||||
|
RELEASE(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chapters == 0)
|
if (chapters == 0)
|
||||||
|
@ -511,13 +557,6 @@ static BOOL snuggleStart(NSString *t)
|
||||||
|
|
||||||
[str appendString: @" </body>\n"];
|
[str appendString: @" </body>\n"];
|
||||||
[str appendString: @"</gsdoc>\n"];
|
[str appendString: @"</gsdoc>\n"];
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL) output: (NSDictionary*)d file: (NSString*)name
|
|
||||||
{
|
|
||||||
NSString *str = [self output: d];
|
|
||||||
|
|
||||||
return [str writeToFile: name atomically: YES];
|
return [str writeToFile: name atomically: YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1842,3 +1881,139 @@ static BOOL snuggleStart(NSString *t)
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation AGSOutput (Private)
|
||||||
|
- (BOOL) mergeMarkup: (NSString*)markup
|
||||||
|
ofKind: (NSString*)kind
|
||||||
|
directory: (NSString*)dest
|
||||||
|
{
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
NSString *key = [kind stringByAppendingString: @"Template"];
|
||||||
|
NSString *name = [ud stringForKey: key];
|
||||||
|
NSString *file;
|
||||||
|
NSFileManager *mgr;
|
||||||
|
NSString *base;
|
||||||
|
NSString *tmp;
|
||||||
|
NSMutableString *str;
|
||||||
|
NSRange range;
|
||||||
|
NSRange start;
|
||||||
|
NSRange end;
|
||||||
|
|
||||||
|
if ([name length] == 0)
|
||||||
|
{
|
||||||
|
return NO; // No common document.
|
||||||
|
}
|
||||||
|
|
||||||
|
file = [name stringByAppendingPathExtension: @"gsdoc"];
|
||||||
|
if (dest != nil && [file isAbsolutePath] == NO)
|
||||||
|
{
|
||||||
|
file = [dest stringByAppendingPathComponent: file];
|
||||||
|
}
|
||||||
|
mgr = [NSFileManager defaultManager];
|
||||||
|
base = [info objectForKey: @"base"];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Load the current file that info should be merged into.
|
||||||
|
*/
|
||||||
|
if ([mgr isReadableFileAtPath: file] == YES)
|
||||||
|
{
|
||||||
|
str = [NSMutableString stringWithContentsOfFile: file];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tmp = [name stringByAppendingPathExtension: @"template"];
|
||||||
|
|
||||||
|
if ([mgr isReadableFileAtPath: tmp] == YES)
|
||||||
|
{
|
||||||
|
str = [NSMutableString stringWithContentsOfFile: tmp];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* No pre-existing file, and no blank template available ...
|
||||||
|
* Generate a standard template.
|
||||||
|
*/
|
||||||
|
str = [[NSMutableString alloc] initWithCapacity: 1024];
|
||||||
|
|
||||||
|
[str appendString: @"<?xml version=\"1.0\"?>\n"];
|
||||||
|
[str appendString: @"<!DOCTYPE gsdoc PUBLIC "];
|
||||||
|
[str appendString: @"\"-//GNUstep//DTD gsdoc 0.6.7//EN\" "];
|
||||||
|
[str appendString: @"\"http://www.gnustep.org/gsdoc-0_6_7.xml\">\n"];
|
||||||
|
[str appendString: @"<gsdoc base=\""];
|
||||||
|
[str appendString: [name lastPathComponent]];
|
||||||
|
[str appendString: @"\">\n"];
|
||||||
|
[str appendString: @" <head>\n"];
|
||||||
|
[str appendString: @" <title>"];
|
||||||
|
[str appendString: kind];
|
||||||
|
[str appendString: @"<\title>\n"];
|
||||||
|
tmp = [NSString stringWithFormat: @"Generated by %@", NSUserName()];
|
||||||
|
[str appendString: @" <author name=\""];
|
||||||
|
[str appendString: tmp];
|
||||||
|
[str appendString: @"\"></author>\n"];
|
||||||
|
[str appendString: @" </head>\n"];
|
||||||
|
[str appendString: @" <body>\n"];
|
||||||
|
[str appendString: @" </body>\n"];
|
||||||
|
[str appendString: @"</gsdoc>\n"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Locate start and end points for all markup of this 'kind'.
|
||||||
|
*/
|
||||||
|
tmp = [NSString stringWithFormat: @"<!--Start%@-->", kind];
|
||||||
|
start = [str rangeOfString: tmp];
|
||||||
|
if (start.length == 0)
|
||||||
|
{
|
||||||
|
start = [str rangeOfString: @"</body>"];
|
||||||
|
if (start.length == 0)
|
||||||
|
{
|
||||||
|
NSLog(@"No </body> markup in %@ document", kind);
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
[str insertString: tmp atIndex: start.location];
|
||||||
|
start.length = [tmp length];
|
||||||
|
}
|
||||||
|
tmp = [NSString stringWithFormat: @"<!--End%@-->", kind];
|
||||||
|
end = [str rangeOfString: tmp];
|
||||||
|
if (end.length == 0)
|
||||||
|
{
|
||||||
|
end.location = NSMaxRange(start);
|
||||||
|
end.length = [tmp length];
|
||||||
|
[str insertString: tmp atIndex: end.location];
|
||||||
|
}
|
||||||
|
else if (end.location <= start.location)
|
||||||
|
{
|
||||||
|
NSLog(@"End marker comes before start marker in %@ document", kind);
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Now locate start and end points for markup for this file.
|
||||||
|
*/
|
||||||
|
tmp = [NSString stringWithFormat: @"<!--Start%@%@-->", base, kind];
|
||||||
|
start = [str rangeOfString: tmp];
|
||||||
|
if (start.length == 0)
|
||||||
|
{
|
||||||
|
start.location = end.location; // Insert before end of section.
|
||||||
|
start.length = [tmp length];
|
||||||
|
[str insertString: tmp atIndex: end.location];
|
||||||
|
}
|
||||||
|
tmp = [NSString stringWithFormat: @"<!--End%@%@-->", base, kind];
|
||||||
|
end = [str rangeOfString: tmp];
|
||||||
|
if (end.length == 0)
|
||||||
|
{
|
||||||
|
end.location = NSMaxRange(start);
|
||||||
|
end.length = [tmp length];
|
||||||
|
[str insertString: tmp atIndex: end.location];
|
||||||
|
}
|
||||||
|
|
||||||
|
range = NSMakeRange(NSMaxRange(start), end.location - NSMaxRange(start));
|
||||||
|
[str replaceCharactersInRange: range withString: markup];
|
||||||
|
|
||||||
|
if ([str writeToFile: file atomically: YES] == NO)
|
||||||
|
{
|
||||||
|
NSLog(@"Unable to write %@ markup to %@", kind, file);
|
||||||
|
}
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
|
@ -512,7 +512,6 @@ main(int argc, char **argv, char **env)
|
||||||
NSString *gsdocfile;
|
NSString *gsdocfile;
|
||||||
NSString *file;
|
NSString *file;
|
||||||
NSArray *a;
|
NSArray *a;
|
||||||
NSString *generated;
|
|
||||||
NSDictionary *attrs;
|
NSDictionary *attrs;
|
||||||
NSDate *sDate = nil;
|
NSDate *sDate = nil;
|
||||||
NSDate *gDate = nil;
|
NSDate *gDate = nil;
|
||||||
|
@ -650,10 +649,9 @@ main(int argc, char **argv, char **env)
|
||||||
[[parser info] setObject: up forKey: @"up"];
|
[[parser info] setObject: up forKey: @"up"];
|
||||||
}
|
}
|
||||||
|
|
||||||
generated = [output output: [parser info]];
|
if ([output output: [parser info]
|
||||||
|
file: gsdocfile
|
||||||
if ([generated writeToFile: gsdocfile
|
directory: documentationDirectory] == NO)
|
||||||
atomically: YES] == NO)
|
|
||||||
{
|
{
|
||||||
NSLog(@"Sorry unable to write %@", gsdocfile);
|
NSLog(@"Sorry unable to write %@", gsdocfile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue