All paths moved to path.h.

Cleanup in curses.h: removed reg definition.
All include files reformatted for 4-space indent.
This commit is contained in:
Serge Vakulenko
2015-06-24 20:57:08 -07:00
parent 81a8a8379d
commit 9d39282ae9
84 changed files with 1420 additions and 1447 deletions

View File

@@ -12,8 +12,8 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -30,12 +30,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef _AOUT_H_
#define _AOUT_H_
#ifndef _AOUT_H_
#define _AOUT_H_
#include <sys/exec_aout.h>
#define _AOUT_INCLUDE_
#define _AOUT_INCLUDE_
#include <nlist.h>
/* Relocations */
@@ -65,4 +65,4 @@ struct reloc {
* for RIGH16 and RIGH16S */
};
#endif /* !_AOUT_H_ */
#endif /* !_AOUT_H_ */

View File

@@ -15,8 +15,8 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -35,24 +35,24 @@
*/
#ifndef _AR_H_
#define _AR_H_
#define _AR_H_
#define ARMAG "!<arch>\n" /* ar "magic number" */
#define SARMAG 8 /* strlen(ARMAG); */
#define ARMAG "!<arch>\n" /* ar "magic number" */
#define SARMAG 8 /* strlen(ARMAG); */
#define AR_EFMT1 "#1/" /* extended format #1 */
#define AR_EFMT1 "#1/" /* extended format #1 */
struct ar_hdr {
char ar_name[16]; /* name */
char ar_date[12]; /* modification time */
char ar_uid[6]; /* user id */
char ar_gid[6]; /* group id */
char ar_mode[8]; /* octal file permissions */
char ar_size[10]; /* size in bytes */
#define ARFMAG "`\n"
char ar_fmag[2]; /* consistency check */
char ar_name[16]; /* name */
char ar_date[12]; /* modification time */
char ar_uid[6]; /* user id */
char ar_gid[6]; /* group id */
char ar_mode[8]; /* octal file permissions */
char ar_size[10]; /* size in bytes */
#define ARFMAG "`\n"
char ar_fmag[2]; /* consistency check */
};
#define ARHDRSZ 60
#define ARHDRSZ 60
#endif /* !_AR_H_ */

View File

@@ -19,11 +19,11 @@
* External definitions for
* functions in inet(3N)
*/
struct in_addr;
struct in_addr;
unsigned long inet_addr (char *);
char *inet_ntoa (struct in_addr);
struct in_addr inet_makeaddr (long, long);
char *inet_ntoa (struct in_addr);
struct in_addr inet_makeaddr (long, long);
unsigned long inet_network (char *);
unsigned long inet_netof (struct in_addr);
unsigned long inet_lnaof (struct in_addr);

View File

@@ -1,8 +1,6 @@
/* assert.h 4.2 85/01/21 */
# ifndef NDEBUG
# define _assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file \"%s\", line %d\n", __FILE__, __LINE__);exit(1);}}
# define assert(ex) _assert(ex)
# define _assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file \"%s\", line %d\n", __FILE__, __LINE__);exit(1);}}
# define assert(ex) _assert(ex)
# else
# define _assert(ex)
# define assert(ex)

View File

@@ -1,28 +1,26 @@
/* ctype.h 4.2 85/09/04 */
#define _U 01
#define _L 02
#define _N 04
#define _S 010
#define _P 020
#define _C 040
#define _X 0100
#define _B 0200
#define _U 01
#define _L 02
#define _N 04
#define _S 010
#define _P 020
#define _C 040
#define _X 0100
#define _B 0200
extern char _ctype_[];
extern char _ctype_[];
#define isalpha(c) ((_ctype_+1)[(int)(c)]&(_U|_L))
#define isupper(c) ((_ctype_+1)[(int)(c)]&_U)
#define islower(c) ((_ctype_+1)[(int)(c)]&_L)
#define isdigit(c) ((_ctype_+1)[(int)(c)]&_N)
#define isxdigit(c) ((_ctype_+1)[(int)(c)]&(_N|_X))
#define isspace(c) ((_ctype_+1)[(int)(c)]&_S)
#define ispunct(c) ((_ctype_+1)[(int)(c)]&_P)
#define isalnum(c) ((_ctype_+1)[(int)(c)]&(_U|_L|_N))
#define isprint(c) ((_ctype_+1)[(int)(c)]&(_P|_U|_L|_N|_B))
#define isgraph(c) ((_ctype_+1)[(int)(c)]&(_P|_U|_L|_N))
#define iscntrl(c) ((_ctype_+1)[(int)(c)]&_C)
#define isascii(c) ((unsigned)(c)<=0177)
#define toupper(c) ((c)-'a'+'A')
#define tolower(c) ((c)-'A'+'a')
#define toascii(c) ((c)&0177)
#define isalpha(c) ((_ctype_+1)[(int)(c)]&(_U|_L))
#define isupper(c) ((_ctype_+1)[(int)(c)]&_U)
#define islower(c) ((_ctype_+1)[(int)(c)]&_L)
#define isdigit(c) ((_ctype_+1)[(int)(c)]&_N)
#define isxdigit(c) ((_ctype_+1)[(int)(c)]&(_N|_X))
#define isspace(c) ((_ctype_+1)[(int)(c)]&_S)
#define ispunct(c) ((_ctype_+1)[(int)(c)]&_P)
#define isalnum(c) ((_ctype_+1)[(int)(c)]&(_U|_L|_N))
#define isprint(c) ((_ctype_+1)[(int)(c)]&(_P|_U|_L|_N|_B))
#define isgraph(c) ((_ctype_+1)[(int)(c)]&(_P|_U|_L|_N))
#define iscntrl(c) ((_ctype_+1)[(int)(c)]&_C)
#define isascii(c) ((unsigned)(c)<=0177)
#define toupper(c) ((c)-'a'+'A')
#define tolower(c) ((c)-'A'+'a')
#define toascii(c) ((c)&0177)

View File

@@ -9,155 +9,152 @@
#include <sgtty.h>
#include <term.h>
#define bool int
#define reg register
#define bool int
#define TRUE (1)
#define FALSE (0)
#define ERR (0)
#define OK (1)
#define TRUE (1)
#define FALSE (0)
#define ERR (0)
#define OK (1)
#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 _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)
#define _puts(s) tputs(s, 0, _putchar)
typedef struct sgttyb SGTTY;
typedef struct sgttyb SGTTY;
/*
* Capabilities from termcap
*/
extern bool 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 bool 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;
/*
* From the tty modes...
*/
extern bool GT, NONL, UPPERCASE, normtty, _pfast;
extern bool GT, NONL, UPPERCASE, normtty, _pfast;
struct _win_st {
short _cury, _curx;
short _maxy, _maxx;
short _begy, _begx;
short _flags;
short _ch_off;
bool _clear;
bool _leave;
bool _scroll;
char **_y;
short *_firstch;
short *_lastch;
struct _win_st *_nextp, *_orig;
short _cury, _curx;
short _maxy, _maxx;
short _begy, _begx;
short _flags;
short _ch_off;
bool _clear;
bool _leave;
bool _scroll;
char **_y;
short *_firstch;
short *_lastch;
struct _win_st *_nextp, *_orig;
};
#define WINDOW struct _win_st
#define WINDOW struct _win_st
extern bool My_term, _echoit, _rawmode, _endwin;
extern bool My_term, _echoit, _rawmode, _endwin;
extern char *Def_term, ttytype[];
extern char *Def_term, ttytype[];
extern int LINES, COLS, _tty_ch, _res_flg;
extern int LINES, COLS, _tty_ch, _res_flg;
extern SGTTY _tty;
extern SGTTY _tty;
extern WINDOW *stdscr, *curscr;
extern WINDOW *stdscr, *curscr;
/*
* Define VOID to stop lint from generating "null effect"
* Define VOID to stop lint from generating "null effect"
* comments.
*/
#ifdef lint
int __void__;
#define VOID(x) (__void__ = (int) (x))
int __void__;
#define VOID(x) (__void__ = (int) (x))
#else
#define VOID(x) (x)
#define VOID(x) (x)
#endif
/*
* 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 insch(c) VOID(winsch(stdscr,c))
#define delch() VOID(wdelch(stdscr))
#define standout() VOID(wstandout(stdscr))
#define standend() VOID(wstandend(stdscr))
#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 insch(c) VOID(winsch(stdscr,c))
#define delch() VOID(wdelch(stdscr))
#define standout() VOID(wstandout(stdscr))
#define standend() VOID(wstandend(stdscr))
/*
* mv functions
*/
#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 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,str) VOID(wmove(win,y,x)==ERR?ERR:wgetstr(win,str))
#define mvwinch(win,y,x) VOID(wmove(win,y,x) == ERR ? ERR : winch(win))
#define mvwdelch(win,y,x) VOID(wmove(win,y,x) == ERR ? ERR : wdelch(win))
#define mvwinsch(win,y,x,c) VOID(wmove(win,y,x) == ERR ? ERR:winsch(win,c))
#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 mvwinch(win,y,x) VOID(wmove(win,y,x) == ERR ? ERR : winch(win))
#define mvwdelch(win,y,x) VOID(wmove(win,y,x) == ERR ? ERR : wdelch(win))
#define mvwinsch(win,y,x,c) VOID(wmove(win,y,x) == ERR ? ERR:winsch(win,c))
#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,str) mvwgetstr(stdscr,y,x,str)
#define mvinch(y,x) mvwinch(stdscr,y,x)
#define mvdelch(y,x) mvwdelch(stdscr,y,x)
#define mvinsch(y,x,c) mvwinsch(stdscr,y,x,c)
#define mvinch(y,x) mvwinch(stdscr,y,x)
#define mvdelch(y,x) mvwdelch(stdscr,y,x)
#define mvinsch(y,x,c) mvwinsch(stdscr,y,x,c)
/*
* psuedo functions
*/
#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] & 0177)
#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] & 0177)
#define raw() (_tty.sg_flags|=RAW, _pfast=_rawmode=TRUE, ioctl(_tty_ch,TIOCSETP,&_tty))
#define noraw() (_tty.sg_flags&=~RAW,_rawmode=FALSE,_pfast=!(_tty.sg_flags&CRMOD),ioctl(_tty_ch,TIOCSETP,&_tty))
#define cbreak() (_tty.sg_flags |= CBREAK, _rawmode = TRUE, ioctl(_tty_ch,TIOCSETP,&_tty))
#define nocbreak() (_tty.sg_flags &= ~CBREAK,_rawmode=FALSE,ioctl(_tty_ch,TIOCSETP,&_tty))
#define crmode() cbreak() /* backwards compatability */
#define nocrmode() nocbreak() /* backwards compatability */
#define echo() (_tty.sg_flags |= ECHO, _echoit = TRUE, ioctl(_tty_ch, TIOCSETP, &_tty))
#define noecho() (_tty.sg_flags &= ~ECHO, _echoit = FALSE, ioctl(_tty_ch, TIOCSETP, &_tty))
#define nl() (_tty.sg_flags |= CRMOD, _pfast = _rawmode,ioctl(_tty_ch, TIOCSETP, &_tty))
#define nonl() (_tty.sg_flags &= ~CRMOD,_pfast = TRUE, ioctl(_tty_ch, TIOCSETP,&_tty))
#define savetty() ((void) ioctl(_tty_ch, TIOCGETP, &_tty), _res_flg = _tty.sg_flags)
#define resetty() (_tty.sg_flags = _res_flg, (void) ioctl(_tty_ch, TIOCSETP, &_tty))
#define raw() (_tty.sg_flags|=RAW, _pfast=_rawmode=TRUE, ioctl(_tty_ch,TIOCSETP,&_tty))
#define noraw() (_tty.sg_flags&=~RAW,_rawmode=FALSE,_pfast=!(_tty.sg_flags&CRMOD),ioctl(_tty_ch,TIOCSETP,&_tty))
#define cbreak() (_tty.sg_flags |= CBREAK, _rawmode = TRUE, ioctl(_tty_ch,TIOCSETP,&_tty))
#define nocbreak() (_tty.sg_flags &= ~CBREAK,_rawmode=FALSE,ioctl(_tty_ch,TIOCSETP,&_tty))
#define crmode() cbreak() /* backwards compatability */
#define nocrmode() nocbreak() /* backwards compatability */
#define echo() (_tty.sg_flags |= ECHO, _echoit = TRUE, ioctl(_tty_ch, TIOCSETP, &_tty))
#define noecho() (_tty.sg_flags &= ~ECHO, _echoit = FALSE, ioctl(_tty_ch, TIOCSETP, &_tty))
#define nl() (_tty.sg_flags |= CRMOD, _pfast = _rawmode,ioctl(_tty_ch, TIOCSETP, &_tty))
#define nonl() (_tty.sg_flags &= ~CRMOD,_pfast = TRUE, ioctl(_tty_ch, TIOCSETP,&_tty))
#define savetty() ((void) ioctl(_tty_ch, TIOCGETP, &_tty), _res_flg = _tty.sg_flags)
#define resetty() (_tty.sg_flags = _res_flg, (void) ioctl(_tty_ch, TIOCSETP, &_tty))
#define erasechar() (_tty.sg_erase)
#define killchar() (_tty.sg_kill)
#define baudrate() (_tty.sg_ospeed)
#define erasechar() (_tty.sg_erase)
#define killchar() (_tty.sg_kill)
#define baudrate() (_tty.sg_ospeed)
WINDOW *initscr(), *newwin(), *subwin();
char *longname(), *getcap();
WINDOW *initscr(), *newwin(), *subwin();
char *longname(), *getcap();
int wmove (WINDOW *, int, int);
int wrefresh (WINDOW *);
@@ -189,7 +186,7 @@ int mvwprintw(WINDOW *win, int y, int x, char *fmt, ...);
/*
* Used to be in unctrl.h.
*/
#define unctrl(c) _unctrl[(c) & 0177]
#define unctrl(c) _unctrl[(c) & 0177]
extern char *_unctrl[];
#endif

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -12,8 +12,8 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)fstab.h 8.1.1 (2.11BSD) 1996/1/15
* @(#)fstab.h 8.1.1 (2.11BSD) 1996/1/15
*/
#ifndef _FSTAB_H_
@@ -47,23 +47,20 @@
* if type is "rq", then use concatenation of fs_file and "quotas" to locate
* quota file.
*/
#define _PATH_FSTAB "/etc/fstab"
#define FSTAB "/etc/fstab" /* deprecated */
#define FSTAB_RW "rw" /* read/write device */
#define FSTAB_RQ "rq" /* read/write with quotas */
#define FSTAB_RO "ro" /* read-only device */
#define FSTAB_SW "sw" /* swap device */
#define FSTAB_XX "xx" /* ignore totally */
#define FSTAB_RW "rw" /* read/write device */
#define FSTAB_RQ "rq" /* read/write with quotas */
#define FSTAB_RO "ro" /* read-only device */
#define FSTAB_SW "sw" /* swap device */
#define FSTAB_XX "xx" /* ignore totally */
struct fstab {
char *fs_spec; /* block special device name */
char *fs_file; /* file system path prefix */
char *fs_vfstype; /* File system type, ufs, nfs */
char *fs_mntops; /* Mount options ala -o */
char *fs_type; /* FSTAB_* from fs_mntops */
int fs_freq; /* dump frequency, in days */
int fs_passno; /* pass number on parallel dump */
char *fs_spec; /* block special device name */
char *fs_file; /* file system path prefix */
char *fs_vfstype; /* File system type, ufs, nfs */
char *fs_mntops; /* Mount options ala -o */
char *fs_type; /* FSTAB_* from fs_mntops */
int fs_freq; /* dump frequency, in days */
int fs_passno; /* pass number on parallel dump */
};
struct fstab *getfsent();

View File

@@ -1,10 +1,10 @@
/* grp.h 4.1 83/05/03 */
/* grp.h 4.1 83/05/03 */
struct group { /* see getgrent(3) */
char *gr_name;
char *gr_passwd;
int gr_gid;
char **gr_mem;
struct group { /* see getgrent(3) */
char *gr_name;
char *gr_passwd;
int gr_gid;
char **gr_mem;
};
struct group *getgrent(void);

View File

@@ -3,11 +3,11 @@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* @(#)lastlog.h 5.1 (Berkeley) 5/30/85
* @(#)lastlog.h 5.1 (Berkeley) 5/30/85
*/
struct lastlog {
time_t ll_time;
char ll_line[8];
char ll_host[16]; /* same as in utmp */
time_t ll_time;
char ll_line[8];
char ll_host[16]; /* same as in utmp */
};

View File

@@ -4,16 +4,16 @@
* specifies the terms and conditions for redistribution.
*/
extern double fabs(), floor(), ceil(), fmod(), ldexp();
extern double sqrt(), hypot(), atof();
extern double sin(), cos(), tan(), asin(), acos(), atan(), atan2();
extern double exp(), log(), log10(), pow();
extern double sinh(), cosh(), tanh();
extern double gamma();
extern double j0(), j1(), jn(), y0(), y1(), yn();
double fabs(), floor(), ceil(), fmod(), ldexp();
double sqrt(), hypot(), atof();
double sin(), cos(), tan(), asin(), acos(), atan(), atan2();
double exp(), log(), log10(), pow();
double sinh(), cosh(), tanh();
double gamma();
double j0(), j1(), jn(), y0(), y1(), yn();
#define HUGE 1.701411733192644270e38
#define LOGHUGE 39
#define HUGE 1.701411733192644270e38
#define LOGHUGE 39
int isnanf(float x);
int isnan(double x);

View File

@@ -3,14 +3,14 @@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* @(#)mtab.h 5.1 (Berkeley) 5/30/85
* @(#)mtab.h 5.1 (Berkeley) 5/30/85
*/
/*
* Mounted device accounting file.
*/
struct mtab {
char m_path[32]; /* mounted on pathname */
char m_dname[32]; /* block device pathname */
char m_type[4]; /* read-only, quotas */
char m_path[32]; /* mounted on pathname */
char m_dname[32]; /* block device pathname */
char m_type[4]; /* read-only, quotas */
};

View File

@@ -3,64 +3,60 @@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* @(#)ndbm.h 5.1.1 (2.11BSD GTE) 12/31/93
* @(#)ndbm.h 5.1.1 (2.11BSD GTE) 12/31/93
*/
/*
* Hashed key data base library.
*/
#define PBLKSIZ 1024
#ifdef pdp11
#define DBLKSIZ 512
#else
#define DBLKSIZ 4096
#endif
#define PBLKSIZ 1024
#define DBLKSIZ 1024
typedef struct {
int dbm_dirf; /* open directory file */
int dbm_pagf; /* open page file */
int dbm_flags; /* flags, see below */
long dbm_maxbno; /* last ``bit'' in dir file */
long dbm_bitno; /* current bit number */
long dbm_hmask; /* hash mask */
long dbm_blkptr; /* current block for dbm_nextkey */
int dbm_keyptr; /* current key for dbm_nextkey */
long dbm_blkno; /* current page to read/write */
long dbm_pagbno; /* current page in pagbuf */
char dbm_pagbuf[PBLKSIZ]; /* page file block buffer */
long dbm_dirbno; /* current block in dirbuf */
char dbm_dirbuf[DBLKSIZ]; /* directory file block buffer */
int dbm_dirf; /* open directory file */
int dbm_pagf; /* open page file */
int dbm_flags; /* flags, see below */
long dbm_maxbno; /* last ``bit'' in dir file */
long dbm_bitno; /* current bit number */
long dbm_hmask; /* hash mask */
long dbm_blkptr; /* current block for dbm_nextkey */
int dbm_keyptr; /* current key for dbm_nextkey */
long dbm_blkno; /* current page to read/write */
long dbm_pagbno; /* current page in pagbuf */
char dbm_pagbuf[PBLKSIZ]; /* page file block buffer */
long dbm_dirbno; /* current block in dirbuf */
char dbm_dirbuf[DBLKSIZ]; /* directory file block buffer */
} DBM;
#define _DBM_RDONLY 0x1 /* data base open read-only */
#define _DBM_IOERR 0x2 /* data base I/O error */
#define _DBM_RDONLY 0x1 /* data base open read-only */
#define _DBM_IOERR 0x2 /* data base I/O error */
#define dbm_rdonly(db) ((db)->dbm_flags & _DBM_RDONLY)
#define dbm_rdonly(db) ((db)->dbm_flags & _DBM_RDONLY)
#define dbm_error(db) ((db)->dbm_flags & _DBM_IOERR)
/* use this one at your own risk! */
#define dbm_clearerr(db) ((db)->dbm_flags &= ~_DBM_IOERR)
#define dbm_error(db) ((db)->dbm_flags & _DBM_IOERR)
/* use this one at your own risk! */
#define dbm_clearerr(db) ((db)->dbm_flags &= ~_DBM_IOERR)
/* for flock(2) and fstat(2) */
#define dbm_dirfno(db) ((db)->dbm_dirf)
#define dbm_pagfno(db) ((db)->dbm_pagf)
#define dbm_dirfno(db) ((db)->dbm_dirf)
#define dbm_pagfno(db) ((db)->dbm_pagf)
typedef struct {
char *dptr;
int dsize;
char *dptr;
int dsize;
} datum;
/*
* flags to dbm_store()
*/
#define DBM_INSERT 0
#define DBM_REPLACE 1
#define DBM_INSERT 0
#define DBM_REPLACE 1
DBM *dbm_open();
void dbm_close();
datum dbm_fetch();
datum dbm_firstkey();
datum dbm_nextkey();
long dbm_forder();
int dbm_delete();
int dbm_store();
DBM *dbm_open();
void dbm_close();
datum dbm_fetch();
datum dbm_firstkey();
datum dbm_nextkey();
long dbm_forder();
int dbm_delete();
int dbm_store();

View File

@@ -18,17 +18,17 @@
/*
* Protocols
*/
#define IPPROTO_IP 0 /* dummy for IP */
#define IPPROTO_ICMP 1 /* control message protocol */
#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */
#define IPPROTO_TCP 6 /* tcp */
#define IPPROTO_EGP 8 /* exterior gateway protocol */
#define IPPROTO_PUP 12 /* pup */
#define IPPROTO_UDP 17 /* user datagram protocol */
#define IPPROTO_IDP 22 /* xns idp */
#define IPPROTO_IP 0 /* dummy for IP */
#define IPPROTO_ICMP 1 /* control message protocol */
#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */
#define IPPROTO_TCP 6 /* tcp */
#define IPPROTO_EGP 8 /* exterior gateway protocol */
#define IPPROTO_PUP 12 /* pup */
#define IPPROTO_UDP 17 /* user datagram protocol */
#define IPPROTO_IDP 22 /* xns idp */
#define IPPROTO_RAW 255 /* raw IP packet */
#define IPPROTO_MAX 256
#define IPPROTO_RAW 255 /* raw IP packet */
#define IPPROTO_MAX 256
/*
@@ -37,21 +37,21 @@
* Ports > IPPORT_USERRESERVED are reserved
* for servers, not necessarily privileged.
*/
#define IPPORT_RESERVED 1024
#define IPPORT_USERRESERVED 5000
#define IPPORT_RESERVED 1024
#define IPPORT_USERRESERVED 5000
/*
* Link numbers
*/
#define IMPLINK_IP 155
#define IMPLINK_LOWEXPER 156
#define IMPLINK_HIGHEXPER 158
#define IMPLINK_IP 155
#define IMPLINK_LOWEXPER 156
#define IMPLINK_HIGHEXPER 158
/*
* Internet address (a structure for historical reasons)
*/
struct in_addr {
u_long s_addr;
u_long s_addr;
};
/*
@@ -59,51 +59,51 @@ struct in_addr {
* On subnets, the decomposition of addresses to host and net parts
* is done according to subnet mask, not the masks here.
*/
#define IN_CLASSA(i) (((long)(i) & 0x80000000L) == 0)
#define IN_CLASSA_NET 0xff000000L
#define IN_CLASSA_NSHIFT 24
#define IN_CLASSA_HOST 0x00ffffffL
#define IN_CLASSA_MAX 128
#define IN_CLASSA(i) (((long)(i) & 0x80000000L) == 0)
#define IN_CLASSA_NET 0xff000000L
#define IN_CLASSA_NSHIFT 24
#define IN_CLASSA_HOST 0x00ffffffL
#define IN_CLASSA_MAX 128
#define IN_CLASSB(i) (((long)(i) & 0xc0000000L) == 0x80000000L)
#define IN_CLASSB_NET 0xffff0000L
#define IN_CLASSB_NSHIFT 16
#define IN_CLASSB_HOST 0x0000ffffL
#define IN_CLASSB_MAX 65536
#define IN_CLASSB(i) (((long)(i) & 0xc0000000L) == 0x80000000L)
#define IN_CLASSB_NET 0xffff0000L
#define IN_CLASSB_NSHIFT 16
#define IN_CLASSB_HOST 0x0000ffffL
#define IN_CLASSB_MAX 65536
#define IN_CLASSC(i) (((long)(i) & 0xe0000000L) == 0xc0000000L)
#define IN_CLASSC_NET 0xffffff00L
#define IN_CLASSC_NSHIFT 8
#define IN_CLASSC_HOST 0x000000ffL
#define IN_CLASSC(i) (((long)(i) & 0xe0000000L) == 0xc0000000L)
#define IN_CLASSC_NET 0xffffff00L
#define IN_CLASSC_NSHIFT 8
#define IN_CLASSC_HOST 0x000000ffL
#define IN_CLASSD(i) (((long)(i) & 0xf0000000L) == 0xe0000000L)
#define IN_MULTICAST(i) IN_CLASSD(i)
#define IN_CLASSD(i) (((long)(i) & 0xf0000000L) == 0xe0000000L)
#define IN_MULTICAST(i) IN_CLASSD(i)
#define IN_EXPERIMENTAL(i) (((long)(i) & 0xe0000000L) == 0xe0000000L)
#define IN_BADCLASS(i) (((long)(i) & 0xf0000000L) == 0xf0000000L)
#define IN_EXPERIMENTAL(i) (((long)(i) & 0xe0000000L) == 0xe0000000L)
#define IN_BADCLASS(i) (((long)(i) & 0xf0000000L) == 0xf0000000L)
#define INADDR_ANY 0x00000000L
#define INADDR_BROADCAST 0xffffffffL /* must be masked */
#define INADDR_ANY 0x00000000L
#define INADDR_BROADCAST 0xffffffffL /* must be masked */
#ifndef KERNEL
#define INADDR_NONE 0xffffffffL /* -1 return */
#define INADDR_NONE 0xffffffffL /* -1 return */
#endif
#define IN_LOOPBACKNET 127 /* official! */
#define IN_LOOPBACKNET 127 /* official! */
/*
* Socket address, internet style.
*/
struct sockaddr_in {
short sin_family;
u_short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
short sin_family;
u_short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
};
/*
* Options for use with [gs]etsockopt at the IP level.
*/
#define IP_OPTIONS 1 /* set/get IP per-packet options */
#define IP_OPTIONS 1 /* set/get IP per-packet options */
/*
* Definitions for inet sysctl operations.
@@ -111,55 +111,55 @@ struct sockaddr_in {
* Third level is protocol number.
* Fourth level is desired variable within that protocol.
*/
#define IPPROTO_MAXID (IPPROTO_IDP + 1) /* don't list to IPPROTO_MAX */
#define IPPROTO_MAXID (IPPROTO_IDP + 1) /* don't list to IPPROTO_MAX */
#ifndef KERNEL
#define CTL_IPPROTO_NAMES { \
{ "ip", CTLTYPE_NODE }, \
{ "icmp", CTLTYPE_NODE }, \
{ "igmp", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "tcp", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "udp", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "idp", CTLTYPE_NODE }, \
#ifndef KERNEL
#define CTL_IPPROTO_NAMES { \
{ "ip", CTLTYPE_NODE }, \
{ "icmp", CTLTYPE_NODE }, \
{ "igmp", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "tcp", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "udp", CTLTYPE_NODE }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ 0, 0 }, \
{ "idp", CTLTYPE_NODE }, \
}
#endif /* KERNEL */
/*
* Names for IP sysctl objects
*/
#define IPCTL_FORWARDING 1 /* act as router */
#define IPCTL_SENDREDIRECTS 2 /* may send redirects when forwarding */
#define IPCTL_DEFTTL 3 /* default TTL */
#define IPCTL_FORWARDING 1 /* act as router */
#define IPCTL_SENDREDIRECTS 2 /* may send redirects when forwarding */
#define IPCTL_DEFTTL 3 /* default TTL */
#ifdef notyet
#define IPCTL_DEFMTU 4 /* default MTU */
#define IPCTL_DEFMTU 4 /* default MTU */
#endif
#define IPCTL_FORWSRCRT 5 /* forward source-routed dgrams */
#define IPCTL_MAXID 6
#define IPCTL_FORWSRCRT 5 /* forward source-routed dgrams */
#define IPCTL_MAXID 6
#ifndef KERNEL
#define IPCTL_NAMES { \
{ 0, 0 }, \
{ "forwarding", CTLTYPE_INT }, \
{ "redirect", CTLTYPE_INT }, \
{ "ttl", CTLTYPE_INT }, \
{ "mtu", CTLTYPE_INT }, \
{ "forwsrcrt", CTLTYPE_INT }, \
#ifndef KERNEL
#define IPCTL_NAMES { \
{ 0, 0 }, \
{ "forwarding", CTLTYPE_INT }, \
{ "redirect", CTLTYPE_INT }, \
{ "ttl", CTLTYPE_INT }, \
{ "mtu", CTLTYPE_INT }, \
{ "forwsrcrt", CTLTYPE_INT }, \
}
#endif /* KERNEL */

View File

@@ -12,8 +12,8 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -30,37 +30,37 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef _NLIST_H_
#define _NLIST_H_
#ifndef _NLIST_H_
#define _NLIST_H_
#include <sys/types.h>
/*
* Symbol table entry format.
*/
struct nlist {
char *n_name; /* In memory address of symbol name,
or string table offset (file) */
u_short n_len; /* Length of name in bytes */
u_short n_type; /* Type of symbol - see below */
u_int n_value; /* Symbol value */
struct nlist {
char *n_name; /* In memory address of symbol name,
* or string table offset (file) */
u_short n_len; /* Length of name in bytes */
u_short n_type; /* Type of symbol - see below */
u_int n_value; /* Symbol value */
};
/*
* Simple values for n_type.
*/
#define N_UNDF 0x00 /* undefined */
#define N_ABS 0x01 /* absolute */
#define N_TEXT 0x02 /* text segment */
#define N_DATA 0x03 /* data segment */
#define N_BSS 0x04 /* bss segment */
#define N_STRNG 0x05 /* string segment (for assembler) */
#define N_COMM 0x06 /* .comm segment (for assembler) */
#define N_FN 0x1f /* file name */
#define N_UNDF 0x00 /* undefined */
#define N_ABS 0x01 /* absolute */
#define N_TEXT 0x02 /* text segment */
#define N_DATA 0x03 /* data segment */
#define N_BSS 0x04 /* bss segment */
#define N_STRNG 0x05 /* string segment (for assembler) */
#define N_COMM 0x06 /* .comm segment (for assembler) */
#define N_FN 0x1f /* file name */
#define N_TYPE 0x1f /* mask for all the type bits */
#define N_EXT 0x20 /* external (global) bit, OR'ed in */
#define N_WEAK 0x40 /* weak reference bit, OR'ed in */
#define N_LOC 0x80 /* local, for assembler */
#define N_TYPE 0x1f /* mask for all the type bits */
#define N_EXT 0x20 /* external (global) bit, OR'ed in */
#define N_WEAK 0x40 /* weak reference bit, OR'ed in */
#define N_LOC 0x80 /* local, for assembler */
/*
* Get symbols from a file.
@@ -72,4 +72,4 @@ int nlist (char *name, struct nlist *list);
*/
int knlist (struct nlist *list);
#endif /* !_NLIST_H_ */
#endif /* !_NLIST_H_ */

View File

@@ -14,46 +14,53 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#define _PATH_BSHELL "/bin/sh"
#define _PATH_CSHELL "/bin/csh"
#define _PATH_CP "/bin/cp"
#define _PATH_BSHELL "/bin/sh"
#define _PATH_CSHELL "/bin/csh"
#define _PATH_CP "/bin/cp"
#define _PATH_ECHO "/bin/echo"
#define _PATH_MORE "/bin/more"
#define _PATH_RSH "/bin/rsh"
#define _PATH_VI "/bin/vi"
#define _PATH_MORE "/bin/more"
#define _PATH_RSH "/bin/rsh"
#define _PATH_VI "/bin/vi"
#define _PATH_CORE "/core"
#define _PATH_DEV "/dev/"
#define _PATH_CONSOLE "/dev/console"
#define _PATH_DEVNULL "/dev/null"
#define _PATH_TTY "/dev/tty"
#define _PATH_DEV "/dev/"
#define _PATH_CONSOLE "/dev/console"
#define _PATH_LOG "/dev/log"
#define _PATH_DEVNULL "/dev/null"
#define _PATH_TTY "/dev/tty"
#define _PATH_MEM "/dev/mem"
#define _PATH_SWAP "/dev/swap"
#define _PATH_LOCALTIME "/etc/localtime"
#define _PATH_MOTD "/etc/motd"
#define _PATH_NOLOGIN "/etc/nologin"
#define _PATH_FSTAB "/etc/fstab"
#define _PATH_LOCALTIME "/etc/localtime"
#define _PATH_MOTD "/etc/motd"
#define _PATH_NOLOGIN "/etc/nologin"
#define _PATH_PASSWD "/etc/passwd"
#define _PATH_PTMP "/etc/ptmp"
#define _PATH_SHADOW "/etc/shadow"
#define _PATH_TERMCAP "/etc/termcap"
#define _PATH_USRLIB "/lib/"
#define _PATH_CTIMED "/libexec/ctimed"
#define _PATH_CTIMED "/libexec/ctimed"
#define _PATH_LOCALLIB "/local/lib/"
#define _PATH_SBIN "/sbin/"
#define _PATH_USRSBIN "/sbin/"
#define _PATH_SENDMAIL "/sbin/sendmail"
#define _PATH_SBIN "/sbin/"
#define _PATH_USRSBIN "/sbin/"
#define _PATH_MKPASSWD "/sbin/mkpasswd"
#define _PATH_SENDMAIL "/sbin/sendmail"
#define _PATH_SHARE "/share/"
#define _PATH_ZONEINFO "/share/zoneinfo" /* Time zone object file directory */
#define _PATH_TMP "/tmp/"
#define _PATH_USRTMP "/tmp/"
#define _PATH_LASTLOG "/var/log/lastlog"
#define _PATH_ZONEINFO "/share/zoneinfo" /* Time zone object file directory */
#define _PATH_TMP "/tmp/"
#define _PATH_USRTMP "/tmp/"
#define _PATH_LASTLOG "/var/log/lastlog"
#define _PATH_MESSAGES "/var/log/messages"
#define _PATH_WTMP "/var/log/wtmp"
#define _PATH_MAIL "/var/mail/"
#define _PATH_VARRUN "/var/run/"
#define _PATH_DEVDB "/var/run/dev"
#define _PATH_VARRUN "/var/run/"
#define _PATH_DEVDB "/var/run/dev"
#define _PATH_UTMP "/var/run/utmp"
#define _PATH_ARTMP "/tmp/ar.XXXXXX"
#define _PATH_RANTMP "/tmp/ranlib.XXXXXX"
#define _PATH_STDPATH "/bin"
#define _PATH_SYSPATH "/bin:/sbin:/local"
#define _PATH_MAN "/share/man:/local/man"
#define _PATH_LOCALMAN "/local/man"
#define _PATH_MAN "/share/man:/local/man"
#define _PATH_LOCALMAN "/local/man"
#define _PATH_HUSHLOGIN ".hushlogin"
#define _PATH_HUSHLOGIN ".hushlogin"

View File

@@ -14,27 +14,27 @@
#endif
struct psout {
dev_t o_ttyd; /* u_ttyd */
int o_flag; /* p_flag */
short o_pid; /* p_pid */
char o_tty[3]; /* 1st 2 chars of tty after 'tty' */
char o_stat; /* p_stat */
short o_uid; /* p_uid */
char o_uname[UT_NAMESIZE]; /* login name of process owner */
short o_ppid; /* p_ppid */
char o_cpu; /* p_cpu */
char o_pri; /* p_pri */
char o_nice; /* p_nice */
short o_addr0; /* p_addr[0] */
short o_size; /* p_size */
caddr_t o_wchan; /* p_wchan */
time_t o_utime; /* u_utime */
time_t o_stime; /* u_stime */
time_t o_cutime; /* u_cutime */
time_t o_cstime; /* u_cstime */
short o_pgrp; /* p_pgrp */
int o_sigs; /* sum of SIGINT & SIGQUIT,
if == 2 proc is ignoring both.*/
char o_comm[MAXCOMLEN+1]; /* u_comm */
char o_args[64]; /* best guess at args to process */
dev_t o_ttyd; /* u_ttyd */
int o_flag; /* p_flag */
short o_pid; /* p_pid */
char o_tty[3]; /* 1st 2 chars of tty after 'tty' */
char o_stat; /* p_stat */
short o_uid; /* p_uid */
char o_uname[UT_NAMESIZE]; /* login name of process owner */
short o_ppid; /* p_ppid */
char o_cpu; /* p_cpu */
char o_pri; /* p_pri */
char o_nice; /* p_nice */
short o_addr0; /* p_addr[0] */
short o_size; /* p_size */
caddr_t o_wchan; /* p_wchan */
time_t o_utime; /* u_utime */
time_t o_stime; /* u_stime */
time_t o_cutime; /* u_cutime */
time_t o_cstime; /* u_cstime */
short o_pgrp; /* p_pgrp */
int o_sigs; /* sum of SIGINT & SIGQUIT,
* if == 2 proc is ignoring both.*/
char o_comm[MAXCOMLEN+1]; /* u_comm */
char o_args[64]; /* best guess at args to process */
};

View File

@@ -15,22 +15,17 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#define _PATH_PASSWD "/etc/passwd"
#define _PATH_SHADOW "/etc/shadow"
#define _PATH_MKPASSWD "/sbin/mkpasswd"
#define _PATH_PTMP "/etc/ptmp"
#define _PW_KEYBYNAME '0'
#define _PW_KEYBYUID '1'
#define _PW_KEYBYNAME '0'
#define _PW_KEYBYUID '1'
struct passwd {
char *pw_name; /* user name */
char *pw_passwd; /* encrypted password */
int pw_uid; /* user uid */
int pw_gid; /* user gid */
char *pw_gecos; /* real name */
char *pw_dir; /* home directory */
char *pw_shell; /* default shell */
char *pw_name; /* user name */
char *pw_passwd; /* encrypted password */
int pw_uid; /* user uid */
int pw_gid; /* user gid */
char *pw_gecos; /* real name */
char *pw_dir; /* home directory */
char *pw_shell; /* default shell */
};
struct passwd *getpwent(), *getpwuid(), *getpwnam();

View File

@@ -12,8 +12,8 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -32,15 +32,15 @@
*/
#ifndef _RANLIB_H_
#define _RANLIB_H_
#define _RANLIB_H_
#define RANLIBMAG "__.SYMDEF" /* archive file name */
#define RANLIBSKEW 3 /* creation time offset */
#define RANLIBMAG "__.SYMDEF" /* archive file name */
#define RANLIBSKEW 3 /* creation time offset */
struct ranlib {
int ran_len; /* 1 byte - name length in bytes */
unsigned ran_off; /* 4 bytes - file offset */
char *ran_name; /* in memory symbol name */
int ran_len; /* 1 byte - name length in bytes */
unsigned ran_off; /* 4 bytes - file offset */
char *ran_name; /* in memory symbol name */
};
#endif /* !_RANLIB_H_ */

View File

@@ -5,14 +5,15 @@
* not the System V one.
*/
#define NSUBEXP 10
typedef struct regexp {
char *startp[NSUBEXP];
char *endp[NSUBEXP];
char regstart; /* Internal use only. */
char reganch; /* Internal use only. */
char *regmust; /* Internal use only. */
int regmlen; /* Internal use only. */
char program[1]; /* Unwarranted chumminess with compiler. */
char *startp[NSUBEXP];
char *endp[NSUBEXP];
char regstart; /* Internal use only. */
char reganch; /* Internal use only. */
char *regmust; /* Internal use only. */
int regmlen; /* Internal use only. */
char program[1]; /* Unwarranted chumminess with compiler. */
} regexp;
extern regexp *regcomp();

View File

@@ -10,105 +10,105 @@ extern int LINES, COLS;
/*
* pseudo functions for standard screen
*/
#define addch(ch) waddch(stdscr, ch)
#define getch() wgetch(stdscr)
#define addstr(str) waddstr(stdscr, str)
#define getstr(str) wgetstr(stdscr, str)
#define move(y, x) wmove(stdscr, y, x)
#define clear() wclear(stdscr)
#define erase() werase(stdscr)
#define clrtobot() wclrtobot(stdscr)
#define clrtoeol() wclrtoeol(stdscr)
#define insertln() winsertln(stdscr)
#define deleteln() wdeleteln(stdscr)
#define refresh() wrefresh(stdscr)
#define inch() winch(stdscr)
#define insch(c) winsch(stdscr,c)
#define delch() wdelch(stdscr)
#define standout() wstandout(stdscr)
#define standend() wstandend(stdscr)
#define addch(ch) waddch(stdscr, ch)
#define getch() wgetch(stdscr)
#define addstr(str) waddstr(stdscr, str)
#define getstr(str) wgetstr(stdscr, str)
#define move(y, x) wmove(stdscr, y, x)
#define clear() wclear(stdscr)
#define erase() werase(stdscr)
#define clrtobot() wclrtobot(stdscr)
#define clrtoeol() wclrtoeol(stdscr)
#define insertln() winsertln(stdscr)
#define deleteln() wdeleteln(stdscr)
#define refresh() wrefresh(stdscr)
#define inch() winch(stdscr)
#define insch(c) winsch(stdscr,c)
#define delch() wdelch(stdscr)
#define standout() wstandout(stdscr)
#define standend() wstandend(stdscr)
/*
* mv functions
*/
#define mvwaddch(win,y,x,ch) wmove(win,y,x) == 0 ? 0 : waddch(win,ch)
#define mvwgetch(win,y,x) wmove(win,y,x) == 0 ? 0 : wgetch(win)
#define mvwaddstr(win,y,x,str) wmove(win,y,x) == 0 ? 0 : waddstr(win,str)
#define mvwaddch(win,y,x,ch) wmove(win,y,x) == 0 ? 0 : waddch(win,ch)
#define mvwgetch(win,y,x) wmove(win,y,x) == 0 ? 0 : wgetch(win)
#define mvwaddstr(win,y,x,str) wmove(win,y,x) == 0 ? 0 : waddstr(win,str)
#define mvwgetstr(win,y,x,str) wmove(win,y,x) == 0 ? 0 : wgetstr(win,str)
#define mvwinch(win,y,x) wmove(win,y,x) == 0 ? 0 : winch(win)
#define mvwdelch(win,y,x) wmove(win,y,x) == 0 ? 0 : wdelch(win)
#define mvwinsch(win,y,x,c) wmove(win,y,x) == 0 ? 0 : winsch(win,c)
#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 mvwinch(win,y,x) wmove(win,y,x) == 0 ? 0 : winch(win)
#define mvwdelch(win,y,x) wmove(win,y,x) == 0 ? 0 : wdelch(win)
#define mvwinsch(win,y,x,c) wmove(win,y,x) == 0 ? 0 : winsch(win,c)
#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,str) mvwgetstr(stdscr,y,x,str)
#define mvinch(y,x) mvwinch(stdscr,y,x)
#define mvdelch(y,x) mvwdelch(stdscr,y,x)
#define mvinsch(y,x,c) mvwinsch(stdscr,y,x,c)
#define mvinch(y,x) mvwinch(stdscr,y,x)
#define mvdelch(y,x) mvwdelch(stdscr,y,x)
#define mvinsch(y,x,c) mvwinsch(stdscr,y,x,c)
#ifdef TODO
#define TRUE (1)
#define FALSE (0)
#define ERR (0)
#define OK (1)
#define TRUE (1)
#define FALSE (0)
#define ERR (0)
#define OK (1)
/*
* Capabilities from termcap
*/
extern int 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;
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;
/*
* From the tty modes...
*/
extern int GT, NONL, UPPERCASE, normtty, _pfast;
extern int GT, NONL, UPPERCASE, normtty, _pfast;
extern int My_term, _echoit, _rawmode, _endwin;
extern int My_term, _echoit, _rawmode, _endwin;
extern char *Def_term, ttytype[];
extern char *Def_term, ttytype[];
extern int _tty_ch, _res_flg;
extern int _tty_ch, _res_flg;
extern SGTTY _tty;
extern SGTTY _tty;
/*
* pseudo functions
*/
#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] & 0177)
#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] & 0177)
#define raw() (_tty.sg_flags|=RAW, _pfast=_rawmode=TRUE, ioctl(_tty_ch,TIOCSETP,&_tty))
#define noraw() (_tty.sg_flags&=~RAW,_rawmode=FALSE,_pfast=!(_tty.sg_flags&CRMOD),ioctl(_tty_ch,TIOCSETP,&_tty))
#define raw() (_tty.sg_flags|=RAW, _pfast=_rawmode=TRUE, ioctl(_tty_ch,TIOCSETP,&_tty))
#define noraw() (_tty.sg_flags&=~RAW,_rawmode=FALSE,_pfast=!(_tty.sg_flags&CRMOD),ioctl(_tty_ch,TIOCSETP,&_tty))
#define cbreak() (_tty.sg_flags |= CBREAK, _rawmode = TRUE, ioctl(_tty_ch,TIOCSETP,&_tty))
#define nocbreak() (_tty.sg_flags &= ~CBREAK,_rawmode=FALSE,ioctl(_tty_ch,TIOCSETP,&_tty))
#define echo() (_tty.sg_flags |= ECHO, _echoit = TRUE, ioctl(_tty_ch, TIOCSETP, &_tty))
#define echo() (_tty.sg_flags |= ECHO, _echoit = TRUE, ioctl(_tty_ch, TIOCSETP, &_tty))
#define noecho() (_tty.sg_flags &= ~ECHO, _echoit = FALSE, ioctl(_tty_ch, TIOCSETP, &_tty))
#define nl() (_tty.sg_flags |= CRMOD, _pfast = _rawmode,ioctl(_tty_ch, TIOCSETP, &_tty))
#define nonl() (_tty.sg_flags &= ~CRMOD,_pfast = TRUE, ioctl(_tty_ch, TIOCSETP,&_tty))
#define savetty() ((void) ioctl(_tty_ch, TIOCGETP, &_tty), _res_flg = _tty.sg_flags)
#define resetty() (_tty.sg_flags = _res_flg, (void) ioctl(_tty_ch, TIOCSETP, &_tty))
#define nl() (_tty.sg_flags |= CRMOD, _pfast = _rawmode,ioctl(_tty_ch, TIOCSETP, &_tty))
#define nonl() (_tty.sg_flags &= ~CRMOD,_pfast = TRUE, ioctl(_tty_ch, TIOCSETP,&_tty))
#define savetty() ((void) ioctl(_tty_ch, TIOCGETP, &_tty), _res_flg = _tty.sg_flags)
#define resetty() (_tty.sg_flags = _res_flg, (void) ioctl(_tty_ch, TIOCSETP, &_tty))
#define erasechar() (_tty.sg_erase)
#define killchar() (_tty.sg_kill)
#define baudrate() (_tty.sg_ospeed)
#define erasechar() (_tty.sg_erase)
#define killchar() (_tty.sg_kill)
#define baudrate() (_tty.sg_ospeed)
/*
* Used to be in unctrl.h.
*/
#define unctrl(c) _unctrl[(c) & 0177]
#define unctrl(c) _unctrl[(c) & 0177]
extern char *_unctrl[];
#endif

View File

@@ -1,38 +1,38 @@
/* open-only flags */
#define O_RDONLY 0x0000 /* open for reading only */
#define O_WRONLY 0x0001 /* open for writing only */
#define O_RDWR 0x0002 /* open for reading and writing */
#define O_ACCMODE 0x0003 /* mask for above modes */
#define O_RDONLY 0x0000 /* open for reading only */
#define O_WRONLY 0x0001 /* open for writing only */
#define O_RDWR 0x0002 /* open for reading and writing */
#define O_ACCMODE 0x0003 /* mask for above modes */
#define O_NONBLOCK 0x0004 /* no delay */
#define O_APPEND 0x0008 /* set append mode */
#define O_SHLOCK 0x0010 /* open with shared file lock */
#define O_EXLOCK 0x0020 /* open with exclusive file lock */
#define O_ASYNC 0x0040 /* signal pgrp when data ready */
#define O_FSYNC 0x0080 /* synchronous writes */
#define O_CREAT 0x0200 /* create if nonexistant */
#define O_TRUNC 0x0400 /* truncate to zero length */
#define O_EXCL 0x0800 /* error if already exists */
#define O_NONBLOCK 0x0004 /* no delay */
#define O_APPEND 0x0008 /* set append mode */
#define O_SHLOCK 0x0010 /* open with shared file lock */
#define O_EXLOCK 0x0020 /* open with exclusive file lock */
#define O_ASYNC 0x0040 /* signal pgrp when data ready */
#define O_FSYNC 0x0080 /* synchronous writes */
#define O_CREAT 0x0200 /* create if nonexistant */
#define O_TRUNC 0x0400 /* truncate to zero length */
#define O_EXCL 0x0800 /* error if already exists */
/*
* Constants used for fcntl(2)
*/
/* command values */
#define F_DUPFD 0 /* duplicate file descriptor */
#define F_GETFD 1 /* get file descriptor flags */
#define F_SETFD 2 /* set file descriptor flags */
#define F_GETFL 3 /* get file status flags */
#define F_SETFL 4 /* set file status flags */
#define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */
#define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */
#define F_DUPFD 0 /* duplicate file descriptor */
#define F_GETFD 1 /* get file descriptor flags */
#define F_SETFD 2 /* set file descriptor flags */
#define F_GETFL 3 /* get file status flags */
#define F_SETFL 4 /* set file status flags */
#define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */
#define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */
/* file descriptor flags (F_GETFD, F_SETFD) */
#define FD_CLOEXEC 1 /* close-on-exec flag */
#define FD_CLOEXEC 1 /* close-on-exec flag */
/* lock operations for flock() */
#define LOCK_SH 1 /* shared file lock */
#define LOCK_EX 2 /* exclusive file lock */
#define LOCK_NB 4 /* don't block when locking */
#define LOCK_UN 8 /* unlock file */
#define LOCK_SH 1 /* shared file lock */
#define LOCK_EX 2 /* exclusive file lock */
#define LOCK_NB 4 /* don't block when locking */
#define LOCK_UN 8 /* unlock file */

View File

@@ -3,74 +3,74 @@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#ifndef NSIG
#ifndef NSIG
#define NSIG 32
#define NSIG 32
#define SIGHUP 1 /* hangup */
#define SIGINT 2 /* interrupt */
#define SIGQUIT 3 /* quit */
#define SIGILL 4 /* illegal instruction (not reset when caught) */
#define SIGTRAP 5 /* trace trap (not reset when caught) */
#define SIGIOT 6 /* IOT instruction */
#define SIGABRT SIGIOT /* compatibility */
#define SIGEMT 7 /* EMT instruction */
#define SIGFPE 8 /* floating point exception */
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
#define SIGBUS 10 /* bus error */
#define SIGSEGV 11 /* segmentation violation */
#define SIGSYS 12 /* bad argument to system call */
#define SIGPIPE 13 /* write on a pipe with no one to read it */
#define SIGALRM 14 /* alarm clock */
#define SIGTERM 15 /* software termination signal from kill */
#define SIGURG 16 /* urgent condition on IO channel */
#define SIGSTOP 17 /* sendable stop signal not from tty */
#define SIGTSTP 18 /* stop signal from tty */
#define SIGCONT 19 /* continue a stopped process */
#define SIGCHLD 20 /* to parent on child stop or exit */
#define SIGCLD SIGCHLD /* compatibility */
#define SIGTTIN 21 /* to readers pgrp upon background tty read */
#define SIGTTOU 22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
#define SIGIO 23 /* input/output possible signal */
#define SIGXCPU 24 /* exceeded CPU time limit */
#define SIGXFSZ 25 /* exceeded file size limit */
#define SIGVTALRM 26 /* virtual time alarm */
#define SIGPROF 27 /* profiling time alarm */
#define SIGWINCH 28 /* window size changes */
#define SIGUSR1 30 /* user defined signal 1 */
#define SIGUSR2 31 /* user defined signal 2 */
#define SIGHUP 1 /* hangup */
#define SIGINT 2 /* interrupt */
#define SIGQUIT 3 /* quit */
#define SIGILL 4 /* illegal instruction (not reset when caught) */
#define SIGTRAP 5 /* trace trap (not reset when caught) */
#define SIGIOT 6 /* IOT instruction */
#define SIGABRT SIGIOT /* compatibility */
#define SIGEMT 7 /* EMT instruction */
#define SIGFPE 8 /* floating point exception */
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
#define SIGBUS 10 /* bus error */
#define SIGSEGV 11 /* segmentation violation */
#define SIGSYS 12 /* bad argument to system call */
#define SIGPIPE 13 /* write on a pipe with no one to read it */
#define SIGALRM 14 /* alarm clock */
#define SIGTERM 15 /* software termination signal from kill */
#define SIGURG 16 /* urgent condition on IO channel */
#define SIGSTOP 17 /* sendable stop signal not from tty */
#define SIGTSTP 18 /* stop signal from tty */
#define SIGCONT 19 /* continue a stopped process */
#define SIGCHLD 20 /* to parent on child stop or exit */
#define SIGCLD SIGCHLD /* compatibility */
#define SIGTTIN 21 /* to readers pgrp upon background tty read */
#define SIGTTOU 22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
#define SIGIO 23 /* input/output possible signal */
#define SIGXCPU 24 /* exceeded CPU time limit */
#define SIGXFSZ 25 /* exceeded file size limit */
#define SIGVTALRM 26 /* virtual time alarm */
#define SIGPROF 27 /* profiling time alarm */
#define SIGWINCH 28 /* window size changes */
#define SIGUSR1 30 /* user defined signal 1 */
#define SIGUSR2 31 /* user defined signal 2 */
#define SIG_ERR -1
#define SIG_DFL 0
#define SIG_IGN 1
#define BADSIG SIG_ERR
#define SIG_ERR -1
#define SIG_DFL 0
#define SIG_IGN 1
#define BADSIG SIG_ERR
#define SA_ONSTACK 0x0001 /* take signal on signal stack */
#define SA_RESTART 0x0002 /* restart system on signal return */
#define SA_DISABLE 0x0004 /* disable taking signals on alternate stack */
#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
#define SA_ONSTACK 0x0001 /* take signal on signal stack */
#define SA_RESTART 0x0002 /* restart system on signal return */
#define SA_DISABLE 0x0004 /* disable taking signals on alternate stack */
#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
/*
* Flags for sigprocmask:
*/
#define SIG_BLOCK 1 /* block specified signal set */
#define SIG_UNBLOCK 2 /* unblock specified signal set */
#define SIG_SETMASK 3 /* set specified signal set */
#define SIG_BLOCK 1 /* block specified signal set */
#define SIG_UNBLOCK 2 /* unblock specified signal set */
#define SIG_SETMASK 3 /* set specified signal set */
#define MINSIGSTKSZ 128 /* minimum allowable stack */
#define SIGSTKSZ (MINSIGSTKSZ + 384) /* recommended stack size */
#define MINSIGSTKSZ 128 /* minimum allowable stack */
#define SIGSTKSZ (MINSIGSTKSZ + 384) /* recommended stack size */
#define SV_ONSTACK SA_ONSTACK /* take signal on signal stack */
#define SV_INTERRUPT SA_RESTART /* same bit, opposite sense */
#define SV_ONSTACK SA_ONSTACK /* take signal on signal stack */
#define SV_INTERRUPT SA_RESTART /* same bit, opposite sense */
/*
* Macro for converting signal number to a mask suitable for
* sigblock().
*/
#define sigmask(m) (1L << ((m)-1))
#define sigaddset(set, signo) (*(set) |= 1L << ((signo) - 1), 0)
#define sigdelset(set, signo) (*(set) &= ~(1L << ((signo) - 1)), 0)
#define sigemptyset(set) (*(set) = (sigset_t)0, (int)0)
#define sigmask(m) (1L << ((m)-1))
#define sigaddset(set, signo) (*(set) |= 1L << ((signo) - 1), 0)
#define sigdelset(set, signo) (*(set) &= ~(1L << ((signo) - 1)), 0)
#define sigemptyset(set) (*(set) = (sigset_t)0, (int)0)
#define sigfillset(set) (*(set) = ~(sigset_t)0, (int)0)
#define sigismember(set, signo) ((*(set) & (1L << ((signo) - 1))) != 0)

View File

@@ -1,24 +1,24 @@
/*
* SmallC: interface to stdio library.
*/
#define BUFSIZ 1024
#define BUFSIZ 1024
#ifndef NULL
#define NULL 0
#ifndef NULL
#define NULL 0
#endif
#define FILE int
#define EOF (-1)
#define FILE int
#define EOF (-1)
extern int _iob[];
#define stdin (&_iob[0])
#define stdout (&_iob[5])
#define stderr (&_iob[10])
#define stdin (&_iob[0])
#define stdout (&_iob[5])
#define stderr (&_iob[10])
#define SEEK_SET 0 /* set file offset to offset */
#define SEEK_CUR 1 /* set file offset to current plus offset */
#define SEEK_END 2 /* set file offset to EOF plus offset */
#define SEEK_SET 0 /* set file offset to offset */
#define SEEK_CUR 1 /* set file offset to current plus offset */
#define SEEK_END 2 /* set file offset to EOF plus offset */
#define getc fgetc
#define putc fputc

View File

@@ -1,22 +1,22 @@
/*
* Ioctl definitions for GPIO driver.
*/
#define GPIO_PORT(n) (n) /* port number */
#define GPIO_PORTA 0
#define GPIO_PORTB 1
#define GPIO_PORTC 2
#define GPIO_PORTD 3
#define GPIO_PORTE 4
#define GPIO_PORTF 5
#define GPIO_PORTG 6
#define GPIO_PORT(n) (n) /* port number */
#define GPIO_PORTA 0
#define GPIO_PORTB 1
#define GPIO_PORTC 2
#define GPIO_PORTD 3
#define GPIO_PORTE 4
#define GPIO_PORTF 5
#define GPIO_PORTG 6
#define GPIO_CONFIN 0x20016700 /* configure as input */
#define GPIO_CONFIN 0x20016700 /* configure as input */
#define GPIO_CONFOUT 0x20026700 /* configure as output */
#define GPIO_CONFOD 0x20046700 /* configure as open drain */
#define GPIO_DECONF 0x20086700 /* deconfigure */
#define GPIO_STORE 0x20106700 /* store all outputs */
#define GPIO_SET 0x20206700 /* set to 1 by mask */
#define GPIO_CLEAR 0x20406700 /* set to 0 by mask */
#define GPIO_INVERT 0x20806700 /* invert by mask */
#define GPIO_POLL 0x21006700 /* poll */
#define GPIO_LOL 0x82006700 /* display lol picture */
#define GPIO_CONFOD 0x20046700 /* configure as open drain */
#define GPIO_DECONF 0x20086700 /* deconfigure */
#define GPIO_STORE 0x20106700 /* store all outputs */
#define GPIO_SET 0x20206700 /* set to 1 by mask */
#define GPIO_CLEAR 0x20406700 /* set to 0 by mask */
#define GPIO_INVERT 0x20806700 /* invert by mask */
#define GPIO_POLL 0x21006700 /* poll */
#define GPIO_LOL 0x82006700 /* display lol picture */

View File

@@ -8,7 +8,7 @@
* Define va_start, va_arg, va_end, va_copy.
*/
#if defined(__GNUC__) /* Gnu C */
# define va_start(ap, last) __builtin_va_start((ap), last)
# define va_start(ap, last) __builtin_va_start((ap), last)
# define va_arg(ap, type) __builtin_va_arg((ap), type)
# define va_end(ap) __builtin_va_end((ap))
# define va_copy(dest, src) __builtin_va_copy((dest), (src))

View File

@@ -2,14 +2,12 @@
#ifndef _STDINT_H
#define _STDINT_H
typedef signed char int8_t;
typedef short int int16_t;
typedef int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
typedef signed char int8_t;
typedef short int int16_t;
typedef int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
#endif

View File

@@ -5,25 +5,25 @@
*/
#ifndef FILE
#define BUFSIZ 1024
extern struct _iobuf {
int _cnt;
char *_ptr; /* should be unsigned char */
char *_base; /* ditto */
int _bufsiz;
short _flag;
short _file;
#define BUFSIZ 1024
extern struct _iobuf {
int _cnt;
char *_ptr; /* should be unsigned char */
char *_base; /* ditto */
int _bufsiz;
short _flag;
short _file;
} _iob[];
#define _IOREAD 01
#define _IOWRT 02
#define _IONBF 04
#define _IOMYBUF 010
#define _IOEOF 020
#define _IOERR 040
#define _IOSTRG 0100
#define _IOLBF 0200
#define _IORW 0400
#define _IOREAD 01
#define _IOWRT 02
#define _IONBF 04
#define _IOMYBUF 010
#define _IOEOF 020
#define _IOERR 040
#define _IOSTRG 0100
#define _IOLBF 0200
#define _IORW 0400
/*
* The following definition is for ANSI C, which took them
@@ -31,11 +31,11 @@ extern struct _iobuf {
* made them official arguments to setvbuf(), without renaming them.
* Hence, these ugly _IOxxx names are *supposed* to appear in user code.
*/
#define _IOFBF 0 /* setvbuf should set fully buffered */
/* _IONBF and _IOLBF are used from the flags above */
#define _IOFBF 0 /* setvbuf should set fully buffered */
/* _IONBF and _IOLBF are used from the flags above */
#ifndef NULL
#define NULL 0
#ifndef NULL
#define NULL 0
#endif
#ifndef _SIZE_T
@@ -43,51 +43,51 @@ extern struct _iobuf {
typedef unsigned size_t;
#endif
#define FILE struct _iobuf
#define EOF (-1)
#define FILE struct _iobuf
#define EOF (-1)
#define stdin (&_iob[0])
#define stdout (&_iob[1])
#define stderr (&_iob[2])
#define stdin (&_iob[0])
#define stdout (&_iob[1])
#define stderr (&_iob[2])
#define SEEK_SET 0 /* set file offset to offset */
#define SEEK_CUR 1 /* set file offset to current plus offset */
#define SEEK_END 2 /* set file offset to EOF plus offset */
#define SEEK_SET 0 /* set file offset to offset */
#define SEEK_CUR 1 /* set file offset to current plus offset */
#define SEEK_END 2 /* set file offset to EOF plus offset */
#ifndef lint
#define getc(p) (--(p)->_cnt>=0? (int)(*(unsigned char *)(p)->_ptr++):_filbuf(p))
#define putc(x, p) (--(p)->_cnt >= 0 ?\
(int)(*(unsigned char *)(p)->_ptr++ = (x)) :\
(((p)->_flag & _IOLBF) && -(p)->_cnt < (p)->_bufsiz ?\
((*(p)->_ptr = (x)) != '\n' ?\
(int)(*(unsigned char *)(p)->_ptr++) :\
_flsbuf(*(unsigned char *)(p)->_ptr, p)) :\
_flsbuf((unsigned char)(x), p)))
#define getc(p) (--(p)->_cnt>=0? (int)(*(unsigned char *)(p)->_ptr++):_filbuf(p))
#define putc(x, p) (--(p)->_cnt >= 0 ?\
(int)(*(unsigned char *)(p)->_ptr++ = (x)) :\
(((p)->_flag & _IOLBF) && -(p)->_cnt < (p)->_bufsiz ?\
((*(p)->_ptr = (x)) != '\n' ?\
(int)(*(unsigned char *)(p)->_ptr++) :\
_flsbuf(*(unsigned char *)(p)->_ptr, p)) :\
_flsbuf((unsigned char)(x), p)))
#endif /* not lint */
#define getchar() getc(stdin)
#define putchar(x) putc(x,stdout)
#define feof(p) (((p)->_flag&_IOEOF)!=0)
#define ferror(p) (((p)->_flag&_IOERR)!=0)
#define fileno(p) ((p)->_file)
#define clearerr(p) ((p)->_flag &= ~(_IOERR|_IOEOF))
#define getchar() getc(stdin)
#define putchar(x) putc(x,stdout)
#define feof(p) (((p)->_flag&_IOEOF)!=0)
#define ferror(p) (((p)->_flag&_IOERR)!=0)
#define fileno(p) ((p)->_file)
#define clearerr(p) ((p)->_flag &= ~(_IOERR|_IOEOF))
FILE *fopen (const char *, const char *);
FILE *fdopen (int, const char *);
FILE *freopen (const char *, const char *, FILE *);
FILE *popen (const char *, const char *);
FILE *fopen (const char *, const char *);
FILE *fdopen (int, const char *);
FILE *freopen (const char *, const char *, FILE *);
FILE *popen (const char *, const char *);
FILE *tmpfile (void);
int fclose (FILE *);
long ftell (FILE *);
long ftell (FILE *);
int fflush (FILE *);
int fgetc (FILE *);
int ungetc (int, FILE *);
int fputc (int, FILE *);
int fputs (const char *, FILE *);
int puts (const char *);
char *fgets (char *, int, FILE *);
char *gets (char *);
FILE *_findiop (void);
int fputc (int, FILE *);
int fputs (const char *, FILE *);
int puts (const char *);
char *fgets (char *, int, FILE *);
char *gets (char *);
FILE *_findiop (void);
int _filbuf (FILE *);
int _flsbuf (unsigned char, FILE *);
void setbuf (FILE *, char *);
@@ -100,17 +100,17 @@ int remove (const char *);
int getw(FILE *stream);
int putw(int w, FILE *stream);
size_t fread (void *, size_t, size_t, FILE *);
size_t fwrite (const void *, size_t, size_t, FILE *);
size_t fread (void *, size_t, size_t, FILE *);
size_t fwrite (const void *, size_t, size_t, FILE *);
int fprintf (FILE *, const char *, ...);
int printf (const char *, ...);
int sprintf (char *, const char *, ...);
int snprintf (char *, size_t, const char *, ...);
int fprintf (FILE *, const char *, ...);
int printf (const char *, ...);
int sprintf (char *, const char *, ...);
int snprintf (char *, size_t, const char *, ...);
int fscanf (FILE *, const char *, ...);
int scanf (const char *, ...);
int sscanf (const char *, const char *, ...);
int fscanf (FILE *, const char *, ...);
int scanf (const char *, ...);
int sscanf (const char *, const char *, ...);
#ifndef _VA_LIST_
# ifdef __GNUC__
@@ -121,17 +121,17 @@ int sscanf (const char *, const char *, ...);
# endif
#endif
int vfprintf (FILE *, const char *, va_list);
int vprintf (const char *, va_list);
int vsprintf (char *, const char *, va_list);
int vsnprintf (char *, size_t, const char *, va_list);
int vfprintf (FILE *, const char *, va_list);
int vprintf (const char *, va_list);
int vsprintf (char *, const char *, va_list);
int vsnprintf (char *, size_t, const char *, va_list);
int vfscanf (FILE *, const char *, va_list);
int vscanf (const char *, va_list);
int vsscanf (const char *, const char *, va_list);
int vfscanf (FILE *, const char *, va_list);
int vscanf (const char *, va_list);
int vsscanf (const char *, const char *, va_list);
int _doprnt (const char *, va_list, FILE *);
int _doscan (FILE *, const char *, va_list);
int _doprnt (const char *, va_list, FILE *);
int _doscan (FILE *, const char *, va_list);
#ifndef _VA_LIST_
# undef va_list

View File

@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -12,8 +12,8 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)stdlib.h 8.3.2 (2.11BSD) 1996/1/12
* @(#)stdlib.h 8.3.2 (2.11BSD) 1996/1/12
*
* Adapted from the 4.4-Lite CD. The odds of a ANSI C compiler for 2.11BSD
* being slipped under the door are not distinguishable from 0 - so the
@@ -44,61 +44,61 @@
#define _STDLIB_H_
#ifndef NULL
#define NULL 0
#define NULL 0
#endif
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#define RAND_MAX 0x7fff
#define RAND_MAX 0x7fff
#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned size_t;
#endif
void abort (void);
int abs (int);
int atexit (void (*)(void));
int atoi (const char *);
long atol (const char *);
void *calloc (size_t, size_t);
void exit (int);
void free (void *);
char *getenv (const char *);
void abort (void);
int abs (int);
int atexit (void (*)(void));
int atoi (const char *);
long atol (const char *);
void *calloc (size_t, size_t);
void exit (int);
void free (void *);
char *getenv (const char *);
long labs (long);
void *malloc (size_t);
char *mktemp (char *);
void *malloc (size_t);
char *mktemp (char *);
int mkstemp (char *);
void qsort (void *, size_t, size_t, int (*)(const void *, const void *));
int rand (void);
void *realloc (void*, size_t);
void srand (unsigned);
long strtol (const char *, char **, int);
void qsort (void *, size_t, size_t, int (*)(const void *, const void *));
int rand (void);
void *realloc (void*, size_t);
void srand (unsigned);
long strtol (const char *, char **, int);
unsigned long strtoul (const char *, char **, int);
int system (const char *);
int system (const char *);
int putenv (char *string);
int setenv (const char *name, const char *value, int overwrite);
int unsetenv (const char *name);
char *_findenv (const char *name, int *offset);
char *_findenv (const char *name, int *offset);
void *alloca (size_t size);
void *alloca (size_t size);
int daemon (int, int);
char *devname (int dev, int type);
int getloadavg (unsigned loadavg[], int nelem);
int daemon (int, int);
char *devname (int dev, int type);
int getloadavg (unsigned loadavg[], int nelem);
extern char *suboptarg; /* getsubopt(3) external variable */
int getsubopt (char **, char **, char **);
extern char *suboptarg; /* getsubopt(3) external variable */
int getsubopt (char **, char **, char **);
long random (void);
char *setstate (char *);
void srandom (unsigned);
long random (void);
char *setstate (char *);
void srandom (unsigned);
#ifndef __SMALLER_C__
double atof (const char *);
double strtod (const char *, char **);
double atof (const char *);
double strtod (const char *, char **);
char *ecvt (double, int, int *, int *);
char *fcvt (double, int, int *, int *);
char *gcvt (double, int, char *);

View File

@@ -3,8 +3,8 @@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#ifndef NULL
#define NULL 0
#ifndef NULL
#define NULL 0
#endif
#ifndef _SIZE_T
@@ -12,35 +12,35 @@
typedef unsigned size_t;
#endif
char *strcat (char *, const char *);
char *strncat (char *, const char *, size_t);
char *strcpy (char *, const char *);
char *strncpy (char *, const char *, size_t);
char *strcat (char *, const char *);
char *strncat (char *, const char *, size_t);
char *strcpy (char *, const char *);
char *strncpy (char *, const char *, size_t);
char *strstr (const char *, const char *);
char *strstr (const char *, const char *);
int strcmp (const char *, const char *);
int strncmp (const char *, const char *, size_t);
size_t strlen (const char *);
int strcmp (const char *, const char *);
int strncmp (const char *, const char *, size_t);
size_t strlen (const char *);
int memcmp (const void *, const void *, size_t);
int memcmp (const void *, const void *, size_t);
void *memmove (void *, const void *, size_t);
void *memccpy (void *, const void *, int, size_t);
void *memchr (const void *, int, size_t);
void *memcpy (void *, const void *, size_t);
void *memset (void *, int, size_t);
char *strchr (const char *, int);
void *memccpy (void *, const void *, int, size_t);
void *memchr (const void *, int, size_t);
void *memcpy (void *, const void *, size_t);
void *memset (void *, int, size_t);
char *strchr (const char *, int);
char *strdup (const char *);
char *strpbrk (const char *, const char *);
char *strrchr (const char *, int);
char *strsep (char **, const char *);
char *strtok (char *, const char *);
char *strtok_r (char *, const char *, char **);
char *strdup (const char *);
char *strpbrk (const char *, const char *);
char *strrchr (const char *, int);
char *strsep (char **, const char *);
char *strtok (char *, const char *);
char *strtok_r (char *, const char *, char **);
size_t strcspn (const char *, const char *);
size_t strspn (const char *, const char *);
size_t strcspn (const char *, const char *);
size_t strspn (const char *, const char *);
char *strerror (int);
const char *syserrlst (int);

View File

@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -12,8 +12,8 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.

View File

@@ -1,9 +1,9 @@
/* struct.h 4.1 83/05/03 */
/* struct.h 4.1 83/05/03 */
/*
* access to information relating to the fields of a structure
*/
#define fldoff(str, fld) ((int)&(((struct str *)0)->fld))
#define fldsiz(str, fld) (sizeof(((struct str *)0)->fld))
#define strbase(str, ptr, fld) ((struct str *)((char *)(ptr)-fldoff(str, fld)))
#define fldoff(str, fld) ((int)&(((struct str *)0)->fld))
#define fldsiz(str, fld) (sizeof(((struct str *)0)->fld))
#define strbase(str, ptr, fld) ((struct str *)((char *)(ptr)-fldoff(str, fld)))

View File

@@ -9,168 +9,168 @@
* causes cpp to leave a trailing tab when expanding macros in pdp/sys/SYS.h
*/
#define SYS_exit 1
#define SYS_fork 2
#define SYS_read 3
#define SYS_write 4
#define SYS_open 5
#define SYS_close 6
#define SYS_wait4 7
/* 8 is old; creat */
#define SYS_link 9
#define SYS_unlink 10
#define SYS_execv 11
#define SYS_chdir 12
#define SYS_fchdir 13
#define SYS_mknod 14
#define SYS_chmod 15
#define SYS_chown 16
#define SYS_chflags 17
#define SYS_fchflags 18
#define SYS_lseek 19
#define SYS_getpid 20
#define SYS_mount 21
#define SYS_umount 22
#define SYS___sysctl 23
#define SYS_getuid 24
#define SYS_geteuid 25
#define SYS_ptrace 26
#define SYS_getppid 27
#define SYS_statfs 28
#define SYS_fstatfs 29
#define SYS_getfsstat 30
#define SYS_sigaction 31
#define SYS_sigprocmask 32
#define SYS_access 33
#define SYS_sigpending 34
#define SYS_sigaltstack 35
#define SYS_sync 36
#define SYS_kill 37
#define SYS_stat 38
/* 39 was getlogin */
#define SYS_lstat 40
#define SYS_dup 41
#define SYS_pipe 42
/* 43 was setlogin */
#define SYS_profil 44
#define SYS_setuid 45
#define SYS_seteuid 46
#define SYS_getgid 47
#define SYS_getegid 48
#define SYS_setgid 49
#define SYS_setegid 50
#define SYS_exit 1
#define SYS_fork 2
#define SYS_read 3
#define SYS_write 4
#define SYS_open 5
#define SYS_close 6
#define SYS_wait4 7
/* 8 is old; creat */
#define SYS_link 9
#define SYS_unlink 10
#define SYS_execv 11
#define SYS_chdir 12
#define SYS_fchdir 13
#define SYS_mknod 14
#define SYS_chmod 15
#define SYS_chown 16
#define SYS_chflags 17
#define SYS_fchflags 18
#define SYS_lseek 19
#define SYS_getpid 20
#define SYS_mount 21
#define SYS_umount 22
#define SYS___sysctl 23
#define SYS_getuid 24
#define SYS_geteuid 25
#define SYS_ptrace 26
#define SYS_getppid 27
#define SYS_statfs 28
#define SYS_fstatfs 29
#define SYS_getfsstat 30
#define SYS_sigaction 31
#define SYS_sigprocmask 32
#define SYS_access 33
#define SYS_sigpending 34
#define SYS_sigaltstack 35
#define SYS_sync 36
#define SYS_kill 37
#define SYS_stat 38
/* 39 was getlogin */
#define SYS_lstat 40
#define SYS_dup 41
#define SYS_pipe 42
/* 43 was setlogin */
#define SYS_profil 44
#define SYS_setuid 45
#define SYS_seteuid 46
#define SYS_getgid 47
#define SYS_getegid 48
#define SYS_setgid 49
#define SYS_setegid 50
#define SYS_kmemdev 51
#define SYS_phys 52
#define SYS_lock 53
#define SYS_ioctl 54
#define SYS_reboot 55
#define SYS_sigwait 56
#define SYS_symlink 57
#define SYS_readlink 58
#define SYS_execve 59
#define SYS_umask 60
#define SYS_chroot 61
#define SYS_fstat 62
/* 63 is unused */
/* 64 is old; getpagesize */
#define SYS_pselect 65
#define SYS_vfork 2 /* 66 - not fixed yet */
/* 67 is old; vread */
/* 68 is old; vwrite */
#define SYS_sbrk 69
#define SYS_rdglob 70
#define SYS_wrglob 71
/* 71 is unused 4.3: mmap */
#define SYS_msec 72 /* 72 is unused 4.3: vadvise */
/* 73 is unused 4.3: munmap */
/* 74 is unused 4.3: mprotect */
/* 75 is unused 4.3: madvise */
#define SYS_vhangup 76
/* 77 is old; vlimit */
/* 78 is unused 4.3: mincore */
#define SYS_getgroups 79
#define SYS_setgroups 80
#define SYS_getpgrp 81
#define SYS_setpgrp 82
#define SYS_setitimer 83
/* 84 is old; wait,wait3 */
#define SYS_swapon 85
#define SYS_getitimer 86
/* 87 is old; gethostname */
/* 88 is old; sethostname */
#define SYS_getdtablesize 89
#define SYS_dup2 90
/* 91 is unused 4.3: getdopt */
#define SYS_fcntl 92
#define SYS_select 93
/* 94 is unused 4.3: setdopt */
#define SYS_fsync 95
#define SYS_setpriority 96
#define SYS_socket 97
#define SYS_connect 98
#define SYS_accept 99
#define SYS_getpriority 100
#define SYS_send 101
#define SYS_recv 102
#define SYS_sigreturn 103
#define SYS_bind 104
#define SYS_setsockopt 105
#define SYS_listen 106
#define SYS_sigsuspend 107
#define SYS_phys 52
#define SYS_lock 53
#define SYS_ioctl 54
#define SYS_reboot 55
#define SYS_sigwait 56
#define SYS_symlink 57
#define SYS_readlink 58
#define SYS_execve 59
#define SYS_umask 60
#define SYS_chroot 61
#define SYS_fstat 62
/* 63 is unused */
/* 64 is old; getpagesize */
#define SYS_pselect 65
#define SYS_vfork 2 /* 66 - not fixed yet */
/* 67 is old; vread */
/* 68 is old; vwrite */
#define SYS_sbrk 69
#define SYS_rdglob 70
#define SYS_wrglob 71
/* 71 is unused 4.3: mmap */
#define SYS_msec 72 /* 72 is unused 4.3: vadvise */
/* 73 is unused 4.3: munmap */
/* 74 is unused 4.3: mprotect */
/* 75 is unused 4.3: madvise */
#define SYS_vhangup 76
/* 77 is old; vlimit */
/* 78 is unused 4.3: mincore */
#define SYS_getgroups 79
#define SYS_setgroups 80
#define SYS_getpgrp 81
#define SYS_setpgrp 82
#define SYS_setitimer 83
/* 84 is old; wait,wait3 */
#define SYS_swapon 85
#define SYS_getitimer 86
/* 87 is old; gethostname */
/* 88 is old; sethostname */
#define SYS_getdtablesize 89
#define SYS_dup2 90
/* 91 is unused 4.3: getdopt */
#define SYS_fcntl 92
#define SYS_select 93
/* 94 is unused 4.3: setdopt */
#define SYS_fsync 95
#define SYS_setpriority 96
#define SYS_socket 97
#define SYS_connect 98
#define SYS_accept 99
#define SYS_getpriority 100
#define SYS_send 101
#define SYS_recv 102
#define SYS_sigreturn 103
#define SYS_bind 104
#define SYS_setsockopt 105
#define SYS_listen 106
#define SYS_sigsuspend 107
/*
* 108 thru 112 are 4.3BSD compatibility syscalls. sigstack has to remain
* defined because no replacement routine exists. Sigh.
*/
/* 108 is old; sigvec */
/* 109 is old; sigblock */
/* 110 is old; sigsetmask */
/* 111 is old; sigpause */
#define SYS_sigstack 112
/* 108 is old; sigvec */
/* 109 is old; sigblock */
/* 110 is old; sigsetmask */
/* 111 is old; sigpause */
#define SYS_sigstack 112
#define SYS_recvmsg 113
#define SYS_sendmsg 114
/* 115 is old; vtrace */
#define SYS_gettimeofday 116
#define SYS_getrusage 117
#define SYS_getsockopt 118
/* 119 is old; resuba */
#define SYS_readv 120
#define SYS_writev 121
#define SYS_settimeofday 122
#define SYS_fchown 123
#define SYS_fchmod 124
#define SYS_recvfrom 125
/* 126 is old; setreuid */
/* 127 is old; setregid */
#define SYS_rename 128
#define SYS_truncate 129
#define SYS_ftruncate 130
#define SYS_flock 131
/* 132 is unused */
#define SYS_sendto 133
#define SYS_shutdown 134
#define SYS_socketpair 135
#define SYS_mkdir 136
#define SYS_rmdir 137
#define SYS_utimes 138
/* 139 is unused */
#define SYS_adjtime 140
#define SYS_getpeername 141
/* 142 is old; gethostid */
/* 143 is old; sethostid */
#define SYS_getrlimit 144
#define SYS_setrlimit 145
#define SYS_killpg 146
/* 147 is unused */
#define SYS_setquota 148
#define SYS_quota 149
#define SYS_getsockname 150
#define SYS_recvmsg 113
#define SYS_sendmsg 114
/* 115 is old; vtrace */
#define SYS_gettimeofday 116
#define SYS_getrusage 117
#define SYS_getsockopt 118
/* 119 is old; resuba */
#define SYS_readv 120
#define SYS_writev 121
#define SYS_settimeofday 122
#define SYS_fchown 123
#define SYS_fchmod 124
#define SYS_recvfrom 125
/* 126 is old; setreuid */
/* 127 is old; setregid */
#define SYS_rename 128
#define SYS_truncate 129
#define SYS_ftruncate 130
#define SYS_flock 131
/* 132 is unused */
#define SYS_sendto 133
#define SYS_shutdown 134
#define SYS_socketpair 135
#define SYS_mkdir 136
#define SYS_rmdir 137
#define SYS_utimes 138
/* 139 is unused */
#define SYS_adjtime 140
#define SYS_getpeername 141
/* 142 is old; gethostid */
/* 143 is old; sethostid */
#define SYS_getrlimit 144
#define SYS_setrlimit 145
#define SYS_killpg 146
/* 147 is unused */
#define SYS_setquota 148
#define SYS_quota 149
#define SYS_getsockname 150
/*
* 2BSD special calls
*/
/* 151 is unused */
#define SYS_ustore 152
#define SYS_ufetch 153
#define SYS_ucall 154
/* 155 is unused */
/* 151 is unused */
#define SYS_ustore 152
#define SYS_ufetch 153
#define SYS_ucall 154
/* 155 is unused */

View File

@@ -9,89 +9,89 @@
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*
* @(#)sysexits.h 4.4.1 (2.11BSD) 1996/11/29
* @(#)sysexits.h 4.4.1 (2.11BSD) 1996/11/29
*/
/*
** SYSEXITS.H -- Exit status codes for system programs.
**
** This include file attempts to categorize possible error
** exit statuses for system programs, notably delivermail
** and the Berkeley network.
** This include file attempts to categorize possible error
** exit statuses for system programs, notably delivermail
** and the Berkeley network.
**
** Error numbers begin at EX__BASE to reduce the possibility of
** clashing with other exit statuses that random programs may
** already return. The meaning of the codes is approximately
** as follows:
** Error numbers begin at EX__BASE to reduce the possibility of
** clashing with other exit statuses that random programs may
** already return. The meaning of the codes is approximately
** as follows:
**
** EX_USAGE -- The command was used incorrectly, e.g., with
** the wrong number of arguments, a bad flag, a bad
** syntax in a parameter, or whatever.
** EX_DATAERR -- The input data was incorrect in some way.
** This should only be used for user's data & not
** system files.
** EX_NOINPUT -- An input file (not a system file) did not
** exist or was not readable. This could also include
** errors like "No message" to a mailer (if it cared
** to catch it).
** EX_NOUSER -- The user specified did not exist. This might
** be used for mail addresses or remote logins.
** EX_NOHOST -- The host specified did not exist. This is used
** in mail addresses or network requests.
** EX_UNAVAILABLE -- A service is unavailable. This can occur
** if a support program or file does not exist. This
** can also be used as a catchall message when something
** you wanted to do doesn't work, but you don't know
** why.
** EX_SOFTWARE -- An internal software error has been detected.
** This should be limited to non-operating system related
** errors as possible.
** EX_OSERR -- An operating system error has been detected.
** This is intended to be used for such things as "cannot
** fork", "cannot create pipe", or the like. It includes
** things like getuid returning a user that does not
** exist in the passwd file.
** EX_OSFILE -- Some system file (e.g., /etc/passwd, /var/run/utmp,
** etc.) does not exist, cannot be opened, or has some
** sort of error (e.g., syntax error).
** EX_CANTCREAT -- A (user specified) output file cannot be
** created.
** EX_IOERR -- An error occurred while doing I/O on some file.
** EX_TEMPFAIL -- temporary failure, indicating something that
** is not really an error. In sendmail, this means
** that a mailer (e.g.) could not create a connection,
** and the request should be reattempted later.
** EX_PROTOCOL -- the remote system returned something that
** was "not possible" during a protocol exchange.
** EX_NOPERM -- You did not have sufficient permission to
** perform the operation. This is not intended for
** file system problems, which should use NOINPUT or
** CANTCREAT, but rather for higher level permissions.
** For example, kre uses this to restrict who students
** can send mail to.
** EX_USAGE -- The command was used incorrectly, e.g., with
** the wrong number of arguments, a bad flag, a bad
** syntax in a parameter, or whatever.
** EX_DATAERR -- The input data was incorrect in some way.
** This should only be used for user's data & not
** system files.
** EX_NOINPUT -- An input file (not a system file) did not
** exist or was not readable. This could also include
** errors like "No message" to a mailer (if it cared
** to catch it).
** EX_NOUSER -- The user specified did not exist. This might
** be used for mail addresses or remote logins.
** EX_NOHOST -- The host specified did not exist. This is used
** in mail addresses or network requests.
** EX_UNAVAILABLE -- A service is unavailable. This can occur
** if a support program or file does not exist. This
** can also be used as a catchall message when something
** you wanted to do doesn't work, but you don't know
** why.
** EX_SOFTWARE -- An internal software error has been detected.
** This should be limited to non-operating system related
** errors as possible.
** EX_OSERR -- An operating system error has been detected.
** This is intended to be used for such things as "cannot
** fork", "cannot create pipe", or the like. It includes
** things like getuid returning a user that does not
** exist in the passwd file.
** EX_OSFILE -- Some system file (e.g., /etc/passwd, /var/run/utmp,
** etc.) does not exist, cannot be opened, or has some
** sort of error (e.g., syntax error).
** EX_CANTCREAT -- A (user specified) output file cannot be
** created.
** EX_IOERR -- An error occurred while doing I/O on some file.
** EX_TEMPFAIL -- temporary failure, indicating something that
** is not really an error. In sendmail, this means
** that a mailer (e.g.) could not create a connection,
** and the request should be reattempted later.
** EX_PROTOCOL -- the remote system returned something that
** was "not possible" during a protocol exchange.
** EX_NOPERM -- You did not have sufficient permission to
** perform the operation. This is not intended for
** file system problems, which should use NOINPUT or
** CANTCREAT, but rather for higher level permissions.
** For example, kre uses this to restrict who students
** can send mail to.
**
** Maintained by Eric Allman (eric@berkeley, ucbvax!eric) --
** please mail changes to me.
** Maintained by Eric Allman (eric@berkeley, ucbvax!eric) --
** please mail changes to me.
**
** @(#)sysexits.h 4.4 3/24/88
** @(#)sysexits.h 4.4 3/24/88
*/
# define EX_OK 0 /* successful termination */
# define EX_OK 0 /* successful termination */
# define EX__BASE 64 /* base value for error messages */
# define EX__BASE 64 /* base value for error messages */
# define EX_USAGE 64 /* command line usage error */
# define EX_DATAERR 65 /* data format error */
# define EX_NOINPUT 66 /* cannot open input */
# define EX_NOUSER 67 /* addressee unknown */
# define EX_NOHOST 68 /* host name unknown */
# define EX_UNAVAILABLE 69 /* service unavailable */
# define EX_SOFTWARE 70 /* internal software error */
# define EX_OSERR 71 /* system error (e.g., can't fork) */
# define EX_OSFILE 72 /* critical OS file missing */
# define EX_CANTCREAT 73 /* can't create (user) output file */
# define EX_IOERR 74 /* input/output error */
# define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
# define EX_PROTOCOL 76 /* remote error in protocol */
# define EX_NOPERM 77 /* permission denied */
# define EX_CONFIG 78 /* configuration error */
# define EX_USAGE 64 /* command line usage error */
# define EX_DATAERR 65 /* data format error */
# define EX_NOINPUT 66 /* cannot open input */
# define EX_NOUSER 67 /* addressee unknown */
# define EX_NOHOST 68 /* host name unknown */
# define EX_UNAVAILABLE 69 /* service unavailable */
# define EX_SOFTWARE 70 /* internal software error */
# define EX_OSERR 71 /* system error (e.g., can't fork) */
# define EX_OSFILE 72 /* critical OS file missing */
# define EX_CANTCREAT 73 /* can't create (user) output file */
# define EX_IOERR 74 /* input/output error */
# define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
# define EX_PROTOCOL 76 /* remote error in protocol */
# define EX_NOPERM 77 /* permission denied */
# define EX_CONFIG 78 /* configuration error */

View File

@@ -1,8 +1,8 @@
/*
* tcl.h --
*
* This header file describes the externally-visible facilities
* of the Tcl interpreter.
* This header file describes the externally-visible facilities
* of the Tcl interpreter.
*
* Copyright 1987-1991 Regents of the University of California
* Permission to use, copy, modify, and distribute this
@@ -16,9 +16,9 @@
#ifndef _TCL
#define _TCL
#define TCL_VERSION "6.7"
#define TCL_MAJOR_VERSION 6
#define TCL_MINOR_VERSION 7
#define TCL_VERSION "6.7"
#define TCL_MAJOR_VERSION 6
#define TCL_MINOR_VERSION 7
/*
* Data structures defined opaquely in this module. The definitions
@@ -28,17 +28,17 @@
* in the "real" definition in tclInt.h.
*/
typedef struct Tcl_Interp {
unsigned char *result; /* Points to result string returned by last
* command. */
unsigned char *result; /* Points to result string returned by last
* command. */
void (*freeProc) (unsigned char *blockPtr);
/* Zero means result is statically allocated.
* If non-zero, gives address of procedure
* to invoke to free the result. Must be
* freed by Tcl_Eval before executing next
* command. */
unsigned short errorLine; /* When TCL_ERROR is returned, this gives
* the line number within the command where
* the error occurred (1 means first line). */
/* Zero means result is statically allocated.
* If non-zero, gives address of procedure
* to invoke to free the result. Must be
* freed by Tcl_Eval before executing next
* command. */
unsigned short errorLine; /* When TCL_ERROR is returned, this gives
* the line number within the command where
* the error occurred (1 means first line). */
} Tcl_Interp;
typedef void *Tcl_Trace;
@@ -50,23 +50,23 @@ typedef void *Tcl_CmdBuf;
* the command procedure returns an integer value, which is one of the
* following:
*
* TCL_OK Command completed normally; interp->result contains
* the command's result.
* TCL_ERROR The command couldn't be completed successfully;
* interp->result describes what went wrong.
* TCL_RETURN The command requests that the current procedure
* return; interp->result contains the procedure's
* return value.
* TCL_BREAK The command requests that the innermost loop
* be exited; interp->result is meaningless.
* TCL_CONTINUE Go on to the next iteration of the current loop;
* interp->result is meaninless.
* TCL_OK Command completed normally; interp->result contains
* the command's result.
* TCL_ERROR The command couldn't be completed successfully;
* interp->result describes what went wrong.
* TCL_RETURN The command requests that the current procedure
* return; interp->result contains the procedure's
* return value.
* TCL_BREAK The command requests that the innermost loop
* be exited; interp->result is meaningless.
* TCL_CONTINUE Go on to the next iteration of the current loop;
* interp->result is meaninless.
*/
#define TCL_OK 0
#define TCL_ERROR 1
#define TCL_RETURN 2
#define TCL_BREAK 3
#define TCL_CONTINUE 4
#define TCL_OK 0
#define TCL_ERROR 1
#define TCL_RETURN 2
#define TCL_BREAK 3
#define TCL_CONTINUE 4
#define TCL_RESULT_SIZE 199
@@ -75,168 +75,168 @@ typedef void *Tcl_CmdBuf;
*/
typedef void (Tcl_CmdDeleteProc) (void *clientData);
typedef int (Tcl_CmdProc) (void *clientData,
Tcl_Interp *interp, int argc, unsigned char *argv[]);
Tcl_Interp *interp, int argc, unsigned char *argv[]);
typedef void (Tcl_CmdTraceProc) (void *clientData,
Tcl_Interp *interp, int level, unsigned char *command, Tcl_CmdProc *proc,
void *cmdClientData, int argc, unsigned char *argv[]);
Tcl_Interp *interp, int level, unsigned char *command, Tcl_CmdProc *proc,
void *cmdClientData, int argc, unsigned char *argv[]);
typedef void (Tcl_FreeProc) (unsigned char *blockPtr);
typedef unsigned char *(Tcl_VarTraceProc) (void *clientData,
Tcl_Interp *interp, unsigned char *part1, unsigned char *part2, int flags);
Tcl_Interp *interp, unsigned char *part1, unsigned char *part2, int flags);
/*
* Flag values passed to Tcl_Eval (see the man page for details; also
* see tclInt.h for additional flags that are only used internally by
* Tcl):
*/
#define TCL_BRACKET_TERM 1
#define TCL_BRACKET_TERM 1
/*
* Flag that may be passed to Tcl_ConvertElement to force it not to
* output braces (careful! if you change this flag be sure to change
* the definitions at the front of tclUtil.c).
*/
#define TCL_DONT_USE_BRACES 1
#define TCL_DONT_USE_BRACES 1
/*
* Flag value passed to Tcl_RecordAndEval to request no evaluation
* (record only).
*/
#define TCL_NO_EVAL -1
#define TCL_NO_EVAL -1
/*
* Specil freeProc values that may be passed to Tcl_SetResult (see
* the man page for details):
*/
#define TCL_STATIC ((Tcl_FreeProc *) 0)
#define TCL_VOLATILE ((Tcl_FreeProc *) -1)
#define TCL_DYNAMIC ((Tcl_FreeProc *) -2)
#define TCL_STATIC ((Tcl_FreeProc *) 0)
#define TCL_VOLATILE ((Tcl_FreeProc *) -1)
#define TCL_DYNAMIC ((Tcl_FreeProc *) -2)
/*
* Flag values passed to variable-related procedures.
*/
#define TCL_GLOBAL_ONLY 1
#define TCL_APPEND_VALUE 2
#define TCL_LIST_ELEMENT 4
#define TCL_NO_SPACE 8
#define TCL_TRACE_READS 0x10
#define TCL_TRACE_WRITES 0x20
#define TCL_TRACE_UNSETS 0x40
#define TCL_TRACE_DESTROYED 0x80
#define TCL_INTERP_DESTROYED 0x100
#define TCL_LEAVE_ERR_MSG 0x200
#define TCL_GLOBAL_ONLY 1
#define TCL_APPEND_VALUE 2
#define TCL_LIST_ELEMENT 4
#define TCL_NO_SPACE 8
#define TCL_TRACE_READS 0x10
#define TCL_TRACE_WRITES 0x20
#define TCL_TRACE_UNSETS 0x40
#define TCL_TRACE_DESTROYED 0x80
#define TCL_INTERP_DESTROYED 0x100
#define TCL_LEAVE_ERR_MSG 0x200
/*
* Additional flag passed back to variable watchers. This flag must
* not overlap any of the TCL_TRACE_* flags defined above or the
* TRACE_* flags defined in tclInt.h.
*/
#define TCL_VARIABLE_UNDEFINED 8
#define TCL_VARIABLE_UNDEFINED 8
/*
* Exported Tcl procedures:
*/
extern void Tcl_AppendElement (Tcl_Interp *interp, unsigned char *string,
int noSep);
extern void Tcl_AppendResult (Tcl_Interp *interp, ...);
extern unsigned char * Tcl_AssembleCmd (Tcl_CmdBuf buffer, unsigned char *string);
extern void Tcl_AddErrorInfo (Tcl_Interp *interp, unsigned char *message);
extern char Tcl_Backslash (unsigned char *src, int *readPtr);
extern int Tcl_CommandComplete (unsigned char *cmd);
extern unsigned char * Tcl_Concat (int argc, unsigned char **argv);
extern int Tcl_ConvertElement (unsigned char *src, unsigned char *dst, int flags);
extern Tcl_CmdBuf Tcl_CreateCmdBuf (void);
extern void Tcl_CreateCommand (Tcl_Interp *interp, unsigned char *cmdName,
Tcl_CmdProc *proc, void *clientData,
Tcl_CmdDeleteProc *deleteProc);
extern Tcl_Interp * Tcl_CreateInterp (void);
extern int Tcl_CreatePipeline (Tcl_Interp *interp, int argc,
unsigned char **argv, int **pidArrayPtr,
int *inPipePtr, int *outPipePtr,
int *errFilePtr);
extern Tcl_Trace Tcl_CreateTrace (Tcl_Interp *interp,
int level, Tcl_CmdTraceProc *proc,
void *clientData);
extern void Tcl_DeleteCmdBuf (Tcl_CmdBuf buffer);
extern int Tcl_DeleteCommand (Tcl_Interp *interp,
unsigned char *cmdName);
extern void Tcl_DeleteInterp (Tcl_Interp *interp);
extern void Tcl_DeleteTrace (Tcl_Interp *interp,
Tcl_Trace trace);
extern void Tcl_DetachPids (int numPids, int *pidPtr);
extern unsigned char * Tcl_ErrnoId (void);
extern int Tcl_Eval (Tcl_Interp *interp, unsigned char *cmd,
int flags, unsigned char **termPtr);
extern int Tcl_EvalFile (Tcl_Interp *interp,
unsigned char *fileName);
extern int Tcl_ExprBoolean (Tcl_Interp *interp, unsigned char *string,
int *ptr);
extern int Tcl_ExprLong (Tcl_Interp *interp, unsigned char *string,
long *ptr);
extern int Tcl_ExprString (Tcl_Interp *interp, unsigned char *string);
extern int Tcl_Fork (void);
extern void Tcl_FreeResult (Tcl_Interp *interp);
extern int Tcl_GetBoolean (Tcl_Interp *interp,
unsigned char *string, int *boolPtr);
extern int Tcl_GetInt (Tcl_Interp *interp,
unsigned char *string, int *intPtr);
extern unsigned char * Tcl_GetVar (Tcl_Interp *interp,
unsigned char *varName, int flags);
extern unsigned char * Tcl_GetVar2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2, int flags);
extern int Tcl_GlobalEval (Tcl_Interp *interp,
unsigned char *command);
extern void Tcl_InitHistory (Tcl_Interp *interp);
extern void Tcl_InitMemory (Tcl_Interp *interp);
extern unsigned char * Tcl_Merge (int argc, unsigned char **argv);
extern unsigned char * Tcl_ParseVar (Tcl_Interp *interp,
unsigned char *string, unsigned char **termPtr);
extern int Tcl_RecordAndEval (Tcl_Interp *interp,
unsigned char *cmd, int flags);
extern void Tcl_ResetResult (Tcl_Interp *interp);
extern int Tcl_ScanElement (unsigned char *string,
int *flagPtr);
extern void Tcl_SetErrorCode (Tcl_Interp *interp, ...);
extern void Tcl_SetResult (Tcl_Interp *interp,
unsigned char *string, Tcl_FreeProc *freeProc);
extern unsigned char * Tcl_SetVar (Tcl_Interp *interp,
unsigned char *varName, unsigned char *newValue, int flags);
extern unsigned char * Tcl_SetVar2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2,
unsigned char *newValue, int flags);
extern unsigned char * Tcl_SignalId (int sig);
extern unsigned char * Tcl_SignalMsg (int sig);
extern int Tcl_SplitList (Tcl_Interp *interp,
unsigned char *list, int *argcPtr, unsigned char ***argvPtr);
extern int Tcl_StringMatch (unsigned char *string,
unsigned char *pattern);
extern unsigned char * Tcl_TildeSubst (Tcl_Interp *interp,
unsigned char *name);
extern int Tcl_TraceVar (Tcl_Interp *interp,
unsigned char *varName, int flags, Tcl_VarTraceProc *proc,
void *clientData);
extern int Tcl_TraceVar2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2, int flags,
Tcl_VarTraceProc *proc, void *clientData);
extern int Tcl_UnsetVar (Tcl_Interp *interp,
unsigned char *varName, int flags);
extern int Tcl_UnsetVar2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2, int flags);
extern void Tcl_UntraceVar (Tcl_Interp *interp,
unsigned char *varName, int flags, Tcl_VarTraceProc *proc,
void *clientData);
extern void Tcl_UntraceVar2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2, int flags,
Tcl_VarTraceProc *proc, void *clientData);
extern int Tcl_VarEval (Tcl_Interp *interp, ...);
extern void * Tcl_VarTraceInfo (Tcl_Interp *interp,
unsigned char *varName, int flags,
Tcl_VarTraceProc *procPtr,
void *prevClientData);
extern void * Tcl_VarTraceInfo2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2, int flags,
Tcl_VarTraceProc *procPtr,
void *prevClientData);
extern int Tcl_WaitPids (int numPids, int *pidPtr,
int *statusPtr);
extern void Tcl_AppendElement (Tcl_Interp *interp, unsigned char *string,
int noSep);
extern void Tcl_AppendResult (Tcl_Interp *interp, ...);
extern unsigned char * Tcl_AssembleCmd (Tcl_CmdBuf buffer, unsigned char *string);
extern void Tcl_AddErrorInfo (Tcl_Interp *interp, unsigned char *message);
extern char Tcl_Backslash (unsigned char *src, int *readPtr);
extern int Tcl_CommandComplete (unsigned char *cmd);
extern unsigned char * Tcl_Concat (int argc, unsigned char **argv);
extern int Tcl_ConvertElement (unsigned char *src, unsigned char *dst, int flags);
extern Tcl_CmdBuf Tcl_CreateCmdBuf (void);
extern void Tcl_CreateCommand (Tcl_Interp *interp, unsigned char *cmdName,
Tcl_CmdProc *proc, void *clientData,
Tcl_CmdDeleteProc *deleteProc);
extern Tcl_Interp * Tcl_CreateInterp (void);
extern int Tcl_CreatePipeline (Tcl_Interp *interp, int argc,
unsigned char **argv, int **pidArrayPtr,
int *inPipePtr, int *outPipePtr,
int *errFilePtr);
extern Tcl_Trace Tcl_CreateTrace (Tcl_Interp *interp,
int level, Tcl_CmdTraceProc *proc,
void *clientData);
extern void Tcl_DeleteCmdBuf (Tcl_CmdBuf buffer);
extern int Tcl_DeleteCommand (Tcl_Interp *interp,
unsigned char *cmdName);
extern void Tcl_DeleteInterp (Tcl_Interp *interp);
extern void Tcl_DeleteTrace (Tcl_Interp *interp,
Tcl_Trace trace);
extern void Tcl_DetachPids (int numPids, int *pidPtr);
extern unsigned char * Tcl_ErrnoId (void);
extern int Tcl_Eval (Tcl_Interp *interp, unsigned char *cmd,
int flags, unsigned char **termPtr);
extern int Tcl_EvalFile (Tcl_Interp *interp,
unsigned char *fileName);
extern int Tcl_ExprBoolean (Tcl_Interp *interp, unsigned char *string,
int *ptr);
extern int Tcl_ExprLong (Tcl_Interp *interp, unsigned char *string,
long *ptr);
extern int Tcl_ExprString (Tcl_Interp *interp, unsigned char *string);
extern int Tcl_Fork (void);
extern void Tcl_FreeResult (Tcl_Interp *interp);
extern int Tcl_GetBoolean (Tcl_Interp *interp,
unsigned char *string, int *boolPtr);
extern int Tcl_GetInt (Tcl_Interp *interp,
unsigned char *string, int *intPtr);
extern unsigned char * Tcl_GetVar (Tcl_Interp *interp,
unsigned char *varName, int flags);
extern unsigned char * Tcl_GetVar2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2, int flags);
extern int Tcl_GlobalEval (Tcl_Interp *interp,
unsigned char *command);
extern void Tcl_InitHistory (Tcl_Interp *interp);
extern void Tcl_InitMemory (Tcl_Interp *interp);
extern unsigned char * Tcl_Merge (int argc, unsigned char **argv);
extern unsigned char * Tcl_ParseVar (Tcl_Interp *interp,
unsigned char *string, unsigned char **termPtr);
extern int Tcl_RecordAndEval (Tcl_Interp *interp,
unsigned char *cmd, int flags);
extern void Tcl_ResetResult (Tcl_Interp *interp);
extern int Tcl_ScanElement (unsigned char *string,
int *flagPtr);
extern void Tcl_SetErrorCode (Tcl_Interp *interp, ...);
extern void Tcl_SetResult (Tcl_Interp *interp,
unsigned char *string, Tcl_FreeProc *freeProc);
extern unsigned char * Tcl_SetVar (Tcl_Interp *interp,
unsigned char *varName, unsigned char *newValue, int flags);
extern unsigned char * Tcl_SetVar2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2,
unsigned char *newValue, int flags);
extern unsigned char * Tcl_SignalId (int sig);
extern unsigned char * Tcl_SignalMsg (int sig);
extern int Tcl_SplitList (Tcl_Interp *interp,
unsigned char *list, int *argcPtr, unsigned char ***argvPtr);
extern int Tcl_StringMatch (unsigned char *string,
unsigned char *pattern);
extern unsigned char * Tcl_TildeSubst (Tcl_Interp *interp,
unsigned char *name);
extern int Tcl_TraceVar (Tcl_Interp *interp,
unsigned char *varName, int flags, Tcl_VarTraceProc *proc,
void *clientData);
extern int Tcl_TraceVar2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2, int flags,
Tcl_VarTraceProc *proc, void *clientData);
extern int Tcl_UnsetVar (Tcl_Interp *interp,
unsigned char *varName, int flags);
extern int Tcl_UnsetVar2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2, int flags);
extern void Tcl_UntraceVar (Tcl_Interp *interp,
unsigned char *varName, int flags, Tcl_VarTraceProc *proc,
void *clientData);
extern void Tcl_UntraceVar2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2, int flags,
Tcl_VarTraceProc *proc, void *clientData);
extern int Tcl_VarEval (Tcl_Interp *interp, ...);
extern void * Tcl_VarTraceInfo (Tcl_Interp *interp,
unsigned char *varName, int flags,
Tcl_VarTraceProc *procPtr,
void *prevClientData);
extern void * Tcl_VarTraceInfo2 (Tcl_Interp *interp,
unsigned char *part1, unsigned char *part2, int flags,
Tcl_VarTraceProc *procPtr,
void *prevClientData);
extern int Tcl_WaitPids (int numPids, int *pidPtr,
int *statusPtr);
#endif /* _TCL */

View File

@@ -4,8 +4,6 @@
#include <sys/ioctl.h>
#include <stdint.h>
#define E_TERMCAP "/etc/termcap"
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
@@ -17,7 +15,7 @@ struct termios
tcflag_t c_oflag; /* output mode flags */
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
cc_t c_line; /* line discipline */
cc_t c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control characters */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* output speed */
@@ -145,5 +143,4 @@ extern int tcsetattr(int, int, struct termios *);
#define TIOCSETAW _IOW(i, 92, struct termios)
#define TIOCSETAF _IOW(i, 92, struct termios)
#endif

View File

@@ -4,17 +4,17 @@
* specifies the terms and conditions for redistribution.
*/
struct ttyent { /* see getttyent(3) */
char *ty_name; /* terminal device name */
char *ty_getty; /* command to execute, usually getty */
char *ty_type; /* terminal type for termcap (3X) */
int ty_status; /* status flags (see below for defines) */
char *ty_window; /* command to start up window manager */
char *ty_comment; /* usually the location of the terminal */
struct ttyent { /* see getttyent(3) */
char *ty_name; /* terminal device name */
char *ty_getty; /* command to execute, usually getty */
char *ty_type; /* terminal type for termcap (3X) */
int ty_status; /* status flags (see below for defines) */
char *ty_window; /* command to start up window manager */
char *ty_comment; /* usually the location of the terminal */
};
#define TTY_ON 0x1 /* enable logins (startup getty) */
#define TTY_SECURE 0x2 /* allow root to login */
#define TTY_ON 0x1 /* enable logins (startup getty) */
#define TTY_SECURE 0x2 /* allow root to login */
struct ttyent *getttyent (void);
struct ttyent *getttynam (const char *name);

View File

@@ -1,35 +1,31 @@
/*
* @(#)tzfile.h 5.2.1 (2.11BSD) 1996/11/29
* @(#)tzfile.h 5.2.1 (2.11BSD) 1996/11/29
*/
/*
** Information about time zone files.
*/
/* Time zone object file directory */
#define TZDEFAULT "/etc/localtime"
/*
** Each file begins with. . .
*/
struct tzhead {
char tzh_reserved[32]; /* reserved for future use */
char tzh_timecnt[4]; /* coded number of transition times */
char tzh_typecnt[4]; /* coded number of local time types */
char tzh_charcnt[4]; /* coded number of abbr. chars */
char tzh_reserved[32]; /* reserved for future use */
char tzh_timecnt[4]; /* coded number of transition times */
char tzh_typecnt[4]; /* coded number of local time types */
char tzh_charcnt[4]; /* coded number of abbr. chars */
};
/*
** . . .followed by. . .
**
** tzh_timecnt (char [4])s coded transition times a la time(2)
** tzh_timecnt (unsigned char)s types of local time starting at above
** tzh_typecnt repetitions of
** one (char [4]) coded GMT offset in seconds
** one (unsigned char) used to set tm_isdt
** one (unsigned char) that's an abbreviation list index
** tzh_charcnt (char)s '\0'-terminated zone abbreviaton strings
** tzh_timecnt (char [4])s coded transition times a la time(2)
** tzh_timecnt (unsigned char)s types of local time starting at above
** tzh_typecnt repetitions of
** one (char [4]) coded GMT offset in seconds
** one (unsigned char) used to set tm_isdt
** one (unsigned char) that's an abbreviation list index
** tzh_charcnt (char)s '\0'-terminated zone abbreviaton strings
*/
/*
@@ -43,58 +39,57 @@ struct tzhead {
** 138 years of Pacific Presidential Election time
** (where there are three time zone transitions every fourth year).
*/
#define TZ_MAX_TIMES 370
#define TZ_MAX_TIMES 370
#define NOSOLAR /* We currently don't handle solar time */
#define NOSOLAR /* We currently don't handle solar time */
#ifndef NOSOLAR
#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
#ifndef NOSOLAR
#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
#else /* !NOSOLAR */
#define TZ_MAX_TYPES 10 /* Maximum number of local time types */
#define TZ_MAX_TYPES 10 /* Maximum number of local time types */
#endif /* !NOSOLAR */
#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */
#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */
#define SECS_PER_MIN 60
#define MINS_PER_HOUR 60
#define HOURS_PER_DAY 24
#define DAYS_PER_WEEK 7
#define DAYS_PER_NYEAR 365
#define DAYS_PER_LYEAR 366
#define SECS_PER_HOUR (SECS_PER_MIN * MINS_PER_HOUR)
#define SECS_PER_DAY ((long) SECS_PER_HOUR * HOURS_PER_DAY)
#define MONS_PER_YEAR 12
#define SECS_PER_MIN 60
#define MINS_PER_HOUR 60
#define HOURS_PER_DAY 24
#define DAYS_PER_WEEK 7
#define DAYS_PER_NYEAR 365
#define DAYS_PER_LYEAR 366
#define SECS_PER_HOUR (SECS_PER_MIN * MINS_PER_HOUR)
#define SECS_PER_DAY ((long) SECS_PER_HOUR * HOURS_PER_DAY)
#define MONS_PER_YEAR 12
#define TM_SUNDAY 0
#define TM_MONDAY 1
#define TM_TUESDAY 2
#define TM_WEDNESDAY 3
#define TM_THURSDAY 4
#define TM_FRIDAY 5
#define TM_SATURDAY 6
#define TM_SUNDAY 0
#define TM_MONDAY 1
#define TM_TUESDAY 2
#define TM_WEDNESDAY 3
#define TM_THURSDAY 4
#define TM_FRIDAY 5
#define TM_SATURDAY 6
#define TM_JANUARY 0
#define TM_FEBRUARY 1
#define TM_MARCH 2
#define TM_APRIL 3
#define TM_MAY 4
#define TM_JUNE 5
#define TM_JULY 6
#define TM_AUGUST 7
#define TM_SEPTEMBER 8
#define TM_OCTOBER 9
#define TM_NOVEMBER 10
#define TM_DECEMBER 11
#define TM_SUNDAY 0
#define TM_JANUARY 0
#define TM_FEBRUARY 1
#define TM_MARCH 2
#define TM_APRIL 3
#define TM_MAY 4
#define TM_JUNE 5
#define TM_JULY 6
#define TM_AUGUST 7
#define TM_SEPTEMBER 8
#define TM_OCTOBER 9
#define TM_NOVEMBER 10
#define TM_DECEMBER 11
#define TM_SUNDAY 0
#define TM_YEAR_BASE 1900
#define TM_YEAR_BASE 1900
#define EPOCH_YEAR 1970
#define EPOCH_WDAY TM_THURSDAY
#define EPOCH_YEAR 1970
#define EPOCH_WDAY TM_THURSDAY
/*
** Accurate only for the past couple of centuries;
** that will probably do.
*/
#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)

View File

@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -12,8 +12,8 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -38,64 +38,64 @@
*/
#ifndef _UNISTD_H_
#define _UNISTD_H_
#define _UNISTD_H_
#include <sys/types.h>
#define STDIN_FILENO 0 /* standard input file descriptor */
#define STDOUT_FILENO 1 /* standard output file descriptor */
#define STDERR_FILENO 2 /* standard error file descriptor */
#define STDIN_FILENO 0 /* standard input file descriptor */
#define STDOUT_FILENO 1 /* standard output file descriptor */
#define STDERR_FILENO 2 /* standard error file descriptor */
#ifndef NULL
#define NULL 0 /* null pointer constant */
#define NULL 0 /* null pointer constant */
#endif
/* Values for the second argument to access.
These may be OR'd together. */
#define R_OK 4 /* Test for read permission. */
#define W_OK 2 /* Test for write permission. */
#define X_OK 1 /* Test for execute permission. */
#define F_OK 0 /* Test for existence. */
#define R_OK 4 /* Test for read permission. */
#define W_OK 2 /* Test for write permission. */
#define X_OK 1 /* Test for execute permission. */
#define F_OK 0 /* Test for existence. */
void _exit (int);
int access();
void _exit (int);
int access();
unsigned int alarm();
pid_t fork();
gid_t getegid();
uid_t geteuid();
gid_t getgid();
char *getlogin();
pid_t getpgrp();
pid_t getpid();
pid_t getppid();
uid_t getuid();
off_t lseek();
ssize_t read();
unsigned int sleep();
char *ttyname();
ssize_t write (int fd, const void *buf, size_t count);
pid_t fork();
gid_t getegid();
uid_t geteuid();
gid_t getgid();
char *getlogin();
pid_t getpgrp();
pid_t getpid();
pid_t getppid();
uid_t getuid();
off_t lseek();
ssize_t read();
unsigned int sleep();
char *ttyname();
ssize_t write (int fd, const void *buf, size_t count);
int truncate (const char *path, off_t length);
int ftruncate (int fd, off_t length);
void *brk (const void *addr);
int _brk (const void *addr);
char *crypt();
void endusershell();
long gethostid();
char *getpass();
char *getusershell();
char *getwd();
void psignal();
extern char *sys_siglist[];
char *re_comp();
void *sbrk (int incr);
int sethostid();
void setusershell();
void sync();
unsigned int ualarm();
void usleep();
void *brk (const void *addr);
int _brk (const void *addr);
char *crypt();
void endusershell();
long gethostid();
char *getpass();
char *getusershell();
char *getwd();
void psignal();
extern char *sys_siglist[];
char *re_comp();
void *sbrk (int incr);
int sethostid();
void setusershell();
void sync();
unsigned int ualarm();
void usleep();
int pause (void);
pid_t vfork();
pid_t vfork();
int pipe (int pipefd[2]);
int close (int fd);
@@ -126,21 +126,21 @@ int stat (const char *path, struct stat *buf);
int fstat (int fd, struct stat *buf);
int lstat (const char *path, struct stat *buf);
int execl (const char *path, const char *arg0, ... /* NULL */);
int execle (const char *path, const char *arg0, ... /* NULL, char *envp[] */);
int execlp (const char *file, const char *arg0, ... /* NULL */);
int execl (const char *path, const char *arg0, ... /* NULL */);
int execle (const char *path, const char *arg0, ... /* NULL, char *envp[] */);
int execlp (const char *file, const char *arg0, ... /* NULL */);
int execv (const char *path, char *const argv[]);
int execve (const char *path, char *const arg0[], char *const envp[]);
int execvp (const char *file, char *const argv[]);
int execv (const char *path, char *const argv[]);
int execve (const char *path, char *const arg0[], char *const envp[]);
int execvp (const char *file, char *const argv[]);
extern char **environ; /* Environment, from crt0. */
extern const char *__progname; /* Program name, from crt0. */
extern char **environ; /* Environment, from crt0. */
extern const char *__progname; /* Program name, from crt0. */
int getopt (int argc, char * const argv[], const char *optstring);
int getopt (int argc, char * const argv[], const char *optstring);
extern char *optarg; /* getopt(3) external variables */
extern int opterr, optind, optopt;
extern char *optarg; /* getopt(3) external variables */
extern int opterr, optind, optopt;
#ifndef _VA_LIST_
# ifdef __GNUC__
@@ -151,14 +151,14 @@ extern int opterr, optind, optopt;
# endif
#endif
void err (int eval, const char *fmt, ...);
void errx (int eval, const char *fmt, ...);
void warn (const char *fmt, ...);
void warnx (const char *fmt, ...);
void verr (int eval, const char *fmt, va_list ap);
void verrx (int eval, const char *fmt, va_list ap);
void vwarn (const char *fmt, va_list ap);
void vwarnx (const char *fmt, va_list ap);
void err (int eval, const char *fmt, ...);
void errx (int eval, const char *fmt, ...);
void warn (const char *fmt, ...);
void warnx (const char *fmt, ...);
void verr (int eval, const char *fmt, va_list ap);
void verrx (int eval, const char *fmt, va_list ap);
void vwarn (const char *fmt, va_list ap);
void vwarnx (const char *fmt, va_list ap);
#ifndef _VA_LIST_
# undef va_list

View File

@@ -15,13 +15,13 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#define UT_NAMESIZE 15
#define UT_LINESIZE 8
#define UT_HOSTSIZE 16
#define UT_NAMESIZE 15
#define UT_LINESIZE 8
#define UT_HOSTSIZE 16
struct utmp {
char ut_line[UT_LINESIZE];
char ut_name[UT_NAMESIZE];
char ut_host[UT_HOSTSIZE];
long ut_time;
char ut_line[UT_LINESIZE];
char ut_name[UT_NAMESIZE];
char ut_host[UT_HOSTSIZE];
long ut_time;
};

View File

@@ -2,63 +2,62 @@
* Author: S.M. Schultz
*
* ----------- Modification History ------------
* Version Date Reason For Modification
* 1.0 01Jan80 1. Initial release.
* 2.0 31Mar83 2. Cleanup.
* 3.0 08Sep93 3. Change v_foffset to off_t instead of int.
* 3.1 21Oct93 4. Create union member of structure to
* make 'int' or 'char' access to data easy.
* Define segment+offset and modified macros.
* Place into the public domain.
* --------------------------------------------------
*/
* Version Date Reason For Modification
* 1.0 01Jan80 1. Initial release.
* 2.0 31Mar83 2. Cleanup.
* 3.0 08Sep93 3. Change v_foffset to off_t instead of int.
* 3.1 21Oct93 4. Create union member of structure to
* make 'int' or 'char' access to data easy.
* Define segment+offset and modified macros.
* Place into the public domain.
* --------------------------------------------------
*/
#include <sys/types.h>
#define MAXSEGNO 16384 /* max number of segments in a space */
#define BYTESPERSEG 1024 /* must be power of two! */
#define LOG2BPS 10 /* log2(BYTESPERSEG) */
#define WORDSPERSEG (BYTESPERSEG/sizeof (int))
#define MAXSEGNO 16384 /* max number of segments in a space */
#define BYTESPERSEG 1024 /* must be power of two! */
#define LOG2BPS 10 /* log2(BYTESPERSEG) */
#define WORDSPERSEG (BYTESPERSEG/sizeof (int))
struct vspace {
int v_fd; /* file for swapping */
off_t v_foffset; /* offset for computing file addresses */
int v_maxsegno; /* number of segments in this space */
};
int v_fd; /* file for swapping */
off_t v_foffset; /* offset for computing file addresses */
int v_maxsegno; /* number of segments in this space */
};
struct dlink { /* general double link structure */
struct dlink *fwd; /* forward link */
struct dlink *back; /* back link */
};
struct dlink *fwd; /* forward link */
struct dlink *back; /* back link */
};
struct vseg { /* structure of a segment in memory */
struct dlink s_link; /* for linking into lru list */
int s_segno; /* segment number */
struct vspace *s_vspace; /* which virtual space */
int s_lock_count;
int s_flags;
union
{
int _winfo[WORDSPERSEG]; /* the actual segment */
char _cinfo[BYTESPERSEG];
} v_un;
};
struct vseg { /* structure of a segment in memory */
struct dlink s_link; /* for linking into lru list */
int s_segno; /* segment number */
struct vspace *s_vspace; /* which virtual space */
int s_lock_count;
int s_flags;
union {
int _winfo[WORDSPERSEG]; /* the actual segment */
char _cinfo[BYTESPERSEG];
} v_un;
};
#define s_winfo v_un._winfo
#define s_cinfo v_un._cinfo
#define s_winfo v_un._winfo
#define s_cinfo v_un._cinfo
/* masks for s_flags */
#define S_DIRTY 01 /* segment has been modified */
#define S_DIRTY 01 /* segment has been modified */
long nswaps; /* number of swaps */
long nmapsegs; /* number of mapseg calls */
long nswaps; /* number of swaps */
long nmapsegs; /* number of mapseg calls */
int vminit(), vmopen();
struct vseg *vmmapseg();
void vmlock(), vmunlock(), vmclrseg(), vmmodify();
void vmflush(), vmclose();
int vminit(), vmopen();
struct vseg *vmmapseg();
void vmlock(), vmunlock(), vmclrseg(), vmmodify();
void vmflush(), vmclose();
typedef long VADDR;
#define VMMODIFY(seg) (seg->s_flags |= S_DIRTY)
#define VSEG(va) ((short)(va >> LOG2BPS))
#define VOFF(va) ((u_short)va % BYTESPERSEG)
typedef long VADDR;
#define VMMODIFY(seg) (seg->s_flags |= S_DIRTY)
#define VSEG(va) ((short)(va >> LOG2BPS))
#define VOFF(va) ((u_short)va % BYTESPERSEG)

View File

@@ -1,5 +1,5 @@
#ifndef _SOCKET_H_
#define _SOCKET_H_
#ifndef _SOCKET_H_
#define _SOCKET_H_
#include "w5100.h"

View File

@@ -9,8 +9,8 @@
* Updated August/3/2011 by Lowell Scott Hanson to be compatable with chipKIT boards
* Updated April/13/2012 by Serge Vakulenko for RetroBSD project
*/
#ifndef W5100_H_INCLUDED
#define W5100_H_INCLUDED
#ifndef W5100_H_INCLUDED
#define W5100_H_INCLUDED
#include <stdint.h>

View File

@@ -28,6 +28,7 @@
#include <strings.h>
#include <stdlib.h>
#include <unistd.h>
#include <paths.h>
#include "chpass.h"
char e1[] = ": ";

View File

@@ -19,6 +19,7 @@
#include <unistd.h>
#include <fstab.h>
#include <pwd.h>
#include <paths.h>
#include "fsck.h"
extern int returntosingle;
@@ -269,7 +270,7 @@ main(argc, argv)
* for stdio. There may be other problems like this. Enjoy.
*/
if (!getfsent())
errexit("Can't open checklist file: %s\n",FSTAB);
errexit("Can't open checklist file: %s\n", _PATH_FSTAB);
setpassent(1);
memsize = (char*) sbrk(0) - (char*) &_start;
@@ -296,7 +297,7 @@ main(argc, argv)
do {
anygtr = 0;
if (setfsent() == 0)
errexit("Can't open %s\n", FSTAB);
errexit("Can't open %s\n", _PATH_FSTAB);
while ((fsp = getfsent()) != 0) {
if (strcmp(fsp->fs_vfstype, "ufs") ||
(strcmp(fsp->fs_type, FSTAB_RW) &&

View File

@@ -27,6 +27,7 @@
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <paths.h>
uid_t uid;

View File

@@ -38,6 +38,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <paths.h>
typedef enum { MNTON, MNTFROM } mntwhat;

View File

@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include <paths.h>
char *passwd, *temp;

View File

@@ -37,6 +37,7 @@
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <paths.h>
#include <sys/uio.h>
static FILE *_fs_fp;

View File

@@ -23,6 +23,7 @@
#include <pwd.h>
#include <strings.h>
#include <fcntl.h>
#include <paths.h>
static FILE *_pw_fp;
static struct passwd _pw_entry;

View File

@@ -11,8 +11,8 @@
*/
static void
set_ch(win, y, x, ch)
reg WINDOW *win;
int y, x;
WINDOW *win;
int y, x;
{
# ifdef FULLDEBUG
fprintf(outf, "SET_CH(%0.2o, %d, %d)\n", win, y, x);
@@ -38,11 +38,11 @@ set_ch(win, y, x, ch)
* This routine adds the character to the current position
*/
int waddch(win, c)
reg WINDOW *win;
char c;
WINDOW *win;
char c;
{
reg int x, y;
reg int newx;
int x, y;
int newx;
x = win->_curx;
y = win->_cury;

View File

@@ -10,8 +10,8 @@
*/
int
waddstr(win, str)
reg WINDOW *win;
reg char *str;
WINDOW *win;
char *str;
{
# ifdef DEBUG
fprintf(outf, "WADDSTR(\"%s\")\n", str);

View File

@@ -12,13 +12,12 @@
*/
void
box(win, vert, hor)
reg WINDOW *win;
char vert, hor;
WINDOW *win;
char vert, hor;
{
reg int i;
reg int endy, endx;
reg char *fp, *lp;
int i;
int endy, endx;
char *fp, *lp;
endx = win->_maxx;
endy = win->_maxy - 1;

View File

@@ -9,7 +9,7 @@
* This routine clears the window.
*/
int wclear(win)
reg WINDOW *win;
WINDOW *win;
{
werase(win);
win->_clear = TRUE;

View File

@@ -10,11 +10,11 @@
*/
void
wclrtobot(win)
reg WINDOW *win;
WINDOW *win;
{
reg int y;
reg char *sp, *end, *maxx;
reg int startx, minx;
int y;
char *sp, *end, *maxx;
int startx, minx;
startx = win->_curx;
for (y = win->_cury; y < win->_maxy; y++) {

View File

@@ -10,12 +10,12 @@
*/
void
wclrtoeol(win)
reg WINDOW *win;
WINDOW *win;
{
reg char *sp, *end;
reg int y, x;
reg char *maxx;
reg int minx;
char *sp, *end;
int y, x;
char *maxx;
int minx;
y = win->_cury;
x = win->_curx;

View File

@@ -290,8 +290,8 @@ out:
void
fgoto()
{
reg char *cgp;
reg int l, c;
char *cgp;
int l, c;
if (destcol >= COLS) {
destline += destcol / COLS;

View File

@@ -115,10 +115,10 @@ zap()
int
setterm(type)
reg char *type;
char *type;
{
reg int unknown;
static char genbuf[1024];
int unknown;
static char genbuf[1024];
# ifdef TIOCGWINSZ
struct winsize win;
# endif

View File

@@ -11,10 +11,10 @@
*/
int
wdelch(win)
reg WINDOW *win;
WINDOW *win;
{
reg char *temp1, *temp2;
reg char *end;
char *temp1, *temp2;
char *end;
end = &win->_y[win->_cury][win->_maxx - 1];
temp1 = &win->_y[win->_cury][win->_curx];

View File

@@ -12,11 +12,11 @@
*/
int
wdeleteln(win)
reg WINDOW *win;
WINDOW *win;
{
reg char *temp;
reg int y;
reg char *end;
char *temp;
int y;
char *end;
# ifdef DEBUG
fprintf(outf, "DELETELN(%0.2o)\n", win);

View File

@@ -11,10 +11,10 @@
*/
int
delwin(win)
reg WINDOW *win;
WINDOW *win;
{
reg int i;
reg WINDOW *wp, *np;
int i;
WINDOW *wp, *np;
if (win->_orig == NULL) {
/*

View File

@@ -10,11 +10,11 @@
*/
void
werase(win)
reg WINDOW *win;
WINDOW *win;
{
reg int y;
reg char *sp, *end, *start, *maxx;
reg int minx;
int y;
char *sp, *end, *start, *maxx;
int minx;
# ifdef DEBUG
fprintf(outf, "WERASE(%0.2o)\n", win);

View File

@@ -3,7 +3,6 @@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#define reg register
/*
* This routine fills in "def" with the full name of the terminal.
@@ -12,10 +11,9 @@
*/
char *
fullname(bp, def)
reg char *bp, *def;
char *bp, *def;
{
reg char *cp;
char *cp;
*def = 0; /* in case no name */

View File

@@ -9,10 +9,10 @@
* This routine reads in a character from the window.
*/
int wgetch(win)
reg WINDOW *win;
WINDOW *win;
{
reg bool weset = FALSE;
reg char inp;
bool weset = FALSE;
char inp;
if (!win->_scroll && (win->_flags&_FULLWIN)
&& win->_curx == win->_maxx - 1 && win->_cury == win->_maxy - 1)

View File

@@ -10,8 +10,8 @@
*/
int
wgetstr(win, str)
reg WINDOW *win;
reg char *str;
WINDOW *win;
char *str;
{
while ((*str = wgetch(win)) != ERR && *str != '\n')
str++;

View File

@@ -11,11 +11,11 @@
*/
void
_id_subwins(orig)
register WINDOW *orig;
WINDOW *orig;
{
register WINDOW *win;
register int realy;
register int y, oy;
WINDOW *win;
int realy;
int y, oy;
realy = orig->_begy + orig->_cury;
for (win = orig->_nextp; win != orig; win = win->_nextp) {

View File

@@ -12,8 +12,8 @@
*/
void
idlok(win, bf)
register WINDOW *win;
bool bf;
WINDOW *win;
bool bf;
{
if (bf)
win->_flags |= _IDLINE;

View File

@@ -14,8 +14,8 @@
WINDOW *
initscr()
{
reg char *sp;
int nfd;
char *sp;
int nfd;
# ifdef DEBUG
fprintf(outf, "INITSCR()\n");

View File

@@ -11,11 +11,11 @@
*/
int
winsch(win, c)
reg WINDOW *win;
char c;
WINDOW *win;
char c;
{
reg char *temp1, *temp2;
reg char *end;
char *temp1, *temp2;
char *end;
end = &win->_y[win->_cury][win->_curx];
temp1 = &win->_y[win->_cury][win->_maxx - 1];

View File

@@ -12,11 +12,11 @@
*/
void
winsertln(win)
reg WINDOW *win;
WINDOW *win;
{
reg char *temp = 0;
reg int y;
reg char *end;
char *temp = 0;
int y;
char *end;
#ifdef DEBUG
fprintf(outf, "INSERTLN(%0.2o)\n", win);

View File

@@ -3,16 +3,15 @@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#define reg register
/*
* This routine fills in "def" with the long name of the terminal.
*/
char *
longname(bp, def)
reg char *bp, *def;
char *bp, *def;
{
reg char *cp;
char *cp;
while (*bp && *bp != ':' && *bp != '|')
bp++;

View File

@@ -9,8 +9,8 @@
* This routine moves the cursor to the given point
*/
int wmove(win, y, x)
reg WINDOW *win;
reg int y, x;
WINDOW *win;
int y, x;
{
#ifdef DEBUG
fprintf(outf, "MOVE to (%d, %d)\n", y, x);

View File

@@ -11,19 +11,19 @@
*/
int
mvscanw(y, x, fmt, args)
reg int y, x;
char *fmt;
int args;
int y, x;
char *fmt;
int args;
{
return move(y, x) == OK ? _sscans(stdscr, fmt, &args) : ERR;
}
int
mvwscanw(win, y, x, fmt, args)
reg WINDOW *win;
reg int y, x;
char *fmt;
int args;
WINDOW *win;
int y, x;
char *fmt;
int args;
{
return wmove(win, y, x) == OK ? _sscans(win, fmt, &args) : ERR;
}

View File

@@ -10,11 +10,11 @@
*/
int
mvwin(win, by, bx)
reg WINDOW *win;
reg int by, bx;
WINDOW *win;
int by, bx;
{
register WINDOW *orig;
register int dy, dx;
WINDOW *orig;
int dy, dx;
if (by + win->_maxy > LINES || bx + win->_maxx > COLS)
return ERR;

View File

@@ -22,8 +22,8 @@ static WINDOW *
makenew(num_lines, num_cols, begy, begx)
int num_lines, num_cols, begy, begx;
{
reg WINDOW *win;
reg int by, bx, nl, nc;
WINDOW *win;
int by, bx, nl, nc;
by = begy;
bx = begx;
@@ -71,10 +71,10 @@ WINDOW *
newwin(num_lines, num_cols, begy, begx)
int num_lines, num_cols, begy, begx;
{
reg WINDOW *win;
reg char *sp;
reg int i, by, bx, nl, nc;
reg int j;
WINDOW *win;
char *sp;
int i, by, bx, nl, nc;
int j;
by = begy;
bx = begx;
@@ -125,11 +125,11 @@ newwin(num_lines, num_cols, begy, begx)
WINDOW *
subwin(orig, num_lines, num_cols, begy, begx)
reg WINDOW *orig;
int num_lines, num_cols, begy, begx;
WINDOW *orig;
int num_lines, num_cols, begy, begx;
{
reg WINDOW *win;
reg int by, bx, nl, nc;
WINDOW *win;
int by, bx, nl, nc;
by = begy;
bx = begx;

View File

@@ -15,12 +15,11 @@
*/
void
overlay(win1, win2)
reg WINDOW *win1, *win2;
WINDOW *win1, *win2;
{
reg char *sp, *end;
reg int x, y, endy, endx, starty, startx;
reg int y1,y2;
char *sp, *end;
int x, y, endy, endx, starty, startx;
int y1,y2;
# ifdef DEBUG
fprintf(outf, "OVERLAY(%0.2o, %0.2o);\n", win1, win2);

View File

@@ -15,9 +15,9 @@
*/
void
overwrite(win1, win2)
reg WINDOW *win1, *win2;
WINDOW *win1, *win2;
{
reg int x, y, endy, endx, starty, startx;
int x, y, endy, endx, starty, startx;
# ifdef DEBUG
fprintf(outf, "OVERWRITE(%0.2o, %0.2o);\n", win1, win2);

View File

@@ -7,7 +7,7 @@
int
_putchar(c)
reg int c;
int c;
{
putchar(c);
#ifdef DEBUG

View File

@@ -40,12 +40,12 @@ domvcur(oy, ox, ny, nx)
*/
STATIC int
makech(win, wy)
reg WINDOW *win;
short wy;
WINDOW *win;
short wy;
{
reg char *nsp, *csp, *ce;
reg short wx, lch, y;
reg int nlsp = 0, clsp; /* last space in lines */
char *nsp, *csp, *ce;
short wx, lch, y;
int nlsp = 0, clsp; /* last space in lines */
wx = win->_firstch[wy] - win->_ch_off;
if (wx >= win->_maxx)
@@ -198,10 +198,10 @@ short wy;
}
int wrefresh(win)
reg WINDOW *win;
WINDOW *win;
{
reg short wy;
reg int retval;
short wy;
int retval;
/*
* make sure were in visual state

View File

@@ -10,9 +10,9 @@
*/
int
scroll(win)
register WINDOW *win;
WINDOW *win;
{
register int oy, ox;
int oy, ox;
# ifdef DEBUG
fprintf(outf, "SCROLL(%0.2o)\n", win);

View File

@@ -12,7 +12,7 @@
*/
char *
wstandout(win)
reg WINDOW *win;
WINDOW *win;
{
if (!SO && !UC)
return FALSE;
@@ -26,7 +26,7 @@ wstandout(win)
*/
char *
wstandend(win)
reg WINDOW *win;
WINDOW *win;
{
if (!SO && !UC)
return FALSE;

View File

@@ -13,9 +13,9 @@
*/
void
touchoverlap(win1, win2)
reg WINDOW *win1, *win2;
WINDOW *win1, *win2;
{
reg int y, endy, endx, starty, startx;
int y, endy, endx, starty, startx;
# ifdef DEBUG
fprintf(outf, "TOUCHOVERLAP(%0.2o, %0.2o);\n", win1, win2);

View File

@@ -10,9 +10,9 @@
*
*/
int touchwin(win)
register WINDOW *win;
WINDOW *win;
{
register int y, maxy;
int y, maxy;
# ifdef DEBUG
fprintf(outf, "TOUCHWIN(%0.2o)\n", win);
@@ -27,8 +27,8 @@ int touchwin(win)
* touch a given line
*/
int touchline(win, y, sx, ex)
register WINDOW *win;
register int y, sx, ex;
WINDOW *win;
int y, sx, ex;
{
# ifdef DEBUG
fprintf(outf, "TOUCHLINE(%0.2o, %d, %d, %d)\n", win, y, sx, ex);

View File

@@ -73,8 +73,3 @@ struct mtget {
#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */
#define MTIOCIEOT _IO ('m', 3) /* ignore EOT error */
#define MTIOCEEOT _IO ('m', 4) /* enable EOT error */
#ifndef KERNEL
#define DEFTAPE "/dev/rmt8"
#define MT_DEF "/dev/nrmt8"
#endif

View File

@@ -37,8 +37,6 @@
#ifndef _SYS_SYSLOG_H_
#define _SYS_SYSLOG_H_
#define _PATH_LOG "/dev/log"
/*
* priorities/facilities are encoded into a single 16-bit quantity, where the
* bottom 3 bits are the priority (0-7) and the top 13 bits are the facility