From e2881f49cc545371650e022bf57db9fee6d9f8c9 Mon Sep 17 00:00:00 2001 From: obrien Date: Fri, 22 Mar 2002 09:22:15 +0000 Subject: Remove multi-line __P() usage. --- lib/libc/db/btree/extern.h | 4 ++-- lib/libc/db/hash/extern.h | 4 ++-- lib/libc/db/hash/hash_func.c | 2 +- lib/libc/db/test/dbtest.c | 2 +- lib/libc/gen/getcap.c | 9 +++++---- lib/libc/net/getaddrinfo.c | 32 ++++++++++++++++---------------- lib/libc/net/getnameinfo.c | 4 ++-- lib/libc/net/inet_net_ntop.c | 4 ++-- lib/libc/net/inet_net_pton.c | 3 +-- lib/libc/net/inet_ntop.c | 6 ++---- lib/libc/net/name6.c | 4 ++-- lib/libc/net/rcmd.c | 12 +++++------- lib/libc/rpc/clnt_dg.c | 4 ++-- lib/libc/rpc/clnt_raw.c | 4 ++-- lib/libc/rpc/clnt_vc.c | 4 ++-- lib/libc/rpc/rpc_com.h | 5 ++--- lib/libc/rpc/rpc_soc.c | 4 ++-- lib/libc/rpc/rpcb_clnt.c | 9 +++------ lib/libc/rpc/svc.c | 4 ++-- lib/libc/rpc/svc_vc.c | 6 +++--- lib/libc/stdio/vfprintf.c | 10 +++++----- lib/libc/stdlib/radixsort.c | 4 ++-- lib/libc/stdlib/twalk.c | 4 ++-- 23 files changed, 68 insertions(+), 76 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/db/btree/extern.h b/lib/libc/db/btree/extern.h index e9def6d..a151acc 100644 --- a/lib/libc/db/btree/extern.h +++ b/lib/libc/db/btree/extern.h @@ -53,8 +53,8 @@ int __bt_ret(BTREE *, EPG *, DBT *, DBT *, DBT *, DBT *, int); EPG *__bt_search(BTREE *, const DBT *, int *); int __bt_seq(const DB *, DBT *, DBT *, u_int); void __bt_setcur(BTREE *, pgno_t, u_int); -int __bt_split __P((BTREE *, PAGE *, - const DBT *, const DBT *, int, size_t, u_int32_t)); +int __bt_split(BTREE *, PAGE *, + const DBT *, const DBT *, int, size_t, u_int32_t); int __bt_sync(const DB *, u_int); int __ovfl_delete(BTREE *, void *); diff --git a/lib/libc/db/hash/extern.h b/lib/libc/db/hash/extern.h index 82bff42..9ae5832 100644 --- a/lib/libc/db/hash/extern.h +++ b/lib/libc/db/hash/extern.h @@ -40,8 +40,8 @@ int __big_delete(HTAB *, BUFHEAD *); int __big_insert(HTAB *, BUFHEAD *, const DBT *, const DBT *); int __big_keydata(HTAB *, BUFHEAD *, DBT *, DBT *, int); int __big_return(HTAB *, BUFHEAD *, int, DBT *, int); -int __big_split __P((HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *, - int, u_int32_t, SPLIT_RETURN *)); +int __big_split(HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *, + int, u_int32_t, SPLIT_RETURN *); int __buf_free(HTAB *, int, int); void __buf_init(HTAB *, int); u_int32_t __call_hash(HTAB *, char *, int); diff --git a/lib/libc/db/hash/hash_func.c b/lib/libc/db/hash/hash_func.c index aeb34b2..fd5f365 100644 --- a/lib/libc/db/hash/hash_func.c +++ b/lib/libc/db/hash/hash_func.c @@ -53,7 +53,7 @@ static u_int32_t hash3(const void *, size_t); static u_int32_t hash4(const void *, size_t); /* Global default hash function */ -u_int32_t (*__default_hash) __P((const void *, size_t)) = hash4; +u_int32_t (*__default_hash)(const void *, size_t) = hash4; /* * HASH FUNCTIONS diff --git a/lib/libc/db/test/dbtest.c b/lib/libc/db/test/dbtest.c index b403bc1..b7c3c70 100644 --- a/lib/libc/db/test/dbtest.c +++ b/lib/libc/db/test/dbtest.c @@ -64,7 +64,7 @@ enum S { COMMAND, COMPARE, GET, PUT, REMOVE, SEQ, SEQFLAG, KEY, DATA }; void compare(DBT *, DBT *); DBTYPE dbtype(char *); void dump(DB *, int); -void err __P((const char *, ...)) __printflike(1, 2); +void err(const char *, ...) __printflike(1, 2); void get(DB *, DBT *); void getdata(DB *, DBT *, DBT *); void put(DB *, DBT *, DBT *); diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c index cd2eaab..a0e9803 100644 --- a/lib/libc/gen/getcap.c +++ b/lib/libc/gen/getcap.c @@ -70,7 +70,7 @@ static char *toprec; /* Additional record specified by cgetset() */ static int gottoprec; /* Flag indicating retrieval of toprecord */ static int cdbget(DB *, char **, char *); -static int getent(char **, u_int *, char **, int, char *, int, char *); +static int getent(char **, u_int *, char **, int, const char *, int, char *); static int nfcmp(char *, char *); /* @@ -113,7 +113,8 @@ cgetset(const char *ent) char * cgetcap(char *buf, const char *cap, int type) { - char *bp, *cp; + char *bp; + const char *cp; bp = buf; for (;;) { @@ -187,8 +188,8 @@ cgetent(char **buf, char **db_array, const char *name) * MAX_RECURSION. */ static int -getent(char **cap, u_int *len, char **db_array, int fd, char *name, int depth, - char *nfield) +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; diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index e598bdb..2e0cbb7 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -218,18 +218,18 @@ struct res_target { }; static int str_isnumber(const char *); -static int explore_fqdn __P((const struct addrinfo *, const char *, - const char *, struct addrinfo **)); -static int explore_null __P((const struct addrinfo *, - const char *, struct addrinfo **)); -static int explore_numeric __P((const struct addrinfo *, const char *, - const char *, struct addrinfo **)); -static int explore_numeric_scope __P((const struct addrinfo *, const char *, - const char *, struct addrinfo **)); -static int get_canonname __P((const struct addrinfo *, - struct addrinfo *, const char *)); -static struct addrinfo *get_ai __P((const struct addrinfo *, - const struct afd *, const char *)); +static int explore_fqdn(const struct addrinfo *, const char *, + const char *, struct addrinfo **); +static int explore_null(const struct addrinfo *, + const char *, struct addrinfo **); +static int explore_numeric(const struct addrinfo *, const char *, + const char *, struct addrinfo **); +static int explore_numeric_scope(const struct addrinfo *, const char *, + const char *, struct addrinfo **); +static int get_canonname(const struct addrinfo *, + struct addrinfo *, const char *); +static struct addrinfo *get_ai(const struct addrinfo *, + const struct afd *, const char *); static int get_portmatch(const struct addrinfo *, const char *); static int get_port(struct addrinfo *, const char *, int); static const struct afd *find_afd(int); @@ -238,8 +238,8 @@ static int addrconfig(struct addrinfo *); static int ip6_str2scopeid(char *, struct sockaddr_in6 *); #endif -static struct addrinfo *getanswer __P((const querybuf *, int, const char *, int, - const struct addrinfo *)); +static struct addrinfo *getanswer(const querybuf *, int, const char *, int, + const struct addrinfo *); static int _dns_getaddrinfo(void *, void *, va_list); static void _sethtent(void); static void _endhtent(void); @@ -253,8 +253,8 @@ extern int _yp_check(char **); static int res_queryN(const char *, struct res_target *); static int res_searchN(const char *, struct res_target *); -static int res_querydomainN __P((const char *, const char *, - struct res_target *)); +static int res_querydomainN(const char *, const char *, + struct res_target *); static char *ai_errlist[] = { "Success", diff --git a/lib/libc/net/getnameinfo.c b/lib/libc/net/getnameinfo.c index f83cb91..7ca051c 100644 --- a/lib/libc/net/getnameinfo.c +++ b/lib/libc/net/getnameinfo.c @@ -81,8 +81,8 @@ struct sockinet { }; #ifdef INET6 -static int ip6_parsenumeric __P((const struct sockaddr *, const char *, char *, - size_t, int)); +static int ip6_parsenumeric(const struct sockaddr *, const char *, char *, + size_t, int); static int ip6_sa2str(const struct sockaddr_in6 *, char *, size_t, int); #endif diff --git a/lib/libc/net/inet_net_ntop.c b/lib/libc/net/inet_net_ntop.c index 4b30cb6..215ff1d 100644 --- a/lib/libc/net/inet_net_ntop.c +++ b/lib/libc/net/inet_net_ntop.c @@ -36,8 +36,8 @@ static const char rcsid[] = "$FreeBSD$"; # define SPRINTF(x) ((size_t)sprintf x) #endif -static char * inet_net_ntop_ipv4 __P((const u_char *src, int bits, - char *dst, size_t size)); +static char * inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, + size_t size); /* * char * diff --git a/lib/libc/net/inet_net_pton.c b/lib/libc/net/inet_net_pton.c index 04a45d4..5452d68 100644 --- a/lib/libc/net/inet_net_pton.c +++ b/lib/libc/net/inet_net_pton.c @@ -38,8 +38,7 @@ static const char rcsid[] = "$FreeBSD$"; # define SPRINTF(x) ((size_t)sprintf x) #endif -static int inet_net_pton_ipv4 __P((const char *src, u_char *dst, - size_t size)); +static int inet_net_pton_ipv4(const char *src, u_char *dst, size_t size); /* * static int diff --git a/lib/libc/net/inet_ntop.c b/lib/libc/net/inet_ntop.c index 9dbe46b..4b1af69 100644 --- a/lib/libc/net/inet_ntop.c +++ b/lib/libc/net/inet_ntop.c @@ -38,10 +38,8 @@ __FBSDID("$FreeBSD$"); * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ -static const char *inet_ntop4 __P((const u_char *src, char *dst, - socklen_t size)); -static const char *inet_ntop6 __P((const u_char *src, char *dst, - socklen_t size)); +static const char *inet_ntop4(const u_char *src, char *dst, socklen_t size); +static const char *inet_ntop6(const u_char *src, char *dst, socklen_t size); /* char * * inet_ntop(af, src, dst, size) diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c index 405deda..2e445da 100644 --- a/lib/libc/net/name6.c +++ b/lib/libc/net/name6.c @@ -976,8 +976,8 @@ typedef union { u_char buf[MAXPACKET]; } querybuf; -static struct hostent *getanswer __P((const querybuf *, int, const char *, - int, struct hostent *, int *)); +static struct hostent *getanswer(const querybuf *, int, const char *, int, + struct hostent *, int *); /* * we don't need to take care about sorting, nor IPv4 mapped address here. diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c index 91bdf28..19a1f17 100644 --- a/lib/libc/net/rcmd.c +++ b/lib/libc/net/rcmd.c @@ -72,13 +72,11 @@ extern int innetgr( const char *, const char *, const char *, const char * ); #define max(a, b) ((a > b) ? a : b) -int __ivaliduser(FILE *, u_int32_t, const char *, const char *); -int __ivaliduser_af __P((FILE *,const void *, const char *, const char *, - int, int)); -int __ivaliduser_sa __P((FILE *, const struct sockaddr *, socklen_t, - const char *,const char *)); -static int __icheckhost __P((const struct sockaddr *, socklen_t, - const char *)); +int __ivaliduser(FILE *, u_int32_t, const char *, const char *); +int __ivaliduser_af(FILE *,const void *, const char *, const char *, int, int); +int __ivaliduser_sa(FILE *, const struct sockaddr *, socklen_t, const char *, + const char *); +static int __icheckhost(const struct sockaddr *, socklen_t, const char *); char paddr[NI_MAXHOST]; diff --git a/lib/libc/rpc/clnt_dg.c b/lib/libc/rpc/clnt_dg.c index fdc9c87..6ea9756 100644 --- a/lib/libc/rpc/clnt_dg.c +++ b/lib/libc/rpc/clnt_dg.c @@ -69,8 +69,8 @@ static char sccsid[] = "@(#)clnt_dg.c 1.19 89/03/16 Copyr 1988 Sun Micro"; static struct clnt_ops *clnt_dg_ops(void); static bool_t time_not_ok(struct timeval *); -static enum clnt_stat clnt_dg_call __P((CLIENT *, rpcproc_t, xdrproc_t, caddr_t, - xdrproc_t, caddr_t, struct timeval)); +static enum clnt_stat clnt_dg_call(CLIENT *, rpcproc_t, xdrproc_t, caddr_t, + xdrproc_t, caddr_t, struct timeval); static void clnt_dg_geterr(CLIENT *, struct rpc_err *); static bool_t clnt_dg_freeres(CLIENT *, xdrproc_t, caddr_t); static void clnt_dg_abort(CLIENT *); diff --git a/lib/libc/rpc/clnt_raw.c b/lib/libc/rpc/clnt_raw.c index 1492e48..d37da5d 100644 --- a/lib/libc/rpc/clnt_raw.c +++ b/lib/libc/rpc/clnt_raw.c @@ -76,8 +76,8 @@ static struct clntraw_private { u_int mcnt; } *clntraw_private; -static enum clnt_stat clnt_raw_call __P((CLIENT *, rpcproc_t, xdrproc_t, - caddr_t, xdrproc_t, caddr_t, struct timeval)); +static enum clnt_stat clnt_raw_call(CLIENT *, rpcproc_t, xdrproc_t, caddr_t, + xdrproc_t, caddr_t, struct timeval); static void clnt_raw_geterr(CLIENT *, struct rpc_err *); static bool_t clnt_raw_freeres(CLIENT *, xdrproc_t, caddr_t); static void clnt_raw_abort(CLIENT *); diff --git a/lib/libc/rpc/clnt_vc.c b/lib/libc/rpc/clnt_vc.c index 27f14d9..4e9fd4f 100644 --- a/lib/libc/rpc/clnt_vc.c +++ b/lib/libc/rpc/clnt_vc.c @@ -87,8 +87,8 @@ struct cmessage { struct cmsgcred cmcred; }; -static enum clnt_stat clnt_vc_call __P((CLIENT *, rpcproc_t, xdrproc_t, caddr_t, - xdrproc_t, caddr_t, struct timeval)); +static enum clnt_stat clnt_vc_call(CLIENT *, rpcproc_t, xdrproc_t, caddr_t, + xdrproc_t, caddr_t, struct timeval); static void clnt_vc_geterr(CLIENT *, struct rpc_err *); static bool_t clnt_vc_freeres(CLIENT *, xdrproc_t, caddr_t); static void clnt_vc_abort(CLIENT *); diff --git a/lib/libc/rpc/rpc_com.h b/lib/libc/rpc/rpc_com.h index a52332d..b04f110 100644 --- a/lib/libc/rpc/rpc_com.h +++ b/lib/libc/rpc/rpc_com.h @@ -73,9 +73,8 @@ int __rpc_socktype2seman(int); void *rpc_nullproc(CLIENT *); int __rpc_sockisbound(int); -struct netbuf *__rpcb_findaddr __P((rpcprog_t, rpcvers_t, - const struct netconfig *, - const char *, CLIENT **)); +struct netbuf *__rpcb_findaddr(rpcprog_t, rpcvers_t, const struct netconfig *, + const char *, CLIENT **); bool_t __rpc_control(int,void *); char *_get_next_token(char *, int); diff --git a/lib/libc/rpc/rpc_soc.c b/lib/libc/rpc/rpc_soc.c index 9618de1..8df0529 100644 --- a/lib/libc/rpc/rpc_soc.c +++ b/lib/libc/rpc/rpc_soc.c @@ -78,8 +78,8 @@ static char sccsid[] = "@(#)rpc_soc.c 1.41 89/05/02 Copyr 1988 Sun Micro"; extern mutex_t rpcsoc_lock; -static CLIENT *clnt_com_create __P((struct sockaddr_in *, rpcprog_t, rpcvers_t, - int *, u_int, u_int, char *)); +static CLIENT *clnt_com_create(struct sockaddr_in *, rpcprog_t, rpcvers_t, + int *, u_int, u_int, char *); static SVCXPRT *svc_com_create(int, u_int, u_int, char *); static bool_t rpc_wrap_bcast(char *, struct netbuf *, struct netconfig *); diff --git a/lib/libc/rpc/rpcb_clnt.c b/lib/libc/rpc/rpcb_clnt.c index 156cbe8..416ab22 100644 --- a/lib/libc/rpc/rpcb_clnt.c +++ b/lib/libc/rpc/rpcb_clnt.c @@ -102,13 +102,10 @@ extern int __rpc_lowvers; static struct address_cache *check_cache(const char *, const char *); static void delete_cache(struct netbuf *); -static void add_cache __P((const char *, const char *, struct netbuf *, - char *)); -static CLIENT *getclnthandle __P((const char *, const struct netconfig *, - char **)); +static void add_cache(const char *, const char *, struct netbuf *, char *); +static CLIENT *getclnthandle(const char *, const struct netconfig *, char **); static CLIENT *local_rpcb(void); -static struct netbuf *got_entry __P((rpcb_entry_list_ptr, - const struct netconfig *)); +static struct netbuf *got_entry(rpcb_entry_list_ptr, const struct netconfig *); /* * This routine adjusts the timeout used for calls to the remote rpcbind. diff --git a/lib/libc/rpc/svc.c b/lib/libc/rpc/svc.c index c201c0c..5f131b2 100644 --- a/lib/libc/rpc/svc.c +++ b/lib/libc/rpc/svc.c @@ -88,8 +88,8 @@ static struct svc_callout { extern rwlock_t svc_lock; extern rwlock_t svc_fd_lock; -static struct svc_callout *svc_find __P((rpcprog_t, rpcvers_t, - struct svc_callout **, char *)); +static struct svc_callout *svc_find(rpcprog_t, rpcvers_t, + struct svc_callout **, char *); /* *************** SVCXPRT related stuff **************** */ diff --git a/lib/libc/rpc/svc_vc.c b/lib/libc/rpc/svc_vc.c index 731f5c7..8fea82e 100644 --- a/lib/libc/rpc/svc_vc.c +++ b/lib/libc/rpc/svc_vc.c @@ -613,11 +613,11 @@ svc_vc_rendezvous_ops(xprt) ops.xp_recv = rendezvous_request; ops.xp_stat = rendezvous_stat; ops.xp_getargs = - (bool_t (*) __P((SVCXPRT *, xdrproc_t, caddr_t)))abort; + (bool_t (*)(SVCXPRT *, xdrproc_t, caddr_t))abort; ops.xp_reply = - (bool_t (*) __P((SVCXPRT *, struct rpc_msg *)))abort; + (bool_t (*)(SVCXPRT *, struct rpc_msg *))abort; ops.xp_freeargs = - (bool_t (*) __P((SVCXPRT *, xdrproc_t, caddr_t)))abort, + (bool_t (*)(SVCXPRT *, xdrproc_t, caddr_t))abort, ops.xp_destroy = svc_vc_destroy; ops2.xp_control = svc_vc_control; } diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 1d04528..4902d8c 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -113,11 +113,11 @@ enum typeid { }; static int __sprint(FILE *, struct __suio *); -static int __sbprintf __P((FILE *, const char *, va_list)) __printflike(2, 0); -static char *__ujtoa __P((uintmax_t, char *, int, int, char *, int, - char, const char *)); -static char *__ultoa __P((u_long, char *, int, int, char *, int, - char, const char *)); +static int __sbprintf(FILE *, const char *, va_list) __printflike(2, 0); +static char *__ujtoa(uintmax_t, char *, int, int, char *, int, char, + const char *); +static char *__ultoa(u_long, char *, int, int, char *, int, char, + const char *); static void __find_arguments(const char *, va_list, union arg **); static void __grow_type_table(int, enum typeid **, int *); diff --git a/lib/libc/stdlib/radixsort.c b/lib/libc/stdlib/radixsort.c index 9540f63..de5cd4b 100644 --- a/lib/libc/stdlib/radixsort.c +++ b/lib/libc/stdlib/radixsort.c @@ -66,8 +66,8 @@ typedef struct { static inline void simplesort (const u_char **, int, int, const u_char *, u_int); static void r_sort_a(const u_char **, int, int, const u_char *, u_int); -static void r_sort_b __P((const u_char **, - const u_char **, int, int, const u_char *, u_int)); +static void r_sort_b(const u_char **, const u_char **, int, int, + const u_char *, u_int); #define THRESHOLD 20 /* Divert to simplesort(). */ #define SIZE 512 /* Default stack size. */ diff --git a/lib/libc/stdlib/twalk.c b/lib/libc/stdlib/twalk.c index 78d3685..78be57d 100644 --- a/lib/libc/stdlib/twalk.c +++ b/lib/libc/stdlib/twalk.c @@ -22,8 +22,8 @@ __RCSID("$NetBSD: twalk.c,v 1.1 1999/02/22 10:33:16 christos Exp $"); #include #include -static void trecurse __P((const node_t *, - void (*action)(const void *, VISIT, int), int level)); +static void trecurse(const node_t *, + void (*action)(const void *, VISIT, int), int level); /* Walk the nodes of a tree */ static void -- cgit v1.1