mirror of
https://github.com/alrayyes/st.git
synced 2024-11-29 14:06:21 +00:00
dump escseq if not handled.
This commit is contained in:
parent
53937e045a
commit
d5f4554431
1 changed files with 8 additions and 4 deletions
12
st.c
12
st.c
|
@ -591,10 +591,16 @@ tsetscroll(int t, int b) {
|
||||||
|
|
||||||
void
|
void
|
||||||
eschandle(void) {
|
eschandle(void) {
|
||||||
/* escdump(); */
|
|
||||||
switch(escseq.pre) {
|
switch(escseq.pre) {
|
||||||
|
default:
|
||||||
|
goto unknown_seq;
|
||||||
case '[':
|
case '[':
|
||||||
switch(escseq.mode) {
|
switch(escseq.mode) {
|
||||||
|
default:
|
||||||
|
unknown_seq:
|
||||||
|
fprintf(stderr, "erresc: unknown sequence\n");
|
||||||
|
escdump();
|
||||||
|
break;
|
||||||
case '@': /* Insert <n> blank char */
|
case '@': /* Insert <n> blank char */
|
||||||
DEFAULT(escseq.arg[0], 1);
|
DEFAULT(escseq.arg[0], 1);
|
||||||
tinsertblank(escseq.arg[0]);
|
tinsertblank(escseq.arg[0]);
|
||||||
|
@ -712,15 +718,13 @@ eschandle(void) {
|
||||||
void
|
void
|
||||||
escdump(void) {
|
escdump(void) {
|
||||||
int i;
|
int i;
|
||||||
puts("------");
|
|
||||||
printf("rawbuf : %s\n", escseq.buf);
|
printf("rawbuf : %s\n", escseq.buf);
|
||||||
printf("prechar : %c\n", escseq.pre);
|
printf("prechar : %c\n", escseq.pre);
|
||||||
printf("private : %c\n", escseq.priv ? '?' : ' ');
|
printf("private : %c\n", escseq.priv ? '?' : ' ');
|
||||||
printf("narg : %d\n", escseq.narg);
|
printf("narg : %d\n", escseq.narg);
|
||||||
if(escseq.narg) {
|
if(escseq.narg)
|
||||||
for(i = 0; i < escseq.narg; i++)
|
for(i = 0; i < escseq.narg; i++)
|
||||||
printf("\targ %d = %d\n", i, escseq.arg[i]);
|
printf("\targ %d = %d\n", i, escseq.arg[i]);
|
||||||
}
|
|
||||||
printf("mode : %c\n", escseq.mode);
|
printf("mode : %c\n", escseq.mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue