aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-02-06 22:33:15 +0100
committerBoris Faure <billiob@gmail.com>2019-02-06 22:33:15 +0100
commit09bd49ea3404b3c6bf43aeac2d2aa7b7bc0fd945 (patch)
tree549cf6ee6864de023789a55328f93fe8ce2077ab
parenttermptyesc: handle DECSWBV + tests (diff)
downloadterminology-09bd49ea3404b3c6bf43aeac2d2aa7b7bc0fd945.tar.gz
termptyesc: better debug
-rw-r--r--src/bin/termptyesc.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index b80c11c..bac4b80 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -168,6 +168,7 @@ _csi_arg_get(Termpty *ty, Eina_Unicode **ptr)
return sum;
error:
+ ERR("Invalid CSI argument");
ty->decoding_error = EINA_TRUE;
*ptr = NULL;
return -CSI_ARG_ERROR;
@@ -484,7 +485,7 @@ _handle_esc_csi_reset_mode(Termpty *ty, Eina_Unicode cc, Eina_Unicode *b,
/* libreadline6 emits it but it shouldn't.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=577012
*/
- DBG("Ignored screen mode %i", arg);
+ WRN("Ignored screen mode %i", arg);
ty->decoding_error = EINA_TRUE;
break;
case 1047:
@@ -2735,6 +2736,7 @@ _handle_esc_csi_decst8c(Termpty *ty, Eina_Unicode **ptr)
return;
if ((arg != -CSI_ARG_NO_VALUE) && (arg != 5))
{
+ ERR("Invalid DECST8C argument");
ty->decoding_error = EINA_TRUE;
return;
}
@@ -3228,7 +3230,10 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
if (*(cc-1) == '$')
_handle_esc_csi_deccra(ty, &b);
else
+ {
+ ERR("unhandled 'v' CSI escape code");
ty->decoding_error = EINA_TRUE;
+ }
break;
case 'x':
if (*(cc-1) == '$')
@@ -3236,27 +3241,40 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
else if (*(cc-1) == '*')
_handle_esc_csi_decsace(ty, &b);
else
+ {
+ ERR("unhandled 'x' CSI escape code");
ty->decoding_error = EINA_TRUE;
+ }
break;
case 'z':
if (*(cc-1) == '$')
_handle_esc_csi_decera(ty, &b);
else
+ {
+ ERR("unhandled 'z' CSI escape code");
ty->decoding_error = EINA_TRUE;
+ }
break;
case '}':
if (*(cc-1) == '\'')
_handle_esc_csi_decic(ty, &b);
else
+ {
+ ERR("unhandled '}' CSI escape code");
ty->decoding_error = EINA_TRUE;
+ }
break;
case '~':
if (*(cc-1) == '\'')
_handle_esc_csi_decdc(ty, &b);
else
+ {
+ ERR("unhandled '~' CSI escape code");
ty->decoding_error = EINA_TRUE;
+ }
break;
default:
+ ERR("unhandled '0x%x' CSI escape code", *cc);
goto unhandled;
}
cc++;
@@ -3652,7 +3670,8 @@ _handle_esc_osc(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
// XXX: set palette entry. not supported.
ty->decoding_error = EINA_TRUE;
WRN("set palette, not supported");
- if ((cc - c) < 3) return 0;
+ if ((cc - c) < 3)
+ return 0;
break;
case 8:
DBG("hyperlink");