diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-04-07 23:15:06 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-04-07 23:15:06 +0000 |
commit | 7137104835ca81318a9a2f20dbb47bfad38ea829 (patch) | |
tree | 851045dd0fa48e8867b4ee036b854bd6c4b80a15 /usr.bin/mandoc/term.c | |
parent | 87cc166866f92a490fc02f4168d4ce0f3af45a70 (diff) |
Merge the good parts of 1.9.23,
avoid the bad parts of 1.9.23, and keep local patches.
Input in general:
* Basic handling of roff-style font escapes \f, \F.
* Quoted punctuation does not count as punctuation.
mdoc(7) parser:
* Make .Pf callable; noted by Claus Assmann.
* Let .Bd and .Bl ignore unknown arguments; noted by deraadt@.
* Do not warn when .Er is used outside certain sections.
* Replace mdoc_node_free[list] by mdoc_node_delete.
* Replace #define by enum for rew*() return values.
man(7) parser:
* When .TH is missing, use default section and date.
Output in general:
* Curly braces do not count as punctuation.
* No space after .Fl w/o args when a macro follows on the same line.
HTML output:
* Unify PAIR_*_INIT macros, introduce new PAIR_ID_INIT().
* Print whitespace after, not before .Vt .Fn .Ft .Fo.
Checked that all manuals in base still build.
Diffstat (limited to 'usr.bin/mandoc/term.c')
-rw-r--r-- | usr.bin/mandoc/term.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/usr.bin/mandoc/term.c b/usr.bin/mandoc/term.c index 06d9efab18d..9ab9b693bd6 100644 --- a/usr.bin/mandoc/term.c +++ b/usr.bin/mandoc/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.26 2010/03/26 01:22:07 schwarze Exp $ */ +/* $Id: term.c,v 1.27 2010/04/07 23:15:05 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -88,12 +88,10 @@ term_alloc(enum termenc enc) * Flush a line of text. A "line" is loosely defined as being something * that should be followed by a newline, regardless of whether it's * broken apart by newlines getting there. A line can also be a - * fragment of a columnar list. + * fragment of a columnar list (`Bl -tag' or `Bl -column'), which does + * not have a trailing newline. * - * Specifically, a line is whatever's in p->buf of length p->col, which - * is zeroed after this function returns. - * - * The usage of termp:flags is as follows: + * The following flags may be specified: * * - TERMP_NOLPAD: when beginning to write the line, don't left-pad the * offset value. This is useful when doing columnar lists where the @@ -453,8 +451,6 @@ term_word(struct termp *p, const char *word) case(')'): /* FALLTHROUGH */ case(']'): - /* FALLTHROUGH */ - case('}'): if ( ! (TERMP_IGNDELIM & p->flags)) p->flags |= TERMP_NOSPACE; break; @@ -513,8 +509,6 @@ term_word(struct termp *p, const char *word) case('('): /* FALLTHROUGH */ case('['): - /* FALLTHROUGH */ - case('{'): p->flags |= TERMP_NOSPACE; break; default: |