]> diplodocus.org Git - nmh/commitdiff
Switch from the M-X format for characters with the high bit set to
authorKen Hornstein <kenh@pobox.com>
Thu, 2 Jan 2014 20:00:46 +0000 (15:00 -0500)
committerKen Hornstein <kenh@pobox.com>
Thu, 2 Jan 2014 20:00:46 +0000 (15:00 -0500)
\xXX instead when printing format strings and other characters.

uip/fmttest.c

index f08583e..b39d0d5 100644 (file)
@@ -1168,11 +1168,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);