Ruby
2.7.7p221 (2022-11-24 revision 168ec2b1e5ad0e4688e963d9de019557c78feed9)
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
}
ruby_run_node
#define ruby_run_node
Definition:
goruby.c:3
ruby_options
#define ruby_options
Definition:
goruby.c:2
main
int main(int argc, char **argv)
Definition:
main.c:37
RUBY_INIT_STACK
#define RUBY_INIT_STACK
Definition:
rb_mjit_min_header-2.7.7.h:16352
ruby_init
void ruby_init(void)
Calls ruby_setup() and check error.
Definition:
eval.c:94
ruby_set_debug_option
void ruby_set_debug_option(const char *str)
Definition:
debug.c:226
ruby_sysinit
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition:
ruby.c:2472
argv
const VALUE * argv
Definition:
rb_mjit_min_header-2.7.7.h:2861
argc
int argc
Definition:
rb_mjit_min_header-2.7.7.h:11225
ruby.h
vm_debug.h
getenv
#define getenv(name)
Definition:
win32.c:73
Generated by
1.9.2