diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-11-12 08:21:05 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-11-12 08:21:05 +0000 |
commit | c55c7c742e50a932784d8cd8689f4ad216fcc91f (patch) | |
tree | 12cfb0023cd119f9f5381c88897da41a2751843e /man_term.c | |
parent | 0e3a34d005ada7fe44f2109d7f478eaa1cdebbfe (diff) | |
download | mandoc-c55c7c742e50a932784d8cd8689f4ad216fcc91f.tar.gz mandoc-c55c7c742e50a932784d8cd8689f4ad216fcc91f.tar.zst mandoc-c55c7c742e50a932784d8cd8689f4ad216fcc91f.zip |
Fixed \c support for all input and output modes (documented in mandoc_char.7).
Diffstat (limited to 'man_term.c')
-rw-r--r-- | man_term.c | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.53 2009/11/12 08:00:21 kristaps Exp $ */ +/* $Id: man_term.c,v 1.54 2009/11/12 08:21:05 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -783,7 +783,7 @@ post_RS(DECL_ARGS) static void print_man_node(DECL_ARGS) { - int c, sz; + int c; c = 1; @@ -793,17 +793,8 @@ print_man_node(DECL_ARGS) term_vspace(p); break; } - /* - * Note! This is hacky. Here, we recognise the `\c' - * escape embedded in so many -man pages. It's supposed - * to remove the subsequent space, so we mark NOSPACE if - * it's encountered in the string. - */ - sz = (int)strlen(n->string); + term_word(p, n->string); - if (sz >= 2 && n->string[sz - 1] == 'c' && - n->string[sz - 2] == '\\') - p->flags |= TERMP_NOSPACE; /* FIXME: this means that macro lines are munged! */ |