lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev fixed attribute bug


From: Laura Eaves
Subject: lynx-dev fixed attribute bug
Date: Thu, 3 Sep 1998 03:56:30 -0400 (EDT)

i decided to insert a few printf and found where the problem was.
The patch below fixes it.
(Patch includes some added trace output.  I left them in as they may
be useful for something else.)
--le

--- old/GridText.c      Sat Aug 29 17:22:40 1998
+++ src/GridText.c      Thu Sep  3 03:50:23 1998
@@ -1613,7 +1613,8 @@
     ctrl_chars_on_this_line = 0; /*reset since we are going to a new line*/
     text->LastChar = ' ';
 
-    CTRACE(tfp,"GridText: split_line called\n");
+    CTRACE(tfp,"GridText: split_line(%ld,%d) called\n",text,split);
+    CTRACE(tfp,"   bold_on=%d, underline_on=%d\n",bold_on,underline_on);
 
     text->Lines++;
 
@@ -1716,7 +1717,7 @@
        line->styles[0].horizpos = 0xffffffff;
     if (previous->numstyles == 0)
        previous->styles[0].horizpos = 0xffffffff;
-#endif
+#endif /*USE_COLOR_STYLE*/
     previous->next = line;
     text->last_line = line;
     line->size = 0;
@@ -1839,7 +1840,8 @@
            linedata[line->size] = '\0';
            ctrl_chars_on_this_line++;
            SpecialAttrChars++;;
-       }
+       } else
+           bold_on = OFF;
        if (plen) {
            for (i = (plen - 1); i != 0; i--) {
                if (p[i] == LY_BOLD_START_CHAR) {
@@ -2036,8 +2038,9 @@
     HTStyle * style;
     int indent;
 
-    CTRACE(tfp, "add(%c) %d/%d\n", ch,
-               HTisDocumentSource(), HTOutputFormat != WWW_SOURCE);
+    CTRACE(tfp, "add(%c) %d/%d bold_on=%d,underline_on=%d\n", ch,
+               HTisDocumentSource(), HTOutputFormat != WWW_SOURCE,
+               bold_on,underline_on);
     /*
      *  Make sure we don't crash on NULLs.
      */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]