=================================================================== RCS file: /cvs/mandoc/man.c,v retrieving revision 1.34 retrieving revision 1.36 diff -u -p -r1.34 -r1.36 --- mandoc/man.c 2009/08/21 12:12:12 1.34 +++ mandoc/man.c 2009/08/21 13:18:32 1.36 @@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.34 2009/08/21 12:12:12 kristaps Exp $ */ +/* $Id: man.c,v 1.36 2009/08/21 13:18:32 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -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++) @@ -432,8 +442,6 @@ descope: * first close out the element scope (if applicable), then close * out the block scope (also if applicable). */ - - /* XXX - this should be in man_action.c. */ if (MAN_ELINE & m->flags) { m->flags &= ~MAN_ELINE;