From 7de1fb3bb8d23e0fbac52943ca2ddfa24054195b Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 7 May 2006 11:35:51 +0000 Subject: [PATCH] When we want a printed backslash, use \e rather than \\, since the former works correctly inside macro arguments. git-svn-id: svn://svn.tartarus.org/sgt/halibut@6658 cda61777-01e9-0310-a592-d414129be87e --- bk_man.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/bk_man.c b/bk_man.c index 7bd19ea..32f731c 100644 --- a/bk_man.c +++ b/bk_man.c @@ -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)) { -- 2.11.0