[AD] makedoc patch

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


Hello,

I am using the _tx format for my own projects, and found a feature in
makedoc that is quite annoying: All chapter names in the texinfo format are
truncated to only one word. I can't think of any reason why it wants to do
this, since everything works just fine if I remove the code that truncates
the name. I'm not really sure about this though, since it is so explicitly
done in the code. Would it be ok to just remove this behaviour? A patch is
attached that does this. If there actually is some reason to use this, may
I add a _tx marker to disable it?

Sven
--- d:docs\makedoc.c	Mon Dec 20 00:39:28 1999
+++ makedoc.c	Tue Jan  4 13:24:10 2000
@@ -826,20 +826,6 @@ void output_toc(FILE *f, char *filename,
 
 
 
-char *first_word(char *s)
-{
-   static char buf[80];
-   int i;
-
-   for (i=0; s[i] && s[i] != ' '; i++)
-      buf[i] = s[i];
-
-   buf[i] = 0;
-   return buf;
-}
-
-
-
 int scmp(const void *e1, const void *e2)
 {
    char *s1 = *((char **)e1);
@@ -857,7 +843,6 @@ void output_texinfo_toc(FILE *f, int roo
    TOC *toc = tochead;
    int section_number = 0;
    char **ptr;
-   char *s;
    int i, j;
 
    fprintf(f, "@menu\n");
@@ -869,9 +854,8 @@ void output_texinfo_toc(FILE *f, int roo
 
       while (toc) {
 	 if ((toc->root) && (toc->texinfoable)) {
-	    s = first_word(toc->text);
-	    tfprintf(f, "* %s::", s);
-	    for (i=strlen(s); i<24; i++)
+	    tfprintf(f, "* %s::", toc->text);
+	    for (i=strlen(toc->text); i<24; i++)
 	       fputc(' ', f);
 	    tfprintf(f, "%s\n", toc->text);
 	 }
@@ -967,7 +951,7 @@ char *node_name(int i)
       if ((toc->root) && (toc->texinfoable)) {
 	 i--;
 	 if (!i)
-	    return first_word(toc->text);
+	    return toc->text;
       }
 
       toc = toc->next;






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