diff src/print.c @ 187:b405438285a2 r20-3b20

Import from CVS: tag r20-3b20
author cvs
date Mon, 13 Aug 2007 09:56:28 +0200
parents 3d6bfa290dbd
children e45d5e7c476e
line wrap: on
line diff
--- a/src/print.c	Mon Aug 13 09:55:30 2007 +0200
+++ b/src/print.c	Mon Aug 13 09:56:28 2007 +0200
@@ -946,9 +946,12 @@
 	  strcpy (buf, "\\r");
 	else if (ch == '\t')
 	  strcpy (buf, "\\t");
-	else if (ch < 32)
+	else if (ch < 32) {
 	  sprintf (buf, "\\^%c", ch + 64);
-	else if (ch == 127)
+	  if ((ch + 64) == '\\') {
+	    strcat(buf, "\\");
+	  }
+	} else if (ch == 127)
 	  strcpy (buf, "\\^?");
 	else if (ch >= 128 && ch < 160)
 	  {