diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2009-06-16 12:34:10 +0200 |
---|---|---|
committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2009-06-16 12:34:10 +0200 |
commit | bddcc7f5ae423fd068ceb643afac4b8c7f487634 (patch) | |
tree | 4568714d04808cbe42ffc7cabcdc714fdeef3f62 /st.c | |
parent | 0b2a2fc61325de2dbfc83cad6bf2fadbb207494c (diff) | |
download | st-bddcc7f5ae423fd068ceb643afac4b8c7f487634.tar.gz st-bddcc7f5ae423fd068ceb643afac4b8c7f487634.tar.bz2 |
dump escseq if not handled.
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -591,10 +591,16 @@ tsetscroll(int t, int b) { void eschandle(void) { - /* escdump(); */ switch(escseq.pre) { + default: + goto unknown_seq; 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]); @@ -712,15 +718,13 @@ eschandle(void) { 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); - if(escseq.narg) { + if(escseq.narg) for(i = 0; i < escseq.narg; i++) printf("\targ %d = %d\n", i, escseq.arg[i]); - } printf("mode : %c\n", escseq.mode); } |