3 * - By John Hodge (thePowersGang)
6 * - VT100/xterm Emulation
10 #include "include/vt100.h"
11 #include "include/display.h"
13 static inline int min(int a, int b)
18 int Term_HandleVT100(int Len, const char *Buf)
20 #define MAX_VT100_ESCAPE_LEN 16
21 static char inc_buf[MAX_VT100_ESCAPE_LEN];
22 static int inc_len = 0;
24 if( inc_len > 0 || *Buf == '\x1b' )
26 memcpy(inc_buf + inc_len, Buf, min(MAX_VT100_ESCAPE_LEN - inc_len, Len));
27 // Handle VT100 (like) escape sequence
37 Display_MoveCursor(-1, 0);
40 // TODO: tab (get current cursor pos, space until multiple of 8)
46 // TODO: Carriage return
47 Display_MoveCursor(INT_MIN, 0);