summaryrefslogtreecommitdiffstats
path: root/libmdoc.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-07 05:54:09 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-07 05:54:09 +0000
commitaffb60f9d063ad854386b239fbe7688abd4cdeac (patch)
tree6787d7d3eff3b1e51d83ef8d9de8317ad3c6a7e6 /libmdoc.h
parent820ec2c8803594c2404d9f5cd0d1d07f90621538 (diff)
downloadmandoc-affb60f9d063ad854386b239fbe7688abd4cdeac.tar.gz
enum-ised mdoc_argv() return (better return-value safety).
Diffstat (limited to 'libmdoc.h')
-rw-r--r--libmdoc.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/libmdoc.h b/libmdoc.h
index 2211c9fd..ede159f6 100644
--- a/libmdoc.h
+++ b/libmdoc.h
@@ -120,6 +120,13 @@ enum margserr {
ARGS_PHRASE
};
+enum margverr {
+ ARGV_ERROR,
+ ARGV_EOLN,
+ ARGV_ARG,
+ ARGV_WORD
+};
+
extern const struct mdoc_macro *const mdoc_macros;
__BEGIN_DECLS
@@ -169,12 +176,8 @@ int mdoc_valid_post(struct mdoc *);
int mdoc_action_pre(struct mdoc *,
const struct mdoc_node *);
int mdoc_action_post(struct mdoc *);
-int mdoc_argv(struct mdoc *, int, enum mdoct,
+enum margverr mdoc_argv(struct mdoc *, int, enum mdoct,
struct mdoc_arg **, int *, char *);
-#define ARGV_ERROR (-1)
-#define ARGV_EOLN (0)
-#define ARGV_ARG (1)
-#define ARGV_WORD (2)
void mdoc_argv_free(struct mdoc_arg *);
void mdoc_argn_free(struct mdoc_arg *, int);
enum margserr mdoc_args(struct mdoc *, int,