shithub: neatmkfn

Download patch

ref: a6f740a7c41f5e618f65e888b8f42b0ad7d8ac3a
parent: 3b33b2993253e10204743273e06545708fe3e149
author: Ali Gholami Rudi <ali@rudi.ir>
date: Thu Jun 25 11:46:35 EDT 2015

trfn: space may be mapped to nbspace (0xa0)

Reported by Dirk-Wilhelm Peters <peters@schwertfisch.de>.

--- a/trfn.c
+++ b/trfn.c
@@ -273,12 +273,11 @@
 		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));