Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!nic.MR.NET!xanth!mcnc!ecsvax!dukeac!bet From: bet@dukeac.UUCP (Bennett Todd) Newsgroups: comp.lang.c Subject: My error-handling library and ANSI prototypes (Part 2/2) Message-ID: <1216@dukeac.UUCP> Date: 4 Feb 89 01:51:56 GMT Reply-To: bet@dukeac.UUCP (Bennett Todd) Organization: Radiology, Duke Med. Center, Durham, NC Lines: 1766 : This is a sharchive -- extract the files by running through sh. echo x - bent-stdio.h sed 's/^X//' <<\Shar_Eof >bent-stdio.h X/********************************\ X* * X* Forms for Sections 2 and 3 UPM * X* * X* Based on the 4.3BSD UPM * X* ifdef-ed for (and only tested * X* on) SunOS. * X* * X\********************************/ X X/* Includes for section 2 */ X#include X#include X#include X#include X#include X#ifndef sun X#include X#else X#include X#include X#endif X#include X#include X#include X#include X#include X#include X#ifndef sun X#include X#else X#include X#endif X#include X#include X#include X#include X#include X#include X X/* Includes for section 3 */ X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include X#ifndef sun X#include X#endif X#include X#include X#ifndef sun X#include X#endif X#ifdef __STDC__ X#include X#else X#include X#endif X#include X#ifndef sun X#include X#else X#include X#endif X#include X#if 0 X#include /* triggers a gratuitous type incompatibility */ X#endif X#include X#include X#include X#include X#include X#include X X#ifdef __STDC__ X X/* accept(2) -- accept a connection on a socket */ Xint accept(int, struct sockaddr *, int *); X X/* access(2) -- determine accessibility of file */ Xint access(const char *, int); X X/* acct(2) -- turn accounting on or off */ Xint acct(const char *); X X/* adjtime(2) -- correct the time to allow synchronization of the system clock */ Xint adjtime(struct timeval *, struct timeval *); X X/* bind(2) -- bind a name to a socket */ Xint bind(int, struct sockaddr *, int); X X/* brk(2), sbrk(2) -- change data segment size */ Xchar *brk(char *); Xchar *sbrk(int); X X/* chdir(2) -- change working directory */ Xint chdir(const char *); X X/* chmod(2) -- change mode of file */ Xint chmod(const char *, int); Xint fchmod(int, int); X X/* chown(2) -- change owner and group of a file */ Xint chown(const char *, int, int); Xint fchown(int, int, int); X X/* chroot(2) -- change root directory */ Xint chroot(const char *); X X/* close(2) -- delete a descriptor */ Xint close(int); X X/* connect(2) -- initiate a connection on a socket */ Xint connect(int, struct sockaddr *, int); X X/* creat(2) -- create a new file */ Xint creat(const char *, int); X X/* dup(2), dup2(2) -- duplicate a descriptor */ Xint dup(int); Xint dup2(int, int); X X/* execve(2) -- execute a file */ Xint execve(const char *, const char *[], const char *[]); X X/* _exit(2) -- terminate a process */ Xvoid _exit(int); X X/* fcntl(2) -- file control */ Xint fcntl(int, int, int); X X/* flock(2) -- apply or remove an advisory lock on an open file */ Xint flock(int, int); X X/* fork(2) -- create a new process */ Xint fork(void); X X/* fsync(2) -- synchronize a file's in-core state with that on disk */ Xint fsync(int); X X/* getdtablesize(2) -- get descriptor table size */ Xint getdtablesize(void); X X/* getgid(2), getegid(2) -- get group identity */ X#ifdef sun Xtypedef int gid_t; X#endif Xgid_t getgid(void); Xgid_t getegid(void); X X/* getgroups(2) -- get group access list */ Xint getgroups(int, int *); X X/* gethostid(2), sethostid(2) -- get/set unique identifier of current host */ Xlong gethostid(void); Xint sethostid(long); X X/* gethostname(2), sethostname(2) -- get/set name of current host */ Xint gethostname(const char *, int); Xint sethostname(const char *, int); X X/* getitimer(2), setitimer(2) -- get/set value of interval timer */ Xint getitimer(int, struct itimerval *); Xint setitimer(int, struct itimerval *, struct itimerval *); X X/* getpagesize(2) -- get system page size */ Xint getpagesize(void); X X/* getpeername(2) -- get name of connected peer */ Xint getpeername(int, struct sockaddr *, int *); X X/* getpgrp(2) -- get process group */ Xint getpgrp(int); X X/* getpid(2), getppid(2) -- get proces identification */ Xint getpid(void); Xint getppid(void); X X/* getpriority(2), setpriority(2) -- get/set program scheduling priority */ Xint getpriority(int, int); Xint setpriority(int, int, int); X X/* getrlimit(2), setrlimit(2) -- control maximum system resource consumption */ Xint getrlimit(int, struct rlimit *); Xint setrlimit(int, struct rlimit *); X X/* getrusage(2) -- get information about resource utilization */ Xint getrusage(int, struct rusage *); X X/* getsockname(2) -- get socket name */ Xint getsockname(int, struct sockaddr *, int *); X X/* getsockopt(2), setsockopt(2) -- get and set options on sockets */ Xint getsockopt(int, int, int, char *, int *); Xint setsockopt(int, int, int, char *, int *); X X/* gettimeofday(2), settimeofday(2) -- get/set date and time */ Xint gettimeofday(struct timeval *, struct timezone *); Xint settimeofday(struct timeval *, struct timezone *); X X/* getuid(2), geteuid(2) -- get user identity */ X#ifdef sun Xtypedef int uid_t; X#endif Xuid_t getuid(void); Xuid_t geteuid(void); X X/* ioctl(2) -- control device */ Xint ioctl(int, unsigned long, char *); X X/* kill(2) -- send signal to process */ Xint kill(int, int); X X/* killpg(2) -- send signal to process group */ Xint killpg(int, int); X X/* link(2) -- make a hard link to a file */ Xint link(const char *, const char *); X X/* listen(2) -- listen for connections on a socket */ Xint listen(int, int); X X/* lseek(2) -- move read/write pointer */ Xoff_t lseek(int, off_t, int); X X/* mkdir(2) -- make a directory file */ Xint mkdir(const char *, int); X X/* mknod(2) -- make a special file */ Xint mknod(const char *, int, int); X X/* mount(2), umount(2) -- mount or remove file system */ Xint mount(const char *, const char *, int); Xint umount(const char *); X X/* open(2) -- open a file for reading or writing, or create a new file */ Xint open(const char *, int, int); X X/* pipe(2) -- create an interprocess communication channel */ Xint pipe(int [2]); X X/* profil(2) -- execution time profile */ Xint profil(const char *, int, int, int); X X/* ptrace(2) -- process trace */ Xint ptrace(int, int, int *, int); X X/* quota(2) -- manipulate disk quotas */ Xint quota(int, int, int, char *); X X/* read(2), readv(2) -- read input */ Xint read(int, char *, int); Xint readv(int, struct iovec *, int); X X/* readlink(2) -- read value of a symbolic link */ Xint readlink(const char *, char *, int); X X/* reboot(2) -- reboot system or halt processor */ Xint reboot(int); X X/* recv(2), recvfrom(2), recvmsg(2) -- receive a message from a socket */ Xint recv(int, char *, int, int); Xint recvfrom(int, char *, int, int, struct sockaddr *, int *); Xint recvmsg(int, struct msghdr [], int); X X/* rename(2) -- change the name of a file */ Xint rename(const char *, const char *); X X/* rmdir(2) -- remove a directory file */ Xint rmdir(const char *); X X/* select(2) -- synchronous I/O multiplexing */ Xint select(int, fd_set *, fd_set *, fd_set *, struct timeval *); X X/* send(2), sendto(2), sendmsg(2) -- send a message from a socket */ Xint send(int, char *, int, int); Xint sendto(int, char *, int, int, struct sockaddr *, int); Xint sendmsg(int, struct msghdr [], int); X X/* setgroups(2) -- set group access list */ Xint setgroups(int, int*); X X/* setpgrp(2) -- set process group */ Xint setpgrp(int, int); X X/* setquota(2) -- enable/disable quotas on a file system */ Xint setquota(char *, char *); X X/* setregid(2) -- set real and effective group ID */ Xint setregid(int, int); X X/* setreuid(2) -- set real and effective user ID's */ Xint setreuid(int, int); X X/* shutdown(2) -- shut down part of a full-duplex connection */ Xint shutdown(int, int); X X/* sigblock(2) -- block signals */ Xint sigblock(int); X X/* sigpause(2) -- atomically release blocked signals and wait for interrupt */ Xint sigpause(int); X X/* sigreturn(2) -- return from a signal (4.3BSD only) */ Xint sigreturn(struct sigcontext *); X X/* sigsetmask(2) -- set current signal mask */ Xint sigsetmask(int); X X/* sigstack(2) -- set and/or get signal stack context */ Xint sigstack(struct sigstack *, struct sigstack *); X X/* sigvec(2) -- software signal facilities */ Xint sigvec(int, struct sigvec *, struct sigvec *); X X/* socket(2) -- create an endpoint ffor communication */ Xint socket(int, int, int); X X/* socketpair(2) -- create a pair of connected sockets */ Xint socketpair(int, int, int, int [2]); X X/* stat(2), lstat(2), fstat(2) -- get file status */ Xint stat(const char *, struct stat *); Xint lstat(const char *, struct stat *); Xint fstat(int, struct stat *); X X/* swapon(2) -- add a swap device for interleaved paging/swapping */ Xint swapon(const char *); X X/* symlink(2) -- make a symbolic link to a file */ Xint symlink(const char *, const char *); X X/* sync(2) -- update super-block */ Xint sync(void); X X/* syscall(2) -- indirect system call */ Xint syscall(int, ...); X X/* truncate(2) -- truncate a file to a specified length */ Xint truncate(const char *, off_t); Xint ftruncate(int, off_t); X X/* umask(2) -- set file creation mode mask */ Xint umask(int); X X/* unlink(2) -- remove directory entry */ Xint unlink(const char *); X X/* utimes(2) -- set file times */ Xint utimes(const char *, struct timeval [2]); X X/* vfork(2) -- spawn new process in a virtual memory efficient way */ Xint vfork(void); X X/* vhangup(2) -- virtually "hangup" the current control terminal */ Xint vhangup(void); X X/* wait(2), wait3(2) -- wait for process to terminate */ Xint wait(union wait *); Xint wait3(union wait *, int, struct rusage *); X X/* write(2), writev(2) -- write output */ Xint write(int, const char *, int); Xint writev(int, struct iovec *, int); X X/* abort(3) -- generate a fault */ Xint abort(void); X X/* abs(3) -- integer absolute value */ Xint abs(int); X X/* alarm(3C) -- schedule signal after specified time */ Xint alarm(unsigned); X X/* asinh(3M), acosh(3M), atanh(3M) -- inverse hyperbolic functions */ Xdouble asinh(double); Xdouble acosh(double); Xdouble atanh(double); X X/* assert(3) -- program verification */ X#ifndef assert Xvoid assert(int); X#endif X X/* atof(3), atoi(3), atol(3) -- convert ASCII to numbers */ Xdouble atof(const char *); Xint atoi(const char *); Xlong atol(const char *); X X/* bcopy(3), bcmp(3), bzero(3), ffs(3) -- bit and byte string operations */ Xvoid bcopy(const char *, char *, int); Xint bcmp(const char *, const char *, int); Xvoid bzero(char *, int); Xint ffs(int); X X/* htonl(3N), htons(3N), ntonl(3N), ntohs(3N) -- convert values between host and network byte order */ X#ifndef htonl Xu_long htonl(u_long); Xu_short htons(u_short); Xu_long ntohl(u_long); Xu_short ntohs(u_short); X#endif X X/* crypt(3), setkey(3), encrypt(3) -- DES encryption */ Xchar *crypt(char *, char *); Xvoid setkey(char *); Xvoid encrypt(char *, int); X X/* ctime(3), localtime(3), gmtime(3), asctime(3), timezone(3) -- convert date and time to ASCII */ Xchar *ctime(long *); Xstruct tm *localtime(long *); Xstruct tm *gmtime(long *); Xchar *asctime(struct tm *); Xchar *timezone(int, int); X X/* isalpha(3), isupper(3), islower(3), isdigit(3), isxdigit(3), isalnum(3), isspace(3), ispunct(3), isprint(3), isgraph(3), iscntrl(3), isascii(3), toupper(3), tolower(3), toascii(3) -- character classification macros */ X#ifndef isalpha Xint isalpha(int); Xint isupper(int); Xint islower(int); Xint isdigit(int); Xint isxdigit(int); Xint isalnum(int); Xint isspace(int); Xint ispunct(int); Xint isprint(int); Xint isgraph(int); Xint iscntrl(int); Xint isascii(int); Xint toupper(int); Xint tolower(int); Xint toascii(int); X#endif X X/* curses(3X) -- TBD */ X X/* dbm(3X) -- TBD */ X X/* opendir(3), readdir(3), telldir(3), seekdir(3), rewinddir(3), closedir(3) -- directory operations */ XDIR *opendir(const char *); Xstruct direct *readdir(DIR *); Xlong telldir(DIR *); Xvoid seekdir(DIR *, long); X#ifndef rewinddir Xvoid rewinddir(DIR *); X#endif Xvoid closedir(DIR *); X X/* ecvf(3), fcvt(3), gcvt(3) -- output conversion */ Xchar *ecvt(double, int, int *, int *); Xchar *fcvt(double, int, int *, int *); Xchar *gcvf(double, int, char *); X X/* end(3), etext(3), edata(3) -- last locations in program */ Xextern int end; Xextern int etext; Xextern int edata; X X/* erf(3M), erfc(3M) -- error functions */ Xdouble erf(double); Xdouble erfc(double); X X/* execl(3), execv(3), execle(3), execlp(3), execvp(3), exect(3), environ(3) -- execute a file */ Xint execl(const char *, ...); Xint execv(const char *, const char *[]); Xint execle(const char *, ...); Xint execlp(const char *, ...); Xint execvp(const char *, const char *[]); Xint exect(const char *, const char *[], const char *[]); Xextern char **environ; X X/* exit(3) -- terminate a process after flushing any pending output */ Xvoid exit(int); X X/* exp(3M), expm1(3M), log(3M), log10(3M), log1p(3M), pow(3M) -- exponential, logarithm, power */ Xdouble exp(double); Xdouble expm1(double); Xdouble log(double); Xdouble log10(double); Xdouble log1p(double); Xdouble pow(double, double); X X/* fclose(3S), fflush(3S) -- close or flush a stream */ Xint fclose(FILE *); Xint fflush(FILE *); X X/* ferror(3S), feof(3S), clearerr(3S), fileno(3S) -- stream status inquiries */ X#ifndef fileno Xint feof(FILE *); Xint ferror(FILE *); Xvoid clearerr(FILE *); Xint fileno(FILE *); X#endif X X/* fabs(3M), floor(3M), ceil(3M), rint(3M) -- absolute value, floor, ceiling, and round-to-nearest functions */ Xdouble fabs(double); Xdouble floor(double); Xdouble ceil(double); Xdouble rint(double); X X/* _filbuf(3U), _flsbuf(3U) -- visible underpinnings of stdio */ Xint _filbuf(FILE *); Xint _flsbuf(unsigned char, FILE *); X X/* fopen(3S), freopen(3S), fdopen(3S) -- open a stream */ XFILE *fopen(const char *, const char *); XFILE *freopen(const char *, const char *, FILE *); XFILE *fdopen(int, const char *); X X/* fread(3S), fwrite(3S) -- buffered binary input/output */ Xint fread(char *, int, int, FILE *); Xint fwrite(const char *, int, int, FILE *); X X/* frexp(3), ldexp(3), modf(3) -- split into mantissa and exponent */ Xdouble frexp(double, int *); Xdouble ldexp(double, int); Xdouble modf(double, double *); X X/* fseek(3S), ftell(3S), rewind(3S) -- reposition a stream */ Xint fseek(FILE *, long, int); Xlong ftell(FILE *); Xint rewind(FILE *); X X/* getc(3S), getchar(3S), fgetc(3S), getw(3S) -- get character or word from stream */ X#ifndef getc Xint getc(FILE *); Xint getchar(void); X#endif Xint fgetc(FILE *); Xint getw(FILE *); X X/* getdiskbyname(3) -- get disk description by its name */ Xstruct disktab *getdiskbyname(const char *); X X/* getenv(3) -- value for environment name */ Xchar *getenv(const char *); X X/* getfsent(3), getfsspec(3), getfsfile(3), getfstype(3), setfsent(3), endfsent(3) -- get file system descriptor file entry */ Xstruct fstab *getfsent(void); Xstruct fstab *getfsspec(char *); Xstruct fstab *getfsfile(char *); Xstruct fstab *getfstype(char *); Xint setfsent(void); Xint endfsent(void); X X/* getgrent(3), getgrgid(3), getgrnam(3), setgrent(3), endgrent(3) -- get group file entry */ Xstruct group *getgrent(void); Xstruct group *getgrgid(int); Xstruct group *getgrname(char *); Xvoid setgrent(void); Xvoid endgrent(void); X X/* gethostbyname(3N), gethostbyaddr(3N), gethostent(3N), sethostent(3N), endhostent(3N) -- get network host entry */ Xextern int h_errno; Xstruct hostent *gethostbyname(char *); Xstruct hostent *gethostbyaddr(char *, int, int); Xstruct hostent *gethostent(void); Xint sethostent(int); Xvoid endhostent(void); X X/* getlogin(3) -- get login name */ Xchar *getlogin(void); X X/* getnetent(3N), getnetbyaddr(3N), getnetbyname(3N), setnetent(3N), endnetent(3N) -- get network entry */ Xstruct netent *getnetent(void); Xstruct netent *getnetbyaddr(long, int); Xstruct netent *getnetbyname(char *); Xint setnetent(int); Xvoid endnetent(void); X X/* getopt(3) -- get option letter from argv */ Xint getopt(int, char **, char *); Xextern char *optarg; Xextern int optind; X X/* getpass(3) -- read a password */ Xchar *getpass(char *); X X/* getprotoent(3N), getprotobynumber(3N), getprotobyname(3N), setprotoent(3N), endprotoent(3N) -- get protocol entry */ Xstruct protoent *getprotoent(void); Xstruct protoent *getprotobynumber(int); Xstruct protoent *getprotobyname(char *); Xint setprotoent(int); Xvoid endprotoent(void); X X/* getpw(3C) -- get name from uid */ Xint getpw(int, char *); X X/* getpwent(3), getpwuid(3), getpwnam(3), setpwent(3), endpwent(3), setpwfile(3) -- get password file entry */ Xstruct passwd *getpwuid(int); Xstruct passwd *getpwnam(char *); Xstruct passwd *getpwent(void); Xint setpwent(void); Xvoid endpwent(void); Xint setpwfile(char *); X X/* gets(3S), fgets(3S) -- get a string from a stream */ Xchar *gets(char *); Xchar *fgets(char *, int, FILE *); X X/* getservent(3N), getservbyport(3N), getservbyname(3N), setservent(3N), endservent(3N) -- get service entry */ Xstruct servent *getservent(void); Xstruct servent *getservbyport(int, char *); Xstruct servent *getservbyname(char *, char *); Xint setservent(int); Xvoid endservent(void); X X#ifndef sun X/* getttyent(3), getttynam(3), setttyent(3), endttyent(3) -- get ttys file entry */ Xstruct ttyent *getttyent(void); Xstruct ttyent *getttynam(char *); Xint setttyent(void); Xvoid endttyent(void); X#endif X X/* getusershell(3), setusershell(3), endusershell(3) -- get legal user shells */ Xchar *getusershell(void); Xint setusershell(void); Xvoid endusershell(void); X X/* getwd(3) -- get current working directory pathname */ Xchar *getwd(char *); X X/* hypot(3M), cabs(3M) -- Euclidean distance, complex absolute value */ Xdouble hypot(double, double); Xdouble cabs(struct {double x, y;}); X X/* copysign(3M), drem(3M), finite(3M), logb(3M), scalb(3M) -- copysign, remainder, exponent manipulations */ Xdouble copysign(double, double); Xdouble drem(double, double); Xint finite(double); Xdouble logb(double); Xdouble scalb(double, int); X X/* inet_addr(3N), inet_network(3N), inet_ntoa(3N), inet_makeaddr(3N), inet_lnaof(3N), inet_netof(3N) -- Internet address manipulation routines */ Xunsigned long inet_addr(char *); Xunsigned long inet_network(char *); Xchar *inet_ntoa(struct in_addr); Xstruct in_addr inet_makeaddr(int, int); Xint inet_lnaof(struct in_addr); Xint inet_netof(struct in_addr); X X/* infnan(3M) -- signals invalid floating-point operations on a VAX (temporary) */ X#ifdef vax Xdouble infnan(int); X#endif X X/* initgroups(3) -- initialize group access list */ Xint initgroups(char *, int); X X/* insque(3), remque(3) -- insert/remove element from a queue */ Xstruct qelem { X struct qelem *q_forw; X struct qelem *q_back; X char q_data[0]; X}; Xvoid insque(struct qelem *, struct qelem *); Xvoid remque(struct qelem *); X X/* j0(3M), j1(3M), jn(3M), y0(3M), y1(3M), yn(3M) -- bessel functions */ Xdouble j0(double); Xdouble j1(double); Xdouble jn(int, double); Xdouble y0(double); Xdouble y1(double); Xdouble yn(int, double); X X/* lgamma(3M) -- log gamma function */ Xextern int signgam; Xdouble lgamma(double); X X/* lib2648(3X) -- TBD (roight) */ X X/* malloc(3), free(3), realloc(3), calloc(3), alloc(3) -- memory allocator */ Xchar *malloc(unsigned); Xvoid free(char *); Xchar *realloc(char *, unsigned); Xchar *calloc(unsigned, unsigned); Xchar *alloca(int); X X/* mktemp(3), mkstemp(3) -- make a unique file name */ Xchar *mktemp(char *); Xint mkstemp(char *); X X/* monitor(3), monstartup(3), moncontrol(3) -- prepare execution profile */ Xvoid monitor(int (*)(), int (*)(), short [], int); Xvoid monstartup(int (*)(), int (*)()); Xvoid moncontrol(int); X X/* mp(3X) -- TBD */ X X/* ndbm(3) -- TBD */ X X/* nice(3C) -- set program priority */ Xvoid nice(int); X X/* nlist(3) -- get entries from name list */ Xint nlist(const char *, struct nlist []); X X#ifndef sun X/* ns_addr(3N), ns_ntoa(3N) -- Xerox NS(tm) address conversion routines */ Xstruct ns_addr ns_addr(char *); Xchar *ns_toa(struct ns_addr); X#endif X X/* pause(3C) -- stop until signal */ Xint pause(void); X X/* perror(3), sys_errlist(3), sys_nerr(3) -- system error messages */ Xvoid perror(const char *); Xextern int errno, sys_nerr; Xextern char *sys_errlist[]; X X#define BENT_ERRMSG \ X ((errno == 0) ? "No error!?" : \ X ((errno < sys_nerr) ? sys_errlist[errno] : \ X "Unknown error" \ X ) \ X ) X X/* plot(3X) -- TBD */ X X/* popen(3), pclose(3) -- initiate I/O to/from a process */ XFILE *popen(const char *, const char *); Xint pclose(FILE *); X X/* printf(3S), fprintf(3S), sprintf(3S) -- formatted output conversions */ Xint printf(const char *, ...); Xint fprintf(FILE *, const char *, ...); Xint sprintf(char *, const char *, ...); Xint _doprnt(const char *, va_list *, FILE *); X X/* psignal(3), sys_siglist(3) -- system signal messages */ Xvoid psignal(unsigned, char *); Xextern char *sys_siglist[]; X X/* putc(3S), putchar(3S), fputc(3S), putw(3S) -- put character on word on a stream */ X#ifndef putc Xint putc(char, FILE *); X#endif X#ifndef putchar Xint putchar(int); X#endif Xint fputc(int, FILE *); Xint putw(int, FILE *); X X/* puts(3S), fputs(3S) -- put a string on a stream */ Xvoid puts(const char *); Xvoid fputs(const char *, FILE *); X X/* qsort(3) -- quicker sort */ Xvoid qsort(char *, int, int, int (*)()); X X/* rand(3C) -- random number generator */ Xint srand(int); Xint rand(void); X X/* random(3), srandom(3), initstate(3), setstate(3) -- better random number generator; routines for changing generators */ Xlong random(void); Xvoid srandom(int); Xchar *initstate(unsigned, char *, int); Xchar *setstate(char *); X X/* rcmd(3), rresvport(3), ruserok(3) -- routines for returning a stream to a remote command */ Xint rcmd(char **, int, char *, char *, char *, int *); Xint rresvport(int *); Xint ruserok(char *, int, char *, char *); X X/* re_comp(3), re_exec(3) -- regular expression handler */ Xchar *re_comp(const char *); Xint re_exec(const char *); X X/* res_mkquery(3), res_send(3), res_init(3), dn_comp(3), dn_expand(3) -- resolver routines */ Xint res_mkquery(int, char *, int, int, char *, int, struct rrec *, char *, int); Xint res_send(char *, int, char *, int); Xvoid res_init(void); Xint dn_comp(char *, char *, int, char **, char **); Xint dn_expand(char *, char *, char *, char *, int); X X/* rexec(3) -- return stream to a remote command */ Xint rexec(char **, int, char *, char *, char *, int *); X X/* scandir(3), alphasort(3) -- scan a directory */ Xint scandir(const char *, struct direct ***, int (*)(), int (*)()); Xint alphasort(struct direct **, struct direct **); X X/* scanf(3S), fscanf(3S), sscanf(3S) -- formatted input conversion */ Xint scanf(const char *, ...); Xint fscanf(FILE *, const char *, ...); Xint sscanf(char *, const char *, ...); X X/* setbuf(3S), setbuffer(3S), setlinebuf(3S) -- assign buffering to a stream */ Xvoid setbuf(FILE *, char *); Xvoid setbuffer(FILE *, char *, int); Xvoid setlinebuf(FILE *); X X/* setjmp(3), longjmp(3) -- non-local goto */ Xint setjmp(jmp_buf); Xvoid longjmp(jmp_buf, int); Xint _setjmp(jmp_buf); Xvoid _longjmp(jmp_buf, int); X X/* setuid(3), seteuid(3), setruid(3), setgid(3), setegid(3), setrgid(3) -- set user and group ID */ Xint setuid(uid_t); Xint seteuid(uid_t); Xint setruid(uid_t); Xint setgid(gid_t); Xint setegid(gid_t); Xint setrgid(gid_t); X X/* siginterrupt(3) -- allow signals to interrupt system calls */ Xint siginterrupt(int, int); X X/* signal(3C) -- simplified software signal facilities */ Xint (*signal(int, int (*)()))(); X X/* sin(3M), cos(3M), tan(3M), asin(3M), acos(3M), atan(3M), atan2(3M) -- trigonometric ffunctions and their inverses */ Xdouble sin(double); Xdouble cos(double); Xdouble tan(double); Xdouble asin(double); Xdouble acos(double); Xdouble atan(double); Xdouble atan2(double, double); X X/* sinh(3M), cosh(3M), tanh(3M) -- hyperbolic functions */ Xdouble sinh(double); Xdouble cosh(double); Xdouble tanh(double); X X/* sleep(3) -- suspend execution for interval */ Xvoid sleep(unsigned); X X/* cbrt(3M), sqrt(3M) -- cube root, square root */ Xdouble cbrt(double); Xdouble sqrt(double); X X/* strcat(3), strncat(3), strcmp(3), strncmp(3), strcpy(3), strncpy(3), strlen(3), index(3), rindex(3) -- string operations */ Xchar *strcat(char *, const char *); Xchar *strncat(char *, const char *, int); Xint strcmp(const char *, const char *); Xint strncmp(const char *, const char *, int); Xchar *strcpy(char *, const char *); Xchar *strncpy(char *, const char *, int); Xint strlen(const char *); Xchar *index(const char *, char); Xchar *rindex(const char *, char); X#ifdef sun Xchar *strchr(char *, int); Xchar *strrchr(char *, int); Xchar *strpbrk(const char *, const char *); Xint strspn(const char *, const char *); Xint strcspn(const char *, const char *); Xchar *strtok(char *, const char *); X#endif X X/* stty(3C), gtty(3C) -- set and get terminal state (defunct) */ Xint stty(int, struct sgttyb *); Xint gtty(int, struct sgttyb *); X X/* swab(3) -- swap bytes */ Xvoid swab(const char *, char *, int); X X/* syslog(3), openlog(3), closelog(3), setlogmask(3) -- control system log */ Xvoid syslog(int, char *, ...); Xvoid openlog(char *, int, int); Xvoid closelog(void); Xvoid setlogmask(int); X X/* system(3) -- issue a shell command */ Xint system(const char *); X X/* termcap(3X) -- TBD */ X X/* time(3C), ftime(3C) -- get date and time */ Xlong time(long *); Xvoid ftime(struct timeb *); X X/* times(3C) -- get process times */ Xvoid times(struct tms *); X X/* ttyname(3), isatty(3), ttyslot(3) -- find name of a terminal */ Xchar *ttyname(int); Xint isatty(int); Xint ttyslot(void); X X/* ualarm(3) -- schedule signal after specified time */ Xunsigned ualarm(unsigned, unsigned); X X/* ungetc(3S) -- push a character back into input stream */ Xint ungetc(int, FILE *); X X/* usleep(3) -- suspend execution for interval */ Xvoid usleep(unsigned); X X/* utime(3C) -- set file times */ Xvoid utime(char *, time_t []); X X/* valloc(3C) -- aligned memory allocator */ Xchar *valloc(unsigned); X X/* vlimit(3C) -- control maximum system resource consumption */ Xint vlimit(int, int); X X/* vprintf(3S), vfprintf(3S), vsprintf(3S) -- print formatted output of a varargs argument list */ Xint vprintf(const char *, va_list); Xint vfprintf(FILE *, const char *, va_list); Xchar *vsprintf(char *, const char *, va_list); X X/* vtimes(3C) -- get information about resource utilization */ Xvoid vtimes(struct vtimes *, struct vtimes *); X X/* The End. */ X X#else /* __STDC__ */ X X/* accept(2) -- accept a connection on a socket */ Xint accept(); X X/* access(2) -- determine accessibility of file */ Xint access(); X X/* acct(2) -- turn accounting on or off */ Xint acct(); X X/* adjtime(2) -- correct the time to allow synchronization of the system clock */ Xint adjtime(); X X/* bind(2) -- bind a name to a socket */ Xint bind(); X X/* brk(2), sbrk(2) -- change data segment size */ Xchar *brk(); Xchar *sbrk(); X X/* chdir(2) -- change working directory */ Xint chdir(); X X/* chmod(2) -- change mode of file */ Xint chmod(); Xint fchmod(); X X/* chown(2) -- change owner and group of a file */ Xint chown(); Xint fchown(); X X/* chroot(2) -- change root directory */ Xint chroot(); X X/* close(2) -- delete a descriptor */ Xint close(); X X/* connect(2) -- initiate a connection on a socket */ Xint connect(); X X/* creat(2) -- create a new file */ Xint creat(); X X/* dup(2), dup2(2) -- duplicate a descriptor */ Xint dup(); Xint dup2(); X X/* execve(2) -- execute a file */ Xint execve(); X X/* _exit(2) -- terminate a process */ Xvoid _exit(); X X/* fcntl(2) -- file control */ Xint fcntl(); X X/* flock(2) -- apply or remove an advisory lock on an open file */ Xint flock(); X X/* fork(2) -- create a new process */ Xint fork(); X X/* fsync(2) -- synchronize a file's in-core state with that on disk */ Xint fsync(); X X/* getdtablesize(2) -- get descriptor table size */ Xint getdtablesize(); X X/* getgid(2), getegid(2) -- get group identity */ X#ifdef sun Xtypedef int gid_t; X#endif Xgid_t getgid(); Xgid_t getegid(); X X/* getgroups(2) -- get group access list */ Xint getgroups(); X X/* gethostid(2), sethostid(2) -- get/set unique identifier of current host */ Xlong gethostid(); Xint sethostid(); X X/* gethostname(2), sethostname(2) -- get/set name of current host */ Xint gethostname(); Xint sethostname(); X X/* getitimer(2), setitimer(2) -- get/set value of interval timer */ Xint getitimer(); Xint setitimer(); X X/* getpagesize(2) -- get system page size */ Xint getpagesize(); X X/* getpeername(2) -- get name of connected peer */ Xint getpeername(); X X/* getpgrp(2) -- get process group */ Xint getpgrp(); X X/* getpid(2), getppid(2) -- get proces identification */ Xint getpid(); Xint getppid(); X X/* getpriority(2), setpriority(2) -- get/set program scheduling priority */ Xint getpriority(); Xint setpriority(); X X/* getrlimit(2), setrlimit(2) -- control maximum system resource consumption */ Xint getrlimit(); Xint setrlimit(); X X/* getrusage(2) -- get information about resource utilization */ Xint getrusage(); X X/* getsockname(2) -- get socket name */ Xint getsockname(); X X/* getsockopt(2), setsockopt(2) -- get and set options on sockets */ Xint getsockopt(); Xint setsockopt(); X X/* gettimeofday(2), settimeofday(2) -- get/set date and time */ Xint gettimeofday(); Xint settimeofday(); X X/* getuid(2), geteuid(2) -- get user identity */ X#ifdef sun Xtypedef int uid_t; X#endif Xuid_t getuid(); Xuid_t geteuid(); X X/* ioctl(2) -- control device */ Xint ioctl(); X X/* kill(2) -- send signal to process */ Xint kill(); X X/* killpg(2) -- send signal to process group */ Xint killpg(); X X/* link(2) -- make a hard link to a file */ Xint link(); X X/* listen(2) -- listen for connections on a socket */ Xint listen(); X X/* lseek(2) -- move read/write pointer */ Xoff_t lseek(); X X/* mkdir(2) -- make a directory file */ Xint mkdir(); X X/* mknod(2) -- make a special file */ Xint mknod(); X X/* mount(2), umount(2) -- mount or remove file system */ Xint mount(); Xint umount(); X X/* open(2) -- open a file for reading or writing, or create a new file */ Xint open(); X X/* pipe(2) -- create an interprocess communication channel */ Xint pipe(); X X/* profil(2) -- execution time profile */ Xint profil(); X X/* ptrace(2) -- process trace */ Xint ptrace(); X X/* quota(2) -- manipulate disk quotas */ Xint quota(); X X/* read(2), readv(2) -- read input */ Xint read(); Xint readv(); X X/* readlink(2) -- read value of a symbolic link */ Xint readlink(); X X/* reboot(2) -- reboot system or halt processor */ Xint reboot(); X X/* recv(2), recvfrom(2), recvmsg(2) -- receive a message from a socket */ Xint recv(); Xint recvfrom(); Xint recvmsg(); X X/* rename(2) -- change the name of a file */ Xint rename(); X X/* rmdir(2) -- remove a directory file */ Xint rmdir(); X X/* select(2) -- synchronous I/O multiplexing */ Xint select(); X X/* send(2), sendto(2), sendmsg(2) -- send a message from a socket */ Xint send(); Xint sendto(); Xint sendmsg(); X X/* setgroups(2) -- set group access list */ Xint setgroups(); X X/* setpgrp(2) -- set process group */ Xint setpgrp(); X X/* setquota(2) -- enable/disable quotas on a file system */ Xint setquota(); X X/* setregid(2) -- set real and effective group ID */ Xint setregid(); X X/* setreuid(2) -- set real and effective user ID's */ Xint setreuid(); X X/* shutdown(2) -- shut down part of a full-duplex connection */ Xint shutdown(); X X/* sigblock(2) -- block signals */ Xint sigblock(); X X/* sigpause(2) -- atomically release blocked signals and wait for interrupt */ Xint sigpause(); X X/* sigreturn(2) -- return from a signal (4.3BSD only) */ Xint sigreturn(); X X/* sigsetmask(2) -- set current signal mask */ Xint sigsetmask(); X X/* sigstack(2) -- set and/or get signal stack context */ Xint sigstack(); X X/* sigvec(2) -- software signal facilities */ Xint sigvec(); X X/* socket(2) -- create an endpoint ffor communication */ Xint socket(); X X/* socketpair(2) -- create a pair of connected sockets */ Xint socketpair(); X X/* stat(2), lstat(2), fstat(2) -- get file status */ Xint stat(); Xint lstat(); Xint fstat(); X X/* swapon(2) -- add a swap device for interleaved paging/swapping */ Xint swapon(); X X/* symlink(2) -- make a symbolic link to a file */ Xint symlink(); X X/* sync(2) -- update super-block */ Xint sync(); X X/* syscall(2) -- indirect system call */ Xint syscall(); X X/* truncate(2) -- truncate a file to a specified length */ Xint truncate(); Xint ftruncate(); X X/* umask(2) -- set file creation mode mask */ Xint umask(); X X/* unlink(2) -- remove directory entry */ Xint unlink(); X X/* utimes(2) -- set file times */ Xint utimes(); X X/* vfork(2) -- spawn new process in a virtual memory efficient way */ Xint vfork(); X X/* vhangup(2) -- virtually "hangup" the current control terminal */ Xint vhangup(); X X/* wait(2), wait3(2) -- wait for process to terminate */ Xint wait(); Xint wait3(); X X/* write(2), writev(2) -- write output */ Xint write(); Xint writev(); X X/* abort(3) -- generate a fault */ Xint abort(); X X/* abs(3) -- integer absolute value */ Xint abs(); X X/* alarm(3C) -- schedule signal after specified time */ Xint alarm(); X X/* asinh(3M), acosh(3M), atanh(3M) -- inverse hyperbolic functions */ Xdouble asinh(); Xdouble acosh(); Xdouble atanh(); X X/* assert(3) -- program verification */ X#ifndef assert Xvoid assert(); X#endif X X/* atof(3), atoi(3), atol(3) -- convert ASCII to numbers */ Xdouble atof(); Xint atoi(); Xlong atol(); X X/* bcopy(3), bcmp(3), bzero(3), ffs(3) -- bit and byte string operations */ Xvoid bcopy(); Xint bcmp(); Xvoid bzero(); Xint ffs(); X X/* htonl(3N), htons(3N), ntonl(3N), ntohs(3N) -- convert values between host and network byte order */ X#ifndef htonl Xu_long htonl(); Xu_short htons(); Xu_long ntohl(); Xu_short ntohs(); X#endif X X/* crypt(3), setkey(3), encrypt(3) -- DES encryption */ Xchar *crypt(); Xvoid setkey(); Xvoid encrypt(); X X/* ctime(3), localtime(3), gmtime(3), asctime(3), timezone(3) -- convert date and time to ASCII */ Xchar *ctime(); Xstruct tm *localtime(); Xstruct tm *gmtime(); Xchar *asctime(); Xchar *timezone(); X X/* isalpha(3), isupper(3), islower(3), isdigit(3), isxdigit(3), isalnum(3), isspace(3), ispunct(3), isprint(3), isgraph(3), iscntrl(3), isascii(3), toupper(3), tolower(3), toascii(3) -- character classification macros */ X#ifndef isalpha Xint isalpha(); Xint isupper(); Xint islower(); Xint isdigit(); Xint isxdigit(); Xint isalnum(); Xint isspace(); Xint ispunct(); Xint isprint(); Xint isgraph(); Xint iscntrl(); Xint isascii(); Xint toupper(); Xint tolower(); Xint toascii(); X#endif X X/* curses(3X) -- TBD */ X X/* dbm(3X) -- TBD */ X X/* opendir(3), readdir(3), telldir(3), seekdir(3), rewinddir(3), closedir(3) -- directory operations */ XDIR *opendir(); Xstruct direct *readdir(); Xlong telldir(); Xvoid seekdir(); X#ifndef rewinddir Xvoid rewinddir(); X#endif Xvoid closedir(); X X/* ecvf(3), fcvt(3), gcvt(3) -- output conversion */ Xchar *ecvt(); Xchar *fcvt(); Xchar *gcvf(); X X/* end(3), etext(3), edata(3) -- last locations in program */ Xextern int end; Xextern int etext; Xextern int edata; X X/* erf(3M), erfc(3M) -- error functions */ Xdouble erf(); Xdouble erfc(); X X/* execl(3), execv(3), execle(3), execlp(3), execvp(3), exect(3), environ(3) -- execute a file */ Xint execl(); Xint execv(); Xint execle(); Xint execlp(); Xint execvp(); Xint exect(); Xextern char **environ; X X/* exit(3) -- terminate a process after flushing any pending output */ Xvoid exit(); X X/* exp(3M), expm1(3M), log(3M), log10(3M), log1p(3M), pow(3M) -- exponential, logarithm, power */ Xdouble exp(); Xdouble expm1(); Xdouble log(); Xdouble log10(); Xdouble log1p(); Xdouble pow(); X X/* fclose(3S), fflush(3S) -- close or flush a stream */ Xint fclose(); Xint fflush(); X X/* ferror(3S), feof(3S), clearerr(3S), fileno(3S) -- stream status inquiries */ X#ifndef fileno Xint feof(); Xint ferror(); Xvoid clearerr(); Xint fileno(); X#endif X X/* fabs(3M), floor(3M), ceil(3M), rint(3M) -- absolute value, floor, ceiling, and round-to-nearest functions */ Xdouble fabs(); Xdouble floor(); Xdouble ceil(); Xdouble rint(); X X/* _filbuf(3U) -- visible underpinnings of stdio */ Xint _filbuf(); X X/* fopen(3S), freopen(3S), fdopen(3S) -- open a stream */ XFILE *fopen(); XFILE *freopen(); XFILE *fdopen(); X X/* fread(3S), fwrite(3S) -- buffered binary input/output */ Xint fread(); Xint fwrite(); X X/* frexp(3), ldexp(3), modf(3) -- split into mantissa and exponent */ Xdouble frexp(); Xdouble ldexp(); Xdouble modf(); X X/* fseek(3S), ftell(3S), rewind(3S) -- reposition a stream */ Xint fseek(); Xlong ftell(); Xint rewind(); X X/* getc(3S), getchar(3S), fgetc(3S), getw(3S) -- get character or word from stream */ X#ifndef getc Xint getc(); Xint getchar(); X#endif Xint fgetc(); Xint getw(); X X/* getdiskbyname(3) -- get disk description by its name */ Xstruct disktab *getdiskbyname(); X X/* getenv(3) -- value for environment name */ Xchar *getenv(); X X/* getfsent(3), getfsspec(3), getfsfile(3), getfstype(3), setfsent(3), endfsent(3) -- get file system descriptor file entry */ Xstruct fstab *getfsent(); Xstruct fstab *getfsspec(); Xstruct fstab *getfsfile(); Xstruct fstab *getfstype(); Xint setfsent(); Xint endfsent(); X X/* getgrent(3), getgrgid(3), getgrnam(3), setgrent(3), endgrent(3) -- get group file entry */ Xstruct group *getgrent(); Xstruct group *getgrgid(); Xstruct group *getgrname(); Xvoid setgrent(); Xvoid endgrent(); X X/* gethostbyname(3N), gethostbyaddr(3N), gethostent(3N), sethostent(3N), endhostent(3N) -- get network host entry */ Xextern int h_errno; Xstruct hostent *gethostbyname(); Xstruct hostent *gethostbyaddr(); Xstruct hostent *gethostent(); Xint sethostent(); Xvoid endhostent(); X X/* getlogin(3) -- get login name */ Xchar *getlogin(); X X/* getnetent(3N), getnetbyaddr(3N), getnetbyname(3N), setnetent(3N), endnetent(3N) -- get network entry */ Xstruct netent *getnetent(); Xstruct netent *getnetbyaddr(); Xstruct netent *getnetbyname(); Xint setnetent(); Xvoid endnetent(); X X/* getopt(3) -- get option letter from argv */ Xint getopt(); Xextern char *optarg; Xextern int optind; X X/* getpass(3) -- read a password */ Xchar *getpass(); X X/* getprotoent(3N), getprotobynumber(3N), getprotobyname(3N), setprotoent(3N), endprotoent(3N) -- get protocol entry */ Xstruct protoent *getprotoent(); Xstruct protoent *getprotobynumber(); Xstruct protoent *getprotobyname(); Xint setprotoent(); Xvoid endprotoent(); X X/* getpw(3C) -- get name from uid */ Xint getpw(); X X/* getpwent(3), getpwuid(3), getpwnam(3), setpwent(3), endpwent(3), setpwfile(3) -- get password file entry */ Xstruct passwd *getpwuid(); Xstruct passwd *getpwnam(); Xstruct passwd *getpwent(); Xint setpwent(); Xvoid endpwent(); Xint setpwfile(); X X/* gets(3S), fgets(3S) -- get a string from a stream */ Xchar *gets(); Xchar *fgets(); X X/* getservent(3N), getservbyport(3N), getservbyname(3N), setservent(3N), endservent(3N) -- get service entry */ Xstruct servent *getservent(); Xstruct servent *getservbyport(); Xstruct servent *getservbyname(); Xint setservent(); Xvoid endservent(); X X#ifndef sun X/* getttyent(3), getttynam(3), setttyent(3), endttyent(3) -- get ttys file entry */ Xstruct ttyent *getttyent(); Xstruct ttyent *getttynam(); Xint setttyent(); Xvoid endttyent(); X#endif X X/* getusershell(3), setusershell(3), endusershell(3) -- get legal user shells */ Xchar *getusershell(); Xint setusershell(); Xvoid endusershell(); X X/* getwd(3) -- get current working directory pathname */ Xchar *getwd(); X X/* hypot(3M), cabs(3M) -- Euclidean distance, complex absolute value */ Xdouble hypot(); Xdouble cabs(); X X/* copysign(3M), drem(3M), finite(3M), logb(3M), scalb(3M) -- copysign, remainder, exponent manipulations */ Xdouble copysign(); Xdouble drem(); Xint finite(); Xdouble logb(); Xdouble scalb(); X X/* inet_addr(3N), inet_network(3N), inet_ntoa(3N), inet_makeaddr(3N), inet_lnaof(3N), inet_netof(3N) -- Internet address manipulation routines */ Xunsigned long inet_addr(); Xunsigned long inet_network(); Xchar *inet_ntoa(); Xstruct in_addr inet_makeaddr(); Xint inet_lnaof(); Xint inet_netof(); X X/* infnan(3M) -- signals invalid floating-point operations on a VAX (temporary) */ X#ifdef vax Xdouble infnan(); X#endif X X/* initgroups(3) -- initialize group access list */ Xint initgroups(); X X/* insque(3), remque(3) -- insert/remove element from a queue */ Xvoid insque(); Xvoid remque(); X X/* j0(3M), j1(3M), jn(3M), y0(3M), y1(3M), yn(3M) -- bessel functions */ Xdouble j0(); Xdouble j1(); Xdouble jn(); Xdouble y0(); Xdouble y1(); Xdouble yn(); X X/* lgamma(3M) -- log gamma function */ Xextern int signgam; Xdouble lgamma(); X X/* lib2648(3X) -- TBD (roight) */ X X/* malloc(3), free(3), realloc(3), calloc(3), alloc(3) -- memory allocator */ Xchar *malloc(); Xvoid free(); Xchar *realloc(); Xchar *calloc(); Xchar *alloca(); X X/* mktemp(3), mkstemp(3) -- make a unique file name */ Xchar *mktemp(); Xint mkstemp(); X X/* monitor(3), monstartup(3), moncontrol(3) -- prepare execution profile */ Xvoid monitor(); Xvoid monstartup(); Xvoid moncontrol(); X X/* mp(3X) -- TBD */ X X/* ndbm(3) -- TBD */ X X/* nice(3C) -- set program priority */ Xvoid nice(); X X/* nlist(3) -- get entries from name list */ Xint nlist(); X X#ifndef sun X/* ns_addr(3N), ns_ntoa(3N) -- Xerox NS(tm) address conversion routines */ Xstruct ns_addr ns_addr(); Xchar *ns_toa(); X#endif X X/* pause(2C) -- stop until signal */ Xint pause(); X X/* perror(3), sys_errlist(3), sys_nerr(3) -- system error messages */ Xvoid perror(); Xextern int errno, sys_nerr; Xextern char *sys_errlist[]; X X#define BENT_ERRMSG \ X ((errno == 0) ? "No error!?" : \ X ((errno < sys_nerr) ? sys_errlist[errno] : \ X "Unknown error" \ X ) \ X ) X X/* plot(3X) -- TBD */ X X/* popen(3), pclose(3) -- initiate I/O to/from a process */ XFILE *popen(); Xint pclose(); X X/* printf(3S), fprintf(3S), sprintf(3S) -- formatted output conversions */ Xint printf(); Xint fprintf(); Xint sprintf(); Xint _doprnt(); X X/* psignal(3), sys_siglist(3) -- system signal messages */ Xvoid psignal(); Xextern char *sys_siglist[]; X X/* putc(3S), putchar(3S), fputc(3S), putw(3S) -- put character on word on a stream */ X#ifndef putc Xint putc(); X#endif X#ifndef putchar Xint putchar(); X#endif Xint fputc(); Xint putw(); X X/* puts(3S), fputs(3S) -- put a string on a stream */ Xvoid puts(); Xvoid fputs(); X X/* qsort(3) -- quicker sort */ Xvoid qsort(); X X/* rand(3C) -- random number generator */ Xint srand(); Xint rand(); X X/* random(3), srandom(3), initstate(3), setstate(3) -- better random number generator; routines for changing generators */ Xlong random(); Xvoid srandom(); Xchar *initstate(); Xchar *setstate(); X X/* rcmd(3), rresvport(3), ruserok(3) -- routines for returning a stream to a remote command */ Xint rcmd(); Xint rresvport(); Xint ruserok(); X X/* re_comp(3), re_exec(3) -- regular expression handler */ Xchar *re_comp(); Xint re_exec(); X X/* res_mkquery(3), res_send(3), res_init(3), dn_comp(3), dn_expand(3) -- resolver routines */ Xint res_mkquery(); Xint res_send(); Xvoid res_init(); Xint dn_comp(); Xint dn_expand(); X X/* rexec(3) -- return stream to a remote command */ Xint rexec(); X X/* scandir(3), alphasort(3) -- scan a directory */ Xint scandir(); Xint alphasort(); X X/* scanf(3S), fscanf(3S), sscanf(3S) -- formatted input conversion */ Xint scanf(); Xint fscanf(); Xint sscanf(); X X/* setbuf(3S), setbuffer(3S), setlinebuf(3S) -- assign buffering to a stream */ Xvoid setbuf(); Xvoid setbuffer(); Xvoid setlinebuf(); X X/* setjmp(3), longjmp(3) -- non-local goto */ Xint setjmp(); Xvoid longjmp(); Xint _setjmp(); Xvoid _longjmp(); X X/* setuid(3), seteuid(3), setruid(3), setgid(3), setegid(3), setrgid(3) -- set user and group ID */ Xint setuid(); Xint seteuid(); Xint setruid(); Xint setgid(); Xint setegid(); Xint setrgid(); X X/* siginterrupt(3) -- allow signals to interrupt system calls */ Xint siginterrupt(); X X/* signal(3C) -- simplified software signal facilities */ Xint (*signal())(); X X/* sin(3M), cos(3M), tan(3M), asin(3M), acos(3M), atan(3M), atan2(3M) -- trigonometric ffunctions and their inverses */ Xdouble sin(); Xdouble cos(); Xdouble tan(); Xdouble asin(); Xdouble acos(); Xdouble atan(); Xdouble atan2(); X X/* sinh(3M), cosh(3M), tanh(3M) -- hyperbolic functions */ Xdouble sinh(); Xdouble cosh(); Xdouble tanh(); X X/* sleep(3) -- suspend execution for interval */ Xvoid sleep(); X X/* cbrt(3M), sqrt(3M) -- cube root, square root */ Xdouble cbrt(); Xdouble sqrt(); X X/* strcat(3), strncat(3), strcmp(3), strncmp(3), strcpy(3), strncpy(3), strlen(3), index(3), rindex(3) -- string operations */ Xchar *strcat(); Xchar *strncat(); Xint strcmp(); Xint strncmp(); Xchar *strcpy(); Xchar *strncpy(); Xint strlen(); Xchar *index(); Xchar *rindex(); X#ifdef sun Xchar *strchr(); Xchar *strrchr(); Xchar *strpbrk(); Xint strspn(); Xint strcspn(); Xchar *strtok(); X#endif X X/* stty(3C), gtty(3C) -- set and get terminal state (defunct) */ Xint stty(); Xint gtty(); X X/* swab(3) -- swap bytes */ Xvoid swab(); X X/* syslog(3), openlog(3), closelog(3), setlogmask(3) -- control system log */ Xvoid syslog(); Xvoid openlog(); Xvoid closelog(); Xvoid setlogmask(); X X/* system(3) -- issue a shell command */ Xint system(); X X/* termcap(3X) -- TBD */ X X/* time(3C), ftime(3C) -- get date and time */ Xlong time(); Xvoid ftime(); X X/* times(3C) -- get process times */ Xvoid times(); X X/* ttyname(3), isatty(3), ttyslot(3) -- find name of a terminal */ Xchar *ttyname(); Xint isatty(); Xint ttyslot(); X X/* ualarm(3) -- schedule signal after specified time */ Xunsigned ualarm(); X X/* ungetc(3S) -- push a character back into input stream */ Xint ungetc(); X X/* usleep(3) -- suspend execution for interval */ Xvoid usleep(); X X/* utime(3C) -- set file times */ Xvoid utime(); X X/* valloc(3C) -- aligned memory allocator */ Xchar *valloc(); X X/* vlimit(3C) -- control maximum system resource consumption */ Xint vlimit(); X X/* vprintf(3S), vfprintf(3S), vsprintf(3S) -- print formatted output of a varargs argument list */ Xint vprintf(); Xint vfprintf(); Xchar *vsprintf(); X X/* vtimes(3C) -- get information about resource utilization */ Xvoid vtimes(); X X/* The End. */ X X#endif /* __STDC__ */ Shar_Eof exit 0 -Bennett bet@orion.mc.duke.edu