diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-04-05 16:34:22 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-04-05 16:34:22 +0000 |
commit | 12787b5b25116ca648594a7e79d78bb6d63b3297 (patch) | |
tree | 374c5cbffc73270c9965336312793f404d29b91d /man_term.c | |
parent | 2bf117bf436ea58dd257d956e93a812dbe448d28 (diff) | |
download | mandoc-12787b5b25116ca648594a7e79d78bb6d63b3297.tar.gz mandoc-12787b5b25116ca648594a7e79d78bb6d63b3297.tar.zst mandoc-12787b5b25116ca648594a7e79d78bb6d63b3297.zip |
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.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.6 2009/04/02 06:51:44 kristaps Exp $ */ +/* $Id: man_term.c,v 1.7 2009/04/05 16:34:22 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org> * @@ -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; |