From ea6ed8eb4a9349ba679125913c5a03c1027783b2 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 31 Mar 2010 07:13:53 +0000 Subject: Macro types enum-ated (enum mdoct) (for easier debugging in gdb of "tok" values). Initial check-in of Ingo Schwarze's patch for Xo/Xc handling (in blocks ifdef'd "UGLY"). Put Oc-close-Op parts into UGLY ifdef blocks. --- libmdoc.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'libmdoc.h') diff --git a/libmdoc.h b/libmdoc.h index 9c5dace5..229d660d 100644 --- a/libmdoc.h +++ b/libmdoc.h @@ -1,4 +1,4 @@ -/* $Id: libmdoc.h,v 1.30 2009/10/30 05:58:37 kristaps Exp $ */ +/* $Id: libmdoc.h,v 1.31 2010/03/31 07:13:53 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -96,8 +96,8 @@ enum merr { MERRMAX }; -#define MACRO_PROT_ARGS struct mdoc *m, int tok, int line, \ - int ppos, int *pos, char *buf +#define MACRO_PROT_ARGS struct mdoc *m, enum mdoct tok, \ + int line, int ppos, int *pos, char *buf struct mdoc_macro { int (*fp)(MACRO_PROT_ARGS); @@ -131,16 +131,16 @@ int mdoc_macro(MACRO_PROT_ARGS); int mdoc_word_alloc(struct mdoc *, int, int, const char *); int mdoc_elem_alloc(struct mdoc *, int, int, - int, struct mdoc_arg *); + enum mdoct, struct mdoc_arg *); int mdoc_block_alloc(struct mdoc *, int, int, - int, struct mdoc_arg *); -int mdoc_head_alloc(struct mdoc *, int, int, int); -int mdoc_tail_alloc(struct mdoc *, int, int, int); -int mdoc_body_alloc(struct mdoc *, int, int, int); + enum mdoct, struct mdoc_arg *); +int mdoc_head_alloc(struct mdoc *, int, int, enum mdoct); +int mdoc_tail_alloc(struct mdoc *, int, int, enum mdoct); +int mdoc_body_alloc(struct mdoc *, int, int, enum mdoct); void mdoc_node_free(struct mdoc_node *); void mdoc_node_freelist(struct mdoc_node *); void mdoc_hash_init(void); -int mdoc_hash_find(const char *); +enum mdoct mdoc_hash_find(const char *); int mdoc_iscdelim(char); int mdoc_isdelim(const char *); size_t mdoc_isescape(const char *); @@ -160,7 +160,7 @@ 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, int, +int mdoc_argv(struct mdoc *, int, enum mdoct, struct mdoc_arg **, int *, char *); #define ARGV_ERROR (-1) #define ARGV_EOLN (0) @@ -168,7 +168,7 @@ int mdoc_argv(struct mdoc *, int, int, #define ARGV_WORD (2) void mdoc_argv_free(struct mdoc_arg *); int mdoc_args(struct mdoc *, int, - int *, char *, int, char **); + int *, char *, enum mdoct, char **); int mdoc_zargs(struct mdoc *, int, int *, char *, int, char **); #define ARGS_DELIM (1 << 1) /* See args(). */ -- cgit v1.2.3-56-ge451