version 1.7, 2019/07/10 19:39:01 |
version 1.17, 2022/04/24 13:38:46 |
|
|
/* $Id$ */ |
/* $OpenBSD$ */ |
/* |
/* |
|
* Copyright (c) 2014-2022 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2014-2019 Ingo Schwarze <schwarze@openbsd.org> |
|
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
* |
|
* Implementation of warning and error messages for mandoc(1). |
*/ |
*/ |
#include "config.h" |
#include "config.h" |
|
|
Line 53 static const char *const type_message[MANDOCERR_MAX] = |
|
Line 55 static const char *const type_message[MANDOCERR_MAX] = |
|
"unknown architecture", |
"unknown architecture", |
"operating system explicitly specified", |
"operating system explicitly specified", |
"RCS id missing", |
"RCS id missing", |
"referenced manual not found", |
|
|
|
"generic style suggestion", |
"generic style suggestion", |
|
|
Line 67 static const char *const type_message[MANDOCERR_MAX] = |
|
Line 68 static const char *const type_message[MANDOCERR_MAX] = |
|
"consider using OS macro", |
"consider using OS macro", |
"errnos out of order", |
"errnos out of order", |
"duplicate errno", |
"duplicate errno", |
|
"referenced manual not found", |
"trailing delimiter", |
"trailing delimiter", |
"no blank before trailing delimiter", |
"no blank before trailing delimiter", |
"fill mode already enabled, skipping", |
"fill mode already enabled, skipping", |
"fill mode already disabled, skipping", |
"fill mode already disabled, skipping", |
|
"input text line longer than 80 bytes", |
"verbatim \"--\", maybe consider using \\(em", |
"verbatim \"--\", maybe consider using \\(em", |
"function name without markup", |
"function name without markup", |
"whitespace at end of input line", |
"whitespace at end of input line", |
Line 83 static const char *const type_message[MANDOCERR_MAX] = |
|
Line 86 static const char *const type_message[MANDOCERR_MAX] = |
|
"missing manual title, using \"\"", |
"missing manual title, using \"\"", |
"missing manual section, using \"\"", |
"missing manual section, using \"\"", |
"unknown manual section", |
"unknown manual section", |
"missing date, using today's date", |
"filename/section mismatch", |
|
"missing date, using \"\"", |
"cannot parse date, using it verbatim", |
"cannot parse date, using it verbatim", |
"date in the future, using it anyway", |
"date in the future, using it anyway", |
"missing Os macro, using \"\"", |
"missing Os macro, using \"\"", |
Line 187 static const char *const type_message[MANDOCERR_MAX] = |
|
Line 191 static const char *const type_message[MANDOCERR_MAX] = |
|
"empty tbl layout", |
"empty tbl layout", |
"invalid character in tbl layout", |
"invalid character in tbl layout", |
"unmatched parenthesis in tbl layout", |
"unmatched parenthesis in tbl layout", |
|
"ignoring excessive spacing in tbl layout", |
"tbl without any data cells", |
"tbl without any data cells", |
"ignoring data in spanned tbl cell", |
"ignoring data in spanned tbl cell", |
"ignoring extra tbl data cells", |
"ignoring extra tbl data cells", |
Line 211 static const char *const type_message[MANDOCERR_MAX] = |
|
Line 216 static const char *const type_message[MANDOCERR_MAX] = |
|
"escaped character not allowed in a name", |
"escaped character not allowed in a name", |
"using macro argument outside macro", |
"using macro argument outside macro", |
"argument number is not numeric", |
"argument number is not numeric", |
|
"negative argument, using 0", |
"NOT IMPLEMENTED: Bd -file", |
"NOT IMPLEMENTED: Bd -file", |
"skipping display without arguments", |
"skipping display without arguments", |
"missing list type, using -item", |
"missing list type, using -item", |
Line 223 static const char *const type_message[MANDOCERR_MAX] = |
|
Line 229 static const char *const type_message[MANDOCERR_MAX] = |
|
"excessive shift", |
"excessive shift", |
"NOT IMPLEMENTED: .so with absolute path or \"..\"", |
"NOT IMPLEMENTED: .so with absolute path or \"..\"", |
".so request failed", |
".so request failed", |
|
"skipping tag containing whitespace", |
"skipping all arguments", |
"skipping all arguments", |
"skipping excess arguments", |
"skipping excess arguments", |
"divide by zero", |
"divide by zero", |
Line 239 static const char *const type_message[MANDOCERR_MAX] = |
|
Line 246 static const char *const type_message[MANDOCERR_MAX] = |
|
"eqn delim option in tbl", |
"eqn delim option in tbl", |
"unsupported tbl layout modifier", |
"unsupported tbl layout modifier", |
"ignoring macro in table", |
"ignoring macro in table", |
|
"skipping tbl in -Tman mode", |
|
"skipping eqn in -Tman mode", |
|
|
/* bad command line arguments */ |
/* bad command line arguments */ |
NULL, |
NULL, |
Line 249 static const char *const type_message[MANDOCERR_MAX] = |
|
Line 258 static const char *const type_message[MANDOCERR_MAX] = |
|
"bad option value", |
"bad option value", |
"duplicate option value", |
"duplicate option value", |
"no such tag", |
"no such tag", |
|
"-Tmarkdown unsupported for man(7) input", |
|
|
/* system errors */ |
/* system errors */ |
NULL, |
NULL, |
Line 354 mandoc_msg(enum mandocerr t, int line, int col, const |
|
Line 364 mandoc_msg(enum mandocerr t, int line, int col, const |
|
va_end(ap); |
va_end(ap); |
} |
} |
fputc('\n', fileptr); |
fputc('\n', fileptr); |
|
} |
|
|
|
void |
|
mandoc_msg_summary(void) |
|
{ |
|
if (fileptr != NULL && rc != MANDOCLEVEL_OK) |
|
fprintf(fileptr, |
|
"%s: see above the output for %s messages\n", |
|
getprogname(), level_name[rc]); |
} |
} |