Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

main.c
Go to the documentation of this file.
1 /**********************************************************************
2
3 main.c -
4
5 $Author$
6 created at: Fri Aug 19 13:19:58 JST 1994
7
8 Copyright (C) 1993-2007 Yukihiro Matsumoto
9
10 **********************************************************************/
11
20 #undef RUBY_EXPORT
21 #include "ruby.h"
22 #include "vm_debug.h"
23 #ifdef HAVE_LOCALE_H
24 #include <locale.h>
25 #endif
26 #if RUBY_DEVEL && !defined RUBY_DEBUG_ENV
27 # define RUBY_DEBUG_ENV 1
28 #endif
29 #if defined RUBY_DEBUG_ENV && !RUBY_DEBUG_ENV
30 # undef RUBY_DEBUG_ENV
31 #endif
32 #ifdef RUBY_DEBUG_ENV
33 #include <stdlib.h>
34 #endif
35
36 int
37 main(int argc, char **argv)
38 {
39 #ifdef RUBY_DEBUG_ENV
40 ruby_set_debug_option(getenv("RUBY_DEBUG"));
41 #endif
42 #ifdef HAVE_LOCALE_H
43 setlocale(LC_CTYPE, "");
44 #endif
45
46 ruby_sysinit(&argc, &argv);
47 {
48 RUBY_INIT_STACK;
49 ruby_init();
50 return ruby_run_node(ruby_options(argc, argv));
51 }
52 }
getenv
#define getenv(name)
Definition: win32.c:73
vm_debug.h
main
int main(int argc, char **argv)
Definition: main.c:37
ruby_init
void ruby_init(void)
Calls ruby_setup() and check error.
Definition: eval.c:93
ruby.h
argv
char ** argv
Definition: ruby.c:223
argc
int argc
Definition: ruby.c:222
ruby_sysinit
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition: ruby.c:2447
RUBY_INIT_STACK
#define RUBY_INIT_STACK
A convenience macro to call ruby_init_stack().
Definition: ruby.h:2728
ruby_run_node
#define ruby_run_node
Definition: goruby.c:3
ruby_set_debug_option
void ruby_set_debug_option(const char *str)
Definition: debug.c:226
ruby_options
#define ruby_options
Definition: goruby.c:2