Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

miniinit.c
Go to the documentation of this file.
1 /**********************************************************************
2
3 miniinit.c -
4
5 $Author$
6 created at: Thu Jul 11 22:09:57 JST 2013
7
8 Copyright (C) 2013 Yukihiro Matsumoto
9
10 **********************************************************************/
11
12 #include "ruby/ruby.h"
13 #include "ruby/encoding.h"
14
15 /* loadpath.c */
16 const char ruby_exec_prefix[] = "";
17 const char ruby_initial_load_paths[] = "";
18
19 /* localeinit.c */
20 VALUE
21 rb_locale_charmap(VALUE klass)
22 {
23 /* never used */
24 return Qnil;
25 }
26
27 int
28 rb_locale_charmap_index(void)
29 {
30 return -1;
31 }
32
33 int
34 Init_enc_set_filesystem_encoding(void)
35 {
36 return rb_enc_to_index(rb_default_external_encoding());
37 }
38
39 void rb_encdb_declare(const char *name);
40 int rb_encdb_alias(const char *alias, const char *orig);
41 void
42 Init_enc(void)
43 {
44 rb_encdb_declare("ASCII-8BIT");
45 rb_encdb_declare("US-ASCII");
46 rb_encdb_declare("UTF-8");
47 rb_encdb_alias("BINARY", "ASCII-8BIT");
48 rb_encdb_alias("ASCII", "US-ASCII");
49 }
50
51 #include "mini_builtin.c"
rb_locale_charmap_index
int rb_locale_charmap_index(void)
Definition: miniinit.c:28
rb_default_external_encoding
rb_encoding * rb_default_external_encoding(void)
Definition: encoding.c:1427
VALUE
unsigned long VALUE
Definition: ruby.h:102
encoding.h
alias
const char * alias
Definition: nkf.c:1159
ruby_initial_load_paths
const char ruby_initial_load_paths[]
Definition: miniinit.c:17
rb_encdb_alias
int rb_encdb_alias(const char *alias, const char *orig)
Definition: encoding.c:565
ruby.h
Init_enc
void Init_enc(void)
Definition: miniinit.c:42
ruby_exec_prefix
const char ruby_exec_prefix[]
Definition: miniinit.c:16
rb_enc_to_index
int rb_enc_to_index(rb_encoding *enc)
Definition: encoding.c:125
rb_encdb_declare
void rb_encdb_declare(const char *name)
Definition: encoding.c:350
mini_builtin.c
klass
VALUE klass
Definition: rb_mjit_min_header-2.7.0.h:13254
Qnil
#define Qnil
Definition: ruby.h:469
rb_locale_charmap
VALUE rb_locale_charmap(VALUE klass)
Definition: miniinit.c:21
Init_enc_set_filesystem_encoding
int Init_enc_set_filesystem_encoding(void)
Definition: miniinit.c:34
name
const char * name
Definition: nkf.c:208