summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2013-08-31 17:03:02 +0200
committerBoris Faure <billiob@gmail.com>2013-08-31 17:12:32 +0200
commita8206c8b03f947b416f126b306e4422f9dc6c581 (patch)
tree012bdcfa535aa2beaa8ed938992940f9bec9de00
parent44c69c8d31ac840c727568600f56f92691d8c720 (diff)
add some comments, clean-up code
-rw-r--r--src/bin/termptyesc.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 7ab7e45..20cbf62 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -610,7 +610,7 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
610 priv = 1; 610 priv = 1;
611 b++; 611 b++;
612 } 612 }
613 if (priv) 613 if (priv) /* DEC Private Mode Reset (DECRST) */
614 { 614 {
615 while (b) 615 while (b)
616 { 616 {
@@ -861,37 +861,39 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
861// INF("XXX: enable mouse wheel -> cursor key xlation %i", mode); 861// INF("XXX: enable mouse wheel -> cursor key xlation %i", mode);
862 break; 862 break;
863 default: 863 default:
864 ERR("unhandled screen mode arg %i", arg); 864 ERR("unhandled DEC Private Reset Mode arg %i", arg);
865 break; 865 break;
866 } 866 }
867 } 867 }
868 } 868 }
869 } 869 }
870 else 870 else /* Reset Mode (RM) */
871 { 871 {
872 while (b) 872 while (b)
873 { 873 {
874 arg = _csi_arg_get(&b); 874 arg = _csi_arg_get(&b);
875 if (b) 875 if (b)
876 { 876 {
877 if (arg == 1) 877 switch (arg)
878 { 878 {
879 case 1:
879 handled = 1; 880 handled = 1;
880 ty->state.appcursor = mode; 881 ty->state.appcursor = mode;
881 } 882 break;
882 else if (arg == 4) 883 case 4:
883 {
884 handled = 1; 884 handled = 1;
885 DBG("DDD: set insert mode to %i", mode); 885 DBG("DDD: set insert mode to %i", mode);
886 ty->state.insert = mode; 886 ty->state.insert = mode;
887 } 887 break;
888// else if (arg == 24) 888// else if (arg == 24)
889// { 889// {
890// ERR("unhandled #24 arg %i", arg); 890// ERR("unhandled #24 arg %i", arg);
891// // ??? 891// // ???
892// } 892// }
893 else 893 default:
894 ERR("unhandled screen non-priv mode arg %i, mode %i, ch '%c'", arg, mode, *cc); 894 handled = 1;
895 ERR("unhandled ANSI Reset Mode arg %i", arg);
896 }
895 } 897 }
896 } 898 }
897 } 899 }