home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************/
- /* */
- /* ANSI screen controls */
- /* */
- /************************************************************************/
-
-
- /*
- ** Cursor Movement - argument is # of positions to move.
- */
-
- #define ANSI_up(a) fprintf(stderr, "%c[%dA", ESC, a)
- #define ANSI_down(a) fprintf(stderr, "%c[%dB", ESC, a)
- #define ANSI_right(a) fprintf(stderr, "%c[%dC", ESC, a)
- #define ANSI_left(a) fprintf(stderr, "%c[%dD", ESC, a)
-
- /*
- ** Cup and locate appear to work identically.
- ** Arguments are (row,col). Home == (1,1)
- */
-
- #define ANSI_cup(a,b) fprintf(stderr, "%c[%d;%dH", ESC, a, b)
- #define ANSI_locate(a,b) fprintf(stderr, "%c[%d;%df", ESC, a, b)
-
- /*
- ** Clear the entire screen.
- */
-
- #define ANSI_cls_s "\x1b[2J"
- #define ANSI_cls() fputs(ANSI_cls_s, stderr)
-
- /*
- ** Clear to end-of-line.
- */
-
- #define ANSI_cleol() fputs("\x1b[K", stderr)
-