URI: 
       tMake libhtml, htmlfmt build. Thanks to wkj for doing all the hard work. - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 650deb79804a49d2dff37c9313fe96b846ad8063
   DIR parent a67406e465169623421beba9072b213a8e75c423
  HTML Author: rsc <devnull@localhost>
       Date:   Thu,  8 Apr 2004 19:36:35 +0000
       
       Make libhtml, htmlfmt build.
       Thanks to wkj for doing all the hard work.
       
       Diffstat:
         M include/html.h                      |      14 +++++++-------
         M src/cmd/htmlfmt/dat.h               |       2 +-
         M src/cmd/htmlfmt/html.c              |       4 ++--
         M src/cmd/htmlfmt/mkfile              |      22 ++++------------------
         M src/libhtml/impl.h                  |       2 +-
         M src/libhtml/mkfile                  |      14 ++++----------
         M src/libhtml/utils.c                 |       1 +
       
       7 files changed, 20 insertions(+), 39 deletions(-)
       ---
   DIR diff --git a/include/html.h b/include/html.h
       t@@ -190,7 +190,7 @@ enum {
        
        struct Itext
        {
       -        Item _item;                                // (with tag ==Itexttag)
       +        Item item;                                // (with tag ==Itexttag)
                Rune*        s;                        // the characters
                int                fnt;                        // style*NumSize+size (see font stuff, below)
                int                fg;                        // Pixel (color) for text
       t@@ -200,7 +200,7 @@ struct Itext
        
        struct Irule
        {
       -        Item _item;                                // (with tag ==Iruletag)
       +        Item item;                                // (with tag ==Iruletag)
                uchar        align;                // alignment spec
                uchar        noshade;                // if true, don't shade
                int                size;                        // size attr (rule height)
       t@@ -210,7 +210,7 @@ struct Irule
        
        struct Iimage
        {
       -        Item _item;                                // (with tag ==Iimagetag)
       +        Item item;                                // (with tag ==Iimagetag)
                Rune*        imsrc;                // image src url
                int                imwidth;                // spec width (actual, if no spec)
                int                imheight;                // spec height (actual, if no spec)
       t@@ -227,14 +227,14 @@ struct Iimage
        
        struct Iformfield
        {
       -        Item _item;                                // (with tag ==Iformfieldtag)
       +        Item item;                                // (with tag ==Iformfieldtag)
                Formfield*        formfield;
        };
        
        
        struct Itable
        {
       -        Item _item;                                // (with tag ==Itabletag)
       +        Item item;                                // (with tag ==Itabletag)
                Table*        table;
        };
        
       t@@ -253,7 +253,7 @@ struct Ifloat
        
        struct Ispacer
        {
       -        Item _item;                                // (with tag ==Ispacertag)
       +        Item item;                                // (with tag ==Ispacertag)
                int                spkind;                // ISPnull, etc.
        };
        
       t@@ -611,7 +611,7 @@ extern int                        targetid(Rune* s);
        extern Rune*                targetname(int targid);
        extern int                        validitems(Item* i);
        
       -#pragma varargck        type "I"        Item*
       +/* #pragma varargck        type "I"        Item* */
        
        // Control print output
        extern int                        warn;
   DIR diff --git a/src/cmd/htmlfmt/dat.h b/src/cmd/htmlfmt/dat.h
       t@@ -47,4 +47,4 @@ extern        void                rendertext(URLwin*, Bytes*);
        extern        void                rerender(URLwin*);
        extern        void                freeurlwin(URLwin*);
        
       -#pragma        varargck        argpos        error        1
       +/* #pragma        varargck        argpos        error        1 */
   DIR diff --git a/src/cmd/htmlfmt/html.c b/src/cmd/htmlfmt/html.c
       t@@ -145,10 +145,10 @@ baseurl(char *url)
                        return nil;
                base = estrdup(url);
                slash = strrchr(base, '/');
       -        if(slash!=nil && slash>=&base[rs[0].e.p-rs[0].s.p])
       +        if(slash!=nil && slash>=&base[rs[0].e.ep-rs[0].s.sp])
                        *slash = '\0';
                else
       -                base[rs[0].e.p-rs[0].s.p] = '\0';
       +                base[rs[0].e.ep-rs[0].s.sp] = '\0';
                return base;
        }
        
   DIR diff --git a/src/cmd/htmlfmt/mkfile b/src/cmd/htmlfmt/mkfile
       t@@ -1,4 +1,4 @@
       -<$SYS9/$systype/$objtype/mkfile
       +<$PLAN9/src/mkhdr
        
        TARG=htmlfmt
        OFILES=\
       t@@ -8,23 +8,9 @@ OFILES=\
        
        HFILES=\
                dat.h\
       -        $SYS9/sys/include/html.h\
       +        $PLAN9/include/html.h\
        
       -LIB=$SYS9/$systype/$objtype/lib/libbio.a\
       -        $SYS9/$systype/$objtype/lib/libregexp.a\
       -        $SYS9/$systype/$objtype/lib/libhtml.a\
       -        $SYS9/$systype/$objtype/lib/lib9c.a
       +SHORTLIB=bio regexp9 html 9
        
       -BIN=$SYS9/$systype/$objtype/bin
       +<$PLAN9/src/mkone
        
       -UPDATE=\
       -        mkfile\
       -        $HFILES\
       -        ${OFILES:%.$O=%.c}
       -
       -<$SYS9/sys/src/cmd/mkone
       -
       -CFLAGS=$CFLAGS
       -
       -#$O.out: $OFILES
       -#        $LD -o $target  $LDFLAGS $OFILES
   DIR diff --git a/src/libhtml/impl.h b/src/libhtml/impl.h
       t@@ -158,6 +158,6 @@ extern void        _freetokens(Token* tarray, int n);
        extern Token*        _gettoks(uchar* data, int datalen, int chset, int mtype, int* plen);
        extern int                _tokaval(Token* t, int attid, Rune** pans, int xfer);
        
       -#pragma varargck        type "T"        Token*
       +/* #pragma varargck        type "T"        Token* */
        
        #include "runetab.h"
   DIR diff --git a/src/libhtml/mkfile b/src/libhtml/mkfile
       t@@ -1,6 +1,6 @@
       -<$SYS9/$systype/$objtype/mkfile
       +<$PLAN9/src/mkhdr
        
       -LIB=$LIB9/libhtml.a
       +LIB=libhtml.a
        
        OFILES=\
                build.$O\
       t@@ -10,13 +10,7 @@ OFILES=\
                runetab.$O\
        
        HFILES=\
       -        $SYS9/sys/include/html.h\
       +        $PLAN9/include/html.h\
                impl.h\
        
       -UPDATE=\
       -        mkfile\
       -        $HFILES\
       -        ${OFILES:%.$O=%.c}\
       -        ${LIB:$SYS9/$systype/$objtype/%=$SYS9/$systype/386/%}\
       -
       -<$SYS9/sys/src/cmd/mksyslib
       +<$PLAN9/src/mksyslib
   DIR diff --git a/src/libhtml/utils.c b/src/libhtml/utils.c
       t@@ -1,4 +1,5 @@
        #include <u.h>
       +#include <limits.h>
        #include <libc.h>
        #include <draw.h>
        #include <html.h>