diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-08-20 18:06:56 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-08-20 18:06:56 +0000 |
commit | edb9e9abc80ab6d1c6f0402d21d80cb8eb8d2da7 (patch) | |
tree | 73f871abffcc8ff1930f538c232426313b6b33d9 /mandoc.c | |
parent | 31838be143430e63268641f25b12c5c350b9d05c (diff) | |
download | mandoc-edb9e9abc80ab6d1c6f0402d21d80cb8eb8d2da7.tar.gz |
\f[] means \fP, not \fR
Diffstat (limited to 'mandoc.c')
-rw-r--r-- | mandoc.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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': |