From 857b9aac8422fa0bebd1d83b87c8fbf4d7a1f044 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 28 Nov 2014 23:21:32 +0000 Subject: Fold the loop around mdoc_argv() into the function itself, it was the same in all four cases. As a bonus, get rid of one enum type that was used for internal communication. No functional change, minus 40 lines of code. --- libmdoc.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'libmdoc.h') diff --git a/libmdoc.h b/libmdoc.h index d4aded37..c65ee055 100644 --- a/libmdoc.h +++ b/libmdoc.h @@ -77,13 +77,6 @@ enum margserr { ARGS_PEND /* last phrase (-column) */ }; -enum margverr { - ARGV_ERROR, - ARGV_EOLN, /* end of line */ - ARGV_ARG, /* valid argument */ - ARGV_WORD /* normal word (or bad argument---same thing) */ -}; - /* * A punctuation delimiter is opening, closing, or "middle mark" * punctuation. These govern spacing. @@ -127,7 +120,7 @@ const char *mdoc_a2st(const char *); const char *mdoc_a2arch(const char *); void mdoc_valid_pre(struct mdoc *, struct mdoc_node *); void mdoc_valid_post(struct mdoc *); -enum margverr mdoc_argv(struct mdoc *, int, enum mdoct, +void mdoc_argv(struct mdoc *, int, enum mdoct, struct mdoc_arg **, int *, char *); void mdoc_argv_free(struct mdoc_arg *); enum margserr mdoc_args(struct mdoc *, int, -- cgit