summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-04-05 16:34:22 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-04-05 16:34:22 +0000
commit075a3ee5ea7b8a761f32c3afd8b483dad8b67049 (patch)
tree47185381dcb0068f3a7b1e6f24cea9d7c445e13e /man_term.c
parent8542238145aa7d3a422b4a3975a7e994638f29e5 (diff)
downloadmandoc-075a3ee5ea7b8a761f32c3afd8b483dad8b67049.tar.gz
man(3) doesn't use err.h anymore.
Added .i to man(3). Fixed up manuals. Fixed up webpage. Assertion fixes in man(3) (hashtable). Fixed assertion for .IP in mandoc -man.
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/man_term.c b/man_term.c
index e227ec23..f5c9c500 100644
--- a/man_term.c
+++ b/man_term.c
@@ -82,6 +82,7 @@ static const struct termact termacts[MAN_MAX] = {
{ pre_RI, NULL }, /* RI */
{ pre_PP, NULL }, /* br */
{ NULL, NULL }, /* na */
+ { pre_I, post_I }, /* i */
};
static void print_head(struct termp *,
@@ -282,15 +283,15 @@ pre_IP(DECL_ARGS)
if (NULL == (nn = n->child))
return(1);
-
- /* FIXME - ignore the designator. */
- nn = nn->next;
-
if (MAN_TEXT != nn->type)
errx(1, "expected text line argument");
- offs = (size_t)atoi(nn->string);
- nn = nn->next;
+ if (nn->next) {
+ if (MAN_TEXT != nn->next->type)
+ errx(1, "expected text line argument");
+ offs = (size_t)atoi(nn->next->string);
+ } else
+ offs = strlen(nn->string);
p->flags |= TERMP_NOSPACE;
p->offset += offs;