1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* bignum.c: changed foo _((boo))' to foo(boo)`. [ruby-dev:27056]

* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c,
  gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h,
  node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h,
  rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c,
  util.c, util.h, variable.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2005-09-14 06:32:32 +00:00
parent 6b1239a820
commit 08c1738c51
36 changed files with 826 additions and 816 deletions

View file

@ -1,3 +1,13 @@
Wed Sep 14 15:06:22 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c,
gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h,
node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h,
rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c,
util.c, util.h, variable.c: ditto.
Tue Sep 13 22:09:40 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> Tue Sep 13 22:09:40 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
* lib/logger.rb (Logger): added formatter accessor to logger for * lib/logger.rb (Logger): added formatter accessor to logger for

View file

@ -1739,7 +1739,7 @@ rb_big_xor(VALUE xx, VALUE yy)
return bignorm(z); return bignorm(z);
} }
static VALUE rb_big_rshift _((VALUE,VALUE)); static VALUE rb_big_rshift(VALUE,VALUE);
/* /*
* call-seq: * call-seq:

View file

@ -46,10 +46,10 @@
#define xrealloc ruby_xrealloc #define xrealloc ruby_xrealloc
#define xfree ruby_xfree #define xfree ruby_xfree
void *xmalloc _((long)); void *xmalloc(long);
void *xcalloc _((long,long)); void *xcalloc(long,long);
void *xrealloc _((void*,long)); void *xrealloc(void*,long);
void xfree _((void*)); void xfree(void*);
#if SIZEOF_LONG_LONG > 0 #if SIZEOF_LONG_LONG > 0
# define LONG_LONG long long # define LONG_LONG long long

8
dir.c
View file

@ -56,7 +56,7 @@ char *getenv();
#endif #endif
#ifndef HAVE_STRING_H #ifndef HAVE_STRING_H
char *strchr _((char*,char)); char *strchr(char*,char);
#endif #endif
#include <ctype.h> #include <ctype.h>
@ -351,7 +351,7 @@ free_dir(struct dir_data *dir)
free(dir); free(dir);
} }
static VALUE dir_close _((VALUE)); static VALUE dir_close(VALUE);
static VALUE static VALUE
dir_s_alloc(VALUE klass) dir_s_alloc(VALUE klass)
@ -1104,7 +1104,7 @@ enum answer { YES, NO, UNKNOWN };
#endif #endif
struct glob_args { struct glob_args {
void (*func) _((const char *, VALUE)); void (*func)(const char *, VALUE);
const char *c; const char *c;
VALUE v; VALUE v;
}; };
@ -1329,7 +1329,7 @@ rb_glob2(const char *path, int flags, void (*func) (const char *, VALUE), VALUE
} }
struct rb_glob_args { struct rb_glob_args {
void (*func) _((const char*, VALUE)); void (*func)(const char*, VALUE);
VALUE arg; VALUE arg;
}; };

6
dln.h
View file

@ -29,12 +29,12 @@
# define _(args) () # define _(args) ()
#endif #endif
char *dln_find_exe _((const char*,const char*)); char *dln_find_exe(const char*,const char*);
char *dln_find_file _((const char*,const char*)); char *dln_find_file(const char*,const char*);
#ifdef USE_DLN_A_OUT #ifdef USE_DLN_A_OUT
extern char *dln_argv0; extern char *dln_argv0;
#endif #endif
void *dln_load _((const char*)); void *dln_load(const char*);
#endif #endif

View file

@ -272,7 +272,7 @@ enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv)
ptr->iter = enumerator_iter_i; ptr->iter = enumerator_iter_i;
} }
else { else {
ptr->iter = (VALUE (*) _((VALUE, struct enumerator *)))rb_yield; ptr->iter = (VALUE (*)(VALUE, struct enumerator *))rb_yield;
} }
if (argc) ptr->args = rb_ary_new4(argc, argv); if (argc) ptr->args = rb_ary_new4(argc, argv);

2
env.h
View file

@ -27,7 +27,7 @@ RUBY_EXTERN struct FRAME {
unsigned long uniq; unsigned long uniq;
} *ruby_frame; } *ruby_frame;
void rb_gc_mark_frame _((struct FRAME *)); void rb_gc_mark_frame(struct FRAME *);
#define FRAME_DMETH 1 #define FRAME_DMETH 1
#define FRAME_FUNC 2 #define FRAME_FUNC 2

View file

@ -53,7 +53,7 @@ err_snprintf(char *buf, long len, const char *fmt, va_list args)
} }
} }
static void err_append _((const char*)); static void err_append(const char*);
static void static void
err_print(const char *fmt, va_list args) err_print(const char *fmt, va_list args)
{ {

118
eval.c
View file

@ -66,7 +66,7 @@ void *alloca ();
#include <stdarg.h> #include <stdarg.h>
#ifndef HAVE_STRING_H #ifndef HAVE_STRING_H
char *strrchr _((const char*,const char)); char *strrchr(const char*,const char);
#endif #endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
@ -191,18 +191,18 @@ typedef jmp_buf rb_jmpbuf_t;
VALUE rb_cProc; VALUE rb_cProc;
static VALUE rb_cBinding; static VALUE rb_cBinding;
static VALUE proc_invoke _((VALUE,VALUE,VALUE,VALUE)); static VALUE proc_invoke(VALUE,VALUE,VALUE,VALUE);
static VALUE proc_lambda _((void)); static VALUE proc_lambda(void);
static VALUE rb_f_binding _((VALUE)); static VALUE rb_f_binding(VALUE);
static void rb_f_END _((void)); static void rb_f_END(void);
static VALUE rb_f_block_given_p _((void)); static VALUE rb_f_block_given_p(void);
static VALUE block_pass _((VALUE,NODE*)); static VALUE block_pass(VALUE,NODE*);
static VALUE rb_cMethod; static VALUE rb_cMethod;
static VALUE rb_cUnboundMethod; static VALUE rb_cUnboundMethod;
static VALUE umethod_bind _((VALUE, VALUE)); static VALUE umethod_bind(VALUE, VALUE);
static VALUE rb_mod_define_method _((int, VALUE*, VALUE)); static VALUE rb_mod_define_method(int, VALUE*, VALUE);
NORETURN(static void rb_raise_jump _((VALUE))); NORETURN(static void rb_raise_jump(VALUE));
static VALUE rb_make_exception _((int argc, VALUE *argv)); static VALUE rb_make_exception(int argc, VALUE *argv);
static int scope_vmode; static int scope_vmode;
#define SCOPE_PUBLIC 0 #define SCOPE_PUBLIC 0
@ -223,8 +223,8 @@ int ruby_safe_level = 0;
4 - no global (non-tainted) variable modification/no direct output 4 - no global (non-tainted) variable modification/no direct output
*/ */
static VALUE safe_getter _((void)); static VALUE safe_getter(void);
static void safe_setter _((VALUE val)); static void safe_setter(VALUE val);
void void
rb_secure(int level) rb_secure(int level)
@ -271,7 +271,7 @@ rb_check_safe_str(VALUE x)
} }
} }
NORETURN(static void print_undef _((VALUE, ID))); NORETURN(static void print_undef(VALUE, ID));
static void static void
print_undef(VALUE klass, ID id) print_undef(VALUE klass, ID id)
{ {
@ -987,7 +987,7 @@ static NODE *top_cref;
typedef struct thread * rb_thread_t; typedef struct thread * rb_thread_t;
static rb_thread_t curr_thread = 0; static rb_thread_t curr_thread = 0;
static rb_thread_t main_thread; static rb_thread_t main_thread;
static void scope_dup _((struct SCOPE *)); static void scope_dup(struct SCOPE *);
#define POP_SCOPE() \ #define POP_SCOPE() \
if (ruby_scope->flags & SCOPE_DONT_RECYCLE) {\ if (ruby_scope->flags & SCOPE_DONT_RECYCLE) {\
@ -1016,8 +1016,8 @@ struct ruby_env {
NODE *cref; NODE *cref;
}; };
static void push_thread_anchor _((struct ruby_env *)); static void push_thread_anchor(struct ruby_env *);
static void pop_thread_anchor _((struct ruby_env *)); static void pop_thread_anchor(struct ruby_env *);
#define PUSH_THREAD_TAG() PUSH_TAG(PROT_THREAD); \ #define PUSH_THREAD_TAG() PUSH_TAG(PROT_THREAD); \
do { \ do { \
@ -1028,11 +1028,11 @@ static void pop_thread_anchor _((struct ruby_env *));
} while (0); \ } while (0); \
POP_TAG() POP_TAG()
static VALUE rb_eval _((VALUE,NODE*)); static VALUE rb_eval(VALUE,NODE*);
static VALUE eval _((VALUE,VALUE,VALUE,char*,int)); static VALUE eval(VALUE,VALUE,VALUE,char*,int);
static NODE *compile _((VALUE, char*, int)); static NODE *compile(VALUE, char*, int);
static VALUE rb_yield_0 _((VALUE, VALUE, VALUE, int, int)); static VALUE rb_yield_0(VALUE, VALUE, VALUE, int, int);
#define YIELD_LAMBDA_CALL 1 #define YIELD_LAMBDA_CALL 1
#define YIELD_PROC_CALL 2 #define YIELD_PROC_CALL 2
@ -1040,12 +1040,12 @@ static VALUE rb_yield_0 _((VALUE, VALUE, VALUE, int, int));
#define YIELD_FUNC_AVALUE 1 #define YIELD_FUNC_AVALUE 1
#define YIELD_FUNC_SVALUE 2 #define YIELD_FUNC_SVALUE 2
static VALUE rb_call _((VALUE,VALUE,ID,int,const VALUE*,int)); static VALUE rb_call(VALUE,VALUE,ID,int,const VALUE*,int);
static VALUE module_setup _((VALUE,NODE*)); static VALUE module_setup(VALUE,NODE*);
static VALUE massign _((VALUE,NODE*,VALUE,int)); static VALUE massign(VALUE,NODE*,VALUE,int);
static void assign _((VALUE,NODE*,VALUE,int)); static void assign(VALUE,NODE*,VALUE,int);
static int formal_assign _((VALUE, NODE*, int, const VALUE*, VALUE*)); static int formal_assign(VALUE, NODE*, int, const VALUE*, VALUE*);
typedef struct event_hook { typedef struct event_hook {
rb_event_hook_func_t func; rb_event_hook_func_t func;
@ -1067,7 +1067,7 @@ static rb_event_hook_t *event_hooks;
static VALUE trace_func = 0; static VALUE trace_func = 0;
static int tracing = 0; static int tracing = 0;
static void call_trace_func _((rb_event_t,NODE*,VALUE,ID,VALUE)); static void call_trace_func(rb_event_t,NODE*,VALUE,ID,VALUE);
#if 0 #if 0
#define SET_CURRENT_SOURCE() (ruby_sourcefile = ruby_current_node->nd_file, \ #define SET_CURRENT_SOURCE() (ruby_sourcefile = ruby_current_node->nd_file, \
@ -1247,10 +1247,10 @@ extern char **environ;
#endif #endif
char **rb_origenviron; char **rb_origenviron;
void rb_call_inits _((void)); void rb_call_inits(void);
void Init_stack _((VALUE*)); void Init_stack(VALUE*);
void Init_heap _((void)); void Init_heap(void);
void Init_ext _((void)); void Init_ext(void);
#ifdef HAVE_NATIVETHREAD #ifdef HAVE_NATIVETHREAD
static rb_nativethread_t ruby_thid; static rb_nativethread_t ruby_thid;
@ -1270,7 +1270,7 @@ ruby_native_thread_kill(sig)
# endif # endif
#endif #endif
NORETURN(static void rb_thread_start_1 _((void))); NORETURN(static void rb_thread_start_1(void));
void void
ruby_init(void) ruby_init(void)
@ -1344,8 +1344,8 @@ eval_node(VALUE self, NODE *node)
int ruby_in_eval; int ruby_in_eval;
static void rb_thread_cleanup _((void)); static void rb_thread_cleanup(void);
static void rb_thread_wait_other_threads _((void)); static void rb_thread_wait_other_threads(void);
static int thread_set_raised(void); static int thread_set_raised(void);
static int thread_reset_raised(void); static int thread_reset_raised(void);
@ -1440,7 +1440,7 @@ ruby_options(int argc, char **argv)
POP_THREAD_TAG(); POP_THREAD_TAG();
} }
void rb_exec_end_proc _((void)); void rb_exec_end_proc(void);
static void static void
ruby_finalize_0(void) ruby_finalize_0(void)
@ -1679,7 +1679,7 @@ localjump_reason(VALUE exc)
return rb_iv_get(exc, "@reason"); return rb_iv_get(exc, "@reason");
} }
NORETURN(static void jump_tag_but_local_jump _((int,VALUE))); NORETURN(static void jump_tag_but_local_jump(int,VALUE));
static void static void
jump_tag_but_local_jump(int state, VALUE val) jump_tag_but_local_jump(int state, VALUE val)
{ {
@ -2163,7 +2163,7 @@ copy_node_scope(NODE *node, NODE *rval)
#define MATCH_DATA *rb_svar(node->nd_cnt) #define MATCH_DATA *rb_svar(node->nd_cnt)
static const char* is_defined _((VALUE, NODE*, char*, int)); static const char* is_defined(VALUE, NODE*, char*, int);
static char* static char*
arg_defined(VALUE self, NODE *node, char *buf, char *type) arg_defined(VALUE self, NODE *node, char *buf, char *type)
@ -2366,7 +2366,7 @@ is_defined(VALUE self, NODE *node /* OK */, char *buf, int noeval)
return 0; return 0;
} }
static int handle_rescue _((VALUE,NODE*)); static int handle_rescue(VALUE,NODE*);
static void blk_free(struct BLOCK *data); static void blk_free(struct BLOCK *data);
@ -2686,9 +2686,9 @@ class_prefix(VALUE self, NODE *cpath)
}\ }\
} while (0) } while (0)
NORETURN(static void return_jump _((VALUE))); NORETURN(static void return_jump(VALUE));
NORETURN(static void break_jump _((VALUE))); NORETURN(static void break_jump(VALUE));
NORETURN(static void unknown_node _((NODE * volatile))); NORETURN(static void unknown_node(NODE * volatile));
static void static void
unknown_node(NODE *volatile node) unknown_node(NODE *volatile node)
@ -4202,7 +4202,7 @@ rb_mod_protected_method_defined(VALUE mod, VALUE mid)
return Qfalse; return Qfalse;
} }
NORETURN(static VALUE terminate_process _((int, VALUE))); NORETURN(static VALUE terminate_process(int, VALUE));
static VALUE static VALUE
terminate_process(int status, VALUE mesg) terminate_process(int status, VALUE mesg)
{ {
@ -4331,8 +4331,8 @@ rb_iter_break(void)
break_jump(Qnil); break_jump(Qnil);
} }
NORETURN(static void rb_longjmp _((int, VALUE))); NORETURN(static void rb_longjmp(int, VALUE));
static VALUE make_backtrace _((void)); static VALUE make_backtrace(void);
static void static void
rb_longjmp(int tag, VALUE mesg) rb_longjmp(int tag, VALUE mesg)
@ -4631,8 +4631,8 @@ break_jump(VALUE retval)
localjump_error("unexpected break", retval, TAG_BREAK); localjump_error("unexpected break", retval, TAG_BREAK);
} }
static VALUE bmcall _((VALUE, VALUE)); static VALUE bmcall(VALUE, VALUE);
static int method_arity _((VALUE)); static int method_arity(VALUE);
void void
rb_need_block(void) rb_need_block(void)
@ -6453,7 +6453,7 @@ rb_mod_module_eval(int argc, VALUE *argv, VALUE mod)
VALUE rb_load_path; VALUE rb_load_path;
NORETURN(static void load_failed _((VALUE))); NORETURN(static void load_failed(VALUE));
void void
rb_load(VALUE fname, int wrap) rb_load(VALUE fname, int wrap)
@ -6649,7 +6649,7 @@ static const char *const loadable_ext[] = {
0 0
}; };
static int search_required _((VALUE, VALUE *)); static int search_required(VALUE, VALUE *);
int int
rb_provided(const char *feature) rb_provided(const char *feature)
@ -7368,8 +7368,8 @@ rb_f_local_variables(void)
return ary; return ary;
} }
static VALUE rb_f_catch _((VALUE,VALUE)); static VALUE rb_f_catch(VALUE,VALUE);
NORETURN(static VALUE rb_f_throw _((int,VALUE*))); NORETURN(static VALUE rb_f_throw(int,VALUE*));
struct end_proc_data { struct end_proc_data {
void (*func)(); void (*func)();
@ -9750,7 +9750,7 @@ thread_reset_raised(void)
return 1; return 1;
} }
static void rb_thread_ready _((rb_thread_t)); static void rb_thread_ready(rb_thread_t);
static VALUE static VALUE
run_trap_eval(VALUE arg) run_trap_eval(VALUE arg)
@ -9964,7 +9964,7 @@ rb_thread_check(VALUE data)
return (rb_thread_t)RDATA(data)->data; return (rb_thread_t)RDATA(data)->data;
} }
static VALUE rb_thread_raise _((int, VALUE*, rb_thread_t)); static VALUE rb_thread_raise(int, VALUE*, rb_thread_t);
static VALUE th_raise_exception; static VALUE th_raise_exception;
static NODE *th_raise_node; static NODE *th_raise_node;
@ -10096,8 +10096,8 @@ rb_thread_switch(int n)
(rb_thread_save_context(th),\ (rb_thread_save_context(th),\
rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp((th)->context)))) rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp((th)->context))))
NORETURN(static void rb_thread_restore_context _((rb_thread_t,int))); NORETURN(static void rb_thread_restore_context(rb_thread_t,int));
NOINLINE(static void stack_extend _((rb_thread_t, int))); NOINLINE(static void stack_extend(rb_thread_t, int));
static void static void
stack_extend(rb_thread_t th, int exit) stack_extend(rb_thread_t th, int exit)
@ -10237,7 +10237,7 @@ rb_thread_fd_close(int fd)
END_FOREACH(th); END_FOREACH(th);
} }
NORETURN(static void rb_thread_main_jump _((VALUE, int))); NORETURN(static void rb_thread_main_jump(VALUE, int));
static void static void
rb_thread_main_jump(VALUE err, int tag) rb_thread_main_jump(VALUE err, int tag)
{ {
@ -10247,7 +10247,7 @@ rb_thread_main_jump(VALUE err, int tag)
rb_thread_restore_context(main_thread, tag); rb_thread_restore_context(main_thread, tag);
} }
NORETURN(static void rb_thread_deadlock _((void))); NORETURN(static void rb_thread_deadlock(void));
static void static void
rb_thread_deadlock(void) rb_thread_deadlock(void)
{ {
@ -10677,7 +10677,7 @@ rb_thread_wait_for(struct timeval time)
rb_thread_schedule(); rb_thread_schedule();
} }
void rb_thread_sleep_forever _((void)); void rb_thread_sleep_forever(void);
int int
rb_thread_alone(void) rb_thread_alone(void)
@ -11526,8 +11526,8 @@ rb_thread_stop_timer()
int rb_thread_tick = THREAD_TICK; int rb_thread_tick = THREAD_TICK;
#endif #endif
NORETURN(static void rb_thread_terminated _((rb_thread_t, int, enum thread_status))); NORETURN(static void rb_thread_terminated(rb_thread_t, int, enum thread_status));
static VALUE rb_thread_yield _((VALUE, rb_thread_t)); static VALUE rb_thread_yield(VALUE, rb_thread_t);
static void static void
push_thread_anchor(struct ruby_env *ip) push_thread_anchor(struct ruby_env *ip)

12
file.c
View file

@ -29,7 +29,7 @@
#ifdef HAVE_SYS_FILE_H #ifdef HAVE_SYS_FILE_H
# include <sys/file.h> # include <sys/file.h>
#else #else
int flock _((int, int)); int flock(int, int);
#endif #endif
#ifdef HAVE_SYS_PARAM_H #ifdef HAVE_SYS_PARAM_H
@ -41,7 +41,7 @@ int flock _((int, int));
#include <time.h> #include <time.h>
VALUE rb_time_new _((time_t, time_t)); VALUE rb_time_new(time_t, time_t);
#ifdef HAVE_UTIME_H #ifdef HAVE_UTIME_H
#include <utime.h> #include <utime.h>
@ -54,7 +54,7 @@ VALUE rb_time_new _((time_t, time_t));
#endif #endif
#ifndef HAVE_STRING_H #ifndef HAVE_STRING_H
char *strrchr _((const char*,const char)); char *strrchr(const char*,const char);
#endif #endif
#include <sys/types.h> #include <sys/types.h>
@ -1889,7 +1889,7 @@ rb_file_s_utime(int argc, VALUE *argv)
#endif #endif
NORETURN(static void sys_fail2 _((VALUE,VALUE))); NORETURN(static void sys_fail2(VALUE,VALUE));
static void static void
sys_fail2(VALUE s1, VALUE s2) sys_fail2(VALUE s1, VALUE s2)
{ {
@ -2262,7 +2262,7 @@ rb_path_end(const char *path)
#define TOLOWER(c) (ISUPPER(c) ? tolower(c) : (c)) #define TOLOWER(c) (ISUPPER(c) ? tolower(c) : (c))
#endif #endif
static int is_absolute_path _((const char*)); static int is_absolute_path(const char*);
static VALUE static VALUE
file_expand_path(VALUE fname, VALUE dname, VALUE result) file_expand_path(VALUE fname, VALUE dname, VALUE result)
@ -2690,7 +2690,7 @@ rb_file_s_split(VALUE klass, VALUE path)
static VALUE separator; static VALUE separator;
static VALUE rb_file_join _((VALUE ary, VALUE sep)); static VALUE rb_file_join(VALUE ary, VALUE sep);
static VALUE static VALUE
file_inspect_join(VALUE ary, VALUE *arg, int recur) file_inspect_join(VALUE ary, VALUE *arg, int recur)

10
gc.c
View file

@ -52,7 +52,7 @@ extern unsigned long __libc_ia64_register_backing_store_base;
#include <windows.h> #include <windows.h>
#endif #endif
int rb_io_fptr_finalize _((struct OpenFile*)); int rb_io_fptr_finalize(struct OpenFile*);
#if !defined(setjmp) && defined(HAVE__SETJMP) #if !defined(setjmp) && defined(HAVE__SETJMP)
#define setjmp(env) _setjmp(env) #define setjmp(env) _setjmp(env)
@ -417,7 +417,7 @@ static unsigned int STACK_LEVEL_MAX = 655300;
# define STACK_LEVEL_MAX 655300 # define STACK_LEVEL_MAX 655300
#endif #endif
NOINLINE(static void set_stack_end _((VALUE **stack_end_p))); NOINLINE(static void set_stack_end(VALUE **stack_end_p));
static void static void
set_stack_end(VALUE **stack_end_p) set_stack_end(VALUE **stack_end_p)
@ -534,8 +534,8 @@ sweep_source_filename(char *key, char *value)
} }
} }
static void gc_mark _((VALUE ptr, int lev)); static void gc_mark(VALUE ptr, int lev);
static void gc_mark_children _((VALUE ptr, int lev)); static void gc_mark_children(VALUE ptr, int lev);
static void static void
gc_mark_all(void) gc_mark_all(void)
@ -952,7 +952,7 @@ gc_mark_children(VALUE ptr, int lev)
} }
} }
static void obj_free _((VALUE)); static void obj_free(VALUE);
static void static void
finalize_list(RVALUE *p) finalize_list(RVALUE *p)

2
hash.c
View file

@ -196,7 +196,7 @@ rb_hash_foreach(VALUE hash, int (*func) (/* ??? */), VALUE farg)
rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash); rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash);
} }
static VALUE hash_alloc _((VALUE)); static VALUE hash_alloc(VALUE);
static VALUE static VALUE
hash_alloc(VALUE klass) hash_alloc(VALUE klass)

68
inits.c
View file

@ -12,40 +12,40 @@
#include "ruby.h" #include "ruby.h"
void Init_Array _((void)); void Init_Array(void);
void Init_Bignum _((void)); void Init_Bignum(void);
void Init_Binding _((void)); void Init_Binding(void);
void Init_Comparable _((void)); void Init_Comparable(void);
void Init_Dir _((void)); void Init_Dir(void);
void Init_Enumerable _((void)); void Init_Enumerable(void);
void Init_Enumerator _((void)); void Init_Enumerator(void);
void Init_Exception _((void)); void Init_Exception(void);
void Init_syserr _((void)); void Init_syserr(void);
void Init_eval _((void)); void Init_eval(void);
void Init_load _((void)); void Init_load(void);
void Init_Proc _((void)); void Init_Proc(void);
void Init_Thread _((void)); void Init_Thread(void);
void Init_File _((void)); void Init_File(void);
void Init_GC _((void)); void Init_GC(void);
void Init_Hash _((void)); void Init_Hash(void);
void Init_IO _((void)); void Init_IO(void);
void Init_Math _((void)); void Init_Math(void);
void Init_marshal _((void)); void Init_marshal(void);
void Init_Numeric _((void)); void Init_Numeric(void);
void Init_Object _((void)); void Init_Object(void);
void Init_pack _((void)); void Init_pack(void);
void Init_Precision _((void)); void Init_Precision(void);
void Init_sym _((void)); void Init_sym(void);
void Init_process _((void)); void Init_process(void);
void Init_Random _((void)); void Init_Random(void);
void Init_Range _((void)); void Init_Range(void);
void Init_Regexp _((void)); void Init_Regexp(void);
void Init_signal _((void)); void Init_signal(void);
void Init_String _((void)); void Init_String(void);
void Init_Struct _((void)); void Init_Struct(void);
void Init_Time _((void)); void Init_Time(void);
void Init_var_tables _((void)); void Init_var_tables(void);
void Init_version _((void)); void Init_version(void);
void void
rb_call_inits(void) rb_call_inits(void)

916
intern.h
View file

@ -29,120 +29,120 @@
#define ID_ALLOCATOR 1 #define ID_ALLOCATOR 1
/* array.c */ /* array.c */
void rb_mem_clear _((register VALUE*, register long)); void rb_mem_clear(register VALUE*, register long);
VALUE rb_assoc_new _((VALUE, VALUE)); VALUE rb_assoc_new(VALUE, VALUE);
VALUE rb_check_array_type _((VALUE)); VALUE rb_check_array_type(VALUE);
VALUE rb_ary_new _((void)); VALUE rb_ary_new(void);
VALUE rb_ary_new2 _((long)); VALUE rb_ary_new2(long);
VALUE rb_ary_new3 __((long,...)); VALUE rb_ary_new3(long,...);
VALUE rb_ary_new4 _((long, const VALUE *)); VALUE rb_ary_new4(long, const VALUE *);
VALUE rb_values_new __((long,...)); VALUE rb_values_new(long,...);
VALUE rb_values_new2 _((long, const VALUE *)); VALUE rb_values_new2(long, const VALUE *);
VALUE rb_values_from_ary _((VALUE)); VALUE rb_values_from_ary(VALUE);
VALUE rb_ary_from_values _((VALUE)); VALUE rb_ary_from_values(VALUE);
VALUE rb_ary_freeze _((VALUE)); VALUE rb_ary_freeze(VALUE);
VALUE rb_ary_aref _((int, VALUE*, VALUE)); VALUE rb_ary_aref(int, VALUE*, VALUE);
void rb_ary_store _((VALUE, long, VALUE)); void rb_ary_store(VALUE, long, VALUE);
VALUE rb_ary_dup _((VALUE)); VALUE rb_ary_dup(VALUE);
VALUE rb_ary_to_ary _((VALUE)); VALUE rb_ary_to_ary(VALUE);
VALUE rb_ary_to_s _((VALUE)); VALUE rb_ary_to_s(VALUE);
VALUE rb_ary_push _((VALUE, VALUE)); VALUE rb_ary_push(VALUE, VALUE);
VALUE rb_ary_pop _((VALUE)); VALUE rb_ary_pop(VALUE);
VALUE rb_ary_shift _((VALUE)); VALUE rb_ary_shift(VALUE);
VALUE rb_ary_unshift _((VALUE, VALUE)); VALUE rb_ary_unshift(VALUE, VALUE);
VALUE rb_ary_entry _((VALUE, long)); VALUE rb_ary_entry(VALUE, long);
VALUE rb_ary_each _((VALUE)); VALUE rb_ary_each(VALUE);
VALUE rb_ary_join _((VALUE, VALUE)); VALUE rb_ary_join(VALUE, VALUE);
VALUE rb_ary_print_on _((VALUE, VALUE)); VALUE rb_ary_print_on(VALUE, VALUE);
VALUE rb_ary_reverse _((VALUE)); VALUE rb_ary_reverse(VALUE);
VALUE rb_ary_sort _((VALUE)); VALUE rb_ary_sort(VALUE);
VALUE rb_ary_sort_bang _((VALUE)); VALUE rb_ary_sort_bang(VALUE);
VALUE rb_ary_delete _((VALUE, VALUE)); VALUE rb_ary_delete(VALUE, VALUE);
VALUE rb_ary_delete_at _((VALUE, long)); VALUE rb_ary_delete_at(VALUE, long);
VALUE rb_ary_clear _((VALUE)); VALUE rb_ary_clear(VALUE);
VALUE rb_ary_plus _((VALUE, VALUE)); VALUE rb_ary_plus(VALUE, VALUE);
VALUE rb_ary_concat _((VALUE, VALUE)); VALUE rb_ary_concat(VALUE, VALUE);
VALUE rb_ary_assoc _((VALUE, VALUE)); VALUE rb_ary_assoc(VALUE, VALUE);
VALUE rb_ary_rassoc _((VALUE, VALUE)); VALUE rb_ary_rassoc(VALUE, VALUE);
VALUE rb_ary_includes _((VALUE, VALUE)); VALUE rb_ary_includes(VALUE, VALUE);
VALUE rb_ary_cmp _((VALUE, VALUE)); VALUE rb_ary_cmp(VALUE, VALUE);
VALUE rb_check_array_value _((VALUE)); VALUE rb_check_array_value(VALUE);
VALUE rb_get_values_at _((VALUE, long, int, VALUE*, VALUE(*) _((VALUE,long)))); VALUE rb_get_values_at(VALUE, long, int, VALUE*, VALUE(*)(VALUE,long));
/* bignum.c */ /* bignum.c */
VALUE rb_big_clone _((VALUE)); VALUE rb_big_clone(VALUE);
void rb_big_2comp _((VALUE)); void rb_big_2comp(VALUE);
VALUE rb_big_norm _((VALUE)); VALUE rb_big_norm(VALUE);
VALUE rb_uint2big _((unsigned long)); VALUE rb_uint2big(unsigned long);
VALUE rb_int2big _((long)); VALUE rb_int2big(long);
VALUE rb_uint2inum _((unsigned long)); VALUE rb_uint2inum(unsigned long);
VALUE rb_int2inum _((long)); VALUE rb_int2inum(long);
VALUE rb_cstr_to_inum _((const char*, int, int)); VALUE rb_cstr_to_inum(const char*, int, int);
VALUE rb_str_to_inum _((VALUE, int, int)); VALUE rb_str_to_inum(VALUE, int, int);
VALUE rb_cstr2inum _((const char*, int)); VALUE rb_cstr2inum(const char*, int);
VALUE rb_str2inum _((VALUE, int)); VALUE rb_str2inum(VALUE, int);
VALUE rb_big2str _((VALUE, int)); VALUE rb_big2str(VALUE, int);
long rb_big2long _((VALUE)); long rb_big2long(VALUE);
#define rb_big2int(x) rb_big2long(x) #define rb_big2int(x) rb_big2long(x)
unsigned long rb_big2ulong _((VALUE)); unsigned long rb_big2ulong(VALUE);
#define rb_big2uint(x) rb_big2ulong(x) #define rb_big2uint(x) rb_big2ulong(x)
#if HAVE_LONG_LONG #if HAVE_LONG_LONG
VALUE rb_ll2inum _((LONG_LONG)); VALUE rb_ll2inum(LONG_LONG);
VALUE rb_ull2inum _((unsigned LONG_LONG)); VALUE rb_ull2inum(unsigned LONG_LONG);
LONG_LONG rb_big2ll _((VALUE)); LONG_LONG rb_big2ll(VALUE);
unsigned LONG_LONG rb_big2ull _((VALUE)); unsigned LONG_LONG rb_big2ull(VALUE);
#endif /* HAVE_LONG_LONG */ #endif /* HAVE_LONG_LONG */
void rb_quad_pack _((char*,VALUE)); void rb_quad_pack(char*,VALUE);
VALUE rb_quad_unpack _((const char*,int)); VALUE rb_quad_unpack(const char*,int);
VALUE rb_dbl2big _((double)); VALUE rb_dbl2big(double);
double rb_big2dbl _((VALUE)); double rb_big2dbl(VALUE);
VALUE rb_big_cmp _((VALUE, VALUE)); VALUE rb_big_cmp(VALUE, VALUE);
VALUE rb_big_eq _((VALUE, VALUE)); VALUE rb_big_eq(VALUE, VALUE);
VALUE rb_big_plus _((VALUE, VALUE)); VALUE rb_big_plus(VALUE, VALUE);
VALUE rb_big_minus _((VALUE, VALUE)); VALUE rb_big_minus(VALUE, VALUE);
VALUE rb_big_mul _((VALUE, VALUE)); VALUE rb_big_mul(VALUE, VALUE);
VALUE rb_big_div _((VALUE, VALUE)); VALUE rb_big_div(VALUE, VALUE);
VALUE rb_big_modulo _((VALUE, VALUE)); VALUE rb_big_modulo(VALUE, VALUE);
VALUE rb_big_divmod _((VALUE, VALUE)); VALUE rb_big_divmod(VALUE, VALUE);
VALUE rb_big_pow _((VALUE, VALUE)); VALUE rb_big_pow(VALUE, VALUE);
VALUE rb_big_and _((VALUE, VALUE)); VALUE rb_big_and(VALUE, VALUE);
VALUE rb_big_or _((VALUE, VALUE)); VALUE rb_big_or(VALUE, VALUE);
VALUE rb_big_xor _((VALUE, VALUE)); VALUE rb_big_xor(VALUE, VALUE);
VALUE rb_big_lshift _((VALUE, VALUE)); VALUE rb_big_lshift(VALUE, VALUE);
VALUE rb_big_rand _((VALUE, double*)); VALUE rb_big_rand(VALUE, double*);
/* class.c */ /* class.c */
VALUE rb_class_boot _((VALUE)); VALUE rb_class_boot(VALUE);
VALUE rb_class_new _((VALUE)); VALUE rb_class_new(VALUE);
VALUE rb_mod_init_copy _((VALUE, VALUE)); VALUE rb_mod_init_copy(VALUE, VALUE);
VALUE rb_class_init_copy _((VALUE, VALUE)); VALUE rb_class_init_copy(VALUE, VALUE);
VALUE rb_singleton_class_clone _((VALUE)); VALUE rb_singleton_class_clone(VALUE);
void rb_singleton_class_attached _((VALUE,VALUE)); void rb_singleton_class_attached(VALUE,VALUE);
VALUE rb_make_metaclass _((VALUE, VALUE)); VALUE rb_make_metaclass(VALUE, VALUE);
void rb_check_inheritable _((VALUE)); void rb_check_inheritable(VALUE);
VALUE rb_class_inherited _((VALUE, VALUE)); VALUE rb_class_inherited(VALUE, VALUE);
VALUE rb_define_class_id _((ID, VALUE)); VALUE rb_define_class_id(ID, VALUE);
VALUE rb_module_new _((void)); VALUE rb_module_new(void);
VALUE rb_define_module_id _((ID)); VALUE rb_define_module_id(ID);
VALUE rb_mod_included_modules _((VALUE)); VALUE rb_mod_included_modules(VALUE);
VALUE rb_mod_include_p _((VALUE, VALUE)); VALUE rb_mod_include_p(VALUE, VALUE);
VALUE rb_mod_ancestors _((VALUE)); VALUE rb_mod_ancestors(VALUE);
VALUE rb_class_instance_methods _((int, VALUE*, VALUE)); VALUE rb_class_instance_methods(int, VALUE*, VALUE);
VALUE rb_class_public_instance_methods _((int, VALUE*, VALUE)); VALUE rb_class_public_instance_methods(int, VALUE*, VALUE);
VALUE rb_class_protected_instance_methods _((int, VALUE*, VALUE)); VALUE rb_class_protected_instance_methods(int, VALUE*, VALUE);
VALUE rb_class_private_instance_methods _((int, VALUE*, VALUE)); VALUE rb_class_private_instance_methods(int, VALUE*, VALUE);
VALUE rb_obj_singleton_methods _((int, VALUE*, VALUE)); VALUE rb_obj_singleton_methods(int, VALUE*, VALUE);
void rb_define_method_id _((VALUE, ID, VALUE (*)(ANYARGS), int)); void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
void rb_frozen_class_p _((VALUE)); void rb_frozen_class_p(VALUE);
void rb_undef _((VALUE, ID)); void rb_undef(VALUE, ID);
void rb_define_protected_method _((VALUE, const char*, VALUE (*)(ANYARGS), int)); void rb_define_protected_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
void rb_define_private_method _((VALUE, const char*, VALUE (*)(ANYARGS), int)); void rb_define_private_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
void rb_define_singleton_method _((VALUE, const char*, VALUE(*)(ANYARGS), int)); void rb_define_singleton_method(VALUE, const char*, VALUE(*)(ANYARGS), int);
VALUE rb_singleton_class _((VALUE)); VALUE rb_singleton_class(VALUE);
/* compar.c */ /* compar.c */
int rb_cmpint _((VALUE, VALUE, VALUE)); int rb_cmpint(VALUE, VALUE, VALUE);
NORETURN(void rb_cmperr _((VALUE, VALUE))); NORETURN(void rb_cmperr(VALUE, VALUE));
/* enum.c */ /* enum.c */
/* enumerator.c */ /* enumerator.c */
VALUE rb_enumeratorize _((VALUE, VALUE, int, VALUE *)); VALUE rb_enumeratorize(VALUE, VALUE, int, VALUE *);
#define RETURN_ENUMERATOR(obj, argc, argv) do { \ #define RETURN_ENUMERATOR(obj, argc, argv) do { \
if (!rb_block_given_p()) \ if (!rb_block_given_p()) \
return rb_enumeratorize(obj, ID2SYM(rb_frame_this_func()), \ return rb_enumeratorize(obj, ID2SYM(rb_frame_this_func()), \
@ -150,17 +150,17 @@ VALUE rb_enumeratorize _((VALUE, VALUE, int, VALUE *));
} while (0) } while (0)
/* error.c */ /* error.c */
RUBY_EXTERN int ruby_nerrs; RUBY_EXTERN int ruby_nerrs;
VALUE rb_exc_new _((VALUE, const char*, long)); VALUE rb_exc_new(VALUE, const char*, long);
VALUE rb_exc_new2 _((VALUE, const char*)); VALUE rb_exc_new2(VALUE, const char*);
VALUE rb_exc_new3 _((VALUE, VALUE)); VALUE rb_exc_new3(VALUE, VALUE);
PRINTF_ARGS(NORETURN(void rb_loaderror __((const char*, ...))), 1, 2); PRINTF_ARGS(NORETURN(void rb_loaderror(const char*, ...)), 1, 2);
PRINTF_ARGS(NORETURN(void rb_name_error __((ID, const char*, ...))), 2, 3); PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3);
NORETURN(void rb_invalid_str _((const char*, const char*))); NORETURN(void rb_invalid_str(const char*, const char*));
PRINTF_ARGS(void rb_compile_error __((const char*, ...)), 1, 2); PRINTF_ARGS(void rb_compile_error(const char*, ...), 1, 2);
PRINTF_ARGS(void rb_compile_error_append __((const char*, ...)), 1, 2); PRINTF_ARGS(void rb_compile_error_append(const char*, ...), 1, 2);
NORETURN(void rb_load_fail _((const char*))); NORETURN(void rb_load_fail(const char*));
NORETURN(void rb_error_frozen _((const char*))); NORETURN(void rb_error_frozen(const char*));
void rb_check_frozen _((VALUE)); void rb_check_frozen(VALUE);
/* eval.c */ /* eval.c */
#ifdef NFDBITS #ifdef NFDBITS
typedef struct { typedef struct {
@ -170,14 +170,14 @@ typedef struct {
#define HAVE_RB_FD_INIT 1 #define HAVE_RB_FD_INIT 1
void rb_fd_init _((volatile rb_fdset_t *)); void rb_fd_init(volatile rb_fdset_t *);
void rb_fd_term _((rb_fdset_t *)); void rb_fd_term(rb_fdset_t *);
void rb_fd_zero _((rb_fdset_t *)); void rb_fd_zero(rb_fdset_t *);
void rb_fd_set _((int, rb_fdset_t *)); void rb_fd_set(int, rb_fdset_t *);
void rb_fd_clr _((int, rb_fdset_t *)); void rb_fd_clr(int, rb_fdset_t *);
int rb_fd_isset _((int, const rb_fdset_t *)); int rb_fd_isset(int, const rb_fdset_t *);
void rb_fd_copy _((rb_fdset_t *, const fd_set *, int)); void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
int rb_fd_select _((int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *)); int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
#define rb_fd_ptr(f) ((f)->fdset) #define rb_fd_ptr(f) ((f)->fdset)
#define rb_fd_max(f) ((f)->maxfd) #define rb_fd_max(f) ((f)->maxfd)
@ -199,132 +199,132 @@ typedef fd_set rb_fdset_t;
#endif #endif
RUBY_EXTERN struct RNode *ruby_current_node; RUBY_EXTERN struct RNode *ruby_current_node;
void ruby_set_current_source _((void)); void ruby_set_current_source(void);
NORETURN(void rb_exc_raise _((VALUE))); NORETURN(void rb_exc_raise(VALUE));
NORETURN(void rb_exc_fatal _((VALUE))); NORETURN(void rb_exc_fatal(VALUE));
VALUE rb_f_exit _((int,VALUE*)); VALUE rb_f_exit(int,VALUE*);
VALUE rb_f_abort _((int,VALUE*)); VALUE rb_f_abort(int,VALUE*);
void rb_remove_method _((VALUE, const char*)); void rb_remove_method(VALUE, const char*);
#define rb_disable_super(klass, name) ((void)0) #define rb_disable_super(klass, name) ((void)0)
#define rb_enable_super(klass, name) ((void)0) #define rb_enable_super(klass, name) ((void)0)
#define HAVE_RB_DEFINE_ALLOC_FUNC 1 #define HAVE_RB_DEFINE_ALLOC_FUNC 1
void rb_define_alloc_func _((VALUE, VALUE (*)(VALUE))); void rb_define_alloc_func(VALUE, VALUE (*)(VALUE));
void rb_undef_alloc_func _((VALUE)); void rb_undef_alloc_func(VALUE);
void rb_clear_cache _((void)); void rb_clear_cache(void);
void rb_clear_cache_by_class _((VALUE)); void rb_clear_cache_by_class(VALUE);
void rb_alias _((VALUE, ID, ID)); void rb_alias(VALUE, ID, ID);
void rb_attr _((VALUE,ID,int,int,int)); void rb_attr(VALUE,ID,int,int,int);
int rb_method_boundp _((VALUE, ID, int)); int rb_method_boundp(VALUE, ID, int);
VALUE rb_dvar_defined _((ID)); VALUE rb_dvar_defined(ID);
VALUE rb_dvar_curr _((ID)); VALUE rb_dvar_curr(ID);
VALUE rb_dvar_ref _((ID)); VALUE rb_dvar_ref(ID);
void rb_dvar_asgn _((ID, VALUE)); void rb_dvar_asgn(ID, VALUE);
void rb_dvar_push _((ID, VALUE)); void rb_dvar_push(ID, VALUE);
VALUE *rb_svar _((int)); VALUE *rb_svar(int);
VALUE rb_eval_cmd _((VALUE, VALUE, int)); VALUE rb_eval_cmd(VALUE, VALUE, int);
int rb_respond_to _((VALUE, ID)); int rb_respond_to(VALUE, ID);
void rb_interrupt _((void)); void rb_interrupt(void);
VALUE rb_apply _((VALUE, ID, VALUE)); VALUE rb_apply(VALUE, ID, VALUE);
void rb_backtrace _((void)); void rb_backtrace(void);
ID rb_frame_this_func _((void)); ID rb_frame_this_func(void);
VALUE rb_obj_instance_eval _((int, VALUE*, VALUE)); VALUE rb_obj_instance_eval(int, VALUE*, VALUE);
VALUE rb_mod_module_eval _((int, VALUE*, VALUE)); VALUE rb_mod_module_eval(int, VALUE*, VALUE);
void rb_load _((VALUE, int)); void rb_load(VALUE, int);
void rb_load_protect _((VALUE, int, int*)); void rb_load_protect(VALUE, int, int*);
NORETURN(void rb_jump_tag _((int))); NORETURN(void rb_jump_tag(int));
int rb_provided _((const char*)); int rb_provided(const char*);
void rb_provide _((const char*)); void rb_provide(const char*);
VALUE rb_f_require _((VALUE, VALUE)); VALUE rb_f_require(VALUE, VALUE);
VALUE rb_require_safe _((VALUE, int)); VALUE rb_require_safe(VALUE, int);
void rb_obj_call_init _((VALUE, int, VALUE*)); void rb_obj_call_init(VALUE, int, VALUE*);
VALUE rb_class_new_instance _((int, VALUE*, VALUE)); VALUE rb_class_new_instance(int, VALUE*, VALUE);
VALUE rb_block_proc _((void)); VALUE rb_block_proc(void);
VALUE rb_f_lambda _((void)); VALUE rb_f_lambda(void);
VALUE rb_proc_new _((VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE)); VALUE rb_proc_new(VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE);
VALUE rb_proc_call _((VALUE, VALUE)); VALUE rb_proc_call(VALUE, VALUE);
int rb_proc_arity _((VALUE)); int rb_proc_arity(VALUE);
VALUE rb_obj_method _((VALUE, VALUE)); VALUE rb_obj_method(VALUE, VALUE);
VALUE rb_method_call _((int, VALUE*, VALUE)); VALUE rb_method_call(int, VALUE*, VALUE);
int rb_mod_method_arity _((VALUE, ID)); int rb_mod_method_arity(VALUE, ID);
int rb_obj_method_arity _((VALUE, ID)); int rb_obj_method_arity(VALUE, ID);
VALUE rb_protect _((VALUE (*)(VALUE), VALUE, int*)); VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
void rb_set_end_proc _((void (*)(VALUE), VALUE)); void rb_set_end_proc(void (*)(VALUE), VALUE);
void rb_mark_end_proc _((void)); void rb_mark_end_proc(void);
void rb_exec_end_proc _((void)); void rb_exec_end_proc(void);
void ruby_finalize _((void)); void ruby_finalize(void);
NORETURN(void ruby_stop _((int))); NORETURN(void ruby_stop(int));
int ruby_cleanup _((int)); int ruby_cleanup(int);
int ruby_exec _((void)); int ruby_exec(void);
void rb_gc_mark_threads _((void)); void rb_gc_mark_threads(void);
void rb_thread_start_timer _((void)); void rb_thread_start_timer(void);
void rb_thread_stop_timer _((void)); void rb_thread_stop_timer(void);
void rb_thread_schedule _((void)); void rb_thread_schedule(void);
void rb_thread_wait_fd _((int)); void rb_thread_wait_fd(int);
int rb_thread_fd_writable _((int)); int rb_thread_fd_writable(int);
void rb_thread_fd_close _((int)); void rb_thread_fd_close(int);
int rb_thread_alone _((void)); int rb_thread_alone(void);
void rb_thread_polling _((void)); void rb_thread_polling(void);
void rb_thread_sleep _((int)); void rb_thread_sleep(int);
void rb_thread_sleep_forever _((void)); void rb_thread_sleep_forever(void);
VALUE rb_thread_stop _((void)); VALUE rb_thread_stop(void);
VALUE rb_thread_wakeup _((VALUE)); VALUE rb_thread_wakeup(VALUE);
VALUE rb_thread_run _((VALUE)); VALUE rb_thread_run(VALUE);
VALUE rb_thread_kill _((VALUE)); VALUE rb_thread_kill(VALUE);
VALUE rb_thread_create _((VALUE (*)(ANYARGS), void*)); VALUE rb_thread_create(VALUE (*)(ANYARGS), void*);
void rb_thread_interrupt _((void)); void rb_thread_interrupt(void);
void rb_thread_trap_eval _((VALUE, int, int)); void rb_thread_trap_eval(VALUE, int, int);
void rb_thread_signal_raise _((char*)); void rb_thread_signal_raise(char*);
void rb_thread_signal_exit _((void)); void rb_thread_signal_exit(void);
int rb_thread_select _((int, fd_set *, fd_set *, fd_set *, struct timeval *)); int rb_thread_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
void rb_thread_wait_for _((struct timeval)); void rb_thread_wait_for(struct timeval);
VALUE rb_thread_current _((void)); VALUE rb_thread_current(void);
VALUE rb_thread_main _((void)); VALUE rb_thread_main(void);
VALUE rb_thread_local_aref _((VALUE, ID)); VALUE rb_thread_local_aref(VALUE, ID);
VALUE rb_thread_local_aset _((VALUE, ID, VALUE)); VALUE rb_thread_local_aset(VALUE, ID, VALUE);
void rb_thread_atfork _((void)); void rb_thread_atfork(void);
VALUE rb_exec_recursive _((VALUE(*)(ANYARGS),VALUE,VALUE)); VALUE rb_exec_recursive(VALUE(*)(ANYARGS),VALUE,VALUE);
/* file.c */ /* file.c */
int eaccess _((const char*, int)); int eaccess(const char*, int);
VALUE rb_file_s_expand_path _((int, VALUE *)); VALUE rb_file_s_expand_path(int, VALUE *);
VALUE rb_file_expand_path _((VALUE, VALUE)); VALUE rb_file_expand_path(VALUE, VALUE);
void rb_file_const _((const char*, VALUE)); void rb_file_const(const char*, VALUE);
int rb_find_file_ext _((VALUE*, const char* const*)); int rb_find_file_ext(VALUE*, const char* const*);
VALUE rb_find_file _((VALUE)); VALUE rb_find_file(VALUE);
char *rb_path_next _((const char *)); char *rb_path_next(const char *);
char *rb_path_skip_prefix _((const char *)); char *rb_path_skip_prefix(const char *);
char *rb_path_last_separator _((const char *)); char *rb_path_last_separator(const char *);
char *rb_path_end _((const char *)); char *rb_path_end(const char *);
/* gc.c */ /* gc.c */
void ruby_set_stack_size _((size_t)); void ruby_set_stack_size(size_t);
NORETURN(void rb_memerror __((void))); NORETURN(void rb_memerror(void));
int ruby_stack_check _((void)); int ruby_stack_check(void);
int ruby_stack_length _((VALUE**)); int ruby_stack_length(VALUE**);
char *rb_source_filename _((const char*)); char *rb_source_filename(const char*);
void rb_gc_mark_locations _((VALUE*, VALUE*)); void rb_gc_mark_locations(VALUE*, VALUE*);
void rb_mark_tbl _((struct st_table*)); void rb_mark_tbl(struct st_table*);
void rb_mark_hash _((struct st_table*)); void rb_mark_hash(struct st_table*);
void rb_gc_mark_maybe _((VALUE)); void rb_gc_mark_maybe(VALUE);
void rb_gc_mark _((VALUE)); void rb_gc_mark(VALUE);
void rb_gc_force_recycle _((VALUE)); void rb_gc_force_recycle(VALUE);
void rb_gc _((void)); void rb_gc(void);
void rb_gc_copy_finalizer _((VALUE,VALUE)); void rb_gc_copy_finalizer(VALUE,VALUE);
void rb_gc_finalize_deferred _((void)); void rb_gc_finalize_deferred(void);
void rb_gc_call_finalizer_at_exit _((void)); void rb_gc_call_finalizer_at_exit(void);
VALUE rb_gc_enable _((void)); VALUE rb_gc_enable(void);
VALUE rb_gc_disable _((void)); VALUE rb_gc_disable(void);
VALUE rb_gc_start _((void)); VALUE rb_gc_start(void);
/* hash.c */ /* hash.c */
void st_foreach_safe _((struct st_table *, int (*)(ANYARGS), unsigned long)); void st_foreach_safe(struct st_table *, int (*)(ANYARGS), unsigned long);
void rb_hash_foreach _((VALUE, int (*)(ANYARGS), VALUE)); void rb_hash_foreach(VALUE, int (*)(ANYARGS), VALUE);
VALUE rb_hash _((VALUE)); VALUE rb_hash(VALUE);
VALUE rb_hash_new _((void)); VALUE rb_hash_new(void);
VALUE rb_hash_freeze _((VALUE)); VALUE rb_hash_freeze(VALUE);
VALUE rb_hash_aref _((VALUE, VALUE)); VALUE rb_hash_aref(VALUE, VALUE);
VALUE rb_hash_aset _((VALUE, VALUE, VALUE)); VALUE rb_hash_aset(VALUE, VALUE, VALUE);
VALUE rb_hash_delete_if _((VALUE)); VALUE rb_hash_delete_if(VALUE);
VALUE rb_hash_delete _((VALUE,VALUE)); VALUE rb_hash_delete(VALUE,VALUE);
int rb_path_check _((const char*)); int rb_path_check(const char*);
int rb_env_path_tainted _((void)); int rb_env_path_tainted(void);
/* io.c */ /* io.c */
#define rb_defout rb_stdout #define rb_defout rb_stdout
RUBY_EXTERN VALUE rb_fs; RUBY_EXTERN VALUE rb_fs;
@ -332,250 +332,250 @@ RUBY_EXTERN VALUE rb_output_fs;
RUBY_EXTERN VALUE rb_rs; RUBY_EXTERN VALUE rb_rs;
RUBY_EXTERN VALUE rb_default_rs; RUBY_EXTERN VALUE rb_default_rs;
RUBY_EXTERN VALUE rb_output_rs; RUBY_EXTERN VALUE rb_output_rs;
VALUE rb_io_write _((VALUE, VALUE)); VALUE rb_io_write(VALUE, VALUE);
VALUE rb_io_gets _((VALUE)); VALUE rb_io_gets(VALUE);
VALUE rb_io_getc _((VALUE)); VALUE rb_io_getc(VALUE);
VALUE rb_io_ungetc _((VALUE, VALUE)); VALUE rb_io_ungetc(VALUE, VALUE);
VALUE rb_io_close _((VALUE)); VALUE rb_io_close(VALUE);
VALUE rb_io_flush _((VALUE)); VALUE rb_io_flush(VALUE);
VALUE rb_io_eof _((VALUE)); VALUE rb_io_eof(VALUE);
VALUE rb_io_binmode _((VALUE)); VALUE rb_io_binmode(VALUE);
VALUE rb_io_addstr _((VALUE, VALUE)); VALUE rb_io_addstr(VALUE, VALUE);
VALUE rb_io_printf _((int, VALUE*, VALUE)); VALUE rb_io_printf(int, VALUE*, VALUE);
VALUE rb_io_print _((int, VALUE*, VALUE)); VALUE rb_io_print(int, VALUE*, VALUE);
VALUE rb_io_puts _((int, VALUE*, VALUE)); VALUE rb_io_puts(int, VALUE*, VALUE);
VALUE rb_file_open _((const char*, const char*)); VALUE rb_file_open(const char*, const char*);
VALUE rb_gets _((void)); VALUE rb_gets(void);
void rb_write_error _((const char*)); void rb_write_error(const char*);
void rb_write_error2 _((const char*, long)); void rb_write_error2(const char*, long);
/* marshal.c */ /* marshal.c */
VALUE rb_marshal_dump _((VALUE, VALUE)); VALUE rb_marshal_dump(VALUE, VALUE);
VALUE rb_marshal_load _((VALUE)); VALUE rb_marshal_load(VALUE);
/* numeric.c */ /* numeric.c */
void rb_num_zerodiv _((void)); void rb_num_zerodiv(void);
VALUE rb_num_coerce_bin _((VALUE, VALUE)); VALUE rb_num_coerce_bin(VALUE, VALUE);
VALUE rb_num_coerce_cmp _((VALUE, VALUE)); VALUE rb_num_coerce_cmp(VALUE, VALUE);
VALUE rb_num_coerce_relop _((VALUE, VALUE)); VALUE rb_num_coerce_relop(VALUE, VALUE);
VALUE rb_float_new _((double)); VALUE rb_float_new(double);
VALUE rb_num2fix _((VALUE)); VALUE rb_num2fix(VALUE);
VALUE rb_fix2str _((VALUE, int)); VALUE rb_fix2str(VALUE, int);
VALUE rb_dbl_cmp _((double, double)); VALUE rb_dbl_cmp(double, double);
/* object.c */ /* object.c */
int rb_eql _((VALUE, VALUE)); int rb_eql(VALUE, VALUE);
VALUE rb_any_to_s _((VALUE)); VALUE rb_any_to_s(VALUE);
VALUE rb_inspect _((VALUE)); VALUE rb_inspect(VALUE);
VALUE rb_obj_is_instance_of _((VALUE, VALUE)); VALUE rb_obj_is_instance_of(VALUE, VALUE);
VALUE rb_obj_is_kind_of _((VALUE, VALUE)); VALUE rb_obj_is_kind_of(VALUE, VALUE);
VALUE rb_obj_alloc _((VALUE)); VALUE rb_obj_alloc(VALUE);
VALUE rb_obj_clone _((VALUE)); VALUE rb_obj_clone(VALUE);
VALUE rb_obj_dup _((VALUE)); VALUE rb_obj_dup(VALUE);
VALUE rb_obj_init_copy _((VALUE,VALUE)); VALUE rb_obj_init_copy(VALUE,VALUE);
VALUE rb_obj_taint _((VALUE)); VALUE rb_obj_taint(VALUE);
VALUE rb_obj_tainted _((VALUE)); VALUE rb_obj_tainted(VALUE);
VALUE rb_obj_untaint _((VALUE)); VALUE rb_obj_untaint(VALUE);
VALUE rb_obj_freeze _((VALUE)); VALUE rb_obj_freeze(VALUE);
VALUE rb_obj_id _((VALUE)); VALUE rb_obj_id(VALUE);
VALUE rb_obj_class _((VALUE)); VALUE rb_obj_class(VALUE);
VALUE rb_class_real _((VALUE)); VALUE rb_class_real(VALUE);
VALUE rb_class_inherited_p _((VALUE, VALUE)); VALUE rb_class_inherited_p(VALUE, VALUE);
VALUE rb_convert_type _((VALUE,int,const char*,const char*)); VALUE rb_convert_type(VALUE,int,const char*,const char*);
VALUE rb_check_convert_type _((VALUE,int,const char*,const char*)); VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
VALUE rb_check_to_integer _((VALUE, const char *)); VALUE rb_check_to_integer(VALUE, const char *);
VALUE rb_to_int _((VALUE)); VALUE rb_to_int(VALUE);
VALUE rb_Integer _((VALUE)); VALUE rb_Integer(VALUE);
VALUE rb_Float _((VALUE)); VALUE rb_Float(VALUE);
VALUE rb_String _((VALUE)); VALUE rb_String(VALUE);
VALUE rb_Array _((VALUE)); VALUE rb_Array(VALUE);
double rb_cstr_to_dbl _((const char*, int)); double rb_cstr_to_dbl(const char*, int);
double rb_str_to_dbl _((VALUE, int)); double rb_str_to_dbl(VALUE, int);
/* parse.y */ /* parse.y */
RUBY_EXTERN int ruby_sourceline; RUBY_EXTERN int ruby_sourceline;
RUBY_EXTERN char *ruby_sourcefile; RUBY_EXTERN char *ruby_sourcefile;
ID rb_id_attrset _((ID)); ID rb_id_attrset(ID);
void rb_gc_mark_parser _((void)); void rb_gc_mark_parser(void);
int rb_is_const_id _((ID)); int rb_is_const_id(ID);
int rb_is_instance_id _((ID)); int rb_is_instance_id(ID);
int rb_is_class_id _((ID)); int rb_is_class_id(ID);
int rb_is_local_id _((ID)); int rb_is_local_id(ID);
int rb_is_junk_id _((ID)); int rb_is_junk_id(ID);
VALUE rb_backref_get _((void)); VALUE rb_backref_get(void);
void rb_backref_set _((VALUE)); void rb_backref_set(VALUE);
VALUE rb_lastline_get _((void)); VALUE rb_lastline_get(void);
void rb_lastline_set _((VALUE)); void rb_lastline_set(VALUE);
VALUE rb_sym_all_symbols _((void)); VALUE rb_sym_all_symbols(void);
/* process.c */ /* process.c */
struct rb_exec_arg { struct rb_exec_arg {
int argc; int argc;
VALUE *argv; VALUE *argv;
const char *prog; const char *prog;
}; };
int rb_proc_exec_n _((int, VALUE*, const char*)); int rb_proc_exec_n(int, VALUE*, const char*);
int rb_proc_exec _((const char*)); int rb_proc_exec(const char*);
VALUE rb_check_argv _((int, VALUE*)); VALUE rb_check_argv(int, VALUE*);
int rb_exec _((const struct rb_exec_arg*)); int rb_exec(const struct rb_exec_arg*);
int rb_fork _((int*, int (*)_((void*)), void*)); int rb_fork(int*, int (*)_((void*)), void*);
VALUE rb_f_exec _((int,VALUE*)); VALUE rb_f_exec(int,VALUE*);
int rb_waitpid _((int,int*,int)); int rb_waitpid(int,int*,int);
void rb_syswait _((int)); void rb_syswait(int);
int rb_spawn _((int, VALUE*)); int rb_spawn(int, VALUE*);
VALUE rb_proc_times _((VALUE)); VALUE rb_proc_times(VALUE);
VALUE rb_detach_process _((int)); VALUE rb_detach_process(int);
/* range.c */ /* range.c */
VALUE rb_range_new _((VALUE, VALUE, int)); VALUE rb_range_new(VALUE, VALUE, int);
VALUE rb_range_beg_len _((VALUE, long*, long*, long, int)); VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
VALUE rb_length_by_each _((VALUE)); VALUE rb_length_by_each(VALUE);
/* re.c */ /* re.c */
int rb_memcmp _((char*,char*,long)); int rb_memcmp(char*,char*,long);
int rb_memcicmp _((char*,char*,long)); int rb_memcicmp(char*,char*,long);
long rb_memsearch _((char*,long,char*,long)); long rb_memsearch(char*,long,char*,long);
VALUE rb_reg_nth_defined _((int, VALUE)); VALUE rb_reg_nth_defined(int, VALUE);
VALUE rb_reg_nth_match _((int, VALUE)); VALUE rb_reg_nth_match(int, VALUE);
VALUE rb_reg_last_match _((VALUE)); VALUE rb_reg_last_match(VALUE);
VALUE rb_reg_match_pre _((VALUE)); VALUE rb_reg_match_pre(VALUE);
VALUE rb_reg_match_post _((VALUE)); VALUE rb_reg_match_post(VALUE);
VALUE rb_reg_match_last _((VALUE)); VALUE rb_reg_match_last(VALUE);
VALUE rb_reg_new _((const char*, long, int)); VALUE rb_reg_new(const char*, long, int);
VALUE rb_reg_compile _((const char*, long, int)); VALUE rb_reg_compile(const char*, long, int);
VALUE rb_reg_match _((VALUE, VALUE)); VALUE rb_reg_match(VALUE, VALUE);
VALUE rb_reg_match2 _((VALUE)); VALUE rb_reg_match2(VALUE);
int rb_reg_options _((VALUE)); int rb_reg_options(VALUE);
void rb_set_kcode _((const char*)); void rb_set_kcode(const char*);
const char* rb_get_kcode _((void)); const char* rb_get_kcode(void);
/* ruby.c */ /* ruby.c */
RUBY_EXTERN VALUE rb_argv; RUBY_EXTERN VALUE rb_argv;
RUBY_EXTERN VALUE rb_argv0; RUBY_EXTERN VALUE rb_argv0;
void rb_load_file _((const char*)); void rb_load_file(const char*);
void ruby_script _((const char*)); void ruby_script(const char*);
void ruby_prog_init _((void)); void ruby_prog_init(void);
void ruby_set_argv _((int, char**)); void ruby_set_argv(int, char**);
void ruby_process_options _((int, char**)); void ruby_process_options(int, char**);
void ruby_load_script _((void)); void ruby_load_script(void);
void ruby_init_loadpath _((void)); void ruby_init_loadpath(void);
void ruby_incpush _((const char*)); void ruby_incpush(const char*);
/* signal.c */ /* signal.c */
VALUE rb_f_kill _((int, VALUE*)); VALUE rb_f_kill(int, VALUE*);
void rb_gc_mark_trap_list _((void)); void rb_gc_mark_trap_list(void);
#ifdef POSIX_SIGNAL #ifdef POSIX_SIGNAL
#define posix_signal ruby_posix_signal #define posix_signal ruby_posix_signal
void posix_signal _((int, RETSIGTYPE (*)(int))); void posix_signal(int, RETSIGTYPE (*)(int));
#ifdef HAVE_NATIVETHREAD #ifdef HAVE_NATIVETHREAD
#define posix_nativethread_signal ruby_posix_nativethread_signal #define posix_nativethread_signal ruby_posix_nativethread_signal
void posix_nativethread_signal _((int, RETSIGTYPE (*)(int))); void posix_nativethread_signal(int, RETSIGTYPE (*)(int));
#endif #endif
#endif #endif
void rb_trap_exit _((void)); void rb_trap_exit(void);
void rb_trap_exec _((void)); void rb_trap_exec(void);
const char *ruby_signal_name _((int)); const char *ruby_signal_name(int);
/* sprintf.c */ /* sprintf.c */
VALUE rb_f_sprintf _((int, const VALUE*)); VALUE rb_f_sprintf(int, const VALUE*);
PRINTF_ARGS(VALUE rb_sprintf __((const char*, ...)), 1, 2); PRINTF_ARGS(VALUE rb_sprintf(const char*, ...), 1, 2);
VALUE rb_vsprintf _((const char*, va_list)); VALUE rb_vsprintf(const char*, va_list);
VALUE rb_str_format _((int, const VALUE *, VALUE)); VALUE rb_str_format(int, const VALUE *, VALUE);
/* string.c */ /* string.c */
VALUE rb_str_new _((const char*, long)); VALUE rb_str_new(const char*, long);
VALUE rb_str_new2 _((const char*)); VALUE rb_str_new2(const char*);
VALUE rb_str_new3 _((VALUE)); VALUE rb_str_new3(VALUE);
VALUE rb_str_new4 _((VALUE)); VALUE rb_str_new4(VALUE);
VALUE rb_str_new5 _((VALUE, const char*, long)); VALUE rb_str_new5(VALUE, const char*, long);
VALUE rb_tainted_str_new _((const char*, long)); VALUE rb_tainted_str_new(const char*, long);
VALUE rb_tainted_str_new2 _((const char*)); VALUE rb_tainted_str_new2(const char*);
VALUE rb_str_buf_new _((long)); VALUE rb_str_buf_new(long);
VALUE rb_str_buf_new2 _((const char*)); VALUE rb_str_buf_new2(const char*);
VALUE rb_str_buf_append _((VALUE, VALUE)); VALUE rb_str_buf_append(VALUE, VALUE);
VALUE rb_str_buf_cat _((VALUE, const char*, long)); VALUE rb_str_buf_cat(VALUE, const char*, long);
VALUE rb_str_buf_cat2 _((VALUE, const char*)); VALUE rb_str_buf_cat2(VALUE, const char*);
VALUE rb_obj_as_string _((VALUE)); VALUE rb_obj_as_string(VALUE);
VALUE rb_check_string_type _((VALUE)); VALUE rb_check_string_type(VALUE);
VALUE rb_str_dup _((VALUE)); VALUE rb_str_dup(VALUE);
VALUE rb_str_locktmp _((VALUE)); VALUE rb_str_locktmp(VALUE);
VALUE rb_str_unlocktmp _((VALUE)); VALUE rb_str_unlocktmp(VALUE);
VALUE rb_str_dup_frozen _((VALUE)); VALUE rb_str_dup_frozen(VALUE);
VALUE rb_str_plus _((VALUE, VALUE)); VALUE rb_str_plus(VALUE, VALUE);
VALUE rb_str_times _((VALUE, VALUE)); VALUE rb_str_times(VALUE, VALUE);
VALUE rb_str_substr _((VALUE, long, long)); VALUE rb_str_substr(VALUE, long, long);
void rb_str_modify _((VALUE)); void rb_str_modify(VALUE);
VALUE rb_str_freeze _((VALUE)); VALUE rb_str_freeze(VALUE);
VALUE rb_str_resize _((VALUE, long)); VALUE rb_str_resize(VALUE, long);
VALUE rb_str_cat _((VALUE, const char*, long)); VALUE rb_str_cat(VALUE, const char*, long);
VALUE rb_str_cat2 _((VALUE, const char*)); VALUE rb_str_cat2(VALUE, const char*);
VALUE rb_str_append _((VALUE, VALUE)); VALUE rb_str_append(VALUE, VALUE);
VALUE rb_str_concat _((VALUE, VALUE)); VALUE rb_str_concat(VALUE, VALUE);
int rb_str_hash _((VALUE)); int rb_str_hash(VALUE);
int rb_str_cmp _((VALUE, VALUE)); int rb_str_cmp(VALUE, VALUE);
VALUE rb_str_upto _((VALUE, VALUE, int)); VALUE rb_str_upto(VALUE, VALUE, int);
void rb_str_update _((VALUE, long, long, VALUE)); void rb_str_update(VALUE, long, long, VALUE);
VALUE rb_str_inspect _((VALUE)); VALUE rb_str_inspect(VALUE);
VALUE rb_str_dump _((VALUE)); VALUE rb_str_dump(VALUE);
VALUE rb_str_split _((VALUE, const char*)); VALUE rb_str_split(VALUE, const char*);
void rb_str_associate _((VALUE, VALUE)); void rb_str_associate(VALUE, VALUE);
VALUE rb_str_associated _((VALUE)); VALUE rb_str_associated(VALUE);
void rb_str_setter _((VALUE, ID, VALUE*)); void rb_str_setter(VALUE, ID, VALUE*);
VALUE rb_str_intern _((VALUE)); VALUE rb_str_intern(VALUE);
/* struct.c */ /* struct.c */
VALUE rb_struct_new __((VALUE, ...)); VALUE rb_struct_new(VALUE, ...);
VALUE rb_struct_define __((const char*, ...)); VALUE rb_struct_define(const char*, ...);
VALUE rb_struct_alloc _((VALUE, VALUE)); VALUE rb_struct_alloc(VALUE, VALUE);
VALUE rb_struct_aref _((VALUE, VALUE)); VALUE rb_struct_aref(VALUE, VALUE);
VALUE rb_struct_aset _((VALUE, VALUE, VALUE)); VALUE rb_struct_aset(VALUE, VALUE, VALUE);
VALUE rb_struct_getmember _((VALUE, ID)); VALUE rb_struct_getmember(VALUE, ID);
VALUE rb_struct_iv_get _((VALUE, char*)); VALUE rb_struct_iv_get(VALUE, char*);
VALUE rb_struct_s_members _((VALUE)); VALUE rb_struct_s_members(VALUE);
VALUE rb_struct_members _((VALUE)); VALUE rb_struct_members(VALUE);
/* time.c */ /* time.c */
VALUE rb_time_new _((time_t, time_t)); VALUE rb_time_new(time_t, time_t);
/* variable.c */ /* variable.c */
VALUE rb_mod_name _((VALUE)); VALUE rb_mod_name(VALUE);
VALUE rb_class_path _((VALUE)); VALUE rb_class_path(VALUE);
void rb_set_class_path _((VALUE, VALUE, const char*)); void rb_set_class_path(VALUE, VALUE, const char*);
VALUE rb_path2class _((const char*)); VALUE rb_path2class(const char*);
void rb_name_class _((VALUE, ID)); void rb_name_class(VALUE, ID);
VALUE rb_class_name _((VALUE)); VALUE rb_class_name(VALUE);
void rb_autoload _((VALUE, ID, const char*)); void rb_autoload(VALUE, ID, const char*);
void rb_autoload_load _((VALUE, ID)); void rb_autoload_load(VALUE, ID);
VALUE rb_autoload_p _((VALUE, ID)); VALUE rb_autoload_p(VALUE, ID);
void rb_gc_mark_global_tbl _((void)); void rb_gc_mark_global_tbl(void);
VALUE rb_f_trace_var _((int, VALUE*)); VALUE rb_f_trace_var(int, VALUE*);
VALUE rb_f_untrace_var _((int, VALUE*)); VALUE rb_f_untrace_var(int, VALUE*);
VALUE rb_f_global_variables _((void)); VALUE rb_f_global_variables(void);
void rb_alias_variable _((ID, ID)); void rb_alias_variable(ID, ID);
struct st_table* rb_generic_ivar_table _((VALUE)); struct st_table* rb_generic_ivar_table(VALUE);
void rb_copy_generic_ivar _((VALUE,VALUE)); void rb_copy_generic_ivar(VALUE,VALUE);
void rb_mark_generic_ivar _((VALUE)); void rb_mark_generic_ivar(VALUE);
void rb_mark_generic_ivar_tbl _((void)); void rb_mark_generic_ivar_tbl(void);
void rb_free_generic_ivar _((VALUE)); void rb_free_generic_ivar(VALUE);
VALUE rb_ivar_get _((VALUE, ID)); VALUE rb_ivar_get(VALUE, ID);
VALUE rb_ivar_set _((VALUE, ID, VALUE)); VALUE rb_ivar_set(VALUE, ID, VALUE);
VALUE rb_ivar_defined _((VALUE, ID)); VALUE rb_ivar_defined(VALUE, ID);
VALUE rb_iv_set _((VALUE, const char*, VALUE)); VALUE rb_iv_set(VALUE, const char*, VALUE);
VALUE rb_iv_get _((VALUE, const char*)); VALUE rb_iv_get(VALUE, const char*);
VALUE rb_attr_get _((VALUE, ID)); VALUE rb_attr_get(VALUE, ID);
VALUE rb_obj_instance_variables _((VALUE)); VALUE rb_obj_instance_variables(VALUE);
VALUE rb_obj_remove_instance_variable _((VALUE, VALUE)); VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
void *rb_mod_const_at _((VALUE, void*)); void *rb_mod_const_at(VALUE, void*);
void *rb_mod_const_of _((VALUE, void*)); void *rb_mod_const_of(VALUE, void*);
VALUE rb_const_list _((void*)); VALUE rb_const_list(void*);
VALUE rb_mod_constants _((VALUE)); VALUE rb_mod_constants(VALUE);
VALUE rb_mod_remove_const _((VALUE, VALUE)); VALUE rb_mod_remove_const(VALUE, VALUE);
int rb_const_defined _((VALUE, ID)); int rb_const_defined(VALUE, ID);
int rb_const_defined_at _((VALUE, ID)); int rb_const_defined_at(VALUE, ID);
int rb_const_defined_from _((VALUE, ID)); int rb_const_defined_from(VALUE, ID);
VALUE rb_const_get _((VALUE, ID)); VALUE rb_const_get(VALUE, ID);
VALUE rb_const_get_at _((VALUE, ID)); VALUE rb_const_get_at(VALUE, ID);
VALUE rb_const_get_from _((VALUE, ID)); VALUE rb_const_get_from(VALUE, ID);
void rb_const_set _((VALUE, ID, VALUE)); void rb_const_set(VALUE, ID, VALUE);
VALUE rb_mod_constants _((VALUE)); VALUE rb_mod_constants(VALUE);
VALUE rb_mod_const_missing _((VALUE,VALUE)); VALUE rb_mod_const_missing(VALUE,VALUE);
VALUE rb_cvar_defined _((VALUE, ID)); VALUE rb_cvar_defined(VALUE, ID);
#define RB_CVAR_SET_4ARGS 1 #define RB_CVAR_SET_4ARGS 1
void rb_cvar_set _((VALUE, ID, VALUE, int)); void rb_cvar_set(VALUE, ID, VALUE, int);
VALUE rb_cvar_get _((VALUE, ID)); VALUE rb_cvar_get(VALUE, ID);
void rb_cv_set _((VALUE, const char*, VALUE)); void rb_cv_set(VALUE, const char*, VALUE);
VALUE rb_cv_get _((VALUE, const char*)); VALUE rb_cv_get(VALUE, const char*);
void rb_define_class_variable _((VALUE, const char*, VALUE)); void rb_define_class_variable(VALUE, const char*, VALUE);
VALUE rb_mod_class_variables _((VALUE)); VALUE rb_mod_class_variables(VALUE);
VALUE rb_mod_remove_cvar _((VALUE, VALUE)); VALUE rb_mod_remove_cvar(VALUE, VALUE);
/* version.c */ /* version.c */
void ruby_show_version _((void)); void ruby_show_version(void);
void ruby_show_copyright _((void)); void ruby_show_copyright(void);
#endif /* RUBY_INTERN_H */ #endif /* RUBY_INTERN_H */

8
io.c
View file

@ -72,7 +72,7 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
extern void Init_File _((void)); extern void Init_File(void);
#ifdef __BEOS__ #ifdef __BEOS__
# ifndef NOFILE # ifndef NOFILE
@ -110,7 +110,7 @@ static ID id_write, id_read, id_getc, id_flush;
extern char *ruby_inplace_mode; extern char *ruby_inplace_mode;
struct timeval rb_time_interval _((VALUE)); struct timeval rb_time_interval(VALUE);
static VALUE filename, current_file; static VALUE filename, current_file;
static int gets_lineno; static int gets_lineno;
@ -202,7 +202,7 @@ rb_io_check_closed(OpenFile *fptr)
} }
} }
static int io_fflush _((OpenFile *)); static int io_fflush(OpenFile *);
static VALUE static VALUE
rb_io_get_io(VALUE io) rb_io_get_io(VALUE io)
@ -2693,7 +2693,7 @@ pipe_del_fptr(OpenFile *fptr)
} }
static void static void
pipe_atexit _((void)) pipe_atexit(void)
{ {
struct pipe_list *list = pipe_list; struct pipe_list *list = pipe_list;
struct pipe_list *tmp; struct pipe_list *tmp;

2
lex.c
View file

@ -1,7 +1,7 @@
/* C code produced by gperf version 2.7.2 */ /* C code produced by gperf version 2.7.2 */
/* Command-line: gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' keywords */ /* Command-line: gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' keywords */
struct kwtable {char *name; int id[2]; enum lex_state_e state;}; struct kwtable {char *name; int id[2]; enum lex_state_e state;};
const struct kwtable *rb_reserved_word _((const char *, unsigned int)); const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER #ifndef RIPPER
; ;

View file

@ -113,7 +113,7 @@ class2path(VALUE klass)
return path; return path;
} }
static void w_long _((long, struct dump_arg*)); static void w_long(long, struct dump_arg*);
static void static void
w_nbyte(char *s, int n, struct dump_arg *arg) w_nbyte(char *s, int n, struct dump_arg *arg)
@ -327,7 +327,7 @@ w_unique(char *s, struct dump_arg *arg)
w_symbol(rb_intern(s), arg); w_symbol(rb_intern(s), arg);
} }
static void w_object _((VALUE,struct dump_arg*,int)); static void w_object(VALUE,struct dump_arg*,int);
static int static int
hash_each(VALUE key, VALUE value, struct dump_call_arg *arg) hash_each(VALUE key, VALUE value, struct dump_call_arg *arg)
@ -738,7 +738,7 @@ struct load_arg {
int taint; int taint;
}; };
static VALUE r_object _((struct load_arg *arg)); static VALUE r_object(struct load_arg *arg);
static int static int
r_byte(struct load_arg *arg) r_byte(struct load_arg *arg)

View file

@ -26,103 +26,103 @@ struct timeval {
#endif #endif
#ifndef HAVE_ACOSH #ifndef HAVE_ACOSH
extern double acosh _((double)); extern double acosh(double);
extern double asinh _((double)); extern double asinh(double);
extern double atanh _((double)); extern double atanh(double);
#endif #endif
#ifndef HAVE_CRYPT #ifndef HAVE_CRYPT
extern char *crypt _((const char *, const char *)); extern char *crypt(const char *, const char *);
#endif #endif
#ifndef HAVE_DUP2 #ifndef HAVE_DUP2
extern int dup2 _((int, int)); extern int dup2(int, int);
#endif #endif
#ifndef HAVE_FINITE #ifndef HAVE_FINITE
extern int finite _((double)); extern int finite(double);
#endif #endif
#ifndef HAVE_FLOCK #ifndef HAVE_FLOCK
extern int flock _((int, int)); extern int flock(int, int);
#endif #endif
/* /*
#ifndef HAVE_FREXP #ifndef HAVE_FREXP
extern double frexp _((double, int *)); extern double frexp(double, int *);
#endif #endif
*/ */
#ifndef HAVE_HYPOT #ifndef HAVE_HYPOT
extern double hypot _((double, double)); extern double hypot(double, double);
#endif #endif
#ifndef HAVE_ERF #ifndef HAVE_ERF
extern double erf _((double)); extern double erf(double);
extern double erfc _((double)); extern double erfc(double);
#endif #endif
#ifndef HAVE_ISINF #ifndef HAVE_ISINF
# if defined(HAVE_FINITE) && defined(HAVE_ISNAN) # if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
# define isinf(x) (!finite(x) && !isnan(x)) # define isinf(x) (!finite(x) && !isnan(x))
# else # else
extern int isinf _((double)); extern int isinf(double);
# endif # endif
#endif #endif
#ifndef HAVE_ISNAN #ifndef HAVE_ISNAN
extern int isnan _((double)); extern int isnan(double);
#endif #endif
/* /*
#ifndef HAVE_MEMCMP #ifndef HAVE_MEMCMP
extern int memcmp _((char *, char *, int)); extern int memcmp(char *, char *, int);
#endif #endif
*/ */
#ifndef HAVE_MEMMOVE #ifndef HAVE_MEMMOVE
extern void *memmove _((void *, void *, int)); extern void *memmove(void *, void *, int);
#endif #endif
/* /*
#ifndef HAVE_MODF #ifndef HAVE_MODF
extern double modf _((double, double *)); extern double modf(double, double *);
#endif #endif
*/ */
#ifndef HAVE_STRCASECMP #ifndef HAVE_STRCASECMP
extern int strcasecmp _((char *, char *)); extern int strcasecmp(char *, char *);
#endif #endif
#ifndef HAVE_STRNCASECMP #ifndef HAVE_STRNCASECMP
extern int strncasecmp _((char *, char *, int)); extern int strncasecmp(char *, char *, int);
#endif #endif
#ifndef HAVE_STRCHR #ifndef HAVE_STRCHR
extern char *strchr _((char *, int)); extern char *strchr(char *, int);
extern char *strrchr _((char *, int)); extern char *strrchr(char *, int);
#endif #endif
#ifndef HAVE_STRERROR #ifndef HAVE_STRERROR
extern char *strerror _((int)); extern char *strerror(int);
#endif #endif
#ifndef HAVE_STRFTIME #ifndef HAVE_STRFTIME
extern size_t strftime _((char *, size_t, const char *, const struct tm *)); extern size_t strftime(char *, size_t, const char *, const struct tm *);
#endif #endif
#ifndef HAVE_STRSTR #ifndef HAVE_STRSTR
extern char *strstr _((char *, char *)); extern char *strstr(char *, char *);
#endif #endif
/* /*
#ifndef HAVE_STRTOL #ifndef HAVE_STRTOL
extern long strtol _((char *, char **, int)); extern long strtol(char *, char **, int);
#endif #endif
*/ */
#ifndef HAVE_STRTOUL #ifndef HAVE_STRTOUL
extern unsigned long strtoul _((char *, char **, int)); extern unsigned long strtoul(char *, char **, int);
#endif #endif
#ifndef HAVE_VSNPRINTF #ifndef HAVE_VSNPRINTF
@ -131,8 +131,8 @@ extern unsigned long strtoul _((char *, char **, int));
# else # else
# include <varargs.h> # include <varargs.h>
# endif # endif
extern int snprintf __((char *, size_t n, char const *, ...)); extern int snprintf(char *, size_t n, char const *, ...);
extern int vsnprintf _((char *, size_t n, char const *, va_list)); extern int vsnprintf(char *, size_t n, char const *, va_list);
#endif #endif
#endif /* MISSING_H */ #endif /* MISSING_H */

38
node.h
View file

@ -352,27 +352,27 @@ typedef struct RNode {
#define NOEX_UNDEF NOEX_NOSUPER #define NOEX_UNDEF NOEX_NOSUPER
#define NOEX_RECV 8 #define NOEX_RECV 8
VALUE rb_parser_new _((void)); VALUE rb_parser_new(void);
VALUE rb_parser_end_seen_p _((VALUE)); VALUE rb_parser_end_seen_p(VALUE);
NODE *rb_parser_compile_cstr _((volatile VALUE, const char*, const char*, int, int)); NODE *rb_parser_compile_cstr(volatile VALUE, const char*, const char*, int, int);
NODE *rb_parser_compile_string _((volatile VALUE, const char*, VALUE, int)); NODE *rb_parser_compile_string(volatile VALUE, const char*, VALUE, int);
NODE *rb_parser_compile_file _((volatile VALUE, const char*, VALUE, int)); NODE *rb_parser_compile_file(volatile VALUE, const char*, VALUE, int);
NODE *rb_compile_cstr _((const char*, const char*, int, int)); NODE *rb_compile_cstr(const char*, const char*, int, int);
NODE *rb_compile_string _((const char*, VALUE, int)); NODE *rb_compile_string(const char*, VALUE, int);
NODE *rb_compile_file _((const char*, VALUE, int)); NODE *rb_compile_file(const char*, VALUE, int);
void rb_add_method _((VALUE, ID, NODE *, int)); void rb_add_method(VALUE, ID, NODE *, int);
NODE *rb_node_newnode _((enum node_type,VALUE,VALUE,VALUE)); NODE *rb_node_newnode(enum node_type,VALUE,VALUE,VALUE);
NODE* rb_method_node _((VALUE klass, ID id)); NODE* rb_method_node(VALUE klass, ID id);
int rb_node_arity _((NODE* node)); int rb_node_arity(NODE* node);
struct global_entry *rb_global_entry _((ID)); struct global_entry *rb_global_entry(ID);
VALUE rb_gvar_get _((struct global_entry *)); VALUE rb_gvar_get(struct global_entry *);
VALUE rb_gvar_set _((struct global_entry *, VALUE)); VALUE rb_gvar_set(struct global_entry *, VALUE);
VALUE rb_gvar_defined _((struct global_entry *)); VALUE rb_gvar_defined(struct global_entry *);
typedef unsigned int rb_event_t; typedef unsigned int rb_event_t;
@ -387,9 +387,9 @@ typedef unsigned int rb_event_t;
#define RUBY_EVENT_RAISE 0x80 #define RUBY_EVENT_RAISE 0x80
#define RUBY_EVENT_ALL 0xff #define RUBY_EVENT_ALL 0xff
typedef void (*rb_event_hook_func_t) _((rb_event_t,NODE*,VALUE,ID,VALUE)); typedef void (*rb_event_hook_func_t)(rb_event_t,NODE*,VALUE,ID,VALUE);
void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t)); void rb_add_event_hook(rb_event_hook_func_t,rb_event_t);
int rb_remove_event_hook _((rb_event_hook_func_t)); int rb_remove_event_hook(rb_event_hook_func_t);
#if defined(__cplusplus) #if defined(__cplusplus)
} /* extern "C" { */ } /* extern "C" { */

View file

@ -2414,7 +2414,7 @@ fix_xor(VALUE x, VALUE y)
return LONG2NUM(val); return LONG2NUM(val);
} }
static VALUE fix_rshift _((VALUE, VALUE)); static VALUE fix_rshift(VALUE, VALUE);
/* /*
* call-seq: * call-seq:

10
pack.c
View file

@ -330,7 +330,7 @@ endian()
#define VTOHD(x,y) vtohd(x) #define VTOHD(x,y) vtohd(x)
#endif #endif
unsigned long rb_big2ulong_pack _((VALUE x)); unsigned long rb_big2ulong_pack(VALUE x);
static unsigned long static unsigned long
num2i32(VALUE x) num2i32(VALUE x)
@ -364,11 +364,11 @@ num2i32(VALUE x)
#endif #endif
static char *toofew = "too few arguments"; static char *toofew = "too few arguments";
static void encodes _((VALUE,char*,long,int)); static void encodes(VALUE,char*,long,int);
static void qpencode _((VALUE,VALUE,long)); static void qpencode(VALUE,VALUE,long);
static int uv_to_utf8 _((char*,unsigned long)); static int uv_to_utf8(char*,unsigned long);
static unsigned long utf8_to_uv _((char*,long*)); static unsigned long utf8_to_uv(char*,long*);
/* /*
* call-seq: * call-seq:

View file

@ -40,7 +40,7 @@
#define EXIT_FAILURE 1 #define EXIT_FAILURE 1
#endif #endif
struct timeval rb_time_interval _((VALUE)); struct timeval rb_time_interval(VALUE);
#ifdef HAVE_SYS_WAIT_H #ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h> # include <sys/wait.h>
@ -1298,7 +1298,7 @@ proc_syswait(pid)
int int
rb_fork(status, chfunc, charg) rb_fork(status, chfunc, charg)
int *status; int *status;
int (*chfunc) _((void *)); int (*chfunc)(void *);
void *charg; void *charg;
{ {
int pid, err, state = 0; int pid, err, state = 0;

14
re.h
View file

@ -28,15 +28,15 @@ struct RMatch {
#define RMATCH(obj) (R_CAST(RMatch)(obj)) #define RMATCH(obj) (R_CAST(RMatch)(obj))
VALUE rb_reg_regcomp _((VALUE)); VALUE rb_reg_regcomp(VALUE);
long rb_reg_search _((VALUE, VALUE, long, long)); long rb_reg_search(VALUE, VALUE, long, long);
VALUE rb_reg_regsub _((VALUE, VALUE, struct re_registers *)); VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *);
long rb_reg_adjust_startpos _((VALUE, VALUE, long, long)); long rb_reg_adjust_startpos(VALUE, VALUE, long, long);
void rb_match_busy _((VALUE)); void rb_match_busy(VALUE);
VALUE rb_reg_quote _((VALUE)); VALUE rb_reg_quote(VALUE);
RUBY_EXTERN int ruby_ignorecase; RUBY_EXTERN int ruby_ignorecase;
int rb_reg_mbclen2 _((unsigned int, VALUE)); int rb_reg_mbclen2(unsigned int, VALUE);
#define mbclen2(c,re) rb_reg_mbclen2((c),(re)) #define mbclen2(c,re) rb_reg_mbclen2((c),(re))
#endif #endif

20
ruby.c
View file

@ -41,9 +41,9 @@
#endif #endif
#ifndef HAVE_STRING_H #ifndef HAVE_STRING_H
char *strchr _((const char*,const char)); char *strchr(const char*,const char);
char *strrchr _((const char*,const char)); char *strrchr(const char*,const char);
char *strstr _((const char*,const char*)); char *strstr(const char*,const char*);
#endif #endif
#include "util.h" #include "util.h"
@ -60,9 +60,9 @@ extern int ruby_yydebug;
char *ruby_inplace_mode = Qfalse; char *ruby_inplace_mode = Qfalse;
static void load_stdin _((void)); static void load_stdin(void);
static void load_file _((const char *, int)); static void load_file(const char *, int);
static void forbid_setid _((const char *)); static void forbid_setid(const char *);
static VALUE do_loop = Qfalse, do_print = Qfalse; static VALUE do_loop = Qfalse, do_print = Qfalse;
static VALUE do_check = Qfalse, do_line = Qfalse; static VALUE do_check = Qfalse, do_line = Qfalse;
@ -354,7 +354,7 @@ add_modules(const char *mod)
req_list_last = list; req_list_last = list;
} }
extern void Init_ext _((void)); extern void Init_ext(void);
static void static void
require_libraries(void) require_libraries(void)
@ -450,7 +450,7 @@ process_sflag(void)
sflag = 0; sflag = 0;
} }
static void proc_options _((int argc, char **argv)); static void proc_options(int argc, char **argv);
static char* static char*
moreswitches(char *s) moreswitches(char *s)
@ -1199,8 +1199,8 @@ ruby_set_argv(int argc, char **argv)
} }
} }
NODE *rb_parser_append_print _((NODE*)); NODE *rb_parser_append_print(NODE*);
NODE *rb_parser_while_loop _((NODE*, int, int)); NODE *rb_parser_while_loop(NODE*, int, int);
void void
ruby_process_options(int argc, char **argv) ruby_process_options(int argc, char **argv)

200
ruby.h
View file

@ -146,19 +146,19 @@ typedef unsigned LONG_LONG ID;
#define INT2FIX(i) ((VALUE)(((long)(i))<<1 | FIXNUM_FLAG)) #define INT2FIX(i) ((VALUE)(((long)(i))<<1 | FIXNUM_FLAG))
#define LONG2FIX(i) INT2FIX(i) #define LONG2FIX(i) INT2FIX(i)
#define rb_fix_new(v) INT2FIX(v) #define rb_fix_new(v) INT2FIX(v)
VALUE rb_int2inum _((long)); VALUE rb_int2inum(long);
#define INT2NUM(v) rb_int2inum(v) #define INT2NUM(v) rb_int2inum(v)
#define LONG2NUM(v) INT2NUM(v) #define LONG2NUM(v) INT2NUM(v)
#define rb_int_new(v) rb_int2inum(v) #define rb_int_new(v) rb_int2inum(v)
VALUE rb_uint2inum _((unsigned long)); VALUE rb_uint2inum(unsigned long);
#define UINT2NUM(v) rb_uint2inum(v) #define UINT2NUM(v) rb_uint2inum(v)
#define ULONG2NUM(v) UINT2NUM(v) #define ULONG2NUM(v) UINT2NUM(v)
#define rb_uint_new(v) rb_uint2inum(v) #define rb_uint_new(v) rb_uint2inum(v)
#if HAVE_LONG_LONG #if HAVE_LONG_LONG
VALUE rb_ll2inum _((LONG_LONG)); VALUE rb_ll2inum(LONG_LONG);
#define LL2NUM(v) rb_ll2inum(v) #define LL2NUM(v) rb_ll2inum(v)
VALUE rb_ull2inum _((unsigned LONG_LONG)); VALUE rb_ull2inum(unsigned LONG_LONG);
#define ULL2NUM(v) rb_ull2inum(v) #define ULL2NUM(v) rb_ull2inum(v)
#endif #endif
@ -229,20 +229,20 @@ VALUE rb_ull2inum _((unsigned LONG_LONG));
#define TYPE(x) rb_type((VALUE)(x)) #define TYPE(x) rb_type((VALUE)(x))
void rb_check_type _((VALUE,int)); void rb_check_type(VALUE,int);
#define Check_Type(v,t) rb_check_type((VALUE)(v),t) #define Check_Type(v,t) rb_check_type((VALUE)(v),t)
VALUE rb_str_to_str _((VALUE)); VALUE rb_str_to_str(VALUE);
VALUE rb_string_value _((volatile VALUE*)); VALUE rb_string_value(volatile VALUE*);
char *rb_string_value_ptr _((volatile VALUE*)); char *rb_string_value_ptr(volatile VALUE*);
char *rb_string_value_cstr _((volatile VALUE*)); char *rb_string_value_cstr(volatile VALUE*);
#define StringValue(v) rb_string_value(&(v)) #define StringValue(v) rb_string_value(&(v))
#define StringValuePtr(v) rb_string_value_ptr(&(v)) #define StringValuePtr(v) rb_string_value_ptr(&(v))
#define StringValueCStr(v) rb_string_value_cstr(&(v)) #define StringValueCStr(v) rb_string_value_cstr(&(v))
void rb_check_safe_obj _((VALUE)); void rb_check_safe_obj(VALUE);
void rb_check_safe_str _((VALUE)); void rb_check_safe_str(VALUE);
#define SafeStringValue(v) do {\ #define SafeStringValue(v) do {\
StringValue(v);\ StringValue(v);\
rb_check_safe_obj(v);\ rb_check_safe_obj(v);\
@ -250,27 +250,27 @@ void rb_check_safe_str _((VALUE));
/* obsolete macro - use SafeStringValue(v) */ /* obsolete macro - use SafeStringValue(v) */
#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v)) #define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
VALUE rb_get_path _((VALUE)); VALUE rb_get_path(VALUE);
#define FilePathValue(v) ((v) = rb_get_path(v)) #define FilePathValue(v) ((v) = rb_get_path(v))
void rb_secure _((int)); void rb_secure(int);
RUBY_EXTERN int ruby_safe_level; RUBY_EXTERN int ruby_safe_level;
#define rb_safe_level() (ruby_safe_level) #define rb_safe_level() (ruby_safe_level)
void rb_set_safe_level _((int)); void rb_set_safe_level(int);
void rb_secure_update _((VALUE)); void rb_secure_update(VALUE);
long rb_num2long _((VALUE)); long rb_num2long(VALUE);
unsigned long rb_num2ulong _((VALUE)); unsigned long rb_num2ulong(VALUE);
#define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x)) #define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))
#define NUM2ULONG(x) rb_num2ulong((VALUE)x) #define NUM2ULONG(x) rb_num2ulong((VALUE)x)
#if SIZEOF_INT < SIZEOF_LONG #if SIZEOF_INT < SIZEOF_LONG
long rb_num2int _((VALUE)); long rb_num2int(VALUE);
#define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x)) #define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
long rb_fix2int _((VALUE)); long rb_fix2int(VALUE);
#define FIX2INT(x) rb_fix2int((VALUE)x) #define FIX2INT(x) rb_fix2int((VALUE)x)
unsigned long rb_num2uint _((VALUE)); unsigned long rb_num2uint(VALUE);
#define NUM2UINT(x) rb_num2uint(x) #define NUM2UINT(x) rb_num2uint(x)
unsigned long rb_fix2uint _((VALUE)); unsigned long rb_fix2uint(VALUE);
#define FIX2UINT(x) rb_fix2uint(x) #define FIX2UINT(x) rb_fix2uint(x)
#else #else
#define NUM2INT(x) ((int)NUM2LONG(x)) #define NUM2INT(x) ((int)NUM2LONG(x))
@ -280,8 +280,8 @@ unsigned long rb_fix2uint _((VALUE));
#endif #endif
#if HAVE_LONG_LONG #if HAVE_LONG_LONG
LONG_LONG rb_num2ll _((VALUE)); LONG_LONG rb_num2ll(VALUE);
unsigned LONG_LONG rb_num2ull _((VALUE)); unsigned LONG_LONG rb_num2ull(VALUE);
# define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x)) # define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x))
# define NUM2ULL(x) rb_num2ull((VALUE)x) # define NUM2ULL(x) rb_num2ull((VALUE)x)
#endif #endif
@ -292,11 +292,11 @@ unsigned LONG_LONG rb_num2ull _((VALUE));
# define NUM2OFFT(x) NUM2LONG(x) # define NUM2OFFT(x) NUM2LONG(x)
#endif #endif
double rb_num2dbl _((VALUE)); double rb_num2dbl(VALUE);
#define NUM2DBL(x) rb_num2dbl((VALUE)(x)) #define NUM2DBL(x) rb_num2dbl((VALUE)(x))
/* obsolete API - use StringValue() */ /* obsolete API - use StringValue() */
char *rb_str2cstr _((VALUE,long*)); char *rb_str2cstr(VALUE,long*);
/* obsolete API - use StringValuePtr() */ /* obsolete API - use StringValuePtr() */
#define STR2CSTR(x) rb_str2cstr((VALUE)(x),0) #define STR2CSTR(x) rb_str2cstr((VALUE)(x),0)
@ -304,7 +304,7 @@ char *rb_str2cstr _((VALUE,long*));
RSTRING(x)->ptr[0]:(char)(NUM2INT(x)&0xff)) RSTRING(x)->ptr[0]:(char)(NUM2INT(x)&0xff))
#define CHR2FIX(x) INT2FIX((long)((x)&0xff)) #define CHR2FIX(x) INT2FIX((long)((x)&0xff))
VALUE rb_newobj _((void)); VALUE rb_newobj(void);
#define NEWOBJ(obj,type) type *obj = (type*)rb_newobj() #define NEWOBJ(obj,type) type *obj = (type*)rb_newobj()
#define OBJSETUP(obj,c,t) do {\ #define OBJSETUP(obj,c,t) do {\
RBASIC(obj)->flags = (t);\ RBASIC(obj)->flags = (t);\
@ -386,8 +386,8 @@ struct RFile {
struct RData { struct RData {
struct RBasic basic; struct RBasic basic;
void (*dmark) _((void*)); void (*dmark)(void*);
void (*dfree) _((void*)); void (*dfree)(void*);
void *data; void *data;
}; };
@ -396,9 +396,9 @@ struct RData {
/* /*
#define RUBY_DATA_FUNC(func) ((void (*)_((void*)))func) #define RUBY_DATA_FUNC(func) ((void (*)_((void*)))func)
*/ */
typedef void (*RUBY_DATA_FUNC) _((void*)); typedef void (*RUBY_DATA_FUNC)(void*);
VALUE rb_data_object_alloc _((VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC)); VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC);
#define Data_Wrap_Struct(klass,mark,free,sval)\ #define Data_Wrap_Struct(klass,mark,free,sval)\
rb_data_object_alloc(klass,sval,(RUBY_DATA_FUNC)mark,(RUBY_DATA_FUNC)free) rb_data_object_alloc(klass,sval,(RUBY_DATA_FUNC)mark,(RUBY_DATA_FUNC)free)
@ -487,98 +487,98 @@ struct RBignum {
#define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(n)) #define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(n))
#define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(n)) #define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(n))
void rb_obj_infect _((VALUE,VALUE)); void rb_obj_infect(VALUE,VALUE);
void rb_glob _((const char*,void(*)(const char*,VALUE),VALUE)); void rb_glob(const char*,void(*)(const char*,VALUE),VALUE);
VALUE rb_define_class _((const char*,VALUE)); VALUE rb_define_class(const char*,VALUE);
VALUE rb_define_module _((const char*)); VALUE rb_define_module(const char*);
VALUE rb_define_class_under _((VALUE, const char*, VALUE)); VALUE rb_define_class_under(VALUE, const char*, VALUE);
VALUE rb_define_module_under _((VALUE, const char*)); VALUE rb_define_module_under(VALUE, const char*);
void rb_include_module _((VALUE,VALUE)); void rb_include_module(VALUE,VALUE);
void rb_extend_object _((VALUE,VALUE)); void rb_extend_object(VALUE,VALUE);
void rb_define_variable _((const char*,VALUE*)); void rb_define_variable(const char*,VALUE*);
void rb_define_virtual_variable _((const char*,VALUE(*)(ANYARGS),void(*)(ANYARGS))); void rb_define_virtual_variable(const char*,VALUE(*)(ANYARGS),void(*)(ANYARGS));
void rb_define_hooked_variable _((const char*,VALUE*,VALUE(*)(ANYARGS),void(*)(ANYARGS))); void rb_define_hooked_variable(const char*,VALUE*,VALUE(*)(ANYARGS),void(*)(ANYARGS));
void rb_define_readonly_variable _((const char*,VALUE*)); void rb_define_readonly_variable(const char*,VALUE*);
void rb_define_const _((VALUE,const char*,VALUE)); void rb_define_const(VALUE,const char*,VALUE);
void rb_define_global_const _((const char*,VALUE)); void rb_define_global_const(const char*,VALUE);
#define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))func) #define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))func)
void rb_define_method _((VALUE,const char*,VALUE(*)(ANYARGS),int)); void rb_define_method(VALUE,const char*,VALUE(*)(ANYARGS),int);
void rb_define_module_function _((VALUE,const char*,VALUE(*)(ANYARGS),int)); void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
void rb_define_global_function _((const char*,VALUE(*)(ANYARGS),int)); void rb_define_global_function(const char*,VALUE(*)(ANYARGS),int);
void rb_undef_method _((VALUE,const char*)); void rb_undef_method(VALUE,const char*);
void rb_define_alias _((VALUE,const char*,const char*)); void rb_define_alias(VALUE,const char*,const char*);
void rb_define_attr _((VALUE,const char*,int,int)); void rb_define_attr(VALUE,const char*,int,int);
void rb_global_variable _((VALUE*)); void rb_global_variable(VALUE*);
void rb_gc_register_address _((VALUE*)); void rb_gc_register_address(VALUE*);
void rb_gc_unregister_address _((VALUE*)); void rb_gc_unregister_address(VALUE*);
ID rb_intern _((const char*)); ID rb_intern(const char*);
char *rb_id2name _((ID)); char *rb_id2name(ID);
ID rb_to_id _((VALUE)); ID rb_to_id(VALUE);
char *rb_class2name _((VALUE)); char *rb_class2name(VALUE);
char *rb_obj_classname _((VALUE)); char *rb_obj_classname(VALUE);
void rb_p _((VALUE)); void rb_p(VALUE);
VALUE rb_eval_string _((const char*)); VALUE rb_eval_string(const char*);
VALUE rb_eval_string_protect _((const char*, int*)); VALUE rb_eval_string_protect(const char*, int*);
VALUE rb_eval_string_wrap _((const char*, int*)); VALUE rb_eval_string_wrap(const char*, int*);
VALUE rb_funcall __((VALUE, ID, int, ...)); VALUE rb_funcall(VALUE, ID, int, ...);
VALUE rb_funcall2 _((VALUE, ID, int, const VALUE*)); VALUE rb_funcall2(VALUE, ID, int, const VALUE*);
VALUE rb_funcall3 _((VALUE, ID, int, const VALUE*)); VALUE rb_funcall3(VALUE, ID, int, const VALUE*);
int rb_scan_args __((int, const VALUE*, const char*, ...)); int rb_scan_args(int, const VALUE*, const char*, ...);
VALUE rb_call_super _((int, const VALUE*)); VALUE rb_call_super(int, const VALUE*);
VALUE rb_gv_set _((const char*, VALUE)); VALUE rb_gv_set(const char*, VALUE);
VALUE rb_gv_get _((const char*)); VALUE rb_gv_get(const char*);
VALUE rb_iv_get _((VALUE, const char*)); VALUE rb_iv_get(VALUE, const char*);
VALUE rb_iv_set _((VALUE, const char*, VALUE)); VALUE rb_iv_set(VALUE, const char*, VALUE);
VALUE rb_equal _((VALUE,VALUE)); VALUE rb_equal(VALUE,VALUE);
RUBY_EXTERN VALUE ruby_verbose, ruby_debug; RUBY_EXTERN VALUE ruby_verbose, ruby_debug;
PRINTF_ARGS(NORETURN(void rb_raise __((VALUE, const char*, ...))), 2, 3); PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3);
PRINTF_ARGS(NORETURN(void rb_fatal __((const char*, ...))), 1, 2); PRINTF_ARGS(NORETURN(void rb_fatal(const char*, ...)), 1, 2);
PRINTF_ARGS(NORETURN(void rb_bug __((const char*, ...))), 1, 2); PRINTF_ARGS(NORETURN(void rb_bug(const char*, ...)), 1, 2);
NORETURN(void rb_sys_fail _((const char*))); NORETURN(void rb_sys_fail(const char*));
NORETURN(void rb_iter_break _((void))); NORETURN(void rb_iter_break(void));
NORETURN(void rb_exit _((int))); NORETURN(void rb_exit(int));
NORETURN(void rb_notimplement _((void))); NORETURN(void rb_notimplement(void));
/* reports if `-w' specified */ /* reports if `-w' specified */
PRINTF_ARGS(void rb_warning __((const char*, ...)), 1, 2); PRINTF_ARGS(void rb_warning(const char*, ...), 1, 2);
/* reports if `-w' specified */ /* reports if `-w' specified */
PRINTF_ARGS(void rb_sys_warning __((const char*, ...)), 1, 2); PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2);
/* reports always */ /* reports always */
PRINTF_ARGS(void rb_warn __((const char*, ...)), 1, 2); PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);
VALUE rb_each _((VALUE)); VALUE rb_each(VALUE);
VALUE rb_yield _((VALUE)); VALUE rb_yield(VALUE);
VALUE rb_yield_values __((int n, ...)); VALUE rb_yield_values(int n, ...);
VALUE rb_yield_splat _((VALUE)); VALUE rb_yield_splat(VALUE);
int rb_block_given_p _((void)); int rb_block_given_p(void);
void rb_need_block _((void)); void rb_need_block(void);
VALUE rb_iterate _((VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE)); VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE rb_rescue _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE)); VALUE rb_rescue(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE rb_rescue2 __((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...)); VALUE rb_rescue2(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...);
VALUE rb_ensure _((VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE)); VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE rb_catch _((const char*,VALUE(*)(ANYARGS),VALUE)); VALUE rb_catch(const char*,VALUE(*)(ANYARGS),VALUE);
NORETURN(void rb_throw _((const char*,VALUE))); NORETURN(void rb_throw(const char*,VALUE));
VALUE rb_require _((const char*)); VALUE rb_require(const char*);
void ruby_init _((void)); void ruby_init(void);
void ruby_options _((int, char**)); void ruby_options(int, char**);
NORETURN(void ruby_run _((void))); NORETURN(void ruby_run(void));
RUBY_EXTERN VALUE rb_mKernel; RUBY_EXTERN VALUE rb_mKernel;
RUBY_EXTERN VALUE rb_mComparable; RUBY_EXTERN VALUE rb_mComparable;
@ -726,12 +726,12 @@ typedef DWORD rb_nativethread_t;
# define HAVE_NATIVETHREAD # define HAVE_NATIVETHREAD
#endif #endif
#ifdef HAVE_NATIVETHREAD #ifdef HAVE_NATIVETHREAD
int is_ruby_native_thread _((void)); int is_ruby_native_thread(void);
#else #else
#define is_ruby_native_thread() (1) #define is_ruby_native_thread() (1)
#endif #endif
#ifdef HAVE_NATIVETHREAD_KILL #ifdef HAVE_NATIVETHREAD_KILL
void ruby_native_thread_kill _((int)); void ruby_native_thread_kill(int);
#endif #endif
#if defined(__cplusplus) #if defined(__cplusplus)

View file

@ -27,7 +27,7 @@ typedef struct OpenFile {
int pid; /* child's pid (for pipes) */ int pid; /* child's pid (for pipes) */
int lineno; /* number of lines read */ int lineno; /* number of lines read */
char *path; /* pathname for file */ char *path; /* pathname for file */
void (*finalize) _((struct OpenFile*,int)); /* finalize proc */ void (*finalize)(struct OpenFile*,int); /* finalize proc */
long refcnt; long refcnt;
char *wbuf; /* wbuf_off + wbuf_len <= wbuf_capa */ char *wbuf; /* wbuf_off + wbuf_len <= wbuf_capa */
int wbuf_off; int wbuf_off;
@ -81,28 +81,28 @@ typedef struct OpenFile {
FILE *rb_io_stdio_file(OpenFile *fptr); FILE *rb_io_stdio_file(OpenFile *fptr);
FILE *rb_fopen _((const char*, const char*)); FILE *rb_fopen(const char*, const char*);
FILE *rb_fdopen _((int, const char*)); FILE *rb_fdopen(int, const char*);
int rb_io_mode_flags _((const char*)); int rb_io_mode_flags(const char*);
int rb_io_modenum_flags _((int)); int rb_io_modenum_flags(int);
void rb_io_check_writable _((OpenFile*)); void rb_io_check_writable(OpenFile*);
void rb_io_check_readable _((OpenFile*)); void rb_io_check_readable(OpenFile*);
int rb_io_fptr_finalize _((OpenFile*)); int rb_io_fptr_finalize(OpenFile*);
void rb_io_synchronized _((OpenFile*)); void rb_io_synchronized(OpenFile*);
void rb_io_check_initialized _((OpenFile*)); void rb_io_check_initialized(OpenFile*);
void rb_io_check_closed _((OpenFile*)); void rb_io_check_closed(OpenFile*);
int rb_io_wait_readable _((int)); int rb_io_wait_readable(int);
int rb_io_wait_writable _((int)); int rb_io_wait_writable(int);
VALUE rb_io_taint_check _((VALUE)); VALUE rb_io_taint_check(VALUE);
NORETURN(void rb_eof_error _((void))); NORETURN(void rb_eof_error(void));
void rb_io_read_check _((OpenFile*)); void rb_io_read_check(OpenFile*);
int rb_io_read_pending _((OpenFile*)); int rb_io_read_pending(OpenFile*);
void rb_read_check _((FILE*)); void rb_read_check(FILE*);
DEPRECATED(int rb_getc _((FILE*))); DEPRECATED(int rb_getc(FILE*));
DEPRECATED(long rb_io_fread _((char *, long, FILE *))); DEPRECATED(long rb_io_fread(char *, long, FILE *));
DEPRECATED(long rb_io_fwrite _((const char *, long, FILE *))); DEPRECATED(long rb_io_fwrite(const char *, long, FILE *));
DEPRECATED(int rb_read_pending _((FILE*))); DEPRECATED(int rb_read_pending(FILE*));
#endif #endif

View file

@ -72,13 +72,13 @@ RUBY_EXTERN int rb_prohibit_interrupt;
} while (0) } while (0)
#define ENABLE_INTS (rb_prohibit_interrupt--) #define ENABLE_INTS (rb_prohibit_interrupt--)
VALUE rb_with_disable_interrupt _((VALUE(*)(ANYARGS),VALUE)); VALUE rb_with_disable_interrupt(VALUE(*)(ANYARGS),VALUE);
RUBY_EXTERN rb_atomic_t rb_trap_pending; RUBY_EXTERN rb_atomic_t rb_trap_pending;
void rb_trap_restore_mask _((void)); void rb_trap_restore_mask(void);
RUBY_EXTERN int rb_thread_critical; RUBY_EXTERN int rb_thread_critical;
void rb_thread_schedule _((void)); void rb_thread_schedule(void);
#if defined(HAVE_SETITIMER) #if defined(HAVE_SETITIMER)
RUBY_EXTERN int rb_thread_pending; RUBY_EXTERN int rb_thread_pending;
# define CHECK_INTS do {\ # define CHECK_INTS do {\

View file

@ -445,7 +445,7 @@ sigsend_to_ruby_thread(int sig)
#endif #endif
} }
static RETSIGTYPE sighandler _((int)); static RETSIGTYPE sighandler(int);
static RETSIGTYPE static RETSIGTYPE
sighandler(int sig) sighandler(int sig)
{ {

View file

@ -19,7 +19,7 @@
#define BIT_DIGITS(N) (((N)*146)/485 + 1) /* log2(10) =~ 146/485 */ #define BIT_DIGITS(N) (((N)*146)/485 + 1) /* log2(10) =~ 146/485 */
static void fmt_setup _((char*,int,int,int,int)); static void fmt_setup(char*,int,int,int,int);
static char* static char*
remove_sign_bits(char *str, int base) remove_sign_bits(char *str, int base)

30
st.h
View file

@ -38,21 +38,21 @@ enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK};
# endif # endif
#endif #endif
st_table *st_init_table _((struct st_hash_type *)); st_table *st_init_table(struct st_hash_type *);
st_table *st_init_table_with_size _((struct st_hash_type *, int)); st_table *st_init_table_with_size(struct st_hash_type *, int);
st_table *st_init_numtable _((void)); st_table *st_init_numtable(void);
st_table *st_init_numtable_with_size _((int)); st_table *st_init_numtable_with_size(int);
st_table *st_init_strtable _((void)); st_table *st_init_strtable(void);
st_table *st_init_strtable_with_size _((int)); st_table *st_init_strtable_with_size(int);
int st_delete _((st_table *, st_data_t *, st_data_t *)); int st_delete(st_table *, st_data_t *, st_data_t *);
int st_delete_safe _((st_table *, st_data_t *, st_data_t *, st_data_t)); int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
int st_insert _((st_table *, st_data_t, st_data_t)); int st_insert(st_table *, st_data_t, st_data_t);
int st_lookup _((st_table *, st_data_t, st_data_t *)); int st_lookup(st_table *, st_data_t, st_data_t *);
int st_foreach _((st_table *, int (*)(ANYARGS), st_data_t)); int st_foreach(st_table *, int (*)(ANYARGS), st_data_t);
void st_add_direct _((st_table *, st_data_t, st_data_t)); void st_add_direct(st_table *, st_data_t, st_data_t);
void st_free_table _((st_table *)); void st_free_table(st_table *);
void st_cleanup_safe _((st_table *, st_data_t)); void st_cleanup_safe(st_table *, st_data_t);
st_table *st_copy _((st_table *)); st_table *st_copy(st_table *);
#define ST_NUMCMP ((int (*)()) 0) #define ST_NUMCMP ((int (*)()) 0)
#define ST_NUMHASH ((int (*)()) -2) #define ST_NUMHASH ((int (*)()) -2)

View file

@ -270,7 +270,7 @@ rb_obj_as_string(VALUE obj)
return str; return str;
} }
static VALUE rb_str_replace _((VALUE, VALUE)); static VALUE rb_str_replace(VALUE, VALUE);
VALUE VALUE
rb_str_dup(VALUE str) rb_str_dup(VALUE str)
@ -1203,7 +1203,7 @@ rb_str_match(VALUE x, VALUE y)
} }
static VALUE get_pat _((VALUE, int)); static VALUE get_pat(VALUE, int);
/* /*
@ -2848,7 +2848,7 @@ trnext(struct tr *t)
} }
} }
static VALUE rb_str_delete_bang _((int,VALUE*,VALUE)); static VALUE rb_str_delete_bang(int,VALUE*,VALUE);
static VALUE static VALUE
tr_trans(VALUE str, VALUE src, VALUE repl, int sflag) tr_trans(VALUE str, VALUE src, VALUE repl, int sflag)

View file

@ -14,7 +14,7 @@
VALUE rb_cStruct; VALUE rb_cStruct;
static VALUE struct_alloc _((VALUE)); static VALUE struct_alloc(VALUE);
VALUE VALUE
rb_struct_iv_get(VALUE c, char *name) rb_struct_iv_get(VALUE c, char *name)

6
time.c
View file

@ -373,9 +373,9 @@ time_arg(int argc, VALUE *argv, struct tm *tm, time_t *usec)
rb_raise(rb_eArgError, "argument out of range"); rb_raise(rb_eArgError, "argument out of range");
} }
static VALUE time_gmtime _((VALUE)); static VALUE time_gmtime(VALUE);
static VALUE time_localtime _((VALUE)); static VALUE time_localtime(VALUE);
static VALUE time_get_tm _((VALUE, int)); static VALUE time_get_tm(VALUE, int);
static int static int
leap_year_p(long y) leap_year_p(long y)

2
util.c
View file

@ -22,7 +22,7 @@
#include "util.h" #include "util.h"
#ifndef HAVE_STRING_H #ifndef HAVE_STRING_H
char *strchr _((char*,char)); char *strchr(char*,char);
#endif #endif
unsigned long unsigned long

16
util.h
View file

@ -35,32 +35,32 @@
#endif #endif
#define scan_oct ruby_scan_oct #define scan_oct ruby_scan_oct
unsigned long scan_oct _((const char*, int, int*)); unsigned long scan_oct(const char*, int, int*);
#define scan_hex ruby_scan_hex #define scan_hex ruby_scan_hex
unsigned long scan_hex _((const char*, int, int*)); unsigned long scan_hex(const char*, int, int*);
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32) #if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
void ruby_add_suffix(VALUE str, char *suffix); void ruby_add_suffix(VALUE str, char *suffix);
#endif #endif
void ruby_qsort _((void*, const int, const int, int (*)(), void*)); void ruby_qsort(void*, const int, const int, int (*)(), void*);
#define qsort(b,n,s,c,d) ruby_qsort(b,n,s,c,d) #define qsort(b,n,s,c,d) ruby_qsort(b,n,s,c,d)
void ruby_setenv _((const char*, const char*)); void ruby_setenv(const char*, const char*);
void ruby_unsetenv _((const char*)); void ruby_unsetenv(const char*);
#undef setenv #undef setenv
#undef unsetenv #undef unsetenv
#define setenv(name,val) ruby_setenv(name,val) #define setenv(name,val) ruby_setenv(name,val)
#define unsetenv(name,val) ruby_unsetenv(name); #define unsetenv(name,val) ruby_unsetenv(name);
char *ruby_strdup _((const char*)); char *ruby_strdup(const char*);
#undef strdup #undef strdup
#define strdup(s) ruby_strdup(s) #define strdup(s) ruby_strdup(s)
char *ruby_getcwd _((void)); char *ruby_getcwd(void);
#define my_getcwd() ruby_getcwd() #define my_getcwd() ruby_getcwd()
double ruby_strtod _((const char*, char **)); double ruby_strtod(const char*, char **);
#define strtod(s,e) ruby_strtod(s,e) #define strtod(s,e) ruby_strtod(s,e)
#endif /* UTIL_H */ #endif /* UTIL_H */

View file

@ -1091,7 +1091,7 @@ rb_obj_remove_instance_variable(VALUE obj, VALUE name)
return Qnil; /* not reached */ return Qnil; /* not reached */
} }
NORETURN(static void uninitialized_constant _((VALUE, ID))); NORETURN(static void uninitialized_constant(VALUE, ID));
static void static void
uninitialized_constant(VALUE klass, ID id) uninitialized_constant(VALUE klass, ID id)
{ {