diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2006-05-07 11:35:51 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2006-05-07 11:35:51 +0000 |
| commit | 86dd3f72469e3f35c5f9ef95919e670d621c1a32 (patch) | |
| tree | fe5e5d39280ce2b2d7f5308c8c58411cea84fa8f | |
| parent | f260ea6f412ef4b7e9a39b62a1764f366fefddd2 (diff) | |
| download | halibut-86dd3f72469e3f35c5f9ef95919e670d621c1a32.zip halibut-86dd3f72469e3f35c5f9ef95919e670d621c1a32.tar.gz halibut-86dd3f72469e3f35c5f9ef95919e670d621c1a32.tar.bz2 halibut-86dd3f72469e3f35c5f9ef95919e670d621c1a32.tar.xz | |
When we want a printed backslash, use \e rather than \\, since the former
works correctly inside macro arguments.
[originally from svn r6658]
| -rw-r--r-- | bk_man.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -475,16 +475,15 @@ static int man_convert(wchar_t const *s, int maxlen, */ rdaddc(&out, '\\'); rdaddc(&out, '&'); - } else if (*q == '\\' || *q == '`' || *q == ' ') { - /* - * Quote backslashes, backticks and nonbreakable - * spaces always. - */ + } else if (*q == '`' || *q == ' ') { + /* Quote backticks and nonbreakable spaces always. */ rdaddc(&out, '\\'); + } else if (*q == '\\') { + /* Turn backslashes into \e. */ + rdaddsc(&out, "\\e"); + continue; } else if (*q == '-') { - /* - * Turn nonbreakable hyphens into \(hy. - */ + /* Turn nonbreakable hyphens into \(hy. */ rdaddsc(&out, "\\(hy"); continue; } else if (*q == '"' && (quote_props & QUOTE_QUOTES)) { |