summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2010-05-16 01:16:25 +0000
committerschwarze <schwarze@openbsd.org>2010-05-16 01:16:25 +0000
commit0c1d286d88add3f0968b596cdc181a1932d4aa16 (patch)
treecaabb1f06f98a1e0d125ef377810ba6c4fa31153
parentIn theory, Kristaps never intended to write a roff parser, (diff)
downloadwireguard-openbsd-0c1d286d88add3f0968b596cdc181a1932d4aa16.tar.xz
wireguard-openbsd-0c1d286d88add3f0968b596cdc181a1932d4aa16.zip
allow the single quote as a control character in place of the dot
at all relevant places; from kristaps@
-rw-r--r--usr.bin/mandoc/main.c4
-rw-r--r--usr.bin/mandoc/mdoc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
index 1ddb5844941..63bd938dfdc 100644
--- a/usr.bin/mandoc/main.c
+++ b/usr.bin/mandoc/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.30 2010/05/16 00:54:03 schwarze Exp $ */
+/* $Id: main.c,v 1.31 2010/05/16 01:16:25 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -563,7 +563,7 @@ pset(const char *buf, int pos, struct curparse *curp,
* default to -man, which is more lenient.
*/
- if (buf[0] == '.') {
+ if ('.' == buf[0] || '\'' == buf[0]) {
for (i = 1; buf[i]; i++)
if (' ' != buf[i] && '\t' != buf[i])
break;
diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c
index df6712e1537..45930652491 100644
--- a/usr.bin/mandoc/mdoc.c
+++ b/usr.bin/mandoc/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.50 2010/05/15 18:25:51 schwarze Exp $ */
+/* $Id: mdoc.c,v 1.51 2010/05/16 01:16:25 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -287,7 +287,7 @@ mdoc_parseln(struct mdoc *m, int ln, char *buf)
return(0);
m->flags |= MDOC_NEWLINE;
- return('.' == *buf ?
+ return(('.' == *buf || '\'' == *buf) ?
mdoc_pmacro(m, ln, buf) :
mdoc_ptext(m, ln, buf));
}