head	1.5;
access;
symbols
	perseant-exfatfs-base-20250801:1.5
	perseant-exfatfs-base-20240630:1.5
	cjep_sun2x:1.5.0.44
	cjep_sun2x-base:1.5
	cjep_staticlib_x-base1:1.5
	cjep_staticlib_x:1.5.0.42
	cjep_staticlib_x-base:1.5
	phil-wifi-20200421:1.5
	phil-wifi-20200411:1.5
	phil-wifi-20200406:1.5
	pgoyette-compat-merge-20190127:1.5
	pgoyette-compat-20190127:1.5
	pgoyette-compat-20190118:1.5
	pgoyette-compat-1226:1.5
	pgoyette-compat-1126:1.5
	pgoyette-compat-1020:1.5
	pgoyette-compat-0930:1.5
	pgoyette-compat-0906:1.5
	pgoyette-compat-0728:1.5
	pgoyette-compat-0625:1.5
	pgoyette-compat-0521:1.5
	pgoyette-compat-0502:1.5
	pgoyette-compat-0422:1.5
	pgoyette-compat-0415:1.5
	pgoyette-compat-0407:1.5
	pgoyette-compat-0330:1.5
	pgoyette-compat-0322:1.5
	pgoyette-compat-0315:1.5
	pgoyette-compat:1.5.0.40
	pgoyette-compat-base:1.5
	perseant-stdc-iso10646:1.5.0.38
	perseant-stdc-iso10646-base:1.5
	prg-localcount2-base3:1.5
	prg-localcount2-base2:1.5
	prg-localcount2-base1:1.5
	prg-localcount2:1.5.0.36
	prg-localcount2-base:1.5
	pgoyette-localcount-20170426:1.5
	bouyer-socketcan-base1:1.5
	pgoyette-localcount-20170320:1.5
	bouyer-socketcan:1.5.0.34
	bouyer-socketcan-base:1.5
	pgoyette-localcount-20170107:1.5
	pgoyette-localcount-20161104:1.5
	localcount-20160914:1.5
	pgoyette-localcount-20160806:1.5
	pgoyette-localcount-20160726:1.5
	pgoyette-localcount:1.5.0.32
	pgoyette-localcount-base:1.5
	netbsd-5-2-3-RELEASE:1.5
	netbsd-5-1-5-RELEASE:1.5
	yamt-pagecache-base9:1.5
	yamt-pagecache-tag8:1.5
	tls-earlyentropy:1.5.0.28
	tls-earlyentropy-base:1.5
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.5
	riastradh-drm2-base3:1.5
	netbsd-5-2-2-RELEASE:1.5
	netbsd-5-1-4-RELEASE:1.5
	netbsd-5-2-1-RELEASE:1.5
	netbsd-5-1-3-RELEASE:1.5
	agc-symver:1.5.0.30
	agc-symver-base:1.5
	tls-maxphys-base:1.5
	yamt-pagecache-base8:1.5
	netbsd-5-2:1.5.0.26
	yamt-pagecache-base7:1.5
	netbsd-5-2-RELEASE:1.5
	netbsd-5-2-RC1:1.5
	yamt-pagecache-base6:1.5
	yamt-pagecache-base5:1.5
	yamt-pagecache-base4:1.5
	netbsd-5-1-2-RELEASE:1.5
	netbsd-5-1-1-RELEASE:1.5
	yamt-pagecache-base3:1.5
	yamt-pagecache-base2:1.5
	yamt-pagecache:1.5.0.24
	yamt-pagecache-base:1.5
	bouyer-quota2-nbase:1.5
	bouyer-quota2:1.5.0.22
	bouyer-quota2-base:1.5
	matt-nb5-pq3:1.5.0.20
	matt-nb5-pq3-base:1.5
	netbsd-5-1:1.5.0.18
	netbsd-5-1-RELEASE:1.5
	netbsd-5-1-RC4:1.5
	netbsd-5-1-RC3:1.5
	netbsd-5-1-RC2:1.5
	netbsd-5-1-RC1:1.5
	netbsd-5-0-2-RELEASE:1.5
	netbsd-5-0-1-RELEASE:1.5
	jym-xensuspend-nbase:1.5
	netbsd-5-0:1.5.0.16
	netbsd-5-0-RELEASE:1.5
	netbsd-5-0-RC4:1.5
	netbsd-5-0-RC3:1.5
	netbsd-5-0-RC2:1.5
	jym-xensuspend:1.5.0.14
	jym-xensuspend-base:1.5
	netbsd-5-0-RC1:1.5
	netbsd-5:1.5.0.12
	netbsd-5-base:1.5
	mjf-devfs2:1.5.0.10
	mjf-devfs2-base:1.5
	yamt-pf42-base4:1.5
	yamt-pf42-base3:1.5
	hpcarm-cleanup-nbase:1.5
	yamt-pf42-base2:1.5
	yamt-pf42:1.5.0.8
	yamt-pf42-base:1.5
	keiichi-mipv6:1.5.0.6
	keiichi-mipv6-base:1.5
	cube-autoconf:1.5.0.4
	cube-autoconf-base:1.5
	hpcarm-cleanup:1.5.0.2
	hpcarm-cleanup-base:1.5
	netbsd-0-9-RELEASE:1.2
	netbsd-0-9-BETA:1.2
	netbsd-0-9-ALPHA2:1.2
	netbsd-0-9-ALPHA:1.2
	netbsd-0-9:1.2.0.2
	netbsd-0-9-base:1.2
	netbsd-0-8:1.1.1.1
	netbsd-alpha-1:1.1.1.1
	patchkit-0-2-2:1.1.1.1
	WFJ-386bsd-01:1.1.1.1
	WFJ-920714:1.1.1;
locks; strict;
comment	@ * @;


1.5
date	93.11.17.20.38.22;	author mycroft;	state dead;
branches;
next	1.4;

1.4
date	93.08.15.16.18.41;	author mycroft;	state Exp;
branches;
next	1.3;

1.3
date	93.08.02.17.22.04;	author mycroft;	state Exp;
branches;
next	1.2;

1.2
date	93.07.14.09.12.35;	author cgd;	state Exp;
branches;
next	1.1;

1.1
date	93.03.21.09.45.37;	author cgd;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	93.03.21.09.45.37;	author cgd;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Clean up deleted files.
@
text
@//	$Id: curses.h,v 1.4 1993/08/15 16:18:41 mycroft Exp mycroft $

#ifndef _G_curses_h

#include <_G_config.h>

#if _G_HAVE_CURSES

#ifdef __curses_h_recursive
#include_next <curses.h>
#else
#define __curses_h_recursive

extern "C" {
#include_next <curses.h>

/* Some systems (SVR4 for example) allow the definition of CHTYPE to set the
   type of some arguments to the curses functions.  It can be set to "char"
   to save space, or it can be set to something longer to store both a
   character and some attributes.  By default they do not define CHTYPE,
   and when CHTYPE is not defined, the default type is "unsigned long" instead
   of the traditional "char".  However, SVR4 <curses.h> does define
   _VR3_COMPAT_CODE, so we can use that to detect when we should use the SVR4
   default if CHTYPE is not defined.  For other systems, just default to the
   traditional default "char". */

#ifdef CHTYPE
      typedef CHTYPE _G_chtype;		/* Use specified type. */
#else
#ifdef _VR3_COMPAT_CODE
      typedef unsigned long _G_chtype;	/* SVR4 default is "unsigned long" */
#elif defined(hpux)
      typedef unsigned int _G_chtype;
#elif defined(__NetBSD__)
      typedef int _G_chtype;
#else
      typedef char _G_chtype;		/* Traditional default is "char" */
#endif
#endif

/* Some args are conceptually const, but SVR4 (and others?) get it wrong. */
#define _C_const /* const */

WINDOW * (newwin)(int, int, int, int);
WINDOW * (subwin)(WINDOW *, int, int, int, int);
WINDOW * (initscr)();
int      (box) (WINDOW*, _G_chtype, _G_chtype);
int      (delwin)(WINDOW*);
int      (getcurx)(WINDOW*);
int      (getcury)(WINDOW*);
int      (mvcur)(int, int, int, int);
int      (overlay)(WINDOW*, WINDOW*);
int      (overwrite)(WINDOW*, WINDOW*);
int      (scroll)(WINDOW*);
int      (touchwin)(WINDOW*);
int      (waddch)(WINDOW*, _G_chtype);
int      (waddstr) _G_ARGS((WINDOW*, const char*));
int      (wclear)(WINDOW*);
int      (wclrtobot)(WINDOW*);
int      (wclrtoeol)(WINDOW*);
int      (wdelch)(WINDOW*);
int      (wdeleteln)(WINDOW*);
int      (werase)(WINDOW*);
int      (wgetch)(WINDOW*);
int      (wgetstr)(WINDOW*, char*);
int      (winsch)(WINDOW*, _G_chtype);
int      (winsertln)(WINDOW*);
int      (wmove)(WINDOW*, int, int);
int      (wrefresh)(WINDOW*);
#ifdef __NetBSD__
char *   (wstandend)(WINDOW*);
char *   (wstandout)(WINDOW*);
#else
int      (wstandend)(WINDOW*);
int      (wstandout)(WINDOW*);
#endif

// SVR4 rather inanely bundles the format-string parameter with the '...'.
// This breaks VMS, and I don't want to penalize VMS for being right for once!

int      (wprintw)(WINDOW*, _G_CURSES_FORMAT_ARG ...);
int      (mvwprintw)(WINDOW*, int y, int x, _G_CURSES_FORMAT_ARG ...);
int      (wscanw)(WINDOW*, _G_CURSES_FORMAT_ARG ...);
int      (mvwscanw)(WINDOW*, int, int, _G_CURSES_FORMAT_ARG ...);
int      (endwin)();

}
#define _G_curses_h
#endif
#endif /* _G_HAVE_CURSES */
#endif /* _G_curses_h */
@


1.4
log
@Changes for new Curses.
@
text
@d1 1
a1 1
//	$Id: curses.h,v 1.3 1993/08/02 17:22:04 mycroft Exp $
@


1.3
log
@Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
@
text
@d1 1
a1 1
//	$Id: $
d34 2
d70 4
d76 1
@


1.2
log
@upgrade to libg++ 2.3.90.  g++ includes don't install right yet, but will fix
@
text
@d1 2
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
// This may look like C code, but it is really -*- C++ -*-
d3 1
a3 36
/* 
Copyright (C) 1989 Free Software Foundation
    written by Eric Newton (newton@@rocky.oswego.edu)

This file is part of GNU CC.

GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.  No author or distributor
accepts responsibility to anyone for the consequences of using it
or for whether it serves any particular purpose or works at all,
unless he says so in writing.  Refer to the GNU CC General Public
License for full details.

Everyone is granted permission to copy, modify and redistribute
GNU CC, but only under the conditions described in the
GNU CC General Public License.   A copy of this license is
supposed to have been given to you along with GNU CC so you
can know your rights and responsibilities.  It should be in a
file named COPYING.  Among other things, the copyright notice
and this notice must be preserved on all copies.  
*/

/*
 * Edited for compatablity with C++, 2/28/89 <ecn>
 * This file has all the /usr/include/curses.h info (with proper prototypes)
 * used for the CursesWindow classes.  You may need to change this to be
 * compatable with your curses implementation.
 *
 */

#ifndef _curses_h
#ifdef __GNUG__
#pragma once
#pragma interface
#endif
#define _curses_h
d5 1
a5 7
# include   <stddef.h>
# include   <std.h>
# include   <stdio.h> 
extern "C" {
#ifndef VMS
# include   <sgtty.h>
#endif
d7 4
a10 1
// protection against possibility that these are macros:
d12 2
a13 9
#ifndef stty
extern int stty(int, struct sgttyb*); 
#endif

#ifndef gtty
extern int gtty(int, struct sgttyb*); 
#endif

}
d15 9
a23 1
typedef char cbool; // curses explicitly declares bools as chars
d25 2
a26 2
#if defined(hpux)
enum CursesStatus { ERR = -1, OK = 0 };		// curses lib uses define's
d28 4
a31 41
enum CursesStatus { ERR = 0, OK = 1 };		// curses lib uses define's
#endif

/*
 *  BSD'ish.  Warning!!
 *
 */
# define    _ENDLINE    001
# define    _FULLWIN    002
# define    _SCROLLWIN  004
# define    _FLUSH      010
# define    _FULLLINE   020
# define    _IDLINE     040
# define    _STANDOUT   0200
# define    _NOCHANGE   -1

# define    _puts(s)    tputs(s, 0, _putchar)

/*
 * Capabilities from termcap
 */

extern cbool     AM, BS, CA, DA, DB, EO, HC, HZ, IN, MI, MS, NC, NS, OS, UL,
        XB, XN, XT, XS, XX;
extern char *AL, *BC, *BT, *CD, *CE, *CL, *CM, *CR, *CS, *DC, *DL,
        *DM, *DO, *ED, *EI, *K0, *K1, *K2, *K3, *K4, *K5, *K6,
        *K7, *K8, *K9, *HO, *IC, *IM, *IP, *KD, *KE, *KH, *KL,
        *KR, *KS, *KU, *LL, *MA, *ND, *NL, *RC, *SC, *SE, *SF,
        *SO, *SR, *TA, *TE, *TI, *UC, *UE, *UP, *US, *VB, *VS,
        *VE, *AL_PARM, *DL_PARM, *UP_PARM, *DOWN_PARM,
        *LEFT_PARM, *RIGHT_PARM;

extern char PC;

extern cbool    GT, NONL, UPPERCASE, normtty, _pfast;

struct _win_st {
#ifdef VMS
    int		_cury, _curx;
    int		_maxy, _maxx;
    int		_begy, _begx;
d33 1
a33 7
    short       _cury, _curx;
    short       _maxy, _maxx;
    short       _begy, _begx;
#endif
    short       _flags;
#ifndef VMS
    short       _ch_off;
a34 5
    cbool       _clear;
    cbool       _leave;
    cbool       _scroll;
#ifdef VMS
    cbool	_wrap;
a35 115
    char        **_y;
    short       *_firstch;
    short       *_lastch;
    struct _win_st  *_nextp, *_orig;
#ifdef VMS
    struct _win_st  *_parent , *_child;
    int		_id;
#endif
};

#define WINDOW  struct _win_st

extern cbool My_term;
extern cbool _echoit;
extern cbool _rawmode;
extern cbool _endwin;

extern char *Def_term;
extern char  ttytype[];

extern int  LINES;
extern int  COLS; 
extern int  _tty_ch;
extern int  _res_flg;


typedef struct sgttyb SGTTY;

extern SGTTY _tty;

/*
 * standard curses functions.
 *
 */

extern "C"
{
extern WINDOW * stdscr;
extern WINDOW * curscr;
WINDOW * newwin(int lines, int cols, int sy, int sx);
WINDOW * subwin(WINDOW *w, int lines, int cols, int sy, int sx);
WINDOW * initscr();
int      box (WINDOW*, char, char);
int      delwin(WINDOW*);
int      mvcur(int, int, int, int);
int      overlay(WINDOW*, WINDOW*);
int      overwrite(WINDOW*, WINDOW*);
int      scroll(WINDOW*);
int      touchwin(WINDOW*);
int      waddch(WINDOW*, char);
int      waddstr(WINDOW*, const char*);
int      wclear(WINDOW*);
int      wclrtobot(WINDOW*);
int      wclrtoeol(WINDOW*);
int      wdelch(WINDOW*);
int      wdeleteln(WINDOW*);
int      werase(WINDOW*);
int      wgetch(WINDOW*);
int      wgetstr(WINDOW*, char*);
int      winsch(WINDOW*, char);
int      winsertln(WINDOW*);
int      wmove(WINDOW*, int, int);
int      wrefresh(WINDOW*);
int      wstandend(WINDOW*);
int      wstandout(WINDOW*);
int      wprintw(WINDOW*, const char * fmt, ...);
int      mvwprintw(WINDOW*, int y, int x, const char * fmt, ...);
int      wscanw(WINDOW*, const char *, ...);
int      mvwscanw(int, int, WINDOW*, const char*, ...);
int      endwin();
}

/* Pseudo functions */
/* 
 * these are inlines rather than defines here so as to allow overloaded
 * versions in the CursesWindow class
 */

int clearok(WINDOW* win, cbool bf);
int leaveok(WINDOW* win, cbool bf);
int scrollok(WINDOW* win, cbool bf);
int flushok(WINDOW* win, cbool bf);
void getyx(WINDOW* win, int& y, int& x);
int winch(WINDOW* win);

#if defined(__OPTIMIZE__) || defined(USE_LIBGXX_INLINES)

inline int clearok(WINDOW* win, cbool bf)  { return(win->_clear = bf); }
inline int leaveok(WINDOW* win, cbool bf)  { return(win->_leave = bf); }
inline int scrollok(WINDOW* win, cbool bf) { return(win->_scroll = bf); }
inline int flushok(WINDOW* win, cbool bf)  
{ return(bf ? (win->_flags |= _FLUSH):(win->_flags &= ~_FLUSH)); }
inline void getyx(WINDOW* win, int& y, int& x)   
{ y = win->_cury; x = win->_curx; }
inline int winch(WINDOW* win)   
{return  win->_y[win->_cury][win->_curx] & 0177; }

#endif /* __OPTIMIZE__ */

#if defined(USG) || defined(VMS)
extern "C" {
int raw();
int noraw();
int cbreak();
int nocbreak();
}

#else

int raw();
int noraw();
int cbreak();
int nocbreak();

#if defined(__OPTIMIZE__) || defined(USE_LIBGXX_INLINES)
d37 2
a38 8
inline int raw()    
{ return _tty.sg_flags|=RAW, _pfast=_rawmode=1, stty(_tty_ch,&_tty); }
inline int noraw()  
{ return _tty.sg_flags&=~RAW,_rawmode=0,_pfast=!(_tty.sg_flags&CRMOD),stty(_tty_ch,&_tty); }
inline int cbreak() 
{ return _tty.sg_flags |= CBREAK, _rawmode = 1, stty(_tty_ch,&_tty); }
inline int nocbreak() 
{ return _tty.sg_flags &= ~CBREAK,_rawmode=0,stty(_tty_ch,&_tty); }
d40 37
a76 1
#endif /* __ OPTIMIZE __ */
a77 40
#endif /* USG */


int crmode();
int nocrmode();

#if defined(__OPTIMIZE__) || defined(USE_LIBGXX_INLINES)

inline int crmode() { return  cbreak(); }
inline int nocrmode() { return  nocbreak(); }

#endif /* __ OPTIMIZE __ */

#if defined(USG) || defined(VMS)

extern "C" {
int _setecho(int);
int _setnonl(int);
}

int echo();
int noecho();
int nl();
int nonl();

#if defined(__OPTIMIZE__) || defined(USE_LIBGXX_INLINES)

inline int echo()   { return _setecho(1); }
inline int noecho() { return _setecho(0); }
inline int nl()     { return _setnonl(0); }
inline int nonl()   { return _setnonl(1); }

#endif /* __ OPTIMIZE __ */

extern "C" {
int savetty();
int resetty();
int erasechar();
int killchar();
int baudrate();
d79 1
a79 53

#else /* not USG */

int echo();
int noecho();
int nl();
int nonl();
int savetty();
inline int resetty();
int erasechar();
int killchar();
int baudrate();

#if defined(__OPTIMIZE__) || defined(USE_LIBGXX_INLINES)

inline int echo()   
{ return _tty.sg_flags |= ECHO, _echoit = 1, stty(_tty_ch, &_tty); }
inline int noecho() 
{ return _tty.sg_flags &= ~ECHO, _echoit = 0, stty(_tty_ch, &_tty); }
inline int nl()     
{ return _tty.sg_flags |= CRMOD,_pfast = _rawmode,stty(_tty_ch, &_tty); }
inline int nonl()   
{ return _tty.sg_flags &= ~CRMOD, _pfast = 1, stty(_tty_ch, &_tty); }
inline int savetty() 
{ return (void) gtty(_tty_ch, &_tty), _res_flg = _tty.sg_flags; }
inline int resetty() 
{ return _tty.sg_flags = _res_flg, stty(_tty_ch, &_tty); }
inline int erasechar() 
{ return _tty.sg_erase; }
inline int killchar()  
{ return _tty.sg_kill; }
inline int baudrate()  
{ return _tty.sg_ospeed; }

#endif /* __ OPTIMIZE __ */

#endif /* USG */

extern "C" {
char *longname(char *, char *);
char *getcap(char *);
extern char *_unctrl[];
}


char * unctrl(int c);

#if defined(__OPTIMIZE__) || defined(USE_LIBGXX_INLINES)

inline char * unctrl(int c) {  return _unctrl[(c) & 0177]; }

#endif /* __ OPTIMIZE __ */

d81 2
@


1.1.1.1
log
@initial import of 386bsd-0.1 sources
@
text
@@
