From a6f740a7c41f5e618f65e888b8f42b0ad7d8ac3a Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Thu, 25 Jun 2015 15:46:35 +0430 Subject: [PATCH] trfn: space may be mapped to nbspace (0xa0) Reported by Dirk-Wilhelm Peters . --- trfn.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/trfn.c b/trfn.c index ed53a5c..58bf922 100644 --- a/trfn.c +++ b/trfn.c @@ -273,12 +273,11 @@ void trfn_char(char *psname, int n, int u, int wid, if (!strchr(psname, '.')) sprintf(pos, "%d", uc[0]); typ = trfn_type(!strchr(psname, '.') ? uc : "", lly, ury); + if (!trfn_swid && (!strcmp(" ", uc) || !strcmp(" ", uc))) + trfn_swid = WX(wid); /* printing troff charset */ - if (strchr(uc, ' ')) { /* space not allowed in char names */ - if (!trfn_swid && !strcmp(" ", uc)) - trfn_swid = WX(wid); + if (strchr(uc, ' ')) /* space not allowed in char names */ return; - } if (strcmp("---", uc)) trfn_lig(uc); sbuf_printf(&sbuf_char, "char %s\t%d", uc, WX(wid)); -- 2.11.4.GIT