summaryrefslogtreecommitdiffstats
path: root/man_macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-03-23 12:40:04 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-03-23 12:40:04 +0000
commit22671958d103a1eca7f6675bff049e902034637b (patch)
treeaedf5abb7525d51424973358454579d2540e6303 /man_macro.c
parente29490c2a6462d5308d34e9cad6e8b105edbd029 (diff)
downloadmandoc-22671958d103a1eca7f6675bff049e902034637b.tar.gz
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 'man_macro.c')
-rw-r--r--man_macro.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/man_macro.c b/man_macro.c
index f10a32ea..e0549822 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -296,7 +296,7 @@ blk_close(MACRO_PROT_ARGS)
int
blk_exp(MACRO_PROT_ARGS)
{
- int w, la;
+ int la;
char *p;
/*
@@ -317,13 +317,8 @@ blk_exp(MACRO_PROT_ARGS)
for (;;) {
la = *pos;
- w = man_args(m, line, pos, buf, &p);
-
- if (-1 == w)
- return(0);
- if (0 == w)
+ if (ARGS_EOLN == man_args(m, line, pos, buf, &p))
break;
-
if ( ! man_word_alloc(m, line, la, p))
return(0);
}
@@ -348,7 +343,7 @@ blk_exp(MACRO_PROT_ARGS)
int
blk_imp(MACRO_PROT_ARGS)
{
- int w, la;
+ int la;
char *p;
struct man_node *n;
@@ -372,13 +367,8 @@ blk_imp(MACRO_PROT_ARGS)
for (;;) {
la = *pos;
- w = man_args(m, line, pos, buf, &p);
-
- if (-1 == w)
- return(0);
- if (0 == w)
+ if (ARGS_EOLN == man_args(m, line, pos, buf, &p))
break;
-
if ( ! man_word_alloc(m, line, la, p))
return(0);
}
@@ -406,7 +396,7 @@ blk_imp(MACRO_PROT_ARGS)
int
in_line_eoln(MACRO_PROT_ARGS)
{
- int w, la;
+ int la;
char *p;
struct man_node *n;
@@ -417,11 +407,7 @@ in_line_eoln(MACRO_PROT_ARGS)
for (;;) {
la = *pos;
- w = man_args(m, line, pos, buf, &p);
-
- if (-1 == w)
- return(0);
- if (0 == w)
+ if (ARGS_EOLN == man_args(m, line, pos, buf, &p))
break;
if ( ! man_word_alloc(m, line, la, p))
return(0);