=================================================================== RCS file: /cvs/mandoc/term.h,v retrieving revision 1.44 retrieving revision 1.50 diff -u -p -r1.44 -r1.50 --- mandoc/term.h 2009/08/10 10:09:51 1.44 +++ mandoc/term.h 2009/11/05 08:40:16 1.50 @@ -1,4 +1,4 @@ -/* $Id: term.h,v 1.44 2009/08/10 10:09:51 kristaps Exp $ */ +/* $Id: term.h,v 1.50 2009/11/05 08:40:16 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -20,9 +20,7 @@ __BEGIN_DECLS enum termenc { - TERMENC_ASCII, - TERMENC_LATIN1, /* Not implemented. */ - TERMENC_UTF8 /* Not implemented. */ + TERMENC_ASCII }; struct termp { @@ -32,9 +30,6 @@ struct termp { size_t offset; /* Margin offest. */ size_t col; /* Bytes in buf. */ int flags; -#define TERMP_STYLE 0x3 /* Style mask. */ -#define TERMP_BOLD (1 << 0) /* Styles... */ -#define TERMP_UNDER (1 << 1) #define TERMP_NOSPACE (1 << 2) /* No space before words. */ #define TERMP_NOLPAD (1 << 3) /* See term_flushln(). */ #define TERMP_NOBREAK (1 << 4) /* See term_flushln(). */ @@ -46,20 +41,24 @@ struct termp { #define TERMP_NOSPLIT (1 << 11) /* See termp_an_pre/post(). */ #define TERMP_SPLIT (1 << 12) /* See termp_an_pre/post(). */ #define TERMP_ANPREC (1 << 13) /* See termp_an_pre(). */ + int bold; + int under; + int metafont; /* See do_escaped(). */ +#define METAF_BOLD (1 << 0) +#define METAF_UNDER (1 << 1) + int metamask; /* See do_escaped(). */ char *buf; /* Output buffer. */ enum termenc enc; /* Type of encoding. */ void *symtab; /* Encoded-symbol table. */ }; -void *term_ascii2htab(void); -const char *term_a2ascii(void *, const char *, size_t, size_t *); -const char *term_a2res(void *, const char *, size_t, size_t *); -void term_asciifree(void *); - void term_newln(struct termp *); void term_vspace(struct termp *); void term_word(struct termp *, const char *); void term_flushln(struct termp *); + +size_t term_hspan(const struct roffsu *); +size_t term_vspan(const struct roffsu *); __END_DECLS