README 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. README 2018/04/05
  2. Oniguruma ---- (C) K.Kosako
  3. https://github.com/kkos/oniguruma
  4. FIXED Security Issues (in Oniguruma 6.3.0):
  5. CVE-2017-9224, CVE-2017-9225, CVE-2017-9226
  6. CVE-2017-9227, CVE-2017-9228, CVE-2017-9229
  7. ---
  8. Oniguruma is a modern and flexible regular expressions library. It
  9. encompasses features from different regular expression implementations
  10. that traditionally exist in different languages. It comes close to
  11. being a complete superset of all regular expression features found
  12. in other regular expression implementations.
  13. Its features include:
  14. * Character encoding can be specified per regular expression object.
  15. * Several regular expression types are supported:
  16. * POSIX
  17. * Grep
  18. * GNU Regex
  19. * Perl
  20. * Java
  21. * Ruby
  22. * Emacs
  23. Supported character encodings:
  24. ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
  25. EUC-JP, EUC-TW, EUC-KR, EUC-CN,
  26. Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
  27. ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
  28. ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
  29. ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
  30. * GB18030: contributed by KUBO Takehiro
  31. * CP1251: contributed by Byte
  32. ------------------------------------------------------------
  33. License
  34. BSD license.
  35. Install
  36. Case 1: Unix and Cygwin platform
  37. 1. autoreconf -vfi (* case: configure script is not found.)
  38. 2. ./configure
  39. 3. make
  40. 4. make install
  41. * uninstall
  42. make uninstall
  43. * configuration check
  44. onig-config --cflags
  45. onig-config --libs
  46. onig-config --prefix
  47. onig-config --exec-prefix
  48. Case 2: Windows 64/32bit platform (Visual Studio)
  49. execute make_win64 or make_win32
  50. src/onig_s.lib: static link library
  51. src/onig.dll: dynamic link library
  52. * test (ASCII/Shift_JIS)
  53. 1. cd src
  54. 2. copy ..\windows\testc.c .
  55. 3. nmake -f Makefile.windows ctest
  56. (I have checked by Visual Studio Community 2015)
  57. Regular Expressions
  58. See doc/RE (or doc/RE.ja for Japanese).
  59. Usage
  60. Include oniguruma.h in your program. (Oniguruma API)
  61. See doc/API for Oniguruma API.
  62. If you want to disable UChar type (== unsigned char) definition
  63. in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then
  64. include oniguruma.h.
  65. If you want to disable regex_t type definition in oniguruma.h,
  66. define ONIG_ESCAPE_REGEX_T_COLLISION and then include oniguruma.h.
  67. Example of the compiling/linking command line in Unix or Cygwin,
  68. (prefix == /usr/local case)
  69. cc sample.c -L/usr/local/lib -lonig
  70. If you want to use static link library(onig_s.lib) in Win32,
  71. add option -DONIG_EXTERN=extern to C compiler.
  72. Sample Programs
  73. sample/simple.c example of the minimum (Oniguruma API)
  74. sample/names.c example of the named group callback.
  75. sample/encode.c example of some encodings.
  76. sample/listcap.c example of the capture history.
  77. sample/posix.c POSIX API sample.
  78. sample/sql.c example of the variable meta characters.
  79. (SQL-like pattern matching)
  80. sample/user_property.c example of user defined Unicode property.
  81. Test Programs
  82. sample/syntax.c Perl, Java and ASIS syntax test.
  83. sample/crnl.c --enable-crnl-as-line-terminator test
  84. Source Files
  85. oniguruma.h Oniguruma API header file. (public)
  86. onig-config.in configuration check program template.
  87. regenc.h character encodings framework header file.
  88. regint.h internal definitions
  89. regparse.h internal definitions for regparse.c and regcomp.c
  90. regcomp.c compiling and optimization functions
  91. regenc.c character encodings framework.
  92. regerror.c error message function
  93. regext.c extended API functions. (deluxe version API)
  94. regexec.c search and match functions
  95. regparse.c parsing functions.
  96. regsyntax.c pattern syntax functions and built-in syntax definitions.
  97. regtrav.c capture history tree data traverse functions.
  98. regversion.c version info function.
  99. st.h hash table functions header file
  100. st.c hash table functions
  101. oniggnu.h GNU regex API header file. (public)
  102. reggnu.c GNU regex API functions
  103. onigposix.h POSIX API header file. (public)
  104. regposerr.c POSIX error message function.
  105. regposix.c POSIX API functions.
  106. mktable.c character type table generator.
  107. ascii.c ASCII encoding.
  108. euc_jp.c EUC-JP encoding.
  109. euc_tw.c EUC-TW encoding.
  110. euc_kr.c EUC-KR, EUC-CN encoding.
  111. sjis.c Shift_JIS encoding.
  112. big5.c Big5 encoding.
  113. gb18030.c GB18030 encoding.
  114. koi8.c KOI8 encoding.
  115. koi8_r.c KOI8-R encoding.
  116. cp1251.c CP1251 encoding.
  117. iso8859_1.c ISO-8859-1 encoding. (Latin-1)
  118. iso8859_2.c ISO-8859-2 encoding. (Latin-2)
  119. iso8859_3.c ISO-8859-3 encoding. (Latin-3)
  120. iso8859_4.c ISO-8859-4 encoding. (Latin-4)
  121. iso8859_5.c ISO-8859-5 encoding. (Cyrillic)
  122. iso8859_6.c ISO-8859-6 encoding. (Arabic)
  123. iso8859_7.c ISO-8859-7 encoding. (Greek)
  124. iso8859_8.c ISO-8859-8 encoding. (Hebrew)
  125. iso8859_9.c ISO-8859-9 encoding. (Latin-5 or Turkish)
  126. iso8859_10.c ISO-8859-10 encoding. (Latin-6 or Nordic)
  127. iso8859_11.c ISO-8859-11 encoding. (Thai)
  128. iso8859_13.c ISO-8859-13 encoding. (Latin-7 or Baltic Rim)
  129. iso8859_14.c ISO-8859-14 encoding. (Latin-8 or Celtic)
  130. iso8859_15.c ISO-8859-15 encoding. (Latin-9 or West European with Euro)
  131. iso8859_16.c ISO-8859-16 encoding.
  132. (Latin-10 or South-Eastern European with Euro)
  133. utf8.c UTF-8 encoding.
  134. utf16_be.c UTF-16BE encoding.
  135. utf16_le.c UTF-16LE encoding.
  136. utf32_be.c UTF-32BE encoding.
  137. utf32_le.c UTF-32LE encoding.
  138. unicode.c common codes of Unicode encoding.
  139. win32/Makefile Makefile for Win32 (VC++)
  140. win32/config.h config.h for Win32
  141. and I'm thankful to Akinori MUSHA.