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 | 133b6ec86f5c1723d06abd3b096c24406be4cea6 (patch) | |
tree | f10cd43a94a200c0c5610c9ff8879e71ded62b1a /man.c | |
parent | 3c7b73a2f8774480e0df1984d751f9ead2c8c29d (diff) | |
download | mandoc-133b6ec86f5c1723d06abd3b096c24406be4cea6.tar.gz mandoc-133b6ec86f5c1723d06abd3b096c24406be4cea6.tar.zst mandoc-133b6ec86f5c1723d06abd3b096c24406be4cea6.zip |
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 | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.34 2009/08/21 12:12:12 kristaps Exp $ */ +/* $Id: man.c,v 1.35 2009/08/21 12:32:38 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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++) |