Home | History | Annotate | Line # | Download | only in libcurses
curses.h revision 1.21
      1  1.21    perry /*	$NetBSD: curses.h,v 1.21 1998/01/30 04:33:32 perry Exp $	*/
      2  1.18    mikel 
      3   1.1      cgd /*
      4  1.13      cgd  * Copyright (c) 1981, 1993, 1994
      5   1.7      cgd  *	The Regents of the University of California.  All rights reserved.
      6   1.1      cgd  *
      7   1.1      cgd  * Redistribution and use in source and binary forms, with or without
      8   1.1      cgd  * modification, are permitted provided that the following conditions
      9   1.1      cgd  * are met:
     10   1.1      cgd  * 1. Redistributions of source code must retain the above copyright
     11   1.1      cgd  *    notice, this list of conditions and the following disclaimer.
     12   1.1      cgd  * 2. Redistributions in binary form must reproduce the above copyright
     13   1.1      cgd  *    notice, this list of conditions and the following disclaimer in the
     14   1.1      cgd  *    documentation and/or other materials provided with the distribution.
     15   1.1      cgd  * 3. All advertising materials mentioning features or use of this software
     16   1.1      cgd  *    must display the following acknowledgement:
     17   1.1      cgd  *	This product includes software developed by the University of
     18   1.1      cgd  *	California, Berkeley and its contributors.
     19   1.1      cgd  * 4. Neither the name of the University nor the names of its contributors
     20   1.1      cgd  *    may be used to endorse or promote products derived from this software
     21   1.1      cgd  *    without specific prior written permission.
     22   1.1      cgd  *
     23   1.1      cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24   1.1      cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25   1.1      cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26   1.1      cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27   1.1      cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28   1.1      cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29   1.1      cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30   1.1      cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31   1.1      cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32   1.1      cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33   1.1      cgd  * SUCH DAMAGE.
     34   1.1      cgd  *
     35  1.21    perry  *	@(#)curses.h	8.5 (Berkeley) 4/29/95
     36   1.1      cgd  */
     37   1.1      cgd 
     38   1.4  mycroft #ifndef _CURSES_H_
     39   1.4  mycroft #define	_CURSES_H_
     40   1.1      cgd 
     41   1.4  mycroft #include <stdio.h>
     42  1.20    lukem #include <termcap.h>
     43   1.1      cgd 
     44   1.4  mycroft /*
     45   1.4  mycroft  * The following #defines and #includes are present for backward
     46   1.4  mycroft  * compatibility only.  They should not be used in future code.
     47   1.4  mycroft  *
     48   1.4  mycroft  * START BACKWARD COMPATIBILITY ONLY.
     49   1.4  mycroft  */
     50   1.4  mycroft #ifndef _CURSES_PRIVATE
     51  1.21    perry #ifndef __cplusplus
     52   1.1      cgd #define	bool	char
     53  1.21    perry #endif
     54   1.1      cgd #define	reg	register
     55   1.1      cgd 
     56   1.4  mycroft #ifndef TRUE
     57   1.1      cgd #define	TRUE	(1)
     58   1.4  mycroft #endif
     59   1.4  mycroft #ifndef FALSE
     60   1.1      cgd #define	FALSE	(0)
     61   1.4  mycroft #endif
     62   1.1      cgd 
     63   1.4  mycroft #define	_puts(s)	tputs(s, 0, __cputchar)
     64   1.4  mycroft #define	_putchar(c)	__cputchar(c)
     65   1.1      cgd 
     66   1.4  mycroft /* Old-style terminal modes access. */
     67   1.7      cgd #define	baudrate()	(cfgetospeed(&__baset))
     68   1.4  mycroft #define	crmode()	cbreak()
     69   1.7      cgd #define	erasechar()	(__baset.c_cc[VERASE])
     70   1.7      cgd #define	killchar()	(__baset.c_cc[VKILL])
     71   1.4  mycroft #define	nocrmode()	nocbreak()
     72   1.7      cgd #define	ospeed		(cfgetospeed(&__baset))
     73   1.4  mycroft #endif /* _CURSES_PRIVATE */
     74   1.4  mycroft 
     75   1.7      cgd extern char	 GT;			/* Gtty indicates tabs. */
     76   1.7      cgd extern char	 NONL;			/* Term can't hack LF doing a CR. */
     77   1.7      cgd extern char	 UPPERCASE;		/* Terminal is uppercase only. */
     78   1.7      cgd 
     79   1.4  mycroft extern int	 My_term;		/* Use Def_term regardless. */
     80   1.4  mycroft extern char	*Def_term;		/* Default terminal type. */
     81   1.4  mycroft 
     82   1.4  mycroft /* Termcap capabilities. */
     83  1.10      cgd extern char	AM, BS, CA, DA, EO, HC, IN, MI, MS, NC, NS, OS,
     84   1.4  mycroft 		PC, UL, XB, XN, XT, XS, XX;
     85   1.1      cgd extern char	*AL, *BC, *BT, *CD, *CE, *CL, *CM, *CR, *CS, *DC, *DL,
     86   1.1      cgd 		*DM, *DO, *ED, *EI, *K0, *K1, *K2, *K3, *K4, *K5, *K6,
     87   1.1      cgd 		*K7, *K8, *K9, *HO, *IC, *IM, *IP, *KD, *KE, *KH, *KL,
     88   1.1      cgd 		*KR, *KS, *KU, *LL, *MA, *ND, *NL, *RC, *SC, *SE, *SF,
     89   1.1      cgd 		*SO, *SR, *TA, *TE, *TI, *UC, *UE, *UP, *US, *VB, *VS,
     90   1.7      cgd 		*VE, *al, *dl, *sf, *sr,
     91   1.4  mycroft 		*AL_PARM, *DL_PARM, *UP_PARM, *DOWN_PARM, *LEFT_PARM,
     92   1.4  mycroft 		*RIGHT_PARM;
     93   1.4  mycroft 
     94   1.7      cgd /* END BACKWARD COMPATIBILITY ONLY. */
     95   1.7      cgd 
     96   1.7      cgd /* 8-bit ASCII characters. */
     97   1.7      cgd #define	unctrl(c)		__unctrl[(c) & 0xff]
     98   1.7      cgd #define	unctrllen(ch)		__unctrllen[(ch) & 0xff]
     99   1.7      cgd 
    100   1.7      cgd extern char	*__unctrl[256];	/* Control strings. */
    101   1.7      cgd extern char	 __unctrllen[256];	/* Control strings length. */
    102   1.7      cgd 
    103   1.7      cgd /*
    104   1.7      cgd  * A window an array of __LINE structures pointed to by the 'lines' pointer.
    105   1.7      cgd  * A line is an array of __LDATA structures pointed to by the 'line' pointer.
    106   1.7      cgd  *
    107   1.7      cgd  * IMPORTANT: the __LDATA structure must NOT induce any padding, so if new
    108   1.7      cgd  * fields are added -- padding fields with *constant values* should ensure
    109   1.7      cgd  * that the compiler will not generate any padding when storing an array of
    110   1.7      cgd  *  __LDATA structures.  This is to enable consistent use of memcmp, and memcpy
    111   1.7      cgd  * for comparing and copying arrays.
    112   1.7      cgd  */
    113   1.7      cgd typedef struct {
    114   1.7      cgd 	char ch;			/* the actual character */
    115   1.7      cgd 
    116   1.7      cgd #define	__STANDOUT	0x01  		/* Added characters are standout. */
    117   1.7      cgd 	char attr;			/* attributes of character */
    118   1.7      cgd } __LDATA;
    119   1.7      cgd 
    120   1.7      cgd #define __LDATASIZE	(sizeof(__LDATA))
    121   1.7      cgd 
    122   1.7      cgd typedef struct {
    123   1.7      cgd #define	__ISDIRTY	0x01		/* Line is dirty. */
    124   1.7      cgd #define __ISPASTEOL	0x02		/* Cursor is past end of line */
    125   1.7      cgd #define __FORCEPAINT	0x04		/* Force a repaint of the line */
    126  1.16      jtc 	unsigned int flags;
    127  1.16      jtc 	unsigned int hash;		/* Hash value for the line. */
    128   1.7      cgd 	size_t *firstchp, *lastchp;	/* First and last chngd columns ptrs */
    129   1.7      cgd 	size_t firstch, lastch;		/* First and last changed columns. */
    130   1.7      cgd 	__LDATA *line;			/* Pointer to the line text. */
    131   1.7      cgd } __LINE;
    132   1.7      cgd 
    133   1.7      cgd typedef struct __window {		/* Window structure. */
    134   1.7      cgd 	struct __window	*nextp, *orig;	/* Subwindows list and parent. */
    135   1.7      cgd 	size_t begy, begx;		/* Window home. */
    136   1.7      cgd 	size_t cury, curx;		/* Current x, y coordinates. */
    137   1.7      cgd 	size_t maxy, maxx;		/* Maximum values for curx, cury. */
    138   1.7      cgd 	short ch_off;			/* x offset for firstch/lastch. */
    139   1.7      cgd 	__LINE **lines;			/* Array of pointers to the lines */
    140   1.7      cgd 	__LINE  *lspace;		/* line space (for cleanup) */
    141   1.7      cgd 	__LDATA *wspace;		/* window space (for cleanup) */
    142   1.7      cgd 
    143   1.7      cgd #define	__ENDLINE	0x001		/* End of screen. */
    144   1.7      cgd #define	__FLUSH		0x002		/* Fflush(stdout) after refresh. */
    145  1.13      cgd #define	__FULLWIN	0x004		/* Window is a screen. */
    146  1.13      cgd #define	__IDLINE	0x008		/* Insert/delete sequences. */
    147  1.13      cgd #define	__SCROLLWIN	0x010		/* Last char will scroll window. */
    148  1.13      cgd #define	__SCROLLOK	0x020		/* Scrolling ok. */
    149  1.13      cgd #define	__CLEAROK	0x040		/* Clear on next refresh. */
    150  1.13      cgd #define __WSTANDOUT	0x080		/* Standout window */
    151  1.13      cgd #define __LEAVEOK	0x100		/* If curser left */
    152  1.16      jtc 	unsigned int flags;
    153   1.7      cgd } WINDOW;
    154   1.7      cgd 
    155   1.4  mycroft /* Curses external declarations. */
    156   1.4  mycroft extern WINDOW	*curscr;		/* Current screen. */
    157   1.4  mycroft extern WINDOW	*stdscr;		/* Standard screen. */
    158   1.4  mycroft 
    159   1.7      cgd extern struct termios __orig_termios;	/* Terminal state before curses */
    160   1.7      cgd extern struct termios __baset;		/* Our base terminal state */
    161   1.7      cgd extern int __tcaction;			/* If terminal hardware set. */
    162   1.4  mycroft 
    163   1.4  mycroft extern int	 COLS;			/* Columns on the screen. */
    164   1.4  mycroft extern int	 LINES;			/* Lines on the screen. */
    165   1.4  mycroft 
    166   1.4  mycroft extern char	*ttytype;		/* Full name of current terminal. */
    167   1.4  mycroft 
    168   1.4  mycroft #define	ERR	(0)			/* Error return. */
    169   1.4  mycroft #define	OK	(1)			/* Success return. */
    170   1.4  mycroft 
    171   1.4  mycroft /* Standard screen pseudo functions. */
    172   1.7      cgd #define	addbytes(s, n)			__waddbytes(stdscr, s, n, 0)
    173   1.7      cgd #define	addch(ch)			waddch(stdscr, ch)
    174   1.7      cgd #define	addnstr(s, n)			waddnstr(stdscr, s, n)
    175   1.7      cgd #define	addstr(s)			__waddbytes(stdscr, s, strlen(s), 0)
    176   1.7      cgd #define	clear()				wclear(stdscr)
    177   1.7      cgd #define	clrtobot()			wclrtobot(stdscr)
    178   1.7      cgd #define	clrtoeol()			wclrtoeol(stdscr)
    179   1.7      cgd #define	delch()				wdelch(stdscr)
    180   1.7      cgd #define	deleteln()			wdeleteln(stdscr)
    181   1.7      cgd #define	erase()				werase(stdscr)
    182   1.7      cgd #define	getch()				wgetch(stdscr)
    183   1.7      cgd #define	getstr(s)			wgetstr(stdscr, s)
    184   1.7      cgd #define	inch()				winch(stdscr)
    185   1.7      cgd #define	insch(ch)			winsch(stdscr, ch)
    186   1.7      cgd #define	insertln()			winsertln(stdscr)
    187   1.7      cgd #define	move(y, x)			wmove(stdscr, y, x)
    188   1.7      cgd #define	refresh()			wrefresh(stdscr)
    189   1.7      cgd #define	standend()			wstandend(stdscr)
    190   1.7      cgd #define	standout()			wstandout(stdscr)
    191   1.7      cgd #define	waddbytes(w, s, n)		__waddbytes(w, s, n, 0)
    192   1.7      cgd #define	waddstr(w, s)			__waddbytes(w, s, strlen(s), 0)
    193   1.4  mycroft 
    194   1.4  mycroft /* Standard screen plus movement pseudo functions. */
    195   1.7      cgd #define	mvaddbytes(y, x, s, n)		mvwaddbytes(stdscr, y, x, s, n)
    196   1.7      cgd #define	mvaddch(y, x, ch)		mvwaddch(stdscr, y, x, ch)
    197   1.7      cgd #define	mvaddnstr(y, x, s, n)		mvwaddnstr(stdscr, y, x, s, n)
    198   1.7      cgd #define	mvaddstr(y, x, s)		mvwaddstr(stdscr, y, x, s)
    199   1.7      cgd #define	mvdelch(y, x)			mvwdelch(stdscr, y, x)
    200   1.7      cgd #define	mvgetch(y, x)			mvwgetch(stdscr, y, x)
    201   1.7      cgd #define	mvgetstr(y, x, s)		mvwgetstr(stdscr, y, x, s)
    202   1.7      cgd #define	mvinch(y, x)			mvwinch(stdscr, y, x)
    203   1.7      cgd #define	mvinsch(y, x, c)		mvwinsch(stdscr, y, x, c)
    204   1.7      cgd #define	mvwaddbytes(w, y, x, s, n) \
    205   1.7      cgd 	(wmove(w, y, x) == ERR ? ERR : __waddbytes(w, s, n, 0))
    206   1.7      cgd #define	mvwaddch(w, y, x, ch) \
    207   1.7      cgd 	(wmove(w, y, x) == ERR ? ERR : waddch(w, ch))
    208   1.7      cgd #define	mvwaddnstr(w, y, x, s, n) \
    209   1.7      cgd 	(wmove(w, y, x) == ERR ? ERR : waddnstr(w, s, n))
    210   1.7      cgd #define	mvwaddstr(w, y, x, s) \
    211   1.7      cgd 	(wmove(w, y, x) == ERR ? ERR : __waddbytes(w, s, strlen(s), 0))
    212   1.7      cgd #define	mvwdelch(w, y, x) \
    213   1.7      cgd 	(wmove(w, y, x) == ERR ? ERR : wdelch(w))
    214   1.7      cgd #define	mvwgetch(w, y, x) \
    215   1.7      cgd 	(wmove(w, y, x) == ERR ? ERR : wgetch(w))
    216   1.7      cgd #define	mvwgetstr(w, y, x, s) \
    217   1.7      cgd 	(wmove(w, y, x) == ERR ? ERR : wgetstr(w, s))
    218   1.7      cgd #define	mvwinch(w, y, x) \
    219   1.7      cgd 	(wmove(w, y, x) == ERR ? ERR : winch(w))
    220   1.7      cgd #define	mvwinsch(w, y, x, c) \
    221   1.7      cgd 	(wmove(w, y, x) == ERR ? ERR : winsch(w, c))
    222   1.7      cgd 
    223  1.17      jtc 
    224   1.7      cgd /* Psuedo functions. */
    225   1.7      cgd #define	clearok(w, bf) \
    226   1.7      cgd 	((bf) ? ((w)->flags |= __CLEAROK) : ((w)->flags &= ~__CLEAROK))
    227   1.7      cgd #define	flushok(w, bf) \
    228   1.7      cgd 	((bf) ? ((w)->flags |= __FLUSH) : ((w)->flags &= ~__FLUSH))
    229   1.7      cgd #define	leaveok(w, bf) \
    230   1.7      cgd 	((bf) ? ((w)->flags |= __LEAVEOK) : ((w)->flags &= ~__LEAVEOK))
    231   1.7      cgd #define	scrollok(w, bf) \
    232   1.7      cgd 	((bf) ? ((w)->flags |= __SCROLLOK) : ((w)->flags &= ~__SCROLLOK))
    233   1.7      cgd #define	winch(w) \
    234   1.7      cgd 	((w)->lines[(w)->cury]->line[(w)->curx].ch & 0177)
    235  1.17      jtc 
    236  1.17      jtc #define	getyx(w, y, x)		(y) = getcury(w), (x) = getcurx(w)
    237  1.17      jtc #define getbegyx(w, y, x)	(y) = getbegy(w), (x) = getbegx(w)
    238  1.17      jtc #define getmaxyx(w, y, x)	(y) = getmaxy(w), (x) = getmaxx(w)
    239  1.17      jtc #define getcury(w)		((w)->cury)
    240  1.17      jtc #define getcurx(w)		((w)->curx)
    241  1.17      jtc #define getbegy(w)		((w)->begy)
    242  1.17      jtc #define getbegx(w)		((w)->begx)
    243  1.17      jtc #define getmaxy(w)		((w)->maxy)
    244  1.17      jtc #define getmaxx(w)		((w)->maxx)
    245   1.4  mycroft 
    246   1.4  mycroft /* Public function prototypes. */
    247  1.14      jtc __BEGIN_DECLS
    248   1.4  mycroft int	 box __P((WINDOW *, int, int));
    249   1.4  mycroft int	 cbreak __P((void));
    250   1.4  mycroft int	 delwin __P((WINDOW *));
    251   1.4  mycroft int	 echo __P((void));
    252   1.4  mycroft int	 endwin __P((void));
    253   1.4  mycroft char	*fullname __P((char *, char *));
    254   1.4  mycroft char	*getcap __P((char *));
    255   1.4  mycroft int	 gettmode __P((void));
    256   1.4  mycroft void	 idlok __P((WINDOW *, int));
    257   1.4  mycroft WINDOW	*initscr __P((void));
    258   1.4  mycroft char	*longname __P((char *, char *));
    259   1.4  mycroft int	 mvcur __P((int, int, int, int));
    260   1.4  mycroft int	 mvprintw __P((int, int, const char *, ...));
    261   1.4  mycroft int	 mvscanw __P((int, int, const char *, ...));
    262   1.4  mycroft int	 mvwin __P((WINDOW *, int, int));
    263   1.4  mycroft int	 mvwprintw __P((WINDOW *, int, int, const char *, ...));
    264   1.4  mycroft int	 mvwscanw __P((WINDOW *, int, int, const char *, ...));
    265   1.4  mycroft WINDOW	*newwin __P((int, int, int, int));
    266   1.4  mycroft int	 nl __P((void));
    267   1.4  mycroft int	 nocbreak __P((void));
    268   1.4  mycroft int	 noecho __P((void));
    269   1.4  mycroft int	 nonl __P((void));
    270   1.4  mycroft int	 noraw __P((void));
    271   1.4  mycroft int	 overlay __P((WINDOW *, WINDOW *));
    272   1.4  mycroft int	 overwrite __P((WINDOW *, WINDOW *));
    273   1.4  mycroft int	 printw __P((const char *, ...));
    274   1.4  mycroft int	 raw __P((void));
    275   1.4  mycroft int	 resetty __P((void));
    276   1.4  mycroft int	 savetty __P((void));
    277   1.4  mycroft int	 scanw __P((const char *, ...));
    278   1.4  mycroft int	 scroll __P((WINDOW *));
    279   1.4  mycroft int	 setterm __P((char *));
    280   1.7      cgd int	 sscans __P((WINDOW *, const char *, ...));
    281   1.4  mycroft WINDOW	*subwin __P((WINDOW *, int, int, int, int));
    282   1.4  mycroft int	 suspendwin __P((void));
    283   1.4  mycroft int	 touchline __P((WINDOW *, int, int, int));
    284   1.4  mycroft int	 touchoverlap __P((WINDOW *, WINDOW *));
    285   1.4  mycroft int	 touchwin __P((WINDOW *));
    286  1.12      cgd int 	 vwprintw __P((WINDOW *, const char *, _BSD_VA_LIST_));
    287  1.12      cgd int      vwscanw __P((WINDOW *, const char *, _BSD_VA_LIST_));
    288   1.4  mycroft int	 waddch __P((WINDOW *, int));
    289   1.7      cgd int	 waddnstr __P((WINDOW *, const char *, int));
    290   1.4  mycroft int	 wclear __P((WINDOW *));
    291   1.4  mycroft int	 wclrtobot __P((WINDOW *));
    292   1.4  mycroft int	 wclrtoeol __P((WINDOW *));
    293   1.4  mycroft int	 wdelch __P((WINDOW *));
    294   1.4  mycroft int	 wdeleteln __P((WINDOW *));
    295   1.4  mycroft int	 werase __P((WINDOW *));
    296   1.4  mycroft int	 wgetch __P((WINDOW *));
    297   1.4  mycroft int	 wgetstr __P((WINDOW *, char *));
    298   1.4  mycroft int	 winsch __P((WINDOW *, int));
    299   1.4  mycroft int	 winsertln __P((WINDOW *));
    300   1.4  mycroft int	 wmove __P((WINDOW *, int, int));
    301   1.4  mycroft int	 wprintw __P((WINDOW *, const char *, ...));
    302   1.4  mycroft int	 wrefresh __P((WINDOW *));
    303   1.4  mycroft int	 wscanw __P((WINDOW *, const char *, ...));
    304  1.13      cgd int	 wstandend __P((WINDOW *));
    305  1.13      cgd int	 wstandout __P((WINDOW *));
    306  1.12      cgd int	 vwprintw __P((WINDOW *, const char *, _BSD_VA_LIST_));
    307   1.4  mycroft 
    308   1.7      cgd /* Private functions that are needed for user programs prototypes. */
    309   1.7      cgd void	 __cputchar __P((int));
    310   1.7      cgd int	 __waddbytes __P((WINDOW *, const char *, int, int));
    311  1.14      jtc __END_DECLS
    312   1.7      cgd 
    313   1.7      cgd /* Private functions. */
    314   1.4  mycroft #ifdef _CURSES_PRIVATE
    315   1.7      cgd void	 __CTRACE __P((const char *, ...));
    316  1.16      jtc unsigned int __hash __P((char *, int));
    317   1.4  mycroft void	 __id_subwins __P((WINDOW *));
    318   1.7      cgd int	 __mvcur __P((int, int, int, int, int));
    319   1.7      cgd void	 __restore_stophandler __P((void));
    320   1.7      cgd void	 __set_stophandler __P((void));
    321   1.4  mycroft void	 __set_subwin __P((WINDOW *, WINDOW *));
    322   1.7      cgd void	 __startwin __P((void));
    323   1.7      cgd void	 __stop_signal_handler __P((int));
    324   1.4  mycroft void	 __swflags __P((WINDOW *));
    325   1.7      cgd int	 __touchline __P((WINDOW *, int, int, int, int));
    326   1.7      cgd int	 __touchwin __P((WINDOW *));
    327  1.13      cgd char	*__tscroll __P((const char *, int, int));
    328   1.7      cgd int	 __waddch __P((WINDOW *, __LDATA *));
    329  1.19     phil int	 __stopwin __P((void));
    330  1.19     phil void	 __restartwin __P((void));
    331   1.4  mycroft 
    332   1.4  mycroft /* Private #defines. */
    333   1.4  mycroft #define	min(a,b)	(a < b ? a : b)
    334   1.4  mycroft #define	max(a,b)	(a > b ? a : b)
    335   1.4  mycroft 
    336   1.4  mycroft /* Private externs. */
    337   1.4  mycroft extern int	 __echoit;
    338   1.4  mycroft extern int	 __endwin;
    339   1.4  mycroft extern int	 __pfast;
    340   1.4  mycroft extern int	 __rawmode;
    341   1.7      cgd extern int	 __noqch;
    342   1.1      cgd #endif
    343   1.1      cgd 
    344   1.4  mycroft #endif /* !_CURSES_H_ */
    345