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. --- libmdoc.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'libmdoc.h') diff --git a/libmdoc.h b/libmdoc.h index 911cbc3e..0e4b125f 100644 --- a/libmdoc.h +++ b/libmdoc.h @@ -1,4 +1,4 @@ -/* $Id: libmdoc.h,v 1.73 2011/04/17 09:08:19 kristaps Exp $ */ +/* $Id: libmdoc.h,v 1.74 2011/04/19 16:38:48 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -133,14 +133,8 @@ void mdoc_argv_free(struct mdoc_arg *); enum margserr mdoc_args(struct mdoc *, int, int *, char *, enum mdoct, char **); enum margserr mdoc_zargs(struct mdoc *, int, - int *, char *, int, char **); -#define ARGS_DELIM (1 << 1) -#define ARGS_TABSEP (1 << 2) -#define ARGS_NOWARN (1 << 3) - + int *, char *, char **); int mdoc_macroend(struct mdoc *); - -#define DELIMSZ 6 /* hint: max possible size of a delimiter */ enum mdelim mdoc_isdelim(const char *); __END_DECLS -- cgit v1.2.3-56-ge451