|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| cmake/ | H | 03-May-2022 | - | 5 | 3 |
| doc/ | H | 03-May-2022 | - | 6,309 | 4,291 |
| harnesses/ | H | 03-May-2022 | - | 1,597 | 1,285 |
| m4/ | H | 03-May-2022 | - | | |
| sample/ | H | 03-May-2022 | - | 2,018 | 1,612 |
| src/ | H | 03-May-2022 | - | 90,122 | 77,035 |
| test/ | H | 03-May-2022 | - | 6,679 | 6,167 |
| tis-ci/ | H | 03-May-2022 | - | 267 | 178 |
| windows/ | H | 03-May-2022 | - | 866 | 837 |
| .gitignore | H A D | 01-Jan-1970 | 1 KiB | 84 | 79 |
| .travis.yml | H A D | 01-Jan-1970 | 174 | 18 | 12 |
| AUTHORS | H A D | 01-Jan-1970 | 32 | 2 | 1 |
| COPYING | H A D | 01-Jan-1970 | 1.3 KiB | 27 | 23 |
| ChangeLog | H A D | 01-Jan-1970 | 0 | | |
| HISTORY | H A D | 01-Jan-1970 | 120 KiB | 2,461 | 2,176 |
| INSTALL | H A D | 01-Jan-1970 | 15.4 KiB | 369 | 287 |
| Makefile.am | H A D | 01-Jan-1970 | 2.1 KiB | 87 | 64 |
| NEWS | H A D | 01-Jan-1970 | 0 | | |
| README | H A D | 01-Jan-1970 | 6.3 KiB | 204 | 147 |
| README.md | H A D | 01-Jan-1970 | 11.7 KiB | 297 | 214 |
| README_japanese | H A D | 01-Jan-1970 | 6.6 KiB | 184 | 131 |
| autogen.sh | H A D | 01-Jan-1970 | 219 | 10 | 4 |
| compile | H A D | 01-Jan-1970 | 7.2 KiB | 349 | 259 |
| config.guess | H A D | 01-Jan-1970 | 47.8 KiB | 1,688 | 1,475 |
| config.sub | H A D | 01-Jan-1970 | 33.3 KiB | 1,852 | 1,675 |
| configure.ac | H A D | 01-Jan-1970 | 2.6 KiB | 102 | 79 |
| depcomp | H A D | 01-Jan-1970 | 23 KiB | 792 | 502 |
| install-sh | H A D | 01-Jan-1970 | 15 KiB | 542 | 352 |
| make_win.bat | H A D | 01-Jan-1970 | 158 | 6 | 5 |
| make_win32.bat | H A D | 01-Jan-1970 | 153 | 6 | 5 |
| make_win64.bat | H A D | 01-Jan-1970 | 153 | 6 | 5 |
| missing | H A D | 01-Jan-1970 | 6.7 KiB | 216 | 143 |
| onig-config.in | H A D | 01-Jan-1970 | 1.3 KiB | 79 | 65 |
| oniguruma.pc.cmake.in | H A D | 01-Jan-1970 | 302 | 14 | 12 |
| oniguruma.pc.in | H A D | 01-Jan-1970 | 269 | 14 | 12 |
| test-driver | H A D | 01-Jan-1970 | 4.6 KiB | 151 | 88 |
| tis.config | H A D | 01-Jan-1970 | 42.1 KiB | 1,337 | 1,336 |
README
1README 2018/04/05
2
3Oniguruma ---- (C) K.Kosako
4
5https://github.com/kkos/oniguruma
6
7FIXED Security Issues (in Oniguruma 6.3.0):
8 CVE-2017-9224, CVE-2017-9225, CVE-2017-9226
9 CVE-2017-9227, CVE-2017-9228, CVE-2017-9229
10
11---
12Oniguruma is a modern and flexible regular expressions library. It
13encompasses features from different regular expression implementations
14that traditionally exist in different languages. It comes close to
15being a complete superset of all regular expression features found
16in other regular expression implementations.
17
18Its features include:
19* Character encoding can be specified per regular expression object.
20* Several regular expression types are supported:
21 * POSIX
22 * Grep
23 * GNU Regex
24 * Perl
25 * Java
26 * Ruby
27 * Emacs
28
29Supported character encodings:
30
31 ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
32 EUC-JP, EUC-TW, EUC-KR, EUC-CN,
33 Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
34 ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
35 ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
36 ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
37
38* GB18030: contributed by KUBO Takehiro
39* CP1251: contributed by Byte
40------------------------------------------------------------
41
42License
43
44 BSD license.
45
46
47Install
48
49 Case 1: Linux distribution packages
50
51 * Fedora: dnf install oniguruma
52 * RHEL/CentOS: yum install oniguruma
53 * Debian/Ubuntu: apt install libonig5
54 * Arch: pacman -S oniguruma
55 * openSUSE: zypper install oniguruma
56
57 Case 2: Manual compilation on Linux, Unix, and Cygwin platform
58
59 1. autoreconf -vfi (* case: configure script is not found.)
60
61 2. ./configure
62 3. make
63 4. make install
64
65 * uninstall
66
67 make uninstall
68
69 * configuration check
70
71 onig-config --cflags
72 onig-config --libs
73 onig-config --prefix
74 onig-config --exec-prefix
75
76
77
78 Case 3: Windows 64/32bit platform (Visual Studio)
79
80 execute make_win64 or make_win32
81
82 src/onig_s.lib: static link library
83 src/onig.dll: dynamic link library
84
85 * test (ASCII/Shift_JIS)
86 1. cd src
87 2. copy ..\windows\testc.c .
88 3. nmake -f Makefile.windows ctest
89
90 (I have checked by Visual Studio Community 2015)
91
92
93
94Regular Expressions
95
96 See doc/RE (or doc/RE.ja for Japanese).
97
98
99Usage
100
101 Include oniguruma.h in your program. (Oniguruma API)
102 See doc/API for Oniguruma API.
103
104 If you want to disable UChar type (== unsigned char) definition
105 in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then
106 include oniguruma.h.
107
108 If you want to disable regex_t type definition in oniguruma.h,
109 define ONIG_ESCAPE_REGEX_T_COLLISION and then include oniguruma.h.
110
111 Example of the compiling/linking command line in Unix or Cygwin,
112 (prefix == /usr/local case)
113
114 cc sample.c -L/usr/local/lib -lonig
115
116
117 If you want to use static link library(onig_s.lib) in Win32,
118 add option -DONIG_EXTERN=extern to C compiler.
119
120
121
122Sample Programs
123
124 sample/simple.c example of the minimum (Oniguruma API)
125 sample/names.c example of the named group callback.
126 sample/encode.c example of some encodings.
127 sample/listcap.c example of the capture history.
128 sample/posix.c POSIX API sample.
129 sample/sql.c example of the variable meta characters.
130 (SQL-like pattern matching)
131 sample/user_property.c example of user defined Unicode property.
132
133Test Programs
134 sample/syntax.c Perl, Java and ASIS syntax test.
135 sample/crnl.c --enable-crnl-as-line-terminator test
136
137
138Source Files
139
140 oniguruma.h Oniguruma API header file. (public)
141 onig-config.in configuration check program template.
142
143 regenc.h character encodings framework header file.
144 regint.h internal definitions
145 regparse.h internal definitions for regparse.c and regcomp.c
146 regcomp.c compiling and optimization functions
147 regenc.c character encodings framework.
148 regerror.c error message function
149 regext.c extended API functions. (deluxe version API)
150 regexec.c search and match functions
151 regparse.c parsing functions.
152 regsyntax.c pattern syntax functions and built-in syntax definitions.
153 regtrav.c capture history tree data traverse functions.
154 regversion.c version info function.
155 st.h hash table functions header file
156 st.c hash table functions
157
158 oniggnu.h GNU regex API header file. (public)
159 reggnu.c GNU regex API functions
160
161 onigposix.h POSIX API header file. (public)
162 regposerr.c POSIX error message function.
163 regposix.c POSIX API functions.
164
165 mktable.c character type table generator.
166 ascii.c ASCII encoding.
167 euc_jp.c EUC-JP encoding.
168 euc_tw.c EUC-TW encoding.
169 euc_kr.c EUC-KR, EUC-CN encoding.
170 sjis.c Shift_JIS encoding.
171 big5.c Big5 encoding.
172 gb18030.c GB18030 encoding.
173 koi8.c KOI8 encoding.
174 koi8_r.c KOI8-R encoding.
175 cp1251.c CP1251 encoding.
176 iso8859_1.c ISO-8859-1 encoding. (Latin-1)
177 iso8859_2.c ISO-8859-2 encoding. (Latin-2)
178 iso8859_3.c ISO-8859-3 encoding. (Latin-3)
179 iso8859_4.c ISO-8859-4 encoding. (Latin-4)
180 iso8859_5.c ISO-8859-5 encoding. (Cyrillic)
181 iso8859_6.c ISO-8859-6 encoding. (Arabic)
182 iso8859_7.c ISO-8859-7 encoding. (Greek)
183 iso8859_8.c ISO-8859-8 encoding. (Hebrew)
184 iso8859_9.c ISO-8859-9 encoding. (Latin-5 or Turkish)
185 iso8859_10.c ISO-8859-10 encoding. (Latin-6 or Nordic)
186 iso8859_11.c ISO-8859-11 encoding. (Thai)
187 iso8859_13.c ISO-8859-13 encoding. (Latin-7 or Baltic Rim)
188 iso8859_14.c ISO-8859-14 encoding. (Latin-8 or Celtic)
189 iso8859_15.c ISO-8859-15 encoding. (Latin-9 or West European with Euro)
190 iso8859_16.c ISO-8859-16 encoding.
191 (Latin-10 or South-Eastern European with Euro)
192 utf8.c UTF-8 encoding.
193 utf16_be.c UTF-16BE encoding.
194 utf16_le.c UTF-16LE encoding.
195 utf32_be.c UTF-32BE encoding.
196 utf32_le.c UTF-32LE encoding.
197 unicode.c common codes of Unicode encoding.
198
199 win32/Makefile Makefile for Win32 (VC++)
200 win32/config.h config.h for Win32
201
202
203and I'm thankful to Akinori MUSHA.
204
README.md
1[![Build Status](https://travis-ci.org/kkos/oniguruma.svg?branch=master)](https://travis-ci.org/kkos/oniguruma)
2[![Code Quality: Cpp](https://img.shields.io/lgtm/grade/cpp/g/kkos/oniguruma.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kkos/oniguruma/context:cpp)
3[![Total Alerts](https://img.shields.io/lgtm/alerts/g/kkos/oniguruma.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kkos/oniguruma/alerts)
4[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/oniguruma.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#oniguruma)
5[![TrustInSoft CI](https://ci.trust-in-soft.com/projects/kkos/oniguruma.svg?branch=master)](https://ci.trust-in-soft.com/projects/kkos/oniguruma)
6
7Oniguruma
8=========
9
10https://github.com/kkos/oniguruma
11
12Oniguruma is a modern and flexible regular expressions library. It
13encompasses features from different regular expression implementations
14that traditionally exist in different languages.
15
16Character encoding can be specified per regular expression object.
17
18Supported character encodings:
19
20 ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
21 EUC-JP, EUC-TW, EUC-KR, EUC-CN,
22 Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
23 ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
24 ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
25 ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
26
27* GB18030: contributed by KUBO Takehiro
28* CP1251: contributed by Byte
29* doc/SYNTAX.md: contributed by seanofw
30
31
32Notice (from 6.9.6)
33-------------------
34When using configure script, if you have the POSIX API enabled in an earlier version (disabled by default in 6.9.5) and you need application binary compatibility with the POSIX API, specify "--enable-binary-compatible-posix-api=yes" instead of "--enable-posix-api=yes". Starting in 6.9.6, "--enable-posix-api=yes" only supports source-level compatibility for 6.9.5 and earlier about POSIX API. (Issue #210)
35
36
37Version 6.9.7
38-------------
39* NEW API: ONIG_OPTION_CALLBACK_EACH_MATCH
40* NEW API: ONIG_OPTION_IGNORECASE_IS_ASCII
41* NEW API: ONIG_SYNTAX_PYTHON
42* Fixed some problems found by OSS-Fuzz
43
44
45Version 6.9.6
46-------------
47* NEW: configure option --enable-binary-compatible-posix-api=[yes/no]
48* NEW API: Limiting the maximum number of calls of subexp-call
49* NEW API: ONIG_OPTION_NOT_BEGIN_STRING / NOT_END_STRING / NOT_BEGIN_POSITION
50* Fixed behavior of ONIG_OPTION_NOTBOL / NOTEOL
51* Fixed many problems found by OSS-Fuzz
52* Fixed many problems found by Coverity
53* Fixed CVE-2020-26159 (This turned out not to be a problem later. #221)
54* Under cygwin and mingw, generate and install the libonig.def file (Issue #220)
55
56
57Version 6.9.5 revised 1
58-----------------------
59
60* Fixed Issue #192
61
62
63Version 6.9.5
64-------------
65
66* POSIX API disabled by default for Unix (* Enabled by: configure --enable-posix-api=yes)
67* Update Unicode version 13.0.0
68* NEW: Code point sequence notation \x{HHHH HHHH ...}, \o{OOOO OOOO ...}
69* NEW API: retry limit in search functions
70* NEW API: maximum nesting level of subexp call
71* Fixed behavior of isolated options in Perl and Java syntaxes. /...(?i).../
72
73
74Version 6.9.4
75-------------
76
77* NEW API: RegSet (set of regexes)
78* Fixed CVE-2019-19012
79* Fixed CVE-2019-19203 (Does not affect UTF-8, UTF-16 and UTF-32 encodings)
80* Fixed CVE-2019-19204 (Affects only PosixBasic, Emacs and Grep syntaxes)
81* Fixed CVE-2019-19246
82* Fixed some problems (found by libFuzzer test)
83
84
85Version 6.9.3 (security fix release)
86------------------------------------
87
88* Fixed CVE-2019-13224
89* Fixed CVE-2019-13225
90* Fixed CVE-2019-16163
91* Fixed many problems (found by libFuzzer test)
92
93
94Version 6.9.2 (Reiwa)
95---------------------
96
97* add doc/SYNTAX.md
98* Direct threaded code (for GCC and Clang)
99* Update Unicode version 12.1.0
100* NEW: Unicode Text Segment mode option (?y{g}) (?y{w}) (*original)
101
102
103Version 6.9.1
104-------------
105
106* Speed improvement (* especially UTF-8)
107
108
109Version 6.9.0
110-------------
111
112* Update Unicode version 11.0.0
113* NEW: add Emoji properties
114
115
116License
117-------
118
119 BSD license.
120
121
122Install
123-------
124
125### Case 1: Linux distribution packages
126
127 * Fedora: `dnf install oniguruma`
128 * RHEL/CentOS: `yum install oniguruma`
129 * Debian/Ubuntu: `apt install libonig5`
130 * Arch: `pacman -S oniguruma`
131 * openSUSE: `zypper install oniguruma`
132
133### Case 2: Manual compilation on Linux, Unix, and Cygwin platform
134
135 1. autoreconf -vfi (* case: configure script is not found.)
136
137 2. ./configure
138 3. make
139 4. make install
140
141 * uninstall
142
143 make uninstall
144
145 * configuration check
146
147 onig-config --cflags
148 onig-config --libs
149 onig-config --prefix
150 onig-config --exec-prefix
151
152
153
154### Case 3: Windows 64/32bit platform (Visual Studio)
155
156 * build library
157
158 .\make_win.bat
159
160 onig_s.lib: static link library
161 onig.dll: dynamic link library
162
163 * make test programs
164
165 .\make_win.bat all-test
166
167
168Alternatively, you can build and install oniguruma using [vcpkg](https://github.com/microsoft/vcpkg/) dependency manager:
169
170 1. git clone https://github.com/Microsoft/vcpkg.git
171 2. cd vcpkg
172 3. ./bootstrap-vcpkg.bat
173 4. ./vcpkg integrate install
174 5. ./vcpkg install oniguruma
175
176The oniguruma port in vcpkg is kept up to date by microsoft team members and community contributors.
177If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
178
179Regular Expressions
180-------------------
181
182 See [doc/RE](doc/RE) or [doc/RE.ja](doc/RE.ja) for Japanese.
183
184
185Usage
186-----
187
188 Include oniguruma.h in your program. (Oniguruma API)
189 See doc/API for Oniguruma API.
190
191 If you want to disable UChar type (== unsigned char) definition
192 in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then
193 include oniguruma.h.
194
195 If you want to disable regex_t type definition in oniguruma.h,
196 define ONIG_ESCAPE_REGEX_T_COLLISION and then include oniguruma.h.
197
198 Example of the compiling/linking command line in Unix or Cygwin,
199 (prefix == /usr/local case)
200
201 cc sample.c -L/usr/local/lib -lonig
202
203
204 If you want to use static link library(onig_s.lib) in Win32,
205 add option -DONIG_EXTERN=extern to C compiler.
206
207
208
209Sample Programs
210---------------
211
212|File |Description |
213|:---------------------|:-----------------------------------------|
214|sample/callout.c |example of callouts |
215|sample/count.c |example of built-in callout *COUNT |
216|sample/echo.c |example of user defined callouts of name |
217|sample/encode.c |example of some encodings |
218|sample/listcap.c |example of the capture history |
219|sample/names.c |example of the named group callback |
220|sample/posix.c |POSIX API sample |
221|sample/regset.c |example of using RegSet API |
222|sample/scan.c |example of using onig_scan() |
223|sample/simple.c |example of the minimum (Oniguruma API) |
224|sample/sql.c |example of the variable meta characters |
225|sample/user_property.c|example of user defined Unicode property |
226
227
228Test Programs
229
230|File |Description |
231|:------------------|:--------------------------------------|
232|sample/syntax.c |Perl, Java and ASIS syntax test. |
233|sample/crnl.c |--enable-crnl-as-line-terminator test |
234
235
236
237Source Files
238------------
239
240|File |Description |
241|:------------------|:-------------------------------------------------------|
242|oniguruma.h |Oniguruma API header file (public) |
243|onig-config.in |configuration check program template |
244|regenc.h |character encodings framework header file |
245|regint.h |internal definitions |
246|regparse.h |internal definitions for regparse.c and regcomp.c |
247|regcomp.c |compiling and optimization functions |
248|regenc.c |character encodings framework |
249|regerror.c |error message function |
250|regext.c |extended API functions (deluxe version API) |
251|regexec.c |search and match functions |
252|regparse.c |parsing functions. |
253|regsyntax.c |pattern syntax functions and built-in syntax definitions|
254|regtrav.c |capture history tree data traverse functions |
255|regversion.c |version info function |
256|st.h |hash table functions header file |
257|st.c |hash table functions |
258|oniggnu.h |GNU regex API header file (public) |
259|reggnu.c |GNU regex API functions |
260|onigposix.h |POSIX API header file (public) |
261|regposerr.c |POSIX error message function |
262|regposix.c |POSIX API functions |
263|mktable.c |character type table generator |
264|ascii.c |ASCII encoding |
265|euc_jp.c |EUC-JP encoding |
266|euc_tw.c |EUC-TW encoding |
267|euc_kr.c |EUC-KR, EUC-CN encoding |
268|sjis.c |Shift_JIS encoding |
269|big5.c |Big5 encoding |
270|gb18030.c |GB18030 encoding |
271|koi8.c |KOI8 encoding |
272|koi8_r.c |KOI8-R encoding |
273|cp1251.c |CP1251 encoding |
274|iso8859_1.c |ISO-8859-1 (Latin-1) |
275|iso8859_2.c |ISO-8859-2 (Latin-2) |
276|iso8859_3.c |ISO-8859-3 (Latin-3) |
277|iso8859_4.c |ISO-8859-4 (Latin-4) |
278|iso8859_5.c |ISO-8859-5 (Cyrillic) |
279|iso8859_6.c |ISO-8859-6 (Arabic) |
280|iso8859_7.c |ISO-8859-7 (Greek) |
281|iso8859_8.c |ISO-8859-8 (Hebrew) |
282|iso8859_9.c |ISO-8859-9 (Latin-5 or Turkish) |
283|iso8859_10.c |ISO-8859-10 (Latin-6 or Nordic) |
284|iso8859_11.c |ISO-8859-11 (Thai) |
285|iso8859_13.c |ISO-8859-13 (Latin-7 or Baltic Rim) |
286|iso8859_14.c |ISO-8859-14 (Latin-8 or Celtic) |
287|iso8859_15.c |ISO-8859-15 (Latin-9 or West European with Euro) |
288|iso8859_16.c |ISO-8859-16 (Latin-10) |
289|utf8.c |UTF-8 encoding |
290|utf16_be.c |UTF-16BE encoding |
291|utf16_le.c |UTF-16LE encoding |
292|utf32_be.c |UTF-32BE encoding |
293|utf32_le.c |UTF-32LE encoding |
294|unicode.c |common codes of Unicode encoding |
295|unicode_fold_data.c|Unicode folding data |
296|windows/testc.c |Test program for Windows (VC++) |
297
README_japanese
1README.ja 2017/08/25
2
3鬼車 ---- (C) K.Kosako <kkosako0@gmail.com>
4
5https://github.com/kkos/oniguruma
6
7鬼車は正規表現ライブラリである。
8このライブラリの特長は、それぞれの正規表現オブジェクトごとに
9文字エンコーディングを指定できることである。
10
11サポートしている文字エンコーディング:
12
13 ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
14 EUC-JP, EUC-TW, EUC-KR, EUC-CN,
15 Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
16 ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
17 ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
18 ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
19
20* GB18030: 久保健洋氏提供
21* CP1251: Byte氏提供
22------------------------------------------------------------
23
24ライセンス
25
26 BSDライセンス
27
28
29インストール
30
31 ケース1: UnixとCygwin環境
32
33 1. autoreconf -vfi (* configureスクリプトがないときだけ)
34
35 2. ./configure
36 3. make
37 4. make install
38
39 アンインストール
40
41 make uninstall
42
43 構成確認
44
45 onig-config --cflags
46 onig-config --libs
47 onig-config --prefix
48 onig-config --exec-prefix
49
50
51
52 ケース2: Windows 64/32bit (Visual Studio)環境
53
54 make_win64 あるいは make_win32 を実行
55
56 onig_s.lib: static link library
57 onig.dll: dynamic link library
58
59 * 動作テスト (ASCII/Shift_JIS)
60 1. cd src
61 2. copy ..\windows\testc.c .
62 3. nmake -f Makefile.windows ctest
63
64 (Visual Studio Community 2015 で動作確認)
65
66
67
68正規表現
69
70 doc/RE.jaを参照
71
72
73使用方法
74
75 使用するプログラムで、oniguruma.hをインクルードする(Oniguruma APIの場合)。
76 Oniguruma APIについては、doc/API.jaを参照。
77
78 oniguruma.hで定義されている型名UChar(== unsigned char)を無効にしたい場合
79 には、ONIG_ESCAPE_UCHAR_COLLISIONをdefineしてからoniguruma.hをインクルード
80 すること。このときにはUCharは定義されず、OnigUCharという名前の定義のみが
81 有効になる。
82
83 oniguruma.hで定義されている型名regex_tを無効にしたい場合には、
84 ONIG_ESCAPE_REGEX_T_COLLISIONをdefineしてからoniguruma.hをインクルード
85 すること。このときにはregex_tは定義されず、OnigRegexType, OnigRegexという
86 名前の定義のみが有効になる。
87
88 Unix/Cygwin上でコンパイル、リンクする場合の例:
89 (prefixが/usr/localのとき)
90 cc sample.c -L/usr/local/lib -lonig
91
92 GNU libtoolを使用しているので、プラットフォームが共有ライブラリをサポートして
93 いれば、使用できるようになっている。
94 静的ライブラリと共有ライブラリのどちらを使用するかを指定する方法、実行時点での
95 環境設定方法については、自分で調べて下さい。
96
97
98 Win32でスタティックリンクライブラリ(onig_s.lib)をリンクする場合には、
99 コンパイルするときに -DONIG_EXTERN=extern をコンパイル引数に追加すること。
100
101
102使用例プログラム
103
104 sample/simple.c 最小例 (Oniguruma API)
105 sample/names.c 名前付きグループコールバック使用例
106 sample/encode.c 幾つかの文字エンコーディング使用例
107 sample/listcap.c 捕獲履歴機能の使用例
108 sample/posix.c POSIX API使用例
109 sample/sql.c 可変メタ文字機能使用例 (SQL-like パターン)
110 sample/user_property.c ユーザ定義Unicodeプロパティの使用例
111
112
113テストプログラム
114 sample/syntax.c Perl、Java、ASIS文法のテスト
115 sample/crnl.c --enable-crnl-as-line-terminator テスト
116
117
118ソースファイル
119
120 oniguruma.h 鬼車APIヘッダ (公開)
121 onig-config.in onig-configプログラム テンプレート
122
123 regenc.h 文字エンコーディング枠組みヘッダ
124 regint.h 内部宣言
125 regparse.h regparse.cとregcomp.cのための内部宣言
126 regcomp.c コンパイル、最適化関数
127 regenc.c 文字エンコーディング枠組み
128 regerror.c エラーメッセージ関数
129 regext.c 拡張API関数
130 regexec.c 検索、照合関数
131 regparse.c 正規表現パターン解析関数
132 regsyntax.c 正規表現パターン文法関数、組込み文法定義
133 regtrav.c 捕獲履歴木巡回関数
134 regversion.c 版情報関数
135 st.h ハッシュテーブル関数宣言
136 st.c ハッシュテーブル関数
137
138 oniggnu.h GNU regex APIヘッダ (公開)
139 reggnu.c GNU regex API関数
140
141 onigposix.h POSIX APIヘッダ (公開)
142 regposerr.c POSIX APIエラーメッセージ関数
143 regposix.c POSIX API関数
144
145 mktable.c 文字タイプテーブル生成プログラム
146 ascii.c ASCII エンコーディング
147 euc_jp.c EUC-JP エンコーディング
148 euc_tw.c EUC-TW エンコーディング
149 euc_kr.c EUC-KR, EUC-CN エンコーディング
150 sjis.c Shift_JIS エンコーディング
151 big5.c Big5 エンコーディング
152 gb18030.c GB18030 エンコーディング
153 koi8.c KOI8 エンコーディング
154 koi8_r.c KOI8-R エンコーディング
155 cp1251.c CP1251 エンコーディング
156 iso8859_1.c ISO-8859-1 (Latin-1)
157 iso8859_2.c ISO-8859-2 (Latin-2)
158 iso8859_3.c ISO-8859-3 (Latin-3)
159 iso8859_4.c ISO-8859-4 (Latin-4)
160 iso8859_5.c ISO-8859-5 (Cyrillic)
161 iso8859_6.c ISO-8859-6 (Arabic)
162 iso8859_7.c ISO-8859-7 (Greek)
163 iso8859_8.c ISO-8859-8 (Hebrew)
164 iso8859_9.c ISO-8859-9 (Latin-5 または Turkish)
165 iso8859_10.c ISO-8859-10 (Latin-6 または Nordic)
166 iso8859_11.c ISO-8859-11 (Thai)
167 iso8859_13.c ISO-8859-13 (Latin-7 または Baltic Rim)
168 iso8859_14.c ISO-8859-14 (Latin-8 または Celtic)
169 iso8859_15.c ISO-8859-15 (Latin-9 または West European with Euro)
170 iso8859_16.c ISO-8859-16
171 (Latin-10 または South-Eastern European with Euro)
172 utf8.c UTF-8 エンコーディング
173 utf16_be.c UTF-16BE エンコーディング
174 utf16_le.c UTF-16LE エンコーディング
175 utf32_be.c UTF-32BE エンコーディング
176 utf32_le.c UTF-32LE エンコーディング
177 unicode.c Unicodeエンコーディングの共通処理
178
179 win32/Makefile Win32用 Makefile (for VC++)
180 win32/config.h Win32用 config.h
181
182
183and I'm thankful to Akinori MUSHA.
184