Ruby  2.0.0p645(2015-04-13revision50299)
main.c
Go to the documentation of this file.
1 /**********************************************************************
2 
3  main.c -
4 
5  $Author: ko1 $
6  created at: Fri Aug 19 13:19:58 JST 1994
7 
8  Copyright (C) 1993-2007 Yukihiro Matsumoto
9 
10 **********************************************************************/
11 
12 #undef RUBY_EXPORT
13 #include "ruby.h"
14 #include "vm_debug.h"
15 #ifdef HAVE_LOCALE_H
16 #include <locale.h>
17 #endif
18 #ifdef RUBY_DEBUG_ENV
19 #include <stdlib.h>
20 #endif
21 
22 int
23 main(int argc, char **argv)
24 {
25 #ifdef RUBY_DEBUG_ENV
26  ruby_set_debug_option(getenv("RUBY_DEBUG"));
27 #endif
28 #ifdef HAVE_LOCALE_H
29  setlocale(LC_CTYPE, "");
30 #endif
31 
32  ruby_sysinit(&argc, &argv);
33  {
35  ruby_init();
36  return ruby_run_node(ruby_options(argc, argv));
37  }
38 }
void ruby_init(void)
Definition: eval.c:71
#define RUBY_INIT_STACK
VALUE * argv
Definition: tcltklib.c:1970
#define ruby_sysinit
Definition: stub.c:3
int argc
Definition: tcltklib.c:1969
char * getenv()
#define ruby_run_node
Definition: goruby.c:3
void ruby_set_debug_option(const char *str)
Definition: debug.c:159
#define ruby_options
Definition: goruby.c:2
int main(int argc, char **argv)
Definition: nkf.c:6918