W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2000

LineMode patches

From: Stefan Große Pawig <pawig@hildesheim.sgh-net.de>
Date: 29 Feb 2000 19:09:17 +0100
To: www-lib@w3.org
Message-ID: <m3em9v98z6.fsf@rigel.home.de>
  Hello,

there is a problem with the LineMode browser when it is used to
generate in the build process of the library to generate the *.h from
the *.html files in the source directories. This does not work since
the LineMode browser uses the new HText interface. There are actually
two problems:
1. In spite of the -o option, the output goes to stdout (only a
   comment start, /*, is placed in the output file).
2. When the browser encounters a TAB, it inserts a line break, thus
   breaking lots of #define directives.

It turned out that the LineMode browser always uses the LMHText_new()
function, which is used for interactive mode. It should use
LMHText_new2() which work in interactive as well as in non-interactive
mode (at least as far as is could see). This solves the first problem.

The second problem occurs due to missing tabstop information in the
default style. I simply copied the tabs_8[] from DefaultStyles.c to
GridText.c and linked it into the default style.

With these changes, the library can again be built with the help of a
previously installed LineMode browser. As far as I can tell, operation
in interactive mode is not affected.

  Regards,
    Stefan

Index: libwww/LineMode/src/HTBrowse.c
===================================================================
RCS file: /sources/public/libwww/LineMode/src/HTBrowse.c,v
retrieving revision 1.183
diff -r1.183 HTBrowse.c
1921c1921
<     if (!HText_registerCDCallback (LMHText_new, LMHText_delete)) {
---
>     if (!HText_registerCDCallback (LMHText_new2, LMHText_delete)) {

Index: libwww/LineMode/src/GridText.c
===================================================================
RCS file: /sources/public/libwww/LineMode/src/GridText.c,v
retrieving revision 1.50
diff -r1.50 GridText.c
104a105,112
> PRIVATE HTTabStop tabs_8[] = {
>       { 0, 8 }, {0, 16}, {0, 24}, {0, 32}, {0, 40},
>       { 0, 48 }, {0, 56}, {0, 64}, {0, 72}, {0, 80},
>       { 0, 88 }, {0, 96}, {0, 104}, {0, 112}, {0, 120},
>       { 0, 128 }, {0, 136}, {0, 144}, {0, 152}, {0, 160},
>       {0, 168}, {0, 176},
>       {0, 0 }         /* Terminate */
> };
119c127
<       0, 0, 0, HT_LEFT,               1, 0,   0, 
---
>       0, 0, 0, HT_LEFT,               1, 0,   tabs_8, 

Index: libwww/LineMode/src/GridText.html
===================================================================
RCS file: /sources/public/libwww/LineMode/src/GridText.html,v
retrieving revision 1.16
diff -r1.16 GridText.html
69a70,71
> extern HText* LMHText_new2 (HTRequest * req,
>               HTParentAnchor * anchor,HTStream * output_stream);

-- 
Veni, vidi, VISA: I came, I saw, I did a little shopping
Received on Tuesday, 29 February 2000 13:10:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:35 GMT