billiob pushed a commit to branch master.
commit a8206c8b03f947b416f126b306e4422f9dc6c581
Author: Boris Faure <[email protected]>
Date: Sat Aug 31 17:03:02 2013 +0200
add some comments, clean-up code
---
src/bin/termptyesc.c | 22 ++++++++++++----------
1 file 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)
priv = 1;
b++;
}
- if (priv)
+ if (priv) /* DEC Private Mode Reset (DECRST) */
{
while (b)
{
@@ -861,37 +861,39 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c,
Eina_Unicode *ce)
// INF("XXX: enable mouse wheel -> cursor key
xlation %i", mode);
break;
default:
- ERR("unhandled screen mode arg %i", arg);
+ ERR("unhandled DEC Private Reset Mode arg
%i", arg);
break;
}
}
}
}
- else
+ else /* Reset Mode (RM) */
{
while (b)
{
arg = _csi_arg_get(&b);
if (b)
{
- if (arg == 1)
+ switch (arg)
{
+ case 1:
handled = 1;
ty->state.appcursor = mode;
- }
- else if (arg == 4)
- {
+ break;
+ case 4:
handled = 1;
DBG("DDD: set insert mode to %i", mode);
ty->state.insert = mode;
- }
+ break;
// else if (arg == 24)
// {
// ERR("unhandled #24 arg %i", arg);
// // ???
// }
- else
- ERR("unhandled screen non-priv mode arg %i, mode
%i, ch '%c'", arg, mode, *cc);
+ default:
+ handled = 1;
+ ERR("unhandled ANSI Reset Mode arg %i", arg);
+ }
}
}
}
--
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk