summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-08-20 18:06:43 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-08-20 18:06:43 +0000
commite137fb7877f682f8663b31cd08c6ac8a49efde2f (patch)
tree1622709f3745f18f01c1905f8a40bdd22915c365 /usr.bin/mandoc
parent8dce4790d8fff1c0348f7e992493aadb50836aa5 (diff)
\f[] means \fP, not \fR
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/mandoc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mandoc.c b/usr.bin/mandoc/mandoc.c
index 0e194865bf1..ae9c3938a55 100644
--- a/usr.bin/mandoc/mandoc.c
+++ b/usr.bin/mandoc/mandoc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mandoc.c,v 1.74 2018/08/16 13:49:40 schwarze Exp $ */
+/* $OpenBSD: mandoc.c,v 1.75 2018/08/20 18:06:42 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -300,8 +300,8 @@ mandoc_escape(const char **end, const char **start, int *sz)
switch (gly) {
case ESCAPE_FONT:
- if (2 == *sz) {
- if ('C' == **start) {
+ if (*sz == 2) {
+ if (**start == 'C') {
/*
* Treat constant-width font modes
* just like regular font modes.
@@ -309,12 +309,15 @@ mandoc_escape(const char **end, const char **start, int *sz)
(*start)++;
(*sz)--;
} else {
- if ('B' == (*start)[0] && 'I' == (*start)[1])
+ if ((*start)[0] == 'B' && (*start)[1] == 'I')
gly = ESCAPE_FONTBI;
break;
}
- } else if (1 != *sz)
+ } else if (*sz != 1) {
+ if (*sz == 0)
+ gly = ESCAPE_FONTPREV;
break;
+ }
switch (**start) {
case '3':