* eval.c: fixed to use ANSI function style.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2007-02-07 13:34:18 +00:00
parent 44aef0b53f
commit 4042176a99
2 changed files with 18 additions and 26 deletions

View File

@ -1,3 +1,7 @@
Wed Feb 7 22:30:28 2007 Koichi Sasada <ko1@atdot.net>
* eval.c: fixed to use ANSI function style.
Wed Feb 7 09:35:32 2007 Koichi Sasada <ko1@atdot.net> Wed Feb 7 09:35:32 2007 Koichi Sasada <ko1@atdot.net>
* this commit is a result of refactoring. only renaming functions, * this commit is a result of refactoring. only renaming functions,

40
eval.c
View File

@ -90,7 +90,7 @@ void Init_ext _((void));
void Init_yarv(void); void Init_yarv(void);
void void
ruby_init() ruby_init(void)
{ {
static int initialized = 0; static int initialized = 0;
int state; int state;
@ -148,10 +148,8 @@ ruby_options(int argc, char **argv)
POP_THREAD_TAG(); POP_THREAD_TAG();
} }
void rb_exec_end_proc _((void));
static void static void
ruby_finalize_0() ruby_finalize_0(void)
{ {
PUSH_TAG(PROT_NONE); PUSH_TAG(PROT_NONE);
if (EXEC_TAG() == 0) { if (EXEC_TAG() == 0) {
@ -162,7 +160,7 @@ ruby_finalize_0()
} }
static void static void
ruby_finalize_1() ruby_finalize_1(void)
{ {
signal(SIGINT, SIG_DFL); signal(SIGINT, SIG_DFL);
GET_THREAD()->errinfo = 0; GET_THREAD()->errinfo = 0;
@ -220,7 +218,7 @@ ruby_cleanup(int ex)
extern NODE *ruby_eval_tree; extern NODE *ruby_eval_tree;
static int static int
ruby_exec_internal() ruby_exec_internal(void)
{ {
int state; int state;
VALUE val; VALUE val;
@ -235,7 +233,7 @@ ruby_exec_internal()
} }
int int
ruby_exec() ruby_exec(void)
{ {
volatile NODE *tmp; volatile NODE *tmp;
@ -244,14 +242,13 @@ ruby_exec()
} }
void void
ruby_stop(ex) ruby_stop(int ex)
int ex;
{ {
exit(ruby_cleanup(ex)); exit(ruby_cleanup(ex));
} }
void void
ruby_run() ruby_run(void)
{ {
int state; int state;
static int ex; static int ex;
@ -269,8 +266,7 @@ ruby_run()
} }
VALUE VALUE
rb_eval_string(str) rb_eval_string(const char *str)
const char *str;
{ {
VALUE v; VALUE v;
NODE *oldsrc = ruby_current_node; NODE *oldsrc = ruby_current_node;
@ -284,17 +280,13 @@ rb_eval_string(str)
} }
VALUE VALUE
rb_eval_string_protect(str, state) rb_eval_string_protect(const char *str, int *state)
const char *str;
int *state;
{ {
return rb_protect((VALUE (*)_((VALUE)))rb_eval_string, (VALUE)str, state); return rb_protect((VALUE (*)_((VALUE)))rb_eval_string, (VALUE)str, state);
} }
VALUE VALUE
rb_eval_string_wrap(str, state) rb_eval_string_wrap(const char *str, int *state)
const char *str;
int *state;
{ {
int status; int status;
VALUE self = ruby_top_self; VALUE self = ruby_top_self;
@ -1387,9 +1379,7 @@ rb_rescue2(VALUE (*b_proc) (ANYARGS), VALUE data1, VALUE (*r_proc) (ANYARGS),
} }
VALUE VALUE
rb_rescue(b_proc, data1, r_proc, data2) rb_rescue(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2)
VALUE (*b_proc) (), (*r_proc) ();
VALUE data1, data2;
{ {
return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError,
(VALUE)0); (VALUE)0);
@ -1436,9 +1426,7 @@ rb_ensure(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*e_proc)(ANYARGS), VALUE
} }
VALUE VALUE
rb_with_disable_interrupt(proc, data) rb_with_disable_interrupt(VALUE (*proc)(ANYARGS), VALUE data)
VALUE (*proc) ();
VALUE data;
{ {
VALUE result = Qnil; /* OK */ VALUE result = Qnil; /* OK */
int status; int status;
@ -1463,7 +1451,7 @@ rb_with_disable_interrupt(proc, data)
} }
static inline void static inline void
stack_check() stack_check(void)
{ {
static int overflowing = 0; static int overflowing = 0;
@ -2848,7 +2836,7 @@ rb_f_local_variables(void)
void void
Init_eval() Init_eval(void)
{ {
/* TODO: fix position */ /* TODO: fix position */
GET_THREAD()->vm->mark_object_ary = rb_ary_new(); GET_THREAD()->vm->mark_object_ary = rb_ary_new();