+
+void
+vt102_parse_attr_string (VT102 * v, char *buf, int len)
+{
+ int private = 0;
+ char last = buf[len - 1];
+ char num[4];
+ int o;
+
+ memset (num, 0, sizeof (num));
+ o = sizeof (num) - 1;
+
+ len--;
+
+ if (len < 0)
+ return;
+
+ while (len--)
+ {
+ if (*buf == ';')
+ {
+ vt102_change_attr (v, &num[o]);
+ memset (num, 0, sizeof (num));
+ o = sizeof (num) - 1;
+ buf++;
+ continue;
+ }
+
+ num[0] = num[1];
+ num[1] = num[2];
+ num[2] = *buf;
+
+ if (o)
+ o--;
+
+ buf++;
+ }
+ vt102_change_attr (v, &num[o]);
+}
+
+void
+vt102_parse_esc (VT102 * v, int c)
+{
+
+ switch (c)
+ {
+#if 0
+ case '=':
+ case '>':
+ {
+ char s[] = { 033, c };
+/*Horrid hack for the moment in testing change the key mode of the upstream te*/
+ write (1, s, 2);
+ }
+ break;
+#endif
+ default:
+ fprintf (stderr, "unhandled ESC \\033 \\%03o (ESC %c)\n", c,
+ (c < 32) ? '?' : c);
+ }
+}