From 74637cb20ab7a2e4876ccd7d35080bab410e65b8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 25 Jun 2003 21:08:59 +0000 Subject: [PATCH] protos --- bin/csh/csh.h | 4 ++-- bin/csh/extern.h | 4 ++-- bin/csh/func.c | 7 +++---- bin/csh/glob.c | 6 +++--- bin/ps/keyword.c | 6 +++--- bin/test/test.c | 18 +++++++++--------- lib/libc/crypt/bcrypt.c | 4 +++- lib/libc/crypt/md5crypt.c | 6 ++++-- lib/libc/gen/getgrouplist.c | 3 ++- lib/libc/gen/getpwent.c | 3 ++- lib/libc/gen/glob.c | 6 +++--- lib/libc/gen/login_cap.c | 3 ++- lib/libc/gen/nlist.c | 10 +++++++++- lib/libc/gen/telldir.c | 4 +++- lib/libc/gen/timezone.c | 4 ++-- lib/libc/gmon/gmon.c | 6 ++++-- libexec/getty/main.c | 9 +++------ libexec/tftpd/tftpd.c | 14 +++++++------- usr.bin/asa/asa.c | 6 +++--- usr.bin/checknr/checknr.c | 8 ++++---- usr.bin/fold/fold.c | 8 ++++---- usr.bin/fsplit/fsplit.c | 33 +++++++++++++++++++++------------ usr.bin/fstat/fstat.c | 7 +++---- usr.bin/rpcgen/rpc_parse.c | 4 ++-- usr.bin/rpcgen/rpc_parse.h | 4 ++-- usr.bin/rpcgen/rpc_util.c | 5 ++--- usr.bin/rpcgen/rpc_util.h | 6 +++--- usr.bin/ruptime/ruptime.c | 30 ++++++++++++++++-------------- usr.bin/tftp/main.c | 8 ++++---- usr.bin/vmstat/vmstat.c | 6 +++--- usr.sbin/config/ukc.h | 6 +++--- usr.sbin/rtsold/rtsold.c | 12 +++++------- usr.sbin/spray/spray.c | 17 ++++++----------- 33 files changed, 147 insertions(+), 130 deletions(-) diff --git a/bin/csh/csh.h b/bin/csh/csh.h index 08d69dd39b8..4579013a152 100644 --- a/bin/csh/csh.h +++ b/bin/csh/csh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: csh.h,v 1.14 2003/06/11 21:09:50 deraadt Exp $ */ +/* $OpenBSD: csh.h,v 1.15 2003/06/25 21:12:39 deraadt Exp $ */ /* $NetBSD: csh.h,v 1.9 1995/03/21 09:02:40 cgd Exp $ */ /*- @@ -419,7 +419,7 @@ struct varent { #define v_right v_link[1] #define v_parent v_link[2] -struct varent *adrof1(); +struct varent *adrof1(Char *, struct varent *); #define adrof(v) adrof1(v, &shvhed) #define value(v) value1(v, &shvhed) diff --git a/bin/csh/extern.h b/bin/csh/extern.h index bac05844ef7..7a89b977a24 100644 --- a/bin/csh/extern.h +++ b/bin/csh/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.13 2003/06/23 16:42:15 deraadt Exp $ */ +/* $OpenBSD: extern.h,v 1.14 2003/06/25 21:12:39 deraadt Exp $ */ /* $NetBSD: extern.h,v 1.8 1996/10/31 23:50:54 christos Exp $ */ /*- @@ -158,7 +158,7 @@ Char *globone(Char *, int); int Gmatch(Char *, Char *); void ginit(void); Char **globall(Char **); -void rscan(Char **, void (*)()); +void rscan(Char **, void (*)(int)); void tglob(Char **); void trim(Char **); #ifdef FILEC diff --git a/bin/csh/func.c b/bin/csh/func.c index df814cb414a..b23f0437e00 100644 --- a/bin/csh/func.c +++ b/bin/csh/func.c @@ -1,4 +1,4 @@ -/* $OpenBSD: func.c,v 1.19 2003/06/23 16:42:15 deraadt Exp $ */ +/* $OpenBSD: func.c,v 1.20 2003/06/25 21:12:39 deraadt Exp $ */ /* $NetBSD: func.c,v 1.11 1996/02/09 02:28:29 christos Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: func.c,v 1.19 2003/06/23 16:42:15 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: func.c,v 1.20 2003/06/25 21:12:39 deraadt Exp $"; #endif #endif /* not lint */ @@ -1148,7 +1148,6 @@ static RLIM_TYPE getval(struct limits *lp, Char **v) { float f; - double atof(); Char *cp = *v++; f = atof(short2str(cp)); @@ -1301,7 +1300,7 @@ dosuspend(Char **v, struct command *t) { int ctpgrp; - void (*old) (); + void (*old) (int); if (loginsh) stderror(ERR_SUSPLOG); diff --git a/bin/csh/glob.c b/bin/csh/glob.c index d3c5fad1756..c886c699994 100644 --- a/bin/csh/glob.c +++ b/bin/csh/glob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: glob.c,v 1.11 2003/06/11 21:09:50 deraadt Exp $ */ +/* $OpenBSD: glob.c,v 1.12 2003/06/25 21:12:39 deraadt Exp $ */ /* $NetBSD: glob.c,v 1.10 1995/03/21 09:03:01 cgd Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)glob.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: glob.c,v 1.11 2003/06/11 21:09:50 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: glob.c,v 1.12 2003/06/25 21:12:39 deraadt Exp $"; #endif #endif /* not lint */ @@ -522,7 +522,7 @@ ginit(void) } void -rscan(Char **t, void (*f)()) +rscan(Char **t, void (*f)(int)) { Char *p; diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 882d3af1d1f..7200e77cf4f 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keyword.c,v 1.18 2003/06/11 23:42:12 deraadt Exp $ */ +/* $OpenBSD: keyword.c,v 1.19 2003/06/25 21:12:45 deraadt Exp $ */ /* $NetBSD: keyword.c,v 1.12.6.1 1996/05/30 21:25:13 cgd Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: keyword.c,v 1.18 2003/06/11 23:42:12 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: keyword.c,v 1.19 2003/06/25 21:12:45 deraadt Exp $"; #endif #endif /* not lint */ @@ -245,7 +245,7 @@ findvar(char *p) { VAR *v, key; char *hp; - int vcmp(); + int vcmp(const void *, const void *); key.name = p; diff --git a/bin/test/test.c b/bin/test/test.c index a3c301e69b5..932fdba0ee9 100644 --- a/bin/test/test.c +++ b/bin/test/test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test.c,v 1.7 2002/07/04 04:26:40 deraadt Exp $ */ +/* $OpenBSD: test.c,v 1.8 2003/06/25 21:12:50 deraadt Exp $ */ /* $NetBSD: test.c,v 1.15 1995/03/21 07:04:06 cgd Exp $ */ /* @@ -12,7 +12,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: test.c,v 1.7 2002/07/04 04:26:40 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: test.c,v 1.8 2003/06/25 21:12:50 deraadt Exp $"; #endif #include @@ -142,7 +142,7 @@ struct t_op { char **t_wp; struct t_op const *t_wp_op; -static enum token t_lex(); +static enum token t_lex(char *); static int oexpr(enum token n); static int aexpr(enum token n); static int nexpr(enum token n); @@ -150,9 +150,9 @@ static int binop(void); static int primary(enum token n); static int filstat(char *nm, enum token mode); static int getn(const char *s); -static int newerf(); -static int olderf(); -static int equalf(); +static int newerf(const char *, const char *); +static int olderf(const char *, const char *); +static int equalf(const char *, const char *); static void syntax(const char *op, char *msg); int @@ -450,7 +450,7 @@ getn(const char *s) } static int -newerf(char *f1, char *f2) +newerf(const char *f1, const char *f2) { struct stat b1, b2; @@ -460,7 +460,7 @@ newerf(char *f1, char *f2) } static int -olderf(char *f1, char *f2) +olderf(const char *f1, const char *f2) { struct stat b1, b2; @@ -470,7 +470,7 @@ olderf(char *f1, char *f2) } static int -equalf(char *f1, char *f2) +equalf(const char *f1, const char *f2) { struct stat b1, b2; diff --git a/lib/libc/crypt/bcrypt.c b/lib/libc/crypt/bcrypt.c index dec0093dd8c..35959d1fc44 100644 --- a/lib/libc/crypt/bcrypt.c +++ b/lib/libc/crypt/bcrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcrypt.c,v 1.16 2002/02/19 19:39:36 millert Exp $ */ +/* $OpenBSD: bcrypt.c,v 1.17 2003/06/25 21:16:47 deraadt Exp $ */ /* * Copyright 1997 Niels Provos @@ -172,6 +172,8 @@ bcrypt_gensalt(u_int8_t log_rounds) /* We handle $Vers$log2(NumRounds)$salt+passwd$ i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */ +char *bcrypt(const char *key, const char *salt); + char * bcrypt(key, salt) const char *key; diff --git a/lib/libc/crypt/md5crypt.c b/lib/libc/crypt/md5crypt.c index 048858494c2..fb09b375e60 100644 --- a/lib/libc/crypt/md5crypt.c +++ b/lib/libc/crypt/md5crypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md5crypt.c,v 1.11 2003/04/02 20:35:29 millert Exp $ */ +/* $OpenBSD: md5crypt.c,v 1.12 2003/06/25 21:16:47 deraadt Exp $ */ /* * ---------------------------------------------------------------------------- @@ -13,7 +13,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.11 2003/04/02 20:35:29 millert Exp $"; +static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.12 2003/06/25 21:16:47 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -45,6 +45,8 @@ to64(s, v, n) * Use MD5 for what it is best at... */ +char *md5crypt(const char *pw, const char *salt); + char * md5crypt(pw, salt) register const char *pw; diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index fe74b0c3b75..70119e05a3a 100644 --- a/lib/libc/gen/getgrouplist.c +++ b/lib/libc/gen/getgrouplist.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.8 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.9 2003/06/25 21:16:47 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -36,6 +36,7 @@ static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.8 2003/06/02 20:18:34 miller */ #include #include +#include #include int diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index ee14e8016d0..fafe24a9ed7 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -29,7 +29,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getpwent.c,v 1.30 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: getpwent.c,v 1.31 2003/06/25 21:16:47 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -79,6 +79,7 @@ static int __ypexclude_add(const char *); static int __ypexclude_is(const char *); static void __ypexclude_free(void); static void __ypproto_set(void); +static int __ypparse(struct passwd *pw, char *s); /* macro for deciding which YP maps to use. */ #define PASSWD_BYNAME \ diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index ec491759751..cd1438d218a 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; #else -static char rcsid[] = "$OpenBSD: glob.c,v 1.21 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: glob.c,v 1.22 2003/06/25 21:16:47 deraadt Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -601,7 +601,7 @@ glob3(pathbuf, pathbuf_last, pathend, pathend_last, pattern, pattern_last, * and dirent.h as taking pointers to differently typed opaque * structures. */ - struct dirent *(*readdirfunc)(); + struct dirent *(*readdirfunc)(void *); if (pathend > pathend_last) return (1); @@ -626,7 +626,7 @@ glob3(pathbuf, pathbuf_last, pathend, pathend_last, pattern, pattern_last, if (pglob->gl_flags & GLOB_ALTDIRFUNC) readdirfunc = pglob->gl_readdir; else - readdirfunc = readdir; + readdirfunc = (struct dirent *(*)(void *))readdir; while ((dp = (*readdirfunc)(dirp))) { register u_char *sc; register Char *dc; diff --git a/lib/libc/gen/login_cap.c b/lib/libc/gen/login_cap.c index 53d965c6717..31d7ba9f672 100644 --- a/lib/libc/gen/login_cap.c +++ b/lib/libc/gen/login_cap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login_cap.c,v 1.16 2003/03/31 15:47:03 millert Exp $ */ +/* $OpenBSD: login_cap.c,v 1.17 2003/06/25 21:16:47 deraadt Exp $ */ /*- * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved. @@ -57,6 +57,7 @@ static int setuserpath(login_cap_t *, char *); static u_quad_t multiply(u_quad_t, u_quad_t); static u_quad_t strtolimit(char *, char **, int); static u_quad_t strtosize(char *, char **, int); +static int gsetrl(login_cap_t *lc, int what, char *name, int type); login_cap_t * login_getclass(class) diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 220e9d2731b..f143916d883 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: nlist.c,v 1.44 2003/06/02 20:18:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: nlist.c,v 1.45 2003/06/25 21:16:47 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -53,6 +53,14 @@ static char rcsid[] = "$OpenBSD: nlist.c,v 1.44 2003/06/02 20:18:34 millert Exp #include #endif +int __fdnlist(int, struct nlist *); +int __aout_fdnlist(int, struct nlist *); +int __ecoff_fdnlist(int, struct nlist *); +int __elf_fdnlist(int, struct nlist *); +#ifdef _NLIST_DO_ELF +int __elf_is_okay__(register Elf_Ehdr *ehdr); +#endif + #define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0) #ifdef _NLIST_DO_AOUT diff --git a/lib/libc/gen/telldir.c b/lib/libc/gen/telldir.c index 405f6c1a6cf..c8ded8c56f2 100644 --- a/lib/libc/gen/telldir.c +++ b/lib/libc/gen/telldir.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: telldir.c,v 1.3 2003/06/02 20:18:35 millert Exp $"; +static char rcsid[] = "$OpenBSD: telldir.c,v 1.4 2003/06/25 21:16:47 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -62,6 +62,8 @@ struct ddloc { static long dd_loccnt; /* Index of entry for sequential readdir's */ static struct ddloc *dd_hash[NDIRHASH]; /* Hash list heads for ddlocs */ +void __seekdir(DIR *, long); + /* * return a pointer into a directory */ diff --git a/lib/libc/gen/timezone.c b/lib/libc/gen/timezone.c index 8af63278454..1f6c9e5d37d 100644 --- a/lib/libc/gen/timezone.c +++ b/lib/libc/gen/timezone.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: timezone.c,v 1.6 2003/06/02 20:18:35 millert Exp $"; +static char rcsid[] = "$OpenBSD: timezone.c,v 1.7 2003/06/25 21:16:47 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -38,7 +38,7 @@ static char rcsid[] = "$OpenBSD: timezone.c,v 1.6 2003/06/02 20:18:35 millert Ex #include #include -char *_tztab(); +char *_tztab(int, int); /* * timezone -- diff --git a/lib/libc/gmon/gmon.c b/lib/libc/gmon/gmon.c index c76d508dbf9..4628b1f3198 100644 --- a/lib/libc/gmon/gmon.c +++ b/lib/libc/gmon/gmon.c @@ -28,7 +28,7 @@ */ #if !defined(lint) && defined(LIBC_SCCS) -static char rcsid[] = "$OpenBSD: gmon.c,v 1.15 2003/06/02 20:18:35 millert Exp $"; +static char rcsid[] = "$OpenBSD: gmon.c,v 1.16 2003/06/25 21:16:47 deraadt Exp $"; #endif #include @@ -55,6 +55,8 @@ static int s_scale; void moncontrol(int); static int hertz(void); +void monstartup(u_long lowpc, u_long highpc); +void _mcleanup(void); void monstartup(lowpc, highpc) @@ -122,7 +124,7 @@ monstartup(lowpc, highpc) } void -_mcleanup() +_mcleanup(void) { int fd; int fromindex; diff --git a/libexec/getty/main.c b/libexec/getty/main.c index 420e0990d64..d66e58ea8c9 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.25 2003/06/02 19:38:24 millert Exp $ */ +/* $OpenBSD: main.c,v 1.26 2003/06/25 21:11:10 deraadt Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -37,7 +37,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/ -static char rcsid[] = "$OpenBSD: main.c,v 1.25 2003/06/02 19:38:24 millert Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.26 2003/06/25 21:11:10 deraadt Exp $"; #endif /* not lint */ #include @@ -89,8 +89,7 @@ struct utsname kerninfo; char name[MAXLOGNAME]; char dev[] = _PATH_DEV; char ttyn[32]; -char *portselector(); -char *ttyname(); +char *portselector(void); #define OBUFSIZ 128 #define TABBUFSIZ 512 @@ -265,8 +264,6 @@ main(int argc, char *argv[]) exit(1); } if (AB) { - extern char *autobaud(); - tname = autobaud(); continue; } diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index d8ab453c8a5..a25d898e86f 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpd.c,v 1.27 2003/06/02 19:38:25 millert Exp $ */ +/* $OpenBSD: tftpd.c,v 1.28 2003/06/25 21:11:25 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -37,7 +37,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)tftpd.c 5.13 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$OpenBSD: tftpd.c,v 1.27 2003/06/02 19:38:25 millert Exp $"; +static char rcsid[] = "$OpenBSD: tftpd.c,v 1.28 2003/06/25 21:11:25 deraadt Exp $"; #endif /* not lint */ /* @@ -95,9 +95,9 @@ int sendfile(struct formats *pf); struct formats { char *f_mode; - int (*f_validate)(); - int (*f_send)(); - int (*f_recv)(); + int (*f_validate)(char *, int); + int (*f_send)(struct formats *); + int (*f_recv)(struct formats *); int f_convert; } formats[] = { { "netascii", validate_access, sendfile, recvfile, 1 }, @@ -420,7 +420,7 @@ timer(int signo) int sendfile(struct formats *pf) { - struct tftphdr *dp, *r_init(); + struct tftphdr *dp, *r_init(void); struct tftphdr *ap; /* ack packet */ volatile unsigned short block = 1; int size, n; @@ -491,7 +491,7 @@ justquit(int signo) int recvfile(struct formats *pf) { - struct tftphdr *dp, *w_init(); + struct tftphdr *dp, *w_init(void); struct tftphdr *ap; /* ack buffer */ volatile unsigned short block = 0; int n, size; diff --git a/usr.bin/asa/asa.c b/usr.bin/asa/asa.c index 8fa539607d2..854ee908871 100644 --- a/usr.bin/asa/asa.c +++ b/usr.bin/asa/asa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asa.c,v 1.4 2003/06/10 22:20:44 deraadt Exp $ */ +/* $OpenBSD: asa.c,v 1.5 2003/06/25 21:08:59 deraadt Exp $ */ /* $NetBSD: asa.c,v 1.10 1995/04/21 03:01:41 cgd Exp $ */ /* @@ -32,14 +32,14 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: asa.c,v 1.4 2003/06/10 22:20:44 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: asa.c,v 1.5 2003/06/25 21:08:59 deraadt Exp $"; #endif #include #include #include -static void asa(); +static void asa(FILE *); int main(int argc, char *argv[]) diff --git a/usr.bin/checknr/checknr.c b/usr.bin/checknr/checknr.c index 55ea439326d..d42ef90f041 100644 --- a/usr.bin/checknr/checknr.c +++ b/usr.bin/checknr/checknr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: checknr.c,v 1.10 2003/06/10 22:20:45 deraadt Exp $ */ +/* $OpenBSD: checknr.c,v 1.11 2003/06/25 21:09:09 deraadt Exp $ */ /* $NetBSD: checknr.c,v 1.4 1995/03/26 04:10:19 glass Exp $ */ /* @@ -40,7 +40,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)checknr.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: checknr.c,v 1.10 2003/06/10 22:20:45 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: checknr.c,v 1.11 2003/06/25 21:09:09 deraadt Exp $"; #endif #endif /* not lint */ @@ -53,6 +53,8 @@ static char rcsid[] = "$OpenBSD: checknr.c,v 1.10 2003/06/10 22:20:45 deraadt Ex */ #include #include +#include +#include #include #define MAXSTK 100 /* Stack size */ @@ -188,8 +190,6 @@ int sflag; /* -s: ignore \s */ int ncmds; /* size of knowncmds */ int slot; /* slot in knowncmds found by binsrch */ -char *malloc(); - int main(int argc, char *argv[]) { 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 @@ -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 @@ -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 @@ -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/rpcgen/rpc_parse.c b/usr.bin/rpcgen/rpc_parse.c index e815939739e..e6671c24f3b 100644 --- a/usr.bin/rpcgen/rpc_parse.c +++ b/usr.bin/rpcgen/rpc_parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_parse.c,v 1.12 2003/04/26 18:29:51 pvalchev Exp $ */ +/* $OpenBSD: rpc_parse.c,v 1.13 2003/06/25 21:09:26 deraadt Exp $ */ /* $NetBSD: rpc_parse.c,v 1.5 1995/08/29 23:05:55 cgd Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -64,7 +64,7 @@ static void unsigned_dec(char **); * return the next definition you see */ definition * -get_definition() +get_definition(void) { definition *defp; token tok; diff --git a/usr.bin/rpcgen/rpc_parse.h b/usr.bin/rpcgen/rpc_parse.h index 3f3a6aeecd8..0e27817bd24 100644 --- a/usr.bin/rpcgen/rpc_parse.h +++ b/usr.bin/rpcgen/rpc_parse.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_parse.h,v 1.6 2002/07/05 05:39:42 deraadt Exp $ */ +/* $OpenBSD: rpc_parse.h,v 1.7 2003/06/25 21:09:26 deraadt Exp $ */ /* $NetBSD: rpc_parse.h,v 1.3 1995/06/11 21:50:00 pk Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -157,7 +157,7 @@ struct definition { }; typedef struct definition definition; -definition *get_definition(); +definition *get_definition(void); struct bas_type { char *name; diff --git a/usr.bin/rpcgen/rpc_util.c b/usr.bin/rpcgen/rpc_util.c index 528ade2106c..66effcc278f 100644 --- a/usr.bin/rpcgen/rpc_util.c +++ b/usr.bin/rpcgen/rpc_util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_util.c,v 1.10 2002/07/05 05:39:42 deraadt Exp $ */ +/* $OpenBSD: rpc_util.c,v 1.11 2003/06/25 21:09:26 deraadt Exp $ */ /* $NetBSD: rpc_util.c,v 1.6 1995/08/29 23:05:57 cgd Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -96,8 +96,7 @@ definition * findval(lst, val, cmp) list *lst; char *val; - int (*cmp) (); - + int (*cmp) (definition *, char *); { for (; lst != NULL; lst = lst->next) { diff --git a/usr.bin/rpcgen/rpc_util.h b/usr.bin/rpcgen/rpc_util.h index a9cc50f12b2..b03a677fa4d 100644 --- a/usr.bin/rpcgen/rpc_util.h +++ b/usr.bin/rpcgen/rpc_util.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_util.h,v 1.11 2002/07/05 05:39:42 deraadt Exp $ */ +/* $OpenBSD: rpc_util.h,v 1.12 2003/06/25 21:09:26 deraadt Exp $ */ /* $NetBSD: rpc_util.h,v 1.3 1995/06/11 21:50:10 pk Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -91,12 +91,12 @@ extern int nonfatalerrors; /* * rpc_util routines */ -void storeval(); +void storeval(list **, definition *); #define STOREVAL(list,item) \ storeval(list,item) -definition *findval(); +definition *findval(list *, char *, int (*)(definition *, char *)); #define FINDVAL(list,item,finder) \ findval(list, item, finder) 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 @@ -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/tftp/main.c b/usr.bin/tftp/main.c index db8c273732a..45f06c6fbf7 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.15 2003/06/25 15:45:10 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.16 2003/06/25 21:09:37 deraadt Exp $ */ /* $NetBSD: main.c,v 1.6 1995/05/21 16:54:10 mycroft Exp $ */ /* @@ -40,7 +40,7 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = "$OpenBSD: main.c,v 1.15 2003/06/25 15:45:10 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: main.c,v 1.16 2003/06/25 21:09:37 deraadt Exp $"; #endif /* not lint */ /* Many bug fixes are from Jim Guyton */ @@ -85,7 +85,7 @@ int margc; char *margv[MAXARGV+1]; char *prompt = "tftp"; jmp_buf toplevel; -void intr(); +void intr(int); struct servent *sp; void get(int, char **); @@ -539,7 +539,7 @@ status(int argc, char *argv[]) } void -intr(void) +intr(int signo) { signal(SIGALRM, SIG_IGN); 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; diff --git a/usr.sbin/config/ukc.h b/usr.sbin/config/ukc.h index 6435af30d12..b47897475cb 100644 --- a/usr.sbin/config/ukc.h +++ b/usr.sbin/config/ukc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ukc.h,v 1.10 2003/06/02 21:19:03 maja Exp $ */ +/* $OpenBSD: ukc.h,v 1.11 2003/06/25 21:10:12 deraadt Exp $ */ /* * Copyright (c) 1999-2001 Mats O Jansson. All rights reserved. @@ -134,7 +134,7 @@ int *get_extraloc(int); char *get_pdevnames(int); struct pdevinit *get_pdevinit(int); -int more(); +int more(void); void pnum(int); void pdevnam(short); void pdev(short); @@ -153,7 +153,7 @@ void common_attr(char *, int, char); void add_read(char *, char, char *, int, int *); void add(char *, int, short, short); -int config(); +int config(void); void process_history(int, char *); #define UC_CHANGE 'c' diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c index 87150bd6abc..901d4132be2 100644 --- a/usr.sbin/rtsold/rtsold.c +++ b/usr.sbin/rtsold/rtsold.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsold.c,v 1.29 2003/05/15 14:40:53 itojun Exp $ */ +/* $OpenBSD: rtsold.c,v 1.30 2003/06/25 21:10:33 deraadt Exp $ */ /* $KAME: rtsold.c,v 1.57 2002/09/20 21:59:55 itojun Exp $ */ /* @@ -104,9 +104,7 @@ static void rtsold_set_dump_file(int); static void usage(char *); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { int s, ch, once = 0; struct timeval *timeout; @@ -437,7 +435,7 @@ bad: } void -iflist_init() +iflist_init(void) { struct ifinfo *ifi, *next; @@ -528,7 +526,7 @@ make_packet(struct ifinfo *ifinfo) } static struct timeval * -rtsol_check_timer() +rtsol_check_timer(void) { static struct timeval returnval; struct timeval now, rtsol_timer; @@ -781,7 +779,7 @@ warnmsg(int priority, const char *func, const char *msg, ...) * return a list of interfaces which is suitable to sending an RS. */ char ** -autoifprobe() +autoifprobe(void) { static char **argv = NULL; static int n = 0; diff --git a/usr.sbin/spray/spray.c b/usr.sbin/spray/spray.c index a3050e2baad..f030d77e6bc 100644 --- a/usr.sbin/spray/spray.c +++ b/usr.sbin/spray/spray.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: spray.c,v 1.3 2002/06/02 06:42:29 deraadt Exp $ + * $Id: spray.c,v 1.4 2003/06/25 21:10:19 deraadt Exp $ */ #include @@ -41,8 +41,8 @@ #define SPRAYOVERHEAD 86 #endif -void usage (); -void print_xferstats (); +void usage(); +void print_xferstats(int, int, double); /* spray buffer */ char spray_buffer[SPRAYMAX]; @@ -53,9 +53,7 @@ struct timeval ONE_WAY = { 0, 0 }; struct timeval TIMEOUT = { 25, 0 }; int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { char *progname; spraycumul host_stats; @@ -190,10 +188,7 @@ main(argc, argv) void -print_xferstats(packets, packetlen, xfertime) - int packets; - int packetlen; - double xfertime; +print_xferstats(int packets, int packetlen, double xfertime) { int datalen; double pps; /* packets per second */ @@ -215,7 +210,7 @@ print_xferstats(packets, packetlen, xfertime) void -usage () +usage(void) { fprintf(stderr, "usage: spray [-c count] [-l length] [-d delay] host\n"); exit(1);