[AD] Fix for maketexi.c with only @hnodes

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


When a chapter has only @hnodes maketexi didn't output the relevant
@menu, creating a broken .texi file which makeinfo wouldn't be able to
parse correctly. I've commited the attached patch to fix that.
Index: docs/src/makedoc/maketexi.c
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/makedoc/maketexi.c,v
retrieving revision 1.9
diff -u -r1.9 maketexi.c
--- docs/src/makedoc/maketexi.c	22 Jun 2003 21:24:09 -0000	1.9
+++ docs/src/makedoc/maketexi.c	21 May 2004 08:15:05 -0000
@@ -130,6 +130,7 @@
 	       buf[i] = 0;
 
 	       if (!(line->flags & NONODE_FLAG) &&
+		  /* Output a symbol (@@void @func()). */
 		   (_valid_texinfo_node(buf, &next, &prev))) {
 		  if (toc_waiting) {
 		     _output_texinfo_toc(f, 0, 1, section_number-1);
@@ -282,12 +283,17 @@
 	 }
 
 	 if (_valid_texinfo_node(line->text, &next, &prev)) {
+	    /* Outputs a @hnode. */
 	    if (xrefs > 0) {
 	       fputs("See also:@*\n", f);
 	       for (i=0; i<xrefs; i++)
 		  _write_textinfo_xref(f, xref[i], chapter_nodes, multi_identifier_nodes);
 	       xrefs = 0;
 	    }
+	    if (toc_waiting) {
+	       _output_texinfo_toc(f, 0, 1, section_number-1);
+	       toc_waiting = 0;
+	    }
 	    _write_auto_types_xrefs(f, auto_types, found_auto_types);
 	    fprintf(f, "@node %s, %s, %s, %s\n", line->text, next, prev, _node_name(section_number-1));
 	    fprintf(f, "@section %s\n", line->text);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/