diff options
author | 2010-05-13 20:34:29 +0000 | |
---|---|---|
committer | 2010-05-13 20:34:29 +0000 | |
commit | 76e1f6750b14c432f7a1ddea7ef59980ea7155e7 (patch) | |
tree | 612c6b74c5d122b8ef556eaff8e137daacc739c0 /usr.bin/mandoc/mdoc_validate.c | |
parent | Synchronise amd64 more with other PMAP_DIRECT architectures. (step 1, (diff) | |
download | wireguard-openbsd-76e1f6750b14c432f7a1ddea7ef59980ea7155e7.tar.xz wireguard-openbsd-76e1f6750b14c432f7a1ddea7ef59980ea7155e7.zip |
Remove the command line option -fno-ign-chars.
This option was not useful, you never want mandoc to die
just because there is an invalid character in the input file,
neither in production nor when linting: a warning is sufficient.
This was particularly annoying because it was part of -fstrict
and could not be switched off.
"less is more" kristaps@
Diffstat (limited to 'usr.bin/mandoc/mdoc_validate.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index 1d6a9934a04..308a52b2adb 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.48 2010/04/07 23:15:05 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.49 2010/05/13 20:34:29 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -56,7 +56,6 @@ static int err_child_gt(struct mdoc *, const char *, int); static int warn_child_gt(struct mdoc *, const char *, int); static int err_child_eq(struct mdoc *, const char *, int); static int warn_child_eq(struct mdoc *, const char *, int); -static int warn_print(struct mdoc *, int, int); static int warn_count(struct mdoc *, const char *, int, const char *, int); static int err_count(struct mdoc *, const char *, @@ -322,16 +321,6 @@ mdoc_valid_post(struct mdoc *mdoc) } -static int -warn_print(struct mdoc *m, int ln, int pos) -{ - - if (MDOC_IGN_CHARS & m->pflags) - return(mdoc_pwarn(m, ln, pos, EPRINT)); - return(mdoc_perr(m, ln, pos, EPRINT)); -} - - static inline int warn_count(struct mdoc *m, const char *k, int want, const char *v, int has) @@ -517,10 +506,10 @@ check_text(struct mdoc *mdoc, int line, int pos, const char *p) for ( ; *p; p++, pos++) { if ('\t' == *p) { if ( ! (MDOC_LITERAL & mdoc->flags)) - if ( ! warn_print(mdoc, line, pos)) + if ( ! mdoc_pwarn(mdoc, line, pos, EPRINT)) return(0); } else if ( ! isprint((u_char)*p)) - if ( ! warn_print(mdoc, line, pos)) + if ( ! mdoc_pwarn(mdoc, line, pos, EPRINT)) return(0); if ('\\' != *p) |