From d797dc5d823699c41734581020450ed2a7edf045 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Tue, 30 Sep 2008 16:57:06 +0000 Subject: [PATCH] Ansify (i.e., silence -Wold-style-definition) the rest of lib/ (minus contrib/). Also remove a couple of "register" keywords. --- lib/libalias/alias_db.c | 4 +- lib/libatm/atm_addr.c | 10 +-- lib/libatm/cache_key.c | 8 +-- lib/libatm/ioctl_subr.c | 34 +++------- lib/libatm/ip_addr.c | 8 +-- lib/libatm/ip_checksum.c | 6 +- lib/libatm/timer.c | 13 ++-- lib/libc_r/uthread/uthread_main_np.c | 4 +- lib/libc_r/uthread/uthread_multi_np.c | 4 +- lib/libc_r/uthread/uthread_single_np.c | 5 +- lib/libcompat/4.1/ftime.c | 5 +- lib/libcompat/4.1/gtty.c | 6 +- lib/libcompat/4.1/stty.c | 6 +- lib/libcompat/4.3/cfree.c | 5 +- lib/libcompat/4.3/insque.c | 5 +- lib/libcompat/4.3/regex.c | 11 ++-- lib/libcompat/4.3/remque.c | 5 +- lib/libcompat/4.3/rexec.c | 23 ++----- lib/libcompat/4.4/cuserid.c | 5 +- lib/libcompat/regexp/regerror.c | 5 +- lib/libcompat/regexp/regexp.c | 85 +++++++++---------------- lib/libcompat/regexp/regsub.c | 7 +- lib/libedit/chared.c | 9 +-- lib/libedit/readline.c | 4 +- lib/libipsec/ipsec_dump_policy.c | 24 ++----- lib/libipsec/ipsec_get_policylen.c | 5 +- lib/libipsec/policy_parse.y | 28 +++----- lib/libipsec/policy_token.l | 5 +- lib/libmd/md2c.c | 28 ++++---- lib/libmd/md4c.c | 39 +++++------- lib/libmd/md5c.c | 21 ++---- lib/libmd/rmd160c.c | 32 ++++------ lib/libmd/sha0c.c | 28 ++++---- lib/libmd/sha1c.c | 26 +++----- lib/libncp/ipx.c | 14 ++-- lib/libncp/ncpl_subr.c | 7 +- lib/libopie/opieextra.c | 4 +- lib/libsctp/sctp_sys_calls.c | 6 +- lib/libsdp/sdp.h | 6 +- lib/libsdp/util.c | 6 +- lib/libskey/put.c | 32 +++------- lib/libskey/skey_crypt.c | 8 +-- lib/libskey/skey_getpass.c | 8 +-- lib/libskey/skeyaccess.c | 58 ++++++++--------- lib/libskey/skeylogin.c | 32 +++------- lib/libskey/skeysubr.c | 28 ++++---- lib/libthread_xu/thread/thr_kern.c | 6 +- lib/libthread_xu/thread/thr_main_np.c | 4 +- lib/libthread_xu/thread/thr_multi_np.c | 4 +- lib/libthread_xu/thread/thr_single_np.c | 4 +- lib/libvgl/keyboard.c | 6 +- lib/libvgl/main.c | 10 +-- lib/libvgl/mouse.c | 10 +-- lib/libvgl/simple.c | 6 +- lib/liby/yyerror.c | 5 +- 55 files changed, 295 insertions(+), 482 deletions(-) diff --git a/lib/libalias/alias_db.c b/lib/libalias/alias_db.c index 70d1dd175b..61dd980793 100644 --- a/lib/libalias/alias_db.c +++ b/lib/libalias/alias_db.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libalias/alias_db.c,v 1.21.2.14 2002/07/24 03:21:24 luigi Exp $ - * $DragonFly: src/lib/libalias/alias_db.c,v 1.6 2007/11/05 08:58:35 sephe Exp $ + * $DragonFly: src/lib/libalias/alias_db.c,v 1.7 2008/09/30 16:57:04 swildner Exp $ */ /* @@ -1976,7 +1976,7 @@ GetAliasAddress(struct alias_link *link) struct in_addr -GetDefaultAliasAddress() +GetDefaultAliasAddress(void) { return aliasAddress; } diff --git a/lib/libatm/atm_addr.c b/lib/libatm/atm_addr.c index 6fe782283d..d41e87b0da 100644 --- a/lib/libatm/atm_addr.c +++ b/lib/libatm/atm_addr.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * $FreeBSD: src/lib/libatm/atm_addr.c,v 1.4.2.1 2001/09/28 16:52:10 dillon Exp $ - * $DragonFly: src/lib/libatm/atm_addr.c,v 1.3 2004/09/23 21:39:08 geekgod Exp $ + * $DragonFly: src/lib/libatm/atm_addr.c,v 1.4 2008/09/30 16:57:04 swildner Exp $ */ /* @@ -69,10 +69,7 @@ extern char *prog; * */ int -get_hex_atm_addr(in, out, len) - char *in; - u_char *out; - int len; +get_hex_atm_addr(char *in, u_char *out, int len) { int c_type, c_value, i, out_len, state, val = 0; @@ -211,8 +208,7 @@ get_hex_atm_addr(in, out, len) * */ char * -format_atm_addr(addr) - Atm_addr *addr; +format_atm_addr(Atm_addr *addr) { int i; char *nsap_format; diff --git a/lib/libatm/cache_key.c b/lib/libatm/cache_key.c index a6c28eae3e..e85bd31aba 100644 --- a/lib/libatm/cache_key.c +++ b/lib/libatm/cache_key.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * $FreeBSD: src/lib/libatm/cache_key.c,v 1.3.2.1 2001/09/28 16:52:10 dillon Exp $ - * $DragonFly: src/lib/libatm/cache_key.c,v 1.2 2003/06/17 04:26:41 dillon Exp $ + * $DragonFly: src/lib/libatm/cache_key.c,v 1.3 2008/09/30 16:57:04 swildner Exp $ */ /* @@ -66,11 +66,7 @@ * */ void -scsp_cache_key(ap, ip, ol, op) - Atm_addr *ap; - struct in_addr *ip; - int ol; - char *op; +scsp_cache_key(Atm_addr *ap, struct in_addr *ip, int ol, char *op) { int i, len; char buff[32], digest[16]; diff --git a/lib/libatm/ioctl_subr.c b/lib/libatm/ioctl_subr.c index 3fb6581e52..7a8abe2da3 100644 --- a/lib/libatm/ioctl_subr.c +++ b/lib/libatm/ioctl_subr.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * $FreeBSD: src/lib/libatm/ioctl_subr.c,v 1.3.2.1 2001/09/28 16:52:10 dillon Exp $ - * $DragonFly: src/lib/libatm/ioctl_subr.c,v 1.4 2004/09/23 21:39:08 geekgod Exp $ + * $DragonFly: src/lib/libatm/ioctl_subr.c,v 1.5 2008/09/30 16:57:04 swildner Exp $ */ /* @@ -85,9 +85,7 @@ extern char *prog; * */ int -do_info_ioctl(req, buf_len) - struct atminfreq *req; - int buf_len; +do_info_ioctl(struct atminfreq *req, int buf_len) { int rc, s; caddr_t buf; @@ -151,9 +149,7 @@ mem_retry: * */ int -get_vcc_info(intf, vccp) - char *intf; - struct air_vcc_rsp **vccp; +get_vcc_info(char *intf, struct air_vcc_rsp **vccp) { int buf_len = sizeof(struct air_vcc_rsp) * 100; struct atminfreq air; @@ -189,9 +185,7 @@ get_vcc_info(intf, vccp) * */ int -get_subnet_mask(intf, mask) - char *intf; - struct sockaddr_in *mask; +get_subnet_mask(char *intf, struct sockaddr_in *mask) { int rc, s; struct ifreq req; @@ -246,8 +240,7 @@ get_subnet_mask(intf, mask) * */ int -get_mtu(intf) - char *intf; +get_mtu(char *intf) { int rc, s; struct ifreq req; @@ -300,8 +293,7 @@ get_mtu(intf) * */ int -verify_nif_name(name) - char *name; +verify_nif_name(char *name) { int rc, s; struct atminfreq air; @@ -371,9 +363,7 @@ verify_nif_name(name) * */ int -get_cfg_info ( intf, cfgp ) - char *intf; - struct air_cfg_rsp **cfgp; +get_cfg_info(char *intf, struct air_cfg_rsp **cfgp) { int buf_len = sizeof(struct air_cfg_rsp) * 4; struct atminfreq air; @@ -409,9 +399,7 @@ get_cfg_info ( intf, cfgp ) * */ int -get_intf_info ( intf, intp ) - char *intf; - struct air_int_rsp **intp; +get_intf_info(char *intf, struct air_int_rsp **intp) { int buf_len = sizeof(struct air_int_rsp) * 4; struct atminfreq air; @@ -448,9 +436,7 @@ get_intf_info ( intf, intp ) * */ int -get_netif_info ( intf, netp ) - char *intf; - struct air_netif_rsp **netp; +get_netif_info(char *intf, struct air_netif_rsp **netp) { int buf_len = sizeof(struct air_netif_rsp) * 10; struct atminfreq air; @@ -472,5 +458,3 @@ get_netif_info ( intf, netp ) return ( buf_len ); } - - diff --git a/lib/libatm/ip_addr.c b/lib/libatm/ip_addr.c index c6ac4a16e8..0fbc4111b9 100644 --- a/lib/libatm/ip_addr.c +++ b/lib/libatm/ip_addr.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/lib/libatm/ip_addr.c,v 1.3.2.1 2001/09/28 16:52:10 dillon Exp $ - * @(#) $DragonFly: src/lib/libatm/ip_addr.c,v 1.4 2007/11/25 01:28:22 swildner Exp $ + * @(#) $DragonFly: src/lib/libatm/ip_addr.c,v 1.5 2008/09/30 16:57:04 swildner Exp $ * */ @@ -73,8 +73,7 @@ * */ struct sockaddr_in * -get_ip_addr(p) - char *p; +get_ip_addr(char *p) { struct hostent *ip_host; static struct sockaddr_in sin; @@ -120,8 +119,7 @@ get_ip_addr(p) * */ char * -format_ip_addr(addr) - struct in_addr *addr; +format_ip_addr(struct in_addr *addr) { static char host_name[MAXHOSTNAMELEN + 18]; char *ip_num; diff --git a/lib/libatm/ip_checksum.c b/lib/libatm/ip_checksum.c index f6b27e3219..ab6f631349 100644 --- a/lib/libatm/ip_checksum.c +++ b/lib/libatm/ip_checksum.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/lib/libatm/ip_checksum.c,v 1.3.2.1 2001/09/28 16:52:10 dillon Exp $ - * @(#) $DragonFly: src/lib/libatm/ip_checksum.c,v 1.3 2004/10/25 19:38:01 drhodus Exp $ + * @(#) $DragonFly: src/lib/libatm/ip_checksum.c,v 1.4 2008/09/30 16:57:04 swildner Exp $ * */ @@ -69,9 +69,7 @@ * */ short -ip_checksum(addr, count) - char *addr; - int count; +ip_checksum(char *addr, int count) { /* Compute Internet Checksum for "count" bytes * beginning at location "addr". diff --git a/lib/libatm/timer.c b/lib/libatm/timer.c index acf5d7190d..06e55782a4 100644 --- a/lib/libatm/timer.c +++ b/lib/libatm/timer.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/lib/libatm/timer.c,v 1.3.2.1 2001/09/28 16:52:10 dillon Exp $ - * @(#) $DragonFly: src/lib/libatm/timer.c,v 1.2 2003/06/17 04:26:41 dillon Exp $ + * @(#) $DragonFly: src/lib/libatm/timer.c,v 1.3 2008/09/30 16:57:04 swildner Exp $ * */ @@ -75,7 +75,7 @@ int harp_timer_exec; * */ static void -timer_tick() +timer_tick(void) { /* * Bump the timer flag @@ -99,7 +99,7 @@ timer_tick() * */ void -timer_proc() +timer_proc(void) { Harp_timer *htp; void (*f)(); @@ -178,7 +178,7 @@ timer_cont: * */ int -init_timer() +init_timer(void) { int rc = 0; struct itimerval timeval; @@ -226,7 +226,7 @@ init_timer() * */ int -block_timer() +block_timer(void) { /* * Block the SIGALRM signal @@ -249,8 +249,7 @@ block_timer() * */ void -enable_timer(mask) - int mask; +enable_timer(int mask) { /* * Set the signal mask diff --git a/lib/libc_r/uthread/uthread_main_np.c b/lib/libc_r/uthread/uthread_main_np.c index 699f4837d6..68fb09a5b8 100644 --- a/lib/libc_r/uthread/uthread_main_np.c +++ b/lib/libc_r/uthread/uthread_main_np.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc_r/uthread/uthread_main_np.c,v 1.4.2.2 2002/10/22 14:44:03 fjoe Exp $ - * $DragonFly: src/lib/libc_r/uthread/uthread_main_np.c,v 1.3 2005/05/30 20:50:53 joerg Exp $ + * $DragonFly: src/lib/libc_r/uthread/uthread_main_np.c,v 1.4 2008/09/30 16:57:04 swildner Exp $ */ #include @@ -36,7 +36,7 @@ * Provide the equivalent to Solaris thr_main() function */ int -_pthread_main_np() +_pthread_main_np(void) { if (!_thread_initial) diff --git a/lib/libc_r/uthread/uthread_multi_np.c b/lib/libc_r/uthread/uthread_multi_np.c index 7d48bd8469..d6f354226c 100644 --- a/lib/libc_r/uthread/uthread_multi_np.c +++ b/lib/libc_r/uthread/uthread_multi_np.c @@ -30,13 +30,13 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc_r/uthread/uthread_multi_np.c,v 1.4.2.1 2002/10/22 14:44:03 fjoe Exp $ - * $DragonFly: src/lib/libc_r/uthread/uthread_multi_np.c,v 1.3 2005/05/30 20:50:53 joerg Exp $ + * $DragonFly: src/lib/libc_r/uthread/uthread_multi_np.c,v 1.4 2008/09/30 16:57:04 swildner Exp $ */ #include #include int -_pthread_multi_np() +_pthread_multi_np(void) { /* Return to multi-threaded scheduling mode: */ diff --git a/lib/libc_r/uthread/uthread_single_np.c b/lib/libc_r/uthread/uthread_single_np.c index 3dc12b544f..3baea9e24b 100644 --- a/lib/libc_r/uthread/uthread_single_np.c +++ b/lib/libc_r/uthread/uthread_single_np.c @@ -30,12 +30,13 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libc_r/uthread/uthread_single_np.c,v 1.3.2.2 2002/10/22 14:44:03 fjoe Exp $ - * $DragonFly: src/lib/libc_r/uthread/uthread_single_np.c,v 1.3 2005/05/30 20:50:53 joerg Exp $ + * $DragonFly: src/lib/libc_r/uthread/uthread_single_np.c,v 1.4 2008/09/30 16:57:04 swildner Exp $ */ #include #include -int _pthread_single_np() +int +_pthread_single_np(void) { /* Enter single-threaded (non-POSIX) scheduling mode: */ diff --git a/lib/libcompat/4.1/ftime.c b/lib/libcompat/4.1/ftime.c index a474819855..ba8411ea3b 100644 --- a/lib/libcompat/4.1/ftime.c +++ b/lib/libcompat/4.1/ftime.c @@ -28,7 +28,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libcompat/4.1/ftime.c,v 1.5 1999/08/28 00:04:12 peter Exp $ - * $DragonFly: src/lib/libcompat/4.1/ftime.c,v 1.2 2003/06/17 04:26:48 dillon Exp $ + * $DragonFly: src/lib/libcompat/4.1/ftime.c,v 1.3 2008/09/30 16:57:04 swildner Exp $ */ #include @@ -36,8 +36,7 @@ #include int -ftime(tbp) - struct timeb *tbp; +ftime(struct timeb *tbp) { struct timezone tz; struct timeval t; diff --git a/lib/libcompat/4.1/gtty.c b/lib/libcompat/4.1/gtty.c index 3d69d698b8..c146c0aef4 100644 --- a/lib/libcompat/4.1/gtty.c +++ b/lib/libcompat/4.1/gtty.c @@ -28,7 +28,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libcompat/4.1/gtty.c,v 1.5 1999/08/28 00:04:13 peter Exp $ - * $DragonFly: src/lib/libcompat/4.1/gtty.c,v 1.2 2003/06/17 04:26:48 dillon Exp $ + * $DragonFly: src/lib/libcompat/4.1/gtty.c,v 1.3 2008/09/30 16:57:04 swildner Exp $ */ #include @@ -42,9 +42,7 @@ #undef gtty int -gtty(fd, tty) - int fd; - struct sgttyb *tty; +gtty(int fd, struct sgttyb *tty) { return (ioctl(fd, TIOCGETP, tty)); diff --git a/lib/libcompat/4.1/stty.c b/lib/libcompat/4.1/stty.c index 03d03ad48b..5f93cd234f 100644 --- a/lib/libcompat/4.1/stty.c +++ b/lib/libcompat/4.1/stty.c @@ -28,7 +28,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libcompat/4.1/stty.c,v 1.5 1999/08/28 00:04:13 peter Exp $ - * $DragonFly: src/lib/libcompat/4.1/stty.c,v 1.2 2003/06/17 04:26:48 dillon Exp $ + * $DragonFly: src/lib/libcompat/4.1/stty.c,v 1.3 2008/09/30 16:57:04 swildner Exp $ */ #include @@ -42,9 +42,7 @@ #undef stty int -stty(fd, tty) - int fd; - struct sgttyb *tty; +stty(int fd, struct sgttyb *tty) { return (ioctl(fd, TIOCSETP, tty)); diff --git a/lib/libcompat/4.3/cfree.c b/lib/libcompat/4.3/cfree.c index bc07608b80..fa7b1bf541 100644 --- a/lib/libcompat/4.3/cfree.c +++ b/lib/libcompat/4.3/cfree.c @@ -31,13 +31,14 @@ * SUCH DAMAGE. * * @(#)cfree.c 8.1 (Berkeley) 6/4/93 + * + * $DragonFly: src/lib/libcompat/4.3/cfree.c,v 1.3 2008/09/30 16:57:04 swildner Exp $ */ #include void -cfree(p) - void *p; +cfree(void *p) { free(p); } diff --git a/lib/libcompat/4.3/insque.c b/lib/libcompat/4.3/insque.c index 3c5a83f12b..f56ff4f272 100644 --- a/lib/libcompat/4.3/insque.c +++ b/lib/libcompat/4.3/insque.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)insque.c 8.1 (Berkeley) 6/4/93 - * $DragonFly: src/lib/libcompat/4.3/insque.c,v 1.3 2004/10/25 19:38:02 drhodus Exp $ + * $DragonFly: src/lib/libcompat/4.3/insque.c,v 1.4 2008/09/30 16:57:04 swildner Exp $ */ /* @@ -46,8 +46,7 @@ struct vaxque { /* queue format expected by VAX queue instructions */ }; void -insque(e, prev) - struct vaxque *e, *prev; +insque(struct vaxque *e, struct vaxque *prev) { e->vq_prev = prev; e->vq_next = prev->vq_next; diff --git a/lib/libcompat/4.3/regex.c b/lib/libcompat/4.3/regex.c index 1a3a66eb69..f7bfe8032a 100644 --- a/lib/libcompat/4.3/regex.c +++ b/lib/libcompat/4.3/regex.c @@ -34,6 +34,8 @@ * SUCH DAMAGE. * * @(#)regex.c 5.1 (Berkeley) 3/29/92 + * + * $DragonFly: src/lib/libcompat/4.3/regex.c,v 1.3 2008/09/30 16:57:04 swildner Exp $ */ /* @@ -55,8 +57,7 @@ static int re_goterr; static char *re_errstr; char * -re_comp(s) - char *s; +re_comp(char *s) { if (s == NULL || *s == '\0') { if (re_regexp == NULL) @@ -73,8 +74,7 @@ re_comp(s) } int -re_exec(s) - char *s; +re_exec(char *s) { int rc; @@ -84,8 +84,7 @@ re_exec(s) } void -regerror(s) - const char *s; +regerror(const char *s) { re_goterr = 1; if (re_errstr) diff --git a/lib/libcompat/4.3/remque.c b/lib/libcompat/4.3/remque.c index a395e22f5c..a9f4d5edaa 100644 --- a/lib/libcompat/4.3/remque.c +++ b/lib/libcompat/4.3/remque.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)remque.c 8.1 (Berkeley) 6/4/93 - * $DragonFly: src/lib/libcompat/4.3/remque.c,v 1.3 2004/10/25 19:38:02 drhodus Exp $ + * $DragonFly: src/lib/libcompat/4.3/remque.c,v 1.4 2008/09/30 16:57:04 swildner Exp $ */ /* @@ -46,8 +46,7 @@ struct vaxque { /* queue format expected by VAX queue instructions */ }; void -remque(e) - struct vaxque *e; +remque(struct vaxque *e) { e->vq_prev->vq_next = e->vq_next; e->vq_next->vq_prev = e->vq_prev; diff --git a/lib/libcompat/4.3/rexec.c b/lib/libcompat/4.3/rexec.c index 10b90686a9..36540ac375 100644 --- a/lib/libcompat/4.3/rexec.c +++ b/lib/libcompat/4.3/rexec.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libcompat/4.3/rexec.c,v 1.5.8.3 2000/11/22 13:36:00 ben Exp $ - * $DragonFly: src/lib/libcompat/4.3/rexec.c,v 1.4 2008/09/04 09:08:22 hasso Exp $ + * $DragonFly: src/lib/libcompat/4.3/rexec.c,v 1.5 2008/09/30 16:57:04 swildner Exp $ * * @(#)rexec.c 8.1 (Berkeley) 6/4/93 */ @@ -97,7 +97,7 @@ static struct toktab { }; static int -token() +token(void) { char *cp; int c; @@ -136,8 +136,7 @@ token() } static int -ruserpass(host, aname, apass, aacct) - char *host, **aname, **apass, **aacct; +ruserpass(char *host, char **aname, char **apass, char **aacct) { char *hdir, buf[BUFSIZ], *tmp; char myname[MAXHOSTNAMELEN], *mydomain; @@ -295,12 +294,8 @@ bad: } int -rexec_af(ahost, rport, name, pass, cmd, fd2p, af) - char **ahost; - int rport; - const char *name, *pass, *cmd; - int *fd2p; - sa_family_t af; +rexec_af(char **ahost, int rport, const char *name, const char *pass, + const char *cmd, int *fd2p, sa_family_t *af) { struct sockaddr_storage sa2, from; struct addrinfo hints, *res0; @@ -339,7 +334,7 @@ rexec_af(ahost, rport, name, pass, cmd, fd2p, af) __set_errno (ENOENT); return -1; } - ruserpass(res0->ai_canonname, &name, &pass); + ruserpass(res0->ai_canonname, &name, &pass, 0); retry: s = socket(res0->ai_family, res0->ai_socktype, 0); if (s < 0) { @@ -436,11 +431,7 @@ bad: int -rexec(ahost, rport, name, pass, cmd, fd2p) - char **ahost; - int rport; - char *name, *pass, *cmd; - int *fd2p; +rexec(char **ahost, int rport, char *name, char *pass, char *cmd, int *fd2p) { struct sockaddr_in sin, sin2, from; struct hostent *hp; diff --git a/lib/libcompat/4.4/cuserid.c b/lib/libcompat/4.4/cuserid.c index 6ce6a3c0f3..73a9cda3ae 100644 --- a/lib/libcompat/4.4/cuserid.c +++ b/lib/libcompat/4.4/cuserid.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)cuserid.c 8.1 (Berkeley) 6/4/93 - * $DragonFly: src/lib/libcompat/4.4/cuserid.c,v 1.3 2004/10/25 19:38:02 drhodus Exp $ + * $DragonFly: src/lib/libcompat/4.4/cuserid.c,v 1.4 2008/09/30 16:57:04 swildner Exp $ */ #include @@ -40,8 +40,7 @@ #include char * -cuserid(s) - char *s; +cuserid(char *s) { struct passwd *pwd; diff --git a/lib/libcompat/regexp/regerror.c b/lib/libcompat/regexp/regerror.c index 6d0077d634..d16e5d8c9d 100644 --- a/lib/libcompat/regexp/regerror.c +++ b/lib/libcompat/regexp/regerror.c @@ -1,9 +1,10 @@ +/* $DragonFly: src/lib/libcompat/regexp/regerror.c,v 1.2 2008/09/30 16:57:04 swildner Exp $ */ + #include #include void -regerror(s) -const char *s; +regerror(const char *s) { #ifdef ERRAVAIL error("regexp: %s", s); diff --git a/lib/libcompat/regexp/regexp.c b/lib/libcompat/regexp/regexp.c index 3bc388bec4..290d009895 100644 --- a/lib/libcompat/regexp/regexp.c +++ b/lib/libcompat/regexp/regexp.c @@ -1,4 +1,4 @@ -/* $DragonFly: src/lib/libcompat/regexp/regexp.c,v 1.2 2004/10/25 19:38:02 drhodus Exp $ */ +/* $DragonFly: src/lib/libcompat/regexp/regexp.c,v 1.3 2008/09/30 16:57:04 swildner Exp $ */ /* * regcomp and regexec -- regsub and regerror are elsewhere * @@ -173,18 +173,18 @@ static long regsize; /* Code size. */ #ifndef STATIC #define STATIC static #endif -STATIC char *reg(); -STATIC char *regbranch(); -STATIC char *regpiece(); -STATIC char *regatom(); -STATIC char *regnode(); -STATIC char *regnext(); -STATIC void regc(); -STATIC void reginsert(); -STATIC void regtail(); -STATIC void regoptail(); +STATIC char *reg(int, int *); +STATIC char *regbranch(int *); +STATIC char *regpiece(int *); +STATIC char *regatom(int *); +STATIC char *regnode(char); +STATIC char *regnext(char *); +STATIC void regc(char); +STATIC void reginsert(char, char *); +STATIC void regtail(char *, char *); +STATIC void regoptail(char *, char *); #ifdef STRCSPN -STATIC int strcspn(); +STATIC int strcspn(char *, char *); #endif /* @@ -203,8 +203,7 @@ STATIC int strcspn(); * of the structure of the compiled regexp. */ regexp * -regcomp(exp) -const char *exp; +regcomp(const char *exp) { regexp *r; char *scan; @@ -293,9 +292,7 @@ const char *exp; * follows makes it hard to avoid. */ static char * -reg(paren, flagp) -int paren; /* Parenthesized? */ -int *flagp; +reg(int paren, int *flagp) { char *ret; char *br; @@ -365,8 +362,7 @@ int *flagp; * Implements the concatenation operator. */ static char * -regbranch(flagp) -int *flagp; +regbranch(int *flagp) { char *ret; char *chain; @@ -405,8 +401,7 @@ int *flagp; * endmarker role is not redundant. */ static char * -regpiece(flagp) -int *flagp; +regpiece(int *flagp) { char *ret; char op; @@ -469,8 +464,7 @@ int *flagp; * separate node; the code is simpler that way and it's not worth fixing. */ static char * -regatom(flagp) -int *flagp; +regatom(int *flagp) { char *ret; int flags; @@ -659,8 +653,7 @@ int *flagp; - regnode - emit a node */ static char * /* Location. */ -regnode(op) -char op; +regnode(char op) { char *ret; char *ptr; @@ -684,8 +677,7 @@ char op; - regc - emit (if appropriate) a byte of code */ static void -regc(b) -char b; +regc(char b) { if (regcode != ®dummy) *regcode++ = b; @@ -699,9 +691,7 @@ char b; * Means relocating the operand. */ static void -reginsert(op, opnd) -char op; -char *opnd; +reginsert(char op, char *opnd) { char *src; char *dst; @@ -728,9 +718,7 @@ char *opnd; - regtail - set the next-pointer at the end of a node chain */ static void -regtail(p, val) -char *p; -char *val; +regtail(char *p, char *val) { char *scan; char *temp; @@ -760,9 +748,7 @@ char *val; - regoptail - regtail on operand of first argument; nop if operandless */ static void -regoptail(p, val) -char *p; -char *val; +regoptail(char *p, char *val) { /* "Operandless" and "op != BRANCH" are synonymous in practice. */ if (p == NULL || p == ®dummy || OP(p) != BRANCH) @@ -799,9 +785,7 @@ STATIC char *regprop(); - regexec - match a regexp against a string */ int -regexec(prog, string) -const regexp *prog; -const char *string; +regexec(const regexp *prog, const char *string) { char *s; extern char *strchr(); @@ -861,9 +845,7 @@ const char *string; - regtry - try match at specific point */ static int /* 0 failure, 1 success */ -regtry(prog, string) -regexp *prog; -char *string; +regtry(regexp *prog, char *string) { int i; char **sp; @@ -898,8 +880,7 @@ char *string; * by recursion. */ static int /* 0 failure, 1 success */ -regmatch(prog) -char *prog; +regmatch(char *prog) { char *scan; /* Current node. */ char *next; /* Next node. */ @@ -1100,8 +1081,7 @@ char *prog; - regrepeat - repeatedly match something simple, report how many */ static int -regrepeat(p) -char *p; +regrepeat(char *p) { int count = 0; char *scan; @@ -1146,8 +1126,7 @@ char *p; - regnext - dig the "next" pointer out of a node */ static char * -regnext(p) -char *p; +regnext(char *p) { int offset; @@ -1172,8 +1151,7 @@ STATIC char *regprop(); - regdump - dump a regexp onto stdout in vaguely comprehensible form */ void -regdump(r) -regexp *r; +regdump(regexp *r) { char *s; char op = EXACTLY; /* Arbitrary non-END op. */ @@ -1216,8 +1194,7 @@ regexp *r; - regprop - printable representation of opcode */ static char * -regprop(op) -char *op; +regprop(char *op) { char *p; static char buf[50]; @@ -1314,9 +1291,7 @@ char *op; */ static int -strcspn(s1, s2) -char *s1; -char *s2; +strcspn(char *s1, char *s2) { char *scan1; char *scan2; diff --git a/lib/libcompat/regexp/regsub.c b/lib/libcompat/regexp/regsub.c index 57b9eb0fcb..2593ab1b31 100644 --- a/lib/libcompat/regexp/regsub.c +++ b/lib/libcompat/regexp/regsub.c @@ -1,4 +1,4 @@ -/* $DragonFly: src/lib/libcompat/regexp/regsub.c,v 1.2 2004/10/25 19:38:02 drhodus Exp $ */ +/* $DragonFly: src/lib/libcompat/regexp/regsub.c,v 1.3 2008/09/30 16:57:04 swildner Exp $ */ /* * regsub * @@ -34,10 +34,7 @@ - regsub - perform substitutions after a regexp match */ void -regsub(prog, source, dest) -const regexp *prog; -const char *source; -char *dest; +regsub(const regexp *prog, const char *source, char *dest) { char *src; char *dst; diff --git a/lib/libedit/chared.c b/lib/libedit/chared.c index b99e9ed162..90eacf6c48 100644 --- a/lib/libedit/chared.c +++ b/lib/libedit/chared.c @@ -31,7 +31,7 @@ * * @(#)chared.c 8.1 (Berkeley) 6/4/93 * $NetBSD: chared.c,v 1.25 2005/08/08 01:41:30 christos Exp $ - * $DragonFly: src/lib/libedit/chared.c,v 1.8 2007/05/05 00:27:39 pavalos Exp $ + * $DragonFly: src/lib/libedit/chared.c,v 1.9 2008/09/30 16:57:05 swildner Exp $ */ #include "config.h" @@ -525,8 +525,7 @@ ch_reset(EditLine *el, int mclear) } private void -ch__clearmacro(el) - EditLine *el; +ch__clearmacro(EditLine *el) { c_macro_t *ma = &el->el_chared.c_macro; while (ma->level >= 0) @@ -538,9 +537,7 @@ ch__clearmacro(el) * Returns 1 if successful, 0 if not. */ protected int -ch_enlargebufs(el, addlen) - EditLine *el; - size_t addlen; +ch_enlargebufs(EditLine *el, size_t addlen) { size_t sz, newsz; char *newbuffer, *oldbuf, *oldkbuf; diff --git a/lib/libedit/readline.c b/lib/libedit/readline.c index 1f7930351e..501b6de1b5 100644 --- a/lib/libedit/readline.c +++ b/lib/libedit/readline.c @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $NetBSD: readline.c,v 1.75 2008/04/29 06:53:01 martin Exp $ - * $DragonFly: src/lib/libedit/readline.c,v 1.4 2008/05/17 22:48:04 pavalos Exp $ + * $DragonFly: src/lib/libedit/readline.c,v 1.5 2008/09/30 16:57:05 swildner Exp $ */ #include "config.h" @@ -1661,7 +1661,7 @@ rl_add_defun(const char *name, Function *fun, int c) } void -rl_callback_read_char() +rl_callback_read_char(void) { int count = 0, done = 0; const char *buf = el_gets(e, &count); diff --git a/lib/libipsec/ipsec_dump_policy.c b/lib/libipsec/ipsec_dump_policy.c index 02ea08b780..0d1460c059 100644 --- a/lib/libipsec/ipsec_dump_policy.c +++ b/lib/libipsec/ipsec_dump_policy.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/lib/libipsec/ipsec_dump_policy.c,v 1.1.2.1 2000/07/15 07:24:04 kris Exp $ */ -/* $DragonFly: src/lib/libipsec/ipsec_dump_policy.c,v 1.3 2003/11/12 20:21:30 eirikn Exp $ */ +/* $DragonFly: src/lib/libipsec/ipsec_dump_policy.c,v 1.4 2008/09/30 16:57:05 swildner Exp $ */ /* $KAME: ipsec_dump_policy.c,v 1.11 2000/05/07 05:29:47 itojun Exp $ */ /* @@ -68,9 +68,7 @@ static char *set_address (char *, size_t, struct sockaddr *); * When delimiter == NULL, alternatively ' '(space) is applied. */ char * -ipsec_dump_policy(policy, delimiter) - caddr_t policy; - char *delimiter; +ipsec_dump_policy(caddr_t policy, char *delimiter) { struct sadb_x_policy *xpl = (struct sadb_x_policy *)policy; struct sadb_x_ipsecrequest *xisr; @@ -172,11 +170,8 @@ ipsec_dump_policy(policy, delimiter) } static char * -ipsec_dump_ipsecrequest(buf, len, xisr, bound) - char *buf; - size_t len; - struct sadb_x_ipsecrequest *xisr; - size_t bound; /* boundary */ +ipsec_dump_ipsecrequest(char *buf, size_t len, + struct sadb_x_ipsecrequest *xisr, size_t bound) { const char *proto, *mode, *level; char abuf[NI_MAXHOST * 2 + 2]; @@ -270,11 +265,7 @@ ipsec_dump_ipsecrequest(buf, len, xisr, bound) } static int -set_addresses(buf, len, sa1, sa2) - char *buf; - size_t len; - struct sockaddr *sa1; - struct sockaddr *sa2; +set_addresses(char *buf, size_t len, struct sockaddr *sa1, struct sockaddr *sa2) { char tmp1[NI_MAXHOST], tmp2[NI_MAXHOST]; @@ -288,10 +279,7 @@ set_addresses(buf, len, sa1, sa2) } static char * -set_address(buf, len, sa) - char *buf; - size_t len; - struct sockaddr *sa; +set_address(char *buf, size_t len, struct sockaddr *sa) { #ifdef NI_WITHSCOPEID const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID; diff --git a/lib/libipsec/ipsec_get_policylen.c b/lib/libipsec/ipsec_get_policylen.c index 7005d31f4c..39361db89d 100644 --- a/lib/libipsec/ipsec_get_policylen.c +++ b/lib/libipsec/ipsec_get_policylen.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/lib/libipsec/ipsec_get_policylen.c,v 1.1.2.1 2000/07/15 07:24:04 kris Exp $ */ -/* $DragonFly: src/lib/libipsec/ipsec_get_policylen.c,v 1.2 2003/06/17 04:26:49 dillon Exp $ */ +/* $DragonFly: src/lib/libipsec/ipsec_get_policylen.c,v 1.3 2008/09/30 16:57:05 swildner Exp $ */ /* $KAME: ipsec_get_policylen.c,v 1.5 2000/05/07 05:25:03 itojun Exp $ */ /* @@ -41,8 +41,7 @@ #include "ipsec_strerror.h" int -ipsec_get_policylen(policy) - caddr_t policy; +ipsec_get_policylen(caddr_t policy) { return policy ? PFKEY_EXTLEN(policy) : -1; } diff --git a/lib/libipsec/policy_parse.y b/lib/libipsec/policy_parse.y index 8de2b77685..4954d82667 100644 --- a/lib/libipsec/policy_parse.y +++ b/lib/libipsec/policy_parse.y @@ -1,5 +1,5 @@ /* $FreeBSD: src/lib/libipsec/policy_parse.y,v 1.1.2.1 2000/07/15 07:24:04 kris Exp $ */ -/* $DragonFly: src/lib/libipsec/policy_parse.y,v 1.3 2003/11/12 20:21:30 eirikn Exp $ */ +/* $DragonFly: src/lib/libipsec/policy_parse.y,v 1.4 2008/09/30 16:57:05 swildner Exp $ */ /* $KAME: policy_parse.y,v 1.10 2000/05/07 05:25:03 itojun Exp $ */ /* @@ -208,8 +208,7 @@ addresses %% void -yyerror(msg) - char *msg; +yyerror(char *msg) { extern char *__libipsecyytext; /*XXX*/ @@ -220,8 +219,7 @@ yyerror(msg) } static struct sockaddr * -parse_sockaddr(buf) - struct _val *buf; +parse_sockaddr(struct _val *buf) { struct addrinfo hints, *res; char *serv = NULL; @@ -259,7 +257,7 @@ parse_sockaddr(buf) } static int -rule_check() +rule_check(void) { if (p_type == IPSEC_POLICY_IPSEC) { if (p_protocol == IPPROTO_IP) { @@ -290,7 +288,7 @@ rule_check() } static int -init_x_policy() +init_x_policy(void) { struct sadb_x_policy *p; @@ -314,8 +312,7 @@ init_x_policy() } static int -set_x_request(src, dst) - struct sockaddr *src, *dst; +set_x_request(struct sockaddr *src, struct sockaddr *dst) { struct sadb_x_ipsecrequest *p; int reqlen; @@ -346,8 +343,7 @@ set_x_request(src, dst) } static int -set_sockaddr(addr) - struct sockaddr *addr; +set_sockaddr(struct sockaddr *addr) { if (addr == NULL) { __ipsec_errcode = EIPSEC_NO_ERROR; @@ -365,7 +361,7 @@ set_sockaddr(addr) } static void -policy_parse_request_init() +policy_parse_request_init(void) { p_protocol = IPPROTO_IP; p_mode = IPSEC_MODE_ANY; @@ -384,9 +380,7 @@ policy_parse_request_init() } static caddr_t -policy_parse(msg, msglen) - char *msg; - int msglen; +policy_parse(char *msg, int msglen) { int error; pbuf = NULL; @@ -414,9 +408,7 @@ policy_parse(msg, msglen) } caddr_t -ipsec_set_policy(msg, msglen) - char *msg; - int msglen; +ipsec_set_policy(char *msg, int msglen) { caddr_t policy; diff --git a/lib/libipsec/policy_token.l b/lib/libipsec/policy_token.l index 706172d89b..10434481b4 100644 --- a/lib/libipsec/policy_token.l +++ b/lib/libipsec/policy_token.l @@ -1,5 +1,5 @@ /* $FreeBSD: src/lib/libipsec/policy_token.l,v 1.2.2.2 2001/07/03 11:01:15 ume Exp $ */ -/* $DragonFly: src/lib/libipsec/policy_token.l,v 1.3 2003/11/12 20:21:30 eirikn Exp $ */ +/* $DragonFly: src/lib/libipsec/policy_token.l,v 1.4 2008/09/30 16:57:05 swildner Exp $ */ /* $KAME: policy_token.l,v 1.11 2000/12/01 10:08:29 sakane Exp $ */ /* @@ -136,8 +136,7 @@ unique { yylval.num = IPSEC_LEVEL_UNIQUE; return(LEVEL); } void __policy__strbuffer__init__ (char *); void -__policy__strbuffer__init__(msg) - char *msg; +__policy__strbuffer__init__(char *msg) { YY_BUFFER_STATE yyb; diff --git a/lib/libmd/md2c.c b/lib/libmd/md2c.c index 42f815aba3..61f94daf91 100644 --- a/lib/libmd/md2c.c +++ b/lib/libmd/md2c.c @@ -1,6 +1,6 @@ /* MD2C.C - RSA Data Security, Inc., MD2 message-digest algorithm * $FreeBSD: src/lib/libmd/md2c.c,v 1.11 2006/01/17 15:35:56 phk Exp $ - * $DragonFly: src/lib/libmd/md2c.c,v 1.3 2008/09/11 20:25:34 swildner Exp $ + * $DragonFly: src/lib/libmd/md2c.c,v 1.4 2008/09/30 16:57:05 swildner Exp $ */ /* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All @@ -85,8 +85,8 @@ static unsigned char *PADDING[] = { /* MD2 initialization. Begins an MD2 operation, writing a new context. */ -void MD2Init (context) -MD2_CTX *context; /* context */ +void +MD2Init (MD2_CTX *context) { context->count = 0; memset ((POINTER)context->state, 0, sizeof (context->state)); @@ -98,10 +98,8 @@ MD2_CTX *context; /* context */ operation, processing another message block, and updating the context. */ -void MD2Update (context, in, inputLen) -MD2_CTX *context; /* context */ -const void *in; /* input block */ -unsigned int inputLen; /* length of input block */ +void +MD2Update (MD2_CTX *context, const void *in, unsigned int inputLen) { unsigned int i, idx, partLen; const unsigned char *input = in; @@ -135,8 +133,8 @@ unsigned int inputLen; /* length of input block */ /* MD2 padding. */ -void MD2Pad (context) -MD2_CTX *context; /* context */ +void +MD2Pad (MD2_CTX *context) { unsigned int idx, padLen; @@ -153,9 +151,8 @@ MD2_CTX *context; /* context */ /* MD2 finalization. Ends an MD2 message-digest operation, writing the message digest and zeroizing the context. */ -void MD2Final (digest, context) -unsigned char digest[16]; /* message digest */ -MD2_CTX *context; /* context */ +void +MD2Final (unsigned char digest[16], MD2_CTX *context) { /* Do padding */ MD2Pad (context); @@ -171,10 +168,9 @@ MD2_CTX *context; /* context */ /* MD2 basic transformation. Transforms state and updates checksum based on block. */ -static void MD2Transform (state, checksum, block) -unsigned char state[16]; -unsigned char checksum[16]; -const unsigned char block[16]; +static void +MD2Transform (unsigned char state[16], unsigned char checksum[16], + const unsigned char block[16]) { unsigned int i, j, t; unsigned char x[48]; diff --git a/lib/libmd/md4c.c b/lib/libmd/md4c.c index 000a205a1b..117e49db09 100644 --- a/lib/libmd/md4c.c +++ b/lib/libmd/md4c.c @@ -1,6 +1,6 @@ /* MD4C.C - RSA Data Security, Inc., MD4 message-digest algorithm * $FreeBSD: src/lib/libmd/md4c.c,v 1.10 2006/01/17 15:35:56 phk Exp $ - * $DragonFly: src/lib/libmd/md4c.c,v 1.3 2008/09/11 20:25:34 swildner Exp $ + * $DragonFly: src/lib/libmd/md4c.c,v 1.4 2008/09/30 16:57:05 swildner Exp $ */ /* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved. @@ -89,8 +89,8 @@ static unsigned char PADDING[64] = { /* MD4 initialization. Begins an MD4 operation, writing a new context. */ -void MD4Init (context) -MD4_CTX *context; /* context */ +void +MD4Init (MD4_CTX *context) { context->count[0] = context->count[1] = 0; @@ -106,10 +106,8 @@ MD4_CTX *context; /* context */ operation, processing another message block, and updating the context. */ -void MD4Update (context, in, inputLen) -MD4_CTX *context; /* context */ -const void *in; /* input block */ -unsigned int inputLen; /* length of input block */ +void +MD4Update (MD4_CTX *context, const void *in, unsigned int inputLen) { unsigned int i, idx, partLen; const unsigned char *input = in; @@ -145,8 +143,8 @@ unsigned int inputLen; /* length of input block */ } /* MD4 padding. */ -void MD4Pad (context) -MD4_CTX *context; /* context */ +void +MD4Pad (MD4_CTX *context) { unsigned char bits[8]; unsigned int idx, padLen; @@ -167,9 +165,8 @@ MD4_CTX *context; /* context */ /* MD4 finalization. Ends an MD4 message-digest operation, writing the the message digest and zeroizing the context. */ -void MD4Final (digest, context) -unsigned char digest[16]; /* message digest */ -MD4_CTX *context; /* context */ +void +MD4Final (unsigned char digest[16], MD4_CTX *context) { /* Do padding */ MD4Pad (context); @@ -184,9 +181,8 @@ MD4_CTX *context; /* context */ /* MD4 basic transformation. Transforms state based on block. */ -static void MD4Transform (state, block) -UINT4 state[4]; -const unsigned char block[64]; +static void +MD4Transform (UINT4 state[4], const unsigned char block[64]) { UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; @@ -259,10 +255,8 @@ const unsigned char block[64]; /* Encodes input (UINT4) into output (unsigned char). Assumes len is a multiple of 4. */ -static void Encode (output, input, len) -unsigned char *output; -UINT4 *input; -unsigned int len; +static void +Encode (unsigned char *output, UINT4 *input, unsigned int len) { unsigned int i, j; @@ -277,11 +271,8 @@ unsigned int len; /* Decodes input (unsigned char) into output (UINT4). Assumes len is a multiple of 4. */ -static void Decode (output, input, len) - -UINT4 *output; -const unsigned char *input; -unsigned int len; +static void +Decode (UINT4 *output, const unsigned char *input, unsigned int len) { unsigned int i, j; diff --git a/lib/libmd/md5c.c b/lib/libmd/md5c.c index 1fd98f5114..719388e747 100644 --- a/lib/libmd/md5c.c +++ b/lib/libmd/md5c.c @@ -23,7 +23,7 @@ * documentation and/or software. * * $FreeBSD: src/lib/libmd/md5c.c,v 1.17 2006/01/17 15:35:56 phk Exp $ - * $DragonFly: src/lib/libmd/md5c.c,v 1.4 2008/09/11 20:25:34 swildner Exp $ + * $DragonFly: src/lib/libmd/md5c.c,v 1.5 2008/09/30 16:57:05 swildner Exp $ * * This code is the same as the code published by RSA Inc. It has been * edited for clarity and style only. @@ -127,8 +127,7 @@ static unsigned char PADDING[64] = { /* MD5 initialization. Begins an MD5 operation, writing a new context. */ void -MD5Init (context) - MD5_CTX *context; +MD5Init (MD5_CTX *context) { context->count[0] = context->count[1] = 0; @@ -147,10 +146,7 @@ MD5Init (context) */ void -MD5Update (context, in, inputLen) - MD5_CTX *context; - const void *in; - unsigned int inputLen; +MD5Update (MD5_CTX *context, const void *in, unsigned int inputLen) { unsigned int i, idx, partLen; const unsigned char *input = in; @@ -190,8 +186,7 @@ MD5Update (context, in, inputLen) */ void -MD5Pad (context) - MD5_CTX *context; +MD5Pad (MD5_CTX *context) { unsigned char bits[8]; unsigned int idx, padLen; @@ -214,9 +209,7 @@ MD5Pad (context) */ void -MD5Final (digest, context) - unsigned char digest[16]; - MD5_CTX *context; +MD5Final (unsigned char digest[16], MD5_CTX *context) { /* Do padding. */ MD5Pad (context); @@ -231,9 +224,7 @@ MD5Final (digest, context) /* MD5 basic transformation. Transforms state based on block. */ static void -MD5Transform (state, block) - u_int32_t state[4]; - const unsigned char block[64]; +MD5Transform (u_int32_t state[4], const unsigned char block[64]) { u_int32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16]; diff --git a/lib/libmd/rmd160c.c b/lib/libmd/rmd160c.c index c7aece5d08..98a1d9f78e 100644 --- a/lib/libmd/rmd160c.c +++ b/lib/libmd/rmd160c.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] * * $FreeBSD: src/lib/libmd/rmd160c.c,v 1.7 2006/01/17 15:35:56 phk Exp $ - * $DragonFly: src/lib/libmd/rmd160c.c,v 1.5 2008/09/11 20:25:34 swildner Exp $ + * $DragonFly: src/lib/libmd/rmd160c.c,v 1.6 2008/09/30 16:57:05 swildner Exp $ */ #include @@ -85,8 +85,8 @@ void ripemd160_block_x86(RIPEMD160_CTX *c, const u_int32_t *p,int num); void ripemd160_block(RIPEMD160_CTX *c, const u_int32_t *p,int num); #endif -void RIPEMD160_Init(c) -RIPEMD160_CTX *c; +void +RIPEMD160_Init(RIPEMD160_CTX *c) { c->A=RIPEMD160_A; c->B=RIPEMD160_B; @@ -98,10 +98,8 @@ RIPEMD160_CTX *c; c->num=0; } -void RIPEMD160_Update(c, in, len) -RIPEMD160_CTX *c; -const void *in; -size_t len; +void +RIPEMD160_Update(RIPEMD160_CTX *c, const void *in, size_t len) { u_int32_t *p; int sw,sc; @@ -230,9 +228,8 @@ size_t len; } } -void RIPEMD160_Transform(c,b) -RIPEMD160_CTX *c; -unsigned char *b; +void +RIPEMD160_Transform(RIPEMD160_CTX *c, unsigned char *b) { u_int32_t p[16]; #if BYTE_ORDER != LITTLE_ENDIAN @@ -269,10 +266,8 @@ unsigned char *b; #ifndef RMD160_ASM -void ripemd160_block(ctx, X, num) -RIPEMD160_CTX *ctx; -const u_int32_t *X; -int num; +void +ripemd160_block(RIPEMD160_CTX *ctx, const u_int32_t *X, int num) { u_int32_t A,B,C,D,E; u_int32_t a,b,c,d,e; @@ -469,9 +464,8 @@ int num; } #endif -void RIPEMD160_Final(md, c) -unsigned char *md; -RIPEMD160_CTX *c; +void +RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c) { int i,j; u_int32_t l; @@ -527,8 +521,8 @@ RIPEMD160_CTX *c; } #ifdef undef -int printit(l) -unsigned long *l; +int +printit(unsigned long *l) { int i,ii; diff --git a/lib/libmd/sha0c.c b/lib/libmd/sha0c.c index fa5b3762f8..9dc72db32a 100644 --- a/lib/libmd/sha0c.c +++ b/lib/libmd/sha0c.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] * * $FreeBSD: src/lib/libmd/sha0c.c,v 1.6 2006/01/17 15:35:56 phk Exp $ - * $DragonFly: src/lib/libmd/sha0c.c,v 1.5 2008/09/11 20:25:34 swildner Exp $ + * $DragonFly: src/lib/libmd/sha0c.c,v 1.6 2008/09/30 16:57:05 swildner Exp $ */ #include @@ -99,8 +99,8 @@ char *SHA_version="SHA part of SSLeay 0.9.0b 11-Oct-1998"; #define M_p_c2nl_p p_c2nl_p #define M_nl2c nl2c -void SHA_Init(c) -SHA_CTX *c; +void +SHA_Init(SHA_CTX *c) { c->h0=INIT_DATA_h0; c->h1=INIT_DATA_h1; @@ -112,10 +112,8 @@ SHA_CTX *c; c->num=0; } -void SHA_Update(c, in, len) -SHA_CTX *c; -const void *in; -size_t len; +void +SHA_Update(SHA_CTX *c, const void *in, size_t len) { u_int32_t *p; int ew,ec,sw,sc; @@ -246,9 +244,8 @@ size_t len; p[sw]=l; } -void SHA_Transform(c,b) -SHA_CTX *c; -unsigned char *b; +void +SHA_Transform(SHA_CTX *c, unsigned char *b) { u_int32_t p[16]; #if BYTE_ORDER == LITTLE_ENDIAN @@ -283,10 +280,8 @@ unsigned char *b; sha_block(c,p,64); } -void sha_block(c, W, num) -SHA_CTX *c; -const u_int32_t *W; -int num; +void +sha_block(SHA_CTX *c, const u_int32_t *W, int num) { u_int32_t A,B,C,D,E,T; u_int32_t X[16]; @@ -402,9 +397,8 @@ int num; } } -void SHA_Final(md, c) -unsigned char *md; -SHA_CTX *c; +void +SHA_Final(unsigned char *md, SHA_CTX *c) { int i,j; u_int32_t l; diff --git a/lib/libmd/sha1c.c b/lib/libmd/sha1c.c index 9a8043361b..5c93c46cba 100644 --- a/lib/libmd/sha1c.c +++ b/lib/libmd/sha1c.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] * * $FreeBSD: src/lib/libmd/sha1c.c,v 1.5 2006/01/17 15:35:56 phk Exp $ - * $DragonFly: src/lib/libmd/sha1c.c,v 1.4 2008/09/11 20:25:34 swildner Exp $ + * $DragonFly: src/lib/libmd/sha1c.c,v 1.5 2008/09/30 16:57:05 swildner Exp $ */ #include @@ -126,8 +126,8 @@ char *SHA1_version="SHA1 part of SSLeay 0.9.0b 11-Oct-1998"; # define M_nl2c nl2c #endif -void SHA1_Init(c) -SHA_CTX *c; +void +SHA1_Init(SHA_CTX *c) { c->h0=INIT_DATA_h0; c->h1=INIT_DATA_h1; @@ -140,10 +140,7 @@ SHA_CTX *c; } void -SHA1_Update(c, in, len) - SHA_CTX *c; - const void *in; - size_t len; +SHA1_Update(SHA_CTX *c, const void *in, size_t len) { u_int32_t *p; int ew,ec,sw,sc; @@ -274,9 +271,8 @@ SHA1_Update(c, in, len) p[sw]=l; } -void SHA1_Transform(c,b) -SHA_CTX *c; -unsigned char *b; +void +SHA1_Transform(SHA_CTX *c, unsigned char *b) { u_int32_t p[16]; #if BYTE_ORDER != BIG_ENDIAN @@ -314,10 +310,7 @@ unsigned char *b; #ifndef SHA1_ASM void -sha1_block(c, W, num) - SHA_CTX *c; - const u_int32_t *W; - int num; +sha1_block(SHA_CTX *c, const u_int32_t *W, int num) { u_int32_t A,B,C,D,E,T; u_int32_t X[16]; @@ -434,9 +427,8 @@ sha1_block(c, W, num) } #endif -void SHA1_Final(md, c) -unsigned char *md; -SHA_CTX *c; +void +SHA1_Final(unsigned char *md, SHA_CTX *c) { int i,j; u_int32_t l; diff --git a/lib/libncp/ipx.c b/lib/libncp/ipx.c index bde039ab7d..4f2987409a 100644 --- a/lib/libncp/ipx.c +++ b/lib/libncp/ipx.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libncp/ipx.c,v 1.1 1999/10/12 11:56:37 bp Exp $ - * $DragonFly: src/lib/libncp/ipx.c,v 1.3 2003/11/12 20:21:31 eirikn Exp $ + * $DragonFly: src/lib/libncp/ipx.c,v 1.4 2008/09/30 16:57:05 swildner Exp $ */ #include #include @@ -288,12 +288,8 @@ ipx_iffind(char *ifname,struct ipx_addr *addr){ int -if_ipxscan(addrcount, sdl, ifm, ifam, addr) - int addrcount; - struct sockaddr_dl *sdl; - struct if_msghdr *ifm; - struct ifa_msghdr *ifam; - struct ipx_addr *addr; +if_ipxscan(int addrcount, struct sockaddr_dl *sdl, struct if_msghdr *ifm, + struct ifa_msghdr *ifam, struct ipx_addr *addr) { struct rt_addrinfo info; struct sockaddr_ipx *sipx; @@ -334,9 +330,7 @@ if_ipxscan(addrcount, sdl, ifm, ifam, addr) #define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len)) static void -rt_xaddrs(cp, cplim, rtinfo) - caddr_t cp, cplim; - struct rt_addrinfo *rtinfo; +rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo) { struct sockaddr *sa; int i; diff --git a/lib/libncp/ncpl_subr.c b/lib/libncp/ncpl_subr.c index e8e97f3e08..1550edd6c5 100644 --- a/lib/libncp/ncpl_subr.c +++ b/lib/libncp/ncpl_subr.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libncp/ncpl_subr.c,v 1.3 2000/01/01 14:21:31 bp Exp $ - * $DragonFly: src/lib/libncp/ncpl_subr.c,v 1.4 2005/02/17 13:59:35 joerg Exp $ + * $DragonFly: src/lib/libncp/ncpl_subr.c,v 1.5 2008/09/30 16:57:05 swildner Exp $ */ #include @@ -259,10 +259,7 @@ char *ncp_optarg; /* argument associated with option */ #define EMSG "" int -ncp_getopt(nargc, nargv, ostr) - int nargc; - char * const *nargv; - const char *ostr; +ncp_getopt(int nargc, char * const *nargv, const char *ostr) { static char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ diff --git a/lib/libopie/opieextra.c b/lib/libopie/opieextra.c index c78c19bbdd..b6dccda127 100644 --- a/lib/libopie/opieextra.c +++ b/lib/libopie/opieextra.c @@ -4,7 +4,7 @@ * and possibly others. * * $FreeBSD: src/lib/libopie/opieextra.c,v 1.1.2.2 2002/07/15 14:17:08 des Exp $ - * $DragonFly: src/lib/libopie/opieextra.c,v 1.3 2005/08/04 17:27:09 drhodus Exp $ + * $DragonFly: src/lib/libopie/opieextra.c,v 1.4 2008/09/30 16:57:05 swildner Exp $ */ #include @@ -86,7 +86,7 @@ static struct opie_algorithm_table opie_algorithm_table[] = { /* Get current hash type */ const char * -opie_get_algorithm() +opie_get_algorithm(void) { return(opie_algorithm_table[opie_hash_type].name); } diff --git a/lib/libsctp/sctp_sys_calls.c b/lib/libsctp/sctp_sys_calls.c index d6806b435d..2c70cf9bfd 100644 --- a/lib/libsctp/sctp_sys_calls.c +++ b/lib/libsctp/sctp_sys_calls.c @@ -1,5 +1,5 @@ /* $KAME: sctp_sys_calls.c,v 1.9 2004/08/17 06:08:53 itojun Exp $ */ -/* $DragonFly: src/lib/libsctp/sctp_sys_calls.c,v 1.2 2006/06/28 23:14:43 corecode Exp $ */ +/* $DragonFly: src/lib/libsctp/sctp_sys_calls.c,v 1.3 2008/09/30 16:57:05 swildner Exp $ */ /* * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, @@ -652,9 +652,7 @@ sctp_recvmsg (int s, #ifdef SYS_sctp_peeloff int -sctp_peeloff(sd, assoc_id) - int sd; - sctp_assoc_t assoc_id; +sctp_peeloff(int sd, sctp_assoc_t assoc_id) { return (syscall(SYS_sctp_peeloff, sd, assoc_id)); } diff --git a/lib/libsdp/sdp.h b/lib/libsdp/sdp.h index 48173765d0..a54fac7872 100644 --- a/lib/libsdp/sdp.h +++ b/lib/libsdp/sdp.h @@ -1,5 +1,5 @@ /* $NetBSD: sdp.h,v 1.2 2006/08/17 20:13:31 plunky Exp $ */ -/* $DragonFly: src/lib/libsdp/sdp.h,v 1.1 2008/01/03 11:47:53 hasso Exp $ */ +/* $DragonFly: src/lib/libsdp/sdp.h,v 1.2 2008/09/30 16:57:05 swildner Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -361,7 +361,7 @@ typedef struct sdp_attr * sdp_attr_p; #if BYTE_ORDER == LITTLE_ENDIAN #define SDP_GET128(l, cp) do { \ - register const uint8_t *t_cp = (const uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ (l)->b[15] = *t_cp++; \ (l)->b[14] = *t_cp++; \ (l)->b[13] = *t_cp++; \ @@ -418,7 +418,7 @@ typedef struct sdp_attr * sdp_attr_p; #if BYTE_ORDER == LITTLE_ENDIAN #define SDP_PUT128(l, cp) do { \ - register const uint8_t *t_cp = (const uint8_t *)(cp); \ + const uint8_t *t_cp = (const uint8_t *)(cp); \ *t_cp++ = (l)->b[15]; \ *t_cp++ = (l)->b[14]; \ *t_cp++ = (l)->b[13]; \ diff --git a/lib/libsdp/util.c b/lib/libsdp/util.c index 7def3c8a3b..3a62c52b6e 100644 --- a/lib/libsdp/util.c +++ b/lib/libsdp/util.c @@ -1,5 +1,5 @@ /* $NetBSD: util.c,v 1.1 2006/06/19 15:44:36 gdamore Exp $ */ -/* $DragonFly: src/lib/libsdp/util.c,v 1.1 2008/01/03 11:47:53 hasso Exp $ */ +/* $DragonFly: src/lib/libsdp/util.c,v 1.2 2008/09/30 16:57:05 swildner Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -280,7 +280,7 @@ static sdp_attr_desc_t sdp_attrs_desc[] = { char const * sdp_attr2desc(uint16_t attr) { - register sdp_attr_desc_p a = sdp_attrs_desc; + sdp_attr_desc_p a = sdp_attrs_desc; for (; a->desc != NULL; a++) if (attr == a->attr) @@ -292,7 +292,7 @@ sdp_attr2desc(uint16_t attr) char const * sdp_uuid2desc(uint16_t uuid) { - register sdp_attr_desc_p a = sdp_uuids_desc; + sdp_attr_desc_p a = sdp_uuids_desc; for (; a->desc != NULL; a++) if (uuid == a->attr) diff --git a/lib/libskey/put.c b/lib/libskey/put.c index d3b245c57c..933a6c4200 100644 --- a/lib/libskey/put.c +++ b/lib/libskey/put.c @@ -1,5 +1,5 @@ /* - * $DragonFly: src/lib/libskey/put.c,v 1.4 2004/10/25 19:38:45 drhodus Exp $ + * $DragonFly: src/lib/libskey/put.c,v 1.5 2008/09/30 16:57:05 swildner Exp $ */ #include @@ -2069,8 +2069,7 @@ static char Wp[2048][4] = { * Returns a pointer to a static buffer */ char * -btoe(engout,c) -char *c, *engout; +btoe(char *engout, char *c) { char cp[9]; /* add in room for the parity 2 bits*/ int p,i ; @@ -2106,9 +2105,7 @@ char *c, *engout; * -2 words OK but parity is wrong */ int -etob(out, e) -char *out; -char *e; +etob(char *out, char *e) { char *word, *cp; int i, v,l, low,high; @@ -2157,9 +2154,7 @@ char *e; } /* Display 8 bytes as a series of 16-bit hex digits */ char * -put8(out,s) -char *out; -char *s; +put8(char *out, char *s) { sprintf(out,"%02X%02X %02X%02X %02X%02X %02X%02X", s[0] & 0xff,s[1] & 0xff,s[2] & 0xff, @@ -2172,8 +2167,7 @@ char *s; * Provided as a possible alternative to btoe() */ char * -btoc(cp) -char *cp; +btoc(char *cp) { int i; static char out[31]; @@ -2192,9 +2186,7 @@ char *cp; /* Dictionary binary search */ static int -wsrch(w,low,high) -char *w; -int low, high; +wsrch(char *w, int low, int high) { int i,j; @@ -2218,10 +2210,7 @@ int low, high; } } static void -insert(s, x, start, length) -char *s; -int x; -int start, length; +insert(char *s, int x, int start, int length) { unsigned char cl; unsigned char cc; @@ -2252,8 +2241,7 @@ int start, length; } static void -standard(word) -char *word; +standard(char *word) { while(*word){ if(!isascii(*word)) @@ -2272,9 +2260,7 @@ char *word; /* Extract 'length' bits from the char array 's' starting with bit 'start' */ static unsigned long -extract(s, start, length) -char *s; -int start, length; +extract(char *s, int start, int length) { unsigned char cl; unsigned char cc; diff --git a/lib/libskey/skey_crypt.c b/lib/libskey/skey_crypt.c index 4e3a141333..e85f9ce24b 100644 --- a/lib/libskey/skey_crypt.c +++ b/lib/libskey/skey_crypt.c @@ -1,4 +1,5 @@ /* Author: Wietse Venema, Eindhoven University of Technology. */ +/* $DragonFly: src/lib/libskey/skey_crypt.c,v 1.2 2008/09/30 16:57:05 swildner Exp $ */ #include #include @@ -9,11 +10,8 @@ /* skey_crypt - return encrypted UNIX passwd if s/key or regular password ok */ -const char *skey_crypt(pp, salt, pwd, pwok) -char *pp; -char *salt; -struct passwd *pwd; -int pwok; +const char * +skey_crypt(char *pp, char *salt, struct passwd *pwd, int pwok) { struct skey skey; char *p; diff --git a/lib/libskey/skey_getpass.c b/lib/libskey/skey_getpass.c index c3f5432d02..e788a8a8e9 100644 --- a/lib/libskey/skey_getpass.c +++ b/lib/libskey/skey_getpass.c @@ -1,13 +1,13 @@ +/* $DragonFly: src/lib/libskey/skey_getpass.c,v 1.2 2008/09/30 16:57:05 swildner Exp $ */ + #include #include #include /* skey_getpass - read regular or s/key password */ -char *skey_getpass(prompt, pwd, pwok) -const char *prompt; -struct passwd *pwd; -int pwok; +char * +skey_getpass(const char *prompt, struct passwd *pwd, int pwok) { static char buf[128]; struct skey skey; diff --git a/lib/libskey/skeyaccess.c b/lib/libskey/skeyaccess.c index 20b25e09ed..90e5f97a1f 100644 --- a/lib/libskey/skeyaccess.c +++ b/lib/libskey/skeyaccess.c @@ -24,7 +24,7 @@ * Author: Wietse Venema, Eindhoven University of Technology. * * $FreeBSD: src/lib/libskey/skeyaccess.c,v 1.9.6.2 2002/08/12 19:42:24 iedowse Exp $ - * $DragonFly: src/lib/libskey/skeyaccess.c,v 1.4 2005/02/28 13:14:08 joerg Exp $ + * $DragonFly: src/lib/libskey/skeyaccess.c,v 1.5 2008/09/30 16:57:05 swildner Exp $ */ #include @@ -93,11 +93,8 @@ int skeyaccess (char *, char *, char *, char *); /* skeyaccess - find out if UNIX passwords are permitted */ -int skeyaccess(user, port, host, addr) -char *user; -char *port; -char *host; -char *addr; +int +skeyaccess(char *user, char *port, char *host, char *addr) { FILE *fp; struct login_info login_info; @@ -172,9 +169,8 @@ char *addr; /* _skeyaccess - find out if UNIX passwords are permitted */ -static int _skeyaccess(fp, login_info) -FILE *fp; -struct login_info *login_info; +static int +_skeyaccess(FILE *fp, struct login_info *login_info) { char buf[BUFSIZ]; char *tok; @@ -263,8 +259,8 @@ ai_unmapped(struct addrinfo *ai) /* match_internet_addr - match internet network address */ -static int match_internet_addr(login_info) -struct login_info *login_info; +static int +match_internet_addr(struct login_info *login_info) { char *tok; struct addrinfo *res; @@ -332,8 +328,8 @@ struct login_info *login_info; /* match_group - match username against group */ -static int match_group(login_info) -struct login_info *login_info; +static int +match_group(struct login_info *login_info) { struct passwd *passwd; struct group *group; @@ -353,8 +349,8 @@ struct login_info *login_info; /* match_token - get and match token */ -static int match_token(str) -char *str; +static int +match_token(char *str) { char *tok; @@ -363,10 +359,8 @@ char *str; /* first_token - read line and return first token */ -static char *first_token(buf, len, fp) -char *buf; -int len; -FILE *fp; +static char * +first_token(char *buf, int len, FILE *fp) { char *cp; @@ -390,15 +384,16 @@ FILE *fp; /* unget_token - push back last token */ -static void unget_token(cp) -char *cp; +static void +unget_token(char *cp) { prev_token = cp; } /* get_token - retrieve next token from buffer */ -static char *get_token() +static char * +get_token(void) { char *cp; @@ -413,7 +408,8 @@ static char *get_token() /* need_token - complain if next token is not available */ -static char *need_token() +static char * +need_token(void) { char *cp; @@ -425,7 +421,8 @@ static char *need_token() /* need_internet_addr - complain if next token is not an internet address */ -static char *need_internet_addr() +static char * +need_internet_addr(void) { char *cp; @@ -444,8 +441,8 @@ static char *need_internet_addr() /* is_internet_addr - determine if string is a dotted quad decimal address */ -static int is_internet_addr(str) -char *str; +static int +is_internet_addr(char *str) { struct addrinfo *res; @@ -535,8 +532,8 @@ lookup_internet_addr(char *host) /* convert_internet_addr - convert string to internet address */ -static struct addrinfo *convert_internet_addr(string) -char *string; +static struct addrinfo * +convert_internet_addr(char *string) { struct addrinfo hints, *res; @@ -551,9 +548,8 @@ char *string; #ifdef TEST -main(argc, argv) -int argc; -char **argv; +int +main(int argc, char **argv) { struct addrinfo hints, *res; char host[MAXHOSTNAMELEN + 1]; diff --git a/lib/libskey/skeylogin.c b/lib/libskey/skeylogin.c index 66c6e59051..ab2c198e41 100644 --- a/lib/libskey/skeylogin.c +++ b/lib/libskey/skeylogin.c @@ -5,7 +5,7 @@ * Many references for mink may still be found in this program. * * $FreeBSD: src/lib/libskey/skeylogin.c,v 1.14.6.1 2000/07/18 11:38:24 sheldonh Exp $ - * $DragonFly: src/lib/libskey/skeylogin.c,v 1.4 2004/10/25 19:38:45 drhodus Exp $ + * $DragonFly: src/lib/libskey/skeylogin.c,v 1.5 2008/09/30 16:57:06 swildner Exp $ */ #include @@ -40,10 +40,7 @@ static const char *month[12] = { * record. */ int -skeyinfo(mp,name,ss) -struct skey *mp; -const char *name; -char *ss; +skeyinfo(struct skey *mp, const char *name, char *ss) { int rval; @@ -72,10 +69,7 @@ char *ss; * record. */ int -skeychallenge(mp,name, ss) -struct skey *mp; -const char *name; -char *ss; +skeychallenge(struct skey *mp, const char *name, char *ss) { int rval; @@ -100,9 +94,7 @@ char *ss; * 1: entry not found, file R/W pointer positioned at EOF */ int -skeylookup(mp,name) -struct skey *mp; -const char *name; +skeylookup(struct skey *mp, const char *name) { int found; size_t len; @@ -177,9 +169,7 @@ const char *name; * The database file is always closed by this call. */ int -skeyverify(mp,response) -struct skey *mp; -char *response; +skeyverify(struct skey *mp, char *response) { char key[8]; char fkey[8]; @@ -272,8 +262,7 @@ char *response; * Returns 0 on success, -1 on error */ int -atob8(out,in) -char *out,*in; +atob8(char *out, char *in) { int i; int val; @@ -299,8 +288,7 @@ char *out,*in; static char * -skipspace(cp) -char *cp; +skipspace(char *cp) { while(*cp == ' ' || *cp == '\t') cp++; @@ -313,8 +301,7 @@ char *cp; /* Convert 8-byte binary array to hex-ascii string */ int -btoa8(out,in) -char *out,*in; +btoa8(char *out, char *in) { int i; @@ -331,8 +318,7 @@ char *out,*in; /* Convert hex digit to binary integer */ int -htoi(c) -char c; +htoi(char c) { if('0' <= c && c <= '9') return c - '0'; diff --git a/lib/libskey/skeysubr.c b/lib/libskey/skeysubr.c index a571a5633f..55f586a81b 100644 --- a/lib/libskey/skeysubr.c +++ b/lib/libskey/skeysubr.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/lib/libskey/skeysubr.c,v 1.9.6.1 2000/07/20 20:13:42 obrien Exp $ */ -/* $DragonFly: src/lib/libskey/skeysubr.c,v 1.3 2003/11/12 20:21:31 eirikn Exp $ */ +/* $DragonFly: src/lib/libskey/skeysubr.c,v 1.4 2008/09/30 16:57:06 swildner Exp $ */ #include #include @@ -15,12 +15,13 @@ /* Crunch a key: * concatenate the seed and the password, run through MDX and * collapse to 64 bits. This is defined as the user's starting key. + * + * result 8-byte result + * seed Seed, any length + * passwd Password, any length */ int -keycrunch(result,seed,passwd) -char *result; /* 8-byte result */ -const char *seed; /* Seed, any length */ -const char *passwd; /* Password, any length */ +keycrunch(char *result, const char *seed, const char *passwd) { char *buf; MDX_CTX md; @@ -50,8 +51,7 @@ const char *passwd; /* Password, any length */ /* The one-way function f(). Takes 8 bytes and returns 8 bytes in place */ void -f(x) -char *x; +f(char *x) { MDX_CTX md; u_int32_t results[4]; @@ -68,8 +68,7 @@ char *x; /* Strip trailing cr/lf from a line of text */ void -rip(buf) -char *buf; +rip(char *buf) { buf[strcspn(buf, "\r\n")] = 0; } @@ -78,17 +77,15 @@ static struct termios saved_ttymode; static void interrupt (int); -static void interrupt(sig) -int sig; +static void +interrupt(int sig) { tcsetattr(0, TCSANOW, &saved_ttymode); err(1, "interrupted by signal %s", sys_siglist[sig]); } char * -readpass(buf,n) -char *buf; -int n; +readpass(char *buf, int n) { struct termios noecho_ttymode; void (*oldsig) (int); @@ -125,8 +122,7 @@ int n; } void -sevenbit(s) -char *s; +sevenbit(char *s) { /* make sure there are only 7 bit code in the line*/ while(*s){ diff --git a/lib/libthread_xu/thread/thr_kern.c b/lib/libthread_xu/thread/thr_kern.c index ed821d1a44..b61c3749cb 100644 --- a/lib/libthread_xu/thread/thr_kern.c +++ b/lib/libthread_xu/thread/thr_kern.c @@ -23,7 +23,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. * - * $DragonFly: src/lib/libthread_xu/thread/thr_kern.c,v 1.4 2008/01/05 13:38:08 corecode Exp $ + * $DragonFly: src/lib/libthread_xu/thread/thr_kern.c,v 1.5 2008/09/30 16:57:06 swildner Exp $ */ #include @@ -88,7 +88,7 @@ _thr_signal_unblock(struct pthread *curthread) } void -_thr_assert_lock_level() +_thr_assert_lock_level(void) { PANIC("locklevel <= 0"); } @@ -100,7 +100,7 @@ _thr_send_sig(struct pthread *thread, int sig) } int -_thr_get_tid() +_thr_get_tid(void) { return (lwp_gettid()); } diff --git a/lib/libthread_xu/thread/thr_main_np.c b/lib/libthread_xu/thread/thr_main_np.c index b09c5988d1..84749f08eb 100644 --- a/lib/libthread_xu/thread/thr_main_np.c +++ b/lib/libthread_xu/thread/thr_main_np.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libpthread/thread/thr_main_np.c,v 1.5 2003/04/18 05:04:16 deischen Exp $ - * $DragonFly: src/lib/libthread_xu/thread/thr_main_np.c,v 1.3 2006/04/06 13:03:09 davidxu Exp $ + * $DragonFly: src/lib/libthread_xu/thread/thr_main_np.c,v 1.4 2008/09/30 16:57:06 swildner Exp $ */ #include "namespace.h" @@ -39,7 +39,7 @@ * Provide the equivelant to Solaris thr_main() function */ int -_pthread_main_np() +_pthread_main_np(void) { if (!_thr_initial) diff --git a/lib/libthread_xu/thread/thr_multi_np.c b/lib/libthread_xu/thread/thr_multi_np.c index e912c600c5..3250dea025 100644 --- a/lib/libthread_xu/thread/thr_multi_np.c +++ b/lib/libthread_xu/thread/thr_multi_np.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/lib/libthread_xu/thread/thr_multi_np.c,v 1.3 2006/04/06 13:03:09 davidxu Exp $ + * $DragonFly: src/lib/libthread_xu/thread/thr_multi_np.c,v 1.4 2008/09/30 16:57:06 swildner Exp $ */ #include "namespace.h" @@ -38,7 +38,7 @@ #include "un-namespace.h" int -_pthread_multi_np() +_pthread_multi_np(void) { /* Return to multi-threaded scheduling mode: */ diff --git a/lib/libthread_xu/thread/thr_single_np.c b/lib/libthread_xu/thread/thr_single_np.c index b413399688..649dfac051 100644 --- a/lib/libthread_xu/thread/thr_single_np.c +++ b/lib/libthread_xu/thread/thr_single_np.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/lib/libthread_xu/thread/thr_single_np.c,v 1.3 2006/04/06 13:03:09 davidxu Exp $ + * $DragonFly: src/lib/libthread_xu/thread/thr_single_np.c,v 1.4 2008/09/30 16:57:06 swildner Exp $ */ #include "namespace.h" @@ -37,7 +37,7 @@ #include #include "un-namespace.h" -int _pthread_single_np() +int _pthread_single_np(void) { /* Enter single-threaded (non-POSIX) scheduling mode: */ diff --git a/lib/libvgl/keyboard.c b/lib/libvgl/keyboard.c index 151f00666a..9e8c77d2f5 100644 --- a/lib/libvgl/keyboard.c +++ b/lib/libvgl/keyboard.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libvgl/keyboard.c,v 1.3 1999/08/28 00:05:55 peter Exp $ - * $DragonFly: src/lib/libvgl/keyboard.c,v 1.2 2003/06/17 04:26:52 dillon Exp $ + * $DragonFly: src/lib/libvgl/keyboard.c,v 1.3 2008/09/30 16:57:06 swildner Exp $ */ #include @@ -75,7 +75,7 @@ VGLKeyboardInit(int mode) } void -VGLKeyboardEnd() +VGLKeyboardEnd(void) { if (VGLKeyboardMode != -1) { ioctl(0, KDSKBMODE, VGLKeyboardMode); @@ -84,7 +84,7 @@ VGLKeyboardEnd() } int -VGLKeyboardGetCh() +VGLKeyboardGetCh(void) { unsigned char ch = 0; diff --git a/lib/libvgl/main.c b/lib/libvgl/main.c index e54a714e9f..864d53505c 100644 --- a/lib/libvgl/main.c +++ b/lib/libvgl/main.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libvgl/main.c,v 1.6.2.2 2001/07/30 14:31:30 yokota Exp $ - * $DragonFly: src/lib/libvgl/main.c,v 1.3 2007/08/19 11:39:11 swildner Exp $ + * $DragonFly: src/lib/libvgl/main.c,v 1.4 2008/09/30 16:57:06 swildner Exp $ */ #include @@ -58,7 +58,7 @@ static int VGLInitDone = 0; static struct winsize VGLOldWSize; void -VGLEnd() +VGLEnd(void) { struct vt_mode smode; @@ -101,7 +101,7 @@ struct vt_mode smode; } static void -VGLAbort() +VGLAbort(int signo __unused) { VGLAbortPending = 1; signal(SIGINT, SIG_IGN); @@ -112,7 +112,7 @@ VGLAbort() } static void -VGLSwitch() +VGLSwitch(int signo __unused) { if (!VGLOnDisplay) VGLOnDisplay = 1; @@ -284,7 +284,7 @@ VGLInit(int mode) } void -VGLCheckSwitch() +VGLCheckSwitch(void) { if (VGLAbortPending) { VGLEnd(); diff --git a/lib/libvgl/mouse.c b/lib/libvgl/mouse.c index 6b1d4d4baa..0176485972 100644 --- a/lib/libvgl/mouse.c +++ b/lib/libvgl/mouse.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libvgl/mouse.c,v 1.3 1999/11/08 11:37:39 yokota Exp $ - * $DragonFly: src/lib/libvgl/mouse.c,v 1.2 2003/06/17 04:26:52 dillon Exp $ + * $DragonFly: src/lib/libvgl/mouse.c,v 1.3 2008/09/30 16:57:06 swildner Exp $ */ #include @@ -90,7 +90,7 @@ static int VGLMouseYpos = 0; static int VGLMouseButtons = 0; void -VGLMousePointerShow() +VGLMousePointerShow(void) { byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE]; VGLBitmap buffer = @@ -120,7 +120,7 @@ VGLMousePointerShow() } void -VGLMousePointerHide() +VGLMousePointerHide(void) { byte crtcidx, crtcval, gdcidx, gdcval; @@ -188,7 +188,7 @@ VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask) } void -VGLMouseSetStdImage() +VGLMouseSetStdImage(void) { if (VGLMouseShown == VGL_MOUSESHOW) VGLMousePointerHide(); @@ -270,7 +270,7 @@ VGLMouseFreeze(int x, int y, int width, int hight, byte color) } void -VGLMouseUnFreeze() +VGLMouseUnFreeze(void) { if (VGLMouseFrozen > 1) { VGLMouseFrozen = 0; diff --git a/lib/libvgl/simple.c b/lib/libvgl/simple.c index 54608eb837..0e89733a28 100644 --- a/lib/libvgl/simple.c +++ b/lib/libvgl/simple.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/lib/libvgl/simple.c,v 1.4 1999/11/08 11:37:39 yokota Exp $ - * $DragonFly: src/lib/libvgl/simple.c,v 1.2 2003/06/17 04:26:52 dillon Exp $ + * $DragonFly: src/lib/libvgl/simple.c,v 1.3 2008/09/30 16:57:06 swildner Exp $ */ #include @@ -303,7 +303,7 @@ VGLClear(VGLBitmap *object, byte color) } void -VGLRestorePalette() +VGLRestorePalette(void) { int i; @@ -323,7 +323,7 @@ VGLRestorePalette() } void -VGLSavePalette() +VGLSavePalette(void) { int i; diff --git a/lib/liby/yyerror.c b/lib/liby/yyerror.c index 924f33a546..f4cc6509a6 100644 --- a/lib/liby/yyerror.c +++ b/lib/liby/yyerror.c @@ -31,13 +31,14 @@ * SUCH DAMAGE. * * @(#)yyerror.c 8.1 (Berkeley) 6/4/93 + * + * $DragonFly: src/lib/liby/yyerror.c,v 1.3 2008/09/30 16:57:06 swildner Exp $ */ #include int -yyerror(msg) -char *msg; +yyerror(char *msg) { (void)fprintf(stderr, "%s\n", msg); return(0); -- 2.41.0