X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1c08be1b270cce9c287aa3c83454969cdec5b7de..cdbb097c8f061dfea2e92f0beafc64fdf50a4eb7:/uip/fmttest.c diff --git a/uip/fmttest.c b/uip/fmttest.c index f08583e0..2f45e7b5 100644 --- a/uip/fmttest.c +++ b/uip/fmttest.c @@ -121,13 +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 */ - context_read(); + if (nmh_init(argv[0], 1)) { return 1; } arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; @@ -1168,11 +1162,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);