From 33c39adb2b4cab7469a2d975f4437c5ea1906a51 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 19 Apr 2011 16:38:48 +0000 Subject: Clean up parsing of delimiters in -mdoc. First, remove the "dowarn" variable from mandoc_getarg() so that it prints the warning every time. Then, remove the warning from args_checkpunct(). This way, warnings are being posted at the correct time. This makes the flag argument to mdoc_zargs() superfluous, so make it be zero when it's invoked. Finally, move the args() flags into mdoc_argv.c and make them enums. --- mdoc_macro.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mdoc_macro.c') diff --git a/mdoc_macro.c b/mdoc_macro.c index b334b4e4..7155cf2c 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.106 2011/03/22 14:33:05 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.107 2011/04/19 16:38:48 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -618,7 +618,7 @@ append_delims(struct mdoc *m, int line, int *pos, char *buf) for (;;) { la = *pos; - ac = mdoc_zargs(m, line, pos, buf, ARGS_NOWARN, &p); + ac = mdoc_zargs(m, line, pos, buf, &p); if (ARGS_ERROR == ac) return(0); @@ -1717,7 +1717,7 @@ phrase(struct mdoc *m, int line, int ppos, char *buf) for (pos = ppos; ; ) { la = pos; - ac = mdoc_zargs(m, line, &pos, buf, 0, &p); + ac = mdoc_zargs(m, line, &pos, buf, &p); if (ARGS_ERROR == ac) return(0); @@ -1762,7 +1762,7 @@ phrase_ta(MACRO_PROT_ARGS) for (;;) { la = *pos; - ac = mdoc_zargs(m, line, pos, buf, 0, &p); + ac = mdoc_zargs(m, line, pos, buf, &p); if (ARGS_ERROR == ac) return(0); -- cgit v1.2.3-56-ge451