summaryrefslogtreecommitdiffstats
path: root/man.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-03-27 10:04:56 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-03-27 10:04:56 +0000
commit1a23231b7d2adf726b168ad0121186f58c9afc2c (patch)
tree2cae492c3f4cafc129472596cfbb002cb2aefbaa /man.c
parent80d2ac69bc131eb6fd2465642f52a9255dabd36a (diff)
downloadmandoc-1a23231b7d2adf726b168ad0121186f58c9afc2c.tar.gz
Fixed re-adjustment of scope in exiting roff instructions (libman).
Added title-case check for (libman). Fixed premature closure of roff instruction scope (libman). Added documentation of ignored roff macros to man(3).
Diffstat (limited to 'man.c')
-rw-r--r--man.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/man.c b/man.c
index bf3754a8..1c85c0fe 100644
--- a/man.c
+++ b/man.c
@@ -51,6 +51,8 @@ const char *const __man_merrnames[WERRMAX] = {
"literal context already open", /* WOLITERAL */
"no literal context open", /* WNLITERAL */
"invalid nesting of roff declarations", /* WROFFNEST */
+ "scope in roff instructions broken", /* WROFFSCOPE */
+ "document title should be uppercase", /* WTITLECASE */
};
const char *const __man_macronames[MAN_MAX] = {
@@ -155,7 +157,7 @@ int
man_parseln(struct man *m, int ln, char *buf)
{
- return('.' == *buf ?
+ return('.' == *buf || '\'' == *buf ?
man_pmacro(m, ln, buf) :
man_ptext(m, ln, buf));
}
@@ -447,7 +449,7 @@ descope:
if (MAN_ELINE & m->flags) {
m->flags &= ~MAN_ELINE;
- if ( ! man_unscope(m, m->last->parent))
+ if ( ! man_unscope(m, m->last->parent, WERRMAX))
return(0);
}
@@ -455,7 +457,7 @@ descope:
return(1);
m->flags &= ~MAN_BLINE;
- if ( ! man_unscope(m, m->last->parent))
+ if ( ! man_unscope(m, m->last->parent, WERRMAX))
return(0);
return(man_body_alloc(m, line, 0, m->last->tok));
}
@@ -623,7 +625,7 @@ out:
assert(MAN_BLINE & m->flags);
m->flags &= ~MAN_BLINE;
- if ( ! man_unscope(m, m->last->parent))
+ if ( ! man_unscope(m, m->last->parent, WERRMAX))
return(0);
return(man_body_alloc(m, ln, 0, m->last->tok));