X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/56cfcaa84d0b04041aeeec950bddb179297ebd2d..b60f8021eeb3855308829414f20eca4897096fa7:/tbl_opts.c diff --git a/tbl_opts.c b/tbl_opts.c index 8500b74d..b8e0ea2e 100644 --- a/tbl_opts.c +++ b/tbl_opts.c @@ -1,4 +1,4 @@ -/* $Id: tbl_opts.c,v 1.5 2011/01/02 10:10:57 kristaps Exp $ */ +/* $Id: tbl_opts.c,v 1.8 2011/01/09 05:38:23 joerg Exp $ */ /* * Copyright (c) 2009, 2010 Kristaps Dzonsons * @@ -72,12 +72,12 @@ static const struct tbl_phrase keys[KEY_MAXKEYS] = { }; static int arg(struct tbl_node *, int, - const char *, int *, int); + const char *, int *, enum tbl_ident); static void opt(struct tbl_node *, int, const char *, int *); static int -arg(struct tbl_node *tbl, int ln, const char *p, int *pos, int key) +arg(struct tbl_node *tbl, int ln, const char *p, int *pos, enum tbl_ident key) { int i; char buf[KEY_MAXNUMSZ]; @@ -102,12 +102,12 @@ arg(struct tbl_node *tbl, int ln, const char *p, int *pos, int key) switch (key) { case (KEY_DELIM): - if ('\0' == (tbl->opts.delims[0] = p[(*pos)++])) { + if ('\0' == p[(*pos)++]) { TBL_MSG(tbl, MANDOCERR_TBL, ln, *pos - 1); return(0); } - if ('\0' == (tbl->opts.delims[1] = p[(*pos)++])) { + if ('\0' == p[(*pos)++]) { TBL_MSG(tbl, MANDOCERR_TBL, ln, *pos - 1); return(0); } @@ -188,7 +188,7 @@ again: /* /* Copy up to first non-alpha character. */ for (sv = *pos, i = 0; i < KEY_MAXNAME; i++, (*pos)++) { - buf[i] = tolower(p[*pos]); + buf[i] = tolower((unsigned char)p[*pos]); if ( ! isalpha((unsigned char)buf[i])) break; }