coar 99/12/08 06:54:36
Modified: apidoc api.list dict-ap_push_array.html dict-array_header.html mkapidict Log: Add a wee bit of documentation for arrays. Revision Changes Path 1.11 +22 -1 apache-devsite/apidoc/api.list Index: api.list =================================================================== RCS file: /home/cvs/apache-devsite/apidoc/api.list,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- api.list 1999/03/31 23:48:34 1.10 +++ api.list 1999/12/08 14:54:31 1.11 @@ -964,7 +964,28 @@ int nalloc; \n \ char *elts; \n \ } array_header;\ - |\ + |typedef struct item_t { \n \ + int length;\n \ + char *string; \n \ +} item_t;\n \ + :\n \ +array_header *item_array1; \n \ +item_t *item; \n \ + :\n \ +item_array1 = ap_make_array(p, 4, sizeof(item_t));\n \ + :\n \ +item = ap_push_array(item_array1);\n \ +item->length = 1;\n \ +item->string = "a";\n \ + :\n \ +item_t *list;\n \ +\n \ +list = (item_t *) item_array1->elts;\n \ +for (i = 0; i < item_array1->nelts; ++i) {\n \ + item = &list[i];\n \ + fprintf(stderr, "Item %d: length=%d, string='%s'\\n",\n \ + i, item->length, item->string);\n \ +}\n \ |SA-array\ | R|ap_array_cat\ 1.3 +7 -6 apache-devsite/apidoc/dict-ap_push_array.html Index: dict-ap_push_array.html =================================================================== RCS file: /home/cvs/apache-devsite/apidoc/dict-ap_push_array.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dict-ap_push_array.html 1999/03/30 22:11:42 1.2 +++ dict-ap_push_array.html 1999/12/08 14:54:31 1.3 @@ -1,6 +1,7 @@ -<P> -Allocates more memory for the additional array element(s). -</P> -<P> -Returns a pointer to the next element of <EM>arr</EM>. -</P> +<p> +Allocates more memory for the additional array element and adds +it to the end of the array. +</p> +<p> +Returns a pointer to the newly-created element of <i>arr</i>. +</p> 1.2 +4 -4 apache-devsite/apidoc/dict-array_header.html Index: dict-array_header.html =================================================================== RCS file: /home/cvs/apache-devsite/apidoc/dict-array_header.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- dict-array_header.html 1999/03/06 18:17:23 1.1 +++ dict-array_header.html 1999/12/08 14:54:32 1.2 @@ -1,4 +1,4 @@ -<P> -</P> -<P> -</P> +<p> +</p> +<p> +</p> 1.7 +88 -112 apache-devsite/apidoc/mkapidict Index: mkapidict =================================================================== RCS file: /home/cvs/apache-devsite/apidoc/mkapidict,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- mkapidict 1999/03/31 23:48:45 1.6 +++ mkapidict 1999/12/08 14:54:32 1.7 @@ -31,6 +31,8 @@ # # Edit history: # +# 1999-12-08 Ken Coar +# Downcase the HTML tags and do some line merging. # 1999-03-31 Ken Coar # Get rid of the ARGV processing and use command-line options # instead. Add a third level of layout; 0 now means 'full,' @@ -198,27 +200,19 @@ &verbose("Dumping prologue."); print $ofh @Prologue; print $ofh <<EOHT; - <H2>Table of Contents</H2> - <UL> - <LI><A HREF="#Routines">Routine Descriptions</A> - </LI> - <LI><A HREF="#Structures">Data Structure Definitions</A> - </LI> - <LI><A HREF="#Cells">Global Data Cells</A> - </LI> - <LI><A HREF="#Constants">Constant Definitions</A> - </LI> - </UL> - <HR> + <h2>Table of Contents</h2> + <ul> + <li><a href="#Routines">Routine Descriptions</a></li> + <li><a href="#Structures">Data Structure Definitions</a></li> + <li><a href="#Cells">Global Data Cells</a></li> + <li><a href="#Constants">Constant Definitions</a></li> + </ul> + <hr> EOHT print $ofh <<EOHT; - <H2> - <A NAME="Routines"> - Routine Descriptions - </A> - </H2> - <HR> + <h2><a name="Routines">Routine Descriptions</a></h2> + <hr> EOHT &verbose("Dumping routines."); @@ -226,12 +220,8 @@ &dump_list('R', %Routine); print $ofh <<EOHT; - <H2> - <A NAME="Structures"> - Data Structure Definitions - </A> - </H2> - <HR> + <h2><a name="Structures">Data Structure Definitions</a></h2> + <hr> EOHT &verbose("Dumping structures."); @@ -239,12 +229,8 @@ &dump_list('S', %Structure); print $ofh <<EOHT; - <H2> - <A NAME="Cells"> - Global Data Cells - </A> - </H2> - <HR> + <h2><a name="Cells">Global Data Cells</a></h2> + <hr> EOHT &verbose("Dumping data cells."); @@ -252,30 +238,26 @@ &dump_list('D', %Cell); print $ofh <<EOHT; - <H2> - <A NAME="Constants"> - Constant Definitions - </A> - </H2> - <P> + <h2><a name="Constants">Constant Definitions</a></h2> + <p> Many of the compile-time choices are determined by the settings of - various constants created with <CODE>#define</CODE> statements. + various constants created with <code>#define</code> statements. Things like the maximum size of fixed-length buffers, the server version string, and operating system-specific code fragment compilation are controlled by constants. - </P> - <P> + </p> + <p> Some of the Apache Web server's constants (such as - <A HREF="$HREF{'SERVER_VERSION'}"><SAMP>SERVER_VERSION</SAMP></A>) + <a href="$HREF{'SERVER_VERSION'}"><samp>SERVER_VERSION</samp></a>) can be overridden with compile-time definitions on the compiler command line. Others, like - <A HREF="$HREF{'MAX_STRING_LEN'}"><SAMP>MAX_STRING_LEN</SAMP></A>, + <a href="$HREF{'MAX_STRING_LEN'}"><samp>MAX_STRING_LEN</samp></a>, are provided as conveniences, and shouldn't be modified except under special circumstances. Still others, such as - <A HREF="$HREF{'OR_LIMIT'}"><SAMP>OR_LIMIT</SAMP></A>, - have specific values that <STRONG>must not</STRONG> be altered. - </P> - <HR> + <a href="$HREF{'OR_LIMIT'}"><samp>OR_LIMIT</samp></a>, + have specific values that <strong>must not</strong> be altered. + </p> + <hr> EOHT &verbose("Dumping constants."); @@ -321,7 +303,7 @@ foreach $ref (keys(%Entity)) { my ($href) = $HREF{"$ref"}; if ($ref ne $rname) { - $wip =~ s:\b$ref\b:<A HREF="$href">$ref</A>:g; + $wip =~ s:\b$ref\b:<a href="$href">$ref</a>:g; } } return $wip; @@ -363,26 +345,26 @@ if ($Layout == 0) { print $ofh <<EOHT; - <OL COMPACT> + <ol compact> EOHT foreach (sort(keys(%items))) { my ($uri) = $HREF{"$_"}; print $ofh <<EOHT; - <LI><A HREF="$uri"><CODE>$_</CODE></A></LI> + <li><a href="$uri"><code>$_</code></a></li> EOHT } print $ofh <<EOHT; - </OL> + </ol> EOHT } print $ofh <<EOHT; - <HR> + <hr> EOHT return 0; @@ -429,24 +411,19 @@ my ($href) = $HREF{"$iname"}; print $ofh <<EOHT if ($Layout == 0); -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" +<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> -<HTML> - <HEAD> - <TITLE>Apache API: $iname - </TITLE> - </HEAD> - <BODY> - <H1>Apache API Documentation</H1> - <H3>$iname</H3> +<html> + <head> + <title>Apache API: $iname</title> + </head> + <body> + <h1>Apache API Documentation</h1> + <h3>$iname</h3> EOHT print $ofh <<EOHT if ($Layout > 0); - <H3> - <A NAME="$uri"> - $iname - </A> - </H3> + <h3><a name="$uri">$iname</a></h3> EOHT $edited = &edit_inline($idef, $iname); if (! $edited) { @@ -455,26 +432,26 @@ if ($Layout < 2) { print $ofh <<EOHT; - <P> + <p> Definition: - </P> - <DL> - <DD> - <PRE> + </p> + <dl> + <dd> + <pre> $edited - </PRE> - </DD> - </DL> + </pre> + </dd> + </dl> EOHT } else { if ($edited =~ /$iname/) { - $edited =~ s/$iname/<STRONG>$iname<\/STRONG>/; + $edited =~ s/$iname/<b>$iname<\/b>/; } else { - $edited="<STRONG>$iname:</STRONG> $edited"; + $edited="<b>$iname:</b> $edited"; } - print $ofh "<A NAME=\"$uri\"><PRE>$edited</PRE></A>\n"; + print $ofh "<a name=\"$uri\"><pre>$edited</pre></a>\n"; } $edited = &edit_inline($isamp, $iname); if ((! $edited) && ($Layout < 2)) { @@ -483,31 +460,31 @@ if (($Layout < 2) || $edited) { print $ofh <<EOHT; - <P> + <p> Usage example: - </P> - <DL> - <DD> - <PRE> + </p> + <dl> + <dd> + <pre> $edited - </PRE> - </DD> - </DL> + </pre> + </dd> + </dl> EOHT } if (! $idesc) { print $ofh <<EOHT if ($Layout < 2); - <P> + <p> No documentation available. - </P> + </p> EOHT } elsif (! -r $idesc) { print $ofh <<EOHT; - <P> + <p> Documentation file not accessible. - </P> + </p> EOHT } else { @@ -523,14 +500,13 @@ $edited =~ s/[\s,]//g; if ($edited) { local ($ref) = $iref; - local ($ref_list) = " <DD>"; + local ($ref_list) = " <dd>"; local ($sees) = ""; $ref =~ s/\s+//g; print $ofh <<EOHT; - <DL COMPACT> - <DT><EM>See also:</EM> - </DT> + <dl compact> + <dt><i>See also:</i></dt> EOHT # # Expand any aliased 'see-also' entries. @@ -545,12 +521,12 @@ } $ref = $sees; foreach (sort(split(m:,:, $ref))) { - local ($item) = "<SAMP>$_</SAMP>"; + local ($item) = "<samp>$_</samp>"; my ($uri) = $HREF{"$_"}; - + next if (($_ eq "") || ($_ eq $iname)); if ($Entity{$_}) { - $item = "<A HREF=\"$uri\">$item</A>"; + $item = "<a href=\"$uri\">$item</a>"; } else { print STDERR "$iname cross-references to undefined "; @@ -561,45 +537,45 @@ $ref_list =~ s:,\n $:\n:; print $ofh $ref_list; print $ofh <<EOHT; - </DD> - </DL> + </dd> + </dl> EOHT } print $ofh <<EOHT; - <HR> + <hr> EOHT if ($Layout == 0) { if ($previous) { - $previous = '<A HREF="' . $HREF{"$previous"} . '">' - . "<CODE>$previous</CODE></A>"; + $previous = '<a href="' . $HREF{"$previous"} . '">' + . "<code>$previous</code></a>"; } else { $previous = "(none)"; } if ($next) { - $next = '<A HREF="' . $HREF{"$next"} . '">' - . "<CODE>$next</CODE></A>"; + $next = '<a href="' . $HREF{"$next"} . '">' + . "<code>$next</code></a>"; } else { $next = "(none)"; } print $ofh <<EOHT; - <P> + <p> Previous: $previous Next: $next - </P> - <P> - <A HREF="$arg{'o'}">Table of Contents</A> - (<A HREF="$arg{'o'}#Routines">Routines</A>, - <A HREF="$arg{'o'}#Structures">Structures</A>, - <A HREF="$arg{'o'}#Cells">Data Cells</A>, - <A HREF="$arg{'o'}#Constants">Constants</A>) - </P> - </BODY> -</HTML> + </p> + <p> + <a href="$arg{'o'}">Table of Contents</a> + (<a href="$arg{'o'}#Routines">Routines</a>, + <a href="$arg{'o'}#Structures">Structures</a>, + <a href="$arg{'o'}#Cells">Data Cells</a>, + <a href="$arg{'o'}#Constants">Constants</a>) + </p> + </body> +</html> EOHT } }