Whamcloud - gitweb
ChangeLog, message.c:
authorTheodore Ts'o <tytso@mit.edu>
Fri, 19 Nov 1999 18:52:36 +0000 (18:52 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 19 Nov 1999 18:52:36 +0000 (18:52 +0000)
  message.c (safe_print): Fix to properly display ^A, ^B, etc. and to
   print Delete as ^?

e2fsck/ChangeLog
e2fsck/message.c

index 3470a3e..f55e275 100644 (file)
@@ -1,5 +1,8 @@
 1999-11-19    <tytso@valinux.com>
 
+       * message.c (safe_print): Fix to properly display ^A, ^B, etc. and
+               to print Delete as ^?
+
        * Makefile.in (distclean): Remove TAGS and Makefile.in.old from
                the source directory.
 
index 87ce118..cf0bc7b 100644 (file)
@@ -148,9 +148,9 @@ static void safe_print(const char *cp, int len)
                        fputs("M-", stdout);
                        ch -= 128;
                }
-               if (ch < 32) {
+               if ((ch < 32) || (ch == 0x7f)) {
                        fputc('^', stdout);
-                       ch += 32;
+                       ch ^= 0x40; /* ^@, ^A, ^B; ^? for DEL */
                }
                fputc(ch, stdout);
        }