projects
/
apps
/
madtty.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
debug
[apps/madtty.git]
/
madtty
/
madtty.c
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:
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);
}
}
cancel_escape_sequence(t);
}
}