summaryrefslogtreecommitdiffstats
path: root/man.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-03 11:31:26 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-03 11:31:26 +0000
commit5be7a4ded8b88fd7df89348083d8e985282780fc (patch)
treeaccee8bf52f3a9562689f4ff97a617c2d6eb7f5c /man.c
parentd5976ecf949530abbe4672ca2ab66a66cc00ddec (diff)
downloadmandoc-5be7a4ded8b88fd7df89348083d8e985282780fc.tar.gz
Same treatment for MAN_HALT as for MDOC_HALT.
Diffstat (limited to 'man.c')
-rw-r--r--man.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/man.c b/man.c
index 683fd098..b5daeb6b 100644
--- a/man.c
+++ b/man.c
@@ -64,7 +64,8 @@ const struct man_node *
man_node(const struct man *m)
{
- return(MAN_HALT & m->flags ? NULL : m->first);
+ assert( ! (MAN_HALT & m->flags));
+ return(m->first);
}
@@ -72,7 +73,8 @@ const struct man_meta *
man_meta(const struct man *m)
{
- return(MAN_HALT & m->flags ? NULL : &m->meta);
+ assert( ! (MAN_HALT & m->flags));
+ return(&m->meta);
}
@@ -115,9 +117,8 @@ int
man_endparse(struct man *m)
{
- if (MAN_HALT & m->flags)
- return(0);
- else if (man_macroend(m))
+ assert( ! (MAN_HALT & m->flags));
+ if (man_macroend(m))
return(1);
m->flags |= MAN_HALT;
return(0);
@@ -128,9 +129,7 @@ int
man_parseln(struct man *m, int ln, char *buf, int offs)
{
- if (MAN_HALT & m->flags)
- return(0);
-
+ assert( ! (MAN_HALT & m->flags));
return(('.' == buf[offs] || '\'' == buf[offs]) ?
man_pmacro(m, ln, buf, offs) :
man_ptext(m, ln, buf, offs));
@@ -363,6 +362,7 @@ int
man_addspan(struct man *m, const struct tbl_span *sp)
{
+ assert( ! (MAN_HALT & m->flags));
if ( ! man_span_alloc(m, sp))
return(0);
return(man_descope(m, 0, 0));
@@ -465,7 +465,7 @@ man_ptext(struct man *m, int line, char *buf, int offs)
}
-int
+static int
man_pmacro(struct man *m, int ln, char *buf, int offs)
{
int i, j, ppos;