mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
Make libhtml, htmlfmt build.
Thanks to wkj for doing all the hard work.
This commit is contained in:
parent
a67406e465
commit
650deb7980
7 changed files with 20 additions and 39 deletions
|
@ -190,7 +190,7 @@ enum {
|
||||||
|
|
||||||
struct Itext
|
struct Itext
|
||||||
{
|
{
|
||||||
Item _item; // (with tag ==Itexttag)
|
Item item; // (with tag ==Itexttag)
|
||||||
Rune* s; // the characters
|
Rune* s; // the characters
|
||||||
int fnt; // style*NumSize+size (see font stuff, below)
|
int fnt; // style*NumSize+size (see font stuff, below)
|
||||||
int fg; // Pixel (color) for text
|
int fg; // Pixel (color) for text
|
||||||
|
@ -200,7 +200,7 @@ struct Itext
|
||||||
|
|
||||||
struct Irule
|
struct Irule
|
||||||
{
|
{
|
||||||
Item _item; // (with tag ==Iruletag)
|
Item item; // (with tag ==Iruletag)
|
||||||
uchar align; // alignment spec
|
uchar align; // alignment spec
|
||||||
uchar noshade; // if true, don't shade
|
uchar noshade; // if true, don't shade
|
||||||
int size; // size attr (rule height)
|
int size; // size attr (rule height)
|
||||||
|
@ -210,7 +210,7 @@ struct Irule
|
||||||
|
|
||||||
struct Iimage
|
struct Iimage
|
||||||
{
|
{
|
||||||
Item _item; // (with tag ==Iimagetag)
|
Item item; // (with tag ==Iimagetag)
|
||||||
Rune* imsrc; // image src url
|
Rune* imsrc; // image src url
|
||||||
int imwidth; // spec width (actual, if no spec)
|
int imwidth; // spec width (actual, if no spec)
|
||||||
int imheight; // spec height (actual, if no spec)
|
int imheight; // spec height (actual, if no spec)
|
||||||
|
@ -227,14 +227,14 @@ struct Iimage
|
||||||
|
|
||||||
struct Iformfield
|
struct Iformfield
|
||||||
{
|
{
|
||||||
Item _item; // (with tag ==Iformfieldtag)
|
Item item; // (with tag ==Iformfieldtag)
|
||||||
Formfield* formfield;
|
Formfield* formfield;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct Itable
|
struct Itable
|
||||||
{
|
{
|
||||||
Item _item; // (with tag ==Itabletag)
|
Item item; // (with tag ==Itabletag)
|
||||||
Table* table;
|
Table* table;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ struct Ifloat
|
||||||
|
|
||||||
struct Ispacer
|
struct Ispacer
|
||||||
{
|
{
|
||||||
Item _item; // (with tag ==Ispacertag)
|
Item item; // (with tag ==Ispacertag)
|
||||||
int spkind; // ISPnull, etc.
|
int spkind; // ISPnull, etc.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ extern int targetid(Rune* s);
|
||||||
extern Rune* targetname(int targid);
|
extern Rune* targetname(int targid);
|
||||||
extern int validitems(Item* i);
|
extern int validitems(Item* i);
|
||||||
|
|
||||||
#pragma varargck type "I" Item*
|
/* #pragma varargck type "I" Item* */
|
||||||
|
|
||||||
// Control print output
|
// Control print output
|
||||||
extern int warn;
|
extern int warn;
|
||||||
|
|
|
@ -47,4 +47,4 @@ extern void rendertext(URLwin*, Bytes*);
|
||||||
extern void rerender(URLwin*);
|
extern void rerender(URLwin*);
|
||||||
extern void freeurlwin(URLwin*);
|
extern void freeurlwin(URLwin*);
|
||||||
|
|
||||||
#pragma varargck argpos error 1
|
/* #pragma varargck argpos error 1 */
|
||||||
|
|
|
@ -145,10 +145,10 @@ baseurl(char *url)
|
||||||
return nil;
|
return nil;
|
||||||
base = estrdup(url);
|
base = estrdup(url);
|
||||||
slash = strrchr(base, '/');
|
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';
|
*slash = '\0';
|
||||||
else
|
else
|
||||||
base[rs[0].e.p-rs[0].s.p] = '\0';
|
base[rs[0].e.ep-rs[0].s.sp] = '\0';
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<$SYS9/$systype/$objtype/mkfile
|
<$PLAN9/src/mkhdr
|
||||||
|
|
||||||
TARG=htmlfmt
|
TARG=htmlfmt
|
||||||
OFILES=\
|
OFILES=\
|
||||||
|
@ -8,23 +8,9 @@ OFILES=\
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
dat.h\
|
dat.h\
|
||||||
$SYS9/sys/include/html.h\
|
$PLAN9/include/html.h\
|
||||||
|
|
||||||
LIB=$SYS9/$systype/$objtype/lib/libbio.a\
|
SHORTLIB=bio regexp9 html 9
|
||||||
$SYS9/$systype/$objtype/lib/libregexp.a\
|
|
||||||
$SYS9/$systype/$objtype/lib/libhtml.a\
|
|
||||||
$SYS9/$systype/$objtype/lib/lib9c.a
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
|
@ -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 Token* _gettoks(uchar* data, int datalen, int chset, int mtype, int* plen);
|
||||||
extern int _tokaval(Token* t, int attid, Rune** pans, int xfer);
|
extern int _tokaval(Token* t, int attid, Rune** pans, int xfer);
|
||||||
|
|
||||||
#pragma varargck type "T" Token*
|
/* #pragma varargck type "T" Token* */
|
||||||
|
|
||||||
#include "runetab.h"
|
#include "runetab.h"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<$SYS9/$systype/$objtype/mkfile
|
<$PLAN9/src/mkhdr
|
||||||
|
|
||||||
LIB=$LIB9/libhtml.a
|
LIB=libhtml.a
|
||||||
|
|
||||||
OFILES=\
|
OFILES=\
|
||||||
build.$O\
|
build.$O\
|
||||||
|
@ -10,13 +10,7 @@ OFILES=\
|
||||||
runetab.$O\
|
runetab.$O\
|
||||||
|
|
||||||
HFILES=\
|
HFILES=\
|
||||||
$SYS9/sys/include/html.h\
|
$PLAN9/include/html.h\
|
||||||
impl.h\
|
impl.h\
|
||||||
|
|
||||||
UPDATE=\
|
<$PLAN9/src/mksyslib
|
||||||
mkfile\
|
|
||||||
$HFILES\
|
|
||||||
${OFILES:%.$O=%.c}\
|
|
||||||
${LIB:$SYS9/$systype/$objtype/%=$SYS9/$systype/386/%}\
|
|
||||||
|
|
||||||
<$SYS9/sys/src/cmd/mksyslib
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <u.h>
|
#include <u.h>
|
||||||
|
#include <limits.h>
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include <draw.h>
|
#include <draw.h>
|
||||||
#include <html.h>
|
#include <html.h>
|
||||||
|
|
Loading…
Reference in a new issue