/*
* $Log$
+ * Revision 1.4 2008/02/07 00:43:27 james
+ * *** empty log message ***
+ *
+ * Revision 1.3 2008/02/07 00:39:13 james
+ * *** empty log message ***
+ *
+ * Revision 1.2 2008/02/06 11:30:37 james
+ * *** empty log message ***
+ *
* Revision 1.1 2008/02/03 23:31:25 james
* *** empty log message ***
*
#define ANSI_INVAL -1
-typedef struct {
-int fd;
+#define ANSI_ESCAPE_BUF_LEN 10
+#define ANSI_ESCAPE_TIMEOUT 100000 /*in ms */
+
+typedef struct
+{
+ int in_escape;
+ struct timeval last_escape;
+ char escape_buf[ANSI_ESCAPE_BUF_LEN];
+ int escape_ptr;
+} ANSI_Parser;
-CRT crt;
-CRT_Pos pos;
-CRT_Pos size;
-int hide_cursor;
+typedef struct
+{
+ int fd;
-int attr;
+ CRT crt;
+ CRT_Pos pos;
+ CRT_Pos size;
+ int hide_cursor;
+ int attr;
+ ANSI_Parser parser;
} ANSI;