diff options
| author | Simon Tatham <anakin@pobox.com> | 2006-10-11 11:13:30 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2006-10-11 11:13:30 +0000 |
| commit | 2b03a64dbede7b625dd2cabe1fcc2c5a4036b188 (patch) | |
| tree | f2e478949b30a3b8be46ac5b0c953d468147085b /bk_man.c | |
| parent | ec3bb992bc05d88c9e900ecd0bc435604d9e0292 (diff) | |
| download | halibut-2b03a64dbede7b625dd2cabe1fcc2c5a4036b188.zip halibut-2b03a64dbede7b625dd2cabe1fcc2c5a4036b188.tar.gz halibut-2b03a64dbede7b625dd2cabe1fcc2c5a4036b188.tar.bz2 halibut-2b03a64dbede7b625dd2cabe1fcc2c5a4036b188.tar.xz | |
`man', at least on Debian 3.1, will treat a paragraph beginning with
a period specially _even_ if there's an \fB or similar escape
sequence before the period. Therefore, man_rdaddctrl() now doesn't
clear the QUOTE_INITCTRL flag just because it generated some text;
instead, its call sites clear the flag when the _type_ of generated
text is appropriate for this. This should remove an error from the
`lns' man page (utils/lns/lns.but), which was where I noticed the
problem.
[originally from svn r6871]
Diffstat (limited to 'bk_man.c')
| -rw-r--r-- | bk_man.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -541,8 +541,6 @@ static int man_rdaddctrl(rdstringc *rs, char *c, int quote_props, manconfig *conf, charset_state *state) { quote_props = man_rdaddwc_reset(rs, quote_props, conf, state); rdaddsc(rs, c); - if (*c) - quote_props &= ~QUOTE_INITCTRL; /* not at start any more */ return quote_props; } @@ -604,9 +602,11 @@ static int man_rdaddwc(rdstringc *rs, word *text, word *end, quote_props &= ~QUOTE_INITCTRL; /* not at start any more */ *state = s2; } - if (hyphen) + if (hyphen) { quote_props = man_rdaddctrl(rs, "-", quote_props, conf, state); + quote_props &= ~QUOTE_INITCTRL; + } } else { quote_props = man_rdaddwc(rs, text->alt, NULL, quote_props, conf, state); @@ -615,6 +615,7 @@ static int man_rdaddwc(rdstringc *rs, word *text, word *end, sfree(c); } else if (removeattr(text->type) == word_WhiteSpace) { quote_props = man_rdaddctrl(rs, " ", quote_props, conf, state); + quote_props &= ~QUOTE_INITCTRL; } else if (removeattr(text->type) == word_Quote) { man_convert(quoteaux(text->aux) == quote_Open ? conf->lquote : conf->rquote, 0, |