#define MAXROWS   80
#define MAXLINES  24
#define LF        putchar('\n')
#define CR        putchar('\r')
#define BEEP      putchar(7)
#define CLEAR     puts("\033*")
#define MOVE(x,y) puts("\033="); puts(x); puts(y)
#define CURHOME   putchar(30)
#define CURUP     putchar(11)
#define CUDOWN    putchar(22)
#define CURLEFT   putchar(8)
#define CURRIGHT  putchar(12)
#define CUROFF    puts("\033.0")
#define CURON     puts("\033.4")
#define DEL       putchar(127)
#define LINEDEL   puts("\033R")
#define ERALINE   puts("\033T")
#define LINEINS   puts("\033E")
#define BACKDEL   CURLEFT; ERALINE
#define REVON     puts("\033G4")
#define REVOFF    puts("\033G0")
#define REV(str)  REVON; puts(str); REVOFF
#define PUL(str)  puts("\033f"); puts(str); puts("\015\033g")
#define HALFON    puts("\033)")
#define HALFOFF   puts("\033(")
#define HALF(str) HALFON; puts(str); HALFOFF
#define MON       puts("\033U")
#define MOFF      puts("\033X")
#define PMON      puts("\033&")
#define PMOFF     puts("\033'")
