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