From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s9SInXVW025010 for ; Tue, 28 Oct 2014 14:49:33 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s9SInXeC003941; Tue, 28 Oct 2014 14:49:33 -0400 (EDT) Date: Tue, 28 Oct 2014 14:49:33 -0400 (EDT) Message-Id: <201410281849.s9SInXeC003941@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: In -Tascii mode, print "" only for Unicode escapes of unknown X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- In -Tascii mode, print "" only for Unicode escapes of unknown representation, not for character escapes with unknown names. According to groff, the latter produce no output, and we now warn about them. Modified Files: -------------- mdocml: term.c term_ascii.c Revision Data ------------- Index: term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term.c,v retrieving revision 1.231 retrieving revision 1.232 diff -Lterm.c -Lterm.c -u -p -r1.231 -r1.232 --- term.c +++ term.c @@ -458,9 +458,7 @@ term_word(struct termp *p, const char *w if (p->enc == TERMENC_ASCII) { cp = mchars_spec2str(p->symtab, seq, sz, &ssz); - if (cp == NULL) - encode(p, "", 3); - else + if (cp != NULL) encode(p, cp, ssz); } else { uc = mchars_spec2cp(p->symtab, seq, sz); @@ -690,14 +688,10 @@ term_strlen(const struct termp *p, const sz += cond_width(p, c, &skip); break; case ESCAPE_SPECIAL: - if (p->enc == TERMENC_ASCII) { + if (p->enc == TERMENC_ASCII) rhs = mchars_spec2str(p->symtab, seq, ssz, &rsz); - if (rhs == NULL) { - rhs = ""; - rsz = 3; - } - } else { + else { c = mchars_spec2cp(p->symtab, seq, ssz); if (c > 0) Index: term_ascii.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term_ascii.c,v retrieving revision 1.38 retrieving revision 1.39 diff -Lterm_ascii.c -Lterm_ascii.c -u -p -r1.38 -r1.39 --- term_ascii.c +++ term_ascii.c @@ -19,6 +19,7 @@ #include +#include #if HAVE_WCHAR #include #endif @@ -337,8 +338,7 @@ ascii_uc2str(int uc) "j", "DZ", "Dz", "dz", "'\bG", "'\bg", "HV", "W", "`\bN", "`\bn", "A", "a", "'\bAE","'\bae","O", "o"}; - if (uc < 0) - return(""); + assert(uc >= 0); if ((size_t)uc < sizeof(tab)/sizeof(tab[0])) return(tab[uc]); return(mchars_uc2str(uc)); -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv