From 9ede34412cfe23c491ce3620f9f6d5dddf708d82 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 4 Oct 1991 14:34:29 +0000 Subject: [PATCH] Added --- include/_tail_cc/.distr | 3 + include/_tail_cc/grp.h | 21 +++++++ include/_tail_cc/pwd.h | 26 +++++++++ include/_tail_cc/sgtty.h | 117 +++++++++++++++++++++++++++++++++------ 4 files changed, 150 insertions(+), 17 deletions(-) create mode 100644 include/_tail_cc/grp.h create mode 100644 include/_tail_cc/pwd.h diff --git a/include/_tail_cc/.distr b/include/_tail_cc/.distr index 966e66565..bb167b6d6 100644 --- a/include/_tail_cc/.distr +++ b/include/_tail_cc/.distr @@ -6,4 +6,7 @@ termio.h varargs.h math.h time.h +pwd.h +grp.h +sgtty.h sys diff --git a/include/_tail_cc/grp.h b/include/_tail_cc/grp.h new file mode 100644 index 000000000..dc7d25fb7 --- /dev/null +++ b/include/_tail_cc/grp.h @@ -0,0 +1,21 @@ +/* $Header$ */ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ + +#ifndef _GRP_H +#define _GRP_H + +struct group { + char *gr_name; /* the name of the group */ + char *gr_passwd; /* the group passwd */ + gid_t gr_gid; /* the numerical group ID */ + char **gr_mem; /* a vector of pointers to the members */ +}; + +extern struct group *getgrgid(); +extern struct group *getgrnam(); +extern struct group *getgrent(); + +#endif /* _GRP_H */ diff --git a/include/_tail_cc/pwd.h b/include/_tail_cc/pwd.h new file mode 100644 index 000000000..7b2797919 --- /dev/null +++ b/include/_tail_cc/pwd.h @@ -0,0 +1,26 @@ +/* $Header$ */ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ + +#ifndef _PWD_H +#define _PWD_H + +struct passwd { + char *pw_name; /* login name */ + uid_t pw_uid; /* uid corresponding to the name */ + gid_t pw_gid; /* gid corresponding to the name */ + char *pw_dir; /* user's home directory */ + char *pw_shell; /* name of the user's shell */ + + /* The following members are not defined by POSIX. */ + char *pw_passwd; /* password information */ + char *pw_gecos; /* just in case you have a GE 645 around */ +}; + +extern struct passwd *getpwnam(); +extern struct passwd *getpwuid(); +extern struct passwd *getpwent(); + +#endif /* _PWD_H */ diff --git a/include/_tail_cc/sgtty.h b/include/_tail_cc/sgtty.h index 89837595e..a44338309 100644 --- a/include/_tail_cc/sgtty.h +++ b/include/_tail_cc/sgtty.h @@ -1,23 +1,106 @@ -#ifdef __CHANNEL__ -struct sgttyb { - char sg_ispeed; - char sg_ospeed; - char sg_erase; - char sg_kill; - short sg_flags; -}; +/* $Header$ */ +/* + * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. + * See the copyright notice in the ACK home directory, in the file "Copyright". + */ +/* Data structures for ioctl/stty/gtty, sufficient for ACK libraries */ -#ifdef __BSD4_2 -#define TIOCGETP ((('t'<<8)|8)|(sizeof(struct sgttyb)<<16)|0x40000000) -#define TIOCSETN ((('t'<<8)|10)|(sizeof(struct sgttyb)<<16)|0x80000000) +struct sgttyb { + char sg_ispeed; /* input speed (not used) */ + char sg_ospeed; /* output speed (not used) */ + char sg_erase; /* erase character */ + char sg_kill; /* kill character */ +#ifdef __USG + int sg_flags; /* mode flags */ #else -#define TIOCGETP (('t'<<8)|8) -#define TIOCSETN (('t'<<8)|10) + short sg_flags; /* mode flags */ #endif +}; + +struct tchars { + char t_intrc; /* SIGINT char */ + char t_quitc; /* SIGQUIT char */ + char t_startc; /* start output (initially CTRL-Q) */ + char t_stopc; /* stop output (initially CTRL-S) */ + char t_eofc; /* EOF (initially CTRL-D) */ + char t_brkc; /* input delimiter (like nl) */ +}; + +/* Fields in t_flags. */ +#define ALLDELAY 0177400 + +#define BSDELAY 0100000 +# define BS0 0000000 +# define BS1 0100000 -#define CBREAK 02 -#define ECHO 010 -#define CRMOD 020 +#define VTDELAY 0040000 +# define FF0 0000000 +# define FF1 0040000 + +#define CRDELAY 0030000 +# define CR0 0000000 +# define CR1 0010000 +# define CR2 0020000 +# define CR3 0030000 + +#define XTABS 0006000 /* do tab expansion */ + +#define TBDELAY 0006000 +# define TAB0 0000000 +# define TAB1 0002000 +# define TAB2 0004000 + +#define NLDELAY 0001400 +# define NL0 0000000 +# define NL1 0000400 +# define NL2 0001000 +# define NL3 0001400 + +#define ANYP 0000300 +#define EVENP 0000200 +#define ODDP 0000100 + +#define RAW 0000040 /* enable raw mode */ +#define CRMOD 0000020 /* map lf to cr + lf */ +#define ECHO 0000010 /* echo input */ +#define LCASE 0000004 +#define CBREAK 0000002 /* enable cbreak mode */ +#define TANDEM 0000001 +/*#define COOKED 0000000 /* neither CBREAK nor RAW */ + +#ifdef __BDS4_2 +#define TIOCGETP (('t'<<8) | 8 | (6 << 16) | 0x40000000) +#define TIOCSETP (('t'<<8) | 9 | (6 << 16) | 0x80000000) +#define TIOCSETN (('t'<<8) | 10 | (6 << 16) | 0x80000000) +#define TIOCEXCL (('t'<<8) | 13 | 0x20000000) +#define TIOCNXCL (('t'<<8) | 14 | 0x20000000) +#define TIOCHPCL (('t'<<8) | 2 | 0x20000000) +#define TIOCGETC (('t'<<8) | 18 | (6 << 16) | 0x40000000) +#define TIOCSETC (('t'<<8) | 17 | (6 << 16) | 0x80000000) #else -#include "/usr/include/sgtty.h" +#define TIOCGETP (('t'<<8) | 8) +#define TIOCSETP (('t'<<8) | 9) +#define TIOCSETN (('t'<<8) | 10) +#define TIOCEXCL (('t'<<8) | 13) +#define TIOCNXCL (('t'<<8) | 14) +#define TIOCHPCL (('t'<<8) | 2) +#define TIOCGETC (('t'<<8) | 18) +#define TIOCSETC (('t'<<8) | 17) #endif + +#define B0 0 +#define B50 1 +#define B75 2 +#define B110 3 +#define B134 4 +#define B150 5 +#define B200 6 +#define B300 7 +#define B600 8 +#define B1200 9 +#define B1800 10 +#define B2400 11 +#define B4800 12 +#define B9600 13 +#define EXTA 14 +#define EXTB 15 -- 2.34.1