X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1c08be1b270cce9c287aa3c83454969cdec5b7de..43cfc6660af9677d520d578713f57ae0d8d1b81f:/uip/fmttest.c diff --git a/uip/fmttest.c b/uip/fmttest.c index f08583e0..a3a436f4 100644 --- a/uip/fmttest.c +++ b/uip/fmttest.c @@ -121,9 +121,7 @@ main (int argc, char **argv) int dat[5]; struct fmt_callbacks cb, *cbp = NULL; -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = r1bindex (argv[0], '/'); /* read user profile/context */ @@ -1168,11 +1166,8 @@ static void litputc(char c) { if (c & ~ 0177) { - putc('M', stdout); - putc('-', stdout); - c &= 0177; - } - if (c < 0x20 || c == 0177) { + printf("\\x%02x", (unsigned char) c); + } else if (c < 0x20 || c == 0177) { if (c == '\b') { putc('\\', stdout); putc('b', stdout);