--5QAgd0e35j3NYeGe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

attached is another cleanup patch. This one replaces most of the
K&R-style function declarations by ansi c. Additionally some const is
added to char*.

Please consider applying.

Regards,
Stefan


--5QAgd0e35j3NYeGe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ruby_cleanup3.diff"

Index: eval.c
RCS file: /src/ruby/eval.c,v
retrieving revision 1.900
diff -u -r1.900 eval.c
--- eval.c	20 Jun 2006 06:09:03 -0000	1.900
+++ eval.c	20 Jun 2006 15:25:07 -0000
@@ -1207,7 +1207,7 @@
 {
     VALUE errat  nil;		/* OK */
     volatile VALUE eclass, e;
-    char *einfo;
+    const char *einfo;
     long elen;
 
     if (NIL_P(ruby_errinfo)) return;
@@ -2519,7 +2519,7 @@
     return trace;
 }
 
-static char *
+static const char *
 get_event_name(rb_event_t event)
 {
     switch (event) {
@@ -2551,7 +2551,7 @@
     struct FRAME *prev;
     NODE *node_save;
     VALUE srcfile;
-    char *event_name;
+    const char *event_name;
 
     if (!trace_func) return;
     if (tracing) return;
@@ -4575,7 +4575,7 @@
 proc_jump_error(int state, VALUE result)
 {
     char mesg[32];
-    char *statement;
+    const char *statement;
 
     switch (state) {
       case TAG_BREAK:
@@ -5378,7 +5378,7 @@
 {
     ID id;
     VALUE exc  b_eNoMethodError;
-    char *format  ;
+    const char *format  ;
     NODE *cnode  uby_current_node;
 
     if (argc 0 || !SYMBOL_P(argv[0])) {
@@ -9752,8 +9752,7 @@
 
 #if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
 void
-rb_fd_init(fds)
-    volatile rb_fdset_t *fds;
+rb_fd_init(volatile rb_fdset_t *fds)
 {
     fds->maxfd  ;
     fds->fdset  LLOC(fd_set);
@@ -9761,8 +9760,7 @@
 }
 
 void
-rb_fd_term(fds)
-    rb_fdset_t *fds;
+rb_fd_term(rb_fdset_t *fds)
 {
     if (fds->fdset) free(fds->fdset);
     fds->maxfd  ;
@@ -9770,8 +9768,7 @@
 }
 
 void
-rb_fd_zero(fds)
-    rb_fdset_t *fds;
+rb_fd_zero(rb_fdset_t *fds)
 {
     if (fds->fdset) {
 	MEMZERO(fds->fdset, fd_mask, howmany(fds->maxfd, NFDBITS));
@@ -9780,9 +9777,7 @@
 }
 
 static void
-rb_fd_resize(n, fds)
-    int n;
-    rb_fdset_t *fds;
+rb_fd_resize(int n, rb_fdset_t *fds)
 {
     int m  owmany(n + 1, NFDBITS) * sizeof(fd_mask);
     int o  owmany(fds->maxfd, NFDBITS) * sizeof(fd_mask);
@@ -9798,37 +9793,28 @@
 }
 
 void
-rb_fd_set(n, fds)
-    int n;
-    rb_fdset_t *fds;
+rb_fd_set(int n, rb_fdset_t *fds)
 {
     rb_fd_resize(n, fds);
     FD_SET(n, fds->fdset);
 }
 
 void
-rb_fd_clr(n, fds)
-    int n;
-    rb_fdset_t *fds;
+rb_fd_clr(int n, rb_fdset_t *fds)
 {
     if (n > ds->maxfd) return;
     FD_CLR(n, fds->fdset);
 }
 
 int
-rb_fd_isset(n, fds)
-    int n;
-    const rb_fdset_t *fds;
+rb_fd_isset(int n, const rb_fdset_t *fds)
 {
     if (n > ds->maxfd) return 0;
     return FD_ISSET(n, fds->fdset) ! ; /* "! " avoids FreeBSD PR 91421 */
 }
 
 void
-rb_fd_copy(dst, src, max)
-    rb_fdset_t *dst;
-    const fd_set *src;
-    int max;
+rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max)
 {
     int size  owmany(max, NFDBITS) * sizeof(fd_mask);
 
@@ -9839,10 +9825,7 @@
 }
 
 int
-rb_fd_select(n, readfds, writefds, exceptfds, timeout)
-    int n;
-    rb_fdset_t *readfds, *writefds, *exceptfds;
-    struct timeval *timeout;
+rb_fd_select(int n, rb_fdset_t *readfds, rb_fdset_t *writefds, rb_fdset_t *exceptfds, struct timeval *timeout)
 {
     rb_fd_resize(n - 1, readfds);
     rb_fd_resize(n - 1, writefds);
@@ -11788,8 +11771,7 @@
 }
 #elif defined(HAVE_SETITIMER)
 static void
-catch_timer(sig)
-    int sig;
+catch_timer(int sig)
 {
 #if !defined(POSIX_SIGNAL) && !defined(BSD_SIGNAL)
     signal(sig, catch_timer);
Index: file.c
RCS file: /src/ruby/file.c,v
retrieving revision 1.239
diff -u -r1.239 file.c
--- file.c	17 Jun 2006 14:50:03 -0000	1.239
+++ file.c	20 Jun 2006 15:25:07 -0000
@@ -1480,7 +1480,7 @@
 static VALUE
 rb_file_ftype(const struct stat *st)
 {
-    char *t;
+    const char *t;
 
     if (S_ISREG(st->st_mode)) {
 	t  file";
Index: io.c
RCS file: /src/ruby/io.c,v
retrieving revision 1.407
diff -u -r1.407 io.c
--- io.c	13 Jun 2006 11:31:27 -0000	1.407
+++ io.c	20 Jun 2006 15:25:08 -0000
@@ -1643,7 +1643,7 @@
 }
 
 static int
-rscheck(char *rsptr, long rslen, VALUE rs)
+rscheck(const char *rsptr, long rslen, VALUE rs)
 {
     if (RSTRING(rs)->ptr ! sptr && RSTRING(rs)->len ! slen)
 	rb_raise(rb_eRuntimeError, "rs modified");
@@ -1667,7 +1667,7 @@
     }
     else {
 	int c, newline;
-	char *rsptr;
+	const char *rsptr;
 	long rslen;
 	int rspara  ;
 
@@ -2527,7 +2527,7 @@
     return io;
 }
 
-static char*
+static const char*
 rb_io_flags_mode(int flags)
 {
 #ifdef O_BINARY
@@ -2666,7 +2666,7 @@
 
 #define MODENUM_MAX 4
 
-static char*
+static const char*
 rb_io_modenum_mode(int flags)
 {
 #ifdef O_BINARY
@@ -3154,7 +3154,7 @@
 static VALUE
 rb_io_s_popen(int argc, VALUE *argv, VALUE klass)
 {
-    char *mode;
+    const char *mode;
     VALUE pname, pmode, port, tmp;
 
     if (rb_scan_args(argc, argv, "11", &pname, &pmode) 1) {
@@ -3199,7 +3199,7 @@
 rb_open_file(int argc, VALUE *argv, VALUE io)
 {
     VALUE fname, vmode, perm;
-    char *mode;
+    const char *mode;
     int flags, fmode;
 
     rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
@@ -3514,7 +3514,7 @@
 rb_io_reopen(int argc, VALUE *argv, VALUE file)
 {
     VALUE fname, nmode;
-    char *mode;
+    const char *mode;
     OpenFile *fptr;
 
     rb_secure(4);
Index: re.c
RCS file: /src/ruby/re.c,v
retrieving revision 1.151
diff -u -r1.151 re.c
--- re.c	9 Jun 2006 21:20:10 -0000	1.151
+++ re.c	20 Jun 2006 15:25:08 -0000
@@ -660,7 +660,7 @@
 static VALUE
 rb_reg_kcode_m(VALUE re)
 {
-    char *kcode;
+    const char *kcode;
 
     if (FL_TEST(re, KCODE_FIXED)) {
 	switch (RBASIC(re)->flags & KCODE_MASK) {
Index: ruby.c
RCS file: /src/ruby/ruby.c,v
retrieving revision 1.114
diff -u -r1.114 ruby.c
--- ruby.c	9 Jun 2006 21:20:10 -0000	1.114
+++ ruby.c	20 Jun 2006 15:25:08 -0000
@@ -62,7 +62,7 @@
 static VALUE do_check  false, do_line  false;
 static VALUE do_split  false;
 
-static char *script;
+static const char *script;
 
 static int origargc;
 static char **origargv;
Index: sprintf.c
RCS file: /src/ruby/sprintf.c,v
retrieving revision 1.63
diff -u -r1.63 sprintf.c
--- sprintf.c	13 Jun 2006 11:31:27 -0000	1.63
+++ sprintf.c	20 Jun 2006 15:25:08 -0000
@@ -464,7 +464,7 @@
 	    {
 		volatile VALUE val  ETARG();
 		char fbuf[32], nbuf[64], *s, *t;
-		char *prefix  ;
+		const char *prefix  ;
 		int sign  ;
 		char sc  ;
 		long v  ;
@@ -716,7 +716,7 @@
 
 		fval  FLOAT(rb_Float(val))->value;
 		if (isnan(fval) || isinf(fval)) {
-		    char *expr;
+		    const char *expr;
 
 		    if  (isnan(fval)) {
 			expr  NaN";
Index: string.c
RCS file: /src/ruby/string.c,v
retrieving revision 1.247
diff -u -r1.247 string.c
--- string.c	10 Jun 2006 16:09:09 -0000	1.247
+++ string.c	20 Jun 2006 15:25:08 -0000
@@ -3988,7 +3988,7 @@
 {
     extern char *crypt(const char *, const char *);
     VALUE result;
-    char *s;
+    const char *s;
 
     StringValue(salt);
     if (RSTRING(salt)->len < 2)
Index: ext/bigdecimal/bigdecimal.c
RCS file: /src/ruby/ext/bigdecimal/bigdecimal.c,v
retrieving revision 1.46
diff -u -r1.46 bigdecimal.c
--- ext/bigdecimal/bigdecimal.c	9 Jun 2006 21:20:09 -0000	1.46
+++ ext/bigdecimal/bigdecimal.c	20 Jun 2006 15:25:08 -0000
@@ -1823,7 +1823,7 @@
 }
 
 VP_EXPORT Real *
-VpOne()
+VpOne(void)
 {
     return VpConstOne;
 }
Index: ext/bigdecimal/bigdecimal.h
RCS file: /src/ruby/ext/bigdecimal/bigdecimal.h,v
retrieving revision 1.15
diff -u -r1.15 bigdecimal.h
--- ext/bigdecimal/bigdecimal.h	9 Jun 2006 21:20:09 -0000	1.15
+++ ext/bigdecimal/bigdecimal.h	20 Jun 2006 15:25:08 -0000
@@ -155,7 +155,7 @@
 VP_EXPORT int VpPower(Real *y,Real *x,S_INT n);
 
 /* VP constants */
-VP_EXPORT Real *VpOne();
+VP_EXPORT Real *VpOne(void);
 
 /*  
  *  ------------------
Index: ext/etc/etc.c
RCS file: /src/ruby/ext/etc/etc.c,v
retrieving revision 1.21
diff -u -r1.21 etc.c
--- ext/etc/etc.c	9 Jun 2006 21:20:08 -0000	1.21
+++ ext/etc/etc.c	20 Jun 2006 15:25:08 -0000
@@ -40,8 +40,7 @@
  *   Etc.getlogin -> 'guest'
  */
 static VALUE
-etc_getlogin(obj)
-    VALUE obj;
+etc_getlogin(VALUE obj)
 {
     char *login;
 
@@ -60,8 +59,7 @@
 
 #if defined(HAVE_GETPWENT) || defined(HAVE_GETGRENT)
 static VALUE
-safe_setup_str(str)
-    const char *str;
+safe_setup_str(const char *str)
 {
     if (str 0) str  ";
     return rb_tainted_str_new2(str);
Index: ext/io/wait/wait.c
RCS file: /src/ruby/ext/io/wait/wait.c,v
retrieving revision 1.8
diff -u -r1.8 wait.c
--- ext/io/wait/wait.c	9 Jun 2006 21:20:07 -0000	1.8
+++ ext/io/wait/wait.c	20 Jun 2006 15:25:08 -0000
@@ -92,10 +92,7 @@
 ίΕ
 */
 static VALUE
-io_wait(argc, argv, io)
-    int argc;
-    VALUE *argv;
-    VALUE io;
+io_wait(int argc, VALUE *argv, VALUE io)
 {
     OpenFile *fptr;
     struct wait_readable_arg arg;
Index: ext/pty/pty.c
RCS file: /src/ruby/ext/pty/pty.c,v
retrieving revision 1.25
diff -u -r1.25 pty.c
--- ext/pty/pty.c	9 Jun 2006 21:20:05 -0000	1.25
+++ ext/pty/pty.c	20 Jun 2006 15:25:08 -0000
@@ -196,7 +196,7 @@
     int			status;
 
     if (argc 0) {
-	char *shellname;
+	const char *shellname;
 
 	if ((p  etenv("SHELL")) ! ULL) {
 	    shellname  ;
Index: ext/racc/cparse/cparse.c
RCS file: /src/ruby/ext/racc/cparse/cparse.c,v
retrieving revision 1.10
diff -u -r1.10 cparse.c
--- ext/racc/cparse/cparse.c	29 Mar 2004 07:54:21 -0000	1.10
+++ ext/racc/cparse/cparse.c	20 Jun 2006 15:25:08 -0000
@@ -67,8 +67,7 @@
 #endif
 
 static ID
-value_to_id(v)
-    VALUE v;
+value_to_id(VALUE v)
 {
 #ifndef SYMBOL_P
 #  define SYMBOL_P(v) FIXNUM_P(v)
@@ -88,8 +87,7 @@
 #endif
 
 static inline long
-num_to_long(n)
-    VALUE n;
+num_to_long(VALUE n)
 {
     return NUM2LONG(n);
 }
@@ -106,9 +104,7 @@
 static void cut_stack_tail _((VALUE stack, long len));
 
 static VALUE
-get_stack_tail(stack, len)
-    VALUE stack;
-    long len;
+get_stack_tail(VALUE stack, long len)
 {
     if (len < 0) return Qnil;  /* system error */
     if (len > RARRAY(stack)->len) len  ARRAY(stack)->len;
@@ -116,9 +112,7 @@
 }
 
 static void
-cut_stack_tail(stack, len)
-    VALUE stack;
-    long len;
+cut_stack_tail(VALUE stack, long len)
 {
     while (len > 0) {
         rb_ary_pop(stack);
@@ -231,8 +225,7 @@
 #endif
 
 static VALUE
-racc_cparse(parser, arg, sysdebug)
-    VALUE parser, arg, sysdebug;
+racc_cparse(VALUE parser, VALUE arg, VALUE sysdebug)
 {
     struct cparse_params params;
     struct cparse_params *v  params;
@@ -247,8 +240,7 @@
 }
 
 static VALUE
-racc_yyparse(parser, lexer, lexmid, arg, sysdebug)
-    VALUE parser, lexer, lexmid, arg, sysdebug;
+racc_yyparse(VALUE parser, VALUE lexer, VALUE lexmid, VALUE arg, VALUE sysdebug)
 {
     struct cparse_params params;
     struct cparse_params *v  params;
@@ -269,15 +261,13 @@
 }
 
 static void
-call_lexer(v)
-    struct cparse_params *v;
+call_lexer(struct cparse_params *v)
 {
     rb_iterate(lexer_iter, v->value_v, lexer_i, v->value_v);
 }
 
 static VALUE
-lexer_iter(data)
-    VALUE data;
+lexer_iter(VALUE data)
 {
     struct cparse_params *v;
 
@@ -287,8 +277,7 @@
 }
 
 static VALUE
-lexer_i(block_args, data, self)
-    VALUE block_args, data, self;
+lexer_i(VALUE block_args, VALUE data, VALUE self)
 {
     struct cparse_params *v;
     VALUE tok, val;
@@ -304,32 +293,27 @@
 }
 
 static VALUE
-assert_array(a)
-    VALUE a;
+assert_array(VALUE a)
 {
     Check_Type(a, T_ARRAY);
     return a;
 }
 
 static VALUE
-assert_hash(h)
-    VALUE h;
+assert_hash(VALUE h)
 {
     Check_Type(h, T_HASH);
     return h;
 }
 
 static long
-assert_integer(n)
-    VALUE n;
+assert_integer(VALUE n)
 {
     return NUM2LONG(n);
 }
 
 static void
-initialize_params(v, parser, arg, lexer, lexmid)
-    struct cparse_params *v;
-    VALUE parser, arg, lexer, lexmid;
+initialize_params(struct cparse_params *v, VALUE parser, VALUE arg, VALUE lexer, VALUE lexmid)
 {
     v->value_v  ata_Wrap_Struct(CparseParams, 0, 0, v);
 
@@ -380,10 +364,7 @@
 }
 
 static void
-extract_user_token(v, block_args, tok, val)
-    struct cparse_params *v;
-    VALUE block_args;
-    VALUE *tok, *val;
+extract_user_token(struct cparse_params *v, VALUE block_args, VALUE *tok, VALUE *val)
 {
     if (NIL_P(block_args)) {
         /* EOF */
@@ -426,10 +407,7 @@
 } while (0)
 
 static void
-parse_main(v, tok, val, resume)
-    struct cparse_params *v;
-    VALUE tok, val;
-    int resume;
+parse_main(struct cparse_params *v, VALUE tok, VALUE val, int resume)
 {
     long i;              /* table index */
     long act;            /* action type */
@@ -636,10 +614,7 @@
 }
 
 static void
-shift(v, act, tok, val)
-    struct cparse_params *v;
-    long act;
-    VALUE tok, val;
+shift(struct cparse_params *v, long act, VALUE tok, VALUE val)
 {
     PUSH(v->vstack, val);
     if (v->debug) {
@@ -652,9 +627,7 @@
 }
 
 static int
-reduce(v, act)
-    struct cparse_params *v;
-    long act;
+reduce(struct cparse_params *v, long act)
 {
     VALUE code;
     v->ruleno  act * 3;
@@ -664,15 +637,13 @@
 }
 
 static VALUE
-catch_iter(dummy)
-    VALUE dummy;
+catch_iter(VALUE dummy)
 {
     return rb_funcall(rb_mKernel, id_catch, 1, sym_raccjump);
 }
 
 static VALUE
-reduce0(val, data, self)
-    VALUE val, data, self;
+reduce0(VALUE val, VALUE data, VALUE self)
 {
     struct cparse_params *v;
     VALUE reduce_to, reduce_len, method_id;
Index: ext/socket/getaddrinfo.c
RCS file: /src/ruby/ext/socket/getaddrinfo.c,v
retrieving revision 1.19
diff -u -r1.19 getaddrinfo.c
--- ext/socket/getaddrinfo.c	21 Oct 2005 06:46:41 -0000	1.19
+++ ext/socket/getaddrinfo.c	20 Jun 2006 15:25:08 -0000
@@ -198,8 +198,7 @@
 const
 #endif
 char *
-gai_strerror(ecode)
-	int ecode;
+gai_strerror(int ecode)
 {
 	if (ecode < 0 || ecode > EAI_MAX)
 		ecode  AI_MAX;
@@ -207,7 +206,7 @@
 }
 
 void
-freeaddrinfo(ai)
+freeaddrinfo(struct addrinfo *ai)
 	struct addrinfo *ai;
 {
 	struct addrinfo *next;
@@ -222,8 +221,7 @@
 }
 
 static int
-str_isnumber(p)
-	const char *p;
+str_isnumber(const char *p)
 {
 	char *q  char *)p;
 	while (*q) {
@@ -237,10 +235,7 @@
 #ifndef HAVE_INET_PTON
 
 static int
-inet_pton(af, hostname, pton)
-	int af;
-	const char *hostname;
-	void *pton;
+inet_pton(int af, const char *hostname, void *pton)
 {
 	struct in_addr in;
 
@@ -268,10 +263,7 @@
 #endif
 
 int
-getaddrinfo(hostname, servname, hints, res)
-	const char *hostname, *servname;
-	const struct addrinfo *hints;
-	struct addrinfo **res;
+getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
 {
 	struct addrinfo sentinel;
 	struct addrinfo *top  ULL;
@@ -538,13 +530,7 @@
 }
 
 static int
-get_name(addr, afd, res, numaddr, pai, port0)
-	const char *addr;
-	const struct afd *afd;
-	struct addrinfo **res;
-	char *numaddr;
-	struct addrinfo *pai;
-	int port0;
+get_name(const char *addr, const struct aft *afd, struct addrinfo **res, char *numaddr, struct addrinfo *pai, int port0)
 {
 	u_short port  ort0 & 0xffff;
 	struct hostent *hp;
@@ -584,12 +570,7 @@
 }
 
 static int
-get_addr(hostname, af, res, pai, port0)
-	const char *hostname;
-	int af;
-	struct addrinfo **res;
-	struct addrinfo *pai;
-	int port0;
+get_addr(const char *hostname, int af, struct addrinfo **res, struct addrinfo *pai, int port0)
 {
 	u_short port  ort0 & 0xffff;
 	struct addrinfo sentinel;
Index: ext/socket/getnameinfo.c
RCS file: /src/ruby/ext/socket/getnameinfo.c,v
retrieving revision 1.11
diff -u -r1.11 getnameinfo.c
--- ext/socket/getnameinfo.c	20 May 2004 04:34:10 -0000	1.11
+++ ext/socket/getnameinfo.c	20 Jun 2006 15:25:08 -0000
@@ -115,11 +115,7 @@
 
 #ifndef HAVE_INET_NTOP
 static const char *
-inet_ntop(af, addr, numaddr, numaddr_len)
-	int af;
-	const void *addr;
-	char *numaddr;
-	size_t numaddr_len;
+inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len)
 {
 #ifdef HAVE_INET_NTOA
 	struct in_addr in;
@@ -136,14 +132,7 @@
 #endif
 
 int
-getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
-	const struct sockaddr *sa;
-	size_t salen;
-	char *host;
-	size_t hostlen;
-	char *serv;
-	size_t servlen;
-	int flags;
+getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags)
 {
 	struct afd *afd;
 	struct servent *sp;
Index: ext/stringio/stringio.c
RCS file: /src/ruby/ext/stringio/stringio.c,v
retrieving revision 1.45
diff -u -r1.45 stringio.c
--- ext/stringio/stringio.c	9 Jun 2006 21:20:04 -0000	1.45
+++ ext/stringio/stringio.c	20 Jun 2006 15:25:08 -0000
@@ -53,8 +53,7 @@
 }
 
 static void
-strio_mark(ptr)
-    struct StringIO *ptr;
+strio_mark(struct StringIO *ptr)
 {
     if (ptr) {
 	rb_gc_mark(ptr->string);
@@ -62,8 +61,7 @@
 }
 
 static void
-strio_free(ptr)
-    struct StringIO *ptr;
+strio_free(struct StringIO *ptr)
 {
     if (--ptr->count < ) {
 	xfree(ptr);
@@ -71,8 +69,7 @@
 }
 
 static struct StringIO*
-check_strio(self)
-    VALUE self;
+check_strio(VALUE self)
 {
     Check_Type(self, T_DATA);
     if (!IS_STRIO(self)) {
@@ -83,8 +80,7 @@
 }
 
 static struct StringIO*
-get_strio(self)
-    VALUE self;
+get_strio(VALUE self)
 {
     struct StringIO *ptr  heck_strio(self);
 
@@ -101,8 +97,7 @@
 #define WRITABLE(ptr) ((ptr)->flags & FMODE_WRITABLE)
 
 static struct StringIO*
-readable(ptr)
-    struct StringIO *ptr;
+readable(struct StringIO *ptr)
 {
     if (!READABLE(ptr)) {
 	rb_raise(rb_eIOError, "not opened for reading");
@@ -111,8 +106,7 @@
 }
 
 static struct StringIO*
-writable(ptr)
-    struct StringIO *ptr;
+writable(struct StringIO *ptr)
 {
     if (!WRITABLE(ptr)) {
 	rb_raise(rb_eIOError, "not opened for writing");
@@ -124,8 +118,7 @@
 }
 
 static void
-check_modifiable(ptr)
-    struct StringIO *ptr;
+check_modifiable(struct StringIO *ptr)
 {
     if (OBJ_FROZEN(ptr->string)) {
 	rb_raise(rb_eIOError, "not modifiable string");
@@ -193,10 +186,7 @@
  * returned from the block.
  */
 static VALUE
-strio_s_open(argc, argv, klass)
-    int argc;
-    VALUE *argv;
-    VALUE klass;
+strio_s_open(int argc, VALUE *argv, VALUE klass)
 {
     VALUE obj  b_class_new_instance(argc, argv, klass);
     if (!rb_block_given_p()) return obj;
@@ -209,10 +199,7 @@
  * Creates new StringIO instance from with _string_ and _mode_.
  */
 static VALUE
-strio_initialize(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_initialize(int argc, VALUE *argv, VALUE self)
 {
     struct StringIO *ptr  heck_strio(self);
     VALUE string, mode;
@@ -257,8 +244,7 @@
 }
 
 static VALUE
-strio_finalize(self)
-    VALUE self;
+strio_finalize(VALUE self)
 {
     struct StringIO *ptr  tringIO(self);
     ptr->string  nil;
@@ -270,8 +256,7 @@
  * Returns +false+.  Just for compatibility to IO.
  */
 static VALUE
-strio_false(self)
-    VALUE self;
+strio_false(VALUE self)
 {
     StringIO(self);
     return Qfalse;
@@ -281,8 +266,7 @@
  * Returns +nil+.  Just for compatibility to IO.
  */
 static VALUE
-strio_nil(self)
-    VALUE self;
+strio_nil(VALUE self)
 {
     StringIO(self);
     return Qnil;
@@ -292,8 +276,7 @@
  * Returns *strio* itself.  Just for compatibility to IO.
  */
 static VALUE
-strio_self(self)
-    VALUE self;
+strio_self(VALUE self)
 {
     StringIO(self);
     return self;
@@ -303,8 +286,7 @@
  * Returns 0.  Just for compatibility to IO.
  */
 static VALUE
-strio_0(self)
-    VALUE self;
+strio_0(VALUE self)
 {
     StringIO(self);
     return INT2FIX(0);
@@ -314,8 +296,7 @@
  * Returns the argument unchanged.  Just for compatibility to IO.
  */
 static VALUE
-strio_first(self, arg)
-    VALUE self, arg;
+strio_first(VALUE self, VALUE arg)
 {
     StringIO(self);
     return arg;
@@ -325,10 +306,7 @@
  * Raises NotImplementedError.
  */
 static VALUE
-strio_unimpl(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_unimpl(int argc, VALUE *argv, VALUE self)
 {
     StringIO(self);
     rb_notimplement();
@@ -341,8 +319,7 @@
  * Returns underlying String object, the subject of IO.
  */
 static VALUE
-strio_get_string(self)
-    VALUE self;
+strio_get_string(VALUE self)
 {
     return StringIO(self)->string;
 }
@@ -354,8 +331,7 @@
  * Changes underlying String object, the subject of IO.
  */
 static VALUE
-strio_set_string(self, string)
-    VALUE self, string;
+strio_set_string(VALUE self, VALUE string)
 {
     struct StringIO *ptr  tringIO(self);
 
@@ -376,8 +352,7 @@
  * operations; an +IOError+ is raised if such an attempt is made.
  */
 static VALUE
-strio_close(self)
-    VALUE self;
+strio_close(VALUE self)
 {
     struct StringIO *ptr  tringIO(self);
     if (CLOSED(ptr)) {
@@ -395,8 +370,7 @@
  * *strio* is not readable.
  */
 static VALUE
-strio_close_read(self)
-    VALUE self;
+strio_close_read(VALUE self)
 {
     struct StringIO *ptr  tringIO(self);
     if (!READABLE(ptr)) {
@@ -414,8 +388,7 @@
  * *strio* is not writeable.
  */
 static VALUE
-strio_close_write(self)
-    VALUE self;
+strio_close_write(VALUE self)
 {
     struct StringIO *ptr  tringIO(self);
     if (!WRITABLE(ptr)) {
@@ -432,8 +405,7 @@
  * Returns +true+ if *strio* is completely closed, +false+ otherwise.
  */
 static VALUE
-strio_closed(self)
-    VALUE self;
+strio_closed(VALUE self)
 {
     struct StringIO *ptr  tringIO(self);
     if (!CLOSED(ptr)) return Qfalse;
@@ -447,8 +419,7 @@
  * Returns +true+ if *strio* is not readable, +false+ otherwise.
  */
 static VALUE
-strio_closed_read(self)
-    VALUE self;
+strio_closed_read(VALUE self)
 {
     struct StringIO *ptr  tringIO(self);
     if (READABLE(ptr)) return Qfalse;
@@ -462,8 +433,7 @@
  * Returns +true+ if *strio* is not writable, +false+ otherwise.
  */
 static VALUE
-strio_closed_write(self)
-    VALUE self;
+strio_closed_write(VALUE self)
 {
     struct StringIO *ptr  tringIO(self);
     if (WRITABLE(ptr)) return Qfalse;
@@ -479,8 +449,7 @@
  * opened for reading or an +IOError+ will be raised.
  */
 static VALUE
-strio_eof(self)
-    VALUE self;
+strio_eof(VALUE self)
 {
     struct StringIO *ptr  eadable(StringIO(self));
     if (ptr->pos < RSTRING(ptr->string)->len) return Qfalse;
@@ -516,8 +485,7 @@
  * newline.  See also the  <code>$.</code> variable.
  */
 static VALUE
-strio_get_lineno(self)
-    VALUE self;
+strio_get_lineno(VALUE self)
 {
     return LONG2NUM(StringIO(self)->lineno);
 }
@@ -530,8 +498,7 @@
  * <code>$.</code> is updated only on the next read.
  */
 static VALUE
-strio_set_lineno(self, lineno)
-    VALUE self, lineno;
+strio_set_lineno(VALUE self, VALUE lineno)
 {
     StringIO(self)->lineno  UM2LONG(lineno);
     return lineno;
@@ -575,8 +542,7 @@
  * Returns the current offset (in bytes) of *strio*.
  */
 static VALUE
-strio_get_pos(self)
-    VALUE self;
+strio_get_pos(VALUE self)
 {
     return LONG2NUM(StringIO(self)->pos);
 }
@@ -588,9 +554,7 @@
  * Seeks to the given position (in bytes) in *strio*.
  */
 static VALUE
-strio_set_pos(self, pos)
-    VALUE self;
-    VALUE pos;
+strio_set_pos(VALUE self, VALUE pos)
 {
     struct StringIO *ptr  tringIO(self);
     long p  UM2LONG(pos);
@@ -609,8 +573,7 @@
  * +lineno+ to zero.
  */
 static VALUE
-strio_rewind(self)
-    VALUE self;
+strio_rewind(VALUE self)
 {
     struct StringIO *ptr  tringIO(self);
     ptr->pos  ;
@@ -626,10 +589,7 @@
  * the value of _whence_ (see IO#seek).
  */
 static VALUE
-strio_seek(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_seek(int argc, VALUE *argv, VALUE self)
 {
     VALUE whence;
     struct StringIO *ptr  tringIO(self);
@@ -663,8 +623,7 @@
  * Returns +true+ always.
  */
 static VALUE
-strio_get_sync(self)
-    VALUE self;
+strio_get_sync(VALUE self)
 {
     StringIO(self);
     return Qtrue;
@@ -682,8 +641,7 @@
  * See IO#each_byte.
  */
 static VALUE
-strio_each_byte(self)
-    VALUE self;
+strio_each_byte(VALUE self)
 {
     struct StringIO *ptr  eadable(StringIO(self));
     while (ptr->pos < RSTRING(ptr->string)->len) {
@@ -700,8 +658,7 @@
  * See IO#getc.
  */
 static VALUE
-strio_getc(self)
-    VALUE self;
+strio_getc(VALUE self)
 {
     struct StringIO *ptr  eadable(StringIO(self));
     int c;
@@ -740,8 +697,7 @@
  * In other case, there is no limitation for multiple pushbacks.
  */
 static VALUE
-strio_ungetc(self, ch)
-    VALUE self, ch;
+strio_ungetc(VALUE self, VALUE ch)
 {
     struct StringIO *ptr  eadable(StringIO(self));
     int cc  UM2INT(ch);
@@ -767,8 +723,7 @@
  * See IO#readchar.
  */
 static VALUE
-strio_readchar(self)
-    VALUE self;
+strio_readchar(VALUE self)
 {
     VALUE c  trio_getc(self);
     if (NIL_P(c)) rb_eof_error();
@@ -776,10 +731,7 @@
 }
 
 static void
-bm_init_skip(skip, pat, m)
-     long *skip;
-     const char *pat;
-     long m;
+bm_init_skip(long *skip, const char *pat, long m)
 {
     int c;
 
@@ -792,12 +744,7 @@
 }
 
 static long
-bm_search(little, llen, big, blen, skip)
-    const char *little;
-    long llen;
-    const char *big;
-    long blen;
-    const long *skip;
+bm_search(const char *little, long llen, const char *big, long blen, const long *skip)
 {
     long i, j, k;
 
@@ -816,10 +763,7 @@
 }
 
 static VALUE
-strio_getline(argc, argv, ptr)
-    int argc;
-    VALUE *argv;
-    struct StringIO *ptr;
+strio_getline(int argc, VALUE *argv, struct StringIO *ptr)
 {
     const char *s, *e, *p;
     long n;
@@ -897,10 +841,7 @@
  * See IO#gets.
  */
 static VALUE
-strio_gets(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_gets(int argc, VALUE *argv, VALUE self)
 {
     VALUE str  trio_getline(argc, argv, readable(StringIO(self)));
 
@@ -915,10 +856,7 @@
  * See IO#readline.
  */
 static VALUE
-strio_readline(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_readline(int argc, VALUE *argv, VALUE self)
 {
     VALUE line  trio_getline(argc, argv, readable(StringIO(self)));
     if (NIL_P(line)) rb_eof_error();
@@ -933,10 +871,7 @@
  * See IO#each.
  */
 static VALUE
-strio_each(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_each(int argc, VALUE *argv, VALUE self)
 {
     struct StringIO *ptr  tringIO(self);
     VALUE line;
@@ -954,10 +889,7 @@
  * See IO#readlines.
  */
 static VALUE
-strio_readlines(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_readlines(int argc, VALUE *argv, VALUE self)
 {
     struct StringIO *ptr  tringIO(self);
     VALUE ary  b_ary_new(), line;
@@ -978,8 +910,7 @@
  * Returns the number of bytes written.  See IO#write.
  */
 static VALUE
-strio_write(self, str)
-    VALUE self, str;
+strio_write(VALUE self, VALUE str)
 {
     struct StringIO *ptr  ritable(StringIO(self));
     long len, olen;
@@ -1037,8 +968,7 @@
  * See IO#putc.
  */
 static VALUE
-strio_putc(self, ch)
-    VALUE self, ch;
+strio_putc(VALUE self, VALUE ch)
 {
     struct StringIO *ptr  ritable(StringIO(self));
     int c  UM2CHR(ch);
@@ -1070,10 +1000,7 @@
  * See IO#read.
  */
 static VALUE
-strio_read(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strio_read(int argc, VALUE *argv, VALUE self)
 {
     struct StringIO *ptr  eadable(StringIO(self));
     VALUE str  nil;
@@ -1178,8 +1105,7 @@
  * Returns the size of the buffer string.
  */
 static VALUE
-strio_size(self)
-    VALUE self;
+strio_size(VALUE self)
 {
     VALUE string  tringIO(self)->string;
     if (NIL_P(string)) {
@@ -1196,8 +1122,7 @@
  * must be opened for writing.
  */
 static VALUE
-strio_truncate(self, len)
-    VALUE self, len;
+strio_truncate(VALUE self, VALUE len)
 {
     VALUE string  ritable(StringIO(self))->string;
     long l  UM2LONG(len);
Index: ext/strscan/strscan.c
RCS file: /src/ruby/ext/strscan/strscan.c,v
retrieving revision 1.23
diff -u -r1.23 strscan.c
--- ext/strscan/strscan.c	9 Jun 2006 21:20:04 -0000	1.23
+++ ext/strscan/strscan.c	20 Jun 2006 15:25:08 -0000
@@ -119,18 +119,14 @@
    */
 
 static VALUE
-infect(str, p)
-    VALUE str;
-    struct strscanner *p;
+infect(VALUE str, struct strscanner *p)
 {
     OBJ_INFECT(str, p->str);
     return str;
 }
 
 static VALUE
-extract_range(p, beg_i, end_i)
-    struct strscanner *p;
-    long beg_i, end_i;
+extract_range(struct strscanner *p, long beg_i, long end_i)
 {
     if (beg_i > S_LEN(p)) return Qnil;
     if (end_i > S_LEN(p))
@@ -139,9 +135,7 @@
 }
 
 static VALUE
-extract_beg_len(p, beg_i, len)
-    struct strscanner *p;
-    long beg_i, len;
+extract_beg_len(struct strscanner *p, long beg_i, long len)
 {
     if (beg_i > S_LEN(p)) return Qnil;
     if (beg_i + len > S_LEN(p))
@@ -154,23 +148,20 @@
    */
 
 static void
-strscan_mark(p)
-    struct strscanner *p;
+strscan_mark(struct strscanner *p)
 {
     rb_gc_mark(p->str);
 }
 
 static void
-strscan_free(p)
-    struct strscanner *p;
+strscan_free(struct strscanner *p)
 {
     onig_region_free(&(p->regs), 0);
     free(p);
 }
 
 static VALUE
-strscan_s_allocate(klass)
-    VALUE klass;
+strscan_s_allocate(VALUE klass)
 {
     struct strscanner *p;
     
@@ -189,10 +180,7 @@
  * +dup+ argument is obsolete and not used now.
  */
 static VALUE
-strscan_initialize(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+strscan_initialize(int argc, VALUE *argv, VALUE self)
 {
     struct strscanner *p;
     VALUE str, need_dup;
@@ -206,8 +194,7 @@
 }
 
 void
-check_strscan(obj)
-    VALUE obj;
+check_strscan(VALUE obj)
 {
     if (TYPE(obj) ! _DATA || RDATA(obj)->dmark ! RUBY_DATA_FUNC)strscan_mark) {
         rb_raise(rb_eTypeError,
@@ -224,8 +211,7 @@
  * Duplicates a StringScanner object.
  */
 static VALUE
-strscan_init_copy(vself, vorig)
-    VALUE vself, vorig;
+strscan_init_copy(VALUE vself, VALUE vorig)
 {
     struct strscanner *self, *orig;
 
@@ -253,8 +239,7 @@
  * This method is defined for backward compatibility.
  */
 static VALUE
-strscan_s_mustc(self)
-    VALUE self;
+strscan_s_mustc(VALUE self)
 {
     return self;
 }
@@ -281,8 +266,7 @@
  * Set the scan pointer to the end of the string and clear matching data.
  */
 static VALUE
-strscan_terminate(self)
-    VALUE self;
+strscan_terminate(VALUE self)
 {
     struct strscanner *p;
 
@@ -297,8 +281,7 @@
  * This method is obsolete; use #terminate instead.
  */
 static VALUE
-strscan_clear(self)
-    VALUE self;
+strscan_clear(VALUE self)
 {
     rb_warning("StringScanner#clear is obsolete; use #terminate instead");
     return strscan_terminate(self);
@@ -308,8 +291,7 @@
  * Returns the string being scanned.
  */
 static VALUE
-strscan_get_string(self)
-    VALUE self;
+strscan_get_string(VALUE self)
 {
     struct strscanner *p;
 
@@ -324,8 +306,7 @@
  * Returns +str+.
  */
 static VALUE
-strscan_set_string(self, str)
-    VALUE self, str;
+strscan_set_string(VALUE self, VALUE str)
 {
     struct strscanner *p;
 
@@ -353,8 +334,7 @@
  *   s.scan(/Dec/)       # -> "Dec"
  */
 static VALUE
-strscan_concat(self, str)
-    VALUE self, str;
+strscan_concat(VALUE self, VALUE str)
 {
     struct strscanner *p;
 
@@ -379,8 +359,7 @@
  *   s.pos               # -> 11
  */
 static VALUE
-strscan_get_pos(self)
-    VALUE self;
+strscan_get_pos(VALUE self)
 {
     struct strscanner *p;
 
@@ -398,8 +377,7 @@
  *   s.rest               # -> "ring"
  */
 static VALUE
-strscan_set_pos(self, v)
-    VALUE self, v;
+strscan_set_pos(VALUE self, VALUE v)
 {
     struct strscanner *p;
     long i;
@@ -417,9 +395,7 @@
 #define strscan_prepare_re(re)  /* none */
 
 static VALUE
-strscan_do_scan(self, regex, succptr, getstr, headonly)
-    VALUE self, regex;
-    int succptr, getstr, headonly;
+strscan_do_scan(VALUE self, VALUE regex, int succptr, int getstr, int headonly)
 {
     struct strscanner *p;
     int ret;
@@ -479,8 +455,7 @@
  *
  */
 static VALUE
-strscan_scan(self, re)
-    VALUE self, re;
+strscan_scan(VALUE self, VALUE re)
 {
     return strscan_do_scan(self, re, 1, 1, 1);
 }
@@ -497,8 +472,7 @@
  *   p s.match?(/\s+/)   # -> nil
  */
 static VALUE
-strscan_match_p(self, re)
-    VALUE self, re;
+strscan_match_p(VALUE self, VALUE re)
 {
     return strscan_do_scan(self, re, 0, 0, 1);
 }
@@ -521,8 +495,7 @@
  *
  */
 static VALUE
-strscan_skip(self, re)
-    VALUE self, re;
+strscan_skip(VALUE self, VALUE re)
 {
     return strscan_do_scan(self, re, 1, 0, 1);
 }
@@ -543,8 +516,7 @@
  * Mnemonic: it "checks" to see whether a #scan will return a value.
  */
 static VALUE
-strscan_check(self, re)
-    VALUE self, re;
+strscan_check(VALUE self, VALUE re)
 {
     return strscan_do_scan(self, re, 0, 1, 1);
 }
@@ -560,8 +532,7 @@
  * "full" means "#scan with full parameters".
  */
 static VALUE
-strscan_scan_full(self, re, s, f)
-    VALUE self, re, s, f;
+strscan_scan_full(VALUE self, VALUE re, VALUE s, VALUE f)
 {
     return strscan_do_scan(self, re, RTEST(s), RTEST(f), 1);
 }
@@ -579,8 +550,7 @@
  *   s.scan_until(/XYZ/)      # -> nil
  */
 static VALUE
-strscan_scan_until(self, re)
-    VALUE self, re;
+strscan_scan_until(VALUE self, VALUE re)
 {
     return strscan_do_scan(self, re, 1, 1, 0);
 }
@@ -621,8 +591,7 @@
  *   s                           # 
  */
 static VALUE
-strscan_skip_until(self, re)
-    VALUE self, re;
+strscan_skip_until(VALUE self, VALUE re)
 {
     return strscan_do_scan(self, re, 1, 0, 0);
 }
@@ -641,8 +610,7 @@
  * Mnemonic: it "checks" to see whether a #scan_until will return a value.
  */
 static VALUE
-strscan_check_until(self, re)
-    VALUE self, re;
+strscan_check_until(VALUE self, VALUE re)
 {
     return strscan_do_scan(self, re, 0, 1, 0);
 }
@@ -657,15 +625,13 @@
  * This method does affect the match register.
  */
 static VALUE
-strscan_search_full(self, re, s, f)
-    VALUE self, re, s, f;
+strscan_search_full(VALUE self, VALUE re, VALUE s, VALUE f)
 {
     return strscan_do_scan(self, re, RTEST(s), RTEST(f), 0);
 }
 
 static void
-adjust_registers_to_matched(p)
-    struct strscanner *p;
+adjust_registers_to_matched(struct strscanner *p)
 {
     onig_region_clear(&(p->regs));
     onig_region_set(&(p->regs), 0, 0, p->curr - p->prev);
@@ -686,8 +652,7 @@
  *   s.getch           # nil
  */
 static VALUE
-strscan_getch(self)
-    VALUE self;
+strscan_getch(VALUE self)
 {
     struct strscanner *p;
     long len;
@@ -726,8 +691,7 @@
  *   s.get_byte         # nil
  */
 static VALUE
-strscan_get_byte(self)
-    VALUE self;
+strscan_get_byte(VALUE self)
 {
     struct strscanner *p;
 
@@ -749,8 +713,7 @@
  * This method is obsolete; use #get_byte instead.
  */
 static VALUE
-strscan_getbyte(self)
-    VALUE self;
+strscan_getbyte(VALUE self)
 {
     rb_warning("StringScanner#getbyte is obsolete; use #get_byte instead");
     return strscan_get_byte(self);
@@ -768,8 +731,7 @@
  *
  */
 static VALUE
-strscan_peek(self, vlen)
-    VALUE self, vlen;
+strscan_peek(VALUE self, VALUE vlen)
 {
     struct strscanner *p;
     long len;
@@ -790,8 +752,7 @@
  * This method is obsolete; use #peek instead.
  */
 static VALUE
-strscan_peep(self, vlen)
-    VALUE self, vlen;
+strscan_peep(VALUE self, VALUE vlen)
 {
     rb_warning("StringScanner#peep is obsolete; use #peek instead");
     return strscan_peek(self, vlen);
@@ -809,8 +770,7 @@
  *   s.unscan             # ScanError: unscan failed: previous match record not exist
  */
 static VALUE
-strscan_unscan(self)
-    VALUE self;
+strscan_unscan(VALUE self)
 {
     struct strscanner *p;
 
@@ -835,8 +795,7 @@
  *   s.bol?           # true
  */
 static VALUE
-strscan_bol_p(self)
-    VALUE self;
+strscan_bol_p(VALUE self)
 {
     struct strscanner *p;
 
@@ -857,8 +816,7 @@
  *   p s.eos?          # true
  */
 static VALUE
-strscan_eos_p(self)
-    VALUE self;
+strscan_eos_p(VALUE self)
 {
     struct strscanner *p;
 
@@ -871,8 +829,7 @@
  * This method is obsolete, use #eos? instead.
  */
 static VALUE
-strscan_empty_p(self)
-    VALUE self;
+strscan_empty_p(VALUE self)
 {
     rb_warning("StringScanner#empty? is obsolete; use #eos? instead");
     return strscan_eos_p(self);
@@ -887,8 +844,7 @@
  *   s.rest?             # are opposites.
  */
 static VALUE
-strscan_rest_p(self)
-    VALUE self;
+strscan_rest_p(VALUE self)
 {
     struct strscanner *p;
 
@@ -906,8 +862,7 @@
  *   s.matched?          # false
  */
 static VALUE
-strscan_matched_p(self)
-    VALUE self;
+strscan_matched_p(VALUE self)
 {
     struct strscanner *p;
 
@@ -923,8 +878,7 @@
  *   s.matched           # -> "test"
  */
 static VALUE
-strscan_matched(self)
-    VALUE self;
+strscan_matched(VALUE self)
 {
     struct strscanner *p;
 
@@ -945,8 +899,7 @@
  *   s.matched_size          # -> nil
  */
 static VALUE
-strscan_matched_size(self)
-    VALUE self;
+strscan_matched_size(VALUE self)
 {
     struct strscanner *p;
 
@@ -981,8 +934,7 @@
  *   s.pre_match                        # -> ""
  */
 static VALUE
-strscan_aref(self, idx)
-    VALUE self, idx;
+strscan_aref(VALUE self, VALUE idx)
 {
     struct strscanner *p;
     long i;
@@ -1011,8 +963,7 @@
  *   s.post_match            # -> "string"
  */
 static VALUE
-strscan_pre_match(self)
-    VALUE self;
+strscan_pre_match(VALUE self)
 {
     struct strscanner *p;
 
@@ -1031,8 +982,7 @@
  *   s.post_match            # -> "string"
  */
 static VALUE
-strscan_post_match(self)
-    VALUE self;
+strscan_post_match(VALUE self)
 {
     struct strscanner *p;
 
@@ -1046,8 +996,7 @@
  * If there is no more data (eos?  rue), it returns <tt>""</tt>.
  */
 static VALUE
-strscan_rest(self)
-    VALUE self;
+strscan_rest(VALUE self)
 {
     struct strscanner *p;
 
@@ -1062,8 +1011,7 @@
  * <tt>s.rest_size</tt> is equivalent to <tt>s.rest.size</tt>.
  */
 static VALUE
-strscan_rest_size(self)
-    VALUE self;
+strscan_rest_size(VALUE self)
 {
     struct strscanner *p;
     long i;
@@ -1102,8 +1050,7 @@
  *   s.inspect            # -> '#<StringScanner 10/21 "...ec 12" @ " 1975...">'
  */
 static VALUE
-strscan_inspect(self)
-    VALUE self;
+strscan_inspect(VALUE self)
 {
     struct strscanner *p;
     char buf[BUFSIZE];
@@ -1140,8 +1087,7 @@
 }
 
 static VALUE
-inspect1(p)
-    struct strscanner *p;
+inspect1(struct strscanner *p)
 {
     char buf[BUFSIZE];
     char *bp  uf;
@@ -1160,8 +1106,7 @@
 }
 
 static VALUE
-inspect2(p)
-    struct strscanner *p;
+inspect2(struct strscanner *p)
 {
     char buf[BUFSIZE];
     char *bp  uf;
Index: ext/syck/emitter.c
RCS file: /src/ruby/ext/syck/emitter.c,v
retrieving revision 1.17
diff -u -r1.17 emitter.c
--- ext/syck/emitter.c	9 Jun 2006 21:20:04 -0000	1.17
+++ ext/syck/emitter.c	20 Jun 2006 15:25:08 -0000
@@ -106,7 +106,7 @@
  * Allocate an emitter
  */
 SyckEmitter *
-syck_new_emitter()
+syck_new_emitter(void)
 {
     SyckEmitter *e;
     e  _ALLOC( SyckEmitter );
@@ -786,8 +786,8 @@
             else
             {
                 syck_emitter_write( e, "x", 1 );
-                syck_emitter_write( e, (char *)hex_table + ((src[i] & 0xF0) >> 4), 1 );
-                syck_emitter_write( e, (char *)hex_table + (src[i] & 0x0F), 1 );
+                syck_emitter_write( e, (const char *)hex_table + ((src[i] & 0xF0) >> 4), 1 );
+                syck_emitter_write( e, (const char *)hex_table + (src[i] & 0x0F), 1 );
             }
         }
         else
Index: ext/syck/rubyext.c
RCS file: /src/ruby/ext/syck/rubyext.c,v
retrieving revision 1.70
diff -u -r1.70 rubyext.c
--- ext/syck/rubyext.c	3 Feb 2006 10:28:27 -0000	1.70
+++ ext/syck/rubyext.c	20 Jun 2006 15:25:08 -0000
@@ -97,8 +97,7 @@
  * Convert YAML to bytecode
  */
 VALUE
-rb_syck_compile(self, port)
-    VALUE self, port;
+rb_syck_compile(VALUE self, VALUE port)
 {
     SYMID oid;
     int taint;
@@ -164,9 +163,7 @@
  * (returns tainted? boolean)
  */
 int
-syck_parser_assign_io(parser, pport)
-    SyckParser *parser;
-    VALUE *pport;
+syck_parser_assign_io(SyckParser *parser, VALUE *pport)
 {
     int taint  true;
     VALUE tmp, port  pport;
@@ -192,8 +189,7 @@
  * Get value in hash by key, forcing an empty hash if nil.
  */
 VALUE
-syck_get_hash_aref(hsh, key)
-    VALUE hsh, key;
+syck_get_hash_aref(VALUE hsh, VALUE key)
 {
    VALUE val  b_hash_aref( hsh, key );
    if ( NIL_P( val ) ) 
@@ -208,9 +204,7 @@
  * creating timestamps
  */
 SYMID
-rb_syck_mktime(str, len)
-    char *str;
-    long len;
+rb_syck_mktime(char *str, long len)
 {
     VALUE time;
     char *ptr  tr;
@@ -315,8 +309,7 @@
  * (see http://www.yaml.org/type/merge/)
  */
 VALUE
-syck_merge_i( entry, hsh )
-    VALUE entry, hsh;
+syck_merge_i(VALUE entry, VALUE hsh )
 {
     VALUE tmp;
     if ( !NIL_P(tmp  b_check_convert_type(entry, T_HASH, "Hash", "to_hash")) )
@@ -331,9 +324,7 @@
  * default handler for ruby.yaml.org types
  */
 int
-yaml_org_handler( n, ref )
-    SyckNode *n;
-    VALUE *ref;
+yaml_org_handler( SyckNode *n, VALUE *ref )
 {
     char *type_id  ->type_id;
     int transferred  ;
@@ -602,9 +593,7 @@
  * - Converts data into native Ruby types
  */
 SYMID
-rb_syck_load_handler(p, n)
-    SyckParser *p;
-    SyckNode *n;
+rb_syck_load_handler(SyckParser *p, SyckNode *n)
 {
     VALUE obj  nil;
     struct parser_xtra *bonus  struct parser_xtra *)p->bonus;
@@ -640,9 +629,7 @@
  * friendly errors.
  */
 void
-rb_syck_err_handler(p, msg)
-    SyckParser *p;
-    char *msg;
+rb_syck_err_handler(SyckParser *p, char *msg)
 {
     char *endl  ->cursor;
 
@@ -661,9 +648,7 @@
  * provide bad anchor object to the parser.
  */
 SyckNode *
-rb_syck_bad_anchor_handler(p, a)
-    SyckParser *p;
-    char *a;
+rb_syck_bad_anchor_handler(SyckParser *p, char *a)
 {
     VALUE anchor_name  b_str_new2( a );
     SyckNode *badanc  yck_new_map( rb_str_new2( "name" ), anchor_name );
@@ -675,8 +660,7 @@
  * data loaded based on the model requested.
  */
 void
-syck_set_model( p, input, model )
-    VALUE p, input, model;
+syck_set_model(VALUE p, VALUE input, VALUE model)
 {
     SyckParser *parser;
     Data_Get_Struct(p, SyckParser, parser);
@@ -716,8 +700,7 @@
  * mark parser nodes
  */
 static void
-syck_mark_parser(parser)
-    SyckParser *parser;
+syck_mark_parser(SyckParser *parser)
 {
     struct parser_xtra *bonus  struct parser_xtra *)parser->bonus;
     rb_gc_mark_maybe(parser->root);
@@ -740,8 +723,7 @@
  * Free the parser and any bonus attachment.
  */
 void
-rb_syck_free_parser(p)
-    SyckParser *p;
+rb_syck_free_parser(SyckParser *p)
 {
     S_FREE( p->bonus );
     syck_free_parser(p);
@@ -752,8 +734,7 @@
  */
 VALUE syck_parser_s_alloc _((VALUE));
 VALUE 
-syck_parser_s_alloc(class)
-    VALUE class;
+syck_parser_s_alloc(VALUE class)
 {
     VALUE pobj;
     SyckParser *parser  yck_new_parser();
@@ -772,10 +753,7 @@
  * YAML::Syck::Parser.initialize( resolver, options )
  */
 static VALUE
-syck_parser_initialize(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+syck_parser_initialize(int argc, VALUE *argv, VALUE self)
 {
     VALUE options;
     if (rb_scan_args(argc, argv, "01", &options) 0)
@@ -795,8 +773,7 @@
  * YAML::Syck::Parser.bufsize  nteger
  */
 static VALUE
-syck_parser_bufsize_set( self, size )
-    VALUE self, size;
+syck_parser_bufsize_set(VALUE self, VALUE size)
 {
     SyckParser *parser;
 
@@ -812,8 +789,7 @@
  * YAML::Syck::Parser.bufsize Integer
  */
 static VALUE
-syck_parser_bufsize_get( self )
-    VALUE self;
+syck_parser_bufsize_get(VALUE self)
 {
     SyckParser *parser;
 
@@ -825,10 +801,7 @@
  * YAML::Syck::Parser.load( IO or String )
  */
 VALUE
-syck_parser_load(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+syck_parser_load(int argc, VALUE *argv, VALUE self)
 {
     VALUE port, proc, model, input;
     SyckParser *parser;
@@ -855,10 +828,7 @@
  * YAML::Syck::Parser.load_documents( IO or String ) { |doc| }
  */
 VALUE
-syck_parser_load_documents(argc, argv, self)
-    int argc;
-    VALUE *argv;
-    VALUE self;
+syck_parser_load_documents(int argc, VALUE *argv, VALUE self)
 {
     VALUE port, proc, v, input, model;
     SyckParser *parser;
@@ -899,8 +869,7 @@
  * YAML::Syck::Parser#set_resolver
  */
 VALUE
-syck_parser_set_resolver( self, resolver )
-    VALUE self, resolver;
+syck_parser_set_resolver(VALUE self, VALUE resolver)
 {
     rb_ivar_set( self, s_resolver, resolver );
     return self;
@@ -910,8 +879,7 @@
  * YAML::Syck::Resolver.initialize
  */
 static VALUE
-syck_resolver_initialize( self )
-    VALUE self;
+syck_resolver_initialize(VALUE self)
 {
     VALUE tags  b_hash_new();
     rb_ivar_set(self, s_tags, rb_hash_new());
@@ -922,8 +890,7 @@
  * YAML::Syck::Resolver#add_type
  */
 VALUE
-syck_resolver_add_type( self, taguri, cls )
-    VALUE self, taguri, cls;
+syck_resolver_add_type(VALUE self, VALUE taguri, VALUE cls)
 {
     VALUE tags  b_attr_get(self, s_tags);
     rb_hash_aset( tags, taguri, cls );
@@ -934,8 +901,7 @@
  * YAML::Syck::Resolver#use_types_at
  */
 VALUE
-syck_resolver_use_types_at( self, hsh )
-    VALUE self, hsh;
+syck_resolver_use_types_at(VALUE self, VALUE hsh)
 {
     rb_ivar_set( self, s_tags, hsh );
     return Qnil;
@@ -945,8 +911,7 @@
  * YAML::Syck::Resolver#detect_implicit 
  */
 VALUE
-syck_resolver_detect_implicit( self, val )
-    VALUE self, val;
+syck_resolver_detect_implicit(VALUE self, VALUE val)
 {
     char *type_id;
     return rb_str_new2( "" );
@@ -956,8 +921,7 @@
  * YAML::Syck::Resolver#node_import
  */
 VALUE
-syck_resolver_node_import( self, node )
-    VALUE self, node;
+syck_resolver_node_import(VALUE self, VALUE node)
 {
     SyckNode *n;
     VALUE obj;
@@ -1037,8 +1001,7 @@
  * Set instance variables
  */
 VALUE
-syck_set_ivars( vars, obj )
-        VALUE vars, obj;
+syck_set_ivars(VALUE vars, VALUE obj)
 {
     VALUE ivname  b_ary_entry( vars, 0 );
     char *ivn;
@@ -1055,8 +1018,7 @@
  * YAML::Syck::Resolver#const_find
  */
 VALUE
-syck_const_find( const_name )
-    VALUE const_name;
+syck_const_find(VALUE const_name)
 {
     VALUE tclass  b_cObject;
     VALUE tparts  b_str_split( const_name, "::" );
@@ -1073,8 +1035,7 @@
  * YAML::Syck::Resolver#transfer
  */
 VALUE
-syck_resolver_transfer( self, type, val )
-    VALUE self, type, val;
+syck_resolver_transfer(VALUE self, VALUE type, VALUE val)
 {
     if (NIL_P(type) || RSTRING(StringValue(type))->len 0) 
     {
@@ -1205,8 +1166,7 @@
  * YAML::Syck::Resolver#tagurize
  */
 VALUE
-syck_resolver_tagurize( self, val )
-    VALUE self, val;
+syck_resolver_tagurize(VALUE self, VALUE val)
 {
     VALUE tmp  b_check_string_type(val);
 
@@ -1224,8 +1184,7 @@
  * YAML::Syck::DefaultResolver#detect_implicit 
  */
 VALUE
-syck_defaultresolver_detect_implicit( self, val )
-    VALUE self, val;
+syck_defaultresolver_detect_implicit(VALUE self, VALUE val)
 {
     char *type_id;
     VALUE tmp  b_check_string_type(val);
@@ -1244,8 +1203,7 @@
  * YAML::Syck::DefaultResolver#node_import
  */
 VALUE
-syck_defaultresolver_node_import( self, node )
-    VALUE self, node;
+syck_defaultresolver_node_import(VALUE self, VALUE node)
 {
     SyckNode *n;
     VALUE obj;
@@ -1261,8 +1219,7 @@
  * YAML::Syck::GenericResolver#node_import
  */
 VALUE
-syck_genericresolver_node_import( self, node )
-    VALUE self, node;
+syck_genericresolver_node_import(VALUE self, VALUE node)
 {
     SyckNode *n;
     int i  ;
@@ -1339,8 +1296,7 @@
  * YAML::Syck::BadAlias.initialize
  */
 VALUE
-syck_badalias_initialize( self, val )
-    VALUE self, val;
+syck_badalias_initialize(VALUE self, VALUE val)
 {
     rb_iv_set( self, "@name", val );
     return self;
@@ -1350,8 +1306,7 @@
  * YAML::Syck::BadAlias.<  */
 VALUE
-syck_badalias_cmp( alias1, alias2 )
-    VALUE alias1, alias2;
+syck_badalias_cmp(VALUE alias1, VALUE alias2)
 {
     VALUE str1  b_ivar_get( alias1, s_name ); 
     VALUE str2  b_ivar_get( alias2, s_name ); 
@@ -1363,8 +1318,7 @@
  * YAML::DomainType.initialize
  */
 VALUE
-syck_domaintype_initialize( self, domain, type_id, val )
-    VALUE self, domain, type_id, val;
+syck_domaintype_initialize(VALUE self, VALUE domain, VALUE type_id, VALUE val)
 {
     rb_iv_set( self, "@domain", domain );
     rb_iv_set( self, "@type_id", type_id );
@@ -1376,8 +1330,7 @@
  * YAML::Object.initialize
  */
 VALUE
-syck_yobject_initialize( self, klass, ivars )
-    VALUE self, klass, ivars;
+syck_yobject_initialize(VALUE self, VALUE klass, VALUE ivars)
 {
     rb_iv_set( self, "@class", klass );
     rb_iv_set( self, "@ivars", ivars );
@@ -1388,8 +1341,7 @@
  * YAML::PrivateType.initialize
  */
 VALUE
-syck_privatetype_initialize( self, type_id, val )
-    VALUE self, type_id, val;
+syck_privatetype_initialize(VALUE self, VALUE type_id, VALUE val)
 {
     rb_iv_set( self, "@type_id", type_id );
     rb_iv_set( self, "@value", val );
@@ -1400,8 +1352,7 @@
  * Mark node contents.
  */
 static void
-syck_node_mark( n )
-    SyckNode *n;
+syck_node_mark(SyckNode *n)
 {
     int i;
     rb_gc_mark_maybe( n->id );
@@ -1431,8 +1382,7 @@
  * YAML::Syck::Scalar.allocate
  */
 VALUE
-syck_scalar_alloc( class )
-    VALUE class;
+syck_scalar_alloc(VALUE class)
 {
     SyckNode *node  yck_alloc_str();
     VALUE obj  ata_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
@@ -1444,8 +1394,7 @@
  * YAML::Syck::Scalar.initialize
  */
 VALUE
-syck_scalar_initialize( self, type_id, val, style )
-    VALUE self, type_id, val, style;
+syck_scalar_initialize(VALUE self, VALUE type_id, VALUE val, VALUE style)
 {
     rb_iv_set( self, "@kind", sym_scalar );
     rb_funcall( self, s_type_id_set, 1, type_id );
@@ -1458,8 +1407,7 @@
  * YAML::Syck::Scalar.style*/
 VALUE
-syck_scalar_style_set( self, style )
-    VALUE self, style;
+syck_scalar_style_set(VALUE self, VALUE style)
 {
     SyckNode *node;
     Data_Get_Struct( self, SyckNode, node );
@@ -1497,8 +1445,7 @@
  * YAML::Syck::Scalar.value*/
 VALUE
-syck_scalar_value_set( self, val )
-    VALUE self, val;
+syck_scalar_value_set(VALUE  self, VALUE val)
 {
     SyckNode *node;
     Data_Get_Struct( self, SyckNode, node );
@@ -1516,8 +1463,7 @@
  * YAML::Syck::Seq.allocate
  */
 VALUE
-syck_seq_alloc( class )
-    VALUE class;
+syck_seq_alloc(VALUE class)
 {
     SyckNode *node;
     VALUE obj;
@@ -1531,8 +1477,7 @@
  * YAML::Syck::Seq.initialize
  */
 VALUE
-syck_seq_initialize( self, type_id, val, style )
-    VALUE self, type_id, val, style;
+syck_seq_initialize(VALUE self, VALUE type_id, VALUE val, VALUE style)
 {
     SyckNode *node;
     Data_Get_Struct( self, SyckNode, node );
@@ -1548,8 +1493,7 @@
  * YAML::Syck::Seq.value*/
 VALUE
-syck_seq_value_set( self, val )
-    VALUE self, val;
+syck_seq_value_set(VALUE self, VALUE val)
 {
     SyckNode *node;
     Data_Get_Struct( self, SyckNode, node );
@@ -1572,8 +1516,7 @@
  * YAML::Syck::Seq.add
  */
 VALUE
-syck_seq_add_m( self, val )
-    VALUE self, val;
+syck_seq_add_m(VALUE self, VALUE val)
 {
     SyckNode *node;
     VALUE emitter  b_ivar_get( self, s_emitter );
@@ -1592,8 +1535,7 @@
  * YAML::Syck::Seq.style*/
 VALUE
-syck_seq_style_set( self, style )
-    VALUE self, style;
+syck_seq_style_set(VALUE self, VALUE style)
 {
     SyckNode *node;
     Data_Get_Struct( self, SyckNode, node );
@@ -1615,8 +1557,7 @@
  * YAML::Syck::Map.allocate
  */
 VALUE
-syck_map_alloc( class )
-    VALUE class;
+syck_map_alloc(VALUE class)
 {
     SyckNode *node;
     VALUE obj;
@@ -1630,8 +1571,7 @@
  * YAML::Syck::Map.initialize
  */
 VALUE
-syck_map_initialize( self, type_id, val, style )
-    VALUE self, type_id, val, style;
+syck_map_initialize(VALUE self, VALUE type_id, VALUE val, VALUE style)
 {
     SyckNode *node;
     Data_Get_Struct( self, SyckNode, node );
@@ -1665,8 +1605,7 @@
  * YAML::Syck::Map.value*/
 VALUE
-syck_map_value_set( self, val )
-    VALUE self, val;
+syck_map_value_set(VALUE self, VALUE val)
 {
     SyckNode *node;
     Data_Get_Struct( self, SyckNode, node );
@@ -1698,8 +1637,7 @@
  * YAML::Syck::Map.add
  */
 VALUE
-syck_map_add_m( self, key, val )
-    VALUE self, key, val;
+syck_map_add_m(VALUE self, VALUE key, VALUE val)
 {
     SyckNode *node;
     VALUE emitter  b_ivar_get( self, s_emitter );
@@ -1719,8 +1657,7 @@
  * YAML::Syck::Map.style*/
 VALUE
-syck_map_style_set( self, style )
-    VALUE self, style;
+syck_map_style_set(VALUE self, VALUE style)
 {
     SyckNode *node;
     Data_Get_Struct( self, SyckNode, node );
@@ -1742,8 +1679,7 @@
  * Cloning method for all node types
  */
 VALUE
-syck_node_init_copy( copy, orig )
-    VALUE copy, orig;
+syck_node_init_copy(VALUE copy, VALUE orig)
 {
     SyckNode *copy_n;
     SyckNode *orig_n;
@@ -1766,8 +1702,7 @@
  * YAML::Syck::Node#type_id*/
 VALUE
-syck_node_type_id_set( self, type_id )
-    VALUE self, type_id;
+syck_node_type_id_set(VALUE self, VALUE type_id)
 {
     SyckNode *node;
     Data_Get_Struct( self, SyckNode, node );
@@ -1787,8 +1722,7 @@
  * YAML::Syck::Node.transform
  */
 VALUE
-syck_node_transform( self )
-    VALUE self;
+syck_node_transform(VALUE self)
 {
     VALUE t;
     SyckNode *n;
@@ -1844,9 +1778,7 @@
  * No one could possibly object.
  */
 void
-rb_syck_emitter_handler(e, data)
-    SyckEmitter *e;
-    st_data_t data;
+rb_syck_emitter_handler(SyckEmitter *e, st_data_t data)
 {
     SyckNode *n;
     Data_Get_Struct((VALUE)data, SyckNode, n);
@@ -1890,10 +1822,7 @@
  * Handle output from the emitter
  */
 void 
-rb_syck_output_handler( emitter, str, len )
-    SyckEmitter *emitter;
-    char *str;
-    long len;
+rb_syck_output_handler(SyckEmitter * emitter, char *str, long len)
 {
     struct emitter_xtra *bonus  struct emitter_xtra *)emitter->bonus;
     VALUE dest  onus->port;
@@ -1909,8 +1838,7 @@
  * symbol table.
  */
 void
-syck_out_mark( emitter, node )
-    VALUE emitter, node;
+syck_out_mark(VALUE emitter, VALUE node)
 {
     SyckEmitter *emitterPtr;
     struct emitter_xtra *bonus;
@@ -1927,8 +1855,7 @@
  * Mark emitter values.
  */
 static void
-syck_mark_emitter(emitter)
-    SyckEmitter *emitter;
+syck_mark_emitter(SyckEmitter *emitter)
 {
     struct emitter_xtra *bonus  struct emitter_xtra *)emitter->bonus;
     rb_gc_mark( bonus->oid  );
@@ -1940,8 +1867,7 @@
  * Free the emitter and any bonus attachment.
  */
 void
-rb_syck_free_emitter(e)
-    SyckEmitter *e;
+rb_syck_free_emitter(SyckEmitter *e)
 {
     S_FREE( e->bonus );
     syck_free_emitter(e);
@@ -1952,8 +1878,7 @@
  */
 VALUE syck_emitter_s_alloc _((VALUE));
 VALUE 
-syck_emitter_s_alloc(class)
-    VALUE class;
+syck_emitter_s_alloc(VALUE class)
 {
     VALUE pobj;
     SyckEmitter *emitter  yck_new_emitter();
@@ -1973,10 +1898,7 @@
  * YAML::Syck::Emitter.reset( options )
  */
 VALUE
-syck_emitter_reset( argc, argv, self )
-    int argc;
-    VALUE *argv;
-    VALUE self;
+syck_emitter_reset(int argc, VALUE *argv, VALUE self)
 {
     VALUE options, tmp;
     SyckEmitter *emitter;
@@ -2018,10 +1940,7 @@
  * YAML::Syck::Emitter.emit( object_id ) { |out| ... }
  */
 VALUE
-syck_emitter_emit( argc, argv, self )
-    int argc;
-    VALUE *argv;
-    VALUE self;
+syck_emitter_emit(int argc, VALUE *argv, VALUE self)
 {
     VALUE oid, proc;
     char *anchor_name;
@@ -2062,8 +1981,7 @@
  * YAML::Syck::Emitter#node_export
  */
 VALUE
-syck_emitter_node_export( self, node )
-    VALUE self, node;
+syck_emitter_node_export(VALUE self, VALUE node)
 {
     return rb_funcall( node, s_to_yaml, 1, self );
 }
@@ -2072,8 +1990,7 @@
  * YAML::Syck::Emitter#set_resolver
  */
 VALUE
-syck_emitter_set_resolver( self, resolver )
-    VALUE self, resolver;
+syck_emitter_set_resolver(VALUE self, VALUE resolver)
 {
     rb_ivar_set( self, s_resolver, resolver );
     return self;
@@ -2083,8 +2000,7 @@
  * YAML::Syck::Out::initialize
  */
 VALUE
-syck_out_initialize( self, emitter )
-    VALUE self, emitter;
+syck_out_initialize(VALUE self, VALUE emitter)
 {
     rb_ivar_set( self, s_emitter, emitter );
     return self;
@@ -2094,10 +2010,7 @@
  * YAML::Syck::Out::map
  */
 VALUE
-syck_out_map( argc, argv, self )
-    int argc;
-    VALUE *argv;
-    VALUE self;
+syck_out_map(int argc, VALUE *argv, VALUE self)
 {
     VALUE type_id, style, map;
     if (rb_scan_args(argc, argv, "11", &type_id, &style) 1) {
@@ -2113,10 +2026,7 @@
  * YAML::Syck::Out::seq
  */
 VALUE
-syck_out_seq( argc, argv, self )
-    int argc;
-    VALUE *argv;
-    VALUE self;
+syck_out_seq(int argc, VALUE *argv, VALUE self)
 {
     VALUE type_id, style, seq;
     if (rb_scan_args(argc, argv, "11", &type_id, &style) 1) {
@@ -2134,10 +2044,7 @@
     VALUE self, type_id, str, style;
  */
 VALUE
-syck_out_scalar( argc, argv, self )
-    int argc;
-    VALUE *argv;
-    VALUE self;
+syck_out_scalar(int argc, VALUE *argv, VALUE self)
 {
     VALUE type_id, str, style, scalar;
     if (rb_scan_args(argc, argv, "21", &type_id, &str, &style) 2) {
Index: ext/syck/syck.h
RCS file: /src/ruby/ext/syck/syck.h,v
retrieving revision 1.31
diff -u -r1.31 syck.h
--- ext/syck/syck.h	9 Jun 2006 21:20:03 -0000	1.31
+++ ext/syck/syck.h	20 Jun 2006 15:25:08 -0000
@@ -363,7 +363,7 @@
 long syck_io_str_read( char *, SyckIoStr *, long, long );
 char *syck_base64enc( char *, long );
 char *syck_base64dec( char *, long );
-SyckEmitter *syck_new_emitter();
+SyckEmitter *syck_new_emitter(void);
 SYMID syck_emitter_mark_node( SyckEmitter *, st_data_t );
 void syck_emitter_ignore_id( SyckEmitter *, SYMID );
 void syck_output_handler( SyckEmitter *, SyckOutputHandler );
Index: ext/syck/yaml2byte.c
RCS file: /src/ruby/ext/syck/yaml2byte.c,v
retrieving revision 1.7
diff -u -r1.7 yaml2byte.c
--- ext/syck/yaml2byte.c	9 Jun 2006 21:20:03 -0000	1.7
+++ ext/syck/yaml2byte.c	20 Jun 2006 15:25:08 -0000
@@ -35,7 +35,7 @@
    long remaining;
    int  printed;
 } bytestring_t;
-bytestring_t *bytestring_alloc() {
+bytestring_t *bytestring_alloc(void) {
     bytestring_t *ret; 
     /*TRACE0("bytestring_alloc()");*/
     ret  _ALLOC(bytestring_t);
Index: ext/tk/stubs.c
RCS file: /src/ruby/ext/tk/stubs.c,v
retrieving revision 1.6
diff -u -r1.6 stubs.c
--- ext/tk/stubs.c	18 Apr 2006 08:42:32 -0000	1.6
+++ ext/tk/stubs.c	20 Jun 2006 15:25:08 -0000
@@ -86,8 +86,7 @@
 static DL_HANDLE tk_dll   DL_HANDLE)0;
 
 int
-ruby_open_tcl_dll(appname)
-    char *appname;
+ruby_open_tcl_dll(char *appname)
 {
     void (*p_Tcl_FindExecutable)(const char *);
     int n;
@@ -169,8 +168,7 @@
 }
 
 int
-ruby_open_tcltk_dll(appname)
-    char *appname;
+ruby_open_tcltk_dll(char *appname)
 {
     return( ruby_open_tcl_dll(appname) || ruby_open_tk_dll() );
 }
@@ -189,8 +187,7 @@
 
 
 Tcl_Interp *
-ruby_tcl_create_ip_and_stubs_init(st)
-    int *st;
+ruby_tcl_create_ip_and_stubs_init(int *st)
 {
     Tcl_Interp *tcl_ip;
 
@@ -272,8 +269,7 @@
 }
 
 int
-ruby_tk_stubs_init(tcl_ip)
-    Tcl_Interp *tcl_ip;
+ruby_tk_stubs_init(Tcl_Interp *tcl_ip)
 {
     Tcl_ResetResult(tcl_ip);
 
@@ -308,8 +304,7 @@
 }
 
 int
-ruby_tk_stubs_safeinit(tcl_ip)
-    Tcl_Interp *tcl_ip;
+ruby_tk_stubs_safeinit(Tcl_Interp *tcl_ip)
 {
     Tcl_ResetResult(tcl_ip);
 
@@ -395,8 +390,7 @@
 static int call_tk_stubs_init  ;
 
 int
-ruby_open_tcl_dll(appname)
-    char *appname;
+ruby_open_tcl_dll(char *appname)
 {
     if (appname) {
         Tcl_FindExecutable(appname);
@@ -418,8 +412,7 @@
     return TCLTK_STUBS_OK;
 }
 
-int ruby_open_tcltk_dll(appname)
-    char *appname;
+int ruby_open_tcltk_dll(char *appname)
 {
     return( ruby_open_tcl_dll(appname) || ruby_open_tk_dll() );
 }
@@ -437,8 +430,7 @@
 }
 
 Tcl_Interp *
-ruby_tcl_create_ip_and_stubs_init(st)
-    int *st;
+ruby_tcl_create_ip_and_stubs_init(int *st)
 {
     Tcl_Interp *tcl_ip;
 
@@ -466,8 +458,7 @@
 }
 
 int 
-ruby_tk_stubs_init(tcl_ip)
-    Tcl_Interp *tcl_ip;
+ruby_tk_stubs_init(Tcl_Interp *tcl_ip)
 {
     if (Tk_Init(tcl_ip) TCL_ERROR)
         return FAIL_Tk_Init;
@@ -483,8 +474,7 @@
 }
 
 int
-ruby_tk_stubs_safeinit(tcl_ip)
-    Tcl_Interp *tcl_ip;
+ruby_tk_stubs_safeinit(Tcl_Interp *tcl_ip)
 {
 #if TCL_MAJOR_VERSION > 
     if (Tk_SafeInit(tcl_ip) TCL_ERROR)
Index: ext/tk/tcltklib.c
RCS file: /src/ruby/ext/tk/tcltklib.c,v
retrieving revision 1.50
diff -u -r1.50 tcltklib.c
--- ext/tk/tcltklib.c	9 Jun 2006 23:18:03 -0000	1.50
+++ ext/tk/tcltklib.c	20 Jun 2006 15:25:09 -0000
@@ -124,9 +124,7 @@
 
 /* safe Tcl_Eval and Tcl_GlobalEval */
 static int
-tcl_eval(interp, cmd)
-    Tcl_Interp *interp;
-    const char *cmd; /* don't have to be writable */
+tcl_eval(Tcp_Interp interp, const char *cmd)
 {
     char *buf  trdup(cmd);
     const int ret  cl_Eval(interp, buf);
@@ -138,9 +136,7 @@
 #define Tcl_Eval tcl_eval
 
 static int
-tcl_global_eval(interp, cmd)
-    Tcl_Interp *interp;
-    const char *cmd; /* don't have to be writable */
+tcl_global_eval(Tcp_Interp *interp, const char *cmd)
 {
     char *buf  trdup(cmd);
     const int ret  cl_GlobalEval(interp, buf);
Index: ext/zlib/zlib.c
RCS file: /src/ruby/ext/zlib/zlib.c,v
retrieving revision 1.33
diff -u -r1.33 zlib.c
--- ext/zlib/zlib.c	9 Jun 2006 21:20:03 -0000	1.33
+++ ext/zlib/zlib.c	20 Jun 2006 15:25:09 -0000
@@ -478,7 +478,7 @@
 {
     if (NIL_P(z->buf)) {
 	z->buf  b_str_buf_new(len);
-	rb_str_buf_cat(z->buf, (char*)src, len);
+	rb_str_buf_cat(z->buf, (const char*)src, len);
 	z->buf_filled  en;
 	z->stream.next_out  Bytef*)RSTRING(z->buf)->ptr;
 	z->stream.avail_out  ;
@@ -573,11 +573,11 @@
 
     if (NIL_P(z->input)) {
 	z->input  b_str_buf_new(len);
-	rb_str_buf_cat(z->input, (char*)src, len);
+	rb_str_buf_cat(z->input, (const char*)src, len);
 	RBASIC(z->input)->klass  ;
     }
     else {
-	rb_str_buf_cat(z->input, (char*)src, len);
+	rb_str_buf_cat(z->input, (const char*)src, len);
     }
 }
 
@@ -2995,7 +2995,8 @@
     struct gzfile *gz  et_gzfile(obj);
     volatile VALUE rs;
     VALUE dst;
-    char *rsptr, *p, *res;
+    const char *rsptr;
+    char *p, *res;
     long rslen, n;
     int rspara;
 

--5QAgd0e35j3NYeGe--