]> diplodocus.org Git - nmh/blobdiff - uip/fmttest.c
Fixed three LC_ALL settings:
[nmh] / uip / fmttest.c
index f08583e..a3a436f 100644 (file)
@@ -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);