diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-09-15 08:39:32 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-09-15 08:39:32 -0700 |
commit | 09680830758c7a0ab147ae96d8ca37291fe9d1bf (patch) | |
tree | ed2d35a192aba8596a05b4405acfd865e4a6034d | |
parent | ad3b41bcf001b1479ac1ed086e08364388e16ef9 (diff) | |
download | man-09680830758c7a0ab147ae96d8ca37291fe9d1bf.tar.gz man-09680830758c7a0ab147ae96d8ca37291fe9d1bf.tar.bz2 man-09680830758c7a0ab147ae96d8ca37291fe9d1bf.zip |
Fix broken .ft XY
The .ft directive was only accepting numeric arguments,
not symbolic font names like CO and P.
-rw-r--r-- | man2html/man2html.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/man2html/man2html.c b/man2html/man2html.c index ca014c0..12326c1 100644 --- a/man2html/man2html.c +++ b/man2html/man2html.c @@ -1780,16 +1780,18 @@ scan_request(char *c) { c=c+j; if (*c == '\n') { out_html(change_to_font(0)); + } else if (*c == escapesym) { + int fn; + c=scan_expression(c, &fn); + c--; + out_html(change_to_font(fn)); + } else if (isdigit(*c)) { + out_html(change_to_font(*c)); + c++; } else { - if (*c == escapesym) { - int fn; - c=scan_expression(c, &fn); - c--; - out_html(change_to_font(fn)); - } else { - out_html(change_to_font(*c)); - c++; - } + int nr = str_to_code(c); + out_html(change_to_font(nr)); + c += strcspn(c, " \t\n"); } c=skip_till_newline(c); break; |