summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorjfb <jfb@openbsd.org>2004-05-18 02:05:52 +0000
committerjfb <jfb@openbsd.org>2004-05-18 02:05:52 +0000
commit73b3e3c43784cb5fd04439d34c7436bbf85871db (patch)
tree71c634a881a5350ce76151ea76da19a38936af3a /lib/libc
parentsync, libiberty bump, binutils changes (non-split info pages, mmalloc gone) (diff)
downloadwireguard-openbsd-73b3e3c43784cb5fd04439d34c7436bbf85871db.tar.xz
wireguard-openbsd-73b3e3c43784cb5fd04439d34c7436bbf85871db.zip
ansify function definitions and zap some `register'
ok millert@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/alloca.c3
-rw-r--r--lib/libc/gen/elf_hash.c5
-rw-r--r--lib/libc/gen/fnmatch.c8
-rw-r--r--lib/libc/gen/fstab.c19
-rw-r--r--lib/libc/gen/getcap.c60
-rw-r--r--lib/libc/gen/getgrent.c55
-rw-r--r--lib/libc/gen/getgrouplist.c8
-rw-r--r--lib/libc/gen/gethostname.c6
-rw-r--r--lib/libc/gen/getmntinfo.c6
-rw-r--r--lib/libc/gen/getnetgrent.c94
-rw-r--r--lib/libc/gen/getpagesize.c4
-rw-r--r--lib/libc/gen/getpwent.c37
-rw-r--r--lib/libc/gen/getttyent.c17
-rw-r--r--lib/libc/gen/getusershell.c10
-rw-r--r--lib/libc/gen/glob.c90
-rw-r--r--lib/libc/gen/initgroups.c6
-rw-r--r--lib/libc/gen/isctype.c50
-rw-r--r--lib/libc/gen/login_cap.c76
-rw-r--r--lib/libc/gen/nlist.c25
-rw-r--r--lib/libc/gen/opendir.c9
-rw-r--r--lib/libc/gen/pause.c6
-rw-r--r--lib/libc/gen/popen.c9
-rw-r--r--lib/libc/gen/psignal.c6
-rw-r--r--lib/libc/gen/pwcache.c10
-rw-r--r--lib/libc/gen/raise.c5
-rw-r--r--lib/libc/gen/readdir.c10
-rw-r--r--lib/libc/gen/rewinddir.c5
-rw-r--r--lib/libc/gen/scandir.c13
-rw-r--r--lib/libc/gen/seekdir.c6
-rw-r--r--lib/libc/gen/setjmperr.c4
-rw-r--r--lib/libc/gen/setmode.c19
-rw-r--r--lib/libc/gen/siginterrupt.c5
-rw-r--r--lib/libc/gen/sigsetops.c20
-rw-r--r--lib/libc/gen/sleep.c5
-rw-r--r--lib/libc/gen/strtofflags.c11
-rw-r--r--lib/libc/gen/sysconf.c5
-rw-r--r--lib/libc/gen/sysctl.c11
-rw-r--r--lib/libc/gen/syslog.c40
-rw-r--r--lib/libc/gen/telldir.c9
-rw-r--r--lib/libc/gen/times.c5
-rw-r--r--lib/libc/gen/timezone.c10
-rw-r--r--lib/libc/gen/tolower_.c5
-rw-r--r--lib/libc/gen/toupper_.c5
-rw-r--r--lib/libc/gen/ttyname.c13
-rw-r--r--lib/libc/gen/ttyslot.c4
-rw-r--r--lib/libc/gen/ualarm.c6
-rw-r--r--lib/libc/gen/uname.c5
-rw-r--r--lib/libc/gen/unvis.c6
-rw-r--r--lib/libc/gen/usleep.c5
-rw-r--r--lib/libc/gen/utime.c6
-rw-r--r--lib/libc/gen/valloc.c5
-rw-r--r--lib/libc/gen/verr.c7
-rw-r--r--lib/libc/gen/verrx.c7
-rw-r--r--lib/libc/gen/vis.c24
-rw-r--r--lib/libc/gen/vwarn.c6
-rw-r--r--lib/libc/gen/vwarnx.c6
-rw-r--r--lib/libc/gen/wait.c5
-rw-r--r--lib/libc/gen/wait3.c7
58 files changed, 282 insertions, 642 deletions
diff --git a/lib/libc/gen/alloca.c b/lib/libc/gen/alloca.c
index 41b38c00050..f9baf138a36 100644
--- a/lib/libc/gen/alloca.c
+++ b/lib/libc/gen/alloca.c
@@ -80,8 +80,7 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
implementations of C, for example under Gould's UTX/32. */
pointer
-alloca (size)
- unsigned size;
+alloca (size_t size)
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
diff --git a/lib/libc/gen/elf_hash.c b/lib/libc/gen/elf_hash.c
index ece43adb857..37fa411e5c9 100644
--- a/lib/libc/gen/elf_hash.c
+++ b/lib/libc/gen/elf_hash.c
@@ -26,7 +26,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: elf_hash.c,v 1.5 1997/07/01 05:53:29 millert Exp $";
+static char rcsid[] = "$OpenBSD: elf_hash.c,v 1.6 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -49,8 +49,7 @@ static char rcsid[] = "$OpenBSD: elf_hash.c,v 1.5 1997/07/01 05:53:29 millert Ex
* HASH TABLES WILL BE GENERATED!
*/
unsigned int
-elf_hash(name)
- const unsigned char *name;
+elf_hash(const unsigned char *name)
{
register unsigned int h = 0, g;
diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c
index 7895ad5e187..d41944ad82f 100644
--- a/lib/libc/gen/fnmatch.c
+++ b/lib/libc/gen/fnmatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fnmatch.c,v 1.10 2003/06/02 20:18:34 millert Exp $ */
+/* $OpenBSD: fnmatch.c,v 1.11 2004/05/18 02:05:52 jfb Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -36,7 +36,7 @@
#if 0
static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
#else
-static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.10 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.11 2004/05/18 02:05:52 jfb Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -59,9 +59,7 @@ static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.10 2003/06/02 20:18:34 millert Ex
static int rangematch(const char *, char, int, char **);
int
-fnmatch(pattern, string, flags)
- const char *pattern, *string;
- int flags;
+fnmatch(const char *pattern, const char *string, int flags)
{
const char *stringstart;
char *newp;
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c
index 80e7b4681ee..102201047bd 100644
--- a/lib/libc/gen/fstab.c
+++ b/lib/libc/gen/fstab.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: fstab.c,v 1.12 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: fstab.c,v 1.13 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -50,7 +50,7 @@ static void error(int);
static int fstabscan(void);
static int
-fstabscan()
+fstabscan(void)
{
register char *cp;
#define MAXLINELENGTH 1024
@@ -160,7 +160,7 @@ bad: /* no way to distinguish between EOF and syntax error */
}
struct fstab *
-getfsent()
+getfsent(void)
{
if ((!_fs_fp && !setfsent()) || !fstabscan())
return(NULL);
@@ -168,8 +168,7 @@ getfsent()
}
struct fstab *
-getfsspec(name)
- register const char *name;
+getfsspec(const char *name)
{
if (setfsent())
while (fstabscan())
@@ -179,8 +178,7 @@ getfsspec(name)
}
struct fstab *
-getfsfile(name)
- register const char *name;
+getfsfile(const char *name)
{
if (setfsent())
while (fstabscan())
@@ -190,7 +188,7 @@ getfsfile(name)
}
int
-setfsent()
+setfsent(void)
{
struct stat sbuf;
@@ -215,7 +213,7 @@ fail:
}
void
-endfsent()
+endfsent(void)
{
if (_fs_fp) {
(void)fclose(_fs_fp);
@@ -224,8 +222,7 @@ endfsent()
}
static void
-error(err)
- int err;
+error(int err)
{
struct iovec iov[5];
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c
index 7d896769bb1..38b5172a1d8 100644
--- a/lib/libc/gen/getcap.c
+++ b/lib/libc/gen/getcap.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$OpenBSD: getcap.c,v 1.21 2003/06/02 20:18:34 millert Exp $";
+static const char rcsid[] = "$OpenBSD: getcap.c,v 1.22 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -72,8 +72,7 @@ static int usedb = 1;
* text version. By default, the getcap(3) routines will use a .db file.
*/
int
-cgetusedb(new_usedb)
- int new_usedb;
+cgetusedb(int new_usedb)
{
int old_usedb = usedb;
@@ -87,8 +86,7 @@ cgetusedb(new_usedb)
* virtual database. 0 is returned on success, -1 on failure.
*/
int
-cgetset(ent)
- const char *ent;
+cgetset(const char *ent)
{
if (ent == NULL) {
if (toprec)
@@ -118,10 +116,7 @@ cgetset(ent)
* return NULL.
*/
char *
-cgetcap(buf, cap, type)
- char *buf;
- const char *cap;
- int type;
+cgetcap(char *buf, const char *cap, int type)
{
char *bp;
const char *cp;
@@ -172,9 +167,7 @@ cgetcap(buf, cap, type)
* reference loop is detected.
*/
int
-cgetent(buf, db_array, name)
- char **buf, **db_array;
- const char *name;
+cgetent(char **buf, char **db_array, const char *name)
{
u_int dummy;
@@ -200,11 +193,8 @@ cgetent(buf, db_array, name)
* MAX_RECURSION.
*/
static int
-getent(cap, len, db_array, fd, name, depth, nfield)
- char **cap, **db_array, *nfield;
- const char *name;
- u_int *len;
- int fd, depth;
+getent(char **cap, u_int *len, char **db_array, int fd,
+ const char *name, int depth, char *nfield)
{
DB *capdbp;
char *r_end, *rp, **db_p;
@@ -566,10 +556,7 @@ tc_exp: {
}
static int
-cdbget(capdbp, bp, name)
- DB *capdbp;
- char **bp;
- const char *name;
+cdbget(DB *capdbp, char **bp, const char *name)
{
DBT key, data;
@@ -602,9 +589,7 @@ cdbget(capdbp, bp, name)
* record buf, -1 if not.
*/
int
-cgetmatch(buf, name)
- char *buf;
- const char *name;
+cgetmatch(char *buf, const char *name)
{
char *bp;
const char *np;
@@ -642,8 +627,7 @@ cgetmatch(buf, name)
}
int
-cgetfirst(buf, db_array)
- char **buf, **db_array;
+cgetfirst(char **buf, char **db_array)
{
(void)cgetclose();
@@ -655,7 +639,7 @@ static int slash;
static char **dbp;
int
-cgetclose()
+cgetclose(void)
{
if (pfp != NULL) {
@@ -674,9 +658,7 @@ cgetclose()
* upon returning an entry with more remaining, and -1 if an error occurs.
*/
int
-cgetnext(bp, db_array)
- char **bp;
- char **db_array;
+cgetnext(char **bp, char **db_array)
{
size_t len;
int status, done;
@@ -805,10 +787,7 @@ cgetnext(bp, db_array)
* allocation failure).
*/
int
-cgetstr(buf, cap, str)
- char *buf;
- const char *cap;
- char **str;
+cgetstr(char *buf, const char *cap, char **str)
{
u_int m_room;
char *bp, *mp;
@@ -941,9 +920,7 @@ cgetstr(buf, cap, str)
* error was encountered (storage allocation failure).
*/
int
-cgetustr(buf, cap, str)
- char *buf, **str;
- const char *cap;
+cgetustr(char *buf, const char *cap, char **str)
{
u_int m_room;
char *bp, *mp;
@@ -1021,10 +998,7 @@ cgetustr(buf, cap, str)
* numeric capability couldn't be found.
*/
int
-cgetnum(buf, cap, num)
- char *buf;
- const char *cap;
- long *num;
+cgetnum(char *buf, const char *cap, long *num)
{
long n;
int base, digit;
@@ -1085,9 +1059,7 @@ cgetnum(buf, cap, num)
* Compare name field of record.
*/
static int
-nfcmp(nf, rec)
- const char *nf;
- char *rec;
+nfcmp(const char *nf, char *rec)
{
char *cp, tmp;
int ret;
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c
index bd432fc9897..1d157d679e2 100644
--- a/lib/libc/gen/getgrent.c
+++ b/lib/libc/gen/getgrent.c
@@ -29,7 +29,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getgrent.c,v 1.19 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: getgrent.c,v 1.20 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -80,7 +80,7 @@ static int __ypcurrentlen;
#endif
struct group *
-getgrent()
+getgrent(void)
{
struct group *p_gr = (struct group*)_THREAD_PRIVATE(gr, _gr_group, NULL);
struct group_storage *gs = (struct group_storage *)_THREAD_PRIVATE(gr_storage,
@@ -94,10 +94,7 @@ getgrent()
}
static struct group *
-getgrnam_gs(name, p_gr, gs)
- const char *name;
- struct group *p_gr;
- struct group_storage *gs;
+getgrnam_gs(const char *name, struct group *p_gr, struct group_storage *gs)
{
int rval;
@@ -114,8 +111,7 @@ getgrnam_gs(name, p_gr, gs)
}
struct group *
-getgrnam(name)
- const char *name;
+getgrnam(const char *name)
{
struct group *p_gr = (struct group*)_THREAD_PRIVATE(gr,_gr_group,NULL);
struct group_storage *gs = (struct group_storage *)_THREAD_PRIVATE(gr_storage,
@@ -125,12 +121,8 @@ getgrnam(name)
}
int
-getgrnam_r(name, grp, buffer, bufsize, result)
- const char *name;
- struct group *grp;
- char *buffer;
- size_t bufsize;
- struct group **result;
+getgrnam_r(const char *name, struct group *grp, char *buffer,
+ size_t bufsize, struct group **result)
{
int errnosave;
int ret;
@@ -148,10 +140,7 @@ getgrnam_r(name, grp, buffer, bufsize, result)
}
static struct group *
-getgrgid_gs(gid, p_gr, gs)
- gid_t gid;
- struct group *p_gr;
- struct group_storage *gs;
+getgrgid_gs(gid_t gid, struct group *p_gr, struct group_storage *gs)
{
int rval;
@@ -168,8 +157,7 @@ getgrgid_gs(gid, p_gr, gs)
}
struct group *
-getgrgid(gid)
- gid_t gid;
+getgrgid(gid_t gid)
{
struct group *p_gr = (struct group*)_THREAD_PRIVATE(gr, _gr_group, NULL);
struct group_storage *gs = (struct group_storage *)_THREAD_PRIVATE(gr_storage,
@@ -179,12 +167,8 @@ getgrgid(gid)
}
int
-getgrgid_r(gid, grp, buffer, bufsize, result)
- gid_t gid;
- struct group *grp;
- char *buffer;
- size_t bufsize;
- struct group **result;
+getgrgid_r(gid_t gid, struct group *grp, char *buffer, size_t bufsize,
+ struct group **result)
{
int errnosave;
int ret;
@@ -202,7 +186,7 @@ getgrgid_r(gid, grp, buffer, bufsize, result)
}
static int
-start_gr()
+start_gr(void)
{
if (_gr_fp) {
rewind(_gr_fp);
@@ -218,14 +202,13 @@ start_gr()
}
void
-setgrent()
+setgrent(void)
{
(void) setgroupent(0);
}
int
-setgroupent(stayopen)
- int stayopen;
+setgroupent(int stayopen)
{
int retval;
@@ -242,7 +225,7 @@ setgroupent(stayopen)
static
void
-endgrent_basic()
+endgrent_basic(void)
{
if (_gr_fp) {
(void)fclose(_gr_fp);
@@ -257,7 +240,7 @@ endgrent_basic()
}
void
-endgrent()
+endgrent(void)
{
_THREAD_PRIVATE_MUTEX_LOCK(gr);
endgrent_basic();
@@ -265,12 +248,8 @@ endgrent()
}
static int
-grscan(search, gid, name, p_gr, gs)
- register int search;
- register gid_t gid;
- register const char *name;
- struct group *p_gr;
- struct group_storage *gs;
+grscan(int search, gid_t gid, const char *name, struct group *p_gr,
+ struct group_storage *gs)
{
register char *cp, **m;
char *bp, *endp;
diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c
index 70119e05a3a..27214a2664e 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.9 2003/06/25 21:16:47 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.10 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -40,11 +40,7 @@ static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.9 2003/06/25 21:16:47 deraad
#include <grp.h>
int
-getgrouplist(uname, agroup, groups, grpcnt)
- const char *uname;
- gid_t agroup;
- register gid_t *groups;
- int *grpcnt;
+getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
{
register struct group *grp;
register int i, ngroups;
diff --git a/lib/libc/gen/gethostname.c b/lib/libc/gen/gethostname.c
index 9dc16b0c876..1a8015b52d7 100644
--- a/lib/libc/gen/gethostname.c
+++ b/lib/libc/gen/gethostname.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: gethostname.c,v 1.5 2003/06/25 21:15:04 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: gethostname.c,v 1.6 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -36,9 +36,7 @@ static char rcsid[] = "$OpenBSD: gethostname.c,v 1.5 2003/06/25 21:15:04 deraadt
#include <unistd.h>
int
-gethostname(name, namelen)
- char *name;
- size_t namelen;
+gethostname(char *name, size_t namelen)
{
int mib[2];
size_t size;
diff --git a/lib/libc/gen/getmntinfo.c b/lib/libc/gen/getmntinfo.c
index 283abe1e503..746b4835439 100644
--- a/lib/libc/gen/getmntinfo.c
+++ b/lib/libc/gen/getmntinfo.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getmntinfo.c,v 1.5 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: getmntinfo.c,v 1.6 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -39,9 +39,7 @@ static char rcsid[] = "$OpenBSD: getmntinfo.c,v 1.5 2003/06/02 20:18:34 millert
* Return information about mounted filesystems.
*/
int
-getmntinfo(mntbufp, flags)
- struct statfs **mntbufp;
- int flags;
+getmntinfo(struct statfs **mntbufp, int flags)
{
static struct statfs *mntbuf;
static int mntsize;
diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c
index 73cd0818a43..51a04a5c9c9 100644
--- a/lib/libc/gen/getnetgrent.c
+++ b/lib/libc/gen/getnetgrent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getnetgrent.c,v 1.14 2003/09/29 15:52:28 deraadt Exp $ */
+/* $OpenBSD: getnetgrent.c,v 1.15 2004/05/18 02:05:52 jfb Exp $ */
/*
* Copyright (c) 1994 Christos Zoulas
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: getnetgrent.c,v 1.14 2003/09/29 15:52:28 deraadt Exp $";
+static char *rcsid = "$OpenBSD: getnetgrent.c,v 1.15 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -85,7 +85,7 @@ static int in_lookup(const char *, const char *,
* _ng_sl_init(): Initialize a string list
*/
struct stringlist *
-_ng_sl_init()
+_ng_sl_init(void)
{
struct stringlist *sl = malloc(sizeof(struct stringlist));
if (sl == NULL)
@@ -104,9 +104,7 @@ _ng_sl_init()
* _ng_sl_add(): Add an item to the string list
*/
void
-_ng_sl_add(sl, name)
- struct stringlist *sl;
- char *name;
+_ng_sl_add(struct stringlist *sl, char *name)
{
if (sl->sl_cur == sl->sl_max - 1) {
char **slstr;
@@ -129,9 +127,7 @@ _ng_sl_add(sl, name)
* _ng_sl_free(): Free a stringlist
*/
void
-_ng_sl_free(sl, all)
- struct stringlist *sl;
- int all;
+_ng_sl_free(struct stringlist *sl, int all)
{
size_t i;
@@ -147,9 +143,7 @@ _ng_sl_free(sl, all)
* sl_find(): Find a name in the string list
*/
char *
-_ng_sl_find(sl, name)
- struct stringlist *sl;
- char *name;
+_ng_sl_find(struct stringlist *sl, char *name)
{
size_t i;
@@ -166,10 +160,7 @@ _ng_sl_find(sl, name)
* trailing blanks and advancing the pointer
*/
static int
-getstring(pp, del, str)
- char **pp;
- int del;
- char **str;
+getstring(char **pp, int del, char **str)
{
char *sp, *ep, *dp;
@@ -211,8 +202,7 @@ getstring(pp, del, str)
* getnetgroup(): Parse a netgroup, and advance the pointer
*/
static struct netgroup *
-getnetgroup(pp)
- char **pp;
+getnetgroup(char **pp)
{
struct netgroup *ng = malloc(sizeof(struct netgroup));
@@ -255,11 +245,7 @@ badhost:
* in *line; returns 1 if key was found, 0 otherwise
*/
static int
-lookup(ypdom, name, line, bywhat)
- const char *ypdom;
- char *name;
- char **line;
- int bywhat;
+lookup(const char *ypdom, char *name, char **line, int bywhat)
{
#ifdef YP
int i;
@@ -328,10 +314,7 @@ lookup(ypdom, name, line, bywhat)
* Public since used by netgroup_mkdb
*/
int
-_ng_parse(p, name, ng)
- char **p;
- char **name;
- struct netgroup **ng;
+_ng_parse(char **p, char **name, struct netgroup **ng)
{
while (**p) {
if (**p == '#')
@@ -373,10 +356,7 @@ _ng_parse(p, name, ng)
* addgroup(): Recursively add all the members of the netgroup to this group
*/
static void
-addgroup(ypdom, sl, grp)
- char *ypdom;
- struct stringlist *sl;
- char *grp;
+addgroup(char *ypdom, struct stringlist *sl, char *grp)
{
char *line, *p;
struct netgroup *ng;
@@ -429,11 +409,8 @@ addgroup(ypdom, sl, grp)
* in_check(): Compare the spec with the netgroup
*/
static int
-in_check(host, user, domain, ng)
- const char *host;
- const char *user;
- const char *domain;
- struct netgroup *ng;
+in_check(const char *host, const char *user, const char *domain,
+ struct netgroup *ng)
{
if ((host != NULL) && (ng->ng_host != NULL) &&
strcmp(ng->ng_host, host) != 0)
@@ -455,13 +432,8 @@ in_check(host, user, domain, ng)
* in_find(): Find a match for the host, user, domain spec
*/
static int
-in_find(ypdom, sl, grp, host, user, domain)
- char *ypdom;
- struct stringlist *sl;
- char *grp;
- const char *host;
- const char *user;
- const char *domain;
+in_find(char *ypdom, struct stringlist *sl, char *grp, const char *host,
+ const char *user, const char *domain)
{
char *line, *p;
int i;
@@ -529,9 +501,7 @@ in_find(ypdom, sl, grp, host, user, domain)
* <name1>.<name2> Names strings are replaced with * if they are empty;
*/
char *
-_ng_makekey(s1, s2, len)
- const char *s1, *s2;
- size_t len;
+_ng_makekey(const char *s1, const char *s2, size_t len)
{
char *buf = malloc(len);
if (buf == NULL)
@@ -541,10 +511,7 @@ _ng_makekey(s1, s2, len)
}
void
-_ng_print(buf, len, ng)
- char *buf;
- size_t len;
- const struct netgroup *ng;
+_ng_print(char *buf, size_t len, const struct netgroup *ng)
{
(void) snprintf(buf, len, "(%s,%s,%s)", _NG_EMPTY(ng->ng_host),
_NG_EMPTY(ng->ng_user), _NG_EMPTY(ng->ng_domain));
@@ -555,11 +522,7 @@ _ng_print(buf, len, ng)
* in_lookup1(): Fast lookup for a key in the appropriate map
*/
static char *
-in_lookup1(ypdom, key, domain, map)
- const char *ypdom;
- const char *key;
- const char *domain;
- int map;
+in_lookup1(const char *ypdom, const char *key, const char *domain, int map)
{
char *line;
size_t len;
@@ -578,12 +541,8 @@ in_lookup1(ypdom, key, domain, map)
* in_lookup(): Fast lookup for a key in the appropriate map
*/
static int
-in_lookup(ypdom, group, key, domain, map)
- const char *ypdom;
- const char *group;
- const char *key;
- const char *domain;
- int map;
+in_lookup(const char *ypdom, const char *group, const char *key,
+ const char *domain, int map)
{
size_t len;
char *ptr, *line;
@@ -623,7 +582,7 @@ in_lookup(ypdom, group, key, domain, map)
void
-endnetgrent()
+endnetgrent(void)
{
for (_nglist = _nghead; _nglist != NULL; _nglist = _nghead) {
_nghead = _nglist->ng_next;
@@ -644,8 +603,7 @@ endnetgrent()
void
-setnetgrent(ng)
- const char *ng;
+setnetgrent(const char *ng)
{
struct stringlist *sl = _ng_sl_init();
#ifdef YP
@@ -680,10 +638,7 @@ setnetgrent(ng)
int
-getnetgrent(host, user, domain)
- const char **host;
- const char **user;
- const char **domain;
+getnetgrent(const char **host, const char **user, const char **domain)
{
if (_nglist == NULL)
return 0;
@@ -699,8 +654,7 @@ getnetgrent(host, user, domain)
int
-innetgr(grp, host, user, domain)
- const char *grp, *host, *user, *domain;
+innetgr(const char *grp, const char *host, const char *user, const char *domain)
{
char *ypdom = NULL, *grpdup;
#ifdef YP
diff --git a/lib/libc/gen/getpagesize.c b/lib/libc/gen/getpagesize.c
index 20a7fb2f245..c8cecbc1a8f 100644
--- a/lib/libc/gen/getpagesize.c
+++ b/lib/libc/gen/getpagesize.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getpagesize.c,v 1.4 2003/06/25 21:15:04 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: getpagesize.c,v 1.5 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -36,7 +36,7 @@ static char rcsid[] = "$OpenBSD: getpagesize.c,v 1.4 2003/06/25 21:15:04 deraadt
#include <unistd.h>
int
-getpagesize()
+getpagesize(void)
{
static int pagsz;
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index fafe24a9ed7..5b7f68486c1 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.31 2003/06/25 21:16:47 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: getpwent.c,v 1.32 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -97,8 +97,7 @@ static struct _ypexclude *__ypexclude = (struct _ypexclude *)NULL;
* Using DB for this just wastes too damn much memory.
*/
static int
-__ypexclude_add(name)
- const char *name;
+__ypexclude_add(const char *name)
{
struct _ypexclude *new;
@@ -121,8 +120,7 @@ __ypexclude_add(name)
}
static int
-__ypexclude_is(name)
- const char *name;
+__ypexclude_is(const char *name)
{
struct _ypexclude *curr;
@@ -135,7 +133,7 @@ __ypexclude_is(name)
}
static void
-__ypexclude_free()
+__ypexclude_free(void)
{
struct _ypexclude *curr, *next;
@@ -150,7 +148,7 @@ __ypexclude_free()
}
static void
-__ypproto_set()
+__ypproto_set(void)
{
register char *ptr;
register struct passwd *pw = &_pw_passwd;
@@ -227,9 +225,7 @@ __ypproto_set()
}
static int
-__ypparse(pw, s)
-struct passwd *pw;
-char *s;
+__ypparse(struct passwd *pw, char *s)
{
char *bp, *cp, *endp;
u_long ul;
@@ -309,7 +305,7 @@ static int __getpwent_has_yppw = -1;
#endif
struct passwd *
-getpwent()
+getpwent(void)
{
DBT key;
char bf[sizeof(_pw_keynum) + 1];
@@ -492,7 +488,7 @@ again:
* about the token.
*/
static int
-__has_yppw()
+__has_yppw(void)
{
DBT key, data;
DBT pkey, pdata;
@@ -520,7 +516,7 @@ __has_yppw()
* libc code.
*/
static int
-__has_ypmaster()
+__has_ypmaster(void)
{
int keylen, resultlen;
char *key, *result;
@@ -568,8 +564,7 @@ __has_ypmaster()
#endif
struct passwd *
-getpwnam(name)
- const char *name;
+getpwnam(const char *name)
{
DBT key;
int len, rval;
@@ -921,8 +916,7 @@ pwuid_netgrp:
}
int
-setpassent(stayopen)
- int stayopen;
+setpassent(int stayopen)
{
_pw_keynum = 0;
_pw_stayopen = stayopen;
@@ -938,13 +932,13 @@ setpassent(stayopen)
}
void
-setpwent()
+setpwent(void)
{
(void) setpassent(0);
}
void
-endpwent()
+endpwent(void)
{
_pw_keynum = 0;
if (_pw_db) {
@@ -962,7 +956,7 @@ endpwent()
}
static int
-__initdb()
+__initdb(void)
{
static int warned;
@@ -980,8 +974,7 @@ __initdb()
}
static int
-__hashpw(key)
- DBT *key;
+__hashpw(DBT *key)
{
register char *p, *t;
static u_int max;
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c
index c5800611955..3f17a081156 100644
--- a/lib/libc/gen/getttyent.c
+++ b/lib/libc/gen/getttyent.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getttyent.c,v 1.6 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: getttyent.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <ttyent.h>
@@ -43,8 +43,7 @@ static char *skip(char *);
static char *value(char *);
struct ttyent *
-getttynam(tty)
- const char *tty;
+getttynam(const char *tty)
{
register struct ttyent *t;
@@ -57,7 +56,7 @@ getttynam(tty)
}
struct ttyent *
-getttyent()
+getttyent(void)
{
static struct ttyent tty;
register int c;
@@ -138,8 +137,7 @@ getttyent()
* the next field.
*/
static char *
-skip(p)
- register char *p;
+skip(char *p)
{
register char *t;
register int c, q;
@@ -172,15 +170,14 @@ skip(p)
}
static char *
-value(p)
- register char *p;
+value(char *p)
{
return ((p = strchr(p, '=')) ? ++p : NULL);
}
int
-setttyent()
+setttyent(void)
{
if (tf) {
@@ -192,7 +189,7 @@ setttyent()
}
int
-endttyent()
+endttyent(void)
{
int rval;
diff --git a/lib/libc/gen/getusershell.c b/lib/libc/gen/getusershell.c
index 3a54471f48f..135b7856c2c 100644
--- a/lib/libc/gen/getusershell.c
+++ b/lib/libc/gen/getusershell.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getusershell.c,v 1.4 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: getusershell.c,v 1.5 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -53,7 +53,7 @@ static char **initshells(void);
* Get a list of shells from _PATH_SHELLS, if it exists.
*/
char *
-getusershell()
+getusershell(void)
{
char *ret;
@@ -66,7 +66,7 @@ getusershell()
}
void
-endusershell()
+endusershell(void)
{
if (shells != NULL)
@@ -79,14 +79,14 @@ endusershell()
}
void
-setusershell()
+setusershell(void)
{
curshell = initshells();
}
static char **
-initshells()
+initshells(void)
{
register char **sp, *cp;
register FILE *fp;
diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c
index cd1438d218a..e43458e6693 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.22 2003/06/25 21:16:47 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: glob.c,v 1.23 2004/05/18 02:05:52 jfb Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -149,10 +149,8 @@ static void qprintf(const char *, Char *);
#endif
int
-glob(pattern, flags, errfunc, pglob)
- const char *pattern;
- int flags, (*errfunc)(const char *, int);
- glob_t *pglob;
+glob(const char *pattern, int flags, int (*errfunc)(const char *, int),
+ glob_t *pglob)
{
const u_char *patnext;
int c;
@@ -200,9 +198,7 @@ glob(pattern, flags, errfunc, pglob)
* characters
*/
static int
-globexp1(pattern, pglob)
- const Char *pattern;
- glob_t *pglob;
+globexp1(const Char *pattern, glob_t *pglob)
{
const Char* ptr = pattern;
int rv;
@@ -225,10 +221,7 @@ globexp1(pattern, pglob)
* If it fails then it tries to glob the rest of the pattern and returns.
*/
static int
-globexp2(ptr, pattern, pglob, rv)
- const Char *ptr, *pattern;
- glob_t *pglob;
- int *rv;
+globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv)
{
int i;
Char *lm, *ls;
@@ -333,11 +326,7 @@ globexp2(ptr, pattern, pglob, rv)
* expand tilde from the passwd file.
*/
static const Char *
-globtilde(pattern, patbuf, patbuf_len, pglob)
- const Char *pattern;
- Char *patbuf;
- size_t patbuf_len;
- glob_t *pglob;
+globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob)
{
struct passwd *pwd;
char *h;
@@ -402,9 +391,7 @@ globtilde(pattern, patbuf, patbuf_len, pglob)
* to find no matches.
*/
static int
-glob0(pattern, pglob)
- const Char *pattern;
- glob_t *pglob;
+glob0(const Char *pattern, glob_t *pglob)
{
const Char *qpatnext;
int c, err, oldpathc;
@@ -491,17 +478,13 @@ glob0(pattern, pglob)
}
static int
-compare(p, q)
- const void *p, *q;
+compare(const void *p, const void *q)
{
return(strcmp(*(char **)p, *(char **)q));
}
static int
-glob1(pattern, pattern_last, pglob, limitp)
- Char *pattern, *pattern_last;
- glob_t *pglob;
- size_t *limitp;
+glob1(Char *pattern, Char *pattern_last, glob_t *pglob, size_t *limitp)
{
Char pathbuf[MAXPATHLEN];
@@ -519,12 +502,8 @@ glob1(pattern, pattern_last, pglob, limitp)
* meta characters.
*/
static int
-glob2(pathbuf, pathbuf_last, pathend, pathend_last, pattern,
- pattern_last, pglob, limitp)
- Char *pathbuf, *pathbuf_last, *pathend, *pathend_last;
- Char *pattern, *pattern_last;
- glob_t *pglob;
- size_t *limitp;
+glob2(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last,
+ Char *pattern, Char *pattern_last, glob_t *pglob, size_t *limitp)
{
struct stat sb;
Char *p, *q;
@@ -583,12 +562,9 @@ glob2(pathbuf, pathbuf_last, pathend, pathend_last, pattern,
}
static int
-glob3(pathbuf, pathbuf_last, pathend, pathend_last, pattern, pattern_last,
- restpattern, restpattern_last, pglob, limitp)
- Char *pathbuf, *pathbuf_last, *pathend, *pathend_last;
- Char *pattern, *pattern_last, *restpattern, *restpattern_last;
- glob_t *pglob;
- size_t *limitp;
+glob3(Char *pathbuf, Char *pathbuf_last, Char *pathend, Char *pathend_last,
+ Char *pattern, Char *pattern_last, Char *restpattern,
+ Char *restpattern_last, glob_t *pglob, size_t *limitp)
{
register struct dirent *dp;
DIR *dirp;
@@ -677,10 +653,7 @@ glob3(pathbuf, pathbuf_last, pathend, pathend_last, pattern, pattern_last,
* gl_pathv points to (gl_offs + gl_pathc + 1) items.
*/
static int
-globextend(path, pglob, limitp)
- const Char *path;
- glob_t *pglob;
- size_t *limitp;
+globextend(const Char *path, glob_t *pglob, size_t *limitp)
{
register char **pathv;
register int i;
@@ -735,8 +708,7 @@ globextend(path, pglob, limitp)
* pattern causes a recursion level.
*/
static int
-match(name, pat, patend)
- register Char *name, *pat, *patend;
+match(Char *name, Char *pat, Char *patend)
{
int ok, negate_range;
Char c, k;
@@ -784,8 +756,7 @@ match(name, pat, patend)
/* Free allocated data belonging to a glob_t structure. */
void
-globfree(pglob)
- glob_t *pglob;
+globfree(glob_t *pglob)
{
register int i;
register char **pp;
@@ -801,9 +772,7 @@ globfree(pglob)
}
static DIR *
-g_opendir(str, pglob)
- register Char *str;
- glob_t *pglob;
+g_opendir(Char *str, glob_t *pglob)
{
char buf[MAXPATHLEN];
@@ -821,10 +790,7 @@ g_opendir(str, pglob)
}
static int
-g_lstat(fn, sb, pglob)
- register Char *fn;
- struct stat *sb;
- glob_t *pglob;
+g_lstat(Char *fn, struct stat *sb, glob_t *pglob)
{
char buf[MAXPATHLEN];
@@ -836,10 +802,7 @@ g_lstat(fn, sb, pglob)
}
static int
-g_stat(fn, sb, pglob)
- register Char *fn;
- struct stat *sb;
- glob_t *pglob;
+g_stat(Char *fn, struct stat *sb, glob_t *pglob)
{
char buf[MAXPATHLEN];
@@ -851,9 +814,7 @@ g_stat(fn, sb, pglob)
}
static Char *
-g_strchr(str, ch)
- Char *str;
- int ch;
+g_strchr(Char *str, int ch)
{
do {
if (*str == ch)
@@ -863,10 +824,7 @@ g_strchr(str, ch)
}
static int
-g_Ctoc(str, buf, len)
- register const Char *str;
- char *buf;
- u_int len;
+g_Ctoc(const Char *str, char *buf, u_int len)
{
while (len--) {
@@ -878,9 +836,7 @@ g_Ctoc(str, buf, len)
#ifdef DEBUG
static void
-qprintf(str, s)
- const char *str;
- register Char *s;
+qprintf(const char *str, Char *s)
{
register Char *p;
diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c
index 0764dc357b4..07bad81eb64 100644
--- a/lib/libc/gen/initgroups.c
+++ b/lib/libc/gen/initgroups.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: initgroups.c,v 1.6 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: initgroups.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -38,9 +38,7 @@ static char rcsid[] = "$OpenBSD: initgroups.c,v 1.6 2003/06/02 20:18:34 millert
#include <unistd.h>
int
-initgroups(uname, agroup)
- const char *uname;
- gid_t agroup;
+initgroups(const char *uname, gid_t agroup)
{
gid_t groups[NGROUPS];
int ngroups;
diff --git a/lib/libc/gen/isctype.c b/lib/libc/gen/isctype.c
index 5cd9b58602b..74a284ad0a6 100644
--- a/lib/libc/gen/isctype.c
+++ b/lib/libc/gen/isctype.c
@@ -33,7 +33,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: isctype.c,v 1.9 2003/06/10 22:00:31 millert Exp $";
+static char rcsid[] = "$OpenBSD: isctype.c,v 1.10 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#define _ANSI_LIBRARY
@@ -42,128 +42,112 @@ static char rcsid[] = "$OpenBSD: isctype.c,v 1.9 2003/06/10 22:00:31 millert Exp
#undef isalnum
int
-isalnum(c)
- int c;
+isalnum(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_U|_L|_N)));
}
#undef isalpha
int
-isalpha(c)
- int c;
+isalpha(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_U|_L)));
}
#undef isblank
int
-isblank(c)
- int c;
+isblank(int c)
{
return (c == ' ' || c == '\t');
}
#undef iscntrl
int
-iscntrl(c)
- int c;
+iscntrl(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _C));
}
#undef isdigit
int
-isdigit(c)
- int c;
+isdigit(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _N));
}
#undef isgraph
int
-isgraph(c)
- int c;
+isgraph(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_P|_U|_L|_N)));
}
#undef islower
int
-islower(c)
- int c;
+islower(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _L));
}
#undef isprint
int
-isprint(c)
- int c;
+isprint(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_P|_U|_L|_N|_B)));
}
#undef ispunct
int
-ispunct(c)
- int c;
+ispunct(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _P));
}
#undef isspace
int
-isspace(c)
- int c;
+isspace(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _S));
}
#undef isupper
int
-isupper(c)
- int c;
+isupper(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _U));
}
#undef isxdigit
int
-isxdigit(c)
- int c;
+isxdigit(int c)
{
return (c == EOF ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_N|_X)));
}
#undef isascii
int
-isascii(c)
- int c;
+isascii(int c)
{
return ((unsigned int)c <= 0177);
}
#undef toascii
int
-toascii(c)
- int c;
+toascii(int c)
{
return (c & 0177);
}
#undef _toupper
int
-_toupper(c)
- int c;
+_toupper(int c)
{
return (c - 'a' + 'A');
}
#undef _tolower
int
-_tolower(c)
- int c;
+_tolower(int c)
{
return (c - 'A' + 'a');
}
diff --git a/lib/libc/gen/login_cap.c b/lib/libc/gen/login_cap.c
index 4ea1c47739d..240d3dd1bf7 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.19 2004/01/07 01:09:40 fgsch Exp $ */
+/* $OpenBSD: login_cap.c,v 1.20 2004/05/18 02:05:52 jfb Exp $ */
/*-
* Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved.
@@ -60,8 +60,7 @@ 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)
- char *class;
+login_getclass(char *class)
{
char *classfiles[2];
login_cap_t *lc;
@@ -135,10 +134,7 @@ login_getclass(class)
}
char *
-login_getstyle(lc, style, atype)
- login_cap_t *lc;
- char *style;
- char *atype;
+login_getstyle(login_cap_t *lc, char *style, char *atype)
{
char **authtypes = _authtypes;
char *auths, *ta;
@@ -209,11 +205,7 @@ login_getstyle(lc, style, atype)
}
char *
-login_getcapstr(lc, cap, def, e)
- login_cap_t *lc;
- char *cap;
- char *def;
- char *e;
+login_getcapstr(login_cap_t *lc, char *cap, char *def, char *e)
{
char *res, *str;
int stat;
@@ -249,11 +241,7 @@ login_getcapstr(lc, cap, def, e)
}
quad_t
-login_getcaptime(lc, cap, def, e)
- login_cap_t *lc;
- char *cap;
- quad_t def;
- quad_t e;
+login_getcaptime(login_cap_t *lc, char *cap, quad_t def, quad_t e)
{
char *ep;
char *res, *sres;
@@ -341,11 +329,7 @@ invalid:
}
quad_t
-login_getcapnum(lc, cap, def, e)
- login_cap_t *lc;
- char *cap;
- quad_t def;
- quad_t e;
+login_getcapnum(login_cap_t *lc, char *cap, quad_t def, quad_t e)
{
char *ep;
char *res;
@@ -402,11 +386,7 @@ login_getcapnum(lc, cap, def, e)
}
quad_t
-login_getcapsize(lc, cap, def, e)
- login_cap_t *lc;
- char *cap;
- quad_t def;
- quad_t e;
+login_getcapsize(login_cap_t *lc, char *cap, quad_t def, quad_t e)
{
char *ep;
char *res;
@@ -457,10 +437,7 @@ login_getcapsize(lc, cap, def, e)
}
int
-login_getcapbool(lc, cap, def)
- login_cap_t *lc;
- char *cap;
- u_int def;
+login_getcapbool(login_cap_t *lc, char *cap, u_int def)
{
if (!lc->lc_cap)
return (def);
@@ -469,8 +446,7 @@ login_getcapbool(lc, cap, def)
}
void
-login_close(lc)
- login_cap_t *lc;
+login_close(login_cap_t *lc)
{
if (lc) {
if (lc->lc_class)
@@ -505,11 +481,7 @@ static struct {
};
static int
-gsetrl(lc, what, name, type)
- login_cap_t *lc;
- int what;
- char *name;
- int type;
+gsetrl(login_cap_t *lc, int what, char *name, int type)
{
struct rlimit rl;
struct rlimit r;
@@ -585,9 +557,7 @@ gsetrl(lc, what, name, type)
}
int
-setclasscontext(class, flags)
- char *class;
- u_int flags;
+setclasscontext(char *class, u_int flags)
{
int ret;
login_cap_t *lc;
@@ -602,11 +572,7 @@ setclasscontext(class, flags)
}
int
-setusercontext(lc, pwd, uid, flags)
- login_cap_t *lc;
- struct passwd *pwd;
- uid_t uid;
- u_int flags;
+setusercontext(login_cap_t *lc, struct passwd *pwd, uid_t uid, u_int flags)
{
login_cap_t *flc;
quad_t p;
@@ -692,9 +658,7 @@ setusercontext(lc, pwd, uid, flags)
* the PATH environment variable to the result or _PATH_DEFPATH on error.
*/
static int
-setuserpath(lc, home)
- login_cap_t *lc;
- char *home;
+setuserpath(login_cap_t *lc, char *home)
{
size_t psize, n;
char *p, *path, *opath, *dst, *dend, *tmp, last;
@@ -779,10 +743,7 @@ done:
*/
static
u_quad_t
-strtosize(str, endptr, radix)
- char *str;
- char **endptr;
- int radix;
+strtosize(char *str, char **endptr, int radix)
{
u_quad_t num, num2, t;
char *expr, *expr2;
@@ -855,10 +816,7 @@ erange:
static
u_quad_t
-strtolimit(str, endptr, radix)
- char *str;
- char **endptr;
- int radix;
+strtolimit(char *str, char **endptr, int radix)
{
if (strcasecmp(str, "infinity") == 0 || strcasecmp(str, "inf") == 0) {
if (endptr)
@@ -869,9 +827,7 @@ strtolimit(str, endptr, radix)
}
static u_quad_t
-multiply(n1, n2)
- u_quad_t n1;
- u_quad_t n2;
+multiply(u_quad_t n1, u_quad_t n2)
{
static int bpw = 0;
u_quad_t m;
diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c
index c16def262f4..be0e61a8ddc 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.47 2004/01/30 23:14:32 millert Exp $";
+static char rcsid[] = "$OpenBSD: nlist.c,v 1.48 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -65,9 +65,7 @@ int __elf_is_okay__(register Elf_Ehdr *ehdr);
#ifdef _NLIST_DO_AOUT
int
-__aout_fdnlist(fd, list)
- register int fd;
- register struct nlist *list;
+__aout_fdnlist(int fd, struct nlist *list)
{
register struct nlist *p, *s;
register char *strtab;
@@ -173,9 +171,7 @@ aout_done:
#define BADUNMAP do { rv = -1; goto unmap; } while (0)
int
-__ecoff_fdnlist(fd, list)
- register int fd;
- register struct nlist *list;
+__ecoff_fdnlist(int fd, struct nlist *list)
{
struct nlist *p;
struct ecoff_exechdr *exechdrp;
@@ -280,8 +276,7 @@ out:
* as such it's use should be restricted.
*/
int
-__elf_is_okay__(ehdr)
- register Elf_Ehdr *ehdr;
+__elf_is_okay__(Elf_Ehdr *ehdr)
{
register int retval = 0;
/*
@@ -305,9 +300,7 @@ __elf_is_okay__(ehdr)
}
int
-__elf_fdnlist(fd, list)
- register int fd;
- register struct nlist *list;
+__elf_fdnlist(int fd, struct nlist *list)
{
register struct nlist *p;
register caddr_t strtab;
@@ -516,9 +509,7 @@ static struct nlist_handlers {
};
int
-__fdnlist(fd, list)
- register int fd;
- register struct nlist *list;
+__fdnlist(int fd, struct nlist *list)
{
int n = -1, i;
@@ -532,9 +523,7 @@ __fdnlist(fd, list)
int
-nlist(name, list)
- const char *name;
- struct nlist *list;
+nlist(const char *name, struct nlist *list)
{
int fd, n;
diff --git a/lib/libc/gen/opendir.c b/lib/libc/gen/opendir.c
index e68b9cfb9d0..b8d0d3e5c92 100644
--- a/lib/libc/gen/opendir.c
+++ b/lib/libc/gen/opendir.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: opendir.c,v 1.9 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: opendir.c,v 1.10 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -63,17 +63,14 @@ direntcmp(const void *d1, const void *d2)
* Open a directory.
*/
DIR *
-opendir(name)
- const char *name;
+opendir(const char *name)
{
return (__opendir2(name, DTF_HIDEW|DTF_NODUP));
}
DIR *
-__opendir2(name, flags)
- const char *name;
- int flags;
+__opendir2(const char *name, int flags)
{
DIR *dirp;
int fd;
diff --git a/lib/libc/gen/pause.c b/lib/libc/gen/pause.c
index 60167039936..4db649bb4b0 100644
--- a/lib/libc/gen/pause.c
+++ b/lib/libc/gen/pause.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pause.c,v 1.4 2003/06/25 21:15:04 deraadt Exp $ */
+/* $OpenBSD: pause.c,v 1.5 2004/05/18 02:05:52 jfb Exp $ */
/*
* Written by Todd C. Miller <Todd.Miller@courtesan.com>
@@ -6,7 +6,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$OpenBSD: pause.c,v 1.4 2003/06/25 21:15:04 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: pause.c,v 1.5 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <signal.h>
@@ -16,7 +16,7 @@ static const char rcsid[] = "$OpenBSD: pause.c,v 1.4 2003/06/25 21:15:04 deraadt
* Backwards compatible pause(3).
*/
int
-pause()
+pause(void)
{
sigset_t mask;
diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c
index fe1a1b1cb00..a7f848f8ac1 100644
--- a/lib/libc/gen/popen.c
+++ b/lib/libc/gen/popen.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: popen.c,v 1.13 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: popen.c,v 1.14 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -52,9 +52,7 @@ static struct pid {
} *pidlist;
FILE *
-popen(program, type)
- const char *program;
- const char *type;
+popen(const char *program, const char *type)
{
struct pid * volatile cur;
FILE *iop;
@@ -141,8 +139,7 @@ popen(program, type)
* if already `pclosed', or waitpid returns an error.
*/
int
-pclose(iop)
- FILE *iop;
+pclose(FILE *iop)
{
register struct pid *cur, *last;
int pstat;
diff --git a/lib/libc/gen/psignal.c b/lib/libc/gen/psignal.c
index 0d5a5e43bc4..e983958c6be 100644
--- a/lib/libc/gen/psignal.c
+++ b/lib/libc/gen/psignal.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: psignal.c,v 1.5 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: psignal.c,v 1.6 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -45,9 +45,7 @@ static char rcsid[] = "$OpenBSD: psignal.c,v 1.5 2003/06/02 20:18:34 millert Exp
extern char *__strsignal(int , char *);
void
-psignal(sig, s)
- unsigned int sig;
- const char *s;
+psignal(unsigned int sig, const char *s)
{
static char buf[NL_TEXTMAX];
register const char *c;
diff --git a/lib/libc/gen/pwcache.c b/lib/libc/gen/pwcache.c
index 5f6a41ec7a9..78f31ef2302 100644
--- a/lib/libc/gen/pwcache.c
+++ b/lib/libc/gen/pwcache.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: pwcache.c,v 1.6 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: pwcache.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -42,9 +42,7 @@ static char rcsid[] = "$OpenBSD: pwcache.c,v 1.6 2003/06/02 20:18:34 millert Exp
#define MASK (NCACHE - 1) /* bits to store with */
char *
-user_from_uid(uid, nouser)
- uid_t uid;
- int nouser;
+user_from_uid(uid_t uid, int nouser)
{
static struct ncache {
uid_t uid;
@@ -74,9 +72,7 @@ user_from_uid(uid, nouser)
}
char *
-group_from_gid(gid, nogroup)
- gid_t gid;
- int nogroup;
+group_from_gid(gid_t gid, int nogroup)
{
static struct ncache {
gid_t gid;
diff --git a/lib/libc/gen/raise.c b/lib/libc/gen/raise.c
index 8acf4eb3f8a..d62c212ec25 100644
--- a/lib/libc/gen/raise.c
+++ b/lib/libc/gen/raise.c
@@ -28,15 +28,14 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: raise.c,v 1.3 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: raise.c,v 1.4 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <signal.h>
#include <unistd.h>
int
-raise(s)
- int s;
+raise(int s)
{
return(kill(getpid(), s));
}
diff --git a/lib/libc/gen/readdir.c b/lib/libc/gen/readdir.c
index 9033b53df4d..c6049a6f69a 100644
--- a/lib/libc/gen/readdir.c
+++ b/lib/libc/gen/readdir.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: readdir.c,v 1.6 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: readdir.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -41,8 +41,7 @@ static char rcsid[] = "$OpenBSD: readdir.c,v 1.6 2003/06/02 20:18:34 millert Exp
* get next entry in a directory.
*/
struct dirent *
-readdir(dirp)
- register DIR *dirp;
+readdir(DIR *dirp)
{
register struct dirent *dp;
@@ -74,10 +73,7 @@ readdir(dirp)
}
int
-readdir_r(dirp, entry, result)
- DIR *dirp;
- struct dirent *entry;
- struct dirent **result;
+readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
{
struct dirent *dp;
int ret;
diff --git a/lib/libc/gen/rewinddir.c b/lib/libc/gen/rewinddir.c
index 196de02171b..fd53a4fa8d4 100644
--- a/lib/libc/gen/rewinddir.c
+++ b/lib/libc/gen/rewinddir.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: rewinddir.c,v 1.5 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: rewinddir.c,v 1.6 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -37,8 +37,7 @@ static char rcsid[] = "$OpenBSD: rewinddir.c,v 1.5 2003/06/02 20:18:34 millert E
void __seekdir(DIR *, long);
void
-rewinddir(dirp)
- DIR *dirp;
+rewinddir(DIR *dirp)
{
__seekdir(dirp, dirp->dd_rewind);
diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c
index c29bb18ffb6..adbf04ce053 100644
--- a/lib/libc/gen/scandir.c
+++ b/lib/libc/gen/scandir.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: scandir.c,v 1.8 2004/03/05 04:11:51 tedu Exp $";
+static char rcsid[] = "$OpenBSD: scandir.c,v 1.9 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -58,11 +58,8 @@ static char rcsid[] = "$OpenBSD: scandir.c,v 1.8 2004/03/05 04:11:51 tedu Exp $"
(((dp)->d_namlen + 1 + 3) &~ 3))
int
-scandir(dirname, namelist, select, dcomp)
- const char *dirname;
- struct dirent ***namelist;
- int (*select)(struct dirent *);
- int (*dcomp)(const void *, const void *);
+scandir(const char *dirname, struct dirent ***namelist,
+ int (*select)(struct dirent *), int (*dcomp)(const void *, const void *))
{
struct dirent *d, *p, **names = NULL;
size_t nitems = 0;
@@ -143,9 +140,7 @@ fail:
* Alphabetic order comparison routine for those who want it.
*/
int
-alphasort(d1, d2)
- const void *d1;
- const void *d2;
+alphasort(const void *d1, const void *d2)
{
return(strcmp((*(struct dirent **)d1)->d_name,
(*(struct dirent **)d2)->d_name));
diff --git a/lib/libc/gen/seekdir.c b/lib/libc/gen/seekdir.c
index 731d3b6ad95..401bf72b8af 100644
--- a/lib/libc/gen/seekdir.c
+++ b/lib/libc/gen/seekdir.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: seekdir.c,v 1.5 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: seekdir.c,v 1.6 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -41,9 +41,7 @@ void __seekdir(DIR *, long);
* __seekdir is in telldir.c so that it can share opaque data structures.
*/
void
-seekdir(dirp, loc)
- DIR *dirp;
- long loc;
+seekdir(DIR *dirp, long loc)
{
__seekdir(dirp, loc);
diff --git a/lib/libc/gen/setjmperr.c b/lib/libc/gen/setjmperr.c
index 9434c5b4e1d..cca5a3529e7 100644
--- a/lib/libc/gen/setjmperr.c
+++ b/lib/libc/gen/setjmperr.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: setjmperr.c,v 1.3 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: setjmperr.c,v 1.4 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -42,7 +42,7 @@ static char rcsid[] = "$OpenBSD: setjmperr.c,v 1.3 2003/06/02 20:18:34 millert E
#include <unistd.h>
void
-longjmperror()
+longjmperror(void)
{
#define ERRMSG "longjmp botch.\n"
(void)write(STDERR_FILENO, ERRMSG, sizeof(ERRMSG) - 1);
diff --git a/lib/libc/gen/setmode.c b/lib/libc/gen/setmode.c
index 8c6b3eacc3c..5904cea042d 100644
--- a/lib/libc/gen/setmode.c
+++ b/lib/libc/gen/setmode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setmode.c,v 1.12 2003/06/02 20:18:34 millert Exp $ */
+/* $OpenBSD: setmode.c,v 1.13 2004/05/18 02:05:52 jfb Exp $ */
/* $NetBSD: setmode.c,v 1.15 1997/02/07 22:21:06 christos Exp $ */
/*
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)setmode.c 8.2 (Berkeley) 3/25/94";
#else
-static char rcsid[] = "$OpenBSD: setmode.c,v 1.12 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: setmode.c,v 1.13 2004/05/18 02:05:52 jfb Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -169,8 +169,7 @@ common: if (set->cmd2 & CMD2_CLR) {
#define STANDARD_BITS (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
void *
-setmode(p)
- register const char *p;
+setmode(const char *p)
{
register int perm, who;
register char op;
@@ -347,11 +346,7 @@ apply: if (!*p)
}
static BITCMD *
-addcmd(set, op, who, oparg, mask)
- BITCMD *set;
- register int oparg, who;
- register int op;
- u_int mask;
+addcmd(BITCMD *set, int op, int who, int oparg, u_int mask)
{
switch (op) {
case '=':
@@ -395,8 +390,7 @@ addcmd(set, op, who, oparg, mask)
#ifdef SETMODE_DEBUG
static void
-dumpmode(set)
- register BITCMD *set;
+dumpmode(BITCMD *set)
{
for (; set->cmd; ++set)
(void)printf("cmd: '%c' bits %04o%s%s%s%s%s%s\n",
@@ -416,8 +410,7 @@ dumpmode(set)
* compacted, but it's not worth the effort.
*/
static void
-compress_mode(set)
- register BITCMD *set;
+compress_mode(BITCMD *set)
{
register BITCMD *nset;
register int setbits, clrbits, Xbits, op;
diff --git a/lib/libc/gen/siginterrupt.c b/lib/libc/gen/siginterrupt.c
index a2729621ea9..8af4350aa56 100644
--- a/lib/libc/gen/siginterrupt.c
+++ b/lib/libc/gen/siginterrupt.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: siginterrupt.c,v 1.4 2003/06/02 20:18:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: siginterrupt.c,v 1.5 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <signal.h>
@@ -38,8 +38,7 @@ static char rcsid[] = "$OpenBSD: siginterrupt.c,v 1.4 2003/06/02 20:18:34 miller
* after an instance of the indicated signal.
*/
int
-siginterrupt(sig, flag)
- int sig, flag;
+siginterrupt(int sig, int flag)
{
extern sigset_t __sigintr;
struct sigaction sa;
diff --git a/lib/libc/gen/sigsetops.c b/lib/libc/gen/sigsetops.c
index 28d4588a99d..e88c57d01fb 100644
--- a/lib/libc/gen/sigsetops.c
+++ b/lib/libc/gen/sigsetops.c
@@ -30,7 +30,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: sigsetops.c,v 1.3 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: sigsetops.c,v 1.4 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <errno.h>
@@ -43,25 +43,21 @@ static char rcsid[] = "$OpenBSD: sigsetops.c,v 1.3 2003/06/02 20:18:35 millert E
#undef sigismember
int
-sigemptyset(set)
- sigset_t *set;
+sigemptyset(sigset_t *set)
{
*set = 0;
return (0);
}
int
-sigfillset(set)
- sigset_t *set;
+sigfillset(sigset_t *set)
{
*set = ~(sigset_t)0;
return (0);
}
int
-sigaddset(set, signo)
- sigset_t *set;
- int signo;
+sigaddset(sigset_t *set, int signo)
{
if (signo <= 0 || signo >= NSIG) {
errno = EINVAL;
@@ -72,9 +68,7 @@ sigaddset(set, signo)
}
int
-sigdelset(set, signo)
- sigset_t *set;
- int signo;
+sigdelset(sigset_t *set, int signo)
{
if (signo <= 0 || signo >= NSIG) {
errno = EINVAL;
@@ -85,9 +79,7 @@ sigdelset(set, signo)
}
int
-sigismember(set, signo)
- const sigset_t *set;
- int signo;
+sigismember(const sigset_t *set, int signo)
{
if (signo <= 0 || signo >= NSIG) {
errno = EINVAL;
diff --git a/lib/libc/gen/sleep.c b/lib/libc/gen/sleep.c
index 2610b850adf..88717fdc189 100644
--- a/lib/libc/gen/sleep.c
+++ b/lib/libc/gen/sleep.c
@@ -28,15 +28,14 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: sleep.c,v 1.9 2003/06/25 21:15:04 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: sleep.c,v 1.10 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/time.h>
#include <unistd.h>
unsigned int
-sleep(seconds)
- unsigned int seconds;
+sleep(unsigned int seconds)
{
struct timespec rqt, rmt;
diff --git a/lib/libc/gen/strtofflags.c b/lib/libc/gen/strtofflags.c
index 569c0804263..af76b7efd89 100644
--- a/lib/libc/gen/strtofflags.c
+++ b/lib/libc/gen/strtofflags.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strtofflags.c,v 1.3 2003/06/25 21:15:40 deraadt Exp $ */
+/* $OpenBSD: strtofflags.c,v 1.4 2004/05/18 02:05:52 jfb Exp $ */
/*-
* Copyright (c) 1993
@@ -36,7 +36,7 @@ static const char rcsid[] =
"$FreeBSD: src/lib/libc/gen/strtofflags.c,v 1.18 2000/06/17 11:09:24 joe Exp $";
#else
static const char rcsid[] =
- "$OpenBSD: strtofflags.c,v 1.3 2003/06/25 21:15:40 deraadt Exp $";
+ "$OpenBSD: strtofflags.c,v 1.4 2004/05/18 02:05:52 jfb Exp $";
#endif
#endif /* not lint */
@@ -86,8 +86,7 @@ static const struct {
* are set, return the empty string.
*/
char *
-fflagstostr(flags)
- u_int32_t flags;
+fflagstostr(u_int32_t flags)
{
char *string;
char *sp, *dp;
@@ -119,9 +118,7 @@ fflagstostr(flags)
* to the offending token.
*/
int
-strtofflags(stringp, setp, clrp)
- char **stringp;
- u_int32_t *setp, *clrp;
+strtofflags(char **stringp, u_int32_t *setp, u_int32_t *clrp)
{
char *string, *p;
int i;
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c
index 399690c2b54..f8b3f63697a 100644
--- a/lib/libc/gen/sysconf.c
+++ b/lib/libc/gen/sysconf.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: sysconf.c,v 1.6 2004/05/07 18:39:19 millert Exp $";
+static char rcsid[] = "$OpenBSD: sysconf.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -56,8 +56,7 @@ static char rcsid[] = "$OpenBSD: sysconf.c,v 1.6 2004/05/07 18:39:19 millert Exp
* less useful than returning up-to-date values, however.
*/
long
-sysconf(name)
- int name;
+sysconf(int name)
{
struct rlimit rl;
size_t len;
diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c
index 03e0b9bb567..dbba85999fa 100644
--- a/lib/libc/gen/sysctl.c
+++ b/lib/libc/gen/sysctl.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: sysctl.c,v 1.5 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: sysctl.c,v 1.6 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -44,13 +44,8 @@ static char rcsid[] = "$OpenBSD: sysctl.c,v 1.5 2003/06/02 20:18:35 millert Exp
int __sysctl(int *, u_int, void *, size_t *, void *, size_t);
int
-sysctl(name, namelen, oldp, oldlenp, newp, newlen)
- int *name;
- u_int namelen;
- void *oldp;
- size_t *oldlenp;
- void *newp;
- size_t newlen;
+sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
+ size_t newlen)
{
if (name[0] != CTL_USER)
return (__sysctl(name, namelen, oldp, oldlenp, newp, newlen));
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c
index f96e06ce75f..890209055f0 100644
--- a/lib/libc/gen/syslog.c
+++ b/lib/libc/gen/syslog.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: syslog.c,v 1.25 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: syslog.c,v 1.26 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -69,32 +69,26 @@ syslog(int pri, const char *fmt, ...)
}
void
-vsyslog(pri, fmt, ap)
- int pri;
- register const char *fmt;
- va_list ap;
+vsyslog(int pri, const char *fmt, va_list ap)
{
vsyslog_r(pri, &sdata, fmt, ap);
}
void
-openlog(ident, logstat, logfac)
- const char *ident;
- int logstat, logfac;
+openlog(const char *ident, int logstat, int logfac)
{
openlog_r(ident, logstat, logfac, &sdata);
}
void
-closelog()
+closelog(void)
{
closelog_r(&sdata);
}
/* setlogmask -- set the log mask level */
int
-setlogmask(pmask)
- int pmask;
+setlogmask(int pmask)
{
return setlogmask_r(pmask, &sdata);
}
@@ -112,11 +106,7 @@ syslog_r(int pri, struct syslog_data *data, const char *fmt, ...)
}
void
-vsyslog_r(pri, data, fmt, ap)
- int pri;
- struct syslog_data *data;
- const char *fmt;
- va_list ap;
+vsyslog_r(int pri, struct syslog_data *data, const char *fmt, va_list ap)
{
int cnt;
char ch, *p, *t;
@@ -295,8 +285,7 @@ vsyslog_r(pri, data, fmt, ap)
}
static void
-disconnectlog_r(data)
- struct syslog_data *data;
+disconnectlog_r(struct syslog_data *data)
{
/*
* If the user closed the FD and opened another in the same slot,
@@ -311,8 +300,7 @@ disconnectlog_r(data)
}
static void
-connectlog_r(data)
- struct syslog_data *data;
+connectlog_r(struct syslog_data *data)
{
struct sockaddr_un SyslogAddr; /* AF_UNIX address of local logger */
@@ -337,10 +325,7 @@ connectlog_r(data)
}
void
-openlog_r(ident, logstat, logfac, data)
- const char *ident;
- int logstat, logfac;
- struct syslog_data *data;
+openlog_r(const char *ident, int logstat, int logfac, struct syslog_data *data)
{
if (ident != NULL)
data->log_tag = ident;
@@ -355,8 +340,7 @@ openlog_r(ident, logstat, logfac, data)
}
void
-closelog_r(data)
- struct syslog_data *data;
+closelog_r(struct syslog_data *data)
{
(void)close(data->log_file);
data->log_file = -1;
@@ -366,9 +350,7 @@ closelog_r(data)
/* setlogmask -- set the log mask level */
int
-setlogmask_r(pmask, data)
- int pmask;
- struct syslog_data *data;
+setlogmask_r(int pmask, struct syslog_data *data)
{
int omask;
diff --git a/lib/libc/gen/telldir.c b/lib/libc/gen/telldir.c
index c8ded8c56f2..b736f64565d 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.4 2003/06/25 21:16:47 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: telldir.c,v 1.5 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -68,8 +68,7 @@ void __seekdir(DIR *, long);
* return a pointer into a directory
*/
long
-telldir(dirp)
- const DIR *dirp;
+telldir(const DIR *dirp)
{
register int index;
register struct ddloc *lp;
@@ -90,9 +89,7 @@ telldir(dirp)
* Only values returned by "telldir" should be passed to seekdir.
*/
void
-__seekdir(dirp, loc)
- register DIR *dirp;
- long loc;
+__seekdir(DIR *dirp, long loc)
{
register struct ddloc *lp;
register struct ddloc **prevlp;
diff --git a/lib/libc/gen/times.c b/lib/libc/gen/times.c
index 785e9753dd1..0117263d496 100644
--- a/lib/libc/gen/times.c
+++ b/lib/libc/gen/times.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: times.c,v 1.3 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: times.c,v 1.4 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -43,8 +43,7 @@ static char rcsid[] = "$OpenBSD: times.c,v 1.3 2003/06/02 20:18:35 millert Exp $
#define CONVTCK(r) (r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK))
clock_t
-times(tp)
- register struct tms *tp;
+times(struct tms *tp)
{
struct rusage ru;
struct timeval t;
diff --git a/lib/libc/gen/timezone.c b/lib/libc/gen/timezone.c
index 1f6c9e5d37d..0dbdfb07636 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.7 2003/06/25 21:16:47 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: timezone.c,v 1.8 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -51,9 +51,7 @@ char *_tztab(int, int);
static char czone[TZ_MAX_CHARS]; /* space for zone name */
char *
-timezone(zone, dst)
- int zone,
- dst;
+timezone(int zone, int dst)
{
register char *beg,
*end;
@@ -103,9 +101,7 @@ static struct zone {
* STANDARD LIBRARY.
*/
char *
-_tztab(zone,dst)
- register int zone;
- int dst;
+_tztab(int zone, int dst)
{
register struct zone *zp;
register char sign;
diff --git a/lib/libc/gen/tolower_.c b/lib/libc/gen/tolower_.c
index c74d1725fb2..160c4be3c0c 100644
--- a/lib/libc/gen/tolower_.c
+++ b/lib/libc/gen/tolower_.c
@@ -4,7 +4,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: tolower_.c,v 1.6 2002/12/13 23:16:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: tolower_.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#define _ANSI_LIBRARY
@@ -51,8 +51,7 @@ const short *_tolower_tab_ = _C_tolower_;
#undef tolower
int
-tolower(c)
- int c;
+tolower(int c)
{
if ((unsigned int)c > 0177)
return(c);
diff --git a/lib/libc/gen/toupper_.c b/lib/libc/gen/toupper_.c
index fa2fc4fd996..65b6cfab977 100644
--- a/lib/libc/gen/toupper_.c
+++ b/lib/libc/gen/toupper_.c
@@ -4,7 +4,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: toupper_.c,v 1.6 2002/12/13 23:16:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: toupper_.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#define _ANSI_LIBRARY
@@ -51,8 +51,7 @@ const short *_toupper_tab_ = _C_toupper_;
#undef toupper
int
-toupper(c)
- int c;
+toupper(int c)
{
if ((unsigned int)c > 0177)
return(c);
diff --git a/lib/libc/gen/ttyname.c b/lib/libc/gen/ttyname.c
index 4f88c2e0ea0..87492e24597 100644
--- a/lib/libc/gen/ttyname.c
+++ b/lib/libc/gen/ttyname.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ttyname.c,v 1.9 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: ttyname.c,v 1.10 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -79,10 +79,7 @@ ttyname(int fd)
}
static int
-__ttyname_r_basic(fd, buf, len)
- int fd;
- char *buf;
- size_t len;
+__ttyname_r_basic(int fd, char *buf, size_t len)
{
struct stat sb;
struct termios ttyb;
@@ -129,11 +126,7 @@ __ttyname_r_basic(fd, buf, len)
/* ARGSUSED */
static int
-oldttyname(fd, sb, buf, len)
- int fd;
- struct stat *sb;
- char *buf;
- size_t len;
+oldttyname(int fd, struct stat *sb, char *buf, size_t len)
{
register struct dirent *dirp;
register DIR *dp;
diff --git a/lib/libc/gen/ttyslot.c b/lib/libc/gen/ttyslot.c
index 9170f247f10..9cd98810919 100644
--- a/lib/libc/gen/ttyslot.c
+++ b/lib/libc/gen/ttyslot.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ttyslot.c,v 1.4 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: ttyslot.c,v 1.5 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <ttyent.h>
@@ -37,7 +37,7 @@ static char rcsid[] = "$OpenBSD: ttyslot.c,v 1.4 2003/06/02 20:18:35 millert Exp
#include <unistd.h>
int
-ttyslot()
+ttyslot(void)
{
register struct ttyent *ttyp;
register int slot;
diff --git a/lib/libc/gen/ualarm.c b/lib/libc/gen/ualarm.c
index e32044a3e1b..3afbbe7c740 100644
--- a/lib/libc/gen/ualarm.c
+++ b/lib/libc/gen/ualarm.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ualarm.c,v 1.5 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: ualarm.c,v 1.6 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -43,9 +43,7 @@ static char rcsid[] = "$OpenBSD: ualarm.c,v 1.5 2003/06/02 20:18:35 millert Exp
* every ``reload'' microseconds after the first signal.
*/
useconds_t
-ualarm(usecs, reload)
- register useconds_t usecs;
- register useconds_t reload;
+ualarm(useconds_t usecs, useconds_t reload)
{
struct itimerval new, old;
diff --git a/lib/libc/gen/uname.c b/lib/libc/gen/uname.c
index c27a5a06e09..caabf758fe7 100644
--- a/lib/libc/gen/uname.c
+++ b/lib/libc/gen/uname.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: uname.c,v 1.6 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: uname.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -36,8 +36,7 @@ static char rcsid[] = "$OpenBSD: uname.c,v 1.6 2003/06/02 20:18:35 millert Exp $
#include <sys/utsname.h>
int
-uname(name)
- struct utsname *name;
+uname(struct utsname *name)
{
int mib[2], rval;
size_t len;
diff --git a/lib/libc/gen/unvis.c b/lib/libc/gen/unvis.c
index 06a5d75c7f6..52e204c4641 100644
--- a/lib/libc/gen/unvis.c
+++ b/lib/libc/gen/unvis.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: unvis.c,v 1.8 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: unvis.c,v 1.9 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -211,9 +211,7 @@ unvis(char *cp, char c, int *astate, int flag)
*/
int
-strunvis(dst, src)
- register char *dst;
- register const char *src;
+strunvis(char *dst, const char *src)
{
register char c;
char *start = dst;
diff --git a/lib/libc/gen/usleep.c b/lib/libc/gen/usleep.c
index f07a1f728f6..47890b0c738 100644
--- a/lib/libc/gen/usleep.c
+++ b/lib/libc/gen/usleep.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: usleep.c,v 1.8 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: usleep.c,v 1.9 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -36,8 +36,7 @@ static char rcsid[] = "$OpenBSD: usleep.c,v 1.8 2003/06/02 20:18:35 millert Exp
#include <unistd.h>
int
-usleep(useconds)
- useconds_t useconds;
+usleep(useconds_t useconds)
{
struct timespec rqt;
diff --git a/lib/libc/gen/utime.c b/lib/libc/gen/utime.c
index ad3fac9bfef..7ad66e0112f 100644
--- a/lib/libc/gen/utime.c
+++ b/lib/libc/gen/utime.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: utime.c,v 1.3 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: utime.c,v 1.4 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/time.h>
@@ -36,9 +36,7 @@ static char rcsid[] = "$OpenBSD: utime.c,v 1.3 2003/06/02 20:18:35 millert Exp $
#include <utime.h>
int
-utime(path, times)
- const char *path;
- const struct utimbuf *times;
+utime(const char *path, const struct utimbuf *times)
{
struct timeval tv[2], *tvp;
diff --git a/lib/libc/gen/valloc.c b/lib/libc/gen/valloc.c
index 34949b07442..0252c8f4829 100644
--- a/lib/libc/gen/valloc.c
+++ b/lib/libc/gen/valloc.c
@@ -28,15 +28,14 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: valloc.c,v 1.3 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: valloc.c,v 1.4 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdlib.h>
#include <unistd.h>
void *
-valloc(i)
- size_t i;
+valloc(size_t i)
{
long valsiz = getpagesize(), j;
void *cp = malloc(i + (valsiz-1));
diff --git a/lib/libc/gen/verr.c b/lib/libc/gen/verr.c
index 6d0a027cff0..8d63a16a13a 100644
--- a/lib/libc/gen/verr.c
+++ b/lib/libc/gen/verr.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: verr.c,v 1.6 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: verr.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
@@ -42,10 +42,7 @@ static char rcsid[] = "$OpenBSD: verr.c,v 1.6 2003/06/02 20:18:35 millert Exp $"
extern char *__progname; /* Program name, from crt0. */
__dead void
-_verr(eval, fmt, ap)
- int eval;
- const char *fmt;
- va_list ap;
+_verr(int eval, const char *fmt, va_list ap)
{
int sverrno;
diff --git a/lib/libc/gen/verrx.c b/lib/libc/gen/verrx.c
index 27deab68c75..6652a497560 100644
--- a/lib/libc/gen/verrx.c
+++ b/lib/libc/gen/verrx.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: verrx.c,v 1.6 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: verrx.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
@@ -40,10 +40,7 @@ static char rcsid[] = "$OpenBSD: verrx.c,v 1.6 2003/06/02 20:18:35 millert Exp $
extern char *__progname; /* Program name, from crt0. */
__dead void
-_verrx(eval, fmt, ap)
- int eval;
- const char *fmt;
- va_list ap;
+_verrx(int eval, const char *fmt, va_list ap)
{
(void)fprintf(stderr, "%s: ", __progname);
if (fmt != NULL)
diff --git a/lib/libc/gen/vis.c b/lib/libc/gen/vis.c
index 93001307ce5..f533bf2459e 100644
--- a/lib/libc/gen/vis.c
+++ b/lib/libc/gen/vis.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vis.c,v 1.12 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: vis.c,v 1.13 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -51,10 +51,7 @@ static char rcsid[] = "$OpenBSD: vis.c,v 1.12 2003/06/02 20:18:35 millert Exp $"
* vis - visually encode characters
*/
char *
-vis(dst, c, flag, nextc)
- register char *dst;
- int c, nextc;
- register int flag;
+vis(char *dst, int c, int flag, int nextc)
{
if (isvisible(c)) {
*dst++ = c;
@@ -150,10 +147,7 @@ done:
* This is useful for encoding a block of data.
*/
int
-strvis(dst, src, flag)
- register char *dst;
- register const char *src;
- int flag;
+strvis(char *dst, const char *src, int flag)
{
register char c;
char *start;
@@ -165,11 +159,7 @@ strvis(dst, src, flag)
}
int
-strnvis(dst, src, siz, flag)
- char *dst;
- const char *src;
- size_t siz;
- int flag;
+strnvis(char *dst, const char *src, size_t siz, int flag)
{
char c;
char *start, *end;
@@ -214,11 +204,7 @@ strnvis(dst, src, siz, flag)
}
int
-strvisx(dst, src, len, flag)
- register char *dst;
- register const char *src;
- register size_t len;
- int flag;
+strvisx(char *dst, const char *src, size_t len, int flag)
{
register char c;
char *start;
diff --git a/lib/libc/gen/vwarn.c b/lib/libc/gen/vwarn.c
index ad35ff372f8..e59b53da74a 100644
--- a/lib/libc/gen/vwarn.c
+++ b/lib/libc/gen/vwarn.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vwarn.c,v 1.6 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: vwarn.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
@@ -41,9 +41,7 @@ static char rcsid[] = "$OpenBSD: vwarn.c,v 1.6 2003/06/02 20:18:35 millert Exp $
extern char *__progname; /* Program name, from crt0. */
void
-_vwarn(fmt, ap)
- const char *fmt;
- va_list ap;
+_vwarn(const char *fmt, va_list ap)
{
int sverrno;
diff --git a/lib/libc/gen/vwarnx.c b/lib/libc/gen/vwarnx.c
index 0a2e8300fdb..75fbeeaf2cf 100644
--- a/lib/libc/gen/vwarnx.c
+++ b/lib/libc/gen/vwarnx.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vwarnx.c,v 1.6 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: vwarnx.c,v 1.7 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
@@ -39,9 +39,7 @@ static char rcsid[] = "$OpenBSD: vwarnx.c,v 1.6 2003/06/02 20:18:35 millert Exp
extern char *__progname; /* Program name, from crt0. */
void
-_vwarnx(fmt, ap)
- const char *fmt;
- va_list ap;
+_vwarnx(const char *fmt, va_list ap)
{
(void)fprintf(stderr, "%s: ", __progname);
if (fmt != NULL)
diff --git a/lib/libc/gen/wait.c b/lib/libc/gen/wait.c
index 800f548e77c..ef7bf7ec2a8 100644
--- a/lib/libc/gen/wait.c
+++ b/lib/libc/gen/wait.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: wait.c,v 1.3 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: wait.c,v 1.4 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -37,8 +37,7 @@ static char rcsid[] = "$OpenBSD: wait.c,v 1.3 2003/06/02 20:18:35 millert Exp $"
#include <sys/resource.h>
pid_t
-wait(istat)
- int *istat;
+wait(int *istat)
{
return (wait4(WAIT_ANY, istat, 0, (struct rusage *)0));
}
diff --git a/lib/libc/gen/wait3.c b/lib/libc/gen/wait3.c
index 238c4d671d9..2fae3cd1bfc 100644
--- a/lib/libc/gen/wait3.c
+++ b/lib/libc/gen/wait3.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: wait3.c,v 1.3 2003/06/02 20:18:35 millert Exp $";
+static char rcsid[] = "$OpenBSD: wait3.c,v 1.4 2004/05/18 02:05:52 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -37,10 +37,7 @@ static char rcsid[] = "$OpenBSD: wait3.c,v 1.3 2003/06/02 20:18:35 millert Exp $
#include <sys/resource.h>
pid_t
-wait3(istat, options, rup)
- int *istat;
- int options;
- struct rusage *rup;
+wait3(int *istat, int options, struct rusage *rup)
{
return (wait4(WAIT_ANY, istat, options, rup));
}