pinosaur
/
st.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
53937e0
)
dump escseq if not handled.
author
Aurélien Aptel
<aurelien.aptel@gmail.com>
Tue, 16 Jun 2009 10:34:10 +0000
(12:34 +0200)
committer
Aurélien Aptel
<aurelien.aptel@gmail.com>
Tue, 16 Jun 2009 10:34:10 +0000
(12:34 +0200)
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
264fc84
..
3940bbd
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-591,10
+591,16
@@
tsetscroll(int t, int b) {
void
eschandle(void) {
void
eschandle(void) {
- /* escdump(); */
switch(escseq.pre) {
switch(escseq.pre) {
+ default:
+ goto unknown_seq;
case '[':
switch(escseq.mode) {
case '[':
switch(escseq.mode) {
+ default:
+ unknown_seq:
+ fprintf(stderr, "erresc: unknown sequence\n");
+ escdump();
+ break;
case '@': /* Insert <n> blank char */
DEFAULT(escseq.arg[0], 1);
tinsertblank(escseq.arg[0]);
case '@': /* Insert <n> blank char */
DEFAULT(escseq.arg[0], 1);
tinsertblank(escseq.arg[0]);
@@
-712,15
+718,13
@@
eschandle(void) {
void
escdump(void) {
int i;
void
escdump(void) {
int i;
- puts("------");
printf("rawbuf : %s\n", escseq.buf);
printf("prechar : %c\n", escseq.pre);
printf("private : %c\n", escseq.priv ? '?' : ' ');
printf("narg : %d\n", escseq.narg);
printf("rawbuf : %s\n", escseq.buf);
printf("prechar : %c\n", escseq.pre);
printf("private : %c\n", escseq.priv ? '?' : ' ');
printf("narg : %d\n", escseq.narg);
- if(escseq.narg)
{
+ if(escseq.narg)
for(i = 0; i < escseq.narg; i++)
printf("\targ %d = %d\n", i, escseq.arg[i]);
for(i = 0; i < escseq.narg; i++)
printf("\targ %d = %d\n", i, escseq.arg[i]);
- }
printf("mode : %c\n", escseq.mode);
}
printf("mode : %c\n", escseq.mode);
}