summaryrefslogtreecommitdiffstats
path: root/man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-30 20:06:36 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-30 20:06:36 +0000
commitbdbc20253f6d0e531a1f1bf519d9d01a5c1059a3 (patch)
treef27a25b2a25582b032b25051cb254d826aca9e53 /man.c
parent8cad25c2bd23b7a8d1c081a886ca26c2ff2d1e10 (diff)
downloadmandoc-bdbc20253f6d0e531a1f1bf519d9d01a5c1059a3.tar.gz
Simplify: replace one global flag by one local variable.
No functional change.
Diffstat (limited to 'man.c')
-rw-r--r--man.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/man.c b/man.c
index 7d9e3fca..03a9c23a 100644
--- a/man.c
+++ b/man.c
@@ -478,10 +478,11 @@ man_ptext(struct man *man, int line, char *buf, int offs)
static int
man_pmacro(struct man *man, int ln, char *buf, int offs)
{
- int i, ppos;
- enum mant tok;
char mac[5];
struct man_node *n;
+ enum mant tok;
+ int i, ppos;
+ int bline;
if ('"' == buf[offs]) {
mandoc_msg(MANDOCERR_COMMENT_BAD, man->parse,
@@ -581,14 +582,9 @@ man_pmacro(struct man *man, int ln, char *buf, int offs)
man->flags &= ~MAN_BLINE;
}
- /*
- * Save the fact that we're in the next-line for a block. In
- * this way, embedded roff instructions can "remember" state
- * when they exit.
- */
+ /* Remember whether we are in next-line scope for a block head. */
- if (MAN_BLINE & man->flags)
- man->flags |= MAN_BPLINE;
+ bline = man->flags & MAN_BLINE;
/* Call to handler... */
@@ -610,11 +606,10 @@ man_pmacro(struct man *man, int ln, char *buf, int offs)
* above-parsed macro, so return.
*/
- if ( ! (MAN_BPLINE & man->flags)) {
+ if ( ! bline) {
man->flags &= ~MAN_ILINE;
return(1);
}
- man->flags &= ~MAN_BPLINE;
/*
* If we're in a block scope, then allow this macro to slip by