Ruby  2.7.1p83(2020-03-31revisiona0c7c23c9cec0d0ffcba012279cd652d28ad5bf3)
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 
47  {
49  ruby_init();
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:94
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