From 133b6ec86f5c1723d06abd3b096c24406be4cea6 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 21 Aug 2009 12:32:38 +0000 Subject: Fixed `nf' behaviour (had broken with de-chunking). Added warnings if literal context already open/closed. --- man.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'man.c') diff --git a/man.c b/man.c index f1c461e6..6666d748 100644 --- a/man.c +++ b/man.c @@ -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 * @@ -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++) -- cgit v1.2.3-56-ge451