summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-04-05 08:45:29 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-04-05 08:45:29 +0000
commit18c5ee1fd1578e342a34f2beeaf097da8ad27692 (patch)
treefc8771ea0a74eed2c29373445e9e485da04eda46
parent83d9fab3ce10c88cc271f34468876c3cb765a6ed (diff)
downloadmandoc-18c5ee1fd1578e342a34f2beeaf097da8ad27692.tar.gz
Enum-ised REWIND return values.
-rw-r--r--mdoc_macro.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 3f3d0750..40f70354 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -27,9 +27,11 @@
#include "libmdoc.h"
-#define REWIND_REWIND (1 << 0)
-#define REWIND_NOHALT (1 << 1)
-#define REWIND_HALT (1 << 2)
+enum rew {
+ REWIND_REWIND,
+ REWIND_NOHALT,
+ REWIND_HALT
+};
static int ctx_synopsis(MACRO_PROT_ARGS);
static int obsolete(MACRO_PROT_ARGS);
@@ -42,7 +44,7 @@ static int blk_exp_close(MACRO_PROT_ARGS);
static int blk_part_imp(MACRO_PROT_ARGS);
static int phrase(struct mdoc *, int, int, char *);
-static int rew_dohalt(enum mdoct, enum mdoc_type,
+static enum rew rew_dohalt(enum mdoct, enum mdoc_type,
const struct mdoc_node *);
static enum mdoct rew_alt(enum mdoct);
static int rew_dobreak(enum mdoct, const struct mdoc_node *);
@@ -368,7 +370,7 @@ rew_alt(enum mdoct tok)
* close our current scope (REWIND_REWIND), or continue (REWIND_NOHALT).
* The scope-closing and so on occurs in the various rew_* routines.
*/
-static int
+static enum rew
rew_dohalt(enum mdoct tok, enum mdoc_type type,
const struct mdoc_node *p)
{
@@ -574,7 +576,7 @@ rew_sub(enum mdoc_type t, struct mdoc *m,
enum mdoct tok, int line, int ppos)
{
struct mdoc_node *n;
- int c;
+ enum rew c;
/* LINTED */
for (n = m->last; n; n = n->parent) {