forked from enlightenment/terminology
termptyesc: better debug
This commit is contained in:
parent
4eefb44ee1
commit
09bd49ea34
|
@ -168,6 +168,7 @@ _csi_arg_get(Termpty *ty, Eina_Unicode **ptr)
|
||||||
return sum;
|
return sum;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
ERR("Invalid CSI argument");
|
||||||
ty->decoding_error = EINA_TRUE;
|
ty->decoding_error = EINA_TRUE;
|
||||||
*ptr = NULL;
|
*ptr = NULL;
|
||||||
return -CSI_ARG_ERROR;
|
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.
|
/* libreadline6 emits it but it shouldn't.
|
||||||
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=577012
|
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;
|
ty->decoding_error = EINA_TRUE;
|
||||||
break;
|
break;
|
||||||
case 1047:
|
case 1047:
|
||||||
|
@ -2735,6 +2736,7 @@ _handle_esc_csi_decst8c(Termpty *ty, Eina_Unicode **ptr)
|
||||||
return;
|
return;
|
||||||
if ((arg != -CSI_ARG_NO_VALUE) && (arg != 5))
|
if ((arg != -CSI_ARG_NO_VALUE) && (arg != 5))
|
||||||
{
|
{
|
||||||
|
ERR("Invalid DECST8C argument");
|
||||||
ty->decoding_error = EINA_TRUE;
|
ty->decoding_error = EINA_TRUE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3228,7 +3230,10 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
|
||||||
if (*(cc-1) == '$')
|
if (*(cc-1) == '$')
|
||||||
_handle_esc_csi_deccra(ty, &b);
|
_handle_esc_csi_deccra(ty, &b);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
ERR("unhandled 'v' CSI escape code");
|
||||||
ty->decoding_error = EINA_TRUE;
|
ty->decoding_error = EINA_TRUE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'x':
|
case 'x':
|
||||||
if (*(cc-1) == '$')
|
if (*(cc-1) == '$')
|
||||||
|
@ -3236,27 +3241,40 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
|
||||||
else if (*(cc-1) == '*')
|
else if (*(cc-1) == '*')
|
||||||
_handle_esc_csi_decsace(ty, &b);
|
_handle_esc_csi_decsace(ty, &b);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
ERR("unhandled 'x' CSI escape code");
|
||||||
ty->decoding_error = EINA_TRUE;
|
ty->decoding_error = EINA_TRUE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'z':
|
case 'z':
|
||||||
if (*(cc-1) == '$')
|
if (*(cc-1) == '$')
|
||||||
_handle_esc_csi_decera(ty, &b);
|
_handle_esc_csi_decera(ty, &b);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
ERR("unhandled 'z' CSI escape code");
|
||||||
ty->decoding_error = EINA_TRUE;
|
ty->decoding_error = EINA_TRUE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case '}':
|
case '}':
|
||||||
if (*(cc-1) == '\'')
|
if (*(cc-1) == '\'')
|
||||||
_handle_esc_csi_decic(ty, &b);
|
_handle_esc_csi_decic(ty, &b);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
ERR("unhandled '}' CSI escape code");
|
||||||
ty->decoding_error = EINA_TRUE;
|
ty->decoding_error = EINA_TRUE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case '~':
|
case '~':
|
||||||
if (*(cc-1) == '\'')
|
if (*(cc-1) == '\'')
|
||||||
_handle_esc_csi_decdc(ty, &b);
|
_handle_esc_csi_decdc(ty, &b);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
ERR("unhandled '~' CSI escape code");
|
||||||
ty->decoding_error = EINA_TRUE;
|
ty->decoding_error = EINA_TRUE;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
ERR("unhandled '0x%x' CSI escape code", *cc);
|
||||||
goto unhandled;
|
goto unhandled;
|
||||||
}
|
}
|
||||||
cc++;
|
cc++;
|
||||||
|
@ -3652,7 +3670,8 @@ _handle_esc_osc(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
|
||||||
// XXX: set palette entry. not supported.
|
// XXX: set palette entry. not supported.
|
||||||
ty->decoding_error = EINA_TRUE;
|
ty->decoding_error = EINA_TRUE;
|
||||||
WRN("set palette, not supported");
|
WRN("set palette, not supported");
|
||||||
if ((cc - c) < 3) return 0;
|
if ((cc - c) < 3)
|
||||||
|
return 0;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
DBG("hyperlink");
|
DBG("hyperlink");
|
||||||
|
|
Loading…
Reference in New Issue