ast@cs.vu.nl (Andy Tanenbaum) (10/26/89)
: This is a shar archive. Extract with sh, not csh.
: This archive ends with exit, so do not worry about trailing junk.
: --------------------------- cut here --------------------------
PATH=/bin:/usr/bin:/usr/ucb
echo Extracting 'pwd.h'
sed 's/^X//' > 'pwd.h' << '+ END-OF-FILE ''pwd.h'
X/* The <pwd.h> header defines the items in the password file. */
X
Xstruct passwd {
X char *pw_name; /* login name */
X uid_t pw_uid; /* uid corresponding to the name */
X gid_t pw_gid; /* gid corresponding to the name */
X char *pw_dir; /* user's home directory */
X char *pw_shell; /* name of the user's shell */
X
X /* The following members are not defined by POSIX. */
X char *pw_passwd; /* password information */
X char *pw_gecos; /* just in case you have a GE 645 around */
X};
X
X
X/* Declare ANSI or K&R prototypes (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xstruct passwd *getpwuid(uid_t __uid);
Xstruct passwd *getpwnam(char *__name);
X#endif
X
X#if _USE_OLD_PROTOTYPES /* Kernighan and Ritchie C prototypes */
Xstruct passwd *getpwuid();
Xstruct passwd *getpwnam();
X#endif
+ END-OF-FILE pwd.h
chmod 'u=rw,g=r,o=r' 'pwd.h'
set `wc -c 'pwd.h'`
count=$1
case $count in
885) :;;
*) echo 'Bad character count in ''pwd.h' >&2
echo 'Count should be 885' >&2
esac
echo Extracting 'regexp.h'
sed 's/^X//' > 'regexp.h' << '+ END-OF-FILE ''regexp.h'
X/* The <regexp.h> header is used by the (V8-compatible) regexp(3) routines.
X
X#define void int
X#define CHARBITS 0377
X#define strchr index
X#define NSUBEXP 10
Xtypedef struct regexp {
X char *startp[NSUBEXP];
X char *endp[NSUBEXP];
X char regstart; /* Internal use only. */
X char reganch; /* Internal use only. */
X char *regmust; /* Internal use only. */
X int regmlen; /* Internal use only. */
X char program[1]; /* Unwarranted chumminess with compiler. */
X} regexp;
X
Xextern regexp *regcomp();
Xextern int regexec();
Xextern void regsub();
Xextern void regerror();
+ END-OF-FILE regexp.h
chmod 'u=rw,g=r,o=r' 'regexp.h'
set `wc -c 'regexp.h'`
count=$1
case $count in
560) :;;
*) echo 'Bad character count in ''regexp.h' >&2
echo 'Count should be 560' >&2
esac
echo Extracting 'setjmp.h'
sed 's/^X//' > 'setjmp.h' << '+ END-OF-FILE ''setjmp.h'
X/* The <setjmp.h> header relates to the C phenomenon known as setjmp/longjmp.
X * It is used to escape out of the current situation into a previous one.
X * A typical example is in an editor, where hitting DEL breaks off the current
X * command and puts the editor back in the main loop.
X */
X
X/* _JBLEN should be 3 for IBM PC, 13 for ATARI. */
X
X#ifndef _SETJMP_H
X#define _SETJMP_H
X
X#define _JBLEN 3
X
Xtypedef int jmp_buf[_JBLEN];
X
X/* Declare ANSI or K&R prototypes (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xint setjmp(jmp_buf __env);
Xvoid longjmp(jmp_buf __env, int __val);
X#endif
X
X#if _USE_OLD_PROTOTYPES /* Kernighan and Ritchie C prototypes */
Xint setjmp();
Xvoid longjmp();
X#endif
X
X#endif /* _SETJMP_H */
+ END-OF-FILE setjmp.h
chmod 'u=rw,g=r,o=r' 'setjmp.h'
set `wc -c 'setjmp.h'`
count=$1
case $count in
814) :;;
*) echo 'Bad character count in ''setjmp.h' >&2
echo 'Count should be 814' >&2
esac
echo Extracting 'sgtty.h'
sed 's/^X//' > 'sgtty.h' << '+ END-OF-FILE ''sgtty.h'
X/* The <sgtty.h> header contains data structures for ioctl(). */
X
Xstruct sgttyb {
X char sg_ispeed; /* input speed */
X char sg_ospeed; /* output speed */
X char sg_erase; /* erase character */
X char sg_kill; /* kill character */
X int sg_flags; /* mode flags */
X};
X
Xstruct tchars {
X char t_intrc; /* SIGINT char */
X char t_quitc; /* SIGQUIT char */
X char t_startc; /* start output (initially CTRL-Q) */
X char t_stopc; /* stop output (initially CTRL-S) */
X char t_eofc; /* EOF (initially CTRL-D) */
X char t_brkc; /* input delimiter (like nl) */
X};
X
X/* Field names */
X#define XTABS 0006000 /* do tab expansion */
X#define BITS8 0001400 /* 8 bits/char */
X#define BITS7 0001000 /* 7 bits/char */
X#define BITS6 0000400 /* 6 bits/char */
X#define BITS5 0000000 /* 5 bits/char */
X#define EVENP 0000200 /* even parity */
X#define ODDP 0000100 /* odd parity */
X#define RAW 0000040 /* enable raw mode */
X#define CRMOD 0000020 /* map lf to cr + lf */
X#define ECHO 0000010 /* echo input */
X#define CBREAK 0000002 /* enable cbreak mode */
X#define COOKED 0000000 /* neither CBREAK nor RAW */
X
X/* Line speeds */
X#define B110 1
X#define B300 3
X#define B1200 12
X#define B2400 24
X#define B4800 48
X#define B9600 96
X
X#define TIOCGETP (('t'<<8) | 8)
X#define TIOCSETP (('t'<<8) | 9)
X#define TIOCGETC (('t'<<8) | 18)
X#define TIOCSETC (('t'<<8) | 17)
+ END-OF-FILE sgtty.h
chmod 'u=rw,g=r,o=r' 'sgtty.h'
set `wc -c 'sgtty.h'`
count=$1
case $count in
1444) :;;
*) echo 'Bad character count in ''sgtty.h' >&2
echo 'Count should be 1444' >&2
esac
echo Extracting 'signal.h'
sed 's/^X//' > 'signal.h' << '+ END-OF-FILE ''signal.h'
X/* The <signal.h> header defines all the ANSI and POSIX signals.
X * MINIX supports all the signals required by POSIX. They are defined below.
X * Some additional signals are also supported.
X */
X
X#ifndef _SIGNAL_H
X#define _SIGNAL_H
X
X#define _NSIG 15 /* number of signals used */
X
X#define SIGHUP 1 /* hangup */
X#define SIGINT 2 /* interrupt (DEL) */
X#define SIGQUIT 3 /* quit (ASCII FS) */
X#define SIGILL 4 /* illegal instruction */
X#define SIGTRAP 5 /* trace trap (not reset when caught) */
X#define SIGABRT 6 /* IOT instruction */
X#define SIGUNUSED 7 /* spare code */
X#define SIGFPE 8 /* floating point exception */
X#define SIGKILL 9 /* kill (cannot be caught or ignored) */
X#define SIGUSR1 10 /* user defined signal # 1 */
X#define SIGSEGV 11 /* segmentation violation */
X#define SIGUSR2 12 /* user defined signal # 2 */
X#define SIGPIPE 13 /* write on a pipe with no one to read it */
X#define SIGALRM 14 /* alarm clock */
X#define SIGTERM 15 /* software termination signal from kill */
X
X#define SIGSTKFLT 16 /* used by kernel to indicate stack fault */
X
X/* POSIX requires the following signals to be defined, even if they are
X * not supported. Here are the definitions, but they are not supported.
X */
X#define SIGCHLD 17 /* child process terminated or stopped */
X#define SIGCONT 18 /* continue if stopped */
X#define SIGSTOP 19 /* stop signal */
X#define SIGTSTP 20 /* interactive stop signal */
X#define SIGTTIN 21 /* background process wants to read */
X#define SIGTTOU 22 /* background process wants to write */
X
X#ifdef _POSIX_SOURCE
X#define SA_NOCLDSTOP 1 /* signal parent if child stops */
X
X/* Here are types that are closely associated with signal handling. */
Xtypedef int sig_atomic_t;
Xtypedef unsigned short sigset_t;
X
Xstruct sigaction { /* parameter to sigaction() call */
X void (*sa_handler); /* pointer to signal handler */
X sigset_t sa_mask; /* signals to be blocked during handler */
X int sa_flags; /* special flags to affect behavior of sig */
X}
X#endif /* _POSIX_SOURCE */
X
X/* POSIX requires these values for use on system calls involving signals. */
X#define SIG_BLOCK 0 /* for blocking signals */
X#define SIG_UNBLOCK 1 /* for unblocking signals */
X#define SIG_SETMASK 2 /* for setting the signal mask */
X
X/* Macros used as function pointers. */
X#define SIG_DFL ((void (*)(int))0)
X#define SIG_IGN ((void (*)(int))1)
X#define SIG_ERR ((void (*)(int))-1)
X
X/* Declare ANSI or K&R prototypes (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xint kill(pid_t __pid, int __sig);
Xvoid (*signal(int __sig, void (*__func)(int)))(int);
Xint sigemptyset(sigset_t *__set);
Xint sigfillset(sigset_t *__set);
Xint sigaddset(sigset_t *__set);
Xint sigdelset(sigset_t *__set);
Xint sigismember(sigset_t *__set, int __signo);
Xint sigaction(int __sig, struct sigaction *__act, struct sigaction *__oact);
Xint sigprocmask(int __how, sigset_t *__set, sigset_t *__oset);
Xint sigsuspend(sigset_t *__sigmask);
Xint raise(int __sig);
X#endif
X
X#if _USE_OLD_PROTOTYPES /* Kernighan and Ritchie C prototypes */
Xvoid (*signal())();
X#endif
X
X#endif /* _SIGNAL_H */
+ END-OF-FILE signal.h
chmod 'u=rw,g=r,o=r' 'signal.h'
set `wc -c 'signal.h'`
count=$1
case $count in
3412) :;;
*) echo 'Bad character count in ''signal.h' >&2
echo 'Count should be 3412' >&2
esac
echo Extracting 'stat.h'
sed 's/^X//' > 'stat.h' << '+ END-OF-FILE ''stat.h'
X/* The <sys/stat.h> header defines a struct that is used in the stat() and
X * fstat functions. The information in this struct comes from the i-node of
X * some file. These calls are the only approved way to inspect i-nodes.
X */
X
Xstruct stat {
X dev_t st_dev; /* major/minor device number */
X ino_t st_ino; /* i-node number */
X mode_t st_mode; /* file mode, protection bits, etc. */
X nlink_t st_nlink; /* number of links */
X uid_t st_uid; /* uid of the file's owner */
X gid_t st_gid; /* gid of the file's owner */
X short int st_rdev;
X off_t st_size; /* file size */
X time_t st_atime; /* time of last access */
X time_t st_mtime; /* time of last data modification */
X time_t st_ctime; /* time of last file status change */
X};
X
X/* Traditional mask definitions for st_mode. */
X#define S_IFMT 0170000 /* type of file */
X#define S_IFREG 0100000 /* regular */
X#define S_IFBLK 0060000 /* block special */
X#define S_IFDIR 0040000 /* directory */
X#define S_IFCHR 0020000 /* character special */
X#define S_IFIFO 0010000 /* this is a FIFO */
X#define S_ISUID 0004000 /* set user id on execution */
X#define S_ISGID 0002000 /* set group id on execution */
X /* 0001000 is reserved for future use */
X
X/* POSIX masks for st_mode. */
X#define S_IRWXU 00700 /* owner: rwx------ */
X#define S_IRUSR 00400 /* owner: r-------- */
X#define S_IWUSR 00200 /* owner: -w------- */
X#define S_IXUSR 00100 /* owner: --x------ */
X
X#define S_IRWXG 00070 /* group: ---rwx--- */
X#define S_IRGRP 00040 /* group: ---r----- */
X#define S_IWGRP 00020 /* group: ----w---- */
X#define S_IXGRP 00010 /* group: -----x--- */
X
X#define S_IRWXO 00007 /* others: ------rwx */
X#define S_IROTH 00004 /* others: ------r-- */
X#define S_IWOTH 00002 /* others: -------w- */
X#define S_IXOTH 00001 /* others: --------x */
X
X/* The following macros test st_mode (from POSIX Sec. 5.6.1.1. */
X#define S_ISREG(m) ((m & S_IFMT) == S_IFREG) /* is a reg file */
X#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */
X#define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR) /* is a char spec */
X#define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK) /* is a block spec */
X#define S_ISFIFO(m) ((m & S_IFMT) == S_IFFIFO) /* is a pipe/FIFO */
X
X
X/* Declare ANSI or K&R prototypes (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xmode_t umask(mode_t __cmask);
Xint mkdir(char *__path, mode_t __mode);
Xint mkfifo(char *__path, mode_t __mode);
Xint stat (char *__path, struct stat *__buf);
Xint fstat(int __fildes, struct stat *__buf);
Xint chmod(char *__path, mode_t __mode);
X#endif
X
X
X#if _USE_OLD_PROTOTYPES /* Kernighan and Ritchie C prototypes */
Xmode_t umask();
X#endif
+ END-OF-FILE stat.h
chmod 'u=rw,g=r,o=r' 'stat.h'
set `wc -c 'stat.h'`
count=$1
case $count in
2763) :;;
*) echo 'Bad character count in ''stat.h' >&2
echo 'Count should be 2763' >&2
esac
echo Extracting 'stdarg.h'
sed 's/^X//' > 'stdarg.h' << '+ END-OF-FILE ''stdarg.h'
X/* The <stdarg.h> header is ANSI's way to handle variable numbers of params.
X * Some programming languages require a function that is declared with n
X * parameters to be called with n parameters. C does not. A function may
X * called with more parameters than it is declared with. The well-known
X * printf function, for example, may have arbitrarily many parameters.
X * The question arises how one can access all the parameters in a portable
X * way. The C standard defines three macros that programs can use to
X * advance through the parameter list. The definition of these macros for
X * MINIX are given in this file. The three macros are:
X *
X * va_start(ap, parmN) prepare to access parameters
X * va_arg(ap, type) get next parameter value and type
X * va_end(ap) access is finished
X */
X
X#ifndef _STDARG_H
X#define _STDARG_H
X
Xtypedef void *va_list;
X
X#define _vasz(x) ((sizeof(x)+sizeof(int)-1) & ~(sizeof(int) -1))
X
X#define va_start(ap, parmN) (ap = (va_list)&parmN + _vasz(parmN))
X#define va_arg(ap, type) (*((type *)((ap += _vasz(type)) - _vasz(type))))
X#define va_end(ap)
X
X#endif /* _STDARG_H */
+ END-OF-FILE stdarg.h
chmod 'u=rw,g=r,o=r' 'stdarg.h'
set `wc -c 'stdarg.h'`
count=$1
case $count in
1116) :;;
*) echo 'Bad character count in ''stdarg.h' >&2
echo 'Count should be 1116' >&2
esac
echo Extracting 'stddef.h'
sed 's/^X//' > 'stddef.h' << '+ END-OF-FILE ''stddef.h'
X/* The <stddef.h> header defines certain commonly used macros. */
X
X#ifndef _STDDEF_H
X#define _STDDEF_H
X
X#ifndef NULL
X#define NULL (void *) 0
X#endif
X
X/* The final exam will not cover the material present on the next two lines. */
X#define offsetof(T,m) ((size_t) (((char *) &(((T *) 256)->m)) - \
X ((char *) ((T *) 256))))
X
X#ifndef _PTRDIFF_T
X#define _PTRDIFF_T
Xtypedef int ptrdiff_t; /* result of subtracting two pointers */
X#endif
X
X#ifndef _SIZE_T
X#define _SIZE_T
Xtypedef unsigned int size_t; /* type returned by sizeof */
X#endif
X
X#ifndef _WCHAR_T
X#define _WCHAR_T
Xtypedef char wchar_t; /* type expanded character set */
X#endif
X
X#endif /* _STDDEF_H */
+ END-OF-FILE stddef.h
chmod 'u=rw,g=r,o=r' 'stddef.h'
set `wc -c 'stddef.h'`
count=$1
case $count in
671) :;;
*) echo 'Bad character count in ''stddef.h' >&2
echo 'Count should be 671' >&2
esac
echo Extracting 'stdio.h'
sed 's/^X//' > 'stdio.h' << '+ END-OF-FILE ''stdio.h'
X/* The <stdio.h> header is used by the I/O routines. */
X
X#define BUFSIZ 1024
X#define NFILES 20
X#define NULL 0
X#define EOF (-1)
X#define CMASK 0377
X
X#define READMODE 1
X#define WRITEMODE 2
X#define UNBUFF 4
X#define _EOF 8
X#define _ERR 16
X#define IOMYBUF 32
X#define PERPRINTF 64
X#define STRINGS 128
X
X#ifndef FILE
X
Xextern struct _io_buf {
X int _fd;
X int _count;
X int _flags;
X char *_buf;
X char *_ptr;
X} *_io_table[NFILES];
X
X
X#endif /* FILE */
X
X#define FILE struct _io_buf
X
X
X#define stdin (_io_table[0])
X#define stdout (_io_table[1])
X#define stderr (_io_table[2])
X
X#define getchar() getc(stdin)
X#define putchar(c) putc(c,stdout)
X#define getc(f) fgetc(f)
X#define putc(c,f) fputc(c,f)
X#define feof(p) (((p)->_flags & _EOF) != 0)
X#define ferror(p) (((p)->_flags & _ERR) != 0)
X#define clearerr(p) ((p)->_flags &= ~(_ERR))
X#define fileno(p) ((p)->_fd)
X#define rewind(f) fseek(f, 0L, 0)
X#define testflag(p,x) ((p)->_flags & (x))
X
X/* If you want a stream to be flushed after each printf use:
X *
X * perprintf(stream);
X *
X * If you want to stop with this kind of buffering use:
X *
X * noperprintf(stream);
X */
X
X#define noperprintf(p) ((p)->_flags &= ~PERPRINTF)
X#define perprintf(p) ((p)->_flags |= PERPRINTF)
X
Xextern FILE *fopen();
Xextern FILE *freopen();
Xextern long ftell();
Xextern char *fgets();
Xextern char *gets();
+ END-OF-FILE stdio.h
chmod 'u=rw,g=r,o=r' 'stdio.h'
set `wc -c 'stdio.h'`
count=$1
case $count in
1411) :;;
*) echo 'Bad character count in ''stdio.h' >&2
echo 'Count should be 1411' >&2
esac
echo Extracting 'stdlib.h'
sed 's/^X//' > 'stdlib.h' << '+ END-OF-FILE ''stdlib.h'
X/* The <stdlib.h> header defines certain common macros, types, and functions.*/
X
X#ifndef _STDLIB_H
X#define _STDLIB_H
X
X/* The macros are NULL, EXIT_FAILURE, EXIT_SUCCESS, RAND_MAX, and MB_CUR_MAX.*/
X#ifndef NULL
X#define NULL (void *) 0
X#endif
X
X#define EXIT_FAILURE 1 /* standard error return using exit() */
X#define EXIT_SUCCESS 0 /* successful return using exit() */
X#define RAND_MAX 32767 /* largest value generated by rand() */
X#define MB_CUR_MAX 1 /* max value of multibye character */
X
X
X/* The types are size_t, wchar_t, div_t, and ldiv_t. */
X#ifndef _SIZE_T
X#define _SIZE_T
Xtypedef unsigned int size_t; /* type returned by sizeof */
X#endif
X
X#ifndef _WCHAR_T
X#define _WCHAR_T
Xtypedef char wchar_t; /* type expanded character set */
X#endif
X
Xtypedef struct { int quot, rem; } div_t;
Xtypedef struct { long quot, rem; } ldiv_t;
X
X/* Declare ANSI or K&R prototypes (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xdouble atof(const char *__nptr);
Xint atoi(const char *__nptr);
Xlong atol(const char *__nptr);
Xdouble strtod(const char *__nptr, char **__endptr);
Xlong strtol(const char *__nptr, char **__endptr, int __base);
Xunsigned long int strtoul(const char *__nptr, char **__endptr, int __base);
Xint rand(void);
Xvoid srand(unsigned int __seed);
Xvoid *calloc(size_t __nmemb, size_t __size);
Xvoid free(void *__ptr);
Xvoid *malloc(size_t __size);
Xvoid *realloc(void *__ptr, size_t __size);
Xvoid abort(void);
Xint atexit(void (*func)(void));
Xvoid exit(int __status);
Xchar *getenv(const char *__name);
Xint system(const char *__string);
Xvoid *bsearch(const void *__key, const void *__base, size_t __nmemb,
X size_t __size, int (*__compar) (const void *, const void *));
Xint (*compar)(const void *, const void *));
Xvoid qsort(void *__base, size_t __nmemb, size_t __size,
Xint (*compar)(const void *, const void *));
Xint abs(int __j);
Xdiv_t div(int __numer, int __denom);
Xlong labs(long __j);
Xldiv_t ldiv(long __numer, long __denom);
Xint mblen(const char *__s, size_t __n);
Xint mbtowc(wchar_t *__pwc, const char *__s, size_t __n);
Xint wctomb(char *__s, wchar_t __wchar);
Xsize_t mbstowcs(wchar_t *__pwcs, const char *__s, size_t __n);
Xsize_t wcstombs(char *__s, const wchar_t *__pwcs, size_t __n);
X#endif
X
X#if _USE_OLD_PROTOTYPES /* Kernighan and Ritchie C prototypes */
Xdouble atof();
Xlong atol();
Xdouble strtod();
Xlong strtol();
Xunsigned long int strtoul();
Xvoid srand();
Xvoid *calloc();
Xvoid free();
Xvoid *malloc();
Xvoid *realloc();
Xvoid abort();
Xvoid exit();
Xchar *getenv();
Xvoid *bsearch();
Xvoid qsort();
Xdiv_t div();
Xlong labs();
Xldiv_t ldiv();
Xsize_t mbstowcs();
Xsize_t wcstombs();
X#endif
X
X#endif /* STDLIB_HEADER */
+ END-OF-FILE stdlib.h
chmod 'u=rw,g=r,o=r' 'stdlib.h'
set `wc -c 'stdlib.h'`
count=$1
case $count in
2742) :;;
*) echo 'Bad character count in ''stdlib.h' >&2
echo 'Count should be 2742' >&2
esac
echo Extracting 'string.h'
sed 's/^X//' > 'string.h' << '+ END-OF-FILE ''string.h'
X/* The <string.h> header contains prototypes for the string handling
X * functions. */
X
X#ifndef _STRING_H
X#define _STRING_H
X
X#ifndef NULL
X#define NULL (void *) 0
X#endif
X
X#ifndef _SIZE_T
X#define _SIZE_T
Xtypedef unsigned int size_t; /* type returned by sizeof */
X#endif
X
X/* Declare ANSI or K&R prototypes (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xvoid *memcpy(void *__s1, const void *__s2, size_t __n);
Xvoid *memmove(void *__s1, const void *__s2, size_t __n);
Xchar *strcpy(char *__s1, const char *__s2);
Xchar *strncpy(char *__s1, const char *__s2, size_t __n);
Xchar *strcat(char *__s1, const char *__s2);
Xchar *strncat(char *__s1, const char *__s2, size_t __n);
Xint memcmp(const void *__s1, const void *__s2, size_t __n);
Xint strcmp(const char *__s1, const char *__s2);
Xint strcoll(const char *__s1, const char *__s2);
Xint strncmp(const char *__s1, const char *__s2, size_t __n);
Xsize_t strxfrm(char *__s1, const char *__s2, size_t __n);
Xvoid *memchr(const void *__s, int __c, size_t __n);
Xchar *strchr(const char *__s, int __c);
Xsize_t strcspn(const char *__s1, const char *__s2);
Xchar *strpbrk(const char *__s1, const char *__s2);
Xchar *strrchr(const char *__s, int __c);
Xsize_t strspn(const char *__s1, const char *__s2);
Xchar *strstr(const char *__s1, const char *__s2);
Xchar *strtok(char *__s1, const char *__s2);
Xvoid *memset(void *__s, int __c, size_t __n);
Xchar *strerror(int __errnum);
Xsize_t strlen(const char *__s);
X#endif
X
X#if _USE_OLD_PROTOTYPES /* Kernighan and Ritchie C prototypes */
Xvoid *memcpy();
Xvoid *memmove();
Xchar *strcpy();
Xchar *strncpy();
Xchar *strcat();
Xchar *strncat();
Xsize_t strxfrm();
Xvoid *memchr();
Xchar *strchr();
Xsize_t strcspn();
Xchar *strpbrk();
Xchar *strrchr();
Xsize_t strspn();
Xchar *strstr();
Xchar *strtok();
Xvoid *memset();
Xchar *strerror();
Xsize_t strlen();
X#endif
X
X#endif /* _STRING_H */
+ END-OF-FILE string.h
chmod 'u=rw,g=r,o=r' 'string.h'
set `wc -c 'string.h'`
count=$1
case $count in
1942) :;;
*) echo 'Bad character count in ''string.h' >&2
echo 'Count should be 1942' >&2
esac
echo Extracting 'tar.h'
sed 's/^X//' > 'tar.h' << '+ END-OF-FILE ''tar.h'
X/* The <tar.h> header is used with the tape archiver, tar. */
X
X#define TBLOCK 512
X#define NAMSIZ 100
X#define PFXSIZ 155
X
X#define TMODLEN 8
X#define TUIDLEN 8
X#define TGIDLEN 8
X#define TSIZLEN 12
X#define TMTMLEN 12
X#define TCKSLEN 8
X
X#define TMAGIC "ustar"
X#define TMAGLEN 6
X#define TVERSION "00"
X#define TVERSLEN 2
X#define TUNMLEN 32
X#define TGNMLEN 32
X#define TDEVLEN 8
X
X#define REGTYPE '0'
X#define AREGTYPE '\0'
X#define LNKTYPE '1'
X#define SYMTYPE '2'
X#define CHRTYPE '3'
X#define BLKTYPE '4'
X#define DIRTYPE '5'
X#define FIFOTYPE '6'
X#define CONTTYPE '7'
X
X#define TSUID 04000
X#define TSGID 02000
X#define TSVTX 01000
X
X#define TUREAD 00400
X#define TUWRITE 00200
X#define TUEXEC 00100
X#define TGREAD 00040
X#define TGWRITE 00020
X#define TGEXEC 00010
X#define TOREAD 00004
X#define TOWRITE 00002
X#define TOEXEC 00001
X
Xunion hblock {
X char dummy[TBLOCK];
X struct header {
X char name[NAMSIZ];
X char mode[TMODLEN];
X char uid[TUIDLEN];
X char gid[TGIDLEN];
X char size[TSIZLEN];
X char mtime[TMTMLEN];
X char chksum[TCKSLEN];
X char typeflag;
X char linkname[NAMSIZ];
X char magic[TMAGLEN];
X char version[TVERSLEN];
X char uname[TUNMLEN];
X char gname[TGNMLEN];
X char devmajor[TDEVLEN];
X char devminor[TDEVLEN];
X char prefix[PFXSIZ];
X } dbuf;
X};
X
+ END-OF-FILE tar.h
chmod 'u=rw,g=r,o=r' 'tar.h'
set `wc -c 'tar.h'`
count=$1
case $count in
1262) :;;
*) echo 'Bad character count in ''tar.h' >&2
echo 'Count should be 1262' >&2
esac
echo Extracting 'termios.h'
sed 's/^X//' > 'termios.h' << '+ END-OF-FILE ''termios.h'
X/* The <termios.h> header is used for controlling tty modes. */
X
Xtypedef unsigned short tcflag_t;
Xtypedef char cc_t;
Xtypedef unsigned int speed_t;
X
X#define NCCS 11 /* size of cc_c array */
X
X/* Primary terminal control structure. POSIX Table 7-1. */
Xstruct termios {
X tcflag_t c_iflag; /* input modes */
X tcflag_t c_oflag; /* output modes */
X tcflag_t c_cflag; /* control modes */
X tcflag_t c_lflag; /* local modes */
X cc_t c_cc[NCCS]; /* control characters */
X};
X
X/* Values for termios c_iflag bit map. POSIX Table 7-2. */
X#define BRKINT 000001 /* signal interrupt on break */
X#define ICRNL 000002 /* map CR to NL on input */
X#define IGNBRK 000004 /* ignore break */
X#define IGNCR 000010 /* ignore CR */
X#define IGNPAR 000020 /* ignore characters with parity errors */
X#define INLCR 000100 /* map NL to CR on input */
X#define INPCK 000200 /* enable input parity check */
X#define ISTRIP 000400 /* mask off 8th bit */
X#define IXOFF 001000 /* enable start/stop input control */
X#define IXON 002000 /* enable start/stop output control */
X#define PARMRK 004000 /* mark parity errors in the input queue */
X
X/* Values for termios c_oflag bit map. POSIX Sec. 7.1.2.3. */
X#define OPOST 000001 /* perform output processing */
X
X/* Values for termios c_cflag bit map. POSIX Table 7-3. */
X#define CLOCAL 000001 /* ignore modem status lines */
X#define CREAD 000002 /* enable receiver */
X#define CSIZE 000014 /* number of bits per character */
X#define CSTOPB 000020 /* send 2 stop bits if set, else 1 */
X#define HUPCL 000040 /* hang up on last close */
X#define PARENB 000100 /* enable parity on output */
X#define PARODD 000200 /* use odd parity if set, else even */
X
X#define CS5 000000 /* if CSIZE is CS5, characters are 5 bits */
X#define CS6 000004 /* if CSIZE is CS6, characters are 6 bits */
X#define CS7 000010 /* if CSIZE is CS7, characters are 7 bits */
X#define CS8 000014 /* if CSIZE is CS8, characters are 8 bits */
X
X/* Values for termios c_lflag bit map. POSIX Table 7-4. */
X#define ECHO 000001 /* enable echoing of input characters */
X#define ECHOE 000002 /* echo ERASE as backspace */
X#define ECHOK 000004 /* echo KILL */
X#define ECHONL 000010 /* echo NL */
X#define ICANON 000020 /* canonical input (erase and kill enabled) */
X#define IEXTEN 000040 /* enable extended functions */
X#define ISIG 000100 /* enable signals */
X#define NOFLSH 000200 /* disable flush after interrupt or quit */
X#define TOSTOP 000400 /* send SIGTTOU (job control, not implemented*/
X
X/* Indices into c_cc array. Default values in parentheses. POSIX Table 7-5. */
X#define VEOF 0 /* cc_c[VEOF] = EOF char (CTRL-D) */
X#define VEOL 1 /* cc_c[VEOL] = EOL char (??) */
X#define VERASE 2 /* cc_c[VERASE] = ERASE char (CTRL-H) */
X#define VINTR 3 /* cc_c[VINTR] = INTR char (DEL) */
X#define VKILL 4 /* cc_c[VKILL] = KILL char (@) */
X#define VMIN 5 /* cc_c[VMIN] = MIN value for timer */
X#define VQUIT 6 /* cc_c[VQUIT] = QUIT char (CTRL-\) */
X#define VTIME 7 /* cc_c[VTIME] = TIME value for timer */
X#define VSUSP 8 /* cc_c[VSUSP] = SUSP (job control, not impl */
X#define VSTART 9 /* cc_c[VSTART] = START char (always CTRL-S) */
X#define VSTOP 10 /* cc_c[VSTOP] = STOP char (always CTRL-Q) */
X
X/* Values for the baud rate settings. POSIX Table 7-6. */
X#define B0 0000000 /* hang up the line */
X#define B50 0010000 /* 50 baud */
X#define B75 0020000 /* 75 baud */
X#define B110 0030000 /* 110 baud */
X#define B134 0040000 /* 134.5 baud */
X#define B150 0050000 /* 150 baud */
X#define B200 0060000 /* 200 baud */
X#define B300 0070000 /* 300 baud */
X#define B600 0100000 /* 600 baud */
X#define B1200 0110000 /* 1200 baud */
X#define B1800 0120000 /* 1800 baud */
X#define B2400 0130000 /* 2400 baud */
X#define B4800 0140000 /* 4800 baud */
X#define B9600 0150000 /* 9600 baud */
X#define B19200 0160000 /* 19200 baud */
X#define B38400 0170000 /* 38400 baud */
X
X/* Optional actions for tcsetattr(). POSIX Sec. 7.2.1.2. */
X#define TCSANOW 1 /* changes take effect immediately */
X#define TCSADRAIN 2 /* changes take effect after output is done */
X#define TCSAFLUSH 3 /* wait for output to finish and flush input */
X
X/* Queue_selector values for tcflush(). POSIX Sec. 7.2.2.2. */
X#define TCIFLUSH 1 /* flush accumulated input data */
X#define TCOFLUSH 2 /* flush accumulated output data */
X#define TCIOFLUSH 3 /* flush accumulated input and output data */
X
X/* Action values for tcflow(). POSIX Sec. 7.2.2.2. */
X#define TCOOFF 1 /* suspend output */
X#define TCOON 2 /* restart suspended output */
X#define TCIOFF 3 /* transmit a STOP character on the line */
X#define TCION 4 /* transmit a START character on the line */
X
X
X/* Declare ANSI or K&R prototypes (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xspeed_t cfgetospeed(struct termios *__termios_p);
Xspeed_t cfsetospeed(struct termios *__termios_p, speed_t __speed);
Xspeed_t cfgetispeed(struct termios *__termios_p);
Xspeed_t cfsetospeed(struct termios *__termios_p, speed_t __speed);
Xint tcgetattr(int __filedes, struct termios *__termios_p);
Xint tcsetattr(int __filedes, int __opt_actions, struct termios *__termios_p);
Xint tcsendbreak(int __fildes, int __duration);
Xint tcdrain(int __filedes);
Xint tcflush(int __filedes, int __queue_selector);
Xint tcflow(int __filedes, int __action);
X#endif
X
X#if _USE_OLD_PROTOTYPES /* Kernighan and Ritchie C prototypes */
Xspeed_t cfgetospeed();
Xspeed_t cfsetospeed();
Xspeed_t cfgetispeed();
Xspeed_t cfsetospeed();
X#endif
+ END-OF-FILE termios.h
chmod 'u=rw,g=r,o=r' 'termios.h'
set `wc -c 'termios.h'`
count=$1
case $count in
6114) :;;
*) echo 'Bad character count in ''termios.h' >&2
echo 'Count should be 6114' >&2
esac
echo Extracting 'time.h'
sed 's/^X//' > 'time.h' << '+ END-OF-FILE ''time.h'
X/* The <time.h> header is used by the procedures that deal with time.
X * Handling time is surprisingly complicated, what with GMT, local time
X * and other factors. Although the Bishop of Ussher (1581-1656) once
X * calculated that based on the Bible, the world began on 12 Oct. 4004 BC
X * at 9 o'clock in the morning, in the UNIX world time begins at midnight,
X * 1 Jan. 1970 GMT. Before that, all was NULL and (void).
X */
X
X#ifndef _TIME_H
X#define _TIME_H
X
X/* CLOCKS_PER_SEC is the number of clock ticks per second. */
X#define CLOCKS_PER_SEC 60 /* clock runs at 60 Hz (also in Europe) */
X#define CLK_TCK CLOCKS_PER_SEC /* CLK_TCK is legal, but obsolete */
X
X#ifndef NULL
X#define NULL (void *) 0
X#endif
X
X#ifndef _TYPES_H
Xtypedef long clock_t; /* time in ticks since system boot */
Xtypedef long time_t; /* time in sec since 1 Jan 1970 0000 GMT */
X#endif
X
X#ifndef _SIZE_T
X#define _SIZE_T
Xtypedef unsigned int size_t; /* type returned by sizeof */
X#endif
X
Xstruct tm {
X int tm_sec; /* seconds after the minute [0, 59] */
X int tm_min; /* minutes after the hour [0, 59] */
X int tm_hour; /* hours since midnight [0, 28] */
X int tm_mday; /* day of the month [1, 31] */
X int tm_mon; /* months since January [0, 11] */
X int tm_year; /* years since 1900 */
X int tm_wday; /* days since Sunday [0, 6] */
X int tm_yday; /* days since January 1 [0, 365] */
X int tm_isdst; /* Daylight Saving Time flag */
X};
X
X/* Declare ANSI or K&R prototypes (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xclock_t clock(void);
Xdouble difftime(time_t __time1, time_t __time0);
Xtime_t mktime(struct tm *__timeptr);
Xtime_t time(time_t *__timeptr);
Xchar *asctime(const struct tm *__timeptr);
Xchar *ctime(const time_t *__timer);
Xstruct tm *gmtime(const time_t *__timer);
Xstruct tm *localtime(const time_t *__timer);
Xsize_t strftime(char *__s, size_t __max, const char *__fmt,
X const struct tm *__timep);
X#endif
X
X#if _USE_OLD_PROTOTYPES /* Kernighan and Ritchie C prototypes */
Xclock_t clock();
Xdouble difftime();
Xtime_t mktime();
Xtime_t time();
Xchar *asctime();
Xchar *ctime();
Xstruct tm *gmtime();
Xstruct tm *localtime();
Xsize_t strftime();
Xtime_t time();
X#endif
X
X#endif /* _TIME_H */
+ END-OF-FILE time.h
chmod 'u=rw,g=r,o=r' 'time.h'
set `wc -c 'time.h'`
count=$1
case $count in
2290) :;;
*) echo 'Bad character count in ''time.h' >&2
echo 'Count should be 2290' >&2
esac
echo Extracting 'times.h'
sed 's/^X//' > 'times.h' << '+ END-OF-FILE ''times.h'
X/* The <times.h> header is for time times() system call. */
X
Xstruct tms {
X clock_t tms_utime;
X clock_t tms_stime;
X clock_t tms_cutime;
X clock_t tms_cstime;
X};
X
X
X/* Declare ANSI or K&R prototypes (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xclock_t times(struct *tms *__buffer);
X#endif
X
X#if _USE_OLD_PROTOTYPES /* Kernighan and Ritchie C prototypes */
Xclock_t times();
X#endif
+ END-OF-FILE times.h
chmod 'u=rw,g=r,o=r' 'times.h'
set `wc -c 'times.h'`
count=$1
case $count in
481) :;;
*) echo 'Bad character count in ''times.h' >&2
echo 'Count should be 481' >&2
esac
echo Extracting 'types.h'
sed 's/^X//' > 'types.h' << '+ END-OF-FILE ''types.h'
X/* The <sys/types.h> header contains important data type definitions.
X * It is considered good programming practice to use these definitions,
X * instead of the underlying base type. By convention, all type names end
X * with _t.
X */
X
X#ifndef _TYPES_H
X#define _TYPES_H
X
X#ifndef _SIZE_T
X#define _SIZE_T
Xtypedef unsigned int size_t; /* type returned by sizeof */
X#endif
X
Xtypedef unsigned short dev_t; /* holds (major|minor) device pair */
Xtypedef unsigned short uid_t; /* user id */
Xtypedef unsigned char gid_t; /* group id */
Xtypedef unsigned short ino_t; /* i-node number */
Xtypedef unsigned short mode_t; /* mode number within an i-node */
Xtypedef unsigned char nlink_t; /* number-of-links field within an i-node */
Xtypedef unsigned long off_t; /* offsets within a file */
Xtypedef unsigned int pid_t; /* type for pids */
X
X/* Not required by POSIX here, but convenient. In any case, legal. */
X#ifndef _TIME_H
Xtypedef long clock_t; /* time in ticks since system boot */
Xtypedef long time_t; /* time in sec since 1 Jan 1970 0000 GMT */
X#endif
X
X#endif /* _TYPES_H */
+ END-OF-FILE types.h
chmod 'u=rw,g=r,o=r' 'types.h'
set `wc -c 'types.h'`
count=$1
case $count in
1085) :;;
*) echo 'Bad character count in ''types.h' >&2
echo 'Count should be 1085' >&2
esac
echo Extracting 'unistd.h'
sed 's/^X//' > 'unistd.h' << '+ END-OF-FILE ''unistd.h'
X/* The <unistd.h> header contains a few miscellaneous manifest constants. */
X
X/* Values used by access(). POSIX Table 2-6. */
X#define F_OK 0 /* test if file exists */
X#define X_OK 1 /* test if file is executable */
X#define W_OK 2 /* test if file is writable */
X#define R_OK 4 /* test if file is readable */
X
X/* Values used for whence in lseek(fd, offset, whence). POSIX Table 2-7. */
X#define SEEK_SET 0 /* offset is absolute */
X#define SEEK_CUR 1 /* offset is relative to current position */
X#define SEEK_END 2 /* offset is relative to end of file */
X
X/* This value is required by POSIX Table 2-8. */
X#define _POSIX_VERSION 198808L /* which standard is being conformed to */
X
X/* These three definitions are required by POSIX Sec. 8.2.1.2. */
X#define STDIN_FILENO 0 /* file descriptor for stdin */
X#define STDOUT_FILENO 1 /* file descriptor for stdout */
X#define STDERR_FILENO 2 /* file descriptor for stderr */
X
X/* NULL must be defined in <unistd.h> according to POSIX Sec. 2.8.1. */
X#ifndef NULL
X#define NULL (void *) 0
X#endif
X
X/* POSIX defines several options that may be implemented or not, at the
X * implementer's whim. This implementer has made the following choices:
X *
X * _POSIX_JOB_CONTROL not defined: no job control
X * _POSIX_SAVED_IDS not defined: no saved uid/gid
X * _POSIX_NO_TRUNC not defined: long path names are truncated
X * _POSIX_CHOWN_RESTRICTED defined: you can't give away files
X * _POSIX_VDISABLE defined: tty functions can be disabled
X */
X#define _POSIX_CHOWN_RESTRICTED
X#define _POSIX_VDISABLE '\t' /* can't set any control char to tab */
+ END-OF-FILE unistd.h
chmod 'u=rw,g=r,o=r' 'unistd.h'
set `wc -c 'unistd.h'`
count=$1
case $count in
1694) :;;
*) echo 'Bad character count in ''unistd.h' >&2
echo 'Count should be 1694' >&2
esac
echo Extracting 'utime.h'
sed 's/^X//' > 'utime.h' << '+ END-OF-FILE ''utime.h'
X/* The <utime.h> header is used for the utime() system call. */
X
Xstruct utimbuf {
X time_t actime; /* access time */
X time_t modtime; /* modification time */
X};
X
X
X/* Declare ANSI prototype (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xint utime(char *__path, struct utimbuf *__times);
X#endif
X
+ END-OF-FILE utime.h
chmod 'u=rw,g=r,o=r' 'utime.h'
set `wc -c 'utime.h'`
count=$1
case $count in
396) :;;
*) echo 'Bad character count in ''utime.h' >&2
echo 'Count should be 396' >&2
esac
echo Extracting 'utmp.h'
sed 's/^X//' > 'utmp.h' << '+ END-OF-FILE ''utmp.h'
X/* The <utmp.h> header is used by login(1), init, and who(1) */
X
X#define WTMP "/usr/adm/wtmp"
X
Xstruct utmp
X{
X char ut_line[8]; /* terminal name */
X char ut_name[8]; /* user name */
X long ut_time; /* login/out time */
X};
+ END-OF-FILE utmp.h
chmod 'u=rw,g=r,o=r' 'utmp.h'
set `wc -c 'utmp.h'`
count=$1
case $count in
230) :;;
*) echo 'Bad character count in ''utmp.h' >&2
echo 'Count should be 230' >&2
esac
echo Extracting 'utsname.h'
sed 's/^X//' > 'utsname.h' << '+ END-OF-FILE ''utsname.h'
X/* The <utsname.h> header provides information about the name of the system. */
X
Xstruct utsname {
X char *sysname;
X char *nodenode;
X char *release;
X char *version;
X char *machine;
X} utsname;
X
X
X/* Declare ANSI prototype (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xint uname(struct utsname *__name);
X#endif
+ END-OF-FILE utsname.h
chmod 'u=rw,g=r,o=r' 'utsname.h'
set `wc -c 'utsname.h'`
count=$1
case $count in
411) :;;
*) echo 'Bad character count in ''utsname.h' >&2
echo 'Count should be 411' >&2
esac
echo Extracting 'wait.h'
sed 's/^X//' > 'wait.h' << '+ END-OF-FILE ''wait.h'
X/* The <sys/wait.h> header contains macros related to wait(). */
X
X#define WNOHANG 1 /* do not wait for child to exit */
X#define WUNTRACED 2 /* for job control; not implemented */
X
X#define WIFEXITED(stat_val) (stat_val == 0) /* true for normal exit */
X#define WEXITSTATUS(stat_val) ((stat_val>>8) & 0377) /* child's status */
X#define WIFSIGNALED(stat_val) (stat_val & 0177) /* signal value */
X#define WTERMSIG(stat_val) (stat_val & 0177) /* signal value */
X#define WIFSTOPPED(stat_val) 0 /* job control */
X#define WSTOPSIG(stat_val) 0 /* job control */
X
X
X/* Declare ANSI or K&R prototypes (except when compiling kernel).*/
X#ifndef _ANSI_H
X#include <ansi.h>
X#endif
X
X#if _USE_ANSI_PROTOTYPES /* function prototypes required by ANSI C */
Xpid_t wait(int *__stat_loc);
Xpid_t waitpid(pid_t __pid, int *__stat_loc, int __options);
X#endif
X
X#if _USE_OLD_PROTOTYPES /* Kernighan and Ritchie C prototypes */
Xpid_t wait();
Xpid_t waitpid();
X#endif
+ END-OF-FILE wait.h
chmod 'u=rw,g=r,o=r' 'wait.h'
set `wc -c 'wait.h'`
count=$1
case $count in
960) :;;
*) echo 'Bad character count in ''wait.h' >&2
echo 'Count should be 960' >&2
esac
exit 0