/* %G% (Berkeley) @(#)curses.h 1.3 */
# define _puts(s) tputs(s, 0, _putchar);
typedef struct sgttyb SGTTY
;
* Capabilities from termcap
bool AM
, BS
, CA
, DA
, DB
, EO
, GT
, HZ
, IN
, MI
, MS
, NC
, OS
, UL
, XN
;
char *AL
, *BC
, *BT
, *CD
, *CE
, *CL
, *CM
, *DC
, *DL
, *DM
, *DO
, *ED
,
*EI
, *HO
, *IC
, *IM
, *IP
, *LL
, *MA
, *ND
, *SE
, *SF
, *SO
, *SR
,
*TA
, *TE
, *TI
, *UC
, *UE
, *UP
, *US
, *VB
, *VE
, *VS
, PC
;
# define WINDOW struct _win_st
extern bool My_term
, _echoit
, _rawmode
, _endwin
;
extern char *Def_term
, ttytype
[];
extern int LINES
, COLS
, _tty_ch
, _res_flg
;
* Define VOID to stop lint from generating "null effect"
# define VOID(x) (__void__ = (int) (x))
* psuedo functions for standard screen
# define addch(ch) VOID(waddch(stdscr, ch))
# define getch() VOID(wgetch(stdscr))
# define addstr(str) VOID(waddstr(stdscr, str))
# define getstr(str) VOID(wgetstr(stdscr, str))
# define move(y, x) VOID(wmove(stdscr, y, x))
# define clear() VOID(wclear(stdscr))
# define erase() VOID(werase(stdscr))
# define clrtobot() VOID(wclrtobot(stdscr))
# define clrtoeol() VOID(wclrtoeol(stdscr))
# define insertln() VOID(winsertln(stdscr))
# define deleteln() VOID(wdeleteln(stdscr))
# define refresh() VOID(wrefresh(stdscr))
# define inch() VOID(winch(stdscr))
# define standout() VOID(wstandout(stdscr))
# define standend() VOID(wstandend(stdscr))
#define mvwaddch(win,y,x,ch) VOID(wmove(win,y,x)==ERR?ERR:waddch(win,ch))
#define mvwgetch(win,y,x) VOID(wmove(win,y,x)==ERR?ERR:wgetch(win))
#define mvwaddstr(win,y,x,str) VOID(wmove(win,y,x)==ERR?ERR:waddstr(win,str))
#define mvwgetstr(win,y,x) VOID(wmove(win,y,x)==ERR?ERR:wgetstr(win))
#define mvwinch(win,y,x) VOID(wmove(win,y,x) == ERR ? ERR : winch(win))
#define mvaddch(y,x,ch) mvwaddch(stdscr,y,x,ch)
#define mvgetch(y,x) mvwgetch(stdscr,y,x)
#define mvaddstr(y,x,str) mvwaddstr(stdscr,y,x,str)
#define mvgetstr(y,x) mvwgetstr(stdscr,y,x)
#define mvinch(y,x) mvwinch(win,y,x)
#define clearok(win,bf) (win->_clear = bf)
#define leaveok(win,bf) (win->_leave = bf)
#define scrollok(win,bf) (win->_scroll = bf)
#define flushok(win,bf) (bf ? (win->_flags |= _FLUSH):(win->_flags &= ~_FLUSH))
#define getyx(win,y,x) y = win->_cury, x = win->_curx
#define winch(win) (win->_y[win->_cury][win->_curx])
#define raw() (_tty.sg_flags|=RAW, _pfast=_rawmode=TRUE, stty(_tty_ch,&_tty))
#define noraw() (_tty.sg_flags&=~RAW,_rawmode=FALSE,_pfast=!(_tty.sg_flags&CRMOD),stty(_tty_ch,&_tty))
#define crmode() (_tty.sg_flags |= CBREAK, _rawmode = TRUE, stty(_tty_ch,&_tty))
#define nocrmode() (_tty.sg_flags &= ~CBREAK,_rawmode=FALSE,stty(_tty_ch,&_tty))
#define echo() (_tty.sg_flags |= ECHO, _echoit = TRUE, stty(_tty_ch, &_tty))
#define noecho() (_tty.sg_flags &= ~ECHO, _echoit = FALSE, stty(_tty_ch, &_tty))
#define nl() (_tty.sg_flags |= CRMOD,_pfast = _rawmode,stty(_tty_ch, &_tty))
#define nonl() (_tty.sg_flags &= ~CRMOD, _pfast = TRUE, stty(_tty_ch, &_tty))
#define savetty() (gtty(_tty_ch, &_tty), _res_flg = _tty.sg_flags)
#define resetty() (_tty.sg_flags = _res_flg, stty(_tty_ch, &_tty))
WINDOW
*initscr(), *newwin(), *subwin();