commit 650deb79804a49d2dff37c9313fe96b846ad8063 from: rsc date: Thu Apr 08 19:36:35 2004 UTC Make libhtml, htmlfmt build. Thanks to wkj for doing all the hard work. commit - a67406e465169623421beba9072b213a8e75c423 commit + 650deb79804a49d2dff37c9313fe96b846ad8063 blob - 019ad732285e4fc024dd17b2b9e38a816fc92294 blob + 2fdca44510f3e18a3c03d7f8eea3dafec8e03db1 --- include/html.h +++ include/html.h @@ -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 @@ -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) @@ -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) @@ -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; }; @@ -253,7 +253,7 @@ struct Ifloat struct Ispacer { - Item _item; // (with tag ==Ispacertag) + Item item; // (with tag ==Ispacertag) int spkind; // ISPnull, etc. }; @@ -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; blob - f3b05605cf207771204ca43ce7d11ebbbc73c8b6 blob + 53db700cb927c955359906d486645e86862b4f41 --- src/cmd/htmlfmt/dat.h +++ src/cmd/htmlfmt/dat.h @@ -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 */ blob - 4f2e436f2ba9d3e1ac1786c80a858c767c608c6f blob + 7589e3e15b23ce2c9e370f57e68ee830ce4ae5d0 --- src/cmd/htmlfmt/html.c +++ src/cmd/htmlfmt/html.c @@ -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; } blob - 5b263532ae7cb798ac0b963f180f89215ec3eaa2 blob + 7bf8fbb61f524a9fefae2a0f100c2adbdba3fad2 --- src/cmd/htmlfmt/mkfile +++ src/cmd/htmlfmt/mkfile @@ -1,4 +1,4 @@ -<$SYS9/$systype/$objtype/mkfile +<$PLAN9/src/mkhdr TARG=htmlfmt OFILES=\ @@ -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 blob - f8c79ea36d785c87d419b2cbdd8e4495dd09e117 blob + 1dfa689cff343b124cfb157d6d93f54297bae502 --- src/libhtml/impl.h +++ src/libhtml/impl.h @@ -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" blob - 0952c451452386c271c02bc52cfd4fe728568a92 blob + 7496d8307031907538c05610782b1d1a10b957c9 --- src/libhtml/mkfile +++ src/libhtml/mkfile @@ -1,6 +1,6 @@ -<$SYS9/$systype/$objtype/mkfile +<$PLAN9/src/mkhdr -LIB=$LIB9/libhtml.a +LIB=libhtml.a OFILES=\ build.$O\ @@ -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 blob - db22bba7aacabcecb3491380378d260473e08f46 blob + 32fd70d0d8add58d512a7b985b490c8075db495b --- src/libhtml/utils.c +++ src/libhtml/utils.c @@ -1,4 +1,5 @@ #include +#include #include #include #include