diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-06-17 23:18:07 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-06-17 23:18:07 +0000 |
commit | f77203dd262928a9f940dd0cc57af4809a3b7641 (patch) | |
tree | b6fe8083590d7f1339dad4b5fb73c15961878d95 /usr.bin | |
parent | 22f4c8c5f3b513cb65b895fa83177d2d55e425d5 (diff) |
sync to 1.7.16: rename static function printwarn to warn_print
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index d8a33bd2de6..50fff14868d 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.2 2009/06/14 23:00:57 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.3 2009/06/17 23:18:06 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -77,7 +77,6 @@ struct valids { static int pwarn(struct mdoc *, int, int, enum mwarn); static int perr(struct mdoc *, int, int, enum merr); -static int printwarn(struct mdoc *, int, int); static int check_parent(PRE_ARGS, int, enum mdoc_type); static int check_msec(PRE_ARGS, ...); static int check_sec(PRE_ARGS, ...); @@ -95,6 +94,7 @@ 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 count_child(struct mdoc *); +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 *, @@ -495,6 +495,14 @@ pwarn(struct mdoc *m, int line, int pos, enum mwarn type) } +static int +warn_print(struct mdoc *m, int ln, int pos) +{ + if (MDOC_IGN_CHARS & m->pflags) + return(pwarn(m, ln, pos, WPRINT)); + return(perr(m, ln, pos, EPRINT)); +} + static inline int warn_count(struct mdoc *m, const char *k, @@ -688,15 +696,6 @@ check_argv(struct mdoc *m, const struct mdoc_node *n, static int -printwarn(struct mdoc *m, int ln, int pos) -{ - if (MDOC_IGN_CHARS & m->pflags) - return(pwarn(m, ln, pos, WPRINT)); - return(perr(m, ln, pos, EPRINT)); -} - - -static int check_text(struct mdoc *mdoc, int line, int pos, const char *p) { size_t c; @@ -706,10 +705,10 @@ check_text(struct mdoc *mdoc, int line, int pos, const char *p) for ( ; *p; p++) { if ('\t' == *p) { if ( ! (MDOC_LITERAL & mdoc->flags)) - if ( ! printwarn(mdoc, line, pos)) + if ( ! warn_print(mdoc, line, pos)) return(0); } else if ( ! isprint((u_char)*p)) - if ( ! printwarn(mdoc, line, pos)) + if ( ! warn_print(mdoc, line, pos)) return(0); if ('\\' != *p) |