Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

encindex.h
Go to the documentation of this file.
1 /**********************************************************************
2
3 encindex.h -
4
5 $Author$
6 created at: Tue Sep 15 13:21:14 JST 2015
7
8 Copyright (C) 2015 Yukihiro Matsumoto
9
10 **********************************************************************/
11
12 #ifndef RUBY_ENCINDEX_H
13 #define RUBY_ENCINDEX_H 1
14 #if defined(__cplusplus)
15 extern "C" {
16 #if 0
17 } /* satisfy cc-mode */
18 #endif
19 #endif
20
21 enum ruby_preserved_encindex {
22 RUBY_ENCINDEX_ASCII,
23 RUBY_ENCINDEX_UTF_8,
24 RUBY_ENCINDEX_US_ASCII,
25
26 /* preserved indexes */
27 RUBY_ENCINDEX_UTF_16BE,
28 RUBY_ENCINDEX_UTF_16LE,
29 RUBY_ENCINDEX_UTF_32BE,
30 RUBY_ENCINDEX_UTF_32LE,
31 RUBY_ENCINDEX_UTF_16,
32 RUBY_ENCINDEX_UTF_32,
33 RUBY_ENCINDEX_UTF8_MAC,
34
35 /* for old options of regexp */
36 RUBY_ENCINDEX_EUC_JP,
37 RUBY_ENCINDEX_Windows_31J,
38
39 RUBY_ENCINDEX_BUILTIN_MAX
40 };
41
42 #define ENCINDEX_ASCII RUBY_ENCINDEX_ASCII
43 #define ENCINDEX_UTF_8 RUBY_ENCINDEX_UTF_8
44 #define ENCINDEX_US_ASCII RUBY_ENCINDEX_US_ASCII
45 #define ENCINDEX_UTF_16BE RUBY_ENCINDEX_UTF_16BE
46 #define ENCINDEX_UTF_16LE RUBY_ENCINDEX_UTF_16LE
47 #define ENCINDEX_UTF_32BE RUBY_ENCINDEX_UTF_32BE
48 #define ENCINDEX_UTF_32LE RUBY_ENCINDEX_UTF_32LE
49 #define ENCINDEX_UTF_16 RUBY_ENCINDEX_UTF_16
50 #define ENCINDEX_UTF_32 RUBY_ENCINDEX_UTF_32
51 #define ENCINDEX_UTF8_MAC RUBY_ENCINDEX_UTF8_MAC
52 #define ENCINDEX_EUC_JP RUBY_ENCINDEX_EUC_JP
53 #define ENCINDEX_Windows_31J RUBY_ENCINDEX_Windows_31J
54 #define ENCINDEX_BUILTIN_MAX RUBY_ENCINDEX_BUILTIN_MAX
55
56 #define rb_ascii8bit_encindex() RUBY_ENCINDEX_ASCII
57 #define rb_utf8_encindex() RUBY_ENCINDEX_UTF_8
58 #define rb_usascii_encindex() RUBY_ENCINDEX_US_ASCII
59
60 int rb_enc_find_index2(const char *name, long len);
61
62 #if defined(__cplusplus)
63 #if 0
64 { /* satisfy cc-mode */
65 #endif
66 } /* extern "C" { */
67 #endif
68
69 #endif /* RUBY_ENCINDEX_H */
rb_enc_find_index2
int rb_enc_find_index2(const char *name, long len)
Definition: encoding.c:717
ruby_preserved_encindex
ruby_preserved_encindex
Definition: encindex.h:21
RUBY_ENCINDEX_EUC_JP
@ RUBY_ENCINDEX_EUC_JP
Definition: encindex.h:45
RUBY_ENCINDEX_UTF_16LE
@ RUBY_ENCINDEX_UTF_16LE
Definition: encindex.h:37
RUBY_ENCINDEX_UTF_32BE
@ RUBY_ENCINDEX_UTF_32BE
Definition: encindex.h:38
RUBY_ENCINDEX_ASCII
@ RUBY_ENCINDEX_ASCII
Definition: encindex.h:31
RUBY_ENCINDEX_UTF_16BE
@ RUBY_ENCINDEX_UTF_16BE
Definition: encindex.h:36
RUBY_ENCINDEX_Windows_31J
@ RUBY_ENCINDEX_Windows_31J
Definition: encindex.h:46
RUBY_ENCINDEX_UTF_8
@ RUBY_ENCINDEX_UTF_8
Definition: encindex.h:32
RUBY_ENCINDEX_US_ASCII
@ RUBY_ENCINDEX_US_ASCII
Definition: encindex.h:33
RUBY_ENCINDEX_UTF_32LE
@ RUBY_ENCINDEX_UTF_32LE
Definition: encindex.h:39
RUBY_ENCINDEX_BUILTIN_MAX
@ RUBY_ENCINDEX_BUILTIN_MAX
Definition: encindex.h:48
RUBY_ENCINDEX_UTF_16
@ RUBY_ENCINDEX_UTF_16
Definition: encindex.h:40
len
uint8_t len
Definition: escape.c:17
RUBY_ENCINDEX_UTF8_MAC
@ RUBY_ENCINDEX_UTF8_MAC
Definition: encindex.h:42
RUBY_ENCINDEX_UTF_32
@ RUBY_ENCINDEX_UTF_32
Definition: encindex.h:41
name
const char * name
Definition: nkf.c:208