/*
* $Log$
+ * Revision 1.17 2008/02/07 01:58:28 james
+ * *** empty log message ***
+ *
+ * Revision 1.16 2008/02/07 01:57:46 james
+ * *** empty log message ***
+ *
+ * Revision 1.15 2008/02/07 00:43:27 james
+ * *** empty log message ***
+ *
+ * Revision 1.14 2008/02/07 00:40:23 james
+ * *** empty log message ***
+ *
+ * Revision 1.13 2008/02/07 00:39:59 james
+ * *** empty log message ***
+ *
* Revision 1.12 2008/02/07 00:39:13 james
* *** empty log message ***
*
CTRL-O
-ESC7
-ESC8
-ESCH
-ESCM
-ESC>
*/
}
static inline int
-csi_starter (int c)
+scs_starter (int c)
{
switch (c)
{
- case '[':
case '(':
case ')':
return 1;
return 0;
}
+static inline int
+csi_starter (int c)
+{
+ switch (c)
+ {
+ case '[':
+ return 1;
+ }
+ return 0;
+}
+
static inline int
in_margins (VT102 * v, CRT_Pos p)
{
case VT102_PRIVATE_MODE_CURSOR_MODE:
if (v->application_keypad_mode)
v->private_modes[m] = 0;
- fprintf (stderr, "APPLICATION CURSOR MODE %d\n",
- v->private_modes[m]);
+#if 1
+ fprintf (stderr, "APPLICATION CURSOR MODE %d wanted %d\n",
+ v->private_modes[m],set);
+#endif
break;
case VT102_PRIVATE_MODE_ORIGIN_MODE:
vt102_cursor_home (v);
v->pending_wrap = 0;
}
+void vt102_scs(VT102 *c,int g,int s)
+{
+/*Ignoring charsets*/
+}
+
void
vt102_parse_esc (VT102 * v, int c)
{
p->in_csi++;
p->in_escape = 0;
}
+ else if (scs_starter(c)) {
+ p->in_scs=c;
+ p->in_escape = 0;
+ }
else
{
p->in_escape = 0;
vt102_parse_esc (v, c);
}
}
+ else if (p->in_scs) {
+ vt102_scs(v,p->in_scs,c);
+ p->in_scs=0;
+ }
else
{
vt102_cursor_carriage_return (v);
break;
/*SO*/ case 14:
+ /*select G1*/
+ /*Ignoring charsets*/
+ break;
/*SI*/ case 15:
+ /*select G0*/
+ /*Ignoring charsets*/
+ break;
/*DLE*/ case 16:
/*DC1 */ case 17:
/*DC2 */ case 18:
p->in_csi = 0;
p->in_escape = 0;
p->csi_ptr = 0;
+ p->in_scs=0;
}
vt102_send (VT102 * v, uint8_t key)
{
uint8_t c;
- fprintf(stderr,"vts: %d(%c)\n",key,(key>31)?key:' ');
+#if 0
+ fprintf (stderr, "vts: %d(%c)\n", key, (key > 31) ? key : ' ');
+#endif
if ((key > 31) && (key < 127))
{
tty_write (v->tty, &key, 1);