diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-23 12:40:04 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-03-23 12:40:04 +0000 |
commit | 589f74a138ab93e81b858ebb9a8218a19d5a2017 (patch) | |
tree | d308e82980fe305f185c5df31a534d64c0501595 /libman.h | |
parent | 74625e09d203b8b3c31182a00609d7b437f942c7 (diff) | |
download | mandoc-589f74a138ab93e81b858ebb9a8218a19d5a2017.tar.gz mandoc-589f74a138ab93e81b858ebb9a8218a19d5a2017.tar.zst mandoc-589f74a138ab93e81b858ebb9a8218a19d5a2017.zip |
First, make -man ARGS_EOLN et al. be an enum. Second, remove
ARGS_ERROR, as it is never returned by man_args(). Then clean up
invocations of man_args() to only check for ARGS_EOLN.
Diffstat (limited to 'libman.h')
-rw-r--r-- | libman.h | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $Id: libman.h,v 1.49 2011/03/23 12:33:01 kristaps Exp $ */ +/* $Id: libman.h,v 1.50 2011/03/23 12:40:04 kristaps Exp $ */ /* * Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -56,6 +56,12 @@ struct man_macro { #define MAN_NOCLOSE (1 << 4) /* See blk_exp(). */ }; +enum margserr { + ARGS_EOLN, + ARGS_WORD, + ARGS_QWORD +}; + extern const struct man_macro *const man_macros; __BEGIN_DECLS @@ -72,13 +78,9 @@ int man_body_alloc(struct man *, int, int, enum mant); int man_elem_alloc(struct man *, int, int, enum mant); void man_node_delete(struct man *, struct man_node *); void man_hash_init(void); -enum mant man_hash_find(const char *); +enum mant man_hash_find(const char *); int man_macroend(struct man *); -int man_args(struct man *, int, int *, char *, char **); -#define ARGS_ERROR (-1) -#define ARGS_EOLN (0) -#define ARGS_WORD (1) -#define ARGS_QWORD (1) +enum margserr man_args(struct man *, int, int *, char *, char **); int man_valid_post(struct man *); int man_valid_pre(struct man *, struct man_node *); int man_unscope(struct man *, |