Various fizes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11805 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-12-18 11:09:38 +00:00
parent f02d1c4666
commit 6cffd05410
12 changed files with 114 additions and 49 deletions

View file

@ -1,5 +1,7 @@
2001-12-18 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSXML.m: Bugfixes in setting parse behavior ... now turns
on validation properly.
* Tools/gsdoc-0_6_7.dtd: added 'scope' to index element and
added a 'title' type to list files in a project.
* Tools/AGSHtml.h:
@ -8,7 +10,9 @@
element with both file and project scope.
* Tools/autogsdoc.m: Clean up a little and handle gsdoc files
listed as source files better .... now looks for them in the
source directory.
source directory. Added automatic generation of an 'index' file
for a project where the first source file listed in the project
is not a gsdoc file.
2001-12-17 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -1354,26 +1354,32 @@ static NSString *endMarker = @"At end of incremental parse";
- (BOOL) substituteEntities: (BOOL)yesno
{
BOOL result = ((xmlParserCtxtPtr)lib)->replaceEntities ? YES : NO;
int oldVal;
int newVal = (yesno == YES) ? 1 : 0;
((xmlParserCtxtPtr)lib)->replaceEntities = (yesno == YES) ? 1 : 0;
return result;
xmlGetFeature((xmlParserCtxtPtr)lib, "substitute entities", (void*)&oldVal);
xmlSetFeature((xmlParserCtxtPtr)lib, "substitute entities", (void*)&newVal);
return (oldVal == 1) ? YES : NO;
}
- (BOOL) keepBlanks: (BOOL)yesno
{
BOOL result = ((xmlParserCtxtPtr)lib)->keepBlanks ? YES : NO;
int oldVal;
int newVal = (yesno == YES) ? 1 : 0;
((xmlParserCtxtPtr)lib)->keepBlanks = (yesno == YES) ? 1 : 0;
return result;
xmlGetFeature((xmlParserCtxtPtr)lib, "keep blanks", (void*)&oldVal);
xmlSetFeature((xmlParserCtxtPtr)lib, "keep blanks", (void*)&newVal);
return (oldVal == 1) ? YES : NO;
}
- (BOOL) doValidityChecking: (BOOL)yesno
{
BOOL result = ((xmlParserCtxtPtr)lib)->validate ? YES : NO;
int oldVal;
int newVal = (yesno == YES) ? 1 : 0;
((xmlParserCtxtPtr)lib)->validate = (yesno == YES) ? 1 : 0;
return result;
xmlGetFeature((xmlParserCtxtPtr)lib, "validate", (void*)&oldVal);
xmlSetFeature((xmlParserCtxtPtr)lib, "validate", (void*)&newVal);
return (oldVal == 1) ? YES : NO;
}
- (BOOL) getWarnings: (BOOL)yesno

View file

@ -10,13 +10,13 @@
This file is part of the GNUstep Project
This library is free software; you can redistribute it and/or
This program is free software; you can redistribute it and/or
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
License along with this library; see the file COPYING.LIB.
License along with this program; 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

@ -8,13 +8,13 @@
This file is part of the GNUstep Project
This library is free software; you can redistribute it and/or
This program is free software; you can redistribute it and/or
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
License along with this library; see the file COPYING.LIB.
License along with this program; 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,13 +10,13 @@
This file is part of the GNUstep Project
This library is free software; you can redistribute it and/or
This program is free software; you can redistribute it and/or
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
License along with this library; see the file COPYING.LIB.
License along with this program; 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

@ -8,13 +8,13 @@
This file is part of the GNUstep Project
This library is free software; you can redistribute it and/or
This program is free software; you can redistribute it and/or
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
License along with this library; see the file COPYING.LIB.
License along with this program; 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,12 +10,13 @@
This file is part of the GNUstep Project
This library is free software; you can redistribute it and/or
This program is free software; you can redistribute it and/or
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
License along with this library; see the file COPYING.LIB.
License along with this program; 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

@ -8,13 +8,13 @@
This file is part of the GNUstep Project
This library is free software; you can redistribute it and/or
This program is free software; you can redistribute it and/or
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
License along with this library; see the file COPYING.LIB.
License along with this program; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -254,7 +254,8 @@ static BOOL snuggleStart(NSString *t)
}
else
{
[str appendString: @"Automatically generated documentation"];
[str appendFormat: @"%@ autogsdoc generated documentation",
[info objectForKey: @"base"]];
}
[str appendString: @"</title>\n"];
}

View file

@ -10,22 +10,28 @@
This file is part of the GNUstep Project
This library is free software; you can redistribute it and/or
This program is free software; you can redistribute it and/or
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
License along with this library; see the file COPYING.LIB.
License along with this program; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
<abstract>
This is the AGSParser class ... and some autogsdoc examples.
</abstract>
<front>
The AGSParser class is designed to produce a property-list
which can be handled by AGSOutput ... one class is not much
use without the other.
<chapter>
<heading>AGSParser front page</heading>
<p>
The AGSParser class is designed to produce a property-list
which can be handled by AGSOutput ... one class is not much
use without the other.
</p>
</chapter>
</front>
*/

View file

@ -8,13 +8,13 @@
This file is part of the GNUstep Project
This library is free software; you can redistribute it and/or
This program is free software; you can redistribute it and/or
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
License along with this library; see the file COPYING.LIB.
License along with this program; 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

@ -8,13 +8,13 @@
This file is part of the GNUstep Project
This library is free software; you can redistribute it and/or
This program is free software; you can redistribute it and/or
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
License along with this library; see the file COPYING.LIB.
License along with this program; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -262,13 +262,16 @@
<section>
<heading>Inter-document linkage</heading>
<p>
When supplied with a list of documents to process, the tool will
set up linkage between documents using the gsdoc 'prev', 'next',
and 'up' attributes.
When supplied with a list of files to process, the tool will
set up linkage between resulting documents using the gsdoc
'prev', 'next', and 'up' attributes.
</p>
<p>
The first document processed will be the 'up' link for all
subsequent documents.
If the first file listed on the command line is a gsdoc document,
it will be assumed to be the 'top' document and will be referenced
in the 'up' link for all subsequent documents.<br />
Otherwise, autogsdoc will generate an index file called 'index.gsdoc'
which will be used as the 'top' file.
</p>
<p>
The 'prev' and 'next' links will be set up to link the documents
@ -313,6 +316,7 @@ main(int argc, char **argv, char **env)
NSString *up = nil;
NSString *prev = nil;
BOOL showDependencies = YES;
BOOL haveAutoIndex = NO;
CREATE_AUTORELEASE_POOL(outer);
CREATE_AUTORELEASE_POOL(pool);
@ -566,6 +570,47 @@ main(int argc, char **argv, char **env)
}
}
if (up == nil)
{
if (isDocumentation == YES)
{
ASSIGN(up, file);
}
else
{
NSString *upFile = [documentationDirectory
stringByAppendingPathComponent: @"index.gsdoc"];
if ([mgr isReadableFileAtPath: upFile] == NO)
{
NSString *upString = [NSString stringWithFormat:
@"<?xml version=\"1.0\"?>\n"
@"<!DOCTYPE gsdoc PUBLIC "
@"\"-//GNUstep//DTD gsdoc 0.6.7//EN\" "
@"\"http://www.gnustep.org/gsdoc-0_6_7.xml\">\n"
@"<gsdoc base=\"index\" next=\"%@\">\n"
@" <head>\n"
@" <title>%@ project reference</title>\n"
@" <author name=\"autogsdoc\"></author>\n"
@" </head>\n"
@" <body>\n"
@" <back>\n"
@" <index scope=\"project\" type=\"title\" />\n"
@" </back>\n"
@" </body>\n"
@"</gsdoc>\n",
file, project];
if ([upString writeToFile: upFile atomically: YES] == NO)
{
NSLog(@"Unable to write %@", upFile);
}
}
haveAutoIndex = YES;
ASSIGN(up, @"index");
}
}
if (isDocumentation == NO)
{
/*
@ -638,14 +683,7 @@ main(int argc, char **argv, char **env)
* Set up linkage for this file.
*/
[[parser info] setObject: file forKey: @"base"];
if (up == nil)
{
ASSIGN(up, file);
}
else
{
[[parser info] setObject: up forKey: @"up"];
}
[[parser info] setObject: up forKey: @"up"];
if (prev != nil)
{
[[parser info] setObject: prev forKey: @"prev"];
@ -740,13 +778,22 @@ main(int argc, char **argv, char **env)
}
/*
* accumulate project index info into global index
* Accumulate project index info into global index
*/
[indexer mergeRefs: [prjRefs refs] override: YES];
for (i = 1; i < [args count]; i++)
for (i = (haveAutoIndex ? 0 : 1); i < [args count]; i++)
{
NSString *arg = [args objectAtIndex: i];
NSString *arg;
if (i == 0)
{
arg = @"index.gsdoc"; // Auto generated.
}
else
{
arg = [args objectAtIndex: i];
}
if ([arg hasPrefix: @"-"])
{

View file

@ -496,7 +496,7 @@
<!ELEMENT index EMPTY>
<!ATTLIST index
type (class | protocol | method | ivariable | function | type | macro | variable | constant | label | title) "label"
scope (title | project) "file"
scope (file | project) "file"
>