coar 98/05/26 04:56:06
Modified: apidoc api.list mkapidict
Log:
Document the ramifications of Ben's change (and how to use it), and
fill in some missing cross-references.
Revision Changes Path
1.5 +10 -5 apache-devsite/apidoc/api.list
Index: api.list
===================================================================
RCS file: /export/home/cvs/apache-devsite/apidoc/api.list,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- api.list 1998/05/25 19:51:57 1.4
+++ api.list 1998/05/26 11:56:05 1.5
@@ -1,4 +1,4 @@
- #;
+#;
#; Metadata about API components. Each record contains several fields,
#; separated by vbars (|). Comments begin with '#;' and continue
#; to the end of the line. Leading whitespace is discarded except as
@@ -271,7 +271,7 @@
R|ap_acquire_mutex\
|int $*(mutex *mutex_id);\
|\
- |SA-mutex,MULTI_OK,MULTI_ERR,MULTI_TIMEOUT\
+ |SA-mutex,SA-multi\
|dict-ap_acquire_mutex.html
R|ap_create_mutex\
|mutex *$*(char *name);\
@@ -2704,20 +2704,25 @@
|\
|
#; Multithread stuff
+X|SA-multi\
+ |ap_acquire_mutex,MULTI_OK,MULTI_ERR,MULTI_TIMEOUT\
+ |\
+ |\
+ |
C|MULTI_OK\
|#define $* <EM>value</EM>\
|\
- |\
+ |SA-multi\
|
C|MULTI_TIMEOUT\
|#define $* <EM>value</EM>\
- |\
|\
+ |SA-multi\
|
C|MULTI_ERR\
|#define $* <EM>value</EM>\
- |\
|\
+ |SA-multi\
|
#;
#; These are macros, but they are invoked as though they were routines -
1.4 +30 -16 apache-devsite/apidoc/mkapidict
Index: mkapidict
===================================================================
RCS file: /export/home/cvs/apache-devsite/apidoc/mkapidict,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mkapidict 1998/05/25 19:51:57 1.3
+++ mkapidict 1998/05/26 11:56:05 1.4
@@ -2,10 +2,23 @@
#
# Read from STDIN, produce HTML. Simple, really. The first argument on the
# command line ($ARGV[0]) is the name of the file which provides the
-# framework into which the generated text is inserted.
+# framework into which the generated text is inserted. $ARGV[1] specifies
+# a layout type; 0 means full, with each entry starting with an H3 heading;
+# 1 means simpler, with each entry jumping right to the definition without
+# the preamble. Layout 1 results in reduced file size, but is slightly
+# susceptible to potentially confusing display values if an entry has no
+# definition in the data file. Layout 0 guarantees a little more text
+# in such a case, but at a significant cost in file size.
#
# Edit history:
#
+# 1998-05-26 Ken Coar
+# Change missing-args message to a 'usage' display, change <B>
references
+# to <STRONG>s, clean up some style issues, and document what Ben's
+# changes meant and how to use them.
+# 1998-05-25 Ben Laurie
+# Add capability for alternate, simpler, layout of output. ARGV[1] is
+# either 0 for full cross-linked output or 1 for simple.
# 1998-05-03 Ken Coar
# Cleaned up a little bit, from horrible to bad, before checking in to
# CVS.
@@ -13,17 +26,18 @@
# Prototyped..
#
-if (! $ARGV[0]) {
- print "Template file must be specified.\n";
- die ("missing required input.");
+if ($#ARGV < 0) {
+ print STDERR "Usage:\n $0 template-file 0|1 < api-data > doc-file\n";
+ exit 1;
};
$InFile = $ARGV[0];
$OutFile = "$ARGV[0].bak";
-die "Need layout type" if !$ARGV[1];
+die "Need template file" if (!$ARGV[0]);
+die "Need layout type" if (!$ARGV[1]);
-$Layout=$ARGV[1];
+$Layout = $ARGV[1];
%Routine = ();
%Constant = ();
@@ -185,7 +199,7 @@
foreach $key (@keys) {
my ($edited, $iname, $idef, $isamp, $iref, $idesc) =
split(m:\|:, $list{$key});
- print <<EOHT if $Layout == 0;
+ print <<EOHT if ($Layout == 0);
<H3>
<A NAME="$iname">
$iname
@@ -196,7 +210,7 @@
if (! $edited) {
$edited = "No prototype or definition available.";
};
- if($Layout == 0) {
+ if ($Layout == 0) {
print <<EOHT;
<P>
Definition:
@@ -210,21 +224,21 @@
</DL>
EOHT
} else {
- if($edited =~ /$iname/) {
- $edited =~ s/$iname/<B>$iname<\/B>/;
+ if ($edited =~ /$iname/) {
+ $edited =~ s/$iname/<STRONG>$iname<\/STRONG>/;
} else {
- $edited="<B>$iname:</B> $edited";
+ $edited="<STRONG>$iname:</STRONG> $edited";
}
- print "<A NAME=$iname><PRE>$edited</PRE></A>\n";
+ print "<A NAME=\"$iname\"><PRE>$edited</PRE></A>\n";
}
$edited = &edit_inline($isamp, $iname);
- if (! $edited && $Layout != 1) {
+ if ((! $edited) && ($Layout != 1)) {
$edited = "No examples available.";
};
- if($Layout != 1 || $edited) {
+ if (($Layout != 1) || $edited) {
print <<EOHT;
<P>
- Usage example:
+ Usage example:
</P>
<DL>
<DD>
@@ -237,7 +251,7 @@
}
if (! $idesc) {
- print <<EOHT if $Layout != 1;
+ print <<EOHT if ($Layout != 1);
<P>
No documentation available.
</P>