]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/trace/visbuf.c
ncurses 5.6 - patch 20070609
[ncurses.git] / ncurses / trace / visbuf.c
index 126e69fffa3081a86b8390310f78b5cdd32887cb..74081efe6442042ed8b388823d0456278b66fb19 100644 (file)
 #include <tic.h>
 #include <ctype.h>
 
 #include <tic.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: visbuf.c,v 1.24 2007/06/02 18:55:10 tom Exp $")
+MODULE_ID("$Id: visbuf.c,v 1.26 2007/06/09 17:21:53 tom Exp $")
 
 #define NormalLen(len) (unsigned) ((len + 1) * 4)
 #define WideLen(len)   (unsigned) ((len + 1) * 4 * MB_CUR_MAX)
 
 #ifdef TRACE
 
 #define NormalLen(len) (unsigned) ((len + 1) * 4)
 #define WideLen(len)   (unsigned) ((len + 1) * 4 * MB_CUR_MAX)
 
 #ifdef TRACE
-#define StringOf(ch) {ch, 0}
 static const char d_quote[] = StringOf(D_QUOTE);
 static const char l_brace[] = StringOf(L_BRACE);
 static const char r_brace[] = StringOf(R_BRACE);
 static const char d_quote[] = StringOf(D_QUOTE);
 static const char l_brace[] = StringOf(L_BRACE);
 static const char r_brace[] = StringOf(R_BRACE);
@@ -74,6 +73,10 @@ _nc_vischar(char *tp, unsigned c)
     } else if (c == '\033') {
        *tp++ = '\\';
        *tp++ = 'e';
     } else if (c == '\033') {
        *tp++ = '\\';
        *tp++ = 'e';
+    } else if (UChar(c) == 0x7f) {
+       *tp++ = '\\';
+       *tp++ = '^';
+       *tp++ = '?';
     } else if (is7bits(c) && iscntrl(UChar(c))) {
        *tp++ = '\\';
        *tp++ = '^';
     } else if (is7bits(c) && iscntrl(UChar(c))) {
        *tp++ = '\\';
        *tp++ = '^';