diff options
-rw-r--r-- | chars.c | 4 | ||||
-rw-r--r-- | html.c | 2 | ||||
-rw-r--r-- | man_term.c | 2 | ||||
-rw-r--r-- | mandoc.h | 7 | ||||
-rw-r--r-- | mdoc_term.c | 2 |
5 files changed, 5 insertions, 12 deletions
@@ -55,7 +55,6 @@ struct ln { #include "chars.in" struct mchars { - enum mcharst type; struct ln **htab; }; @@ -72,7 +71,7 @@ mchars_free(struct mchars *arg) } struct mchars * -mchars_init(enum mcharst type) +mchars_init(void) { struct mchars *tab; struct ln **htab; @@ -103,7 +102,6 @@ mchars_init(enum mcharst type) } tab->htab = htab; - tab->type = type; return(tab); } @@ -122,7 +122,7 @@ ml_alloc(char *outopts, enum htmltype type) h->type = type; h->tags.head = NULL; - h->symtab = mchars_init(MCHARS_HTML); + h->symtab = mchars_init(); while (outopts && *outopts) switch (getsubopt(&outopts, UNCONST(toks), &v)) { @@ -158,7 +158,7 @@ terminal_man(void *arg, const struct man *man) if (NULL == p->symtab) switch (p->enc) { case (TERMENC_ASCII): - p->symtab = mchars_init(MCHARS_ASCII); + p->symtab = mchars_init(); break; default: abort(); @@ -302,11 +302,6 @@ enum mandoc_esc { ESCAPE_NOSPACE /* suppress space if the last on a line */ }; -enum mcharst { - MCHARS_ASCII, /* 7-bit ascii representation */ - MCHARS_HTML /* unicode values */ -}; - typedef void (*mandocmsg)(enum mandocerr, enum mandoclevel, const char *, int, int, const char *); @@ -332,7 +327,7 @@ void *mandoc_realloc(void *, size_t); enum mandoc_esc mandoc_escape(const char **, const char **, int *); -struct mchars *mchars_init(enum mcharst); +struct mchars *mchars_init(void); const char *mchars_num2char(const char *, size_t); const char *mchars_spec2str(struct mchars *, const char *, size_t, size_t *); int mchars_spec2cp(struct mchars *, const char *, size_t); diff --git a/mdoc_term.c b/mdoc_term.c index 2aed2fed..6cdfa344 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -266,7 +266,7 @@ terminal_mdoc(void *arg, const struct mdoc *mdoc) if (NULL == p->symtab) switch (p->enc) { case (TERMENC_ASCII): - p->symtab = mchars_init(MCHARS_ASCII); + p->symtab = mchars_init(); break; default: abort(); |