]> granicus.if.org Git - onig/blob - README.md
fix format of README.md
[onig] / README.md
1 Oniguruma
2 =========
3
4 https://github.com/kkos/oniguruma
5
6 Oniguruma is a regular expressions library.
7 The characteristics of this library is that different character encoding
8 for every regular expression object can be specified.
9
10 Supported character encodings:
11
12   ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
13   EUC-JP, EUC-TW, EUC-KR, EUC-CN,
14   Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
15   ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
16   ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
17   ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
18
19 * GB18030: contributed by KUBO Takehiro
20 * CP1251:  contributed by Byte
21
22
23 License
24 -------
25
26   BSD license.
27
28
29 Install
30 -------
31
32 ### Case 1: Unix and Cygwin platform
33
34    1. ./configure
35    2. make
36    3. make install
37
38    * uninstall
39
40      make uninstall
41
42    * test (ASCII/EUC-JP)
43
44      make atest
45
46    * configuration check
47
48      onig-config --cflags
49      onig-config --libs
50      onig-config --prefix
51      onig-config --exec-prefix
52
53
54
55 ### Case 2: Win32 platform (VC++)
56
57    1. copy win32\Makefile Makefile
58    2. copy win32\config.h config.h
59    3. nmake
60
61       onig_s.lib:  static link library
62       onig.dll:    dynamic link library
63
64    * test (ASCII/Shift_JIS)
65
66    4. copy win32\testc.c testc.c
67    5. nmake ctest
68
69
70
71 Regular Expressions
72 -------------------
73
74   See [doc/RE](doc/RE) or [doc/RE.ja](doc/RE.ja) for Japanese.
75
76
77 Usage
78 -----
79
80   Include oniguruma.h in your program. (Oniguruma API)
81   See doc/API for Oniguruma API.
82
83   If you want to disable UChar type (== unsigned char) definition
84   in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then 
85   include oniguruma.h.
86
87   If you want to disable regex_t type definition in oniguruma.h,
88   define ONIG_ESCAPE_REGEX_T_COLLISION and then include oniguruma.h.
89
90   Example of the compiling/linking command line in Unix or Cygwin,
91   (prefix == /usr/local case)
92
93     cc sample.c -L/usr/local/lib -lonig
94
95
96   If you want to use static link library(onig_s.lib) in Win32,
97   add option -DONIG_EXTERN=extern to C compiler.
98
99
100
101 Sample Programs
102 ---------------
103
104 |sample/simple.c    |example of the minimum (Oniguruma API)   |
105 |sample/names.c     |example of the named group callback.     |
106 |sample/encode.c    |example of some encodings.               |
107 |sample/listcap.c   |example of the capture history.          |
108 |sample/posix.c     |POSIX API sample.                        |
109 |sample/sql.c       |example of the variable meta characters. |
110
111
112 Test Programs
113
114 |sample/syntax.c    |Perl, Java and ASIS syntax test.       |
115 |sample/crnl.c      |--enable-crnl-as-line-terminator test  |
116
117
118 Source Files
119 ------------
120
121 |oniguruma.h        |Oniguruma API header file (public)                      |
122 |onig-config.in     |configuration check program template                    |
123 |regenc.h           |character encodings framework header file               |
124 |regint.h           |internal definitions                                    |
125 |regparse.h         |internal definitions for regparse.c and regcomp.c       |
126 |regcomp.c          |compiling and optimization functions                    |
127 |regenc.c           |character encodings framework                           |
128 |regerror.c         |error message function                                  |
129 |regext.c           |extended API functions (deluxe version API)             |
130 |regexec.c          |search and match functions                              |
131 |regparse.c         |parsing functions.                                      |
132 |regsyntax.c        |pattern syntax functions and built-in syntax definitions|
133 |regtrav.c          |capture history tree data traverse functions            |
134 |regversion.c       |version info function                                   |
135 |st.h               |hash table functions header file                        |
136 |st.c               |hash table functions                                    |
137 |oniggnu.h          |GNU regex API header file (public)                      |
138 |reggnu.c           |GNU regex API functions                                 |
139 |onigposix.h        |POSIX API header file (public)                          |
140 |regposerr.c        |POSIX error message function                            |
141 |regposix.c         |POSIX API functions                                     |
142 |enc/mktable.c      |character type table generator                          |
143 |enc/ascii.c        |ASCII encoding                                          |
144 |enc/euc_jp.c       |EUC-JP encoding                                         |
145 |enc/euc_tw.c       |EUC-TW encoding                                         |
146 |enc/euc_kr.c       |EUC-KR, EUC-CN encoding                                 |
147 |enc/sjis.c         |Shift_JIS encoding                                      |
148 |enc/big5.c         |Big5      encoding                                      |
149 |enc/gb18030.c      |GB18030   encoding                                      |
150 |enc/koi8.c         |KOI8      encoding                                      |
151 |enc/koi8_r.c       |KOI8-R    encoding                                      |
152 |enc/cp1251.c       |CP1251    encoding                                      |
153 |enc/iso8859_1.c    |ISO-8859-1 (Latin-1)                                    |
154 |enc/iso8859_2.c    |ISO-8859-2 (Latin-2)                                    |
155 |enc/iso8859_3.c    |ISO-8859-3 (Latin-3)                                    |
156 |enc/iso8859_4.c    |ISO-8859-4 (Latin-4)                                    |
157 |enc/iso8859_5.c    |ISO-8859-5 (Cyrillic)                                   |
158 |enc/iso8859_6.c    |ISO-8859-6 (Arabic)                                     |
159 |enc/iso8859_7.c    |ISO-8859-7 (Greek)                                      |
160 |enc/iso8859_8.c    |ISO-8859-8 (Hebrew)                                     |
161 |enc/iso8859_9.c    |ISO-8859-9 (Latin-5 or Turkish)                         |
162 |enc/iso8859_10.c   |ISO-8859-10 (Latin-6 or Nordic)                         |
163 |enc/iso8859_11.c   |ISO-8859-11 (Thai)                                      |
164 |enc/iso8859_13.c   |ISO-8859-13 (Latin-7 or Baltic Rim)                     |
165 |enc/iso8859_14.c   |ISO-8859-14 (Latin-8 or Celtic)                         |
166 |enc/iso8859_15.c   |ISO-8859-15 (Latin-9 or West European with Euro)        |
167 |enc/iso8859_16.c   |ISO-8859-16 (Latin-10)                                  |
168 |enc/utf8.c         |UTF-8    encoding                                       |
169 |enc/utf16_be.c     |UTF-16BE encoding                                       |
170 |enc/utf16_le.c     |UTF-16LE encoding                                       |
171 |enc/utf32_be.c     |UTF-32BE encoding                                       |
172 |enc/utf32_le.c     |UTF-32LE encoding                                       |
173 |enc/unicode.c      |Unicode information data                                |
174 |win32/Makefile     |Makefile for Win32 (VC++)                               |
175 |win32/config.h     |config.h for Win32                                      |