version 1.103, 2010/08/20 01:02:07 |
version 1.109, 2010/11/29 15:45:15 |
Line 125 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 125 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"out of order prologue", |
"out of order prologue", |
"repeated prologue entry", |
"repeated prologue entry", |
"list type must come first", |
"list type must come first", |
"bad standard", |
|
"bad library", |
|
"tab in non-literal context", |
"tab in non-literal context", |
"bad escape sequence", |
"bad escape sequence", |
"unterminated quoted string", |
"unterminated quoted string", |
"argument requires the width argument", |
"argument requires the width argument", |
"superfluous width argument", |
"superfluous width argument", |
"ignoring argument", |
|
"bad date argument", |
"bad date argument", |
"bad width argument", |
"bad width argument", |
"unknown manual section", |
"unknown manual section", |
"section not in conventional manual section", |
"section not in conventional manual section", |
"end of line whitespace", |
"end of line whitespace", |
"blocks badly nested", |
"blocks badly nested", |
"scope open on exit", |
|
|
|
"generic error", |
"generic error", |
|
|
Line 147 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 143 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"bad Boolean value", |
"bad Boolean value", |
"child violates parent syntax", |
"child violates parent syntax", |
"bad AT&T symbol", |
"bad AT&T symbol", |
|
"bad standard", |
"list type repeated", |
"list type repeated", |
"display type repeated", |
"display type repeated", |
"argument repeated", |
"argument repeated", |
|
"ignoring argument", |
"manual name not yet set", |
"manual name not yet set", |
"obsolete macro ignored", |
"obsolete macro ignored", |
"empty macro ignored", |
"empty macro ignored", |
Line 165 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 163 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"argument count wrong", |
"argument count wrong", |
"request scope close w/none open", |
"request scope close w/none open", |
"scope already open", |
"scope already open", |
|
"scope open on exit", |
"macro requires line argument(s)", |
"macro requires line argument(s)", |
"macro requires body argument(s)", |
"macro requires body argument(s)", |
"macro requires argument(s)", |
"macro requires argument(s)", |
Line 174 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 173 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"missing font type", |
"missing font type", |
"line argument(s) will be lost", |
"line argument(s) will be lost", |
"body argument(s) will be lost", |
"body argument(s) will be lost", |
|
"paragraph macro ignored", |
|
|
"generic fatal error", |
"generic fatal error", |
|
|
Line 182 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 182 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"unsupported display type", |
"unsupported display type", |
"blocks badly nested", |
"blocks badly nested", |
"no such block is open", |
"no such block is open", |
"scope broken, syntax violated", |
|
"line scope broken, syntax violated", |
"line scope broken, syntax violated", |
"argument count wrong, violates syntax", |
"argument count wrong, violates syntax", |
"child violates parent syntax", |
"child violates parent syntax", |
Line 231 main(int argc, char *argv[]) |
|
Line 230 main(int argc, char *argv[]) |
|
switch (c) { |
switch (c) { |
case ('m'): |
case ('m'): |
if ( ! moptions(&curp.inttype, optarg)) |
if ( ! moptions(&curp.inttype, optarg)) |
return(MANDOCLEVEL_BADARG); |
return((int)MANDOCLEVEL_BADARG); |
break; |
break; |
case ('O'): |
case ('O'): |
(void)strlcat(curp.outopts, optarg, BUFSIZ); |
(void)strlcat(curp.outopts, optarg, BUFSIZ); |
Line 239 main(int argc, char *argv[]) |
|
Line 238 main(int argc, char *argv[]) |
|
break; |
break; |
case ('T'): |
case ('T'): |
if ( ! toptions(&curp, optarg)) |
if ( ! toptions(&curp, optarg)) |
return(MANDOCLEVEL_BADARG); |
return((int)MANDOCLEVEL_BADARG); |
break; |
break; |
case ('W'): |
case ('W'): |
if ( ! woptions(&curp, optarg)) |
if ( ! woptions(&curp, optarg)) |
return(MANDOCLEVEL_BADARG); |
return((int)MANDOCLEVEL_BADARG); |
break; |
break; |
case ('V'): |
case ('V'): |
version(); |
version(); |
Line 279 main(int argc, char *argv[]) |
|
Line 278 main(int argc, char *argv[]) |
|
if (curp.roff) |
if (curp.roff) |
roff_free(curp.roff); |
roff_free(curp.roff); |
|
|
return(exit_status); |
return((int)exit_status); |
} |
} |
|
|
|
|
|
|
{ |
{ |
|
|
(void)printf("%s %s\n", progname, VERSION); |
(void)printf("%s %s\n", progname, VERSION); |
exit(MANDOCLEVEL_OK); |
exit((int)MANDOCLEVEL_OK); |
} |
} |
|
|
|
|
|
|
(void)fprintf(stderr, "usage: %s [-V] [-foption] " |
(void)fprintf(stderr, "usage: %s [-V] [-foption] " |
"[-mformat] [-Ooption] [-Toutput] " |
"[-mformat] [-Ooption] [-Toutput] " |
"[-Werr] [file...]\n", progname); |
"[-Werr] [file...]\n", progname); |
exit(MANDOCLEVEL_BADARG); |
exit((int)MANDOCLEVEL_BADARG); |
} |
} |
|
|
|
|
Line 329 resize_buf(struct buf *buf, size_t initial) |
|
Line 328 resize_buf(struct buf *buf, size_t initial) |
|
buf->buf = realloc(buf->buf, buf->sz); |
buf->buf = realloc(buf->buf, buf->sz); |
if (NULL == buf->buf) { |
if (NULL == buf->buf) { |
perror(NULL); |
perror(NULL); |
exit(MANDOCLEVEL_SYSERR); |
exit((int)MANDOCLEVEL_SYSERR); |
} |
} |
} |
} |
|
|
Line 551 fdesc(struct curparse *curp) |
|
Line 550 fdesc(struct curparse *curp) |
|
} |
} |
} |
} |
|
|
/* |
|
* With -Wstop and warnings or errors of at least |
|
* the requested level, do not produce output. |
|
*/ |
|
|
|
if (MANDOCLEVEL_OK != exit_status && curp->wstop) |
|
goto cleanup; |
|
|
|
/* NOTE a parser may not have been assigned, yet. */ |
/* NOTE a parser may not have been assigned, yet. */ |
|
|
if ( ! (man || mdoc)) { |
if ( ! (man || mdoc)) { |
Line 582 fdesc(struct curparse *curp) |
|
Line 573 fdesc(struct curparse *curp) |
|
goto cleanup; |
goto cleanup; |
} |
} |
|
|
|
/* |
|
* With -Wstop and warnings or errors of at least |
|
* the requested level, do not produce output. |
|
*/ |
|
|
|
if (MANDOCLEVEL_OK != exit_status && curp->wstop) |
|
goto cleanup; |
|
|
/* If unset, allocate output dev now (if applicable). */ |
/* If unset, allocate output dev now (if applicable). */ |
|
|
if ( ! (curp->outman && curp->outmdoc)) { |
if ( ! (curp->outman && curp->outmdoc)) { |
Line 809 mmsg(enum mandocerr t, void *arg, int ln, int col, con |
|
Line 808 mmsg(enum mandocerr t, void *arg, int ln, int col, con |
|
|
|
level = MANDOCLEVEL_FATAL; |
level = MANDOCLEVEL_FATAL; |
while (t < mandoclimits[level]) |
while (t < mandoclimits[level]) |
|
/* LINTED */ |
level--; |
level--; |
|
|
cp = (struct curparse *)arg; |
cp = (struct curparse *)arg; |