};
ftime(tp)
- register struct timeb *tp;
-{
+ register struct timeb *tp; {
struct timeval t;
struct timezone tz;
-#include <stdio.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
getpw(uid, buf)
int uid;
-char buf[];
-{
+char buf[]; {
static FILE *pwf;
register n, c;
register char *bp;
-#include <sys/ioctl.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
#include <sgtty.h>
gtty(fd, ap)
- struct sgttyb *ap;
-{
+ struct sgttyb *ap; {
return(ioctl(fd, TIOCGETP, ap));
}
* Backwards compatible nice.
*/
nice(incr)
- int incr;
-{
+ int incr; {
int prio;
extern int errno;
/*
* Backwards compatible pause.
*/
-pause()
-{
+pause() {
sigpause(sigblock(0));
}
static long randx = 1;
srand(x)
-unsigned x;
-{
+unsigned x; {
randx = x;
}
-rand()
-{
+rand() {
return((randx = randx * 1103515245 + 12345) & 0x7fffffff);
}
-#include <sys/ioctl.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
#include <sgtty.h>
stty(fd, ap)
- struct sgttyb *ap;
-{
+ struct sgttyb *ap; {
return(ioctl(fd, TIOCSETP, ap));
}
long lseek();
-long tell(f)
-{
+long tell(f) {
return(lseek(f, 0L, 1));
}
-#include <sys/times.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
};
times(tmsp)
- register struct tms *tmsp;
-{
+ register struct tms *tmsp; {
struct rusage ru;
if (getrusage(RUSAGE_SELF, &ru) < 0)
static
scale60(tvp)
- register struct timeval *tvp;
-{
+ register struct timeval *tvp; {
return (tvp->tv_sec * 60 + tvp->tv_usec / 16667);
}
utime(name, otv)
char *name;
- int otv[];
-{
+ int otv[]; {
struct timeval tv[2];
tv[0].tv_sec = otv[0]; tv[0].tv_usec = 0;
-#include <sys/errno.h>
-#include <sys/vlimit.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
#define NLIMITS 6
vlimit(limit, value)
- int limit, value;
-{
+ int limit, value; {
struct rlimit rlim;
if (limit <= 0 || limit > NLIMITS)
-#include <sys/vtimes.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
};
vtimes(par, chi)
- register struct vtimes *par, *chi;
-{
+ register struct vtimes *par, *chi; {
struct rusage ru;
if (par) {
static
getvtimes(aru, avt)
register struct rusage *aru;
- register struct vtimes *avt;
-{
+ register struct vtimes *avt; {
avt->vm_utime = scale60(&aru->ru_utime);
avt->vm_stime = scale60(&aru->ru_stime);
static
scale60(tvp)
- register struct timeval *tvp;
-{
+ register struct timeval *tvp; {
return (tvp->tv_sec * 60 + tvp->tv_usec / 16667);
}
getopt(nargc,nargv,ostr)
int nargc;
char **nargv,
- *ostr;
-{
+ *ostr; {
static char *place = EMSG; /* option letter processing */
register char *oli; /* option letter list index */
char *index();
char *
memccpy(t, f, c, n)
register char *t, *f;
- register c, n;
-{
+ register c, n; {
while (--n >= 0)
if ((*t++ = *f++) == c)
return (t);
char *
memchr(s, c, n)
register char *s;
- register c, n;
-{
+ register c, n; {
while (--n >= 0)
if (*s++ == c)
return (--s);
memcmp(s1, s2, n)
register char *s1, *s2;
- register n;
-{
+ register n; {
while (--n >= 0)
if (*s1++ != *s2++)
return (*--s1 - *--s2);
char *
memcpy(t, f, n)
register char *t, *f;
- register n;
-{
+ register n; {
register char *p = t;
while (--n >= 0)
char *
memset(s, c, n)
register char *s;
- register c, n;
-{
+ register c, n; {
register char *p = s;
while (--n >= 0)
char *
strcatn(s1, s2, n)
register char *s1, *s2;
-register n;
-{
+register n; {
register char *os1;
os1 = s1;
char *
strchr(sp, c)
-register char *sp, c;
-{
+register char *sp, c; {
do {
if (*sp == c)
return(sp);
strcmpn(s1, s2, n)
register char *s1, *s2;
-register n;
-{
+register n; {
while (--n >= 0 && *s1 == *s2++)
if (*s1++ == '\0')
char *
strcpyn(s1, s2, n)
-register char *s1, *s2;
-{
+register char *s1, *s2; {
register i;
register char *os1;
#endif
strcspn(s, set)
- register char *s, *set;
-{
+ register char *s, *set; {
register n = 0;
register char *p;
register c;
char *
strpbrk(s, brk)
- register char *s, *brk;
-{
+ register char *s, *brk; {
register char *p;
register c;
char *
strrchr(sp, c)
-register char *sp, c;
-{
+register char *sp, c; {
register char *r;
r = NULL;
#endif
strspn(s, set)
- register char *s, *set;
-{
+ register char *s, *set; {
register n = 0;
register char *p;
register c;
char *
strtok(s, sep)
- register char *s, *sep;
-{
+ register char *s, *sep; {
register char *p;
register c;
static char *lasts;
#endif LIBC_SCCS and not lint
char *tmpnam(s)
-char *s;
-{
+char *s; {
static seed;
sprintf(s, "temp.%d.%d", getpid(), seed++);
asm("#define _eprol eprol");
extern unsigned char etext;
extern unsigned char eprol;
-start()
-{
+start() {
struct kframe {
int kargc;
char *kargv[1]; /* size depends on kargc */
#ifdef MCRT0
/*ARGSUSED*/
exit(code)
- register int code; /* r11 */
-{
+ register int code; /* r11 */ {
monitor(0);
_cleanup();
asm(" movl r11,r0");
* just in case some routine is compiled for profiling
*/
moncontrol(val)
- int val;
-{
+ int val; {
}
asm(" .globl mcount");
monstartup(lowpc, highpc)
char *lowpc;
- char *highpc;
-{
+ char *highpc; {
int monsize;
char *buffer;
char *sbrk();
monitor( lowpc , highpc , buffer , monsize , tolimit );
}
-_mcleanup()
-{
+_mcleanup() {
int fd;
int fromindex;
int endfrom;
asm(".align 2");
asm("#the beginning of mcount()");
asm(".data");
-mcount()
-{
+mcount() {
register char *selfpc; /* r11 => r5 */
register unsigned short *frompcindex; /* r10 => r4 */
register struct tostruct *top; /* r9 => r3 */
char *highpc;
char *buf; /* declared ``short buffer[]'' in monitor(3) */
int bufsiz;
- int nfunc; /* not used, available for compatability only */
-{
+ int nfunc; /* not used, available for compatability only */ {
register o;
if ( lowpc == 0 ) {
* all the data structures are ready.
*/
moncontrol(mode)
- int mode;
-{
+ int mode; {
if (mode) {
/* start */
profil(sbuf + sizeof(struct phdr), ssiz - sizeof(struct phdr),
monstartup(lowpc, highpc)
char *lowpc;
- char *highpc;
-{
+ char *highpc; {
int monsize;
char *buffer;
int cntsiz;
asm(".text");
asm("#the beginning of mcount()");
asm(".data");
-mcount()
-{
+mcount() {
register int *selfpc; /* r11 */
register long **cntp; /* r10 */
monitor(lowpc, highpc, buf, bufsiz, cntsiz)
char *lowpc, *highpc;
char *buf;
- int bufsiz, cntsiz;
-{
+ int bufsiz, cntsiz; {
register int o;
struct phdr *php;
static int ssiz;
* all the data structures are ready.
*/
moncontrol(mode)
- int mode;
-{
+ int mode; {
if (mode) {
/* start */
profil(s_sbuf, s_bufsiz, s_lowpc, s_scale);
-#include <signal.h>
-#include <sys/signal.h>
/*
* Copyright (c) 1985 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
#include "signal.h"
-abort()
-{
+abort() {
sigblock(~0);
signal(SIGILL, SIG_DFL);
sigsetmask(~sigmask(SIGILL));
#include <sys/time.h>
alarm(secs)
- int secs;
-{
+ int secs; {
struct itimerval it, oitv;
register struct itimerval *itp = ⁢
#endif LIBC_SCCS and not lint
atoi(p)
-register char *p;
-{
+register char *p; {
register int n;
register int f;
long
atol(p)
-register char *p;
-{
+register char *p; {
long n;
register int f;
*/
bcmp(b1, b2, length)
register char *b1, *b2;
- register int length;
-{
+ register int length; {
if (length == 0)
return (0);
-#include <sys/types.h>
/*
* Copyright (c) 1987 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
*/
bcopy(src, dst, length)
register char *src, *dst;
- register int length;
-{
+ register int length; {
if (length && src != dst)
if ((u_int)dst < (u_int)src)
if (((int)src | (int)dst | length) & 3)
*/
bzero(b, length)
register char *b;
- register int length;
-{
+ register int length; {
if (length)
do
*/
char *
calloc(num, size)
- register unsigned num, size;
-{
+ register unsigned num, size; {
extern char *malloc();
register char *p;
cfree(p, num, size)
char *p;
unsigned num;
- unsigned size;
-{
+ unsigned size; {
free(p);
}
*/
void
closedir(dirp)
- register DIR *dirp;
-{
+ register DIR *dirp; {
close(dirp->dd_fd);
dirp->dd_fd = -1;
dirp->dd_loc = 0;
*/
setkey(key)
-char *key;
-{
+char *key; {
register i, j, k;
int t;
*/
encrypt(block, edflag)
-char *block;
-{
+char *block; {
int i, ii;
register t, j, k;
char *
crypt(pw,salt)
char *pw;
-char *salt;
-{
+char *salt; {
register i, j, c;
int temp;
static char block[66], iobuf[16];
-#include <time.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
#include <sys/timeb.h>
static char cbuf[26];
-static int dmsize[12] =
-{
+static int dmsize[12] = {
31,
28,
31,
char *
ctime(t)
-time_t *t;
-{
+time_t *t; {
return(asctime(localtime(t)));
}
struct tm *
localtime(tim)
-time_t *tim;
-{
+time_t *tim; {
register int dayno;
register struct tm *ct;
register dalybeg, daylend;
static
sunday(t, d)
register struct tm *t;
-register int d;
-{
+register int d; {
if (d >= 58)
d += dysize(t->tm_year) - 365;
return(d - (d - t->tm_yday + t->tm_wday + 700) % 7);
struct tm *
gmtime(tim)
-time_t *tim;
-{
+time_t *tim; {
register int d0, d1;
long hms, day;
register int *tp;
char *
asctime(t)
-struct tm *t;
-{
+struct tm *t; {
register char *cp, *ncp;
register int *tp;
return(cbuf);
}
-dysize(y)
-{
+dysize(y) {
if((y%4) == 0)
return(366);
return(365);
static char *
ct_numb(cp, n)
-register char *cp;
-{
+register char *cp; {
cp++;
if (n>=10)
*cp++ = (n/10)%10 + '0';
-#include <ctype.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)ctype_.c 5.4 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
struct disktab *
getdiskbyname(name)
- char *name;
-{
+ char *name; {
static struct disktab disk;
static char localbuf[100], *cp = localbuf;
register struct disktab *dp = &disk;
*/
static
dgetent(bp, name)
- char *bp, *name;
-{
+ char *bp, *name; {
register char *cp;
register int c;
register int i = 0, cnt = 0;
*/
static
dnamatch(np)
- char *np;
-{
+ char *np; {
register char *Np, *Bp;
Bp = tbuf;
*/
static char *
dskip(bp)
- register char *bp;
-{
+ register char *bp; {
while (*bp && *bp != ':')
bp++;
*/
static
dgetnum(id)
- char *id;
-{
+ char *id; {
register int i, base;
register char *bp = tbuf;
*/
static
dgetflag(id)
- char *id;
-{
+ char *id; {
register char *bp = tbuf;
for (;;) {
*/
static char *
dgetstr(id, area)
- char *id, **area;
-{
+ char *id, **area; {
register char *bp = tbuf;
for (;;) {
static char *
ddecode(str, area)
register char *str;
- char **area;
-{
+ char **area; {
register char *cp;
register int c;
register char *dp;
char*
ecvt(arg, ndigits, decpt, sign)
double arg;
-int ndigits, *decpt, *sign;
-{
+int ndigits, *decpt, *sign; {
return(cvt(arg, ndigits, decpt, sign, 1));
}
char*
fcvt(arg, ndigits, decpt, sign)
double arg;
-int ndigits, *decpt, *sign;
-{
+int ndigits, *decpt, *sign; {
return(cvt(arg, ndigits, decpt, sign, 0));
}
static char*
cvt(arg, ndigits, decpt, sign, eflag)
double arg;
-int ndigits, *decpt, *sign;
-{
+int ndigits, *decpt, *sign; {
register int r2;
double fi, fj;
register char *p, *p1;
-#include <sys/errno.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)execvp.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
extern errno;
execlp(name, argv)
-char *name, *argv;
-{
+char *name, *argv; {
return(execvp(name, &argv));
}
execvp(name, argv)
-char *name, **argv;
-{
+char *name, **argv; {
char *pathstr;
register char *cp;
char fname[128];
static char *
execat(s1, s2, si)
register char *s1, *s2;
-char *si;
-{
+char *si; {
register char *s;
s = si;
* Null cleanup routine to resolve reference in exit()
* if not using stdio.
*/
-_cleanup()
-{
+_cleanup() {
}
* ffs -- vax ffs instruction
*/
ffs(mask)
- register long mask;
-{
+ register long mask; {
register int cnt;
if (mask == 0)
double
frexp(x,i)
double x;
-int *i;
-{
+int *i; {
int neg;
int j;
j = 0;
static char *
fsskip(p)
- register char *p;
-{
+ register char *p; {
while (*p && *p != ':')
++p;
static char *
fsdigit(backp, string, end)
int *backp;
- char *string, end;
-{
+ char *string, end; {
register int value = 0;
register char *cp;
static
fstabscan(fs)
- struct fstab *fs;
-{
+ struct fstab *fs; {
register char *cp;
cp = fgets(line, 256, fs_file);
return (5);
}
-setfsent()
-{
+setfsent() {
if (fs_file)
endfsent();
return (1);
}
-endfsent()
-{
+endfsent() {
if (fs_file) {
fclose(fs_file);
}
struct fstab *
-getfsent()
-{
+getfsent() {
int nfields;
if ((fs_file == 0) && (setfsent() == 0))
struct fstab *
getfsspec(name)
- char *name;
-{
+ char *name; {
register struct fstab *fsp;
if (setfsent() == 0) /* start from the beginning */
struct fstab *
getfsfile(name)
- char *name;
-{
+ char *name; {
register struct fstab *fsp;
if (setfsent() == 0) /* start from the beginning */
struct fstab *
getfstype(type)
- char *type;
-{
+ char *type; {
register struct fstab *fs;
if (setfsent() == 0)
char *
gcvt(number, ndigit, buf)
double number;
-char *buf;
-{
+char *buf; {
int sign, decpt;
register char *p1, *p2;
register i;
char *
getenv(name)
-register char *name;
-{
+register char *name; {
register char **p = environ;
register char *v;
static char *
nvmatch(s1, s2)
-register char *s1, *s2;
-{
+register char *s1, *s2; {
while (*s1 == *s2++)
if (*s1++ == '=')
static struct group group;
static char *gr_mem[MAXGRP];
-setgrent()
-{
+setgrent() {
if( !grf )
grf = fopen( GROUP, "r" );
else
rewind( grf );
}
-endgrent()
-{
+endgrent() {
if( grf ){
fclose( grf );
grf = NULL;
static char *
grskip(p,c)
register char *p;
-register c;
-{
+register c; {
while( *p && *p != c ) ++p;
if( *p ) *p++ = 0;
return( p );
}
struct group *
-getgrent()
-{
+getgrent() {
register char *p, **q;
if( !grf && !(grf = fopen( GROUP, "r" )) )
struct group *
getgrgid(gid)
-register gid;
-{
+register gid; {
register struct group *p;
struct group *getgrent();
struct group *
getgrnam(name)
-register char *name;
-{
+register char *name; {
register struct group *p;
struct group *getgrent();
static struct utmp ubuf;
char *
-getlogin()
-{
+getlogin() {
register int me, uf;
register char *cp;
-#include <sys/ioctl.h>
-#include <sys/signal.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)getpass.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
char *
getpass(prompt)
-char *prompt;
-{
+char *prompt; {
struct sgttyb ttyb;
int flags;
register char *p;
DBM *_pw_db;
int _pw_stayopen;
-setpwent()
-{
+setpwent() {
if (pwf == NULL)
pwf = fopen(_pw_file, "r");
else
rewind(pwf);
}
-endpwent()
-{
+endpwent() {
if (pwf != NULL) {
fclose(pwf);
pwf = NULL;
static char *
pwskip(p)
-register char *p;
-{
+register char *p; {
while (*p && *p != ':' && *p != '\n')
++p;
if (*p)
}
struct passwd *
-getpwent()
-{
+getpwent() {
register char *p;
if (pwf == NULL) {
}
setpwfile(file)
- char *file;
-{
+ char *file; {
_pw_file = file;
}
-#include <fcntl.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
static struct passwd *
fetchpw(key)
- datum key;
-{
+ datum key; {
register char *cp, *tp;
if (key.dptr == 0)
struct passwd *
getpwnam(nam)
- char *nam;
-{
+ char *nam; {
datum key;
register struct passwd *pw;
struct passwd *
getpwuid(uid)
- int uid;
-{
+ int uid; {
datum key;
register struct passwd *pw;
static char line[LINE];
static struct ttyent tty;
-setttyent()
-{
+setttyent() {
if (tf == NULL)
tf = fopen(TTYFILE, "r");
else
rewind(tf);
}
-endttyent()
-{
+endttyent() {
if (tf != NULL) {
(void) fclose(tf);
tf = NULL;
*/
static char *
skip(p)
- register char *p;
-{
+ register char *p; {
register char *t = p;
register int c;
register int q = 0;
static char *
value(p)
- register char *p;
-{
+ register char *p; {
if ((p = index(p,'=')) == 0)
return(NULL);
p++; /* get past the = sign */
}
struct ttyent *
-getttyent()
-{
+getttyent() {
register char *p;
register int c;
struct ttyent *
getttynam(tty)
- char *tty;
-{
+ char *tty; {
register struct ttyent *t;
setttyent();
* Get a list of shells from SHELLS, if it exists.
*/
char *
-getusershell()
-{
+getusershell() {
char *ret;
if (curshell == NULL)
return (ret);
}
-endusershell()
-{
+endusershell() {
if (shells != NULL)
free((char *)shells);
curshell = NULL;
}
-setusershell()
-{
+setusershell() {
curshell = initshells();
}
static char **
-initshells()
-{
+initshells() {
register char **sp, *cp;
register FILE *fp;
struct stat statb;
-#include <sys/types.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
char *
getwd(pathname)
- char *pathname;
-{
+ char *pathname; {
char pathbuf[MAXPATHLEN]; /* temporary pathname buffer */
char *pnptr = &pathbuf[(sizeof pathbuf)-1]; /* pathname pointer */
char curdir[MAXPATHLEN]; /* current directory buffer */
static char *
prepend(dirname, pathname)
register char *dirname;
- register char *pathname;
-{
+ register char *pathname; {
register int i; /* directory name size counter */
for (i = 0; *dirname != '\0'; i++, dirname++)
char *
index(sp, c)
-register char *sp, c;
-{
+register char *sp, c; {
do {
if (*sp == c)
return(sp);
initgroups(uname, agroup)
char *uname;
- int agroup;
-{
+ int agroup; {
int groups[NGROUPS], ngroups = 0;
register struct group *grp;
register int i;
static char sccsid[] = "@(#)insque.c 5.1 (Berkeley) 1/27/87";
#endif LIBC_SCCS and not lint
+#include <gen.h>
+
/*
* insque -- vax insque instruction
*
/*};*/
insque(e, prev)
- register struct vaxque *e, *prev;
-{
+ register struct vaxque *e, *prev; {
e->vq_prev = prev;
e->vq_next = prev->vq_next;
prev->vq_next->vq_prev = e;
-#include <sys/ioctl.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)isatty.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
#include <sgtty.h>
-isatty(f)
-{
+isatty(f) {
struct sgttyb ttyb;
if (ioctl(f, TIOCGETP, &ttyb) < 0)
#include <stdio.h>
static
botch(s)
- char *s;
-{
+ char *s; {
fprintf(stderr, "\r\nassertion botched: %s\r\n", s);
(void) fflush(stderr); /* just in case user buffered it */
abort();
char *
malloc(nbytes)
- unsigned nbytes;
-{
+ unsigned nbytes; {
register union overhead *op;
register int bucket;
register unsigned amt, n;
* Allocate more memory to the indicated bucket.
*/
morecore(bucket)
- int bucket;
-{
+ int bucket; {
register union overhead *op;
register int sz; /* size of desired block */
int amt; /* amount to allocate */
}
free(cp)
- char *cp;
-{
+ char *cp; {
register int size;
register union overhead *op;
char *
realloc(cp, nbytes)
char *cp;
- unsigned nbytes;
-{
+ unsigned nbytes; {
register u_int onb, i;
union overhead *op;
char *res;
static
findbucket(freep, srchlen)
union overhead *freep;
- int srchlen;
-{
+ int srchlen; {
register union overhead *p;
register int i, j;
* frees for each size category.
*/
mstats(s)
- char *s;
-{
+ char *s; {
register int i, j;
register union overhead *p;
int totfree = 0,
-#include <fcntl.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
#include <sys/file.h>
mkstemp(as)
- char *as;
-{
+ char *as; {
register char *s;
register unsigned int pid;
register int fd, i;
char *
mktemp(as)
-char *as;
-{
+char *as; {
register char *s;
register unsigned pid;
register i;
-#include <fcntl.h>
-#include <sys/errno.h>
-#include <sys/param.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
DBM *
dbm_open(file, flags, mode)
char *file;
- int flags, mode;
-{
+ int flags, mode; {
struct stat statb;
register DBM *db;
void
dbm_close(db)
- DBM *db;
-{
+ DBM *db; {
(void) close(db->dbm_dirf);
(void) close(db->dbm_pagf);
long
dbm_forder(db, key)
register DBM *db;
- datum key;
-{
+ datum key; {
long hash;
hash = dcalchash(key);
datum
dbm_fetch(db, key)
register DBM *db;
- datum key;
-{
+ datum key; {
register i;
datum item;
dbm_delete(db, key)
register DBM *db;
- datum key;
-{
+ datum key; {
register i;
datum item;
dbm_store(db, key, dat, replace)
register DBM *db;
datum key, dat;
- int replace;
-{
+ int replace; {
register i;
datum item, item1;
char ovfbuf[PBLKSIZ];
datum
dbm_firstkey(db)
- DBM *db;
-{
+ DBM *db; {
db->dbm_blkptr = 0L;
db->dbm_keyptr = 0;
datum
dbm_nextkey(db)
- register DBM *db;
-{
+ register DBM *db; {
struct stat statb;
datum item;
static
dbm_access(db, hash)
register DBM *db;
- long hash;
-{
+ long hash; {
for (db->dbm_hmask=0;; db->dbm_hmask=(db->dbm_hmask<<1)+1) {
db->dbm_blkno = hash & db->dbm_hmask;
static
getbit(db)
- register DBM *db;
-{
+ register DBM *db; {
long bn;
register b, i, n;
static
setbit(db)
- register DBM *db;
-{
+ register DBM *db; {
long bn;
register i, n, b;
static datum
makdatum(buf, n)
- char buf[PBLKSIZ];
-{
+ char buf[PBLKSIZ]; {
register short *sp;
register t;
datum item;
static
finddatum(buf, item)
char buf[PBLKSIZ];
- datum item;
-{
+ datum item; {
register short *sp;
register int i, n, j;
}
static int hitab[16]
-/* ken's
-{
+/* ken's {
055,043,036,054,063,014,004,005,
010,064,077,000,035,027,025,071,
};
static long
hashinc(db, hash)
register DBM *db;
- long hash;
-{
+ long hash; {
long bit;
hash &= db->dbm_hmask;
static long
dcalchash(item)
- datum item;
-{
+ datum item; {
register int s, c, j;
register char *cp;
register long hashl;
*/
static
delitem(buf, n)
- char buf[PBLKSIZ];
-{
+ char buf[PBLKSIZ]; {
register short *sp, *sp1;
register i1, i2;
static
additem(buf, item, item1)
char buf[PBLKSIZ];
- datum item, item1;
-{
+ datum item, item1; {
register short *sp;
register i1, i2;
#ifdef DEBUG
static
chkblk(buf)
- char buf[PBLKSIZ];
-{
+ char buf[PBLKSIZ]; {
register short *sp;
register t, i;
-#include <nlist.h>
-#include <sys/exec.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
*/
nlist(name, list)
char *name;
- struct nlist *list;
-{
+ struct nlist *list; {
register struct nlist *p, *q;
register char *s1, *s2;
register n, m;
*/
DIR *
opendir(name)
- char *name;
-{
+ char *name; {
register DIR *dirp;
register int fd;
int sys_nerr;
char *sys_errlist[];
perror(s)
- char *s;
-{
+ char *s; {
struct iovec iov[4];
register struct iovec *v = iov;
-#include <sys/signal.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
psignal(sig, s)
unsigned sig;
- char *s;
-{
+ char *s; {
register char *c;
register n;
char *base;
int n;
int size;
- int (*compar)();
-{
+ int (*compar)(); {
register char c, *i, *j, *lo, *hi;
char *min, *max;
static
qst(base, max)
- char *base, *max;
-{
+ char *base, *max; {
register char c, *i, *j, *jj;
register int ii;
char *mid, *tmp;
-#include <stdio.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
srandom( x )
- unsigned x;
-{
+ unsigned x; {
register int i, j;
if( rand_type == TYPE_0 ) {
unsigned seed; /* seed for R. N. G. */
char *arg_state; /* pointer to state array */
- int n; /* # bytes of state info */
-{
+ int n; /* # bytes of state info */ {
register char *ostate = (char *)( &state[ -1 ] );
if( rand_type == TYPE_0 ) state[ -1 ] = rand_type;
char *
setstate( arg_state )
- char *arg_state;
-{
+ char *arg_state; {
register long *new_state = (long *)arg_state;
register int type = new_state[0]%MAX_TYPES;
register int rear = new_state[0]/MAX_TYPES;
*/
long
-random()
-{
+random() {
long i;
if( rand_type == TYPE_0 ) {
*/
struct direct *
readdir(dirp)
- register DIR *dirp;
-{
+ register DIR *dirp; {
register struct direct *dp;
for (;;) {
*/
char *
re_comp(sp)
- register char *sp;
-{
+ register char *sp; {
register int c;
register char *ep = expbuf;
int cclcnt, numbra = 0;
*/
int
re_exec(p1)
- register char *p1;
-{
+ register char *p1; {
register char *p2 = expbuf;
register int c;
int rv;
*/
static int
advance(lp, ep)
- register char *lp, *ep;
-{
+ register char *lp, *ep; {
register char *curlp;
int ct, i;
int rv;
backref(i, lp)
register int i;
- register char *lp;
-{
+ register char *lp; {
register char *bp;
bp = braslist[i];
int
cclass(set, c, af)
register char *set, c;
- int af;
-{
+ int af; {
register int n;
if (c == 0)
static char sccsid[] = "@(#)remque.c 5.1 (Berkeley) 1/27/87";
#endif LIBC_SCCS and not lint
+#include <gen.h>
+
/*
* remque -- vax remque instruction
*
/*};*/
remque(e)
- register struct vaxque *e;
-{
+ register struct vaxque *e; {
e->vq_prev->vq_next = e->vq_next;
e->vq_next->vq_prev = e->vq_prev;
}
char *
rindex(sp, c)
-register char *sp, c;
-{
+register char *sp, c; {
register char *r;
r = NULL;
scandir(dirname, namelist, select, dcomp)
char *dirname;
struct direct *(*namelist[]);
- int (*select)(), (*dcomp)();
-{
+ int (*select)(), (*dcomp)(); {
register struct direct *d, *p, **names;
register int nitems;
register char *cp1, *cp2;
* Alphabetic order comparison routine for those who want it.
*/
alphasort(d1, d2)
- struct direct **d1, **d2;
-{
+ struct direct **d1, **d2; {
return(strcmp((*d1)->d_name, (*d2)->d_name));
}
void
seekdir(dirp, loc)
register DIR *dirp;
- long loc;
-{
+ long loc; {
long curloc, base, offset;
struct direct *dp;
extern long lseek();
#endif LIBC_SCCS and not lint
setegid(egid)
- int egid;
-{
+ int egid; {
return (setregid(-1, egid));
}
#endif LIBC_SCCS and not lint
seteuid(euid)
- int euid;
-{
+ int euid; {
return (setreuid(-1, euid));
}
* Backwards compatible setgid.
*/
setgid(gid)
- int gid;
-{
+ int gid; {
return (setregid(gid, gid));
}
* write their own versions.
* If this routine returns, the program is aborted.
*/
-longjmperror()
-{
+longjmperror() {
write(2, ERRMSG, sizeof(ERRMSG));
}
#endif LIBC_SCCS and not lint
setrgid(rgid)
- int rgid;
-{
+ int rgid; {
return (setregid(rgid, -1));
}
#endif LIBC_SCCS and not lint
setruid(ruid)
- int ruid;
-{
+ int ruid; {
return (setreuid(ruid, -1));
}
* Backwards compatible setuid.
*/
setuid(uid)
- int uid;
-{
+ int uid; {
return (setreuid(uid, uid));
}
-#include <sys/signal.h>
/*
* Copyright (c) 1985 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* after an instance of the indicated signal.
*/
siginterrupt(sig, flag)
- int sig, flag;
-{
+ int sig, flag; {
struct sigvec sv;
int ret;
-#include <sys/signal.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
-#include <sys/signal.h>
/*
* Copyright (c) 1985 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
int (*
signal(s, a))()
- int s, (*a)();
-{
+ int s, (*a)(); {
struct sigvec osv, sv;
static int mask[NSIG];
static int flags[NSIG];
-#include <sys/signal.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
static int ringring;
sleep(n)
- unsigned n;
-{
+ unsigned n; {
int sleepx(), omask;
struct itimerval itv, oitv;
register struct itimerval *itp = &itv;
}
static
-sleepx()
-{
+sleepx() {
ringring = 1;
}
char *
strcat(s1, s2)
-register char *s1, *s2;
-{
+register char *s1, *s2; {
register char *os1;
os1 = s1;
*/
strcmp(s1, s2)
-register char *s1, *s2;
-{
+register char *s1, *s2; {
while (*s1 == *s2++)
if (*s1++=='\0')
char *
strcpy(s1, s2)
-register char *s1, *s2;
-{
+register char *s1, *s2; {
register char *os1;
os1 = s1;
*/
strlen(s)
-register char *s;
-{
+register char *s; {
register n;
n = 0;
char *
strncat(s1, s2, n)
register char *s1, *s2;
-register n;
-{
+register n; {
register char *os1;
os1 = s1;
strncmp(s1, s2, n)
register char *s1, *s2;
-register n;
-{
+register n; {
while (--n >= 0 && *s1 == *s2++)
if (*s1++ == '\0')
char *
strncpy(s1, s2, n)
-register char *s1, *s2;
-{
+register char *s1, *s2; {
register i;
register char *os1;
swab(from, to, n)
register char *from, *to;
- register int n;
-{
+ register int n; {
register unsigned long temp;
n >>= 1; n++;
-#include <fcntl.h>
-#include <signal.h>
-#include <syslog.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
syslog(pri, fmt, p0, p1, p2, p3, p4)
int pri;
- char *fmt;
-{
+ char *fmt; {
char buf[MAXLINE + 1], outline[MAXLINE + 1];
register char *b, *f, *o;
register int c;
openlog(ident, logstat, logfac)
char *ident;
- int logstat, logfac;
-{
+ int logstat, logfac; {
if (ident != NULL)
LogTag = ident;
LogStat = logstat;
* CLOSELOG -- close the system log
*/
-closelog()
-{
+closelog() {
(void) close(LogFile);
LogFile = -1;
* SETLOGMASK -- set the log mask level
*/
setlogmask(pmask)
- int pmask;
-{
+ int pmask; {
int omask;
omask = LogMask;
-#include <signal.h>
-#include <sys/signal.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)system.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
#include <signal.h>
system(s)
-char *s;
-{
+char *s; {
int status, pid, w;
register int (*istat)(), (*qstat)();
*/
long
telldir(dirp)
- DIR *dirp;
-{
+ DIR *dirp; {
extern long lseek();
return (lseek(dirp->dd_fd, 0L, 1) - dirp->dd_size + dirp->dd_loc);
long
time(t)
- time_t *t;
-{
+ time_t *t; {
struct timeval tt;
if (gettimeofday(&tt, (struct timezone *)0) < 0)
-1
};
-char *timezone(zone, dst)
-{
+char *timezone(zone, dst) {
register struct zone *zp;
static char czone[10];
char *sign;
char *strcat();
char *
-ttyname(f)
-{
+ttyname(f) {
struct stat fsb;
struct stat tsb;
register struct direct *db;
#define NULL 0
-ttyslot()
-{
+ttyslot() {
register struct ttyent *ty;
register char *tp, *p;
register s;
unsigned
ualarm(usecs, reload)
register unsigned usecs;
- register unsigned reload;
-{
+ register unsigned reload; {
struct itimerval new, old;
new.it_interval.tv_usec = reload % USPS;
-#include <sys/signal.h>
/*
* Copyright (c) 1985 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
static int ringring;
usleep(n)
- unsigned n;
-{
+ unsigned n; {
int sleepx(), omask;
struct itimerval itv, oitv;
register struct itimerval *itp = &itv;
}
static
-sleepx()
-{
+sleepx() {
ringring = 1;
}
char *
valloc(i)
- int i;
-{
+ int i; {
int valsiz = getpagesize(), j;
char *cp = malloc(i + (valsiz-1));
--- /dev/null
+net/htons.c
+net/htonl.c
+net/ntohs.c
+net/ntohl.c
+sys/settimeofday.c
+sys/sigpause.c
+sys/getrlimit.c
+sys/mknod.c
+sys/symlink.c
+sys/acct.c
+sys/setpgrp.c
+sys/exect.c
+sys/gettimeofday.c
+sys/sendto.c
+sys/getpeername.c
+sys/adjtime.c
+sys/sigvec.c
+sys/dup2.c
+sys/reboot.c
+sys/listen.c
+sys/umask.c
+sys/readv.c
+sys/creat.c
+sys/link.c
+sys/chmod.c
+sys/kill.c
+sys/stat.c
+sys/gethostname.c
+sys/getgid.c
+sys/open.c
+sys/getrusage.c
+sys/gethostid.c
+sys/truncate.c
+sys/setpriority.c
+sys/flock.c
+sys/getsockname.c
+sys/fcntl.c
+sys/write.c
+sys/wait3.c
+sys/send.c
+sys/ftruncate.c
+sys/mkdir.c
+sys/rmdir.c
+sys/setgroups.c
+sys/killpg.c
+sys/mount.c
+sys/lseek.c
+sys/getsockopt.c
+sys/ptrace.c
+sys/bind.c
+sys/quota.c
+sys/utimes.c
+sys/fstat.c
+sys/execl.c
+sys/unlink.c
+sys/getpagesize.c
+sys/chroot.c
+sys/getitimer.c
+sys/setsockopt.c
+sys/sigblock.c
+sys/sigstack.c
+sys/getegid.c
+sys/recv.c
+sys/socketpair.c
+sys/sbrk.c
+sys/accept.c
+sys/ioctl.c
+sys/dup.c
+sys/getpid.c
+sys/fork.c
+sys/sendmsg.c
+sys/chdir.c
+sys/setregid.c
+sys/geteuid.c
+sys/getppid.c
+sys/sync.c
+sys/setreuid.c
+sys/getgroups.c
+sys/connect.c
+sys/_exit.c
+sys/recvfrom.c
+sys/fchown.c
+sys/close.c
+sys/read.c
+sys/execv.c
+sys/sigreturn.c
+sys/brk.c
+sys/shutdown.c
+sys/sethostname.c
+sys/fsync.c
+sys/execve.c
+sys/getpriority.c
+sys/umount.c
+sys/lstat.c
+sys/setrlimit.c
+sys/vhangup.c
+sys/getdtablesize.c
+sys/sethostid.c
+sys/execle.c
+sys/wait.c
+sys/sigsetmask.c
+sys/readlink.c
+sys/pipe.c
+sys/writev.c
+sys/access.c
+sys/getpgrp.c
+sys/getuid.c
+sys/setitimer.c
+sys/select.c
+sys/setquota.c
+sys/rename.c
+sys/recvmsg.c
+sys/swapon.c
+sys/chown.c
+sys/fchmod.c
+sys/socket.c
+sys/profil.c
+gen/ldexp.c
+gen/abs.c
+gen/setjmp.c
+gen/atof.c
+gen/_setjmp.c
+gen/modf.c
-#include <net.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
*/
u_long
inet_addr(cp)
- register char *cp;
-{
+ register char *cp; {
register u_long val, base, n;
register char c;
u_long parts[4], *pp = parts;
-#include <net.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* number formats.
*/
inet_lnaof(in)
- struct in_addr in;
-{
+ struct in_addr in; {
register u_long i = ntohl(in.s_addr);
if (IN_CLASSA(i))
-#include <net.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
*/
struct in_addr
inet_makeaddr(net, host)
- int net, host;
-{
+ int net, host; {
u_long addr;
if (net < 128)
-#include <net.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* address; handles class a/b/c network #'s.
*/
inet_netof(in)
- struct in_addr in;
-{
+ struct in_addr in; {
register u_long i = ntohl(in.s_addr);
if (IN_CLASSA(i))
*/
u_long
inet_network(cp)
- register char *cp;
-{
+ register char *cp; {
register u_long val, base, n;
register char c;
u_long parts[4], *pp = parts;
char *
inet_ntoa(in)
- struct in_addr in;
-{
+ struct in_addr in; {
static char b[18];
register char *p;
diff --unified --recursive --new-file libstdc.orig/a.out.h libstdc/a.out.h
---- libstdc.orig/a.out.h 2017-01-18 10:16:51.521265224 +1100
-+++ libstdc/a.out.h 2017-01-18 10:16:51.529265233 +1100
+--- libstdc.orig/a.out.h 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/a.out.h 2017-01-18 15:24:06.381633588 +1100
@@ -39,44 +39,4 @@
:4; /* nothing, yet */
};
-#define N_FORMAT "%08x"
+#include <nlist.h>
diff --unified --recursive --new-file libstdc.orig/compat-4.1/gtty.c libstdc/compat-4.1/gtty.c
---- libstdc.orig/compat-4.1/gtty.c 2017-01-18 10:16:51.517265220 +1100
-+++ libstdc/compat-4.1/gtty.c 2017-01-18 10:16:56.825271193 +1100
+--- libstdc.orig/compat-4.1/gtty.c 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/compat-4.1/gtty.c 2017-01-18 15:24:06.381633588 +1100
@@ -15,7 +15,7 @@
#include <sgtty.h>
gtty(fd, ap)
-- struct sgtty *ap;
-+ struct sgttyb *ap;
- {
+- struct sgtty *ap; {
++ struct sgttyb *ap; {
return(ioctl(fd, TIOCGETP, ap));
+ }
diff --unified --recursive --new-file libstdc.orig/compat-4.1/stty.c libstdc/compat-4.1/stty.c
---- libstdc.orig/compat-4.1/stty.c 2017-01-18 10:16:51.521265224 +1100
-+++ libstdc/compat-4.1/stty.c 2017-01-18 10:16:56.825271193 +1100
+--- libstdc.orig/compat-4.1/stty.c 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/compat-4.1/stty.c 2017-01-18 15:24:06.381633588 +1100
@@ -15,7 +15,7 @@
#include <sgtty.h>
stty(fd, ap)
-- struct sgtty *ap;
-+ struct sgttyb *ap;
- {
+- struct sgtty *ap; {
++ struct sgttyb *ap; {
return(ioctl(fd, TIOCSETP, ap));
+ }
diff --unified --recursive --new-file libstdc.orig/gen/insque.c libstdc/gen/insque.c
---- libstdc.orig/gen/insque.c 2017-01-18 10:16:51.525265228 +1100
-+++ libstdc/gen/insque.c 2017-01-18 11:09:24.774728999 +1100
-@@ -14,10 +14,11 @@
+--- libstdc.orig/gen/insque.c 2017-01-18 15:24:06.381633588 +1100
++++ libstdc/gen/insque.c 2017-01-18 15:24:06.381633588 +1100
+@@ -8,16 +8,19 @@
+ static char sccsid[] = "@(#)insque.c 5.1 (Berkeley) 1/27/87";
+ #endif LIBC_SCCS and not lint
+
++#include <gen.h>
++
+ /*
+ * insque -- vax insque instruction
+ *
* NOTE: this implementation is non-atomic!!
*/
+/*};*/
insque(e, prev)
- register struct vaxque *e, *prev;
+ register struct vaxque *e, *prev; {
diff --unified --recursive --new-file libstdc.orig/gen/popen.c libstdc/gen/popen.c
---- libstdc.orig/gen/popen.c 2017-01-18 10:16:51.525265228 +1100
+--- libstdc.orig/gen/popen.c 2017-01-18 15:24:06.381633588 +1100
+++ libstdc/gen/popen.c 1970-01-01 10:00:00.000000000 +1000
-@@ -1,79 +0,0 @@
+@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
-FILE *
-popen(cmd,mode)
- char *cmd;
-- char *mode;
--{
+- char *mode; {
- int p[2];
- int myside, hisside, pid;
-
-}
-
-pclose(ptr)
-- FILE *ptr;
--{
+- FILE *ptr; {
- int child, pid, status, omask;
-
- child = popen_pid[fileno(ptr)];
- return (pid == -1 ? -1 : status);
-}
diff --unified --recursive --new-file libstdc.orig/gen/remque.c libstdc/gen/remque.c
---- libstdc.orig/gen/remque.c 2017-01-18 10:16:51.525265228 +1100
-+++ libstdc/gen/remque.c 2017-01-18 11:09:47.842769559 +1100
-@@ -14,10 +14,11 @@
+--- libstdc.orig/gen/remque.c 2017-01-18 15:24:06.381633588 +1100
++++ libstdc/gen/remque.c 2017-01-18 15:24:06.381633588 +1100
+@@ -8,16 +8,19 @@
+ static char sccsid[] = "@(#)remque.c 5.1 (Berkeley) 1/27/87";
+ #endif LIBC_SCCS and not lint
+
++#include <gen.h>
++
+ /*
+ * remque -- vax remque instruction
+ *
* NOTE: this implementation is non-atomic!!
*/
+/*};*/
remque(e)
- register struct vaxque *e;
+ register struct vaxque *e; {
diff --unified --recursive --new-file libstdc.orig/gen.h libstdc/gen.h
--- libstdc.orig/gen.h 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/gen.h 2017-01-18 11:14:09.663327386 +1100
++++ libstdc/gen.h 2017-01-18 15:24:06.381633588 +1100
@@ -0,0 +1,5 @@
+/* formerly duplicated in gen/insque.c and gen/remque.c */
+struct vaxque { /* queue format expected by VAX queue instructions */
+};
diff --unified --recursive --new-file libstdc.orig/net.h libstdc/net.h
--- libstdc.orig/net.h 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/net.h 2017-01-18 11:13:55.939294422 +1100
++++ libstdc/net.h 2017-01-18 15:24:06.381633588 +1100
@@ -0,0 +1,15 @@
+/* formerly duplicated in netinet/in.h and netns/ns.h */
+#if !defined(vax) && !defined(ntohl) && !defined(lint)
+u_long ntohl(), htonl();
+#endif
diff --unified --recursive --new-file libstdc.orig/netinet/in.h libstdc/netinet/in.h
---- libstdc.orig/netinet/in.h 2017-01-18 10:16:51.521265224 +1100
-+++ libstdc/netinet/in.h 2017-01-18 11:08:03.002599308 +1100
+--- libstdc.orig/netinet/in.h 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/netinet/in.h 2017-01-18 15:24:06.381633588 +1100
@@ -90,20 +90,21 @@
*/
#define IP_OPTIONS 1 /* set/get IP per-packet options */
#ifdef KERNEL
extern struct domain inetdomain;
diff --unified --recursive --new-file libstdc.orig/netinet/ip.h libstdc/netinet/ip.h
---- libstdc.orig/netinet/ip.h 2017-01-18 10:16:51.521265224 +1100
-+++ libstdc/netinet/ip.h 2017-01-18 10:16:51.529265233 +1100
+--- libstdc.orig/netinet/ip.h 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/netinet/ip.h 2017-01-18 15:24:06.381633588 +1100
@@ -81,7 +81,7 @@
struct in_addr ipt_addr;
n_long ipt_time;
/* flag bits for ipt_flg */
diff --unified --recursive --new-file libstdc.orig/netinet/tcp.h libstdc/netinet/tcp.h
---- libstdc.orig/netinet/tcp.h 2017-01-18 10:16:51.521265224 +1100
-+++ libstdc/netinet/tcp.h 2017-01-18 11:12:57.871158957 +1100
+--- libstdc.orig/netinet/tcp.h 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/netinet/tcp.h 2017-01-18 15:24:06.381633588 +1100
@@ -44,7 +44,9 @@
#ifdef lint
#define TCP_MSS 536
/*
diff --unified --recursive --new-file libstdc.orig/netns/ns.h libstdc/netns/ns.h
---- libstdc.orig/netns/ns.h 2017-01-18 10:16:51.521265224 +1100
-+++ libstdc/netns/ns.h 2017-01-18 11:08:30.898640954 +1100
+--- libstdc.orig/netns/ns.h 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/netns/ns.h 2017-01-18 15:24:06.381633588 +1100
@@ -103,20 +103,21 @@
#define ns_nullhost(x) (((x).x_host.s_host[0]==0) && \
((x).x_host.s_host[1]==0) && ((x).x_host.s_host[2]==0))
#ifdef KERNEL
extern struct domain nsdomain;
diff --unified --recursive --new-file libstdc.orig/stdio/doscan.c libstdc/stdio/doscan.c
---- libstdc.orig/stdio/doscan.c 2017-01-18 10:16:51.517265220 +1100
-+++ libstdc/stdio/doscan.c 2017-01-18 10:16:56.829271198 +1100
+--- libstdc.orig/stdio/doscan.c 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/stdio/doscan.c 2017-01-18 15:24:06.381633588 +1100
@@ -3,7 +3,8 @@
#endif LIBC_SCCS and not lint
#define SPC 01
#define STP 02
-@@ -27,14 +28,14 @@
+@@ -27,13 +28,13 @@
0,0,0,0,0,0,0,0,
};
+_doscan(iop, fmt, ap)
FILE *iop;
register char *fmt;
--register int **argp;
-+register va_list ap;
- {
+-register int **argp; {
++register va_list ap; {
register int ch;
int nmatch, len, ch1;
- int **ptr, fileended, size;
nmatch = 0;
fileended = 0;
-@@ -46,7 +47,7 @@
+@@ -45,7 +46,7 @@
goto def;
ptr = 0;
if (ch != '*')
else
ch = *fmt++;
len = 0;
-@@ -100,7 +101,7 @@
+@@ -99,7 +100,7 @@
static
_innum(ptr, type, len, size, iop, eofptr)
-int **ptr, *eofptr;
+int *ptr, *eofptr;
- FILE *iop;
- {
+ FILE *iop; {
extern double atof();
-@@ -111,7 +112,7 @@
+ register char *np;
+@@ -109,7 +110,7 @@
long lcval;
if (type=='c' || type=='s' || type=='[')
lcval = 0;
ndigit = 0;
scale = INT;
-@@ -185,23 +186,23 @@
+@@ -183,23 +184,23 @@
case (FLOAT<<4) | SHORT:
case (FLOAT<<4) | REGULAR:
}
return(1);
diff --unified --recursive --new-file libstdc.orig/stdio/fprintf.c libstdc/stdio/fprintf.c
---- libstdc.orig/stdio/fprintf.c 2017-01-18 10:16:51.517265220 +1100
-+++ libstdc/stdio/fprintf.c 2017-01-18 10:16:56.829271198 +1100
-@@ -1,32 +1,49 @@
+--- libstdc.orig/stdio/fprintf.c 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/stdio/fprintf.c 2017-01-18 15:24:06.381633588 +1100
+@@ -1,31 +1,48 @@
/*
* Copyright (c) 1980 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
-fprintf(iop, fmt, args)
-register FILE *iop;
--char *fmt;
+-char *fmt; {
+fprintf(iop, fmt, va_alist)
+ register FILE *iop;
+ char *fmt;
-+ va_dcl
- {
++ va_dcl {
+ va_list ap;
+ int len;
char localbuf[BUFSIZ];
+ va_end(ap);
+ return(ferror(iop) ? EOF : len);
}
-diff --unified --recursive --new-file libstdc.orig/stdio/Makefile libstdc/stdio/Makefile
---- libstdc.orig/stdio/Makefile 2017-01-18 10:16:51.517265220 +1100
-+++ libstdc/stdio/Makefile 2017-01-18 10:16:56.825271193 +1100
-@@ -25,15 +25,15 @@
- fprintf.c fputc.c fread.c freopen.c fseek.c ftell.c \
- fwrite.c getchar.c getw.c printf.c putchar.c \
- putw.c rew.c scanf.c setbuf.c setbuffer.c sibuf.c sobuf.c \
-- sprintf.c strout.c ungetc.c
--VAXSRC= fgets.c fputs.c gets.c puts.c
-+ sprintf.c strout.c ungetc.c vfprintf.c vprintf.c vsprintf.c
-+VAXSRC= doprnt.c fgets.c fputs.c gets.c puts.c
- STDOBJ= clrerr.o doscan.o \
- exit.o fdopen.o fgetc.o filbuf.o findiop.o flsbuf.o fopen.o \
- fprintf.o fputc.o fread.o freopen.o fseek.o ftell.o \
- fwrite.o getchar.o getw.o printf.o putchar.o \
- putw.o rew.o scanf.o setbuf.o setbuffer.o sibuf.o sobuf.o \
-- sprintf.o strout.o ungetc.o
--VAXOBJ= fgets.o fputs.o gets.o puts.o
-+ sprintf.o strout.o ungetc.o vfprintf.o vprintf.o vsprintf.o
-+VAXOBJ= doprnt.o fgets.o fputs.o gets.o puts.o
- TAGSFILE=tags
-
- .c.o:
diff --unified --recursive --new-file libstdc.orig/stdio/popen.c libstdc/stdio/popen.c
--- libstdc.orig/stdio/popen.c 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/stdio/popen.c 2017-01-18 10:16:50.157263730 +1100
-@@ -0,0 +1,79 @@
++++ libstdc/stdio/popen.c 2017-01-18 15:24:06.381633588 +1100
+@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+FILE *
+popen(cmd,mode)
+ char *cmd;
-+ char *mode;
-+{
++ char *mode; {
+ int p[2];
+ int myside, hisside, pid;
+
+}
+
+pclose(ptr)
-+ FILE *ptr;
-+{
++ FILE *ptr; {
+ int child, pid, status, omask;
+
+ child = popen_pid[fileno(ptr)];
+ return (pid == -1 ? -1 : status);
+}
diff --unified --recursive --new-file libstdc.orig/stdio/printf.c libstdc/stdio/printf.c
---- libstdc.orig/stdio/printf.c 2017-01-18 10:16:51.517265220 +1100
-+++ libstdc/stdio/printf.c 2017-01-18 10:16:56.829271198 +1100
-@@ -1,12 +1,36 @@
+--- libstdc.orig/stdio/printf.c 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/stdio/printf.c 2017-01-18 15:24:06.381633588 +1100
+@@ -1,11 +1,35 @@
+/*
+ * Copyright (c) 1987 Regents of the University of California.
+ * All rights reserved.
-#endif LIBC_SCCS and not lint
+static char sccsid[] = "@(#)printf.c 5.4 (Berkeley) 6/27/88";
+#endif /* LIBC_SCCS and not lint */
-
--#include <stdio.h>
++
+#include <stdio.h>
+#include <varargs.h>
--printf(fmt, args)
--char *fmt;
+-#include <stdio.h>
+printf(fmt, va_alist)
+ char *fmt;
-+ va_dcl
- {
-- _doprnt(fmt, &args, stdout);
-- return(ferror(stdout)? EOF: 0);
++ va_dcl {
+ va_list ap;
+ int len;
-+
+
+-printf(fmt, args)
+-char *fmt; {
+- _doprnt(fmt, &args, stdout);
+- return(ferror(stdout)? EOF: 0);
+ va_start(ap);
+ len = _doprnt(fmt, ap, stdout);
+ va_end(ap);
+ return(ferror(stdout) ? EOF : len);
}
diff --unified --recursive --new-file libstdc.orig/stdio/scanf.c libstdc/stdio/scanf.c
---- libstdc.orig/stdio/scanf.c 2017-01-18 10:16:51.517265220 +1100
-+++ libstdc/stdio/scanf.c 2017-01-18 10:16:56.829271198 +1100
-@@ -2,32 +2,53 @@
+--- libstdc.orig/stdio/scanf.c 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/stdio/scanf.c 2017-01-18 15:24:06.381633588 +1100
+@@ -2,29 +2,50 @@
static char sccsid[] = "@(#)scanf.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
+#include <varargs.h>
-scanf(fmt, args)
-+scanf(fmt, va_alist)
- char *fmt;
-+va_dcl
- {
+-char *fmt; {
- return(_doscan(stdin, fmt, &args));
++scanf(fmt, va_alist)
++char *fmt;
++va_dcl {
+ va_list ap;
+ int len;
+
-fscanf(iop, fmt, args)
+fscanf(iop, fmt, va_alist)
FILE *iop;
- char *fmt;
-+va_dcl
- {
+-char *fmt; {
- return(_doscan(iop, fmt, &args));
++char *fmt;
++va_dcl {
+ va_list ap;
+ int len;
+
-sscanf(str, fmt, args)
+sscanf(str, fmt, va_alist)
register char *str;
- char *fmt;
-+va_dcl
- {
+-char *fmt; {
++char *fmt;
++va_dcl {
FILE _strbuf;
+ va_list ap;
+ int len;
+ return len;
}
diff --unified --recursive --new-file libstdc.orig/stdio/sprintf.c libstdc/stdio/sprintf.c
---- libstdc.orig/stdio/sprintf.c 2017-01-18 10:16:51.517265220 +1100
-+++ libstdc/stdio/sprintf.c 2017-01-18 10:16:56.829271198 +1100
-@@ -1,18 +1,41 @@
+--- libstdc.orig/stdio/sprintf.c 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/stdio/sprintf.c 2017-01-18 15:24:06.381633588 +1100
+@@ -1,17 +1,40 @@
+/*
+ * Copyright (c) 1987 Regents of the University of California.
+ * All rights reserved.
+#include <varargs.h>
-char *sprintf(str, fmt, args)
--char *str, *fmt;
+-char *str, *fmt; {
+sprintf(str, fmt, va_alist)
+ char *str, *fmt;
-+ va_dcl
- {
++ va_dcl {
+ va_list ap;
FILE _strbuf;
+ int len;
}
diff --unified --recursive --new-file libstdc.orig/stdio/vfprintf.c libstdc/stdio/vfprintf.c
--- libstdc.orig/stdio/vfprintf.c 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/stdio/vfprintf.c 2017-01-18 10:16:56.829271198 +1100
-@@ -0,0 +1,47 @@
++++ libstdc/stdio/vfprintf.c 2017-01-18 15:24:06.381633588 +1100
+@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+vfprintf(iop, fmt, ap)
+ FILE *iop;
+ char *fmt;
-+ va_list ap;
-+{
++ va_list ap; {
+ int len;
+ char localbuf[BUFSIZ];
+
+}
diff --unified --recursive --new-file libstdc.orig/stdio/vprintf.c libstdc/stdio/vprintf.c
--- libstdc.orig/stdio/vprintf.c 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/stdio/vprintf.c 2017-01-18 10:16:56.829271198 +1100
-@@ -0,0 +1,34 @@
++++ libstdc/stdio/vprintf.c 2017-01-18 15:24:06.381633588 +1100
+@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+int
+vprintf(fmt, ap)
+ char *fmt;
-+ va_list ap;
-+{
++ va_list ap; {
+ int len;
+
+ len = _doprnt(fmt, ap, stdout);
+}
diff --unified --recursive --new-file libstdc.orig/stdio/vsprintf.c libstdc/stdio/vsprintf.c
--- libstdc.orig/stdio/vsprintf.c 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/stdio/vsprintf.c 2017-01-18 10:16:56.829271198 +1100
-@@ -0,0 +1,39 @@
++++ libstdc/stdio/vsprintf.c 2017-01-18 15:24:06.381633588 +1100
+@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+int
+vsprintf(str, fmt, ap)
+ char *str, *fmt;
-+ va_list ap;
-+{
++ va_list ap; {
+ FILE f;
+ int len;
+
+ return (len);
+}
diff --unified --recursive --new-file libstdc.orig/stdio.h libstdc/stdio.h
---- libstdc.orig/stdio.h 2017-01-18 10:16:51.521265224 +1100
-+++ libstdc/stdio.h 2017-01-18 10:16:51.529265233 +1100
+--- libstdc.orig/stdio.h 2017-01-18 15:24:06.373633566 +1100
++++ libstdc/stdio.h 2017-01-18 15:24:06.381633588 +1100
@@ -59,7 +59,7 @@
long ftell();
char *fgets();
#endif
# endif
diff --unified --recursive --new-file libstdc.orig/sys/dir.h libstdc/sys/dir.h
---- libstdc.orig/sys/dir.h 2017-01-18 10:16:51.525265228 +1100
-+++ libstdc/sys/dir.h 2017-01-18 10:16:51.529265233 +1100
+--- libstdc.orig/sys/dir.h 2017-01-18 15:24:06.377633578 +1100
++++ libstdc/sys/dir.h 2017-01-18 15:24:06.381633588 +1100
@@ -32,9 +32,9 @@
* dp->d_ino set to 0.
*/
#define MAXNAMLEN 255
diff --unified --recursive --new-file libstdc.orig/sys/param.h libstdc/sys/param.h
---- libstdc.orig/sys/param.h 2017-01-18 10:16:51.525265228 +1100
-+++ libstdc/sys/param.h 2017-01-18 11:21:27.168516781 +1100
+--- libstdc.orig/sys/param.h 2017-01-18 15:24:06.377633578 +1100
++++ libstdc/sys/param.h 2017-01-18 15:24:06.381633588 +1100
@@ -174,12 +174,16 @@
/*
* Macros for counting and rounding.
+#define NBBY 8 /* number of bits in a byte */
diff --unified --recursive --new-file libstdc.orig/sys/select.h libstdc/sys/select.h
--- libstdc.orig/sys/select.h 1970-01-01 10:00:00.000000000 +1000
-+++ libstdc/sys/select.h 2017-01-18 11:18:18.483976173 +1100
++++ libstdc/sys/select.h 2017-01-18 15:24:06.385633600 +1100
@@ -0,0 +1,28 @@
+#include <sys/param.h>
+
+#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
+#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
diff --unified --recursive --new-file libstdc.orig/sys/types.h libstdc/sys/types.h
---- libstdc.orig/sys/types.h 2017-01-18 10:16:51.525265228 +1100
-+++ libstdc/sys/types.h 2017-01-18 11:19:48.332229461 +1100
+--- libstdc.orig/sys/types.h 2017-01-18 15:24:06.377633578 +1100
++++ libstdc/sys/types.h 2017-01-18 15:24:06.385633600 +1100
@@ -45,30 +45,32 @@
typedef u_short uid_t;
typedef u_short gid_t;
#endif
diff --unified --recursive --new-file libstdc.orig/sys/vmmac.h libstdc/sys/vmmac.h
---- libstdc.orig/sys/vmmac.h 2017-01-18 10:16:51.525265228 +1100
-+++ libstdc/sys/vmmac.h 2017-01-18 11:11:57.943026557 +1100
+--- libstdc.orig/sys/vmmac.h 2017-01-18 15:24:06.377633578 +1100
++++ libstdc/sys/vmmac.h 2017-01-18 15:24:06.385633600 +1100
@@ -157,3 +157,10 @@
} \
c->c_lock = 0; \
+#define mapin(pte, v, pfnum, count, prot) \
+ (*(int *)(pte) = (pfnum) | (prot), mtpr(TBIS, ptob(v)))
diff --unified --recursive --new-file libstdc.orig/vax/vmparam.h libstdc/vax/vmparam.h
---- libstdc.orig/vax/vmparam.h 2017-01-18 10:16:51.525265228 +1100
-+++ libstdc/vax/vmparam.h 2017-01-18 11:11:21.434949961 +1100
+--- libstdc.orig/vax/vmparam.h 2017-01-18 15:24:06.377633578 +1100
++++ libstdc/vax/vmparam.h 2017-01-18 15:24:06.385633600 +1100
@@ -156,5 +156,6 @@
/*
* BEWARE THIS DEFINITION WORKS ONLY WITH COUNT OF 1
patch llib-lc <llib-lc.patch
sed -e 's/[\t ]\+/ /g;s/^ /void /;s/\* /*/g;s/( /(/g;s/ )/)/g' <llib-lc >llib-lc.temp
+rm -f generated.txt
+
find vax -name '*.s' -print |\
sed -e 's:^vax/\(.*\)\.s$:\1:' |\
while read i
rm vax/$i.s
mkdir -p `dirname $i`
mv a $i.c
+ echo $i.c >>generated.txt
fi
fi
fi
done
done
+find . -name '*.[ch]' -print |\
+sed -e 's:^\./::' |\
+while read i
+do
+ rm -f xx*
+ csplit -b '%05d' -q $i '/^[ ]*{[ ]*$/' '{*}'
+ for j in xx*
+ do
+ :
+ done
+ for k in xx*
+ do
+ if test $k != xx00000
+ then
+ sed -ne '2,$p' -i $k
+ fi
+ if test $k != $j
+ then
+ sed -e '$s/$/ {/' -i $k
+ fi
+ done
+ cat xx* >$i
+done
+
#rm -f fcntl.h mp.h
#ln -s sys/file.h fcntl.h
#rm -f machine
struct netent *
getnetbyaddr(net, type)
- register int net, type;
-{
+ register int net, type; {
register struct netent *p;
setnetent(_net_stayopen);
struct netent *
getnetbyname(name)
- register char *name;
-{
+ register char *name; {
register struct netent *p;
register char **cp;
static char *any();
setnetent(f)
- int f;
-{
+ int f; {
if (netf == NULL)
netf = fopen(NETDB, "r" );
else
_net_stayopen |= f;
}
-endnetent()
-{
+endnetent() {
if (netf) {
fclose(netf);
netf = NULL;
}
struct netent *
-getnetent()
-{
+getnetent() {
char *p;
register char *cp, **q;
static char *
any(cp, match)
register char *cp;
- char *match;
-{
+ char *match; {
register char *mp, c;
while (c = *cp) {
struct protoent *
getprotobynumber(proto)
- register int proto;
-{
+ register int proto; {
register struct protoent *p;
setprotoent(_proto_stayopen);
int _proto_stayopen;
setprotoent(f)
- int f;
-{
+ int f; {
if (protof == NULL)
protof = fopen(PROTODB, "r" );
else
_proto_stayopen |= f;
}
-endprotoent()
-{
+endprotoent() {
if (protof) {
fclose(protof);
protof = NULL;
}
struct protoent *
-getprotoent()
-{
+getprotoent() {
char *p;
register char *cp, **q;
static char *
any(cp, match)
register char *cp;
- char *match;
-{
+ char *match; {
register char *mp, c;
while (c = *cp) {
struct protoent *
getprotobyname(name)
- register char *name;
-{
+ register char *name; {
register struct protoent *p;
register char **cp;
struct servent *
getservbyname(name, proto)
- char *name, *proto;
-{
+ char *name, *proto; {
register struct servent *p;
register char **cp;
struct servent *
getservbyport(port, proto)
int port;
- char *proto;
-{
+ char *proto; {
register struct servent *p;
setservent(_serv_stayopen);
-#include <net.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
int _serv_stayopen;
setservent(f)
- int f;
-{
+ int f; {
if (servf == NULL)
servf = fopen(SERVDB, "r" );
else
_serv_stayopen |= f;
}
-endservent()
-{
+endservent() {
if (servf) {
fclose(servf);
servf = NULL;
}
struct servent *
-getservent()
-{
+getservent() {
char *p;
register char *cp, **q;
static char *
any(cp, match)
register char *cp;
- char *match;
-{
+ char *match; {
register char *mp, c;
while (c = *cp) {
static char *any();
sethostent(f)
- int f;
-{
+ int f; {
if (hostf != NULL)
rewind(hostf);
_host_stayopen |= f;
}
-endhostent()
-{
+endhostent() {
if (hostf) {
fclose(hostf);
hostf = NULL;
}
struct hostent *
-gethostent()
-{
+gethostent() {
char *p;
register char *cp, **q;
}
sethostfile(file)
- char *file;
-{
+ char *file; {
_host_file = file;
}
static char *
any(cp, match)
register char *cp;
- char *match;
-{
+ char *match; {
register char *mp, c;
while (c = *cp) {
-#include <fcntl.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
static struct hostent *
fetchhost(key)
- datum key;
-{
+ datum key; {
register char *cp, *tp, **ap;
int naliases;
struct hostent *
gethostbyname(nam)
- register char *nam;
-{
+ register char *nam; {
register struct hostent *hp;
register char **cp;
datum key;
gethostbyaddr(addr, length, type)
char *addr;
register int length;
- register int type;
-{
+ register int type; {
register struct hostent *hp;
datum key;
-#include <net.h>
-#include <sys/errno.h>
/*
* Copyright (c) 1985 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
static struct hostent *
getanswer(msg, msglen, iquery)
char *msg;
- int msglen, iquery;
-{
+ int msglen, iquery; {
register HEADER *hp;
register char *cp;
register int n;
struct hostent *
gethostbyname(name)
- char *name;
-{
+ char *name; {
int n;
querybuf buf;
register struct hostent *hp;
struct hostent *
gethostbyaddr(addr, len, type)
char *addr;
- int len, type;
-{
+ int len, type; {
int n;
querybuf buf;
register struct hostent *hp;
_sethtent(f)
- int f;
-{
+ int f; {
if (hostf == NULL)
hostf = fopen(HOSTDB, "r" );
else
stayopen |= f;
}
-_endhtent()
-{
+_endhtent() {
if (hostf && !stayopen) {
(void) fclose(hostf);
hostf = NULL;
}
struct hostent *
-_gethtent()
-{
+_gethtent() {
char *p;
register char *cp, **q;
static char *
any(cp, match)
register char *cp;
- char *match;
-{
+ char *match; {
register char *mp, c;
while (c = *cp) {
struct hostent *
_gethtbyname(name)
- char *name;
-{
+ char *name; {
register struct hostent *p;
register char **cp;
char lowname[128];
struct hostent *
_gethtbyaddr(addr, len, type)
char *addr;
- int len, type;
-{
+ int len, type; {
register struct hostent *p;
_sethtent(0);
#include <netinet/in.h>
#include <resolv.h>
-sethostent(stayopen)
-{
+sethostent(stayopen) {
if (stayopen)
_res.options |= RES_STAYOPEN | RES_USEVC;
}
-endhostent()
-{
+endhostent() {
_res.options &= ~(RES_STAYOPEN | RES_USEVC);
_res_close();
}
sethostfile(name)
-char *name;
-{
+char *name; {
#ifdef lint
name = name;
#endif
-#include <fcntl.h>
-#include <net.h>
-#include <signal.h>
-#include <sys/errno.h>
-#include <sys/types.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
char **ahost;
u_short rport;
char *locuser, *remuser, *cmd;
- int *fd2p;
-{
+ int *fd2p; {
int s, timo = 1, pid, oldmask;
struct sockaddr_in sin, sin2, from;
char c;
}
rresvport(alport)
- int *alport;
-{
+ int *alport; {
struct sockaddr_in sin;
int s;
ruserok(rhost, superuser, ruser, luser)
char *rhost;
int superuser;
- char *ruser, *luser;
-{
+ char *ruser, *luser; {
FILE *hostf;
char fhost[MAXHOSTNAMELEN];
int first = 1;
_validuser(hostf, rhost, luser, ruser, baselen)
char *rhost, *luser, *ruser;
FILE *hostf;
-int baselen;
-{
+int baselen; {
char *user;
char ahost[MAXHOSTNAMELEN];
register char *p;
_checkhost(rhost, lhost, len)
char *rhost, *lhost;
-int len;
-{
+int len; {
static char ldomain[MAXHOSTNAMELEN + 1];
static char *domainp = NULL;
register char *cp;
*/
dn_expand(msg, eomorig, comp_dn, exp_dn, length)
char *msg, *eomorig, *comp_dn, *exp_dn;
- int length;
-{
+ int length; {
register char *cp, *dn;
register int n, c;
char *eom;
dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr)
char *exp_dn, *comp_dn;
int length;
- char **dnptrs, **lastdnptr;
-{
+ char **dnptrs, **lastdnptr; {
register char *cp, *dn;
register int c, l;
char **cpp, **lpp, *sp, *eob;
* Skip over a compressed domain name. Return the size or -1.
*/
dn_skip(comp_dn)
- char *comp_dn;
-{
+ char *comp_dn; {
register char *cp;
register int n;
*/
dn_find(exp_dn, msg, dnptrs, lastdnptr)
char *exp_dn, *msg;
- char **dnptrs, **lastdnptr;
-{
+ char **dnptrs, **lastdnptr; {
register char *dn, *cp, **cpp;
register int n;
char *sp;
u_short
getshort(msgp)
- char *msgp;
-{
+ char *msgp; {
register u_char *p = (u_char *) msgp;
#ifdef vax
/*
u_long
getlong(msgp)
- char *msgp;
-{
+ char *msgp; {
register u_char *p = (u_char *) msgp;
register u_long u;
putshort(s, msgp)
register u_short s;
- register char *msgp;
-{
+ register char *msgp; {
msgp[1] = s;
msgp[0] = s >> 8;
putlong(l, msgp)
register u_long l;
- register char *msgp;
-{
+ register char *msgp; {
msgp[3] = l;
msgp[2] = (l >>= 8);
-#include <net.h>
/*
* Copyright (c) 1985 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
};
p_query(msg)
- char *msg;
-{
+ char *msg; {
#ifdef DEBUG
fp_query(msg,stdout);
#endif
*/
fp_query(msg,file)
char *msg;
- FILE *file;
-{
+ FILE *file; {
#ifdef DEBUG
register char *cp;
register HEADER *hp;
char *
p_cdname(cp, msg, file)
char *cp, *msg;
- FILE *file;
-{
+ FILE *file; {
#ifdef DEBUG
char name[MAXDNAME];
int n;
char *
p_rr(cp, msg, file)
char *cp, *msg;
- FILE *file;
-{
+ FILE *file; {
#ifdef DEBUG
int type, class, dlen, n, c;
struct in_addr inaddr;
*/
char *
p_type(type)
- int type;
-{
+ int type; {
switch (type) {
case T_A:
return("A");
*/
char *
p_class(class)
- int class;
-{
+ int class; {
switch (class) {
case C_IN: /* internet class */
-#include <net.h>
/*
* Copyright (c) 1985 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
*
* Return 0 if completes successfully, -1 on error
*/
-res_init()
-{
+res_init() {
register FILE *fp;
char buf[BUFSIZ], *cp;
extern u_long inet_addr();
-#include <net.h>
/*
* Copyright (c) 1985 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
int datalen; /* length of data */
struct rrec *newrr; /* new rr for modify or append */
char *buf; /* buffer to put query */
- int buflen; /* size of buffer */
-{
+ int buflen; /* size of buffer */ {
register HEADER *hp;
register char *cp;
register int n;
-#include <net.h>
-#include <sys/errno.h>
-#include <sys/select.h>
-#include <sys/types.h>
/*
* Copyright (c) 1985 Regents of the University of California.
char *buf;
int buflen;
char *answer;
- int anslen;
-{
+ int anslen; {
register int n;
int retry, v_circuit, resplen, ns;
int gotsomewhere = 0;
*
* This routine is not expected to be user visible.
*/
-_res_close()
-{
+_res_close() {
if (s != -1) {
(void) close(s);
s = -1;
-#include <net.h>
-#include <sys/errno.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
char **ahost;
int rport;
char *name, *pass, *cmd;
- int *fd2p;
-{
+ int *fd2p; {
int s, timo = 1, s3;
struct sockaddr_in sin, sin2, from;
char c;
-#include <sys/errno.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
static FILE *cfile;
ruserpass(host, aname, apass)
- char *host, **aname, **apass;
-{
+ char *host, **aname, **apass; {
renv(host, aname, apass);
if (*aname == 0 || *apass == 0)
static
renv(host, aname, apass)
- char *host, **aname, **apass;
-{
+ char *host, **aname, **apass; {
register char *cp;
char *stemp, fgetlogin, *comma;
static
char *
renvlook(host)
- char *host;
-{
+ char *host; {
register char *cp, **env;
extern char **environ;
static
rnetrc(host, aname, apass)
- char *host, **aname, **apass;
-{
+ char *host, **aname, **apass; {
char *hdir, buf[BUFSIZ];
int t;
struct stat stb;
}
static
-token()
-{
+token() {
char *cp;
int c;
struct toktab *t;
static
nbssetkey(key)
-char *key;
-{
+char *key; {
register i, j, k;
int t;
static
blkencrypt(block, edflag)
-char *block;
-{
+char *block; {
int i, ii;
register t, j, k;
*/
static
struct utmp *getutmp(sttyname)
-char *sttyname;
-{
+char *sttyname; {
static struct utmp utmpstr;
FILE *fdutmp;
static
sreverse(sto, sfrom)
- register char *sto, *sfrom;
-{
+ register char *sto, *sfrom; {
register int i;
i = strlen(sfrom);
static
char *mkenvkey(mch)
- char mch;
-{
+ char mch; {
static char skey[40];
register struct utmp *putmp;
char stemp[40], stemp1[40], sttyname[30];
}
mkpwunclear(spasswd,mch,sencpasswd)
- char mch, *spasswd, *sencpasswd;
-{
+ char mch, *spasswd, *sencpasswd; {
register char *skey;
if (spasswd[0] == 0) {
}
mkpwclear(sencpasswd,mch,spasswd)
- char mch, *spasswd, *sencpasswd;
-{
+ char mch, *spasswd, *sencpasswd; {
register char *skey;
if (sencpasswd[0] == 0) {
-#include <net.h>
/*
* Copyright (c) 1986 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
struct ns_addr
ns_addr(name)
- char *name;
-{
+ char *name; {
u_long net;
u_short socket;
char separator = '.';
Field(buf, out, len)
char *buf;
u_char *out;
-int len;
-{
+int len; {
register char *bp = buf;
int i, ibase, base16 = 0, base10 = 0, clen = 0;
int hb[6], *hp;
int input[];
int inlen;
unsigned char result[];
- int reslen;
-{
+ int reslen; {
int d, e;
long sum;
-#include <net.h>
/*
* Copyright (c) 1986 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
char *
ns_ntoa(addr)
-struct ns_addr addr;
-{
+struct ns_addr addr; {
static char obuf[40];
char *spectHex();
union { union ns_net net_e; u_long long_e; } net;
static char *
spectHex(p0)
-char *p0;
-{
+char *p0; {
int ok = 0;
int nonzero = 0;
register char *p = p0;
if test -n "$pattern"
then
- grep -H "^\\(.*[^0-9A-Za-z_]\\)\\?\\($pattern\\)\\([^0-9A-Za-z_].*\\)\\?$" `find . -name '*.c.nocomm' -print` |sed -e 's:^\./::' |grep -v "^$i\.nocomm:" >a
+ grep -H "^\\(.*[^0-9A-Za-z_]\\)\\?\\($pattern\\)\\([^0-9A-Za-z_].*\\)\\?$" `cat generated.txt |sed -e 's/$/\.nocomm/'` |sed -e 's:^\./::' |grep -v "^$i\.nocomm:" >a
if test -s a
then
cat a >>$i.usedby
fprintf.c fputc.c fread.c freopen.c fseek.c ftell.c \
fwrite.c getchar.c getw.c printf.c putchar.c \
putw.c rew.c scanf.c setbuf.c setbuffer.c sibuf.c sobuf.c \
- sprintf.c strout.c ungetc.c vfprintf.c vprintf.c vsprintf.c
-VAXSRC= doprnt.c fgets.c fputs.c gets.c puts.c
+ sprintf.c strout.c ungetc.c
+VAXSRC= fgets.c fputs.c gets.c puts.c
STDOBJ= clrerr.o doscan.o \
exit.o fdopen.o fgetc.o filbuf.o findiop.o flsbuf.o fopen.o \
fprintf.o fputc.o fread.o freopen.o fseek.o ftell.o \
fwrite.o getchar.o getw.o printf.o putchar.o \
putw.o rew.o scanf.o setbuf.o setbuffer.o sibuf.o sobuf.o \
- sprintf.o strout.o ungetc.o vfprintf.o vprintf.o vsprintf.o
-VAXOBJ= doprnt.o fgets.o fputs.o gets.o puts.o
+ sprintf.o strout.o ungetc.o
+VAXOBJ= fgets.o fputs.o gets.o puts.o
TAGSFILE=tags
.c.o:
#undef clearerr
clearerr(iop)
- register FILE *iop;
-{
+ register FILE *iop; {
iop->_flag &= ~(_IOERR|_IOEOF);
}
_doprnt(fmt0, argp, fp)
u_char *fmt0;
va_list argp;
- register FILE *fp;
-{
+ register FILE *fp; {
register u_char *fmt; /* format string */
register int ch; /* character from fmt */
register int cnt; /* return value accumulator */
register int prec;
int flags;
u_char fmtch;
- char *signp, *startp, *endp;
-{
+ char *signp, *startp, *endp; {
register char *p, *t;
register double fract;
int dotrim, expcnt, gformat;
double fract;
int *exp;
register char *start, *end;
- char ch, *signp;
-{
+ char ch, *signp; {
double tmp;
if (fract)
exponent(p, exp, fmtch)
register char *p;
register int exp;
- u_char fmtch;
-{
+ u_char fmtch; {
register char *t;
char expbuf[MAXEXP];
_doscan(iop, fmt, ap)
FILE *iop;
register char *fmt;
-register va_list ap;
-{
+register va_list ap; {
register int ch;
int nmatch, len, ch1;
int *ptr, fileended, size;
static
_innum(ptr, type, len, size, iop, eofptr)
int *ptr, *eofptr;
-FILE *iop;
-{
+FILE *iop; {
extern double atof();
register char *np;
char numbuf[64];
_instr(ptr, type, len, iop, eofptr)
register char *ptr;
register FILE *iop;
-int *eofptr;
-{
+int *eofptr; {
register ch;
register char *optr;
int ignstp;
static char *
_getccl(s)
-register unsigned char *s;
-{
+register unsigned char *s; {
register c, t;
t = 0;
#endif LIBC_SCCS and not lint
exit(code)
- int code;
-{
+ int code; {
_cleanup();
_exit(code);
FILE *
fdopen(fd, mode)
- register char *mode;
-{
+ register char *mode; {
extern FILE *_findiop();
static int nofile = -1;
register FILE *iop;
#include <stdio.h>
fgetc(fp)
-FILE *fp;
-{
+FILE *fp; {
return(getc(fp));
}
-#include <stdio.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)fgets.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
char *
fgets(s, n, iop)
char *s;
-register FILE *iop;
-{
+register FILE *iop; {
register c;
register char *cs;
-#include <stdio.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
char *malloc();
_filbuf(iop)
-register FILE *iop;
-{
+register FILE *iop; {
int size;
struct stat stbuf;
extern char *_smallbuf;
-#include <sys/errno.h>
/*
* Copyright (c) 1983, 1985 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* the old and new FILE entries, which are then no longer contiguous.
*/
FILE *
-_findiop()
-{
+_findiop() {
register FILE **iov, *iop;
register FILE *fp;
return (*iov);
}
-_f_morefiles()
-{
+_f_morefiles() {
register FILE **iov;
register FILE *fp;
register char *cp;
return (1);
}
-f_prealloc()
-{
+f_prealloc() {
register FILE **iov;
register FILE *fp;
}
_fwalk(function)
- register int (*function)();
-{
+ register int (*function)(); {
register FILE **iov;
register FILE *fp;
}
}
-_cleanup()
-{
+_cleanup() {
extern int fclose();
_fwalk(fclose);
-#include <stdio.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
_flsbuf(c, iop)
unsigned char c;
-register FILE *iop;
-{
+register FILE *iop; {
register char *base;
register n, rn;
char c1;
}
fflush(iop)
-register FILE *iop;
-{
+register FILE *iop; {
register char *base;
register n;
}
fclose(iop)
- register FILE *iop;
-{
+ register FILE *iop; {
register int r;
r = EOF;
-#include <fcntl.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
FILE *
fopen(file, mode)
char *file;
- register char *mode;
-{
+ register char *mode; {
register FILE *iop;
register f, rw, oflags;
extern FILE *_findiop();
fprintf(iop, fmt, va_alist)
register FILE *iop;
char *fmt;
- va_dcl
-{
+ va_dcl {
va_list ap;
int len;
char localbuf[BUFSIZ];
#include <stdio.h>
fputc(c, fp)
-register FILE *fp;
-{
+register FILE *fp; {
return(putc(c, fp));
}
-#include <stdio.h>
/*
* Copyright (c) 1984 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
fputs(s, iop)
register char *s;
-register FILE *iop;
-{
+register FILE *iop; {
register r = 0;
register c;
int unbuffered;
-#include <stdio.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
fread(ptr, size, count, iop)
register char *ptr;
unsigned size, count;
- register FILE *iop;
-{
+ register FILE *iop; {
register int s;
int c;
-#include <fcntl.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
freopen(file, mode, iop)
char *file;
register char *mode;
- register FILE *iop;
-{
+ register FILE *iop; {
register f, rw, oflags;
rw = (mode[1] == '+');
-#include <stdio.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)fseek.c 5.3 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
fseek(iop, offset, ptrname)
register FILE *iop;
- long offset;
-{
+ long offset; {
register resync, c;
long p = -1; /* can't happen? */
-#include <stdio.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)ftell.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
long ftell(iop)
-register FILE *iop;
-{
+register FILE *iop; {
register long tres;
register adjust;
-#include <stdio.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
fwrite(ptr, size, count, iop)
register char *ptr;
unsigned size, count;
- register FILE *iop;
-{
+ register FILE *iop; {
register int s;
s = size * count;
#undef getchar
-getchar()
-{
+getchar() {
return(getc(stdin));
}
-#include <stdio.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)gets.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
char *
gets(s)
-char *s;
-{
+char *s; {
register c;
register char *cs;
#include <stdio.h>
getw(iop)
-register FILE *iop;
-{
+register FILE *iop; {
register i;
register char *p;
int w;
-#include <sys/signal.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
FILE *
popen(cmd,mode)
char *cmd;
- char *mode;
-{
+ char *mode; {
int p[2];
int myside, hisside, pid;
}
pclose(ptr)
- FILE *ptr;
-{
+ FILE *ptr; {
int child, pid, status, omask;
child = popen_pid[fileno(ptr)];
printf(fmt, va_alist)
char *fmt;
- va_dcl
-{
+ va_dcl {
va_list ap;
int len;
#undef putchar
putchar(c)
-register c;
-{
+register c; {
putc(c, stdout);
}
-#include <stdio.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)puts.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
#include <stdio.h>
puts(s)
-register char *s;
-{
+register char *s; {
register c;
while (c = *s++)
#include <stdio.h>
putw(w, iop)
-register FILE *iop;
-{
+register FILE *iop; {
register char *p;
register i;
-#include <stdio.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)rew.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
#include <stdio.h>
rewind(iop)
-register FILE *iop;
-{
+register FILE *iop; {
fflush(iop);
lseek(fileno(iop), 0L, 0);
iop->_cnt = 0;
scanf(fmt, va_alist)
char *fmt;
-va_dcl
-{
+va_dcl {
va_list ap;
int len;
fscanf(iop, fmt, va_alist)
FILE *iop;
char *fmt;
-va_dcl
-{
+va_dcl {
va_list ap;
int len;
sscanf(str, fmt, va_alist)
register char *str;
char *fmt;
-va_dcl
-{
+va_dcl {
FILE _strbuf;
va_list ap;
int len;
-#include <stdio.h>
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
setbuf(iop, buf)
register FILE *iop;
-char *buf;
-{
+char *buf; {
if (iop->_base != NULL && iop->_flag&_IOMYBUF)
free(iop->_base);
iop->_flag &= ~(_IOMYBUF|_IONBF|_IOLBF);
-#include <stdio.h>
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
setbuffer(iop, buf, size)
register FILE *iop;
char *buf;
- int size;
-{
+ int size; {
if (iop->_base != NULL && iop->_flag&_IOMYBUF)
free(iop->_base);
iop->_flag &= ~(_IOMYBUF|_IONBF|_IOLBF);
* set line buffering for either stdout or stderr
*/
setlinebuf(iop)
- register FILE *iop;
-{
+ register FILE *iop; {
char *buf;
extern char *malloc();
sprintf(str, fmt, va_alist)
char *str, *fmt;
- va_dcl
-{
+ va_dcl {
va_list ap;
FILE _strbuf;
int len;
-#include <stdio.h>
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)strout.c 5.2 (Berkeley) 3/9/86";
#endif LIBC_SCCS and not lint
register char *string;
register count;
int adjust;
-register FILE *file;
-{
+register FILE *file; {
while (adjust < 0) {
if (*string=='-' && fillch=='0') {
putc(*string++, file);
#include <stdio.h>
ungetc(c, iop)
- register FILE *iop;
-{
+ register FILE *iop; {
if (c == EOF || (iop->_flag & (_IOREAD|_IORW)) == 0 ||
iop->_ptr == NULL || iop->_base == NULL)
return (EOF);
vfprintf(iop, fmt, ap)
FILE *iop;
char *fmt;
- va_list ap;
-{
+ va_list ap; {
int len;
char localbuf[BUFSIZ];
int
vprintf(fmt, ap)
char *fmt;
- va_list ap;
-{
+ va_list ap; {
int len;
len = _doprnt(fmt, ap, stdout);
int
vsprintf(str, fmt, ap)
char *str, *fmt;
- va_list ap;
-{
+ va_list ap; {
FILE f;
int len;
*/
typedef u_short comp_t;
-struct acct
-{
+struct acct {
char ac_comm[10]; /* Accounting command name */
comp_t ac_utime; /* Accounting user time */
comp_t ac_stime; /* Accounting system time */
* We only need three words for these, so this abbreviated
* definition saves some space.
*/
-struct bufhd
-{
+struct bufhd {
long b_flags; /* see defines below */
struct buf *b_forw, *b_back; /* fwd/bkwd pointer in chain */
};
-struct buf
-{
+struct buf {
long b_flags; /* too much goes here to describe */
struct buf *b_forw, *b_back; /* hash chain (2 way street) */
struct buf *av_forw, *av_back; /* position on free list if not BUSY */
* (below) must be changed to long.
*/
#ifndef LOCORE
-struct cmap
-{
+struct cmap {
unsigned short c_next, /* index of next free list entry */
c_prev, /* index of previous free list entry */
c_hlink; /* hash link for <blkno,mdev> */
* device switches is in the
* file conf.c.
*/
-struct bdevsw
-{
+struct bdevsw {
int (*d_open)();
int (*d_close)();
int (*d_strategy)();
/*
* Character device switch.
*/
-struct cdevsw
-{
+struct cdevsw {
int (*d_open)();
int (*d_close)();
int (*d_read)();
/*
* tty line control switch.
*/
-struct linesw
-{
+struct linesw {
int (*l_open)();
int (*l_close)();
int (*l_read)();
/*
* Swap device information
*/
-struct swdevt
-{
+struct swdevt {
dev_t sw_dev;
int sw_freed;
int sw_nblks;
#define NDMAP 38 /* size of the swap area map */
-struct dmap
-{
+struct dmap {
swblk_t dm_size; /* current size used by process */
swblk_t dm_alloc; /* amount of physical swap space allocated */
swblk_t dm_map[NDMAP]; /* first disk block number in each chunk */
* The following structure is that ``returned''
* from a call to vstodb().
*/
-struct dblock
-{
+struct dblock {
swblk_t db_base; /* base of physical contig drum block */
swblk_t db_size; /* size of block */
};
* Super block for a file system.
*/
#define FS_MAGIC 0x011954
-struct fs
-{
+struct fs {
struct fs *fs_link; /* linked list of file systems */
struct fs *fs_rlink; /* used for incore super blocks */
daddr_t fs_sblkno; /* addr of super-block in filesys */
+#include <sys/stat.h>
int fstat(f, b) struct stat *b; {
abort();
}
struct inode **if_freeb; /* free list back */
} i_fr;
} i_un;
- struct icommon
- {
+ struct icommon {
u_short ic_mode; /* 0: mode and type of file */
short ic_nlink; /* 2: number of links to file */
uid_t ic_uid; /* 4: owner's user id */
+#include <sys/stat.h>
int lstat(s, b) char *s; struct stat *b; {
abort();
}
char *m_name; /* name of resource */
/* we use m_name when the map overflows, in warning messages */
};
-struct mapent
-{
+struct mapent {
int m_size; /* size of this segment of the map */
int m_addr; /* resource-space addr of start of segment */
};
* One allocated on every mount.
* Used to find the super block.
*/
-struct mount
-{
+struct mount {
dev_t m_dev; /* device mounted */
struct buf *m_bufp; /* pointer to superblock */
struct inode *m_inodp; /* pointer to mounted on inode */
+#include <sys/stat.h>
int stat(s, b) char *s; struct stat *b; {
abort();
}
* @(#)stat.h 7.1 (Berkeley) 6/4/86
*/
-struct stat
-{
+struct stat {
dev_t st_dev;
ino_t st_ino;
unsigned short st_mode;
/*
* Structure of the system-entry table
*/
-extern struct sysent
-{
+extern struct sysent {
int sy_narg; /* total number of arguments */
int (*sy_call)(); /* handler */
} sysent[];
*/
#define NXDAD 12 /* param.h:MAXTSIZ / vmparam.h:DMTEXT */
-struct text
-{
+struct text {
struct text *x_forw; /* forward link in free list */
struct text **x_back; /* backward link in free list */
swblk_t x_daddr[NXDAD]; /* disk addresses of dmtext-page segments */
/*
* Structure returned by ftime system call
*/
-struct timeb
-{
+struct timeb {
time_t time;
unsigned short millitm;
short timezone;
/*
* Virtual memory related instrumentation
*/
-struct vmmeter
-{
+struct vmmeter {
#define v_first v_swtch
unsigned v_swtch; /* context switches */
unsigned v_trap; /* calls to trap */
#endif
/* systemwide totals computed every five seconds */
-struct vmtotal
-{
+struct vmtotal {
short t_rq; /* length of the run queue */
short t_dw; /* jobs in ``disk wait'' (neg priority) */
short t_pw; /* jobs in page wait */
/*
* Fork/vfork accounting.
*/
-struct forkstat
-{
+struct forkstat {
int cntfork;
int cntvfork;
int sizfork;
/*
* Swap kind accounting.
*/
-struct swptstat
-{
+struct swptstat {
int pteasy; /* easy pt swaps */
int ptexpand; /* pt expansion swaps */
int ptshrink; /* pt shrinking swaps */
#define IOA8600(i) ((caddr_t)(0x20080000+IOASIZE*i))
#ifndef LOCORE
-struct sbia_regs
-{
+struct sbia_regs {
int sbi_cfg;
int sbi_csr;
int sbi_errsum;
* VAX process control block
*/
-struct pcb
-{
+struct pcb {
int pcb_ksp; /* kernel stack pointer */
int pcb_esp; /* exec stack pointer */
int pcb_ssp; /* supervisor stack pointer */
*/
#ifndef LOCORE
-struct pte
-{
+struct pte {
unsigned int pg_pfnum:21, /* core page frame number or 0 */
:2,
pg_vreadm:1, /* modified since vread (or with _m) */
pg_prot:4, /* access control */
pg_v:1; /* valid bit */
};
-struct hpte
-{
+struct hpte {
unsigned int pg_pfnum:21,
:2,
pg_high:9; /* special for clustering */
};
-struct fpte
-{
+struct fpte {
unsigned int pg_blkno:24, /* file system block number */
pg_fileno:1, /* file mapped from or TEXT or ZERO */
pg_fod:1, /* is fill on demand (=1) */
* @(#)hpreg.h 7.1 (Berkeley) 6/5/86
*/
-struct hpdevice
-{
+struct hpdevice {
int hpcs1; /* control and status register 1 */
int hpds; /* drive status */
int hper1; /* error register 1 */
* @(#)htreg.h 7.1 (Berkeley) 6/5/86
*/
-struct htdevice
-{
+struct htdevice {
int htcs1; /* control status register */
int htds; /* drive status register */
int hter; /* error register */
* VAX MASSBUS adapter registers
*/
-struct mba_regs
-{
+struct mba_regs {
int mba_csr; /* configuration register */
int mba_cr; /* control register */
int mba_sr; /* status register */
#define NRB80TRK 14 /* RB80 tracks/cylinder */
#define NRB80CYL 559 /* RB80 cylinders/disk */
-struct idcdevice
-{
+struct idcdevice {
int idccsr; /* control status register */
int idcbar; /* bus address register */
int idcbcr; /* byte count register */
#define NRKSECT 22
#define NRKTRK 3
-struct rkdevice
-{
+struct rkdevice {
short rkcs1; /* control status reg 1 */
short rkwc; /* word count */
u_short rkba; /* bus address */
/*
* UBA hardware registers
*/
-struct uba_regs
-{
+struct uba_regs {
int uba_cnfgr; /* configuration register */
int uba_cr; /* control register */
int uba_sr; /* status register */
* registers and bits.
*/
-struct updevice
-{
+struct updevice {
u_short upcs1; /* control and status register 1 */
short upwc; /* word count register */
u_short upba; /* UNIBUS address register */