projects
/
apps
/
madtty.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc1e2fe
)
debug
author
Pierre Habouzit
<madcoder@debian.org>
Sat, 10 Nov 2007 23:34:59 +0000
(
00:34
+0100)
committer
Pierre Habouzit
<madcoder@debian.org>
Sat, 10 Nov 2007 23:34:59 +0000
(
00:34
+0100)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
madtty/madtty.c
patch
|
blob
|
history
diff --git
a/madtty/madtty.c
b/madtty/madtty.c
index
8994454
..
af12870
100644
(file)
--- a/
madtty/madtty.c
+++ b/
madtty/madtty.c
@@
-612,6
+612,17
@@
static void try_interpret_escape_seq(madtty_t *t)
if (t->elen + 1 >= (int)sizeof(t->ebuf)) {
cancel:
+#ifndef NDEBUG
+ fprintf(stderr, "cancelled: \\033");
+ for (int i = 0; i < (int)t->elen; i++) {
+ if (isprint(t->ebuf[i])) {
+ fputc(t->ebuf[i], stderr);
+ } else {
+ fprintf(stderr, "\\%03o", t->ebuf[i]);
+ }
+ }
+ fputc('\n', stderr);
+#endif
cancel_escape_sequence(t);
}
}