	/*LINTLIBRARY*/

#include <stdio.h>
#include <sys/types.h>
struct segadr {
	ushort	sa_seg;
	long	sa_off;
};
#include <sys/stat.h>
#include <sys/times.h>
#include <sys/utsname.h>
#include <pwd.h>
#include <grp.h>
#include <setjmp.h>
#include <time.h>
#include <sys/timeb.h>
#include <ustat.h>
#include <a.out.h>

/* maybe */
#ifdef	NEVER
int	brk(endds) char *endds; { return(0); }
sd*
sem*
nap

int	end, etext, edata;
short	atos(p) char *p; { return((short) 0); }
	intss(){return(1); }
	wdleng(){return(0); }
long	tell(fd) { return((long) 0); }
#endif

/* section 2 */
int	errno;

int	access(path, amode) char *path; int amode; { return(0); }
int	acct(path) char *path; { return(0); }
unsigned int	alarm(sec) unsigned int sec; { return(sec); }
char	*sbrk(incr) int incr; { return((char *) 0); }
int	chdir(path) char *path; { return(0); }
int	chmod(path, mode) char *path; int mode; { return(0); }
int	chown(path, own, grp) char *path; int own, grp; { return(0); }
int	chroot(path) char *path; { return(0); }
int	close(fd) int fd; { return(0); }
int	creat(path, mode) char *path; int mode; { return(0); }
int	dup(fd) int fd; { return(0); }
int	dup2(fd, fd2) int fd, fd2; { return(0); }
	/*VARARGS1*/
int	execl(path, arg0) char *path, *arg0; { return(-1); }
int	execv(path, argv) char *path, *argv[]; { return(-1); }
	/*VARARGS1*/
int	execle(path, arg0, envv) char *path, *arg0, *envv[]; { return(-1); }
int	execve(path, argv, envv) char *path, *argv[], *envv[]; { return(-1); }
	/*VARARGS1*/
int	execlp(file, arg0) char *file, *arg0; { return(-1); }
int	execvp(file, argv) char *file, *argv[]; { return(-1); }
int	exit(st) int st; { return(-1); }
int	fcntl(fd, cmd, arg) int fd, cmd, arg; { return(0); }
int	fork() { return(0); }
int	fstat(fd, sbuf) int fd; struct stat *sbuf; { return(0); }
int	ftime(tp) struct timeb *tp; { return(0); }
int	getpid() { return(0); }
int	getpgrp() { return(0); }
int	getppid() { return(0); }
int	getuid() { return(0); }
int	geteuid() { return(0); }
int	getgid() { return(0); }
int	getegid() { return(0); }
	/*VARARGS2*/
int	ioctl(fd, req, arg) int fd, req; { return(0); }
int	kill(pid, sig) int pid, sig; { return(0); }
int	link(path1, path2) char *path1, *path2; { return(0); }
long	lseek(fd, off, whence) int fd, whence; long off; { return(0L); }
int	mknod(path, mode, arg) char *path; int mode, arg; { return(0); }
int	mount(spec, dir, rwflag) char *spec, *dir; int rwflag; { return(0); }
int	nice(incr) int incr; { return(0); }
	/*VARARGS2*/
int	open(path, oflag, mode) char *path; int oflag, mode; { return(0); }
int	pause() { return(-1); }
int	pipe(fds) int fds[2]; { return(0); }
void	profil(buf, bufsiz, offset, scale) char *buf; int bufsiz, offset, scale; { return; }
#ifndef	M_I86
int	ptrace(req, pid, addr, data) int req, pid, addr, data; { return(0); }
#else
int	ptrace(req, pid, addr, data) int req, pid, data; struct segadr *addr; { return(0); }
#endif
int	read(fd, buf, nbyte) int fd; char *buf; unsigned int nbyte; { return(0); }
int	setgid(gid) int gid; { return(0); }
int	setpgrp() { return(0); }
int	setuid(uid) int uid; { return(0); }
int	(*signal(sig, func))() int sig; int (*func)(); { return(func); }
int	stat(path, sbuf) char *path; struct stat *sbuf; { return(0); }
int	stime(t) time_t *t; { return(0); }
int	sync() { return(0); }
time_t	time(t) time_t *t; {return((time_t) 0);}
long	times(b) struct tms *b; { return(0L); }
long	ulimit(cmd, newlim) int cmd; long newlim; { return(0L); }
int	umask(cmask) int cmask; { return(0); }
int	umount(spec) char *spec; { return(0); }
int	uname(name) struct utsname *name; { return(0); }
int	unlink(path) char *path; { return(0); }
int	ustat(dev, buf) dev_t dev; struct ustat *buf; { return(0); }
int	utime(path, t) char *path; struct { time_t atime, mtime; } *t; { return(0); }
int	wait(st) int *st; { return(0); }
int	write(fd, buf, nbyte) int fd; char *buf; unsigned int nbyte; { return(0); }

/* section 3 */
int	sys_nerr;
char	*sys_errlist[];
long	timezone;
char	*tzname[2];
char	*optarg;
int	optind;
int	opterr;
struct _iobuf	_iob[_NFILE];
char	_ctype[];

long	a64l(s) char *s; { return(0L); }
char	*l64a(l) long l; { static char c[1]; return(c); }
int	abort() { return(0); }
int	abs(i) int i; { return(0); }

#undef	_assert
#undef	assert
void	_assert(expr) int expr; { return; }
void	assert(expr) int expr; { return; }

double	atof(p) char *p; {static double d; return(d); }
int	atoi(p) char *p; { return(0); }
long	atol(p) char *p; { return(0L); }

char	*bsearch(key, base, nel, width, cmp) char *key, *base; int nel, width; int (*cmp)(); { return(base); }


#undef	toupper
#undef	_toupper
int	toupper(c) int c; { return(c); }
int	_toupper(c) int c; { return(c); }
#undef	tolower
#undef	_tolower
int	tolower(c) int c; { return(c); }
int	_tolower(c) int c; { return(c); }
#undef	toascii
int	toascii(c) int c; { return(c); }

char	*crypt(key, salt) char *key, *salt; { static char c[1]; return(c); }
void	encrypt(blk, edflag) char *blk; int edflag; { return; }
void	setkey(key) char *key; { return; }

char	*ctermid(s) char *s; { return(s); }

char	*ctime(clk) long *clk; { static char c[1]; return(c); }
struct tm	*localtime(clk) long *clk; { static struct tm x; return(&x); }
struct tm	*gmtime(clk) long *clk; { static struct tm x; return(&x); }
char	*asctime(t) struct tm *t; { static char c[1]; return(c); }
void	tzset() { return; }

#undef	isalpha
int	isalpha(c) int c; { return(0); }
#undef	isupper
int	isupper(c) int c; { return(0); }
#undef	islower
int	islower(c) int c; { return(0); }
#undef	isdigit
int	isdigit(c) int c; { return(0); }
#undef	isxdigit
int	isxdigit(c) int c; { return(0); }
#undef	isalnum
int	isalnum(c) int c; { return(0); }
#undef	isspace
int	isspace(c) int c; { return(0); }
#undef	ispunct
int	ispunct(c) int c; { return(0); }
#undef	isprint
int	isprint(c) int c; { return(0); }
#undef	isgraph
int	isgraph(c) int c; { return(0); }
#undef	iscntrl
int	iscntrl(c) int c; { return(0); }
#undef	isascii
int	isascii(c) int c; { return(0); }

char	*cuserid(s) char *s; { return(s); }

char	*ecvt(val, ndig, decpt, sign) double val; int ndig; int *decpt, *sign; { static char c[1]; return(c); }
char	*gcvt(val, ndig, buf) double val; int ndig; char *buf; { return(buf); }
char	*fcvt(val, ndig, decpt, sign) double val; int ndig; int *decpt, *sign; { static char c[1]; return(c); }

int	fclose(fp) FILE *fp; { return(0); }
int	fflush(fp) FILE *fp; { return(0); }

#undef	feof
#undef	ferror
#undef	fileno
int	feof(fp) FILE *fp; { return(0); }
int	ferror(fp) FILE *fp; { return(0); }
void	clearerr(fp) FILE *fp; { return; }
int	fileno(fp) FILE *fp; { return(0); }

FILE	*fopen(path, typ) char *path, *typ; { return(stdin); }
FILE	*freopen(path, typ, fp) char *path, *typ; FILE *fp; { return(stdin); }
FILE	*fdopen(fd, typ) int fd; char *typ; { return(stdin); }

int	fread(p, siz, nitems, fp) char *p; unsigned int siz, nitems; FILE *fp; { return(0); }
int	fwrite(p, siz, nitems, fp) char *p; unsigned int siz, nitems; FILE *fp; { return(0); }

double	frexp(val, eptr) double val; int *eptr; { return(val); }
double	ldexp(val, exp) double val; int exp; { return(val); }
double	modf(val, iptr) double val; int *iptr; { return(val); }

int	fseek(fp, off, whence) FILE *fp; long off; int whence; { return(0); }
long	ftell(fp) FILE *fp; { return(0L); }
int	rewind(fp) FILE *fp; { return(0); }

#undef	getc
#undef	getchar
int	getc(fp) FILE *fp; { return(0); }
int	getchar() { return(0); }
int	fgetc(fp) FILE *fp; { return(0); }
int	getw(fp) FILE *fp; { return(0); }

char	*getenv(name) char *name; { return(name); }

struct group	*getgrent() { static struct group x; return(&x); }
struct group	*getgrgid(gid) int gid; { static struct group x; return(&x); }
struct group	*getgrnam(nam) char *nam; { static struct group x; return(&x); }
int	setgrent() { return(0); }
int	endgrent() { return(0); }

char	*getlogin() { static char c[1]; return(c); }
int	getopt(ac, av, opts) int ac; char **av; char *opts; { return(0); }
char	*getpass(p) char *p; { static char c[1]; return(c); }
	/*COMPATIBILITY*/
int	getpw(uid, buf) int uid; char *buf; { return(0); }

struct	passwd	*getpwent() { static struct passwd x; return(&x); }
struct	passwd	*getpwuid(uid) int uid; { static struct passwd x; return(&x); }
struct	passwd	*getpwnam(nam) char *nam; { static struct passwd x; return(&x); }
int	setpwent() { return(0); }
int	endpwent() { return(0); }

char	*gets(s) char *s; { return(s); }
char	*fgets(s, n, fp) char *s; int n; FILE *fp; { return(s); }

void	l3tol(lp, cp, n) long *lp; char *cp; int n; { return; }
void	ltol3(cp, lp, n) char *cp; long *lp; int n; { return; }

char 	*lsearch(key, bas, neltp, width, cmp) char *key, *bas; int *neltp, width; int (*cmp)(); { return(bas); }

char	*malloc(n) unsigned int n; {static char c[1]; return(c);}
char	*realloc(p, n) char *p; unsigned int n; { static char c[1]; return(c);}
char	*calloc(nelt, siz) unsigned int nelt, siz; { static char c[1]; return(c); }
void	free(p) char *p; { return; }

char	*mktemp(tmpl) char *tmpl; { return(tmpl);}
void	monitor(lopc, hipc, buf, len, nfunc) int (*lopc)(), (*hipc)(); short buf[]; int len, nfunc; {;}

int	nlist(path, nl) char *path; struct nlist nl[]; { return(0); }
int	xlist(path, xl) char *path; struct xlist xl[]; { return(0); }
int	fxlist(fp, xl) int fp; struct xlist xl[]; { return(0); }

	perror(s) char *s; { return; }
char	*errstr(eno) int eno; { static char c[1]; return(c); }

FILE	*popen(cmd, typ) char *cmd, *typ; { return(stdin); }
int	pclose(fp) FILE *fp; { return(0); }

	/*VARARGS1*/
int	printf(fmt) char *fmt; { return(0); }
	/*VARARGS2*/
int	fprintf(fp, fmt) FILE *fp; char *fmt; { return(0); }
	/*VARARGS2*/
int	sprintf(s, fmt) char *s, *fmt; { return(0); }

#undef	putc
#undef	putchar
int	putc(c, fp) char c; FILE *fp; { return(0); }
int	putchar(c) char c; { return(0); }
int	fputc(c, fp) char c; FILE *fp; { return(c); }
int	putw(w, fp) int w; FILE *fp; { return(0); }

int	putpwent(pwd, fp) struct passwd *pwd; FILE *fp; { return(0); }

int	puts(s) char *s; { return(0); }
int	fputs(s, fp) char *s; FILE *fp; { return(0); }

void	qsort(bas, nel, width, cmp) char *bas; int nel, width; int (*cmp)(); { return; }

int	rand() { return(0); }
void	srand(seed) unsigned int seed; { return; }

	/*VARARGS1*/
int	scanf(fmt) char *fmt; { return(0); }
	/*VARARGS2*/
int	fscanf(fp, fmt ) FILE *fp; char *fmt; { return(0); }
	/*VARARGS2*/
int	sscanf(s, fmt) char *s, *fmt; { return(0); }

void	setbuf(fp, buf) FILE *fp; char *buf; { return; }

int	setjmp(env) jmp_buf env; { return(0); }
int	longjmp(env, val) jmp_buf env; int val; { return(val); }

unsigned int	sleep(sec) unsigned int sec; { return(sec); }

int	(*ssignal(sig, func))() int sig; int (*func)(); { return(func); }
int	gsignal(sig) int sig; { return(0); }

char	*strcat(s1, s2) char *s1, *s2; { return(s1); }
char	*strncat(s1, s2, n) char *s1, *s2; { return(s1); }
int	strcmp(s1, s2) char *s1, *s2; { return(0); }
int	strncmp(s1, s2, n) char *s1, *s2; { return(0); }
char	*strcpy(s1, s2) char *s1, *s2; { return(s1); }
char	*strncpy(s1, s2, n) char *s1, *s2; { return(s1); }
int	strlen(s) char *s; { return(0); }
char	*strchr(s1, s2) char *s1, s2; { return(s1); }
char	*strrchr(s1, s2) char *s1, s2; { return(s1); }
char	*strps2(s1, s2) char *s1, *s2; { return(s1); }
int	strspn(s1, s2) char *s1, *s2; { return(0); }
int	strcspn(s1, s2) char *s1, *s2; { return(0); }
char	*strtok(s1, s2) char *s1, *s2; { return(s1); }

void	swab(from, to, nbytes) short *from, *to; int nbytes; { return; }

int	system(s) char *s; { return(0); }

FILE	*tmpfile() { return(stdin); }
char	*tmpnam(s) char *s; { return(s); }

char	*ttyname(fd) int fd; { static char c[1]; return(c); }
int	isatty(fd) int fd; { return(0); }

int	ungetc(c, fp) char c; FILE *fp; { return(0); }


int	ttyslot() { return(0); }
