| 12345678910111213141516171819202122232425262728293031323334353637 | 
							- #ifndef TERMINAL_H
 
- #define TERMINAL_H
 
- // TODO:  add class.  :P
 
- struct console_details {
 
-   int posx, posy;
 
-   int savedx, savedy;
 
-   char ansi[20]; // current ANSI command being processed.
 
-   int in_ansi;
 
-   int fgcolor; // 0-7 // not 0-15
 
-   int bgcolor; // 0-7
 
-   int status;  // 0, 1 or 5 (Blink)
 
- };
 
- enum ANSI_TYPE {
 
-   START,
 
-   CURSOR,
 
-   COLOR, 
 
-   CLEAR,
 
-   OTHER
 
- };
 
- struct termchar {
 
-   int in_ansi;
 
-   ANSI_TYPE ansi;  // undefined if in_ansi is false
 
- };
 
- void console_init(struct console_details *cdp);
 
- void ansi_color(struct console_details *cdp, int color);
 
- const char *color_restore(struct console_details *cdp);
 
- ANSI_TYPE console_ansi(struct console_details *cdp, const char *ansi);
 
- termchar console_char(struct console_details *cdp, char ch);
 
- void console_string(struct console_details *cdp, const char *chars);
 
- void console_receive(struct console_details *cdp, const char *chars, int len);
 
- #endif
 
 
  |