diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-08-21 12:32:38 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-08-21 12:32:38 +0000 |
commit | 270a33558b8c086b899f49f34e1d47da4792b7b8 (patch) | |
tree | 2a1c0cbef9edfff1a3fd8f1135fc17fed30bfd7d /man.c | |
parent | d8d8e19a17345326342a05e737487b04fa994353 (diff) | |
download | mandoc-270a33558b8c086b899f49f34e1d47da4792b7b8.tar.gz |
Fixed `nf' behaviour (had broken with de-chunking).
Added warnings if literal context already open/closed.
Diffstat (limited to 'man.c')
-rw-r--r-- | man.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -41,7 +41,9 @@ const char *const __man_merrnames[WERRMAX] = { "unknown macro", /* WMACRO */ "ill-formed macro", /* WMACROFORM */ "scope open on exit", /* WEXITSCOPE */ - "no scope context" /* WNOSCOPE */ + "no scope context", /* WNOSCOPE */ + "literal context already open", /* WOLITERAL */ + "no literal context open" /* WNLITERAL */ }; const char *const __man_macronames[MAN_MAX] = { @@ -392,6 +394,14 @@ man_ptext(struct man *m, int line, char *buf) { int i, j; + /* Literal free-form text whitespace is preserved. */ + + if (MAN_LITERAL & m->flags) { + if ( ! man_word_alloc(m, line, 0, buf)) + return(0); + goto descope; + } + /* First de-chunk and allocate words. */ for (i = 0; ' ' == buf[i]; i++) |