#define MAXROWS   80
#define MAXLINES  24
#define LF        putchar('\n')
#define CR        putchar('\r')
#define CRLF      CR; LF
#define BEEP      putchar(7)
#define CLEAR     printf("\033*")
#define MOVE(x,y) printf("\033="); printf(x); printf(y)
#define CURHOME   putchar(30)
#define CURUP     putchar(11)
#define CUDOWN    putchar(22)
#define CURLEFT   putchar(8)
#define CURRIGHT  putchar(12)
#define CUROFF    printf("\033.0")
#define CURON     printf("\033.4")
#define ERALINE   printf("\033T")
#define LINEINS   printf("\033E")
#define BACKDEL   CURLEFT; ERALINE
#define PUL(str)  printf("\033f"); printf(str); printf("\015\033g")
#define HALFON    printf("\033)")
#define HALFOFF   printf("\033(")
#define HALF(str) HALFON; printf(str); HALFOFF
