[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-core
Subject:    Patch: code-cleanup (k&r style)
From:       Stefan Huehner <stefan () huehner ! org>
Date:       2006-04-28 15:49:08
Message-ID: 20060428154715.GA15279 () pro4u ! org
[Download RAW message or body]

Hi,

attached patch convert function declarations from ancient K&R Style to
modern. Additonally this lets the compiler do some more checks.

Please consider applying.

This patch is independant from the other cleanup which is pending
(ruby_cleanup1.diff)

Regards,
Stefan


["ruby_cleanup2.diff" (text/plain)]

diff -u object.c object.c
--- object.c	28 Apr 2006 13:06:50 -0000
+++ object.c	28 Apr 2006 15:42:07 -0000
@@ -698,8 +698,7 @@
  */
 
 static VALUE
-nil_to_a(obj)
-    VALUE obj;
+nil_to_a(VALUE obj)
 {
     return rb_ary_new2(0);
 }
diff -u ext/pty/pty.c ext/pty/pty.c
--- ext/pty/pty.c	28 Apr 2006 13:06:53 -0000
+++ ext/pty/pty.c	28 Apr 2006 15:42:16 -0000
@@ -118,8 +118,7 @@
 static VALUE eChildExited;
 
 static VALUE
-echild_status(self)
-    VALUE self;
+echild_status(VALUE self)
 {
     return rb_ivar_get(self, rb_intern("status"));
 }
@@ -131,9 +130,7 @@
 };
 
 static void
-raise_from_wait(state, info)
-    struct pty_info *info;
-    char *state;
+raise_from_wait(char *state, struct pty_info *info)
 {
     extern VALUE rb_last_status;
     char buf[1024];
@@ -146,8 +143,7 @@
 }
 
 static VALUE
-pty_syswait(info)
-    struct pty_info *info;
+pty_syswait(struct pty_info *info)
 {
     int cpid, status;
 
@@ -184,17 +180,13 @@
 };
 
 static VALUE
-pty_exec(arg)
-    struct exec_info *arg;
+pty_exec(struct exec_info *arg)
 {
     return rb_f_exec(arg->argc, arg->argv);
 }
 
 static void
-establishShell(argc, argv, info)
-    int argc;
-    VALUE *argv;
-    struct pty_info *info;
+establishShell(int argc, VALUE *argv, struct pty_info *info)
 {	
     static int		i,master,slave,currentPid;
     char		*p,*getenv();
@@ -295,8 +287,7 @@
 }
 
 static VALUE
-pty_finalize_syswait(info)
-    struct pty_info *info;
+pty_finalize_syswait(struct pty_info *info)
 {
     rb_thread_kill(info->thread);
     rb_funcall(info->thread, rb_intern("value"), 0);
@@ -310,8 +301,7 @@
  * or the same interface function.
  */
 static void
-getDevice(master,slave)
-    int	*master,*slave;
+getDevice(int *master, int *slave)
 {
     if (openpty(master, slave, SlaveName,
 		(struct termios *)0, (struct winsize *)0) == -1) {
@@ -321,8 +311,7 @@
 #else /* HAVE_OPENPTY */
 #ifdef HAVE__GETPTY
 static void
-getDevice(master,slave)
-    int	*master,*slave;
+getDevice(int *master, int *slave)
 {
     char *name;
 
@@ -335,8 +324,7 @@
 }
 #else /* HAVE__GETPTY */
 static void
-getDevice(master,slave)
-    int	*master,*slave;
+getDevice(int *master, int *slave)
 {
     int	 i,j;
 
@@ -407,10 +395,7 @@
 
 /* ruby function: getpty */
 static VALUE
-pty_getpty(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+pty_getpty(int argc, VALUE *argv, VALUE self)
 {
     VALUE res;
     struct pty_info info;
@@ -450,8 +435,7 @@
 
 /* ruby function: protect_signal - obsolete */
 static VALUE
-pty_protect(self)
-    VALUE self;
+pty_protect(VALUE self)
 {
     rb_warn("PTY::protect_signal is no longer needed");
     rb_yield(Qnil);
@@ -460,8 +444,7 @@
 
 /* ruby function: reset_signal - obsolete */
 static VALUE
-pty_reset_signal(self)
-    VALUE self;
+pty_reset_signal(VALUE self)
 {
     rb_warn("PTY::reset_signal is no longer needed");
     return self;
diff -u ext/socket/socket.c ext/socket/socket.c
--- ext/socket/socket.c	28 Apr 2006 13:06:53 -0000
+++ ext/socket/socket.c	28 Apr 2006 15:42:17 -0000
@@ -199,9 +199,7 @@
 #endif
 
 static VALUE
-init_sock(sock, fd)
-    VALUE sock;
-    int fd;
+init_sock(VALUE sock, int fd)
 {
     OpenFile *fp;
 
@@ -217,8 +215,7 @@
 }
 
 static VALUE
-bsock_s_for_fd(klass, fd)
-    VALUE klass, fd;
+bsock_s_for_fd(VALUE klass, VALUE fd)
 {
     OpenFile *fptr;
     VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd));
@@ -229,10 +226,7 @@
 }
 
 static VALUE
-bsock_shutdown(argc, argv, sock)
-    int argc;
-    VALUE *argv;
-    VALUE sock;
+bsock_shutdown(int argc, VALUE *argv, VALUE sock)
 {
     VALUE howto;
     int how;
@@ -258,8 +252,7 @@
 }
 
 static VALUE
-bsock_close_read(sock)
-    VALUE sock;
+bsock_close_read(VALUE sock)
 {
     OpenFile *fptr;
 
@@ -277,8 +270,7 @@
 }
 
 static VALUE
-bsock_close_write(sock)
-    VALUE sock;
+bsock_close_write(VALUE sock)
 {
     OpenFile *fptr;
 
@@ -341,8 +333,7 @@
  *
 */
 static VALUE
-bsock_setsockopt(sock, lev, optname, val)
-    VALUE sock, lev, optname, val;
+bsock_setsockopt(VALUE sock, VALUE lev, VALUE optname, VALUE val)
 {
     int level, option;
     OpenFile *fptr;
@@ -421,8 +412,7 @@
  *   onoff, linger = optval.unpack "ii"
 */
 static VALUE
-bsock_getsockopt(sock, lev, optname)
-    VALUE sock, lev, optname;
+bsock_getsockopt(VALUE sock, VALUE lev, VALUE optname)
 {
 #if !defined(__BEOS__)
     int level, option;
@@ -446,8 +436,7 @@
 }
 
 static VALUE
-bsock_getsockname(sock)
-    VALUE sock;
+bsock_getsockname(VALUE sock)
 {
     char buf[1024];
     socklen_t len = sizeof buf;
@@ -460,8 +449,7 @@
 }
 
 static VALUE
-bsock_getpeername(sock)
-    VALUE sock;
+bsock_getpeername(VALUE sock)
 {
     char buf[1024];
     socklen_t len = sizeof buf;
@@ -474,10 +462,7 @@
 }
 
 static VALUE
-bsock_send(argc, argv, sock)
-    int argc;
-    VALUE *argv;
-    VALUE sock;
+bsock_send(int argc, VALUE *argv, VALUE sock)
 {
     VALUE mesg, to;
     VALUE flags;
@@ -514,8 +499,7 @@
 }
 
 static VALUE
-bsock_do_not_reverse_lookup(sock)
-    VALUE sock;
+bsock_do_not_reverse_lookup(VALUE sock)
 {
     OpenFile *fptr;
 
@@ -524,9 +508,7 @@
 }
 
 static VALUE
-bsock_do_not_reverse_lookup_set(sock, state)
-    VALUE sock;
-    VALUE state;
+bsock_do_not_reverse_lookup_set(VALUE sock, VALUE state)
 {
     OpenFile *fptr;
 
@@ -554,11 +536,7 @@
 };
 
 static VALUE
-s_recvfrom(sock, argc, argv, from)
-    VALUE sock;
-    int argc;
-    VALUE *argv;
-    enum sock_recv_type from;
+s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
 {
     OpenFile *fptr;
     VALUE str;
@@ -630,10 +608,7 @@
 }
 
 static VALUE
-bsock_recv(argc, argv, sock)
-    int argc;
-    VALUE *argv;
-    VALUE sock;
+bsock_recv(int argc, VALUE *argv, VALUE sock)
 {
     return s_recvfrom(sock, argc, argv, RECV_RECV);
 }
@@ -645,8 +620,7 @@
 }
 
 static VALUE
-bsock_do_not_rev_lookup_set(self, val)
-    VALUE self, val;
+bsock_do_not_rev_lookup_set(VALUE self, VALUE val)
 {
     rb_secure(4);
     do_not_reverse_lookup = RTEST(val);
@@ -655,9 +629,7 @@
 
 NORETURN(static void raise_socket_error _((char *, int)));
 static void
-raise_socket_error(reason, error)
-    char *reason;
-    int error;
+raise_socket_error(char *reason, int error)
 {
 #ifdef EAI_SYSTEM
     if (error == EAI_SYSTEM) rb_sys_fail(reason);
@@ -666,10 +638,7 @@
 }
 
 static void
-make_ipaddr0(addr, buf, len)
-    struct sockaddr *addr;
-    char *buf;
-    size_t len;
+make_ipaddr0(struct sockaddr *addr, char *buf, size_t len)
 {
     int error;
 
@@ -680,8 +649,7 @@
 }
 
 static VALUE
-make_ipaddr(addr)
-    struct sockaddr *addr;
+make_ipaddr(struct sockaddr *addr)
 {
     char buf[1024];
 
@@ -690,10 +658,7 @@
 }
 
 static void
-make_inetaddr(host, buf, len)
-    long host;
-    char *buf;
-    size_t len;
+make_inetaddr(long host, char *buf, size_t len)
 {
     struct sockaddr_in sin;
 
@@ -705,8 +670,7 @@
 }
 
 static int
-str_isnumber(p)
-        const char *p;
+str_isnumber(const char *p)
 {
     char *ep;
 
@@ -721,10 +685,7 @@
 }
 
 static char *
-host_str(host, hbuf, len)
-    VALUE host;
-    char *hbuf;
-    size_t len;
+host_str(VALUE host, char *hbuf, size_t len)
 {
     if (NIL_P(host)) {
 	return NULL;
@@ -757,10 +718,7 @@
 }
 
 static char *
-port_str(port, pbuf, len)
-    VALUE port;
-    char *pbuf;
-    size_t len;
+port_str(VALUE port, char *pbuf, size_t len)
 {
     if (NIL_P(port)) {
 	return 0;
@@ -790,9 +748,7 @@
 #endif
 
 static struct addrinfo*
-sock_addrinfo(host, port, socktype, flags)
-    VALUE host, port;
-    int socktype, flags;
+sock_addrinfo(VALUE host, VALUE port, int socktype, int flags)
 {
     struct addrinfo hints;
     struct addrinfo* res = NULL;
@@ -840,9 +796,7 @@
 }
 
 static VALUE
-ipaddr(sockaddr, norevlookup)
-    struct sockaddr *sockaddr;
-    int norevlookup;
+ipaddr(struct sockaddr *sockaddr, int norevlookup)
 {
     VALUE family, port, addr1, addr2;
     VALUE ary;
@@ -900,8 +854,7 @@
 }
 
 static int
-ruby_socket(domain, type, proto)
-    int domain, type, proto;
+ruby_socket(int domain, int type, int proto)
 {
     int fd;
 
@@ -916,9 +869,7 @@
 }
 
 static int
-wait_connectable0(fd, fds_w, fds_e)
-    int fd;
-    rb_fdset_t *fds_w, *fds_e;
+wait_connectable0(int fd, rb_fdset_t *fds_w, rb_fdset_t *fds_e)
 {
     int sockerr;
     socklen_t sockerrlen;
@@ -958,16 +909,14 @@
 
 #ifdef HAVE_RB_FD_INIT
 static VALUE
-try_wait_connectable(arg)
-    VALUE arg;
+try_wait_connectable(VALUE arg)
 {
     struct wait_connectable_arg *p = (struct wait_connectable_arg *)arg;
     return (VALUE)wait_connectable0(p->fd, &p->fds_w, &p->fds_e);
 }
 
 static VALUE
-wait_connectable_ensure(arg)
-    VALUE arg;
+wait_connectable_ensure(VALUE arg)
 {
     struct wait_connectable_arg *p = (struct wait_connectable_arg *)arg;
     rb_fd_term(&p->fds_w);
@@ -977,8 +926,7 @@
 #endif
 
 static int
-wait_connectable(fd)
-    int fd;
+wait_connectable(int fd)
 {
     struct wait_connectable_arg arg;
 
@@ -1009,11 +957,7 @@
 #endif
 
 static int
-ruby_connect(fd, sockaddr, len, socks)
-    int fd;
-    struct sockaddr *sockaddr;
-    int len;
-    int socks;
+ruby_connect(int fd, struct sockaddr *sockaddr, int len, int socks)
 {
     int status;
     int mode;
@@ -1133,8 +1077,7 @@
 };
 
 static VALUE
-inetsock_cleanup(arg)
-    struct inetsock_arg *arg;
+inetsock_cleanup(struct inetsock_arg *arg)
 {
     if (arg->remote.res) {
 	freeaddrinfo(arg->remote.res);
@@ -1151,8 +1094,7 @@
 }
 
 static VALUE
-init_inetsock_internal(arg)
-    struct inetsock_arg *arg;
+init_inetsock_internal(struct inetsock_arg *arg)
 {
     int type = arg->type;
     struct addrinfo *res;
@@ -1221,9 +1163,7 @@
 }
 
 static VALUE
-init_inetsock(sock, remote_host, remote_serv, local_host, local_serv, type)
-    VALUE sock, remote_host, remote_serv, local_host, local_serv;
-    int type;
+init_inetsock(VALUE sock, VALUE remote_host, VALUE remote_serv, VALUE local_host, \
VALUE local_serv, int type)  {
     struct inetsock_arg arg;
     arg.sock = sock;
@@ -1240,10 +1180,7 @@
 }
 
 static VALUE
-tcp_init(argc, argv, sock)
-     int argc;
-     VALUE *argv;
-     VALUE sock;
+tcp_init(int argc, VALUE *argv, VALUE sock)
 {
     VALUE remote_host, remote_serv;
     VALUE local_host, local_serv;
@@ -1294,8 +1231,7 @@
 };
 
 static VALUE
-make_hostent_internal(arg)
-    struct hostent_arg *arg;
+make_hostent_internal(struct hostent_arg *arg)
 {
     VALUE host = arg->host;
     struct addrinfo* addr = arg->addr;
@@ -1353,26 +1289,20 @@
 }
 
 VALUE
-tcp_sockaddr(addr, len)
-    struct sockaddr *addr;
-    size_t len;
+tcp_sockaddr(struct sockaddr *addr, size_t len)
 {
     return make_ipaddr(addr);
 }
 
 static VALUE
-tcp_s_gethostbyname(obj, host)
-    VALUE obj, host;
+tcp_s_gethostbyname(VALUE obj, VALUE host)
 {
     rb_secure(3);
     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), \
tcp_sockaddr);  }
 
 static VALUE
-tcp_svr_init(argc, argv, sock)
-    int argc;
-    VALUE *argv;
-    VALUE sock;
+tcp_svr_init(int argc, VALUE *argv, VALUE sock)
 {
     VALUE arg1, arg2;
 
@@ -1383,11 +1313,7 @@
 }
 
 static VALUE
-s_accept(klass, fd, sockaddr, len)
-    VALUE klass;
-    int fd;
-    struct sockaddr *sockaddr;
-    socklen_t *len;
+s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len)
 {
     int fd2;
     int retry = 0;
@@ -1424,8 +1350,7 @@
 }
 
 static VALUE
-tcp_accept(sock)
-    VALUE sock;
+tcp_accept(VALUE sock)
 {
     OpenFile *fptr;
     struct sockaddr_storage from;
@@ -1438,8 +1363,7 @@
 }
 
 static VALUE
-tcp_sysaccept(sock)
-    VALUE sock;
+tcp_sysaccept(VALUE sock)
 {
     OpenFile *fptr;
     struct sockaddr_storage from;
@@ -1457,17 +1381,13 @@
 };
 
 static VALUE
-unixsock_connect_internal(arg)
-    struct unixsock_arg *arg;
+unixsock_connect_internal(struct unixsock_arg *arg)
 {
     return (VALUE)ruby_connect(arg->fd, arg->sockaddr, sizeof(*arg->sockaddr), 0);
 }
 
 static VALUE
-init_unixsock(sock, path, server)
-    VALUE sock;
-    VALUE path;
-    int server;
+init_unixsock(VALUE sock, VALUE path, int server)
 {
     struct sockaddr_un sockaddr;
     int fd, status;
@@ -1515,8 +1435,7 @@
 #endif
 
 static VALUE
-ip_addr(sock)
-    VALUE sock;
+ip_addr(VALUE sock)
 {
     OpenFile *fptr;
     struct sockaddr_storage addr;
@@ -1530,8 +1449,7 @@
 }
 
 static VALUE
-ip_peeraddr(sock)
-    VALUE sock;
+ip_peeraddr(VALUE sock)
 {
     OpenFile *fptr;
     struct sockaddr_storage addr;
@@ -1545,17 +1463,13 @@
 }
 
 static VALUE
-ip_recvfrom(argc, argv, sock)
-    int argc;
-    VALUE *argv;
-    VALUE sock;
+ip_recvfrom(int argc, VALUE *argv, VALUE sock)
 {
     return s_recvfrom(sock, argc, argv, RECV_IP);
 }
 
 static VALUE
-ip_s_getaddress(obj, host)
-    VALUE obj, host;
+ip_s_getaddress(VALUE obj, VALUE host)
 {
     struct sockaddr_storage addr;
     struct addrinfo *res = sock_addrinfo(host, Qnil, SOCK_STREAM, 0);
@@ -1568,10 +1482,7 @@
 }
 
 static VALUE
-udp_init(argc, argv, sock)
-    int argc;
-    VALUE *argv;
-    VALUE sock;
+udp_init(int argc, VALUE *argv, VALUE sock)
 {
     VALUE arg;
     int socktype = AF_INET;
@@ -1596,8 +1507,7 @@
 };
 
 static VALUE
-udp_connect_internal(arg)
-    struct udp_arg *arg;
+udp_connect_internal(struct udp_arg *arg)
 {
     int fd = arg->fd;
     struct addrinfo *res;
@@ -1611,8 +1521,7 @@
 }
 
 static VALUE
-udp_connect(sock, host, port)
-    VALUE sock, host, port;
+udp_connect(VALUE sock, VALUE host, VALUE port)
 {
     OpenFile *fptr;
     struct udp_arg arg;
@@ -1629,8 +1538,7 @@
 }
 
 static VALUE
-udp_bind(sock, host, port)
-    VALUE sock, host, port;
+udp_bind(VALUE sock, VALUE host, VALUE port)
 {
     OpenFile *fptr;
     struct addrinfo *res0, *res;
@@ -1651,10 +1559,7 @@
 }
 
 static VALUE
-udp_send(argc, argv, sock)
-    int argc;
-    VALUE *argv;
-    VALUE sock;
+udp_send(int argc, VALUE *argv, VALUE sock)
 {
     VALUE mesg, flags, host, port;
     OpenFile *fptr;
@@ -1689,15 +1594,13 @@
 
 #ifdef HAVE_SYS_UN_H
 static VALUE
-unix_init(sock, path)
-    VALUE sock, path;
+unix_init(VALUE sock, VALUE path)
 {
     return init_unixsock(sock, path, 0);
 }
 
 static VALUE
-unix_path(sock)
-    VALUE sock;
+unix_path(VALUE sock)
 {
     OpenFile *fptr;
 
@@ -1713,17 +1616,13 @@
 }
 
 static VALUE
-unix_svr_init(sock, path)
-    VALUE sock, path;
+unix_svr_init(VALUE sock, VALUE path)
 {
     return init_unixsock(sock, path, 1);
 }
 
 static VALUE
-unix_recvfrom(argc, argv, sock)
-    int argc;
-    VALUE *argv;
-    VALUE sock;
+unix_recvfrom(int argc, VALUE *argv, VALUE sock)
 {
     return s_recvfrom(sock, argc, argv, RECV_UNIX);
 }
@@ -1741,8 +1640,7 @@
 #endif
 
 static VALUE
-unix_send_io(sock, val)
-    VALUE sock, val;
+unix_send_io(VALUE sock, VALUE val)
 {
 #if defined(HAVE_SENDMSG) && (FD_PASSING_BY_MSG_CONTROL || \
FD_PASSING_BY_MSG_ACCRIGHTS)  int fd;
@@ -1806,10 +1704,7 @@
 }
 
 static VALUE
-unix_recv_io(argc, argv, sock)
-    int argc;
-    VALUE *argv;
-    VALUE sock;
+unix_recv_io(int argc, VALUE *argv, VALUE sock)
 {
 #if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || \
FD_PASSING_BY_MSG_ACCRIGHTS)  VALUE klass, mode;
@@ -1914,8 +1809,7 @@
 }
 
 static VALUE
-unix_accept(sock)
-    VALUE sock;
+unix_accept(VALUE sock)
 {
     OpenFile *fptr;
     struct sockaddr_un from;
@@ -1928,8 +1822,7 @@
 }
 
 static VALUE
-unix_sysaccept(sock)
-    VALUE sock;
+unix_sysaccept(VALUE sock)
 {
     OpenFile *fptr;
     struct sockaddr_un from;
@@ -1942,8 +1835,7 @@
 
 #ifdef HAVE_SYS_UN_H
 static VALUE
-unixaddr(sockaddr)
-    struct sockaddr_un *sockaddr;
+unixaddr(struct sockaddr_un *sockaddr)
 {
     return rb_assoc_new(rb_str_new2("AF_UNIX"),
 			rb_str_new2(sockaddr->sun_path));
@@ -1951,8 +1843,7 @@
 #endif
 
 static VALUE
-unix_addr(sock)
-    VALUE sock;
+unix_addr(VALUE sock)
 {
     OpenFile *fptr;
     struct sockaddr_un addr;
@@ -1968,8 +1859,7 @@
 }
 
 static VALUE
-unix_peeraddr(sock)
-    VALUE sock;
+unix_peeraddr(VALUE sock)
 {
     OpenFile *fptr;
     struct sockaddr_un addr;
@@ -1986,9 +1876,7 @@
 #endif
 
 static void
-setup_domain_and_type(domain, dv, type, tv)
-    VALUE domain, type;
-    int *dv, *tv;
+setup_domain_and_type(VALUE domain, int *dv, VALUE type, int *tv)
 {
     VALUE tmp;
     char *ptr;
@@ -2078,8 +1966,7 @@
 }
 
 static VALUE
-sock_initialize(sock, domain, type, protocol)
-    VALUE sock, domain, type, protocol;
+sock_initialize(VALUE sock, VALUE domain, VALUE type, VALUE protocol)
 {
     int fd;
     int d, t;
@@ -2093,8 +1980,7 @@
 }
 
 static VALUE
-sock_s_socketpair(klass, domain, type, protocol)
-    VALUE klass, domain, type, protocol;
+sock_s_socketpair(VALUE klass, VALUE domain, VALUE type, VALUE protocol)
 {
 #if !defined(_WIN32) && !defined(__BEOS__) && !defined(__EMX__) && \
!defined(__QNXNTO__)  int d, t, sp[2];
@@ -2118,10 +2004,7 @@
 
 #ifdef HAVE_SYS_UN_H
 static VALUE
-unix_s_socketpair(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+unix_s_socketpair(int argc, VALUE *argv, VALUE klass)
 {
     VALUE domain, type, protocol;
     domain = INT2FIX(PF_UNIX);
@@ -2248,8 +2131,7 @@
  * * connect function in Microsoft's Winsock functions reference
  */
 static VALUE
-sock_connect(sock, addr)
-    VALUE sock, addr;
+sock_connect(VALUE sock, VALUE addr)
 {
     OpenFile *fptr;
     int fd, n;
@@ -2347,8 +2229,7 @@
  * * bind function in Microsoft's Winsock functions reference
  */ 
 static VALUE
-sock_bind(sock, addr)
-    VALUE sock, addr;
+sock_bind(VALUE sock, VALUE addr)
 {
     OpenFile *fptr;
 
@@ -2431,8 +2312,7 @@
  * * listen function in Microsoft's Winsock functions reference
  */
 static VALUE
-sock_listen(sock, log)
-    VALUE sock, log;
+sock_listen(VALUE sock, VALUE log)
 {
     OpenFile *fptr;
     int backlog;
@@ -2552,17 +2432,13 @@
  *   message.
  */
 static VALUE
-sock_recvfrom(argc, argv, sock)
-    int argc;
-    VALUE *argv;
-    VALUE sock;
+sock_recvfrom(int argc, VALUE *argv, VALUE sock)
 {
     return s_recvfrom(sock, argc, argv, RECV_SOCKET);
 }
 
 static VALUE
-sock_accept(sock)
-    VALUE sock;
+sock_accept(VALUE sock)
 {
     OpenFile *fptr;
     VALUE sock2;
@@ -2614,8 +2490,7 @@
  * * Socket#accept
  */
 static VALUE
-sock_sysaccept(sock)
-    VALUE sock;
+sock_sysaccept(VALUE sock)
 {
     OpenFile *fptr;
     VALUE sock2;
@@ -2630,8 +2505,7 @@
 
 #ifdef HAVE_GETHOSTNAME
 static VALUE
-sock_gethostname(obj)
-    VALUE obj;
+sock_gethostname(VALUE obj)
 {
     char buf[1024];
 
@@ -2648,8 +2522,7 @@
 #include <sys/utsname.h>
 
 static VALUE
-sock_gethostname(obj)
-    VALUE obj;
+sock_gethostname(VALUE obj)
 {
     struct utsname un;
 
@@ -2659,8 +2532,7 @@
 }
 #else
 static VALUE
-sock_gethostname(obj)
-    VALUE obj;
+sock_gethostname(VALUE obj)
 {
     rb_notimplement();
 }
@@ -2668,8 +2540,7 @@
 #endif
 
 static VALUE
-make_addrinfo(res0)
-    struct addrinfo *res0;
+make_addrinfo(struct addrinfo *res0)
 {
     VALUE base, ary;
     struct addrinfo *res;
@@ -2692,9 +2563,7 @@
 }
 
 VALUE
-sock_sockaddr(addr, len)
-    struct sockaddr *addr;
-    size_t len;
+sock_sockaddr(struct sockaddr *addr, size_t len)
 {
     char *ptr;
 
@@ -2717,17 +2586,14 @@
 }
 
 static VALUE
-sock_s_gethostbyname(obj, host)
-    VALUE obj, host;
+sock_s_gethostbyname(VALUE obj, VALUE host)
 {
     rb_secure(3);
     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), \
sock_sockaddr);  }
 
 static VALUE
-sock_s_gethostbyaddr(argc, argv)
-    int argc;
-    VALUE *argv;
+sock_s_gethostbyaddr(int argc, VALUE *argv)
 {
     VALUE addr, type;
     struct hostent *h;
@@ -2777,9 +2643,7 @@
 }
 
 static VALUE
-sock_s_getservbyname(argc, argv)
-    int argc;
-    VALUE *argv;
+sock_s_getservbyname(int argc, VALUE *argv)
 {
     VALUE service, proto;
     struct servent *sp;
@@ -2807,9 +2671,7 @@
 }
 
 static VALUE
-sock_s_getservbyport(argc, argv)
-    int argc;
-    VALUE *argv;
+sock_s_getservbyport(int argc, VALUE *argv)
 {
     VALUE port, proto;
     struct servent *sp;
@@ -2826,9 +2688,7 @@
 }
 
 static VALUE
-sock_s_getaddrinfo(argc, argv)
-    int argc;
-    VALUE *argv;
+sock_s_getaddrinfo(int argc, VALUE *argv)
 {
     VALUE host, port, family, socktype, protocol, flags, ret;
     char hbuf[1024], pbuf[1024];
@@ -2897,9 +2757,7 @@
 }
 
 static VALUE
-sock_s_getnameinfo(argc, argv)
-    int argc;
-    VALUE *argv;
+sock_s_getnameinfo(int argc, VALUE *argv)
 {
     VALUE sa, af = Qnil, host = Qnil, port = Qnil, flags, tmp;
     char *hptr, *pptr;
@@ -3041,8 +2899,7 @@
 }
 
 static VALUE
-sock_s_pack_sockaddr_in(self, port, host)
-    VALUE self, port, host;
+sock_s_pack_sockaddr_in(VALUE self, VALUE port, VALUE host)
 {
     struct addrinfo *res = sock_addrinfo(host, port, 0, 0);
     VALUE addr = rb_str_new((char*)res->ai_addr, res->ai_addrlen);
@@ -3055,8 +2912,7 @@
 }
 
 static VALUE
-sock_s_unpack_sockaddr_in(self, addr)
-    VALUE self, addr;
+sock_s_unpack_sockaddr_in(VALUE self, VALUE addr)
 {
     struct sockaddr_in * sockaddr;
     VALUE host;
@@ -3069,8 +2925,7 @@
 
 #ifdef HAVE_SYS_UN_H
 static VALUE
-sock_s_pack_sockaddr_un(self, path)
-    VALUE self, path;
+sock_s_pack_sockaddr_un(VALUE self, VALUE path)
 {
     struct sockaddr_un sockaddr;
     VALUE addr;
@@ -3085,8 +2940,7 @@
 }
 
 static VALUE
-sock_s_unpack_sockaddr_un(self, addr)
-    VALUE self, addr;
+sock_s_unpack_sockaddr_un(VALUE self, VALUE addr)
 {
     struct sockaddr_un * sockaddr;
     VALUE path;
@@ -3106,9 +2960,7 @@
 static VALUE mConst;
 
 static void
-sock_define_const(name, value)
-    char *name;
-    int value;
+sock_define_const(char *name, int value)
 {
     rb_define_const(rb_cSocket, name, INT2FIX(value));
     rb_define_const(mConst, name, INT2FIX(value));
diff -u ext/zlib/zlib.c ext/zlib/zlib.c
--- ext/zlib/zlib.c	28 Apr 2006 13:06:53 -0000
+++ ext/zlib/zlib.c	28 Apr 2006 15:42:18 -0000
@@ -197,9 +197,7 @@
 static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError;
 
 static void
-raise_zlib_error(err, msg)
-    int err;
-    const char *msg;
+raise_zlib_error(int err, const char *msg)
 {
     VALUE exc;
 
@@ -247,8 +245,7 @@
 /*--- Warning (in finalizer) ---*/
 
 static void
-finalizer_warn(msg)
-    const char *msg;
+finalizer_warn(const char *msg)
 {
     fprintf(stderr, "zlib(finalizer): %s\n", msg);
 }
@@ -260,8 +257,7 @@
  * Returns the string which represents the version of zlib library.
  */
 static VALUE
-rb_zlib_version(klass)
-    VALUE klass;
+rb_zlib_version(VALUE klass)
 {
     VALUE str;
 
@@ -311,10 +307,7 @@
  * FIXME: expression.
  */
 static VALUE
-rb_zlib_adler32(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_zlib_adler32(int argc, VALUE *argv, VALUE klass)
 {
     return do_checksum(argc, argv, adler32);
 }
@@ -329,10 +322,7 @@
  * FIXME: expression.
  */
 static VALUE
-rb_zlib_crc32(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_zlib_crc32(int argc, VALUE *argv, VALUE klass)
 {
     return do_checksum(argc, argv, crc32);
 }
@@ -341,8 +331,7 @@
  * Returns the table for calculating CRC checksum as an array.
  */
 static VALUE
-rb_zlib_crc_table(obj)
-    VALUE obj;
+rb_zlib_crc_table(VALUE obj)
 {
     const unsigned long *crctbl;
     VALUE dst;
@@ -401,24 +390,19 @@
 
 
 static voidpf
-zlib_mem_alloc(opaque, items, size)
-    voidpf opaque;
-    uInt items, size;
+zlib_mem_alloc(voidpf opaque, uInt items, uInt size)
 {
     return xmalloc(items * size);
 }
 
 static void
-zlib_mem_free(opaque, address)
-    voidpf opaque, address;
+zlib_mem_free(voidpf opaque, voidpf address)
 {
     free(address);
 }
 
 static void
-zstream_init(z, func)
-    struct zstream *z;
-    const struct zstream_funcs *func;
+zstream_init(struct zstream *z, const struct zstream_funcs *func)
 {
     z->flags = 0;
     z->buf = Qnil;
@@ -439,8 +423,7 @@
 #define zstream_init_inflate(z)   zstream_init((z), &inflate_funcs)
 
 static void
-zstream_expand_buffer(z)
-    struct zstream *z;
+zstream_expand_buffer(struct zstream *z)
 {
     long inc;
 
@@ -472,9 +455,7 @@
 }
 
 static void
-zstream_expand_buffer_into(z, size)
-    struct zstream *z;
-    int size;
+zstream_expand_buffer_into(struct zstream *z, int size)
 {
     if (NIL_P(z->buf)) {
 	/* I uses rb_str_new here not rb_str_buf_new because
@@ -493,10 +474,7 @@
 }
 
 static void
-zstream_append_buffer(z, src, len)
-    struct zstream *z;
-    const Bytef *src;
-    int len;
+zstream_append_buffer(struct zstream *z, const Bytef *src, int len)
 {
     if (NIL_P(z->buf)) {
 	z->buf = rb_str_buf_new(len);
@@ -529,8 +507,7 @@
     zstream_append_buffer((z),(Bytef*)RSTRING(v)->ptr,RSTRING(v)->len)
 
 static VALUE
-zstream_detach_buffer(z)
-    struct zstream *z;
+zstream_detach_buffer(struct zstream *z)
 {
     VALUE dst;
 
@@ -551,9 +528,7 @@
 }
 
 static VALUE
-zstream_shift_buffer(z, len)
-    struct zstream *z;
-    int len;
+zstream_shift_buffer(struct zstream *z, int len)
 {
     VALUE dst;
 
@@ -576,9 +551,7 @@
 }
 
 static void
-zstream_buffer_ungetc(z, c)
-    struct zstream *z;
-    int c;
+zstream_buffer_ungetc(struct zstream *z, int c)
 {
     if (NIL_P(z->buf) || RSTRING(z->buf)->len - z->buf_filled == 0) {
 	zstream_expand_buffer(z);
@@ -594,10 +567,7 @@
 }
 
 static void
-zstream_append_input(z, src, len)
-    struct zstream *z;
-    const Bytef *src;
-    unsigned int len;
+zstream_append_input(struct zstream *z, const Bytef *src, unsigned int len)
 {
     if (len <= 0) return;
 
@@ -615,9 +585,7 @@
     zstream_append_input((z), (Bytef*)RSTRING(v)->ptr, RSTRING(v)->len)
 
 static void
-zstream_discard_input(z, len)
-    struct zstream *z;
-    unsigned int len;
+zstream_discard_input(struct zstream *z, unsigned int len)
 {
     if (NIL_P(z->input) || RSTRING(z->input)->len <= len) {
 	z->input = Qnil;
@@ -630,15 +598,13 @@
 }
 
 static void
-zstream_reset_input(z)
-    struct zstream *z;
+zstream_reset_input(struct zstream *z)
 {
     z->input = Qnil;
 }
 
 static void
-zstream_passthrough_input(z)
-    struct zstream *z;
+zstream_passthrough_input(struct zstream *z)
 {
     if (!NIL_P(z->input)) {
 	zstream_append_buffer2(z, z->input);
@@ -647,8 +613,7 @@
 }
 
 static VALUE
-zstream_detach_input(z)
-    struct zstream *z;
+zstream_detach_input(struct zstream *z)
 {
     VALUE dst;
 
@@ -665,8 +630,7 @@
 }
 
 static void
-zstream_reset(z)
-    struct zstream *z;
+zstream_reset(struct zstream *z)
 {
     int err;
 
@@ -683,8 +647,7 @@
 }
 
 static VALUE
-zstream_end(z)
-    struct zstream *z;
+zstream_end(struct zstream *z)
 {
     int err;
 
@@ -707,11 +670,7 @@
 }
 
 static void
-zstream_run(z, src, len, flush)
-    struct zstream *z;
-    Bytef *src;
-    uInt len;
-    int flush;
+zstream_run(struct zstream *z, Bytef *src, uInt len, int flush)
 {
     uInt n;
     int err;
@@ -773,10 +732,7 @@
 }
 
 static VALUE
-zstream_sync(z, src, len)
-    struct zstream *z;
-    Bytef *src;
-    uInt len;
+zstream_sync(struct zstream *z, Bytef *src, uInt len)
 {
     VALUE rest;
     int err;
@@ -815,16 +771,14 @@
 }
 
 static void
-zstream_mark(z)
-    struct zstream *z;
+zstream_mark(struct zstream *z)
 {
     rb_gc_mark(z->buf);
     rb_gc_mark(z->input);
 }
 
 static void
-zstream_finalize(z)
-    struct zstream *z;
+zstream_finalize(struct zstream *z)
 {
     int err = z->func->end(&z->stream);
     if (err == Z_STREAM_ERROR)
@@ -834,8 +788,7 @@
 }
 
 static void
-zstream_free(z)
-    struct zstream *z;
+zstream_free(struct zstream *z)
 {
     if (ZSTREAM_IS_READY(z)) {
 	zstream_finalize(z);
@@ -844,9 +797,7 @@
 }
 
 static VALUE
-zstream_new(klass, funcs)
-    VALUE klass;
-    const struct zstream_funcs *funcs;
+zstream_new(VALUE klass, const struct zstream_funcs *funcs)
 {
     VALUE obj;
     struct zstream *z;
@@ -861,8 +812,7 @@
 #define zstream_inflate_new(klass)  zstream_new((klass), &inflate_funcs)
 
 static struct zstream *
-get_zstream(obj)
-    VALUE obj;
+get_zstream(VALUE obj)
 {
     struct zstream *z;
 
@@ -942,8 +892,7 @@
  * exception.
  */
 static VALUE
-rb_zstream_end(obj)
-    VALUE obj;
+rb_zstream_end(VALUE obj)
 {
     zstream_end(get_zstream(obj));
     return Qnil;
@@ -954,8 +903,7 @@
  * are discarded.
  */
 static VALUE
-rb_zstream_reset(obj)
-    VALUE obj;
+rb_zstream_reset(VALUE obj)
 {
     zstream_reset(get_zstream(obj));
     return Qnil;
@@ -966,8 +914,7 @@
  * Zlib::Inflate#finish for details of this behavior.
  */
 static VALUE
-rb_zstream_finish(obj)
-    VALUE obj;
+rb_zstream_finish(VALUE obj)
 {
     struct zstream *z = get_zstream(obj);
     VALUE dst;
@@ -983,8 +930,7 @@
  * Flushes input buffer and returns all data in that buffer.
  */
 static VALUE
-rb_zstream_flush_next_in(obj)
-    VALUE obj;
+rb_zstream_flush_next_in(VALUE obj)
 {
     struct zstream *z;
     VALUE dst;
@@ -999,8 +945,7 @@
  * Flushes output buffer and returns all data in that buffer.
  */
 static VALUE
-rb_zstream_flush_next_out(obj)
-    VALUE obj;
+rb_zstream_flush_next_out(VALUE obj)
 {
     struct zstream *z;
     VALUE dst;
@@ -1016,8 +961,7 @@
  * space is allocated automatically, this method returns 0 normally.
  */
 static VALUE
-rb_zstream_avail_out(obj)
-    VALUE obj;
+rb_zstream_avail_out(VALUE obj)
 {
     struct zstream *z;
     Data_Get_Struct(obj, struct zstream, z);
@@ -1031,8 +975,7 @@
  * method.
  */
 static VALUE
-rb_zstream_set_avail_out(obj, size)
-    VALUE obj, size;
+rb_zstream_set_avail_out(VALUE obj, VALUE size)
 {
     struct zstream *z = get_zstream(obj);
 
@@ -1045,8 +988,7 @@
  * Returns bytes of data in the input buffer. Normally, returns 0.
  */
 static VALUE
-rb_zstream_avail_in(obj)
-    VALUE obj;
+rb_zstream_avail_in(VALUE obj)
 {
     struct zstream *z;
     Data_Get_Struct(obj, struct zstream, z);
@@ -1057,8 +999,7 @@
  * Returns the total bytes of the input data to the stream.  FIXME
  */
 static VALUE
-rb_zstream_total_in(obj)
-    VALUE obj;
+rb_zstream_total_in(VALUE obj)
 {
     return rb_uint2inum(get_zstream(obj)->stream.total_in);
 }
@@ -1067,8 +1008,7 @@
  * Returns the total bytes of the output data from the stream.  FIXME
  */
 static VALUE
-rb_zstream_total_out(obj)
-    VALUE obj;
+rb_zstream_total_out(VALUE obj)
 {
     return rb_uint2inum(get_zstream(obj)->stream.total_out);
 }
@@ -1079,8 +1019,7 @@
  * <tt>Zlib::UNKNOWN</tt>.
  */
 static VALUE
-rb_zstream_data_type(obj)
-    VALUE obj;
+rb_zstream_data_type(VALUE obj)
 {
     return INT2FIX(get_zstream(obj)->stream.data_type);
 }
@@ -1089,8 +1028,7 @@
  * Returns the adler-32 checksum.
  */
 static VALUE
-rb_zstream_adler(obj)
-    VALUE obj;
+rb_zstream_adler(VALUE obj)
 {
 	return rb_uint2inum(get_zstream(obj)->stream.adler);
 }
@@ -1099,8 +1037,7 @@
  * Returns true if the stream is finished.
  */
 static VALUE
-rb_zstream_finished_p(obj)
-    VALUE obj;
+rb_zstream_finished_p(VALUE obj)
 {
     return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
 }
@@ -1109,8 +1046,7 @@
  * Returns true if the stream is closed.
  */
 static VALUE
-rb_zstream_closed_p(obj)
-    VALUE obj;
+rb_zstream_closed_p(VALUE obj)
 {
     struct zstream *z;
     Data_Get_Struct(obj, struct zstream, z);
@@ -1139,8 +1075,7 @@
 
 
 static VALUE
-rb_deflate_s_allocate(klass)
-    VALUE klass;
+rb_deflate_s_allocate(VALUE klass)
 {
     return zstream_deflate_new(klass);
 }
@@ -1155,10 +1090,7 @@
  * TODO: document better!
  */
 static VALUE
-rb_deflate_initialize(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_deflate_initialize(int argc, VALUE *argv, VALUE obj)
 {
     struct zstream *z;
     VALUE level, wbits, memlevel, strategy;
@@ -1182,8 +1114,7 @@
  * Duplicates the deflate stream.
  */
 static VALUE
-rb_deflate_init_copy(self, orig)
-    VALUE self, orig;
+rb_deflate_init_copy(VALUE self, VALUE orig)
 {
     struct zstream *z1 = get_zstream(self);
     struct zstream *z2 = get_zstream(orig);
@@ -1199,8 +1130,7 @@
 }
 
 static VALUE
-deflate_run(args)
-    VALUE args;
+deflate_run(VALUE args)
 {
     struct zstream *z = (struct zstream*)((VALUE*)args)[0];
     VALUE src = ((VALUE*)args)[1];
@@ -1230,10 +1160,7 @@
  *
  */
 static VALUE
-rb_deflate_s_deflate(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_deflate_s_deflate(int argc, VALUE *argv, VALUE klass)
 {
     struct zstream z;
     VALUE src, level, dst, args[2];
@@ -1259,10 +1186,7 @@
 }
 
 static void
-do_deflate(z, src, flush)
-    struct zstream *z;
-    VALUE src;
-    int flush;
+do_deflate(struct zstream *z, VALUE src, int flush)
 {
     if (NIL_P(src)) {
 	zstream_run(z, (Bytef*)"", 0, Z_FINISH);
@@ -1289,10 +1213,7 @@
  * TODO: document better!
  */
 static VALUE
-rb_deflate_deflate(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_deflate_deflate(int argc, VALUE *argv, VALUE obj)
 {
     struct zstream *z = get_zstream(obj);
     VALUE src, flush, dst;
@@ -1314,8 +1235,7 @@
  * preserved in output buffer.
  */
 static VALUE
-rb_deflate_addstr(obj, src)
-    VALUE obj, src;
+rb_deflate_addstr(VALUE obj, VALUE src)
 {
     OBJ_INFECT(obj, src);
     do_deflate(get_zstream(obj), src, Z_NO_FLUSH);
@@ -1332,10 +1252,7 @@
  * TODO: document better!
  */
 static VALUE
-rb_deflate_flush(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_deflate_flush(int argc, VALUE *argv, VALUE obj)
 {
     struct zstream *z = get_zstream(obj);
     VALUE v_flush, dst;
@@ -1362,8 +1279,7 @@
  * TODO: document better!
  */
 static VALUE
-rb_deflate_params(obj, v_level, v_strategy)
-    VALUE obj, v_level, v_strategy;
+rb_deflate_params(VALUE obj, VALUE v_level, VALUE v_strategy)
 {
     struct zstream *z = get_zstream(obj);
     int level, strategy;
@@ -1395,8 +1311,7 @@
  * TODO: document better!
  */
 static VALUE
-rb_deflate_set_dictionary(obj, dic)
-    VALUE obj, dic;
+rb_deflate_set_dictionary(VALUE obj, VALUE dic)
 {
     struct zstream *z = get_zstream(obj);
     VALUE src = dic;
@@ -1427,8 +1342,7 @@
 
 
 static VALUE
-rb_inflate_s_allocate(klass)
-    VALUE klass;
+rb_inflate_s_allocate(VALUE klass)
 {
     return zstream_inflate_new(klass);
 }
@@ -1442,10 +1356,7 @@
  * TODO: document better!
  */
 static VALUE
-rb_inflate_initialize(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_inflate_initialize(int argc, VALUE *argv, VALUE obj)
 {
     struct zstream *z;
     VALUE wbits;
@@ -1464,8 +1375,7 @@
 }
 
 static VALUE
-inflate_run(args)
-    VALUE args;
+inflate_run(VALUE args)
 {
     struct zstream *z = (struct zstream*)((VALUE*)args)[0];
     VALUE src = ((VALUE*)args)[1];
@@ -1493,8 +1403,7 @@
  *
  */
 static VALUE
-rb_inflate_s_inflate(obj, src)
-    VALUE obj, src;
+rb_inflate_s_inflate(VALUE obj, VALUE src)
 {
     struct zstream z;
     VALUE dst, args[2];
@@ -1517,9 +1426,7 @@
 }
 
 static void
-do_inflate(z, src)
-    struct zstream *z;
-    VALUE src;
+do_inflate(struct zstream *z, VALUE src)
 {
     if (NIL_P(src)) {
 	zstream_run(z, (Bytef*)"", 0, Z_FINISH);
@@ -1546,8 +1453,7 @@
  * TODO: document better!
  */
 static VALUE
-rb_inflate_inflate(obj, src)
-    VALUE obj, src;
+rb_inflate_inflate(VALUE obj, VALUE src)
 {
     struct zstream *z = get_zstream(obj);
     VALUE dst;
@@ -1584,8 +1490,7 @@
  * preserved in output buffer.
  */
 static VALUE
-rb_inflate_addstr(obj, src)
-    VALUE obj, src;
+rb_inflate_addstr(VALUE obj, VALUE src)
 {
     struct zstream *z = get_zstream(obj);
 
@@ -1616,8 +1521,7 @@
  * following data of full flush point is preserved in the buffer.
  */
 static VALUE
-rb_inflate_sync(obj, src)
-    VALUE obj, src;
+rb_inflate_sync(VALUE obj, VALUE src)
 {
     struct zstream *z = get_zstream(obj);
 
@@ -1634,8 +1538,7 @@
  * <tt>:)</tt>
  */
 static VALUE
-rb_inflate_sync_point_p(obj)
-    VALUE obj;
+rb_inflate_sync_point_p(VALUE obj)
 {
     struct zstream *z = get_zstream(obj);
     int err;
@@ -1657,8 +1560,7 @@
  * TODO: document better!
  */
 static VALUE
-rb_inflate_set_dictionary(obj, dic)
-    VALUE obj, dic;
+rb_inflate_set_dictionary(VALUE obj, VALUE dic)
 {
     struct zstream *z = get_zstream(obj);
     VALUE src = dic;
@@ -1753,8 +1655,7 @@
 
 
 static void
-gzfile_mark(gz)
-    struct gzfile *gz;
+gzfile_mark(struct gzfile *gz)
 {
     rb_gc_mark(gz->io);
     rb_gc_mark(gz->orig_name);
@@ -1763,8 +1664,7 @@
 }
 
 static void
-gzfile_free(gz)
-    struct gzfile *gz;
+gzfile_free(struct gzfile *gz)
 {
     struct zstream *z = &gz->z;
 
@@ -1806,8 +1706,7 @@
 #define gzfile_reader_new(gz) gzfile_new((gz),&inflate_funcs,gzfile_reader_end)
 
 static void
-gzfile_reset(gz)
-    struct gzfile *gz;
+gzfile_reset(struct gzfile *gz)
 {
     zstream_reset(&gz->z);
     gz->crc = crc32(0, Z_NULL, 0);
@@ -1816,9 +1715,7 @@
 }
 
 static void
-gzfile_close(gz, closeflag)
-    struct gzfile *gz;
-    int closeflag;
+gzfile_close(struct gzfile *gz, int closeflag)
 {
     VALUE io = gz->io;
 
@@ -1832,8 +1729,7 @@
 }
 
 static void
-gzfile_write_raw(gz)
-    struct gzfile *gz;
+gzfile_write_raw(struct gzfile *gz)
 {
     VALUE str;
 
@@ -1848,8 +1744,7 @@
 }
 
 static VALUE
-gzfile_read_raw_partial(arg)
-    VALUE arg;
+gzfile_read_raw_partial(VALUE arg)
 {
     struct gzfile *gz = (struct gzfile*)arg;
     VALUE str;
@@ -1860,8 +1755,7 @@
 }
 
 static VALUE
-gzfile_read_raw_rescue(arg)
-    VALUE arg;
+gzfile_read_raw_rescue(VALUE arg)
 {
     struct gzfile *gz = (struct gzfile*)arg;
     VALUE str = Qnil;
@@ -1875,8 +1769,7 @@
 }
 
 static VALUE
-gzfile_read_raw(gz)
-    struct gzfile *gz;
+gzfile_read_raw(struct gzfile *gz)
 {
     return rb_rescue2(gzfile_read_raw_partial, (VALUE)gz,
                       gzfile_read_raw_rescue, (VALUE)gz,
@@ -1884,9 +1777,7 @@
 }
 
 static int
-gzfile_read_raw_ensure(gz, size)
-    struct gzfile *gz;
-    int size;
+gzfile_read_raw_ensure(struct gzfile *gz, int size)
 {
     VALUE str;
 
@@ -1899,9 +1790,7 @@
 }
 
 static char *
-gzfile_read_raw_until_zero(gz, offset)
-    struct gzfile *gz;
-    long offset;
+gzfile_read_raw_until_zero(struct gzfile *gz, long offset)
 {
     VALUE str;
     char *p;
@@ -1921,8 +1810,7 @@
 }
 
 static unsigned int
-gzfile_get16(src)
-    const unsigned char *src;
+gzfile_get16(const unsigned char *src)
 {
     unsigned int n;
     n  = *(src++) & 0xff;
@@ -1931,8 +1819,7 @@
 }
 
 static unsigned long
-gzfile_get32(src)
-    const unsigned char *src;
+gzfile_get32(const unsigned char *src)
 {
     unsigned long n;
     n  = *(src++) & 0xff;
@@ -1943,9 +1830,7 @@
 }
 
 static void
-gzfile_set32(n, dst)
-    unsigned long n;
-    unsigned char *dst;
+gzfile_set32(unsigned long n, unsigned char *dst)
 {
     *(dst++) = n & 0xff;
     *(dst++) = (n >> 8) & 0xff;
@@ -1954,8 +1839,7 @@
 }
 
 static void
-gzfile_make_header(gz)
-    struct gzfile *gz;
+gzfile_make_header(struct gzfile *gz)
 {
     Bytef buf[10];  /* the size of gzip header */
     unsigned char flags = 0, extraflags = 0;
@@ -1999,8 +1883,7 @@
 }
 
 static void
-gzfile_make_footer(gz)
-    struct gzfile *gz;
+gzfile_make_footer(struct gzfile *gz)
 {
     Bytef buf[8];  /* 8 is the size of gzip footer */
 
@@ -2011,8 +1894,7 @@
 }
 
 static void
-gzfile_read_header(gz)
-    struct gzfile *gz;
+gzfile_read_header(struct gzfile *gz)
 {
     const unsigned char *head;
     long len;
@@ -2087,8 +1969,7 @@
 }
 
 static void
-gzfile_check_footer(gz)
-    struct gzfile *gz;
+gzfile_check_footer(struct gzfile *gz)
 {
     unsigned long crc, length;
 
@@ -2113,10 +1994,7 @@
 }
 
 static void
-gzfile_write(gz, str, len)
-    struct gzfile *gz;
-    Bytef *str;
-    uInt len;
+gzfile_write(struct gzfile *gz, Bytef *str, uInt len)
 {
     if (!(gz->z.flags & GZFILE_FLAG_HEADER_FINISHED)) {
 	gzfile_make_header(gz);
@@ -2131,8 +2009,7 @@
 }
 
 static long
-gzfile_read_more(gz)
-    struct gzfile *gz;
+gzfile_read_more(struct gzfile *gz)
 {
     volatile VALUE str;
 
@@ -2154,9 +2031,7 @@
 }
 
 static void
-gzfile_calc_crc(gz, str)
-    struct gzfile *gz;
-    VALUE str;
+gzfile_calc_crc(struct gzfile *gz, VALUE str)
 {
     if (RSTRING(str)->len <= gz->ungetc) {
 	gz->ungetc -= RSTRING(str)->len;
@@ -2169,9 +2044,7 @@
 }
 
 static VALUE
-gzfile_read(gz, len)
-    struct gzfile *gz;
-    int len;
+gzfile_read(struct gzfile *gz, int len)
 {
     VALUE dst;
 
@@ -2197,10 +2070,7 @@
 }
 
 static VALUE
-gzfile_readpartial(gz, len, outbuf)
-    struct gzfile *gz;
-    int len;
-    VALUE outbuf;
+gzfile_readpartial(struct gzfile *gz, int len, VALUE outbuf)
 {
     VALUE dst;
 
@@ -2245,8 +2115,7 @@
 }
 
 static VALUE
-gzfile_read_all(gz)
-    struct gzfile *gz;
+gzfile_read_all(struct gzfile *gz)
 {
     VALUE dst;
 
@@ -2268,17 +2137,14 @@
 }
 
 static void
-gzfile_ungetc(gz, c)
-    struct gzfile *gz;
-    int c;
+gzfile_ungetc(struct gzfile *gz, int c)
 {
     zstream_buffer_ungetc(&gz->z, c);
     gz->ungetc++;
 }
 
 static VALUE
-gzfile_writer_end_run(arg)
-    VALUE arg;
+gzfile_writer_end_run(VALUE arg)
 {
     struct gzfile *gz = (struct gzfile *)arg;
 
@@ -2294,8 +2160,7 @@
 }
 
 static void
-gzfile_writer_end(gz)
-    struct gzfile *gz;
+gzfile_writer_end(struct gzfile *gz)
 {
     if (ZSTREAM_IS_CLOSING(&gz->z)) return;
     gz->z.flags |= ZSTREAM_FLAG_CLOSING;
@@ -2304,8 +2169,7 @@
 }
 
 static VALUE
-gzfile_reader_end_run(arg)
-    VALUE arg;
+gzfile_reader_end_run(VALUE arg)
 {
     struct gzfile *gz = (struct gzfile *)arg;
 
@@ -2318,8 +2182,7 @@
 }
 
 static void
-gzfile_reader_end(gz)
-    struct gzfile *gz;
+gzfile_reader_end(struct gzfile *gz)
 {
     if (ZSTREAM_IS_CLOSING(&gz->z)) return;
     gz->z.flags |= ZSTREAM_FLAG_CLOSING;
@@ -2328,8 +2191,7 @@
 }
 
 static void
-gzfile_reader_rewind(gz)
-    struct gzfile *gz;
+gzfile_reader_rewind(struct gzfile *gz)
 {
     long n;
 
@@ -2343,8 +2205,7 @@
 }
 
 static VALUE
-gzfile_reader_get_unused(gz)
-    struct gzfile *gz;
+gzfile_reader_get_unused(struct gzfile *gz)
 {
     VALUE str;
 
@@ -2361,8 +2222,7 @@
 }
 
 static struct gzfile *
-get_gzfile(obj)
-    VALUE obj;
+get_gzfile(VALUE obj)
 {
     struct gzfile *gz;
 
@@ -2388,8 +2248,7 @@
 
 
 static VALUE
-gzfile_ensure_close(obj)
-    VALUE obj;
+gzfile_ensure_close(VALUE obj)
 {
     struct gzfile *gz;
 
@@ -2404,10 +2263,7 @@
  * See Zlib::GzipReader#wrap and Zlib::GzipWriter#wrap.
  */
 static VALUE
-rb_gzfile_s_wrap(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_gzfile_s_wrap(int argc, VALUE *argv, VALUE klass)
 {
     VALUE obj = rb_class_new_instance(argc, argv, klass);
 
@@ -2423,11 +2279,7 @@
  * See Zlib::GzipReader#open and Zlib::GzipWriter#open.
  */
 static VALUE
-gzfile_s_open(argc, argv, klass, mode)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
-    const char *mode;
+gzfile_s_open(int argc, VALUE *argv, VALUE klass, const char *mode)
 {
     VALUE io, filename;
 
@@ -2446,8 +2298,7 @@
  * Same as IO.
  */
 static VALUE
-rb_gzfile_to_io(obj)
-    VALUE obj;
+rb_gzfile_to_io(VALUE obj)
 {
     return get_gzfile(obj)->io;
 }
@@ -2456,8 +2307,7 @@
  * Returns CRC value of the uncompressed data.
  */
 static VALUE
-rb_gzfile_crc(obj)
-    VALUE obj;
+rb_gzfile_crc(VALUE obj)
 {
     return rb_uint2inum(get_gzfile(obj)->crc);
 }
@@ -2466,8 +2316,7 @@
  * Returns last modification time recorded in the gzip file header.
  */
 static VALUE
-rb_gzfile_mtime(obj)
-    VALUE obj;
+rb_gzfile_mtime(VALUE obj)
 {
     return rb_time_new(get_gzfile(obj)->mtime, (time_t)0);
 }
@@ -2476,8 +2325,7 @@
  * Returns compression level.
  */
 static VALUE
-rb_gzfile_level(obj)
-    VALUE obj;
+rb_gzfile_level(VALUE obj)
 {
     return INT2FIX(get_gzfile(obj)->level);
 }
@@ -2486,8 +2334,7 @@
  * Returns OS code number recorded in the gzip file header.
  */
 static VALUE
-rb_gzfile_os_code(obj)
-    VALUE obj;
+rb_gzfile_os_code(VALUE obj)
 {
     return INT2FIX(get_gzfile(obj)->os_code);
 }
@@ -2497,8 +2344,7 @@
  * original filename is not present.
  */
 static VALUE
-rb_gzfile_orig_name(obj)
-    VALUE obj;
+rb_gzfile_orig_name(VALUE obj)
 {
     VALUE str = get_gzfile(obj)->orig_name;
     if (!NIL_P(str)) {
@@ -2513,8 +2359,7 @@
  * is not present.
  */
 static VALUE
-rb_gzfile_comment(obj)
-    VALUE obj;
+rb_gzfile_comment(VALUE obj)
 {
     VALUE str = get_gzfile(obj)->comment;
     if (!NIL_P(str)) {
@@ -2528,8 +2373,7 @@
  * ???
  */
 static VALUE
-rb_gzfile_lineno(obj)
-    VALUE obj;
+rb_gzfile_lineno(VALUE obj)
 {
     return INT2NUM(get_gzfile(obj)->lineno);
 }
@@ -2538,8 +2382,7 @@
  * ???
  */
 static VALUE
-rb_gzfile_set_lineno(obj, lineno)
-    VALUE obj, lineno;
+rb_gzfile_set_lineno(VALUE obj, VALUE lineno)
 {
     struct gzfile *gz = get_gzfile(obj);
     gz->lineno = NUM2INT(lineno);
@@ -2550,8 +2393,7 @@
  * ???
  */
 static VALUE
-rb_gzfile_set_mtime(obj, mtime)
-    VALUE obj, mtime;
+rb_gzfile_set_mtime(VALUE obj, VALUE mtime)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE val;
@@ -2574,8 +2416,7 @@
  * ???
  */
 static VALUE
-rb_gzfile_set_orig_name(obj, str)
-    VALUE obj, str;
+rb_gzfile_set_orig_name(VALUE obj, VALUE str)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE s;
@@ -2597,8 +2438,7 @@
  * ???
  */
 static VALUE
-rb_gzfile_set_comment(obj, str)
-    VALUE obj, str;
+rb_gzfile_set_comment(VALUE obj, VALUE str)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE s;
@@ -2621,8 +2461,7 @@
  * associated IO object. Returns the associated IO object.
  */
 static VALUE
-rb_gzfile_close(obj)
-    VALUE obj;
+rb_gzfile_close(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE io;
@@ -2638,8 +2477,7 @@
  * object.
  */
 static VALUE
-rb_gzfile_finish(obj)
-    VALUE obj;
+rb_gzfile_finish(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE io;
@@ -2653,8 +2491,7 @@
  * Same as IO.
  */
 static VALUE
-rb_gzfile_closed_p(obj)
-    VALUE obj;
+rb_gzfile_closed_p(VALUE obj)
 {
     struct gzfile *gz;
     Data_Get_Struct(obj, struct gzfile, gz);
@@ -2665,8 +2502,7 @@
  * ???
  */
 static VALUE
-rb_gzfile_eof_p(obj)
-    VALUE obj;
+rb_gzfile_eof_p(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
@@ -2676,8 +2512,7 @@
  * Same as IO.
  */
 static VALUE
-rb_gzfile_sync(obj)
-    VALUE obj;
+rb_gzfile_sync(VALUE obj)
 {
     return (get_gzfile(obj)->z.flags & GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
 }
@@ -2690,8 +2525,7 @@
  * decreases sharply.
  */
 static VALUE
-rb_gzfile_set_sync(obj, mode)
-    VALUE obj, mode;
+rb_gzfile_set_sync(VALUE obj, VALUE mode)
 {
     struct gzfile *gz = get_gzfile(obj);
 
@@ -2708,8 +2542,7 @@
  * ???
  */
 static VALUE
-rb_gzfile_total_in(obj)
-    VALUE obj;
+rb_gzfile_total_in(VALUE obj)
 {
     return rb_uint2inum(get_gzfile(obj)->z.stream.total_in);
 }
@@ -2718,8 +2551,7 @@
  * ???
  */
 static VALUE
-rb_gzfile_total_out(obj)
-    VALUE obj;
+rb_gzfile_total_out(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     return rb_uint2inum(gz->z.stream.total_out - gz->z.buf_filled);
@@ -2756,8 +2588,7 @@
  */
 
 static VALUE
-rb_gzwriter_s_allocate(klass)
-    VALUE klass;
+rb_gzwriter_s_allocate(VALUE klass)
 {
     return gzfile_writer_new(klass);
 }
@@ -2770,10 +2601,7 @@
  * this method are found in Zlib::GzipWriter.new and Zlib::GzipWriter#wrap.
  */
 static VALUE
-rb_gzwriter_s_open(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_gzwriter_s_open(int argc, VALUE *argv, VALUE klass)
 {
     return gzfile_s_open(argc, argv, klass, "wb");
 }
@@ -2787,10 +2615,7 @@
  * +write+ method that behaves same as write method in IO class.
  */
 static VALUE
-rb_gzwriter_initialize(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzwriter_initialize(int argc, VALUE *argv, VALUE obj)
 {
     struct gzfile *gz;
     VALUE io, level, strategy;
@@ -2820,10 +2645,7 @@
  * +flush+ is omitted.  It is no use giving flush <tt>Zlib::NO_FLUSH</tt>.
  */
 static VALUE
-rb_gzwriter_flush(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzwriter_flush(int argc, VALUE *argv, VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE v_flush;
@@ -2847,8 +2669,7 @@
  * Same as IO.
  */
 static VALUE
-rb_gzwriter_write(obj, str)
-    VALUE obj, str;
+rb_gzwriter_write(VALUE obj, VALUE str)
 {
     struct gzfile *gz = get_gzfile(obj);
 
@@ -2863,8 +2684,7 @@
  * Same as IO.
  */
 static VALUE
-rb_gzwriter_putc(obj, ch)
-    VALUE obj, ch;
+rb_gzwriter_putc(VALUE obj, VALUE ch)
 {
     struct gzfile *gz = get_gzfile(obj);
     char c = NUM2CHR(ch);
@@ -2955,8 +2775,7 @@
  */
 
 static VALUE
-rb_gzreader_s_allocate(klass)
-    VALUE klass;
+rb_gzreader_s_allocate(VALUE klass)
 {
     return gzfile_reader_new(klass);
 }
@@ -2969,10 +2788,7 @@
  * are in Zlib::GzipReader.new and ZLib::GzipReader.wrap.
  */
 static VALUE
-rb_gzreader_s_open(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+rb_gzreader_s_open(int argc, VALUE *argv, VALUE klass)
 {
     return gzfile_s_open(argc, argv, klass, "rb");
 }
@@ -2988,8 +2804,7 @@
  * exception.
  */
 static VALUE
-rb_gzreader_initialize(obj, io)
-    VALUE obj, io;
+rb_gzreader_initialize(VALUE obj, VALUE io)
 {
     struct gzfile *gz;
     int err;
@@ -3013,8 +2828,7 @@
  * object.  The associated IO object needs to respond to the +seek+ method.
  */
 static VALUE
-rb_gzreader_rewind(obj)
-    VALUE obj;
+rb_gzreader_rewind(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     gzfile_reader_rewind(gz);
@@ -3026,8 +2840,7 @@
  * +nil+ if the whole gzip file is not parsed yet.
  */
 static VALUE
-rb_gzreader_unused(obj)
-    VALUE obj;
+rb_gzreader_unused(VALUE obj)
 {
     struct gzfile *gz;
     Data_Get_Struct(obj, struct gzfile, gz);
@@ -3038,10 +2851,7 @@
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_read(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_read(int argc, VALUE *argv, VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE vlen;
@@ -3070,10 +2880,7 @@
  *  It raises <code>EOFError</code> on end of file.
  */
 static VALUE
-rb_gzreader_readpartial(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_readpartial(int argc, VALUE *argv, VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE vlen, outbuf;
@@ -3094,8 +2901,7 @@
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_getc(obj)
-    VALUE obj;
+rb_gzreader_getc(VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     VALUE dst;
@@ -3111,8 +2917,7 @@
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_readchar(obj)
-    VALUE obj;
+rb_gzreader_readchar(VALUE obj)
 {
     VALUE dst;
     dst = rb_gzreader_getc(obj);
@@ -3126,8 +2931,7 @@
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_each_byte(obj)
-    VALUE obj;
+rb_gzreader_each_byte(VALUE obj)
 {
     VALUE c;
     while (!NIL_P(c = rb_gzreader_getc(obj))) {
@@ -3140,8 +2944,7 @@
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_ungetc(obj, ch)
-    VALUE obj, ch;
+rb_gzreader_ungetc(VALUE obj, VALUE ch)
 {
     struct gzfile *gz = get_gzfile(obj);
     gzfile_ungetc(gz, NUM2CHR(ch));
@@ -3149,8 +2952,7 @@
 }
 
 static void
-gzreader_skip_linebreaks(gz)
-    struct gzfile *gz;
+gzreader_skip_linebreaks(struct gzfile *gz)
 {
     VALUE str;
     char *p;
@@ -3181,20 +2983,14 @@
 }
 
 static void
-rscheck(rsptr, rslen, rs)
-    char *rsptr;
-    long rslen;
-    VALUE rs;
+rscheck(char *rsptr, long rslen, VALUE rs)
 {
     if (RSTRING(rs)->ptr != rsptr && RSTRING(rs)->len != rslen)
 	rb_raise(rb_eRuntimeError, "rs modified");
 }
 
 static VALUE
-gzreader_gets(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+gzreader_gets(int argc, VALUE *argv, VALUE obj)
 {
     struct gzfile *gz = get_gzfile(obj);
     volatile VALUE rs;
@@ -3275,10 +3071,7 @@
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_gets(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_gets(int argc, VALUE *argv, VALUE obj)
 {
     VALUE dst;
     dst = gzreader_gets(argc, argv, obj);
@@ -3292,10 +3085,7 @@
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_readline(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_readline(int argc, VALUE *argv, VALUE obj)
 {
     VALUE dst;
     dst = rb_gzreader_gets(argc, argv, obj);
@@ -3309,10 +3099,7 @@
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_each(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_each(int argc, VALUE *argv, VALUE obj)
 {
     VALUE str;
     while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
@@ -3325,10 +3112,7 @@
  * See Zlib::GzipReader documentation for a description.
  */
 static VALUE
-rb_gzreader_readlines(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+rb_gzreader_readlines(int argc, VALUE *argv, VALUE obj)
 {
     VALUE str, dst;
     dst = rb_ary_new();
only in patch2:
unchanged:
--- process.c	27 Dec 2005 05:10:38 -0000	1.143
+++ process.c	28 Apr 2006 15:42:09 -0000
@@ -3314,8 +3314,7 @@
 
 #if defined(HAVE_SETRESUID) || defined(HAVE_SETEUID) || defined(_POSIX_SAVED_IDS)
 static VALUE
-p_uid_sw_ensure(id)
-    int id;
+p_uid_sw_ensure(int id)
 {
     under_uid_switch = 0;
     return rb_seteuid_core(id);
@@ -3336,8 +3335,7 @@
  */
 
 static VALUE
-p_uid_switch(obj)
-    VALUE obj;
+p_uid_switch(VALUE obj)
 {
     int uid, euid;
 
@@ -3423,8 +3421,7 @@
 
 #if defined(HAVE_SETRESGID) || defined(HAVE_SETEGID) || defined(_POSIX_SAVED_IDS)
 static VALUE
-p_gid_sw_ensure(id)
-    int id;
+p_gid_sw_ensure(int id)
 {
     under_gid_switch = 0;
     return rb_setegid_core(id);
@@ -3445,8 +3442,7 @@
  */
 
 static VALUE
-p_gid_switch(obj)
-    VALUE obj;
+p_gid_switch(VALUE obj)
 {
     int gid, egid;
 
only in patch2:
unchanged:
--- range.c	12 Dec 2005 01:01:29 -0000	1.82
+++ range.c	28 Apr 2006 15:42:10 -0000
@@ -654,8 +654,7 @@
  */
 
 static VALUE
-range_cover(range, val)
-    VALUE range, val;
+range_cover(VALUE range, VALUE val)
 {
     VALUE beg, end;
 
only in patch2:
unchanged:
--- ext/curses/curses.c	27 Aug 2005 11:19:21 -0000	1.30
+++ ext/curses/curses.c	28 Apr 2006 15:42:14 -0000
@@ -90,8 +90,7 @@
 } while (0)
 
 static void
-free_window(winp)
-    struct windata *winp;
+free_window(struct windata *winp)
 {
     if (winp->window && winp->window != stdscr) delwin(winp->window);
     winp->window = 0;
@@ -99,9 +98,7 @@
 }
 
 static VALUE
-prep_window(class, window)
-    VALUE class;
-    WINDOW *window;
+prep_window(VALUE class, WINDOW *window)
 {
     VALUE obj;
     struct windata *winp;
@@ -178,8 +175,7 @@
 
 /* def clear */
 static VALUE
-curses_clear(obj)
-    VALUE obj;
+curses_clear(VALUE obj)
 {
     curses_stdscr();
     wclear(stdscr);
@@ -197,8 +193,7 @@
 
 /* def refresh */
 static VALUE
-curses_refresh(obj)
-    VALUE obj;
+curses_refresh(VALUE obj)
 {
     curses_stdscr();
     refresh();
@@ -207,8 +202,7 @@
 
 /* def doupdate */
 static VALUE
-curses_doupdate(obj)
-    VALUE obj;
+curses_doupdate(VALUE obj)
 {
     curses_stdscr();
 #ifdef HAVE_DOUPDATE
@@ -221,8 +215,7 @@
 
 /* def echo */
 static VALUE
-curses_echo(obj)
-    VALUE obj;
+curses_echo(VALUE obj)
 {
     curses_stdscr();
     echo();
@@ -231,8 +224,7 @@
 
 /* def noecho */
 static VALUE
-curses_noecho(obj)
-    VALUE obj;
+curses_noecho(VALUE obj)
 {
     curses_stdscr();
     noecho();
@@ -241,8 +233,7 @@
 
 /* def raw */
 static VALUE
-curses_raw(obj)
-    VALUE obj;
+curses_raw(VALUE obj)
 {
     curses_stdscr();
     raw();
@@ -251,8 +242,7 @@
 
 /* def noraw */
 static VALUE
-curses_noraw(obj)
-    VALUE obj;
+curses_noraw(VALUE obj)
 {
     curses_stdscr();
     noraw();
@@ -261,8 +251,7 @@
 
 /* def cbreak */
 static VALUE
-curses_cbreak(obj)
-    VALUE obj;
+curses_cbreak(VALUE obj)
 {
     curses_stdscr();
     cbreak();
@@ -271,8 +260,7 @@
 
 /* def nocbreak */
 static VALUE
-curses_nocbreak(obj)
-    VALUE obj;
+curses_nocbreak(VALUE obj)
 {
     curses_stdscr();
     nocbreak();
@@ -281,8 +269,7 @@
 
 /* def nl */
 static VALUE
-curses_nl(obj)
-    VALUE obj;
+curses_nl(VALUE obj)
 {
     curses_stdscr();
     nl();
@@ -291,8 +278,7 @@
 
 /* def nonl */
 static VALUE
-curses_nonl(obj)
-    VALUE obj;
+curses_nonl(VALUE obj)
 {
     curses_stdscr();
     nonl();
@@ -301,8 +287,7 @@
 
 /* def beep */
 static VALUE
-curses_beep(obj)
-    VALUE obj;
+curses_beep(VALUE obj)
 {
 #ifdef HAVE_BEEP
     curses_stdscr();
@@ -313,8 +298,7 @@
 
 /* def flash */
 static VALUE
-curses_flash(obj)
-    VALUE obj;
+curses_flash(VALUE obj)
 {
 #ifdef HAVE_FLASH
     curses_stdscr();
@@ -325,9 +309,7 @@
 
 /* def ungetch */
 static VALUE
-curses_ungetch(obj, ch)
-    VALUE obj;
-    VALUE ch;
+curses_ungetch(VALUE obj, VALUE ch)
 {
 #ifdef HAVE_UNGETCH
     curses_stdscr();
@@ -340,10 +322,7 @@
 
 /* def setpos(y, x) */
 static VALUE
-curses_setpos(obj, y, x)
-    VALUE obj;
-    VALUE y;
-    VALUE x;
+curses_setpos(VALUE obj, VALUE y, VALUE x)
 {
     curses_stdscr();
     move(NUM2INT(y), NUM2INT(x));
@@ -352,8 +331,7 @@
 
 /* def standout */
 static VALUE
-curses_standout(obj)
-    VALUE obj;
+curses_standout(VALUE obj)
 {
     standout();
     return Qnil;
@@ -361,8 +339,7 @@
 
 /* def standend */
 static VALUE
-curses_standend(obj)
-    VALUE obj;
+curses_standend(VALUE obj)
 {
     standend();
     return Qnil;
@@ -370,8 +347,7 @@
 
 /* def inch */
 static VALUE
-curses_inch(obj)
-    VALUE obj;
+curses_inch(VALUE obj)
 {
     curses_stdscr();
     return CH2FIX(inch());
@@ -379,9 +355,7 @@
 
 /* def addch(ch) */
 static VALUE
-curses_addch(obj, ch)
-    VALUE obj;
-    VALUE ch;
+curses_addch(VALUE obj, VALUE ch)
 {
     curses_stdscr();
     addch(NUM2CH(ch));
@@ -390,9 +364,7 @@
 
 /* def insch(ch) */
 static VALUE
-curses_insch(obj, ch)
-    VALUE obj;
-    VALUE ch;
+curses_insch(VALUE obj, VALUE ch)
 {
     curses_stdscr();
     insch(NUM2CH(ch));
@@ -401,9 +373,7 @@
 
 /* def addstr(str) */
 static VALUE
-curses_addstr(obj, str)
-    VALUE obj;
-    VALUE str;
+curses_addstr(VALUE obj, VALUE str)
 {
     curses_stdscr();
     if (!NIL_P(str)) {
@@ -414,8 +384,7 @@
 
 /* def getch */
 static VALUE
-curses_getch(obj)
-    VALUE obj;
+curses_getch(VALUE obj)
 {
     rb_read_check(stdin);
     curses_stdscr();
@@ -424,8 +393,7 @@
 
 /* def getstr */
 static VALUE
-curses_getstr(obj)
-    VALUE obj;
+curses_getstr(VALUE obj)
 {
     char rtn[1024]; /* This should be big enough.. I hope */
 
@@ -440,8 +408,7 @@
 
 /* def delch */
 static VALUE
-curses_delch(obj)
-    VALUE obj;
+curses_delch(VALUE obj)
 {
     delch();
     return Qnil;
@@ -449,8 +416,7 @@
 
 /* def delelteln */
 static VALUE
-curses_deleteln(obj)
-    VALUE obj;
+curses_deleteln(VALUE obj)
 {
 #if defined(HAVE_DELETELN) || defined(deleteln)
     deleteln();
@@ -460,8 +426,7 @@
 
 /* def insertln */
 static VALUE
-curses_insertln(obj)
-    VALUE obj;
+curses_insertln(VALUE obj)
 {
 #if defined(HAVE_INSERTLN) || defined(insertln)
     insertln();
@@ -471,9 +436,7 @@
 
 /* def keyname */
 static VALUE
-curses_keyname(obj, c)
-    VALUE obj;
-    VALUE c;
+curses_keyname(VALUE obj, VALUE c)
 {
 #ifdef HAVE_KEYNAME
   const char *name;
@@ -768,12 +731,7 @@
 
 /* def initialize(h, w, top, left) */
 static VALUE
-window_initialize(obj, h, w, top, left)
-    VALUE obj;
-    VALUE h;
-    VALUE w;
-    VALUE top;
-    VALUE left;
+window_initialize(VALUE obj, VALUE h, VALUE w, VALUE top, VALUE left)
 {
     struct windata *winp;
     WINDOW *window;
@@ -791,12 +749,7 @@
 
 /* def subwin(height, width, top, left) */
 static VALUE
-window_subwin(obj, height, width, top, left)
-    VALUE obj;
-    VALUE height;
-    VALUE width;
-    VALUE top;
-    VALUE left;
+window_subwin(VALUE obj, VALUE height, VALUE width, VALUE top, VALUE left)
 {
     struct windata *winp;
     WINDOW *window;
@@ -816,8 +769,7 @@
 
 /* def close */
 static VALUE
-window_close(obj)
-    VALUE obj;
+window_close(VALUE obj)
 {
     struct windata *winp;
     
@@ -830,8 +782,7 @@
 
 /* def clear */
 static VALUE
-window_clear(obj)
-    VALUE obj;
+window_clear(VALUE obj)
 {
     struct windata *winp;
     
@@ -843,8 +794,7 @@
 
 /* def clrtoeol */
 static VALUE
-window_clrtoeol(obj)
-    VALUE obj;
+window_clrtoeol(VALUE obj)
 {
     struct windata *winp;
     
@@ -856,8 +806,7 @@
 
 /* def refresh */
 static VALUE
-window_refresh(obj)
-    VALUE obj;
+window_refresh(VALUE obj)
 {
     struct windata *winp;
     
@@ -869,8 +818,7 @@
 
 /* def noutrefresh */
 static VALUE
-window_noutrefresh(obj)
-    VALUE obj;
+window_noutrefresh(VALUE obj)
 {
     struct windata *winp;
 
@@ -886,10 +834,7 @@
 
 /* def move(y, x) */
 static VALUE
-window_move(obj, y, x)
-    VALUE obj;
-    VALUE y;
-    VALUE x;
+window_move(VALUE obj, VALUE y, VALUE x)
 {
     struct windata *winp;
     
@@ -901,10 +846,7 @@
 
 /* def setpos(y, x) */
 static VALUE
-window_setpos(obj, y, x)
-    VALUE obj;
-    VALUE y;
-    VALUE x;
+window_setpos(VALUE obj, VALUE y, VALUE x)
 {
     struct windata *winp;
     
@@ -915,8 +857,7 @@
 
 /* def cury */
 static VALUE
-window_cury(obj)
-    VALUE obj;
+window_cury(VALUE obj)
 {
     struct windata *winp;
     int x, y;
@@ -928,8 +869,7 @@
 
 /* def curx */
 static VALUE
-window_curx(obj)
-    VALUE obj;
+window_curx(VALUE obj)
 {
     struct windata *winp;
     int x, y;
@@ -941,8 +881,7 @@
 
 /* def maxy */
 static VALUE
-window_maxy(obj)
-    VALUE obj;
+window_maxy(VALUE obj)
 {
     struct windata *winp;
 
@@ -962,8 +901,7 @@
 
 /* def maxx */
 static VALUE
-window_maxx(obj)
-    VALUE obj;
+window_maxx(VALUE obj)
 {
     struct windata *winp;
 
@@ -983,8 +921,7 @@
 
 /* def begy */
 static VALUE
-window_begy(obj)
-    VALUE obj;
+window_begy(VALUE obj)
 {
     struct windata *winp;
     int x, y;
@@ -1000,8 +937,7 @@
 
 /* def begx */
 static VALUE
-window_begx(obj)
-    VALUE obj;
+window_begx(VALUE obj)
 {
     struct windata *winp;
     int x, y;
@@ -1053,8 +989,7 @@
 
 /* def standout */
 static VALUE
-window_standout(obj)
-    VALUE obj;
+window_standout(VALUE obj)
 {
     struct windata *winp;
     
@@ -1065,8 +1000,7 @@
 
 /* def standend */
 static VALUE
-window_standend(obj)
-    VALUE obj;
+window_standend(VALUE obj)
 {
     struct windata *winp;
     
@@ -1077,8 +1011,7 @@
 
 /* def inch */
 static VALUE
-window_inch(obj)
-    VALUE obj;
+window_inch(VALUE obj)
 {
     struct windata *winp;
     
@@ -1088,9 +1021,7 @@
 
 /* def addch(ch) */
 static VALUE
-window_addch(obj, ch)
-    VALUE obj;
-    VALUE ch;
+window_addch(VALUE obj, VALUE ch)
 {
     struct windata *winp;
     
@@ -1102,9 +1033,7 @@
 
 /* def insch(ch) */
 static VALUE
-window_insch(obj, ch)
-    VALUE obj;
-    VALUE ch;
+window_insch(VALUE obj, VALUE ch)
 {
     struct windata *winp;
     
@@ -1116,9 +1045,7 @@
 
 /* def addstr(str) */
 static VALUE
-window_addstr(obj, str)
-    VALUE obj;
-    VALUE str;
+window_addstr(VALUE obj, VALUE str)
 {
     if (!NIL_P(str)) {
 	struct windata *winp;
@@ -1131,9 +1058,7 @@
 
 /* def <<(str) */
 static VALUE
-window_addstr2(obj, str)
-    VALUE obj;
-    VALUE str;
+window_addstr2(VALUE obj, VALUE str)
 {
     window_addstr(obj, str);
     return obj;
@@ -1141,8 +1066,7 @@
 
 /* def getch */
 static VALUE
-window_getch(obj)
-    VALUE obj;
+window_getch(VALUE obj)
 {
     struct windata *winp;
     
@@ -1153,8 +1077,7 @@
 
 /* def getstr */
 static VALUE
-window_getstr(obj)
-    VALUE obj;
+window_getstr(VALUE obj)
 {
     struct windata *winp;
     char rtn[1024]; /* This should be big enough.. I hope */
@@ -1171,8 +1094,7 @@
 
 /* def delch */
 static VALUE
-window_delch(obj)
-    VALUE obj;
+window_delch(VALUE obj)
 {
     struct windata *winp;
     
@@ -1183,8 +1105,7 @@
 
 /* def delelteln */
 static VALUE
-window_deleteln(obj)
-    VALUE obj;
+window_deleteln(VALUE obj)
 {
 #if defined(HAVE_WDELETELN) || defined(wdeleteln)
     struct windata *winp;
@@ -1197,8 +1118,7 @@
 
 /* def insertln */
 static VALUE
-window_insertln(obj)
-    VALUE obj;
+window_insertln(VALUE obj)
 {
 #if defined(HAVE_WINSERTLN) || defined(winsertln)
     struct windata *winp;
only in patch2:
unchanged:
--- ext/etc/etc.c	12 Dec 2005 00:35:07 -0000	1.20
+++ ext/etc/etc.c	28 Apr 2006 15:42:14 -0000
@@ -70,8 +70,7 @@
 
 #ifdef HAVE_GETPWENT
 static VALUE
-setup_passwd(pwd)
-    struct passwd *pwd;
+setup_passwd(struct passwd *pwd)
 {
     if (pwd == 0) rb_sys_fail("/etc/passwd");
     return rb_struct_new(sPasswd,
@@ -119,10 +118,7 @@
  * passwd="x", uid=0, gid=0, gecos="root",dir="/root", shell="/bin/bash">
  */
 static VALUE
-etc_getpwuid(argc, argv, obj)
-    int argc;
-    VALUE *argv;
-    VALUE obj;
+etc_getpwuid(int argc, VALUE *argv, VALUE obj)
 {
 #if defined(HAVE_GETPWENT)
     VALUE id;
@@ -153,8 +149,7 @@
  * passwd="x", uid=0, gid=0, gecos="root",dir="/root", shell="/bin/bash">
  */
 static VALUE
-etc_getpwnam(obj, nam)
-    VALUE obj, nam;
+etc_getpwnam(VALUE obj, VALUE nam)
 {
 #ifdef HAVE_GETPWENT
     struct passwd *pwd;
@@ -207,8 +202,7 @@
  *
  */
 static VALUE
-etc_passwd(obj)
-    VALUE obj;
+etc_passwd(VALUE obj)
 {
 #ifdef HAVE_GETPWENT
     struct passwd *pw;
@@ -232,8 +226,7 @@
  * to getpwent will return the first entry again.
  */
 static VALUE
-etc_setpwent(obj)
-    VALUE obj;
+etc_setpwent(VALUE obj)
 {
 #ifdef HAVE_GETPWENT
     setpwent();
@@ -245,8 +238,7 @@
  * getpwent, and closes the file.
  */
 static VALUE
-etc_endpwent(obj)
-    VALUE obj;
+etc_endpwent(VALUE obj)
 {
 #ifdef HAVE_GETPWENT
     endpwent();
@@ -281,8 +273,7 @@
  * - Passwd#shell contains the path to the login shell of the user as a String.
  */
 static VALUE
-etc_getpwent(obj)
-    VALUE obj;
+etc_getpwent(VALUE obj)
 {
 #ifdef HAVE_GETPWENT
     struct passwd *pw;
@@ -296,8 +287,7 @@
 
 #ifdef HAVE_GETGRENT
 static VALUE
-setup_group(grp)
-    struct group *grp;
+setup_group(struct group *grp)
 {
     VALUE mem;
     char **tbl;
@@ -329,8 +319,7 @@
  *
  */
 static VALUE
-etc_getgrgid(obj, id)
-    VALUE obj, id;
+etc_getgrgid(VALUE obj, VALUE id)
 {
 #ifdef HAVE_GETGRENT
     int gid;
@@ -357,8 +346,7 @@
  *
  */
 static VALUE
-etc_getgrnam(obj, nam)
-    VALUE obj, nam;
+etc_getgrnam(VALUE obj, VALUE nam)
 {
 #ifdef HAVE_GETGRENT
     struct group *grp;
@@ -412,8 +400,7 @@
  *
  */
 static VALUE
-etc_group(obj)
-    VALUE obj;
+etc_group(VALUE obj)
 {
 #ifdef HAVE_GETGRENT
     struct group *grp;
@@ -437,8 +424,7 @@
  * to getgrent will return the first entry again.
  */
 static VALUE
-etc_setgrent(obj)
-    VALUE obj;
+etc_setgrent(VALUE obj)
 {
 #ifdef HAVE_GETGRENT
     setgrent();
@@ -450,8 +436,7 @@
  * getgrent, and closes the file.
  */
 static VALUE
-etc_endgrent(obj)
-    VALUE obj;
+etc_endgrent(VALUE obj)
 {
 #ifdef HAVE_GETGRENT
     endgrent();
@@ -480,8 +465,7 @@
  *   members of the group.
  */
 static VALUE
-etc_getgrent(obj)
-    VALUE obj;
+etc_getgrent(VALUE obj)
 {
 #ifdef HAVE_GETGRENT
     struct group *gr;
only in patch2:
unchanged:
--- ext/io/wait/wait.c	18 Jul 2005 03:23:47 -0000	1.7
+++ ext/io/wait/wait.c	28 Apr 2006 15:42:15 -0000
@@ -75,8 +75,7 @@
 
 #ifdef HAVE_RB_FD_INIT
 static VALUE
-wait_readable(p)
-    VALUE p;
+wait_readable(VALUE p)
 {
     struct wait_readable_arg *arg = (struct wait_readable_arg *)p;
     rb_fdset_t *fds = &arg->fds;
only in patch2:
unchanged:
--- ext/nkf/nkf.c	27 Mar 2006 13:48:20 -0000	1.13
+++ ext/nkf/nkf.c	28 Apr 2006 15:42:15 -0000
@@ -56,8 +56,7 @@
 static VALUE result;
 
 static int
-rb_nkf_putchar(c)
-  unsigned int c;
+rb_nkf_putchar(unsigned int c)
 {
   if (output_ctr >= o_len) {
     o_len += incsize;
@@ -78,8 +77,7 @@
 #include "nkf-utf8/utf8tbl.c"
 #include "nkf-utf8/nkf.c"
 
-int nkf_split_options(arg)
-    const char* arg;
+int nkf_split_options(const char *arg)
 {
     int count = 0;
     char option[256];
@@ -142,8 +140,7 @@
  */
 
 static VALUE
-rb_nkf_kconv(obj, opt, src)
-  VALUE obj, opt, src;
+rb_nkf_kconv(VALUE obj, VALUE opt, VALUE src)
 {
   char *opt_ptr, *opt_end;
   volatile VALUE v;
@@ -205,8 +202,7 @@
  */
 
 static VALUE
-rb_nkf_guess1(obj, src)
-  VALUE obj, src;
+rb_nkf_guess1(VALUE obj, VALUE src)
 {
   unsigned char *p;
   unsigned char *pend;
@@ -319,8 +315,7 @@
  */
 
 static VALUE
-rb_nkf_guess2(obj, src)
-  VALUE obj, src;
+rb_nkf_guess2(VALUE obj, VALUE src)
 {
   int code = _BINARY;
 
only in patch2:
unchanged:
--- ext/nkf/nkf-utf8/nkf.c	29 Mar 2006 01:12:22 -0000	1.19
+++ ext/nkf/nkf-utf8/nkf.c	28 Apr 2006 15:42:16 -0000
@@ -1902,18 +1902,14 @@
     SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST, SCORE_ERROR,
 };
 
-void set_code_score(ptr, score)
-     struct input_code *ptr;
-     int score;
+void set_code_score(struct input_code *ptr, int score)
 {
     if (ptr){
         ptr->score |= score;
     }
 }
 
-void clr_code_score(ptr, score)
-     struct input_code *ptr;
-     int score;
+void clr_code_score(struct input_code *ptr, int score)
 {
     if (ptr){
         ptr->score &= ~score;
@@ -1944,8 +1940,7 @@
     }
 }
 
-void status_disable(ptr)
-struct input_code *ptr;
+void status_disable(struct input_code *ptr)
 {
     ptr->stat = -1;
     ptr->buf[0] = -1;
@@ -1953,46 +1948,37 @@
     if (iconv == ptr->iconv_func) set_iconv(FALSE, 0);
 }
 
-void status_push_ch(ptr, c)
-     struct input_code *ptr;
-     int c;
+void status_push_ch(struct input_code *ptr, int c)
 {
     ptr->buf[ptr->index++] = c;
 }
 
-void status_clear(ptr)
-     struct input_code *ptr;
+void status_clear(struct input_code *ptr)
 {
     ptr->stat = 0;
     ptr->index = 0;
 }
 
-void status_reset(ptr)
-     struct input_code *ptr;
+void status_reset(struct input_code *ptr)
 {
     status_clear(ptr);
     ptr->score = SCORE_INIT;
 }
 
-void status_reinit(ptr)
-     struct input_code *ptr;
+void status_reinit(struct input_code *ptr)
 {
     status_reset(ptr);
     ptr->_file_stat = 0;
 }
 
-void status_check(ptr, c)
-     struct input_code *ptr;
-     int c;
+void status_check(struct input_code *ptr, int c)
 {
     if (c <= DEL && estab_f){
         status_reset(ptr);
     }
 }
 
-void s_status(ptr, c)
-     struct input_code *ptr;
-     int c;
+void s_status(struct input_code *ptr, int c)
 {
     switch(ptr->stat){
       case -1:
@@ -3062,9 +3048,7 @@
 
 #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
 void
-w16w_conv(val, p2, p1, p0)
-     unsigned short val;
-     int *p2, *p1, *p0;
+w16w_conv(unsigned short val, int *p2, int *p1, int *p0)
 {
     if (val < 0x80){
         *p2 = val;
@@ -3771,9 +3755,7 @@
 }
 
 void
-j_oconv(c2, c1)
-    int    c2,
-                    c1;
+j_oconv(int c2, int c1)
 {
 #ifdef NUMCHAR_OPTION
     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
@@ -3858,9 +3840,7 @@
 }
 
 void
-base64_conv(c2, c1)
-    int    c2,
-                    c1;
+base64_conv(int c2, int c1)
 {
     mime_prechar(c2, c1);
     (*o_base64conv)(c2,c1);
@@ -3871,8 +3851,7 @@
 STATIC int broken_counter = 0;
 STATIC int broken_last = 0;
 int
-broken_getc(f)
-FILE *f;
+broken_getc(FILE *f)
 {
     int c,c1;
 
@@ -3911,9 +3890,7 @@
 }
 
 int
-broken_ungetc(c,f)
-int c;
-FILE *f;
+broken_ungetc(int c, FILE *f)
 {
     if (broken_counter<2)
 	broken_buf[broken_counter++]=c;
@@ -3923,8 +3900,7 @@
 STATIC int prev_cr = 0;
 
 void
-cr_conv(c2,c1) 
-int c2,c1;
+cr_conv(int c2, int c1)
 {
     if (prev_cr) {
 	prev_cr = 0;
@@ -3972,8 +3948,7 @@
 #define char_size(c2,c1) (c2?2:1)
 
 void
-fold_conv(c2,c1) 
-int c2,c1;
+fold_conv(int c2, int c1)
 { 
     int prev0;
     int fold_state=0;
@@ -4146,8 +4121,7 @@
 int z_prev2=0,z_prev1=0;
 
 void
-z_conv(c2,c1)
-int c2,c1;
+z_conv(int c2, int c1)
 {
 
     /* if (c2) c1 &= 0x7f; assertion */
@@ -4237,8 +4211,7 @@
 )
 
 void
-rot_conv(c2,c1)
-int c2,c1;
+rot_conv(int c2, int c1)
 {
     if (c2==0 || c2==X0201 || c2==ISO8859_1) {
 	c1 = rot13(c1);
@@ -4250,8 +4223,7 @@
 }
 
 void
-hira_conv(c2,c1)
-int c2,c1;
+hira_conv(int c2, int c1)
 {
     if ((hira_f & 1) && c2==0x25 && 0x20<c1 && c1<0x74) {
 	c2 = 0x24;
@@ -4263,8 +4235,7 @@
 
 
 void
-iso2022jp_check_conv(c2,c1)
-int    c2, c1;
+iso2022jp_check_conv(int c2, int c1)
 {
     STATIC const int range[RANGE_NUM_MAX][2] = {
         {0x222f, 0x2239,},
@@ -4386,8 +4357,7 @@
 }
 
 int
-mime_begin_strict(f)
-FILE *f;
+mime_begin_strict(FILE *f)
 {
     int c1 = 0;
     int i,j,k;
@@ -4437,8 +4407,7 @@
 }
 
 int
-mime_getc_buf(f) 
-FILE *f;
+mime_getc_buf(FILE *f)
 {
     /* we don't keep eof of Fifo, becase it contains ?= as
        a terminator. It was checked in mime_integrity. */
@@ -4447,9 +4416,7 @@
 }
 
 int
-mime_ungetc_buf(c,f) 
-FILE *f;
-int c;
+mime_ungetc_buf(int c, FILE *f) 
 {
     if (mimebuf_f)
 	(*i_mungetc_buf)(c,f);
@@ -4459,8 +4426,7 @@
 }
 
 int
-mime_begin(f)
-FILE *f;
+mime_begin(FILE *f)
 {
     int c1;
     int i,k;
@@ -4518,8 +4484,7 @@
 
 #ifdef CHECK_OPTION
 void
-no_putc(c)
-     int c;
+no_putc(int c)
 {
     ;
 }
@@ -4534,8 +4499,7 @@
 #endif
 
 void
-set_input_codename (codename)
-    char *codename;
+set_input_codename (char *codename)
 {
     if (guess_f && 
         is_inputcode_set &&
@@ -4550,8 +4514,7 @@
 
 #if !defined(PERL_XS) && !defined(WIN32DLL)
 void
-print_guessed_code (filename)
-    char *filename;
+print_guessed_code (char *filename)
 {
     char *codename = "BINARY";
     if (!is_inputcode_mixed) {
@@ -4599,31 +4562,25 @@
 }
 
 int
-cap_getc(f)
-     FILE *f;
+cap_getc(FILE *f)
 {
     return hex_getc(':', f, i_cgetc, i_cungetc);
 }
 
 int
-cap_ungetc(c, f)
-     int c;
-     FILE *f;
+cap_ungetc(int c, FILE *f)
 {
     return (*i_cungetc)(c, f);
 }
 
 int
-url_getc(f)
-     FILE *f;
+url_getc(FILE *f)
 {
     return hex_getc('%', f, i_ugetc, i_uungetc);
 }
 
 int
-url_ungetc(c, f)
-     int c;
-     FILE *f;
+url_ungetc(int c, FILE *f)
 {
     return (*i_uungetc)(c, f);
 }
@@ -4631,8 +4588,7 @@
 
 #ifdef NUMCHAR_OPTION
 int
-numchar_getc(f)
-     FILE *f;
+numchar_getc(FILE *f)
 {
     int (*g)() = i_ngetc;
     int (*u)() = i_nungetc;
@@ -4698,8 +4654,7 @@
 
 /* Normalization Form C */
 int
-nfc_getc(f)
-     FILE *f;
+nfc_getc(FILE *f)
 {
     int (*g)() = i_nfc_getc;
     int (*u)() = i_nfc_ungetc;
@@ -5185,8 +5140,7 @@
 }
 
 void
-mimeout_addchar(c)
-    int            c;
+mimeout_addchar(int c)
 {
     switch(mimeout_mode) {
     case 'Q':
only in patch2:
unchanged:
--- ext/readline/readline.c	24 Sep 2005 00:17:43 -0000	1.27
+++ ext/readline/readline.c	28 Apr 2006 15:42:16 -0000
@@ -50,10 +50,7 @@
 }
 
 static VALUE
-readline_readline(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+readline_readline(int argc, VALUE *argv, VALUE self)
 {
     VALUE tmp, add_hist, result;
     char *prompt = NULL;
@@ -95,8 +92,7 @@
 }
 
 static VALUE
-readline_s_set_input(self, input)
-    VALUE self, input;
+readline_s_set_input(VALUE self, VALUE input)
 {
     OpenFile *ifp;
 
@@ -108,8 +104,7 @@
 }
 
 static VALUE
-readline_s_set_output(self, output)
-    VALUE self, output;
+readline_s_set_output(VALUE self, VALUE output)
 {
     OpenFile *ofp;
 
@@ -121,9 +116,7 @@
 }
 
 static VALUE
-readline_s_set_completion_proc(self, proc)
-    VALUE self;
-    VALUE proc;
+readline_s_set_completion_proc(VALUE self, VALUE proc)
 {
     rb_secure(4);
     if (!rb_respond_to(proc, rb_intern("call")))
@@ -132,35 +125,28 @@
 }
 
 static VALUE
-readline_s_get_completion_proc(self)
-    VALUE self;
+readline_s_get_completion_proc(VALUE self)
 {
     rb_secure(4);
     return rb_attr_get(mReadline, completion_proc);
 }
 
 static VALUE
-readline_s_set_completion_case_fold(self, val)
-    VALUE self;
-    VALUE val;
+readline_s_set_completion_case_fold(VALUE self, VALUE val)
 {
     rb_secure(4);
     return rb_ivar_set(mReadline, completion_case_fold, val);
 }
 
 static VALUE
-readline_s_get_completion_case_fold(self)
-    VALUE self;
+readline_s_get_completion_case_fold(VALUE self)
 {
     rb_secure(4);
     return rb_attr_get(mReadline, completion_case_fold);
 }
 
 static char **
-readline_attempted_completion_function(text, start, end)
-    const char *text;
-    int start;
-    int end;
+readline_attempted_completion_function(const char *text, int start, int end)
 {
     VALUE proc, ary, temp;
     char **result;
@@ -224,8 +210,7 @@
 }
 
 static VALUE
-readline_s_vi_editing_mode(self)
-    VALUE self;
+readline_s_vi_editing_mode(VALUE self)
 {
 #ifdef HAVE_RL_VI_EDITING_MODE
     rb_secure(4);
@@ -238,8 +223,7 @@
 }
 
 static VALUE
-readline_s_emacs_editing_mode(self)
-    VALUE self;
+readline_s_emacs_editing_mode(VALUE self)
 {
 #ifdef HAVE_RL_EMACS_EDITING_MODE
     rb_secure(4);
@@ -252,8 +236,7 @@
 }
 
 static VALUE
-readline_s_set_completion_append_character(self, str)
-    VALUE self, str;
+readline_s_set_completion_append_character(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
     rb_secure(4);
@@ -276,8 +259,7 @@
 }
 
 static VALUE
-readline_s_get_completion_append_character(self)
-    VALUE self;
+readline_s_get_completion_append_character(VALUE self)
 {
 #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
     VALUE str;
@@ -296,8 +278,7 @@
 }
 
 static VALUE
-readline_s_set_basic_word_break_characters(self, str)
-    VALUE self, str;
+readline_s_set_basic_word_break_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_BASIC_WORD_BREAK_CHARACTERS
     static char *basic_word_break_characters = NULL;
@@ -323,8 +304,7 @@
 }
 
 static VALUE
-readline_s_get_basic_word_break_characters(self, str)
-    VALUE self, str;
+readline_s_get_basic_word_break_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_BASIC_WORD_BREAK_CHARACTERS
     rb_secure(4);
@@ -338,8 +318,7 @@
 }
 
 static VALUE
-readline_s_set_completer_word_break_characters(self, str)
-    VALUE self, str;
+readline_s_set_completer_word_break_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS
     static char *completer_word_break_characters = NULL;
@@ -365,8 +344,7 @@
 }
 
 static VALUE
-readline_s_get_completer_word_break_characters(self, str)
-    VALUE self, str;
+readline_s_get_completer_word_break_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS
     rb_secure(4);
@@ -380,8 +358,7 @@
 }
 
 static VALUE
-readline_s_set_basic_quote_characters(self, str)
-    VALUE self, str;
+readline_s_set_basic_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_BASIC_QUOTE_CHARACTERS
     static char *basic_quote_characters = NULL;
@@ -408,8 +385,7 @@
 }
 
 static VALUE
-readline_s_get_basic_quote_characters(self, str)
-    VALUE self, str;
+readline_s_get_basic_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_BASIC_QUOTE_CHARACTERS
     rb_secure(4);
@@ -423,8 +399,7 @@
 }
 
 static VALUE
-readline_s_set_completer_quote_characters(self, str)
-    VALUE self, str;
+readline_s_set_completer_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_COMPLETER_QUOTE_CHARACTERS
     static char *completer_quote_characters = NULL;
@@ -451,8 +426,7 @@
 }
 
 static VALUE
-readline_s_get_completer_quote_characters(self, str)
-    VALUE self, str;
+readline_s_get_completer_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_COMPLETER_QUOTE_CHARACTERS
     rb_secure(4);
@@ -466,8 +440,7 @@
 }
 
 static VALUE
-readline_s_set_filename_quote_characters(self, str)
-    VALUE self, str;
+readline_s_set_filename_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_FILENAME_QUOTE_CHARACTERS
     static char *filename_quote_characters = NULL;
@@ -494,8 +467,7 @@
 }
 
 static VALUE
-readline_s_get_filename_quote_characters(self, str)
-    VALUE self, str;
+readline_s_get_filename_quote_characters(VALUE self, VALUE str)
 {
 #ifdef HAVE_RL_FILENAME_QUOTE_CHARACTERS
     rb_secure(4);
@@ -509,16 +481,13 @@
 }
 
 static VALUE
-hist_to_s(self)
-    VALUE self;
+hist_to_s(VALUE self)
 {
     return rb_str_new2("HISTORY");
 }
 
 static VALUE
-hist_get(self, index)
-    VALUE self;
-    VALUE index;
+hist_get(VALUE self, VALUE index)
 {
     HIST_ENTRY *entry;
     int i;
@@ -536,10 +505,7 @@
 }
 
 static VALUE
-hist_set(self, index, str)
-    VALUE self;
-    VALUE index;
-    VALUE str;
+hist_set(VALUE self, VALUE index, VALUE str)
 {
 #ifdef HAVE_REPLACE_HISTORY_ENTRY
     HIST_ENTRY *entry;
@@ -563,9 +529,7 @@
 }
 
 static VALUE
-hist_push(self, str)
-    VALUE self;
-    VALUE str;
+hist_push(VALUE self, VALUE str)
 {
     rb_secure(4);
     SafeStringValue(str);
@@ -574,10 +538,7 @@
 }
 
 static VALUE
-hist_push_method(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+hist_push_method(int argc, VALUE *argv, VALUE self)
 {
     VALUE str;
     
@@ -591,8 +552,7 @@
 }
 
 static VALUE
-rb_remove_history(index)
-    int index;
+rb_remove_history(int index)
 {
 #ifdef HAVE_REMOVE_HISTORY
     HIST_ENTRY *entry;
@@ -614,8 +574,7 @@
 }
 
 static VALUE
-hist_pop(self)
-    VALUE self;
+hist_pop(VALUE self)
 {
     rb_secure(4);
     if (history_length > 0) {
@@ -626,8 +585,7 @@
 }
 
 static VALUE
-hist_shift(self)
-    VALUE self;
+hist_shift(VALUE self)
 {
     rb_secure(4);
     if (history_length > 0) {
@@ -638,8 +596,7 @@
 }
 
 static VALUE
-hist_each(self)
-    VALUE self;
+hist_each(VALUE self)
 {
     HIST_ENTRY *entry;
     int i;
@@ -655,25 +612,21 @@
 }
 
 static VALUE
-hist_length(self)
-    VALUE self;
+hist_length(VALUE self)
 {
     rb_secure(4);
     return INT2NUM(history_length);
 }
 
 static VALUE
-hist_empty_p(self)
-    VALUE self;
+hist_empty_p(VALUE self)
 {
     rb_secure(4);
     return history_length == 0 ? Qtrue : Qfalse;
 }
 
 static VALUE
-hist_delete_at(self, index)
-    VALUE self;
-    VALUE index;
+hist_delete_at(VALUE self, VALUE index)
 {
     int i;
 
@@ -688,9 +641,7 @@
 }
 
 static VALUE
-filename_completion_proc_call(self, str)
-    VALUE self;
-    VALUE str;
+filename_completion_proc_call(VALUE self, VALUE str)
 {
     VALUE result;
     char **matches;
@@ -715,9 +666,7 @@
 }
 
 static VALUE
-username_completion_proc_call(self, str)
-    VALUE self;
-    VALUE str;
+username_completion_proc_call(VALUE self, VALUE str)
 {
     VALUE result;
     char **matches;
only in patch2:
unchanged:
--- ext/ripper/eventids2.c	23 Sep 2005 21:37:37 -0000	1.7
+++ ext/ripper/eventids2.c	28 Apr 2006 15:42:16 -0000
@@ -265,8 +265,7 @@
 };
 
 static ID
-ripper_token2eventid(tok)
-    int tok;
+ripper_token2eventid(int tok)
 {
     struct token_assoc *a;
 
only in patch2:
unchanged:
--- ext/stringio/stringio.c	13 Aug 2005 09:35:56 -0000	1.44
+++ ext/stringio/stringio.c	28 Apr 2006 15:42:17 -0000
@@ -489,8 +489,7 @@
 
 /* :nodoc: */
 static VALUE
-strio_copy(copy, orig)
-    VALUE copy, orig;
+strio_copy(VALUE copy, VALUE orig)
 {
     struct StringIO *ptr;
 
@@ -559,10 +558,7 @@
  * and _mode_ (see StringIO#new).
  */
 static VALUE
-strio_reopen(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_reopen(int argc, VALUE *argv, VALUE self)
 {
     if (!OBJ_TAINTED(self)) rb_secure(4);
     if (argc == 1 && TYPE(*argv) != T_STRING) {
@@ -717,9 +713,7 @@
 }
 
 static void
-strio_extend(ptr, pos, len)
-    struct StringIO *ptr;
-    long pos, len;
+strio_extend(struct StringIO *ptr, long pos, long len)
 {
     long olen;
 
@@ -1149,10 +1143,7 @@
  * returning +nil+, as well as IO#sysread does.
  */
 static VALUE
-strio_sysread(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_sysread(int argc, VALUE *argv, VALUE self)
 {
     VALUE val = strio_read(argc, argv, self);
     if (NIL_P(val) || RSTRING(val)->len == 0) {
only in patch2:
unchanged:
--- ext/strscan/strscan.c	6 Oct 2005 11:11:23 -0000	1.22
+++ ext/strscan/strscan.c	28 Apr 2006 15:42:17 -0000
@@ -263,8 +263,7 @@
  * Reset the scan pointer (index 0) and clear matching data.
  */
 static VALUE
-strscan_reset(self)
-    VALUE self;
+strscan_reset(VALUE self)
 {
     struct strscanner *p;
 
@@ -600,8 +599,7 @@
  *   s.exist? /e/            # -> nil
  */
 static VALUE
-strscan_exist_p(self, re)
-    VALUE self, re;
+strscan_exist_p(VALUE self, VALUE re)
 {
     return strscan_do_scan(self, re, 0, 0, 0);
 }
@@ -962,8 +960,7 @@
  * This method is obsolete; use #matched_size instead.
  */
 static VALUE
-strscan_matchedsize(self)
-    VALUE self;
+strscan_matchedsize(VALUE self)
 {
     rb_warning("StringScanner#matchedsize is obsolete; use #matched_size instead");
     return strscan_matched_size(self);
@@ -1084,8 +1081,7 @@
  * This method is obsolete; use #rest_size instead.
  */
 static VALUE
-strscan_restsize(self)
-    VALUE self;
+strscan_restsize(VALUE self)
 {
     rb_warning("StringScanner#restsize is obsolete; use #rest_size instead");
     return strscan_rest_size(self);
only in patch2:
unchanged:
--- missing/vsnprintf.c	23 Nov 2005 05:11:17 -0000	1.16
+++ missing/vsnprintf.c	28 Apr 2006 15:42:19 -0000
@@ -314,9 +314,7 @@
  * then reset it so that it can be reused.
  */
 static int
-BSD__sprint(fp, uio)
-	FILE *fp;
-	register struct __suio *uio;
+BSD__sprint(FILE *fp, register struct __suio *uio)
 {
 	register int err;
 
@@ -337,10 +335,7 @@
  * worries about ungetc buffers and so forth.
  */
 static int
-BSD__sbprintf(fp, fmt, ap)
-	register FILE *fp;
-	const char *fmt;
-	va_list ap;
+BSD__sbprintf(register FILE *fp, const char *fmt, va_list ap)
 {
 /* We don't support files. */
 	return 0;
@@ -361,11 +356,7 @@
  * use the given digits.
  */
 static char *
-BSD__ultoa(val, endp, base, octzero, xdigs)
-	register u_long val;
-	char *endp;
-	int base, octzero;
-	char *xdigs;
+BSD__ultoa(register u_long val, char *endp, int base, int octzero, char *xdigs)
 {
 	register char *cp = endp;
 	register long sval;
@@ -464,10 +455,7 @@
 #define	ZEROPAD		0x080		/* zero (as opposed to blank) pad */
 #define FPT		0x100		/* Floating point number */
 static int
-BSD_vfprintf(fp, fmt0, ap)
-	FILE *fp;
-	const char *fmt0;
-	va_list ap;
+BSD_vfprintf(FILE *fp, const char *fmt0, va_list ap)
 {
 	register char *fmt;	/* format string */
 	register int ch;	/* character from fmt */



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic