home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
495a.lha
/
Scan
/
ansicodes.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-06
|
1KB
|
46 lines
#include "console.h"
#define clear_screen() puts("\x1b[0;0H\x1b[J")
#define cursor_off() puts("\x1b[0 p")
#define cursor_on() puts("\x1b[ p")
#define put_cursor(x,y) printf("\x1b[%d;%dH",y,x)
#define cursor_bot() printf("\x1b[%d;1H",pagelen+1)
#define cursor_up(n) printf("\x1b[%dA",n)
#define cursor_dn(n) printf("\x1b[%dB",n)
#define cursor_rt(n) printf("\x1b[%dC",n)
#define cursor_lt(n) printf("\x1b[%dD",n)
#define cursor_dl(n) printf("\x1b[%dE",n)
#define cursor_ul(n) printf("\x1b[%dF",n)
#define erase_eol() puts("\x1b[K")
#define erase_eos() puts("\x1b[J")
#define CLILineLength(n) puts("(n)u")
#define CLILeftBorder(n) puts("(n)x")
#define CLITopBorder(n) puts("(n)y")
#define CLINumberOfLines(n) puts("(n)t")
#define setforecolor0() puts("\x1b[30m")
#define setforecolor1() puts("\x1b[31m")
#define setforecolor2() puts("\x1b[32m")
#define setforecolor3() puts("\x1b[33m")
#define setbackcolor0() puts("\x1b[40m")
#define setbackcolor1() puts("\x1b[41m")
#define setbackcolor2() puts("\x1b[42m")
#define setbackcolor3() puts("\x1b[43m")
#define set_hilite() puts("\x1b[0;32;43m")
#define set_bold() puts("\x1b[1m")
#define set_italic() puts("\x1b[3m")
#define set_underline() puts("\x1b[4m")
#define set_inverse() puts("\x1b[7m")
#define set_normal() puts("\x1b[0m")