Re: [AD] FAQ/HTML problem

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


On Fri, Jun 28, 2002 at 01:41:08PM +0200, Eric Botcazou wrote:
> This problem exists in 4.0.1 and 4.0.2 RC2, but not in the 4.1.x CVS.
> Grzegorz, could you take a look at it ? Thanks in advance.

Huh, so it's true that we would maintain the 4.0.x branch? ;-)

Here's the patch, the bug was introduced long ago with my sorted toc
patch, because all toc items are buffered, this patch adds the missing
'last flush'. Tested on 4.0.2 rc1.

-- 
 Grzegorz Adam Hankiewicz   gradha@xxxxxxxxxx   http://gradha.infierno.org/
--- allegro-4.0.2/docs/makedoc.c	Mon Jun 10 05:55:17 2002
+++ ../allegro-4.0.2/docs/makedoc.c	Sat Jun 29 19:57:10 2002
@@ -846,8 +846,15 @@
 	    toc = toc->next;
 	 }
 
-	 if (nested)
+	 if (nested) {
+	    if (i > 1)
+	       qsort(ptr, i, sizeof(TOC *), toc_scmp);
+	    for (j = 0; j < i; j++)
+	       hfprintf(f, "<li><a href=\"#%s\">%s</a>\n", ptr[j]->text, ALT_TEXT(ptr[j]));
+
+	    nested = i = 0;
 	    fprintf(f, "</h4></ul>\n");
+	 }
 
 	 if (root)
 	    fprintf(f, "</h2></ul>\n");


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