mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-03 13:21:00 +00:00
More indexing tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11804 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7fd91d3b48
commit
bd48aaa943
4 changed files with 34 additions and 8 deletions
|
@ -1,10 +1,11 @@
|
||||||
2001-12-18 Richard Frith-Macdonald <rfm@gnu.org>
|
2001-12-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Tools/gsdoc-0_6_7.dtd: add scope to index element
|
* 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:
|
* Tools/AGSHtml.h:
|
||||||
* Tools/AGSHtml.m: Output tidyups and general format improvements.
|
* Tools/AGSHtml.m: Output tidyups and general format improvements.
|
||||||
Add links to other documents in project. Add support for 'index'
|
Add links to other documents in project. Add support for 'index'
|
||||||
element with bioth file and project scope.
|
element with both file and project scope.
|
||||||
* Tools/autogsdoc.m: Clean up a little and handle gsdoc files
|
* Tools/autogsdoc.m: Clean up a little and handle gsdoc files
|
||||||
listed as source files better .... now looks for them in the
|
listed as source files better .... now looks for them in the
|
||||||
source directory.
|
source directory.
|
||||||
|
|
|
@ -761,9 +761,10 @@ static NSMutableSet *textNodes = nil;
|
||||||
{
|
{
|
||||||
dict = [projectRefs refs];
|
dict = [projectRefs refs];
|
||||||
}
|
}
|
||||||
|
|
||||||
dict = [dict objectForKey: type];
|
dict = [dict objectForKey: type];
|
||||||
if ([dict count] > 0)
|
if ([dict count] > 1
|
||||||
|
|| ([dict count] > 0 && [type isEqual: @"title"] == NO))
|
||||||
{
|
{
|
||||||
NSArray *a = [dict allKeys];
|
NSArray *a = [dict allKeys];
|
||||||
unsigned c = [a count];
|
unsigned c = [a count];
|
||||||
|
@ -806,6 +807,23 @@ static NSMutableSet *textNodes = nil;
|
||||||
NSString *ref = [a objectAtIndex: i];
|
NSString *ref = [a objectAtIndex: i];
|
||||||
NSString *file = [dict objectForKey: ref];
|
NSString *file = [dict objectForKey: ref];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Special case ... title listings are done in reverse
|
||||||
|
* order, with the name of the file being the unique key
|
||||||
|
* and the value being the title string.
|
||||||
|
*/
|
||||||
|
if ([type isEqual: @"title"] == YES)
|
||||||
|
{
|
||||||
|
NSString *tmp = ref;
|
||||||
|
|
||||||
|
ref = file;
|
||||||
|
file = tmp;
|
||||||
|
if ([file isEqual: base] == YES)
|
||||||
|
{
|
||||||
|
continue; // Don't list current file.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[buf appendString: indent];
|
[buf appendString: indent];
|
||||||
[buf appendFormat:
|
[buf appendFormat:
|
||||||
@"<li><a href=\"%@.html#%@$%@\">%@</a></li>\n",
|
@"<li><a href=\"%@.html#%@$%@\">%@</a></li>\n",
|
||||||
|
|
|
@ -277,8 +277,8 @@
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
<back>
|
<back>
|
||||||
|
<index type="title" scope="project" />
|
||||||
<index type="class" scope="project" />
|
<index type="class" scope="project" />
|
||||||
<index type="method" scope="project" />
|
|
||||||
</back>
|
</back>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -485,11 +485,18 @@
|
||||||
<!-- Table of contents. -->
|
<!-- Table of contents. -->
|
||||||
<!ELEMENT contents EMPTY>
|
<!ELEMENT contents EMPTY>
|
||||||
|
|
||||||
<!-- Index ... generates an index of the specified type of elements. -->
|
<!-- Index ... generates an index of the specified type of elements.
|
||||||
|
'scope' determines whether the index is generated for the current file
|
||||||
|
or for the whole of the current project ... if the document is
|
||||||
|
processed in a standalone manner, the scope if always project.
|
||||||
|
'type' determines the type of entry listed in the index. The 'title'
|
||||||
|
type really only makes sense for a project scope index as it produces
|
||||||
|
a list of the files in the project (by title).
|
||||||
|
-->
|
||||||
<!ELEMENT index EMPTY>
|
<!ELEMENT index EMPTY>
|
||||||
<!ATTLIST index
|
<!ATTLIST index
|
||||||
type (class | protocol | method | ivariable | function | type | macro | variable | constant | label) "label"
|
type (class | protocol | method | ivariable | function | type | macro | variable | constant | label | title) "label"
|
||||||
scope (file | project) "file"
|
scope (title | project) "file"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue