diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-06-25 21:19:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-06-25 21:19:20 +0000 |
commit | f201158bc7b302f2c64efddd072ac22b68b40f3e (patch) | |
tree | f3bbd42ca7dcff9d89a686b79eeeb57e3235954c /usr.bin | |
parent | 0eaf6d68ac8f221cb85f67e548786a59fcc8e2f1 (diff) |
protos
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/fold/fold.c | 8 | ||||
-rw-r--r-- | usr.bin/fsplit/fsplit.c | 33 | ||||
-rw-r--r-- | usr.bin/fstat/fstat.c | 7 | ||||
-rw-r--r-- | usr.bin/ruptime/ruptime.c | 30 | ||||
-rw-r--r-- | usr.bin/vmstat/vmstat.c | 6 |
5 files changed, 47 insertions, 37 deletions
diff --git a/usr.bin/fold/fold.c b/usr.bin/fold/fold.c index b1a909a6ed2..6619f577642 100644 --- a/usr.bin/fold/fold.c +++ b/usr.bin/fold/fold.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fold.c,v 1.8 2003/06/10 22:20:46 deraadt Exp $ */ +/* $OpenBSD: fold.c,v 1.9 2003/06/25 21:19:19 deraadt Exp $ */ /* $NetBSD: fold.c,v 1.6 1995/09/01 01:42:44 jtc Exp $ */ /*- @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)fold.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: fold.c,v 1.8 2003/06/10 22:20:46 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fold.c,v 1.9 2003/06/25 21:19:19 deraadt Exp $"; #endif /* not lint */ #include <stdio.h> @@ -54,8 +54,8 @@ static char rcsid[] = "$OpenBSD: fold.c,v 1.8 2003/06/10 22:20:46 deraadt Exp $" #define DEFLINEWIDTH 80 -static void fold (); -static int new_column_position (); +static void fold(int); +static int new_column_position(int, int); int count_bytes = 0; int split_words = 0; diff --git a/usr.bin/fsplit/fsplit.c b/usr.bin/fsplit/fsplit.c index 6a12271c747..2e6872480f9 100644 --- a/usr.bin/fsplit/fsplit.c +++ b/usr.bin/fsplit/fsplit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsplit.c,v 1.13 2003/06/10 22:20:46 deraadt Exp $ */ +/* $OpenBSD: fsplit.c,v 1.14 2003/06/25 21:19:19 deraadt Exp $ */ /* * Copyright (c) 1983, 1993 @@ -40,7 +40,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)fsplit.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: fsplit.c,v 1.13 2003/06/10 22:20:46 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fsplit.c,v 1.14 2003/06/25 21:19:19 deraadt Exp $"; #endif /* not lint */ #include <ctype.h> @@ -90,7 +90,7 @@ int saveit(char *); char buf[BSZ]; FILE *ifp; char x[] = "zzz000.f", mainp[] = "main000.f", blkp[] = "blkdta000.f"; -char *look(), *skiplab(), *functs(); +char *look(char *, char *), *skiplab(char *), *functs(char *); #define TRUE 1 #define FALSE 0 @@ -282,6 +282,7 @@ getline(void) warnx("line truncated to %d characters", BSZ); return (1); } + /* return 1 for 'end' alone on card (up to col. 72), 0 otherwise */ int lend(void) @@ -307,10 +308,12 @@ lend(void) return (1); return (0); } -/* check for keywords for subprograms - return 0 if comment card, 1 if found - name and put in arg string. invent name for unnamed - block datas and main programs. */ + +/* check for keywords for subprograms + * return 0 if comment card, 1 if found + * name and put in arg string. invent name for unnamed + * block datas and main programs. + */ int lname(char *s, size_t len) { @@ -416,9 +419,12 @@ functs(char *p) } else return (0); } -/* if first 6 col. blank, return ptr to col. 7, - if blanks and then tab, return ptr after tab, - else return 0 (labelled statement, comment or continuation */ + +/* + * if first 6 col. blank, return ptr to col. 7, + * if blanks and then tab, return ptr after tab, + * else return 0 (labelled statement, comment or continuation + */ char * skiplab(char *p) { @@ -435,8 +441,11 @@ skiplab(char *p) } return (ptr); } -/* return 0 if m doesn't match initial part of s; - otherwise return ptr to next char after m in s */ + +/* + * return 0 if m doesn't match initial part of s; + * otherwise return ptr to next char after m in s + */ char * look(char *s, char *m) { diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 1b9c7470c3d..e4d4dd8c0f3 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstat.c,v 1.44 2003/06/10 22:20:46 deraadt Exp $ */ +/* $OpenBSD: fstat.c,v 1.45 2003/06/25 21:19:19 deraadt Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)fstat.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$OpenBSD: fstat.c,v 1.44 2003/06/10 22:20:46 deraadt Exp $"; +static char *rcsid = "$OpenBSD: fstat.c,v 1.45 2003/06/25 21:19:19 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -313,7 +313,6 @@ dofiles(struct kinfo_proc *kp) #define filed filed0.fd_fd struct proc *p = &kp->kp_proc; struct eproc *ep = &kp->kp_eproc; - extern char *user_from_uid(); Uname = user_from_uid(ep->e_ucred.cr_uid, 0); Pid = p->p_pid; @@ -399,7 +398,7 @@ vtrans(struct vnode *vp, int i, int flag, off_t offset) struct vnode vn; struct filestat fst; char rw[3], mode[17]; - char *badtype = NULL, *filename, *getmnton(); + char *badtype = NULL, *filename, *getmnton(struct mount *); filename = badtype = NULL; if (!KVM_READ(vp, &vn, sizeof (struct vnode))) { diff --git a/usr.bin/ruptime/ruptime.c b/usr.bin/ruptime/ruptime.c index b26c5875ae2..67028650da5 100644 --- a/usr.bin/ruptime/ruptime.c +++ b/usr.bin/ruptime/ruptime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ruptime.c,v 1.10 2003/06/10 22:20:50 deraadt Exp $ */ +/* $OpenBSD: ruptime.c,v 1.11 2003/06/25 21:18:47 deraadt Exp $ */ /* * Copyright (c) 1983 The Regents of the University of California. @@ -37,7 +37,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)ruptime.c 5.8 (Berkeley) 7/21/90";*/ -static char rcsid[] = "$OpenBSD: ruptime.c,v 1.10 2003/06/10 22:20:50 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ruptime.c,v 1.11 2003/06/25 21:18:47 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -62,7 +62,10 @@ struct whod awhod; time_t now; int rflg = 1; -int hscmp(), ucmp(), lcmp(), tcmp(); +int hscmp(const void *, const void *); +int ucmp(const void *, const void *); +int lcmp(const void *, const void *); +int tcmp(const void *, const void *); void morehosts(void); @@ -78,9 +81,8 @@ main(int argc, char *argv[]) struct dirent *dp; int aflg, cc, ch, f, i, maxloadav; char buf[sizeof(struct whod)]; - int (*cmp)() = hscmp; - time_t time(); - char *interval(); + int (*cmp)(const void *, const void *) = hscmp; + char *interval(time_t, char *); aflg = 0; while ((ch = getopt(argc, argv, "alrut")) != -1) @@ -199,18 +201,18 @@ interval(time_t tval, char *updown) /* alphabetical comparison */ int -hscmp(void *a1, void *a2) +hscmp(const void *a1, const void *a2) { - struct hs *h1 = a1, *h2 = a2; + const struct hs *h1 = a1, *h2 = a2; return(rflg * strcmp(h1->hs_wd->wd_hostname, h2->hs_wd->wd_hostname)); } /* load average comparison */ int -lcmp(void *a1, void *a2) +lcmp(const void *a1, const void *a2) { - struct hs *h1 = a1, *h2 = a2; + const struct hs *h1 = a1, *h2 = a2; if (ISDOWN(h1)) if (ISDOWN(h2)) @@ -226,9 +228,9 @@ lcmp(void *a1, void *a2) /* number of users comparison */ int -ucmp(void *a1, void *a2) +ucmp(const void *a1, const void *a2) { - struct hs *h1 = a1, *h2 = a2; + const struct hs *h1 = a1, *h2 = a2; if (ISDOWN(h1)) if (ISDOWN(h2)) @@ -243,9 +245,9 @@ ucmp(void *a1, void *a2) /* uptime comparison */ int -tcmp(void *a1, void *a2) +tcmp(const void *a1, const void *a2) { - struct hs *h1 = a1, *h2 = a2; + const struct hs *h1 = a1, *h2 = a2; return(rflg * ( (ISDOWN(h2) ? h2->hs_wd->wd_recvtime - now diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 0096420bb51..03ccd416bc2 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1,5 +1,5 @@ /* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */ -/* $OpenBSD: vmstat.c,v 1.77 2003/06/03 02:56:22 millert Exp $ */ +/* $OpenBSD: vmstat.c,v 1.78 2003/06/25 21:18:08 deraadt Exp $ */ /* * Copyright (c) 1980, 1986, 1991, 1993 @@ -363,7 +363,7 @@ dovmstat(u_int interval, int reps) { struct vmtotal total; time_t uptime, halfuptime; - void needhdr(); + void needhdr(int); int mib[2]; struct clockinfo clkinfo; size_t size; @@ -465,7 +465,7 @@ printhdr(void) * Force a header to be prepended to the next output. */ void -needhdr(void) +needhdr(int signo) { hdrcnt = 1; |