Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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 {
34 RUBY_INIT_STACK;
35 ruby_init();
36 return ruby_run_node(ruby_options(argc, argv));
37 }
38 }
39