summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2011-07-31 14:11:49 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2011-07-31 14:11:49 +0000
commit59bbf633467d53d4619c9b9cbd74e3b21a7013a3 (patch)
treea7dccfc09c68fd5ec063c2e18d6e481486d4e437 /usr.bin
parenta272ed32b99e14dd0f1452641571f612eb64209f (diff)
Workaround to prevent misrendering of \*(-- as "O-" in pod2man(1)-
generated manuals; this fixes more than 500 manuals in base alone. As a real fix, .tr will be supported after unlock. OK kristaps@ to put in the workaround for now
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/roff.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c
index b6e50bad52c..5cc504e3eee 100644
--- a/usr.bin/mandoc/roff.c
+++ b/usr.bin/mandoc/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.39 2011/07/07 20:07:38 schwarze Exp $ */
+/* $Id: roff.c,v 1.40 2011/07/31 14:11:48 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -1344,6 +1344,12 @@ roff_setstr(struct roff *r, const char *name, const char *string,
char *c;
size_t oldch, newch;
+ /* XXX workaround for the Perl preamble until we get .tr */
+ if ( ! strcmp(name, "--")) {
+ string = "--";
+ multiline = 0;
+ }
+
/* Search for an existing string with the same name. */
n = r->first_string;
while (n && strcmp(name, n->name))