Ruby: miniinit.c Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

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
21rb_locale_charmap(VALUE klass)
22{
23 /* never used */
24 return Qnil;
25}
26
27int
28rb_locale_charmap_index(void)
29{
30 return -1;
31}
32
33int
34Init_enc_set_filesystem_encoding(void)
35{
36 return rb_enc_to_index(rb_default_external_encoding());
37}
38
39void rb_encdb_declare(const char *name);
40int rb_encdb_alias(const char *alias, const char *orig);
41void
42Init_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_enc_to_index
int rb_enc_to_index(rb_encoding *enc)
Definition: encoding.c:197
rb_default_external_encoding
rb_encoding * rb_default_external_encoding(void)
Definition: encoding.c:1647
encoding.h
mini_builtin.c
rb_encdb_declare
void rb_encdb_declare(const char *name)
Definition: encoding.c:473
Init_enc
void Init_enc(void)
Definition: miniinit.c:42
ruby_exec_prefix
const char ruby_exec_prefix[]
Definition: miniinit.c:16
rb_locale_charmap
VALUE rb_locale_charmap(VALUE klass)
Definition: miniinit.c:21
ruby_initial_load_paths
const char ruby_initial_load_paths[]
Definition: miniinit.c:17
Init_enc_set_filesystem_encoding
int Init_enc_set_filesystem_encoding(void)
Definition: miniinit.c:34
rb_locale_charmap_index
int rb_locale_charmap_index(void)
Definition: miniinit.c:28
rb_encdb_alias
int rb_encdb_alias(const char *alias, const char *orig)
Definition: encoding.c:740
name
const char * name
Definition: nkf.c:208
alias
const char * alias
Definition: nkf.c:1159
ruby.h
Qnil
#define Qnil
Definition: special_consts.h:51
VALUE
unsigned long VALUE
Definition: value.h:38