summaryrefslogtreecommitdiffstats
path: root/mandoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-08-20 18:06:56 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-08-20 18:06:56 +0000
commitedb9e9abc80ab6d1c6f0402d21d80cb8eb8d2da7 (patch)
tree73f871abffcc8ff1930f538c232426313b6b33d9 /mandoc.c
parent31838be143430e63268641f25b12c5c350b9d05c (diff)
downloadmandoc-edb9e9abc80ab6d1c6f0402d21d80cb8eb8d2da7.tar.gz
\f[] means \fP, not \fR
Diffstat (limited to 'mandoc.c')
-rw-r--r--mandoc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mandoc.c b/mandoc.c
index d1b6fe93..f9cfa4ea 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -302,8 +302,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.
@@ -311,12 +311,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':