pax_global_header 0000666 0000000 0000000 00000000064 13212423352 0014507 g ustar 00root root 0000000 0000000 52 comment=75031662de5e1fb225a61da190f40ec9949e21a3
oniguruma-6.7.0/ 0000775 0000000 0000000 00000000000 13212423352 0013527 5 ustar 00root root 0000000 0000000 oniguruma-6.7.0/.gitignore 0000664 0000000 0000000 00000000340 13212423352 0015514 0 ustar 00root root 0000000 0000000 Makefile
autom4te.cache/
ltmain.sh
stamp-h1
configure
config.status
config.h
config.h.in
onig-config
libtool
aclocal.m4
Makefile.in
*.o
*.obj
*.so
*.lo
*.la
*.pc
*.log
*.dll
*.lib
*.exe
*.exp
*~
.libs/
.deps/
/build
m4/*.m4
oniguruma-6.7.0/AUTHORS 0000664 0000000 0000000 00000000040 13212423352 0014571 0 ustar 00root root 0000000 0000000 (K.Kosako)
oniguruma-6.7.0/CMakeLists.txt 0000664 0000000 0000000 00000006070 13212423352 0016272 0 ustar 00root root 0000000 0000000
cmake_minimum_required(VERSION 2.8)
# required for exports? cmake_minimum_required (VERSION 2.8.6)
project(oniguruma C)
set(PACKAGE onig)
set(PACKAGE_VERSION "6.6.0")
set(USE_COMBINATION_EXPLOSION_CHECK 0)
set(USE_CRNL_AS_LINE_TERMINATOR 0)
set(VERSION ${PACKAGE_VERSION})
if(MSVC)
# Force to always compile with W4
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
elseif(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
elseif(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
endif()
include(cmake/dist.cmake)
include(CheckCSourceCompiles)
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(CheckTypeSize)
include(TestBigEndian)
check_function_exists(alloca HAVE_ALLOCA)
check_include_files(alloca.h HAVE_ALLOCA_H)
set(HAVE_PROTOTYPES 1)
check_include_files(stdarg.h HAVE_STDARG_PROTOTYPES)
check_include_files(stdint.h HAVE_STDINT_H)
check_include_files(stdlib.h HAVE_STDLIB_H)
check_include_files(strings.h HAVE_STRINGS_H)
check_include_files(string.h HAVE_STRING_H)
check_include_files(sys/times.h HAVE_SYS_TIMES_H)
check_include_files(sys/time.h HAVE_SYS_TIME_H)
check_include_files(sys/types.h HAVE_SYS_TYPES_H)
check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(inttypes.h HAVE_INTTYPES_H)
check_type_size(int SIZEOF_INT)
check_type_size(long SIZEOF_LONG)
check_type_size(short SIZEOF_SHORT)
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/oniguruma.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/oniguruma.pc @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(_SRCS src/regint.h src/regparse.h src/regenc.h src/st.h
src/regerror.c src/regparse.c src/regext.c src/regcomp.c src/regexec.c
src/reggnu.c src/regenc.c src/regsyntax.c src/regtrav.c src/regversion.c
src/st.c src/regposix.c src/regposerr.c src/onig_init.c
src/unicode.c src/ascii.c src/utf8.c src/utf16_be.c src/utf16_le.c
src/utf32_be.c src/utf32_le.c src/euc_jp.c src/sjis.c src/iso8859_1.c
src/iso8859_2.c src/iso8859_3.c src/iso8859_4.c src/iso8859_5.c
src/iso8859_6.c src/iso8859_7.c src/iso8859_8.c src/iso8859_9.c
src/iso8859_10.c src/iso8859_11.c src/iso8859_13.c src/iso8859_14.c
src/iso8859_15.c src/iso8859_16.c src/euc_tw.c src/euc_kr.c src/big5.c
src/gb18030.c src/koi8_r.c src/cp1251.c
src/euc_jp_prop.c src/sjis_prop.c
src/unicode_unfold_key.c
src/unicode_fold1_key.c src/unicode_fold2_key.c src/unicode_fold3_key.c)
add_library(onig ${_SRCS})
install_library(onig)
install_header(src/oniguruma.h src/onigposix.h src/oniggnu.h)
install_doc(doc/API doc/API.ja doc/RE doc/RE.ja doc/UNICODE_PROPERTIES)
install_data(AUTHORS COPYING HISTORY README.md)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/oniguruma.pc
DESTINATION lib/pkgconfig)
oniguruma-6.7.0/COPYING 0000664 0000000 0000000 00000002607 13212423352 0014567 0 ustar 00root root 0000000 0000000 Oniguruma LICENSE
-----------------
/*-
* Copyright (c) 2002-2015 K.Kosako
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
oniguruma-6.7.0/ChangeLog 0000664 0000000 0000000 00000000000 13212423352 0015267 0 ustar 00root root 0000000 0000000 oniguruma-6.7.0/HISTORY 0000664 0000000 0000000 00000332673 13212423352 0014631 0 ustar 00root root 0000000 0000000 History
2017/12/11: Version 6.7.0
2017/12/08: add ONIG_SYNTAX_ONIGURUMA (default syntax)
2017/12/05: restructure StackType
2017/11/13: implement subexp calls (?R), (?&name), (?-n), (?+n) for Perl syntax
2017/09/25: use string pool of gperf for Unicode Property lookup function
2017/09/16: fix #70: an empty greedy regex and a word boundary (.*\b) fails
2017/09/13: remove a stack type STK_POS
2017/09/08: fix #69: add a declaration of onig_end()
2017/09/07: fix #68: Compilation failure in out-of-source build
2017/09/03: [new] hexadecimal codepoint \uHHHH
2017/08/30: Version 6.6.1
2017/08/29: fix definition of \X to (?>\O(?:\Y\O)*)
2017/08/28: Version 6.6.0
2017/08/26: fix #67: can't compile with Visual Studio 2005
2017/08/24: rename Absent clear to Range clear
2017/08/21: [new] Extended Grapheme Cluster \X and boundary \y, \Y
2017/08/17: fix: invalid index(ctype) value assigned to Unicode Block properties
2017/08/16: --enable-crnl-as-line-terminator to be deprecated
2017/08/15: [new] ASCII only mode options (?WDSP)
2017/08/14: [new] ONIG_OPTION_XXXX_IS_ASCII options
2017/08/11: disable OP_CCLASS_NODE
2017/08/11: [spec] Absent clear restore previous range value at backtrack
2017/08/07: optimize for simple one char repetition in Absent expression
2017/08/07: fix: invalid impl. for reluctant repetition in Absent expression
2017/08/04: remove compile switch USE_NAMED_GROUP
2017/08/03: Version 6.5.0
2017/07/30: [new] support Absent clear (Absent functions)
2017/07/25: abolish configure option: --enable-combination-explosion-check
2017/07/23: [new] support Absent functions (?~...)
2017/07/14: fix #65: SIZEOF_SIZE_T doesn't exist on certain architecutres
2017/07/11: [new] support \O (true anychar)
2017/07/10: [new] support \K (keep)
2017/07/10: add new node type: NODE_GIMMICK
2017/07/07: [new] support \N (no newline)
2017/07/05: [new] support \R (general newline)
2017/07/05: [new] support if-then-else syntax
2017/07/04: [new] support backref validity checker
2017/07/03: Version 6.4.0
2017/06/30: fix memory leaks
2017/06/29: fix memory leaks
2017/06/28: change encoding of doc/XXXX.ja from EUC-JP to UTF-8
2017/06/28: update doc/RE, and doc/RE.ja
2017/06/26: fix fatal bug of endless repeat check on Windows
2017/06/26: PR #62 : add check for return values
2017/06/23: [new] support call zero (\g{0})
2017/06/23: [new] support relative call by positive number
2017/06/23: [new] support relative back-reference by positive number
2017/06/15: fix #60 : check value type
2017/06/02: change output format for ONIG_DEBUG_COMPILE and ONIG_DEBUG_MATCH
2017/05/29: Version 6.3.0
2017/05/24: fix #60 : invalid state(CCS_VALUE) in parse_char_class()
2017/05/24: fix #59 : access to invalid address by reg->dmax value
2017/05/23: fix invalid increment of start position in onig_scan()
2017/05/23: fix #58 : access to invalid address by reg->dmin value
2017/05/23: fix #57 : DATA_ENSURE() check must be before data access
2017/05/22: fix #56 : return invalid result for codepoint 0xFFFFFFFF
2017/05/19: [new] add \o{17777777777} syntax.
2017/05/19: fix #55 : Byte value expressed in octal must be smaller than 256
2017/04/08: Version 6.2.0
2017/03/15: fix: size in xmemcpy in stack_double (PR #51)
2017/02/21: Initialize return value
2017/01/03: NEW API: add onig_set_capture_num_limit()
2017/01/03: change MemNumType from short int to int
2016/12/13: fix: [0-9-a] was not allowed as [0-9\-a]
2016/12/13: fix: illegal capture after recursive call
2016/12/13: fix: problem with optimization of \z
2016/12/13: fix: .* optimization
2016/12/13: Set a limit of parser recursion
2016/12/12: fix; that warnings are not shown properly
2016/12/12: fix: /[a-c#]+\W/ =~ "def#" fails when encoding is UTF-16/32
2016/12/12: fix: /[\x{0}-X]/i doesn't match properly when UTF-16/32 is used.
2016/12/11: Version 6.1.3
2016/12/11: fix: Syntax error: redirection unexpected (expecting word) #35
2016/11/07: Version 6.1.2
2016/10/25: allow word bound, word begin and word end in look-behind.
2016/10/19: add ONIG_OPTION_CHECK_VALIDITY_OF_STRING option.
2016/10/16: fix use after free node.
2016/10/10: fix memory leaks after parsing regexp error.
2016/09/22: implement many of is_valid_mbc_string().
2016/09/02: Version 6.1.1
2016/08/31: fix segfault /W.?{888}{888}{888}\x00/ (found by libfuzzer)
2016/08/31: fix error unmatched close parenthesis for %{(.*?)} #23
2016/08/29: Version 6.1.0
2016/08/28: add contributed/libfuzzer-onig.cpp (thanks hannob)
2016/08/28: update LTVERSION 4:0:0
2016/08/28: NEW API: onigenc_is_valid_mbc_string().
2016/08/27: add is_valid_mbc_string() member into OnigEncodingType.
2016/08/27: fix out of bounds read.
2016/08/26: fix out of bounds read.
2016/08/25: disable USE_INVALID_CODE_SCHEME.
2016/08/24: fix out of bounds read.
2016/08/23: doc/RE improved.
2016/08/22: add onig_scan() into doc/API.
2016/08/22: fix bug: Out of bounds read in onig_strcpy() #17
2016/08/21: fix bug: infinite loop of backreference and group.
2016/08/21: fix out of bounds read in mbc_to_code() #16
2016/08/18: doc/RE refinements.
2016/08/16: add onig_scan() (NEW API)
2016/08/16: reimplement match stack allocation for case too many repeat
and too many captures in regexp.
2016/08/15: number of captures <= 32767 for bytecode representation.
2016/07/17: don't use int_map_backward for thread-safe.
2016/07/04: fix case of enclosed option in look-behind.
2016/07/04: fix ignore case in look-behind.
2016/05/23: fix memory leak in onig_unicode_define_user_property()
2016/05/20: declare variables at the top of scope. (thanks nmaya)
2016/05/09: Version 6.0.0
2016/05/05: add NEW API: onig_unicode_define_user_property()
2016/05/04: update Unicode data to 8.0.0
2016/05/02: change OnigCodePoint type to unsigned int.
2016/05/02: add doc/UNICODE_PROPERTIES.
2016/04/19: add error code ONIGERR_FAIL_TO_INITIALIZE.
2016/04/18: add make_win64/32.bat.
2016/04/18: fix bug of uninitialized regex_t value on error.
2016/04/16: reimplement Unicode case folding.
2016/04/11: update LTVERSION = 3.0.0
2016/04/05: remove all THREAD_ macro.
2016/04/05: add init member into OnigEncoding. (add onig_initialize())
2016/03/28: remove state member of regex.
2016/03/25: move source files into src/
2016/03/23: rename configre.in to configure.ac.
2015/11/17: fix memory leak. (thanks pigzang)
2015/07/13: change mail address.
2014/12/12: Version 5.9.6
2013/11/27: [impl] add onigenc_end_unicode(). (thanks Takenori Imoto)
2013/11/27: [impl] add onig_add_end_call(). (thanks Takenori Imoto)
2013/10/21: Version 5.9.5
2013/10/21: [impl] escape warnings for -Wall. (regparse.c)
2013/10/21: [bug] fixes an issue on Windows x64. (thanks Anatoliy Belsky)
The issue was discovered in PHP, see https://bugs.php.net/64769.
2013/10/21: [impl] remove unused variable. (regcomp.c)
2013/04/04: Version 5.9.4
2013/04/04: [dev] remove Makefile.in from git repository.
2013/04/04: [dist] add oniguruma.pc.in file. (for pkg-config)
(thanks Giulio Paci)
2012/10/26: Version 5.9.3
2012/10/15: remove warnings "test: =: unary operator expected" in ./configure.
(thanks t_okazaki)
2012/10/15: fix print_tree ENCLOSE_OPTION bug. (thanks Suraj N. Kurapati)
2010/01/09: Version 5.9.2
2010/01/05: [bug] fix utf16be_code_to_mbc() and utf16le_code_to_mbc().
2008/09/16: [bug] fix memory leaks in parse_exp().
2008/08/01: [bug] fix memory leaks.
2008/06/17: [bug] invalid type of argument was used
in onig_st_lookup_strend().
2008/06/16: [bug] invalid CaseFoldMap entry in ISO-8859-5. 0xdf -> 0xde
2008/02/19: [new] add: onig_reg_init().
2008/02/19: [new] add: onig_free_body().
2008/02/19: [new] add: onig_new_without_alloc().
2008/02/19: [API] rename onig_alloc_init() to onig_reg_init(),
and argument type changed.
2008/01/31: [impl] move UTF16_IS_SURROGATE_XXX() to regenc.h.
2008/01/30: [bug] (thanks akr)
fix euctw_islead().
2008/01/23: [bug] update enc/koi8.c.
2007/12/22: Version 5.9.1
2007/12/21: [impl] add sprint_byte().
2007/11/28: [bug] (thanks Andy Armstrong)
don't overwrite error code in fetch_name().
2007/11/12: [bug] utf8 mbc length of code 0xfe, 0xff are not 1,
2007/10/23: [spec] onig_enc_len() takes three arguments. (not used)
2007/10/15: [impl] (thanks Rui Hirokawa)
add check HAVE_STDARG_H.
2007/09/07: [API] rename enc_len() to onig_enc_len() in oniguruma.h.
2007/09/04: [API] remove ONIGENC_ERR_XXXXX.
2007/09/03: [API] add error ONIGERR_INVALID_CODE_POINT_VALUE.
2007/09/03: [impl] change error message to "invaid code point value"
for ONIGERR_INVALID_WIDE_CHAR_VALUE.
2007/09/03: [bug] xxx_code_to_mbclen() should return
ONIGERR_INVALID_WIDE_CHAR_VALUE for invalid code point.
ex. /[\x{7fffffff}]/ for ASCII encoding.
2007/08/28: [impl] remove "warning: no previous declaration ...".
2007/08/21: [impl] remove warnings in enc/mktable.c.
2007/08/20: [impl] remove "warning: unused parameter"
2007/08/20: [impl] remove "warning: comparison between signed and unsigned".
2007/08/06: [impl] remove clear_not_flag_cclass().
2007/08/03: [bug] fix the case of undefined USE_NAMED_GROUP.
2007/08/02: [spec] add backref by number.
2007/08/01: [API] add OnigCtype.
2007/07/27: [spec] add USE_CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS.
2007/07/24: [impl] define PLATFORM_UNALIGNED_WORD_ACCESS.
2007/07/23: [dist] fix doc/FAQ.ja.
2007/07/14: Version 5.9.0
2007/07/13: [bug] add check into onig_reduce_nested_quantifier().
2007/06/26: [spec] (thanks K.Takata)
ONIG_OPTION_SINGLELINE: '$' -> '\Z' (as Perl)
2007/06/26: [dist] (thanks K.Takata)
fix documents API and API.ja.
2007/06/19: [impl] remove IS_NOT_NULL() check before onig_node_free().
2007/06/18: [bug] (thanks KUBO Takehiro)
WORD_ALIGNMENT_SIZE must be sizeof(OnigCodePoint).
2007/06/18: [impl] rename CClassNode flags.
2007/06/18: [bug] initialization miss.
2007/06/13: [impl] change node type reference NXXXX.
2007/06/11: [impl] add node type bit.
2007/06/11: [spec] allow anchor in enclosed repeater. /(\z)*/
2007/06/11: [impl] rename node types.
2007/06/08: [impl] remove OP_SET_OPTION_PUSH and OP_SET_OPTION from match_at().
2007/06/07: [impl] use xvsnprintf().
2007/06/06: [tune] don't set qn->next_head_exact for string first byte is zero.
2007/06/06: [impl] remove unused variables.
2007/06/04: Version 5.8.0
2007/06/04: [impl] add #ifndef vsnprintf into regint.h.
2007/05/31: [dist] add configure option '--enable-crnl-as-line-terminator'.
2007/05/30: [dist] add sample/crnl.c.
2007/05/30: [bug] should check USE_CRNL_AS_LINE_TERMINATOR case
in onig_search().
2007/05/29: [impl] move USE_CRNL_AS_LINE_TERMINATOR into regenc.h.
2007/05/29: [impl] should check USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
in forward_search_range() and backward_search_range().
2007/04/27: Version 5.7.0
2007/04/20: [spec] add config USE_MATCH_RANGE_IS_COMPLETE_RANGE.
2007/04/20: [impl] refactoring in match_at().
2007/04/12: Version 5.6.1
2007/04/12: [bug] must not use UChar in oniguruma.h.
2007/04/09: [impl] change STATE_CHECK_BUFF_MAX_SIZE value from 0x8000
to 0x4000. [ruby-core:10883]
2007/04/04: Version 5.6.0 (mourning for Hideo Takamatsu)
2007/04/03: [spec] add new notation (?'name'), \k'name', \g'name'.
2007/04/03: [impl] remove unused variable.
2007/03/26: [impl] add 'void' to function declarations.
2007/03/06: Version 5.5.3
2007/03/06: [bug] add #include for bcc32.
(In bcc32, alloca() is declared in malloc.h.)
2007/03/02: [bug] invalid optimization for semi-end-buf in onig_search().
ex. /\n\Z/.match("aaaaaaaaaa\n")
2007/03/02: [impl] move range > start check position in end_buf process.
2007/01/09: Version 5.5.2
2007/01/09: [impl] rename USE_EXTERNAL_LOWER_CASE_CONV_TABLE.
2007/01/05: [tune] select_opt_exact_info() didn't work for empty info.
ex. /.a/ make MAP info instead of EXACT info.
2006/12/28: [impl] add print_enc_string() for ONIG_DEBUG mode.
2006/12/22: Version 5.5.1
2006/12/22: [impl] rename ADD_PAD_TO_SHORT_BYTE_STRING
. to USE_PAD_TO_SHORT_BYTE_CHAR.
2006/12/21: [spec] should check too short multibyte char in parse_exp().
add ADD_PAD_TO_SHORT_BYTE_STRING.
ex. /\x00/ in UTF16 should be error.
2006/12/06: Version 5.5.0
2006/12/05: [bug] should add unfold-1 codes from folded code into
onigenc_unicode_get_case_fold_codes_by_str().
(ex. "S" -> "s" -> 0x017f)
2006/12/05: [new] add flag ONIGENC_CASE_FOLD_TURKISH_AZERI and
USE_UNICODE_CASE_FOLD_TURKISH_AZERI. (disabled in default)
2006/12/04: [spec] remove ONIGENC_CASE_FOLD_FULL.
2006/11/30: [impl] remove unnecessary check in xxx_mbc_case_fold().
2006/11/29: Version 5.4.0
2006/11/28: [spec] INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR is enabled in
default case fold status.
2006/11/28: [spec] rename ONIGENC_CASE_FOLD_MULTI_CHAR to
INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR.
2006/11/28: [impl] remove USE_UNICODE_CASE_FOLD_MULTI_CHAR.
2006/11/28: [impl] remove Fold[123]Table and add FoldTable.
2006/11/27: [impl] change tool/unicode_fc.rb to see CaseFolding.txt.
2006/11/24: [bug] should call callback for to[j] <-> to[k] in
onigenc_unicode_apply_all_case_fold().
2006/11/22: Version 5.3.0
2006/11/22: [dist] add index_ja.html.
2006/11/22: [impl] undef ONIG_ESCAPE_UCHAR_COLLISION in regint.h and regenc.h.
2006/11/21: [bug] invalid array access.
2006/11/21: [impl] escape UChar collision from config.h.
2006/11/20: [new] add Hiragana/Katakana properties into Shift_JIS.
2006/11/20: [impl] fix CR_Katakana[] values in EUC-JP.
2006/11/17: [impl] declare strend hash table functions in regint.h.
2006/11/17: [impl] move property list functions to regenc.c.
2006/11/17: [new] add Hiragana/Katakana properties into EUC-JP.
2006/11/15: [impl] remove NOT_RUBY from AM_CFLAGS.
2006/11/14: Version 5.2.0
2006/11/14: [impl] remove program codes for Ruby.
2006/11/14: [impl] reduce program codes for Ruby.
2006/11/10: [bug] 0x24, 0x2b, 0x3c, 0x3d, 0x3e, 0x5e, 0x60, 0x7c, 0x7e
should be [:punct:].
2006/11/09: [new] (thanks Byte)
add new character encoding CP1251.
2006/11/08: [impl] rename QUALIFIER -> QUANTIFIER.
2006/11/07: Version 5.1.0
2006/11/07: [dist] remove test.rb, testconv.rb and testconvu.rb.
2006/11/07: [bug] get_case_fold_codes_by_str() should handle 'Ss' and 'sS'
combination for ess-tsett.
2006/11/07: [impl] apply_all_case_fold() doesn't need to return all
case character combination for multi-character folding.
(ONIGENC_CASE_FOLD_MULTI_CHAR)
2006/11/07: [bug] (thanks Byte)
add { 0xa3, 0xb3 } to CaseFoldMap[] for KOI8-R.
2006/11/06: [spec] change ONIG_OPTION_FIND_LONGEST to search all of
the string range.
add USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE.
2006/11/02: [impl] re-implement expand_case_fold_string() for
ONIGENC_CASE_FOLD_MULTI_CHAR.
2006/10/30: [impl] add NSTR_DONT_GET_OPTINFO flag.
2006/10/30: [impl] (thanks K.Takata)
add THREAD_SYSTEM_INIT and THREAD_SYSTEM_END.
2006/10/30: [bug] (thanks Wolfgang Nadasi-Donner)
invalid offset value was used in STATE_CHECK_BUFF_INIT().
2006/10/27: [tune] speed up ONIGENC_MBC_CASE_FOLD() for UTF-16, UTF-32.
(ASCII code check)
2006/10/27: [tune] (thanks Kornelius Kalnbach)
String#scan for long string needs long time compare with
old Ruby
by initialization time for combination explosion check
ex. ("test " * 100_000).scan(/\w*\s?/)
change STATE_CHECK_BUFF_MAX_SIZE from 0x8000000 to 0x8000.
reduce initialization area of state_check_buff.
2006/10/25: [impl] add DISABLE_CASE_FOLD_MULTI_CHAR().
2006/10/23: Version 5.0.1
2006/10/23: [bug] should fold string in expand_case_fold_string().
2006/10/23: [bug] (thanks Km)
too many case fold/unfold expansion problem.
don't expand and set ambig flag to the string node.
(except ONIGENC_CASE_FOLD_MULTI_CHAR).
2006/10/23: [bug] (thanks K.Takata)
invalid \p{Alnum}, \p{ASCII}, [:alnum:], [:ascii:].
fix OnigEncAsciiCtypeTable[] etc...
2006/10/23: [spec] (thanks K.Takata)
add [:word:] POSIX bracket.
2006/10/23: [bug] (thanks K.Takata)
\p{Word} doesn't work.
2006/10/20: [impl] don't expand for AMBIG_FLAG string in
expand_case_fold_string().
2006/10/19: Version 5.0.0
2006/10/18: [bug] ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM should be 13.
2006/10/18: [impl] remove unused functions.
2006/10/18: [dist] update documents.
2006/10/18: [API] move OnigMetaCharTableType to OnigSyntaxType.
2006/10/18: [dev] add too/unicode_fc.rb, unicode_pc.rb.
2006/10/18: [dist] remove MANIFEST-RUBY from distribution.
2006/10/18: [bug] return duplicated code in
onigenc_unicode_get_case_fold_codes_by_str().
2006/10/18 [API] remove ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS.
2006/10/18: [dev] add tool/19.
2006/10/18: [dist] remove target 19 from Makefile.am.
2006/10/17: [dist] add enc/unicode.c to target 19 of win32/Makefile.
2006/10/17: [impl] change type for escape VC++ warning.
2006/10/17: [API] rename ONIGENC_CASE_FOLD_NONE to ONIGENC_CASE_FOLD_MIN.
2006/10/17: [dist] remove INSTALL-RUBY from distribution.
2006/10/17: [dist] update LTVERSION to "2:0:0".
2006/10/17: [impl] remove warnings for [make CFLAGS="-g -O2 -Wall"]
in the case USE_UNICODE_PROPERTIES and
USE_UNICODE_CASE_FOLD_MULTI_CHAR are undefined.
2006/10/17: [impl] remove warnings for [make CFLAGS="-g -O2 -Wall"].
2006/10/17: [impl] re-implement onigenc_unicode_apply_all_case_fold().
multi-char by case folded char-class is treated as
caseless-string (ambig flag on).
enable OP_EXACT1_IC and OP_EXACTN_IC.
2006/10/16: [bug] unfold expand for 1->2, 1->3 folding in
onigenc_unicode_apply_all_case_fold().
add CaseFoldExpand_12[], CaseFoldExpand_13[].
2006/10/16: [bug] (thanks Akinori Musha)
first argument of rb_warn() should be format string.
2006/10/16: [impl] add msa.state_check_buff_size initialization
in onig_search().
2006/10/16: [spec] re-implement Unicode Caseless Match codes.
2006/10/10: [bug] should call onig_st_free_table() in
onig_free_shared_cclass_table().
2006/10/10: [impl] remove OnigCompCaseFoldCodes.
2006/10/10: [impl] remove onigenc_ascii_is_mbc_ambiguous() and
onigenc_mbn_is_mbc_ambiguous().
2006/10/10: [API] remove is_mbc_ambiguous() member from OnigEncodingType.
2006/10/10: [API] rename onig_set_default_ambig_flag() to
onig_set_default_case_fold_flag(),
onig_get_default_ambig_flag() to
onig_get_default_case_fold_flag(),
onig_get_ambig_flag() to onig_get_case_fold_flag().
2006/10/10: [API] rename ambig_flag to case_fold_flag.
2006/10/10: [API] rename OnigAmbigType to OnigCaseFoldType.
2006/10/10: [impl] rename ONIGENC_IS_CODE_SB_WORD() to IS_CODE_SB_WORD()
and move to regint.h.
2006/10/10: [impl] remove OP_WORD_SB and OP_WORD_MB.
2006/10/10: [impl] remove OP_EXACT1_IC and OP_EXACTN_IC from match_at().
2006/10/10: [impl] should free new_str in expand_case_fold_string().
2006/10/06: [dist] add test entries to sample/encode.c.
2006/10/06: [impl] re-implement caseless match (case-fold).
2006/10/06: [impl] expand string node by case fold variations.
add expand_case_fold_string().
2006/10/05: [spec] rename OnigCompAmbigCodeItem to OnigCaseFoldCodeItem.
2006/10/05: [spec] add apply_all_case_fold() and get_case_fold_codes_by_str()
to OnigEncodingType.
2006/10/05: [spec] remove ambig_flag, get_all_pair_ambig_codes() and
get_all_comp_ambig_codes() member from OnigEncodingType.
2006/10/03: [impl] rename mbc_to_normalize() to mbc_case_fold().
2006/10/03: [spec] rename ONIGENC_AMBIGUOUS_MATCH_XXX
to ONIGENC_CASE_FOLD_XXX.
rename ONIGENC_CASE_FOLD_COMPOUND
to ONIGENC_CASE_FOLD_MULTI_CHAR.
2006/10/02: [impl] remove all ONIG_RUBY_M17N part.
2006/09/29: [impl] initialize state_check_buff_size in STATE_CHECK_BUFF_INIT().
make valgrind happy.
2006/09/22: [impl] remove parse time ctype values (CTYPE_WORD etc...)
2006/09/22: [ruby] enable USE_BACKREF_AT_LEVEL for Ruby mode.
2006/09/22: [spec] (thanks Allan Odgaard)
allow upper case letter as the first character
of group name.
fetch_name() and fetch_name_with_level()
2006/09/21: [impl] convert to ascii for parameter string in
onig_error_code_to_str().
add enc member into OnigErrorInfo.
2006/09/21: [dist] update documents for Unicode Property.
2006/09/21: [new] add Unicode Properties. (enc/unicode.c)
Any, Assigned, C, Cc, L, Lm, Arabic, Greek etc...
2006/09/21: [impl] add USE_UNICODE_PROPERTIES into regenc.h.
2006/09/21: [impl] remove USE_UNICODE_FULL_RANGE_CTYPE.
2006/09/20: [impl] change ONIGENC_CTYPE_XXXX to sequencial values.
add BIT_CTYPE_XXXX bit flags to regenc.h.
update XXXX_CtypeTable[] for BIT_CTYPE_ALNUM.
2006/09/19: [memo] move from CVS to Subversion (1.3.2).
2006/09/19: [impl] (thanks KOYAMA Tetsuji)
HAVE_STDARG_PROTOTYPES was not defined in Mac OS X
by Xcode 2.4(gcc 4.0.1) problem. [php-dev 1312] etc...
2006/09/15: [bug] (thanks Allan Odgaard)
out of range access in bm_search_notrev().
(p < s)
2006/09/13: [impl] add ONIGENC_CTYPE_ENC_EXT flag.
2006/09/13: [spec] remove 'Is' prefix check for property name
from fetch_char_property_to_ctype().
2006/09/13: [API] add property_name_to_ctype member to OnigEncodingType.
2006/09/12: [spec][ruby] add ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY and
ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT to OnigSyntaxRuby.
2006/09/08: Version 4.4.2
2006/09/08: [test] success in ruby 1.9.0 (2006-08-22) [i686-linux].
2006/09/08: [bug] (thanks K.Takata)
out of range access in bm_search_notrev().
2006/09/04: [spec] (thanks K.Takata)
allow look-behind in negative look-behind.
ex. /(? (?:a*){n,n}, (?:a+){n,n}
2006/09/21: [impl] reduce (a*){n,m}, (a+){n,m} => (a*){n,n}, (a+){n,n}
if backreference is not used.
2006/08/17: [bug] should check scan_env.num_call > 0 for backrefed pattern
in combination explosion check.
2006/08/17: Version 4.3.0
2006/08/17: [test] success in ruby 1.9.0 (2006-07-28) [i686-linux].
2006/08/17: [new] add config USE_COMBINATION_EXPLOSION_CHECK.
check /(.+)*/, /(\s*foo\s*)*/ etc...
[API] add num_comb_exp_check member in regex_t.
[dist] change LTVERSION value to "1:0:0" in configure.in.
2006/08/15: [bug] OP_REPEAT_INC process in match_at().
should check repeat-count >= range-upper and
range-upper may be infinite.
2006/08/11: Version 4.2.3
2006/08/11: [test] success in ruby 1.9.0 (2006-07-28) [i686-linux].
2006/08/10: [impl] remove double call in set_qualifier().
2006/08/10: [impl] remove by_number member in QualifierNode.
2006/08/09: [impl] remove a comma at the end of enum ReduceType
for escape warning on Mac OS X.
2006/08/07: [impl] remove warning in regcomp.c.
2006/08/07: [spec] move definition of USE_BACKREF_AT_LEVEL into NOT_RUBY.
2006/08/03: Version 4.2.2
2006/08/03: [test] success in ruby 1.9.0 (2006-07-28) [i686-linux].
2006/08/03: [bug] (thanks Hiroyuki Yamamoto)
segmentation fault in regexec(). (POSIX API)
2006/08/02: [bug] combination of \G in look-ahead/look-behind and other
anchors(\A, \z, \Z) cause invalid result.
ex. /(?!\G)a\z/.match("ba")
start arg. of MATCH_ARG_INIT() should be original
arg. of onig_search().
2006/07/31: Version 4.2.1
2006/07/31: [test] success in ruby 1.9.0 (2006-07-28) [i686-linux].
2006/07/31: [bug] (thanks Kimura Minoru)
re-implement bm_search_notrev().
2006/07/31: [impl] bm_search_notrev() refactoring.
2006/07/31: [bug] (thanks Kimura Minoru)
fix incomplete multibyte string in exact info.
2006/07/31: [impl] (thanks Seiji Masugata)
remove cast in va_init_list() for Intel C Compiler.
2006/07/18: Version 4.2.0
2006/07/18: [test] success in ruby 1.9.0 (2006-03-01) [i686-linux].
2006/07/18: [new] (thanks Wolfgang Nadasi-Donner)
add back reference with nest level.
\k, \k
2006/07/11: [impl] change long to unsigned long for ONIG_OPTION_XXX
and ONIG_SYN_XXX number literals.
2006/07/03: Version 4.1.2
2006/07/03: [test] success in ruby 1.9.0 (2006-03-01) [i686-linux].
2006/07/03: [spec] (thanks Wolfgang Nadasi-Donner)
allow \G in look-behind.
add ANCHOR_BEGIN_POSITION flag in setup_tree().
2006/06/12: [impl] (thanks matz)
fix cast from char* to const char*
in onig_snprintf_with_pattern().
fix cast from char* to const char*
for PopularQStr[] and ReduceQStr[].
2006/05/22: Version 4.1.1
2006/05/22: [test] success in ruby 1.9.0 (2006-03-01) [i686-linux].
2006/05/22: [impl] add position string argument to STACK_BASE_CHECK().
2006/05/22: [bug] (thanks NARUSE, Yui)
add STK_NULL_CHECK_END to IS_TO_VOID_TARGET().
ex. core dump in
/(?\(([^\(\)]++|\g)*+\))/.match('((a))')
2006/05/15: Version 4.1.0
2006/05/15: [test] success in ruby 1.9.0 (2006-03-01) [i686-linux].
2006/05/15: [impl] thread atomic changes for onig_end() and
onig_free_node_list().
2006/05/15: [test] success in ruby 1.9.0 (2006-03-01) [i686-linux].
2005/05/15: [dist] update API, API.ja, FAQ, FAQ.ja.
2006/05/15: [spec] remove onig_recompile(), onig_recompile_deluxe()
and re_recompile_pattern().
add config USE_RECOMPILE_API.
2006/05/15: [impl] improved thread safe implementation of onig_search()
and onig_match().
2006/05/11: Version 4.0.4
2006/05/11: [test] success in ruby 1.9.0 (2006-03-01) [i686-linux].
2006/05/11: [bug] (thanks Yuji Kaneda)
dead-lock in onig_end().
2006/05/11: [dist] update index.html.
2006/05/08: Version 4.0.3
2006/05/08: [test] success in ruby 1.9.0 (2006-03-01) [i686-linux].
2006/05/08: [bug] (thanks Allan Odgaard)
Segmentation fault in backward search.
ex. /^\t.*$/
2006/04/18: [dist] update index.html.
2006/04/05: [dist] update index.html.
2006/03/24: [dist] update doc/RE, doc/RE.ja.
2006/03/23: Version 4.0.2
2006/03/22: [test] success in ruby 1.9.0 (2006-03-01) [i686-linux].
2006/03/22: [impl] add both of ONIG_OPTION_DONT_CAPTURE_GROUP
and ONIG_OPTION_CAPTURE_GROUP check.
2006/03/22: [spec] add error code ONIGERR_INVALID_COMBINATION_OF_OPTIONS.
2006/03/22: [impl] remove USE_NAMED_GROUP condition from
ONIG_OPTION_DONT_CAPTURE_GROUP check in parse_effect().
2006/03/22: [new] add API onig_noname_group_capture_is_active().
2006/03/01: [spec] rename regex object type from regex_t to OnigRegexType.
add typedef OnigRegexType regex_t
unless ONIG_ESCAPE_REGEX_T_COLLISION is defined.
2006/02/27: [spec] change ONIG_MAX_MULTI_BYTE_RANGES_NUM from 1000
to 10000. (for docdiff program)
2006/02/17: [dist] change COPYING year 2005 -> 2006.
2006/02/07: Version 4.0.1
2006/02/07: [test] success in ruby 1.9.0 (2005-11-28) [i686-linux].
2006/02/07: [bug] memory leaks in onig_free_shared_cclass_table().
2006/02/03: [ruby] add -m 0644 option to install command in "make 19".
2006/02/03: [impl] rename ANCHOR_ANYCHAR_STAR_PL to ANCHOR_ANYCHAR_STAR_ML.
change from IS_POSIXLINE() to IS_MULTILINE()
for ANCHOR_ANYCHAR_START/_ML decision
in optimize_node_left().
2006/01/26: [dist] update index.html for Oniguruma 2.5.3.
2006/01/25: [dist] update URL in index.html.
2006/01/24: Version 4.0.0
2006/01/24: [test] success in ruby 1.9.0 (2005-11-28) [i386-cygwin].
2006/01/24: [test] success in ruby 1.9.0 (2005-11-28) [i686-linux].
2006/01/24: [dist] remove warnings from sample/encode.c.
2006/01/24: [dist] change install description in README(.ja).
2006/01/24: [dist] remove re.c.XXX.patch from distribution and CVS.
2006/01/24: [dist] --- support shared library ---
use GNU libtool/automake.
change configure.in and add Makefile.am, sample/Makefile.am.
add AUTHORS file.
2006/01/24: [dist] test programs return exit code -1 when test fails.
2006/01/24: [bug] (thanks KIMURA Koichi)
invalid syntax definition in ONIG_SYNTAX_GREP.
ONIG_SYN_OP_BRACE_INTERVAL
-> ONIG_SYN_OP_ESC_BRACE_INTERVAL
2006/01/23: [dist] fix configure.in for onig-config.
2006/01/19: [new] add new config USE_UNICODE_ALL_LINE_TERMINATORS.
(U+000d, U+0085, U+2028, U+2029)
2005/12/29: [dist] change pmatch array size to 25 in testconv.rb.
2005/12/26: [dist] fix name in test.rb.
2005/12/26: [dist] update index.html for 2.5.1.
2005/11/29: Version 3.9.1
2005/11/29: [test] success in ruby 1.9.0 (2005-11-28) [i686-linux].
2005/11/24: [test] success in ruby 1.9.0 (2005-08-09) [i686-linux].
2005/11/21: [test] success in ruby 1.9.0 (2005-11-20) [i386-cygwin].
2005/11/21: [bug] (thanks Allan Odgaard)
utf-8 character comments in extended mode leads
invalid result.
ex. /(?x)(?<= # o\n~) /
fix onigenc_unicode_is_code_ctype() and
utf8_is_code_ctype().
2005/11/20: [bug] (thanks MATSUMOTO Satoshi) (thanks Isao Sonobe)
begin-line anchor and BM search optimization leads
invalid result in UTF-16/32.
fix in set_optimize_exact_info().
2005/11/20: Version 3.9.0
2005/11/20: [test] success in ruby 1.9.0 (2005-11-20) [i386-cygwin].
2005/11/20: [test] success in ruby 1.9.0 (2005-10-18) [i386-cygwin].
2005/11/20: [new] add new config USE_CRNL_AS_LINE_TERMINATOR.
(!!! NO SUPPORT experimental option !!!)
2005/11/15: [bug] (thanks Allan Odgaard)
tok->escape was not cleared in fetch_token_in_cc().
ex. [\s&&[^\n]] makes wrong result.
2005/10/18: [impl] (thanks nobu)
change sjis_mbc_enc_len()
and node_new_cclass_by_codepoint_range() scope to static.
2005/09/05: [dist] remove link to MultiFind.
2005/09/01: [dist] add link to yagrep.
2005/08/23: Version 3.8.9
2005/08/23: [test] success in ruby 1.9.0 (2005-08-09) [i686-linux].
2005/08/23: [inst] fix Makefile.in for make ctest/ptest.
2005/08/23: Version 3.8.8
2005/08/23: [test] success in ruby 1.9.0 (2005-08-09) [i686-linux].
2005/08/23: [impl] split is_code_in_cc() from onig_is_code_in_cc().
2005/08/23: [impl] should check DATA_ENSURE() at OP_CCLASS_NODE in match_at().
2005/08/23: [impl] (thanks akr)
add ONIG_OPTION_MAXBIT for escape conflict with
Ruby's option.
2005/08/22: [impl] escape GCC 4.0 warnings for testc.c.
2005/08/22: [bug] (thanks nobu, matz) [ruby-dev:26840]
UTF-8 0xFE, 0xFF handling bug in code_is_in_cclass_node().
abort on /\S*/ =~ "\xfe"
2005/08/22: [impl] escape GCC 4.0 warnings for sample/*.c.
2005/08/22: [impl] fix testconvu.rb.
2005/08/22: [impl] escape GCC 4.0 warnings.
2005/08/09: Version 3.8.7
2005/08/09: [test] success in ruby 1.9.0 (2005-08-09) [i686-linux].
2005/08/09: [bug] (thanks Allan Odgaard)
should not call enc_len() for s == range
in onig_search().
2005/08/01: [dist] add mkdir $prefix, mkdir $exec_prefix to make install.
2005/07/27: Version 3.8.6
2005/07/27: [test] success in ruby 1.9.0 (2005-07-26) [i686-linux].
2005/07/27: [impl] update onig-config.in.
2005/07/26: [new] (thanks Yen-Ju Chen)
add Oniguruma configuration check program.
(onig-config.in)
2005/07/14: Version 3.8.5
2005/07/14: [test] success in ruby 1.9.0 (2005-07-14) [i686-linux].
2005/07/11: [test] success in ruby 1.9.0 (2005-07-04) [i686-linux].
2005/07/11: [bug] (thanks nobu) [ruby-dev:26505]
invalid handling for /\c\x/ and /\C-\x/.
fix fetch_escaped_value().
2005/07/05: [impl] (thanks Alexey Zakhlestine)
escape GCC 4.0 warnings.
2005/07/01: Version 3.8.4
2005/07/01: [test] success in ruby 1.9.0 (2005-07-01) [i686-linux].
2005/06/30: [test] success in ruby 1.9.0 (2005-06-28) [i686-linux].
2005/06/30: [dist] add GB 18030 test to sample/encode.c.
2005/06/30: [impl] escape warning of gb18030_left_adjust_char_head().
2005/06/30: [new] (contributed by KUBO Takehiro)
add new character encoding ONIG_ENCODING_GB18030.
2005/06/30: [bug] invalid ctype check for multibyte encodings.
("graph", "print")
fix onigenc_mb2/4_is_code_ctype(),
eucjp_is_code_ctype() and sjis_is_code_ctype().
2005/06/30: [bug] invalid conversion from code point to mbc in
onigenc_mb4_code_to_mbc().
2005/06/28: Version 3.8.3
2005/06/28: [test] success in ruby 1.9.0 (2005-06-28) [i686-linux].
2005/06/27: [test] success in ruby 1.9.0 (2005-05-31) [i686-linux].
2005/06/27: [bug] (thanks Wolfgang Nadasi-Donner)
invalid check for never ending recursion.
lower zero quantifier should be treated as
a non-recursive call alternative.
ex. /(?[^()]*(\(\g\)[^()]*)*)/
2005/06/15: [impl] add divide_ambig_string_node_sub().
2005/06/15: [dist] add a test to sample/encode.c.
2005/06/10: [new] add ONIG_SYNTAX_PERL_NG. (Perl + named group)
2005/06/01: Version 3.8.2
2005/06/01: [test] success in ruby 1.9.0 (2005-05-31) [i686-linux].
2005/05/31: [dist] add doc/FAQ and doc/FAQ.ja.
2005/05/31: [impl] minor change in node_new().
2005/05/30: [test] success in ruby 1.9.0 (2005-05-11) [i686-linux].
2005/05/30: [bug] (thanks Allan Odgaard)
FreeNodeList null check should be on thread-atomic
in node_new().
2005/05/11: Version 3.8.1
2005/05/11: [test] success in ruby 1.9.0 (2005-05-11) [i386-mswin32].
2005/05/11: [dist] update win32/Makefile (make 19).
2005/05/11: [test] success in ruby 1.9.0 (2005-05-11) [i686-linux].
2005/05/06: [test] success in ruby 1.9.0 (2005-05-06) [i686-linux].
2005/05/06: [impl] (thanks nobu) [ruby-core:4815]
add #ifdef USE_VARIABLE_META_CHARS to goto label.
2005/04/25: [test] success in ruby 1.9.0 (2005-04-25) [i686-linux].
2005/04/25: [impl] change DEFAULT_WARN_FUNCTION and DEFAULT_VERB_WARN_FUNCTION
to onig_rb_warn() and onig_rb_warning().
2005/04/15: Version 3.8.0
2005/04/15: [test] success in ruby 1.9.0 (2005-04-14) [i686-linux].
2005/04/01: [test] success in ruby 1.9.0 (2005-03-24) [i686-linux].
2005/04/01: [impl] (thanks Joe Orton)
(thanks Moriyoshi Koizumi)
many const-ification to many *.[ch] files.
2005/03/25: Version 3.7.2
2005/03/25: [test] success in ruby 1.9.0 (2005-03-24) [i686-linux].
2005/03/23: [test] success in ruby 1.9.0 (2005-03-20) [i686-linux].
2005/03/23: [test] success in ruby 1.9.0 (2005-03-08) [i686-linux].
2005/03/23: [new] add ONIG_SYNTAX_ASIS.
2005/03/23: [new] add ONIG_SYN_OP2_INEFFECTIVE_ESCAPE.
2005/03/09: [spec] rename MBCTYPE_XXX to RE_MBCTYPE_XXX. (GNU API)
2005/03/08: [test] success in ruby 1.9.0 (2005-03-08) [i686-linux].
2005/03/08: [impl] (thanks matz) [ruby-dev:25783]
should not allocate memory for key data in st.c.
move st_*_strend() functions from st.c. fixed some
potential memory leaks.
(imported from Ruby 1.9 2005-03-08)
2005/03/07: Version 3.7.1
2005/03/07: [test] success in ruby 1.9.0 (2005-03-07) [i686-linux].
2005/03/07: [impl] (thanks Rui Hirokawa)
add ONIG_ESCAPE_UCHAR_COLLISION.
rename UChar to OnigUChar in oniguruma.h.
2005/03/07: [impl] remove declarations for Ruby in oniggnu.h.
2005/03/05: [bug] ANCHOR_ANYCHAR_STAR didn't work in onig_search().
2005/03/01: [dist] remove oniggnu.h from MANIFEST-RUBY.
remove oniggnu.h from make 19.
2005/03/01: [bug] (thanks matz) [ruby-dev:25778]
uninitialized member (OptEnv.backrefed_status)
was used.
2005/02/19: Version 3.7.0
2005/02/19: [test] success in ruby 1.9.0 (2005-02-19) [i386-cygwin].
2005/02/19: [new] (thanks Minero Aoki)
add onig_region_set().
2005/02/19: [API] change onig_region_init() to extern.
2005/02/19: [dist] remove reggnu.c from MANIFEST-RUBY.
remove reggnu.c from make 19.
2005/02/19: [dist] update doc/API and doc/API.ja.
2005/02/19: [test] success in ruby 1.9.0 (2005-02-19) [i386-cygwin].
2005/02/19: [impl] (thanks Alexey Zakhlestine)
change UChar* to const UChar* in oniguruma.h,
regenc.h and regparse.h.
2005/02/13: [impl] change UChar* to const UChar* in oniguruma.h and
onigposix.h and st.h.
2005/02/12: [test] success in ruby 1.9.0 (2005-02-11) [i386-cygwin].
2005/02/12: [bug] (thanks nobu) [ruby-dev:25676]
type_cclass_hash() fix overrun.
2005/02/09: [test] success in ruby 1.9.0 (2005-02-09) [i686-linux].
2005/02/09: [spec] add RE_OPTION_FIND_NOT_EMPTY etc.. to oniggnu.h.
2005/02/09: [dist] remove hash.c.patch.
2005/02/07: [impl] remove re_mbctab, mbctab_ascii etc...
(USE_COMPATIBILITY_FOR_RUBY_EXTENSION_LIBRARY)
2005/02/04: Version 3.6.0
2005/02/04: [test] success in ruby 1.9.0 (2005-02-04) [i686-linux].
2005/02/01: [bug] add key_free() call to st_free_table().
2005/02/01: [new] add onig_get_default_ambig_flag() and
onig_set_default_ambig_flag().
2005/02/01: [dist] update MANIFEST-RUBY.
2005/01/31: [test] success in ruby 1.9.0 (2005-01-29) [i686-linux].
2005/01/31: [spec] remove ONIGENC_AMBIGUOUS_MATCH_COMPOUND
from ONIGENC_AMBIGUOUS_MATCH_DEFAULT.
2005/01/31: [dist] update Makefile.in (make 19).
2005/01/29: [memo] (thanks Kazuo Saito)
Oniguruma 3.5.4 was merged to Ruby 1.9.0.
2005/01/28: [impl] (thanks UK-taniyama)
add extern "C" { } directive to oniguruma.h, oniggnu.h
and onigposix.h for C++.
2005/01/25: [impl] remove nested function call for xxx_code_to_mbclen().
(euc_kr.c, euc_tw.c, big5.c)
2005/01/19: Version 3.5.4
2005/01/19: [test] success in ruby 1.9.0 (2005-01-05) [i686-linux].
2005/01/19: [bug] (thanks Isao Sonobe)
callback function argument name_end of onig_foreach_name()
was wrong.
name key of name table should be null terminated for
character encoding length.
add strdup_with_null(), rename onig_strdup() to k_strdup().
use e->name_len in i_names().
2005/01/17: [impl] (thanks UK-taniyama)
add HAVE_SYS_TYPES_H to config.h.in.
2005/01/13: Version 3.5.3
2005/01/13: [test] success in ruby 1.9.0 (2005-01-05) [i686-linux].
2005/01/13: [bug] ignore case match bug.
ex. /s+/iu.match("SSSSS") ==> [4..5]
fix OP_EXACT1_IC, OP_EXACTN_IC process.
2005/01/13: [bug] (thanks Isao Sonobe)
ignore case match bug.
ex. /is/iu.match("ss") fail.
fix str_lower_case_match() etc.
2005/01/05: Version 3.5.2
2005/01/05: [test] success in ruby 1.9.0 (2005-01-05) [i686-linux].
2005/01/05: [test] success in ruby 1.9.0 (2004-12-16) [i686-linux].
2005/01/05: [bug] (thanks Isao Sonobe)
ignore case match bug.
ex. /s+/iu.match("sssss") ==> [4..5]
fix OP_EXACT1_IC, OP_EXACTN_IC process.
2005/01/05: [bug] (thanks Isao Sonobe)
group name table should be renumbered.
add onig_renumber_name_table().
2004/12/24: [dist] remove file onigcmpt200.h.
2004/12/17: Version 3.5.1
2004/12/17: [dist] add INSTALL-RUBY to archive.
2004/12/16: [test] success in ruby 1.9.0 (2004-12-16) [i686-linux].
2004/12/16: [dist] update hash.c.patch.
2004/12/15: [bug] (thanks matz)
char > 127 should be casted to unsigned char. (utf8.c)
2004/12/13: [impl] add HAVE_PROTOTYPES and HAVE_STDARG_PROTOTYPES definition
to oniguruma.h in the case __cplusplus.
2004/12/06: [dist] update doc/RE and doc/RE.ja.
2004/12/03: [impl] (thanks nobu)
st.h fix prototype for C++.
2004/12/03: Version 3.5.0
2004/12/02: [test] success in ruby 1.9.0 (2004-12-02) [i686-linux].
2004/12/01: [test] success in ruby 1.9.0 (2004-12-01) [i386-mswin32].
2004/12/01: [dist] add make targets 19 and 19up to win32/Makefile.
2004/12/01: [test] success in ruby 1.9.0 (2004-12-01) [i386-cygwin].
2004/12/01: [test] success in ruby 1.9.0 (2004-12-01) [i686-linux].
2004/12/01: [impl] double cast for escape warning in Cygwin.
(HashDataType* )((void* )(&e)) in regparse.c
2004/12/01: [test] success in ruby 1.9.0 (2004-11-30) [i686-linux].
2004/12/01: [tune] change implementation of clear_opt_map_info().
(which was 10-16% cost in gprof result for my test program)
2004/12/01: [dist] remove regex.c from distribution files.
2004/11/30: [memo] remove targets 16 and 18 from Makefile.in.
2004/11/30: [test] success in ruby 1.9.0 (2004-11-30) [i686-linux].
2004/11/30: [inst] add "cp -p st.[ch] st.[ch].ruby_orig" to "make 19".
2004/11/30: [tune] map_position_value() return 20 if code is 0
and minimum enclen > 1.
2004/11/30: [test] success in ruby 1.9.0 (2004-11-29) [i686-linux].
2004/11/30: [impl] minor changes for multi-thread in regexec.c and regcomp.c.
2004/11/30: [impl] change THREAD_PASS_LIMIT_COUNT value from 10 to 8.
2004/11/30: [impl] add THREAD_ATOMIC_XXX to FreeNodeList access in regparse.c
2004/11/29: [impl] add USE_MULTI_THREAD_SYSTEM.
2004/11/29: [memo] add hash.c.patch to CVS.
2004/11/29: [dist] change mail address to 'sndgk393 AT ...'
2004/11/29: [dist] add -s option (silent mode) to test.rb.
2004/11/29: [tune] change THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS value
from 20 to 8.
2004/11/29: [inst] add make target "19up".
2004/11/29: [dist] change Oniguruma Home Page URL.
2004/11/29: [impl] remove onig_is_in_code_range_array().
2004/11/29: [dist] fix doc/RE and RE.ja (character types).
2004/11/26: [dist] fix win32/Makefile.
2004/11/26: [dist] fix doc/RE and RE.ja (multibyte character types).
2004/11/26: [impl] add onig_free_shared_cclass_table().
2004/11/26: [impl] move definition USE_UNICODE_FULL_RANGE_CTYPE to regenc.h.
2004/11/26: [impl] add opcode OP_CCLASS_NODE.
2004/11/26: [impl] move definition of CClassNode to regint.h.
2004/11/26: [impl] add type PointerType in regint.h.
2004/11/25: [impl] remove ONIGENC_CTYPE_MOD_NOT.
2004/11/25: [impl] rename onig_node_new_cclass_by_codepoint_range to
node_new_cclass_by_codepoint_range.
2004/11/25: [impl] remove get_type_cc_node method from OnigEncodingType.
2004/11/25: [impl] move implementation of shared char-class from enc/*.c
to regparse.c.
2004/11/25: [dist] add hash.c.patch for Ruby 1.9 hash.c change.
2004/11/22: [impl] change utf8_get_type_node().
2004/11/22: [impl] add ONIGENC_CTYPE_MOD_NOT.
2004/11/22: [bug] (thanks MIYAMUKO Katsuyuki)
ruby make test fail in HP-UX B.11.23 ia64.
should use tok->u.code instead of tok->u.c in
the case of TK_CODE_POINT.
2004/11/19: [bug] (thanks Yoshida Masato)
invalid multibyte code causes segmentation fault.
ex. /[\xFF-\xFF]/u
2004/11/19: [bug] (thanks Yoshida Masato)
illegal check in char-class range in UTF-8.
ex. s = "[\xC2\xA0-\xC3\xBE]"
p(Regexp.new(s, nil, "u") =~ "\xC3\xBE")
2004/11/18: [impl] add onig_node_new_cclass_by_codepoint_range().
2004/11/18: [impl] remove OnigCodePointRange type. (use OnigCodePoint[].)
2004/11/17: [bug] (thanks nobu)
abort in "a".gsub(/a\Z/, "")
fix ONIGENC_STEP_BACK() argument in onig_search().
2004/11/16: [impl] add key2 member to st_table_entry in st.[ch].
change API of st for non-null terminated string key.
2004/11/16: [impl] add get_type_cc_node method to OnigEncodingType.
2004/11/15: [impl] add st.h and st.c from Ruby 1.9.
use st-hash always.
2004/11/12: [impl] change member 'not' of CClassNode to 'flags'.
add flags FLAG_CCLASS_NOT and FLAG_CCLASS_SHARE.
2004/11/12: [impl] add onig_is_in_code_range_array() to enc/unicode.c.
2004/11/12: [impl] fix CRWord in enc/unicode.c and MBWord in enc/utf8.c.
2004/11/11: [bug] fix enc/utf8.c.
size 0 array initializer was compile error in VC++.
2004/11/09: [inst] (thanks Hiroki YAGITA)
change installed file mode to 0644.
2004/11/09: [bug] (thanks UK-taniyama)
wrong definitions GET_RELADDR_INC(), GET_ABSADDR_INC()
etc... (NOT PLATFORM_UNALIGNED_WORD_ACCESS)
2004/11/09: [impl] type cast in regexec() for remove compile time warning.
(WIN32, regposix.c)
2004/11/08: [spec] fix Unicode character types.
0x00ad (soft hyphen) should be [:cntrl:] and [:space:] type.
[0x0009..0x000d], 0x0085 should be [:print:] type.
0x00ad should not be [:punct:] type.
2004/11/08: [inst] fix Makefile.in. (for make ctest/ptest/testcu)
2004/11/06: [impl] (thanks Kazuo Saito)
too many alternatives pattern causes core dump.
change implementation of onig_node_free().
2004/11/05: [spec] rename ONIGERR_END_PATTERN_AT_BACKSLASH to
ONIGERR_END_PATTERN_AT_ESCAPE.
2004/11/05: [impl] (thanks matz)
escape compile time warnings for x86-64 Linux.
StackIndex type int -> long
2004/11/05: [memo] (thanks Kazuo Saito)
Oniguruma 3.4.0 was merged to Ruby 1.9.0.
2004/10/30: Version 3.4.0
2004/10/30: [test] success in ruby 1.9.0 (2004-09-24) [i686-linux].
2004/10/30: [new] add hexadecimal digit char type. (\h, \H)
syntax: ONIG_SYN_OP2_ESC_H_XDIGIT
2004/10/30: [bug] (thanks Guy Decoux)
reluctant infinite repeat bug.
ex. /^[a-z]{2,}?$/.match("aaa") fail.
fix OP_REPEAT_INC_NG process in match_at().
2004/10/18: Version 3.3.1
2004/10/18: [test] success in ruby 1.9.0 (2004-09-24) [i686-linux].
2004/10/18: [impl] (thanks Imai Yasumasa)
enclose #include by #ifndef __BORLANDC__.
2004/10/18: [bug] (thanks Imai Yasumasa)
memory access violation in select_opt_exact_info().
2004/09/25: [dist] fix doc/API and doc/API.ja.
2004/09/25: [bug] fix OP_SEMI_END_BUF process in match_at() for
the case USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
is not defined.
2004/09/17: Version 3.3.0
2004/09/17: [dist] add COPYING to program source files.
2004/09/17: [test] success in ruby 1.9.0 (2004-07-23) [i686-linux].
2004/09/17: [bug] (thanks Isao Sonobe)
memory access violations in xxx_mbc_enc_len(),
and xxx_mbc_to_normalize() and
xxx_left_adjust_char_head().
add string range check in match_at() and onig_search().
2004/09/08: [dist] change mail address format.(kosako AT sofnec ...)
2004/09/04: Version 3.2.9
2004/09/04: [test] success in ruby 1.9.0 (2004-07-23) [i686-linux].
2004/09/04: [bug] (thanks Bob Kerstetter and Richard Koch)
search fail in ignore case mode.
fix str_lower_case_match().
2004/09/04: [inst] (thanks Isao Sonobe)
clear sample directory in 'make clean'.
2004/09/04: [bug] fix ONIGENC_AMBIGUOUS_MATCH_COMPOUND/ASCII/NONASCII
meanings in XXXXX_mbc_to_normalize() and
XXXXX_is_mbc_ambiguous().
2004/08/28: [bug] fix ONIGENC_AMBIGUOUS_MATCH_COMPOUND/ASCII/NONASCII
meanings in iso_8859_XX_mbc_to_normalize() and
iso_8859_XX_is_mbc_ambiguous().
2004/08/24: Version 3.2.8
2004/08/24: [test] success in ruby 1.9.0 (2004-07-23) [i686-linux].
2004/08/24: [spec] add ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY.
/a{n}?/ == /(?:a{n})?/
2004/08/24: [dist] fix doc/RE and doc/RE.ja.
2004/08/24: [bug] (thanks starfish)
memory leak in set_optimize_exact_info().
2004/08/21: Version 3.2.7
2004/08/21: [test] success in ruby 1.8.2 (2004-07-28) [i686-linux].
(1.8.2 preview2)
2004/08/21: [test] success in ruby 1.9.0 (2004-07-23) [i686-linux].
2004/08/21: [bug] (thanks Isao Sonobe) (thanks kage)
memory access violation in bm_search_notrev().
(forgotten to merge from 2.X)
2004/07/24: Version 3.2.6
2004/07/24: [test] success in ruby 1.9.0 (2004-07-23) [i686-linux].
2004/07/24: [test] success in ruby 1.8.2 (2004-07-16) [i686-linux].
2004/07/24: [bug] fix warnings for regexec.c. (gcc 2.91.66)
2004/07/24: [memo] change version control system from Subversion
to CVS 1.11.17.
2004/07/20: [bug] (thanks Isao Sonobe)
illegal result in negative character class in ignore case
mode. fix pair-ambig-codes process in parse_exp().
ex. /[^a]/i.match("A")
2004/07/20: [bug] (thanks Isao Sonobe)
undefined bytecode error happens in UTF-16BE etc..
compile_length_cclass_node() was not consistent with
compile_cclass_node().
2004/07/01: Version 3.2.5
2004/07/01: [test] success in ruby 1.8.2 (2004-06-23) [i686-linux].
2004/07/01: [new] add onig_get_syntax_{op,op2,behavior,options}.
2004/07/01: [bug] (thanks Isao Sonobe)
invalid result in onig_capture_tree_traverse().
fix make_capture_history_tree().
2004/06/29: Version 3.2.4
2004/06/29: [test] success in ruby 1.8.2 (2004-06-23) [i686-linux].
2004/06/29: [new] (thanks Isao Sonobe)
add onig_number_of_captures().
2004/06/25: Version 3.2.3
2004/06/25: [test] success in ruby 1.8.2 (2004-06-23) [i686-linux].
2004/06/25: [bug] (thanks Isao Sonobe)
invalid result in onig_capture_tree_traverse().
fix make_capture_history_tree().
2004/06/24: Version 3.2.2
2004/06/24: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin].
2004/06/24: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32].
2004/06/24: [test] success in ruby 1.8.2 (2004-06-23) [i686-linux].
2004/06/24: [new] (thanks Isao Sonobe)
add onig_number_of_capture_histories().
2004/06/24: [bug] (thanks Isao Sonobe)
invalid char position match in UTF-16 and UTF-32.
add onigenc_always_false_is_allowed_reverse_match().
2004/06/17: Version 3.2.1
2004/06/17: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin].
2004/06/17: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32].
2004/06/17: [test] success in ruby 1.8.2 (2004-05-18) [i686-linux].
2004/06/17: [impl] should not use OP_REPEAT for (...)? even if target size
is long.
2004/06/17: [bug] (thanks nobu) [ruby-dev:23703]
should use STACK_AT() instead of stkp in OP_REPEAT_INC.
add IN_VAR_REPEAT flag in setup_tree().
2004/06/16: [impl] change select_opt_exact_info() to use ByteValTable[].
2004/06/16: [impl] change map_position_value() table values.
2004/06/14: [impl] (thanks John Carter)
RelAddrType, AbsAddrType and LengthType change
from short int to int type for the very long string match.
2004/06/14: [bug] (thanks Greg A. Woods)
fix nmatch argument of regexec() is smaller than
reg->num_mem + 1 case. (POSIX API)
2004/06/14: [spec] (thanks Greg A. Woods)
set pmatch to NULL if nmatch is 0 in regexec(). (POSIX API)
2004/06/10: Version 3.2.0
2004/06/10: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin].
2004/06/10: [test] success in ruby 1.9.0 (2004-05-27) [i386-mswin32].
2004/06/10: [test] success in ruby 1.8.2 (2004-05-18) [i686-linux].
2004/06/10: [dist] add README.ja.
2004/06/10: [new] add onig_copy_encoding().
2004/06/10: [API] add encoding argument to onig_set_meta_char().
add meta_char_table member to OnigEncodingType.
2004/06/08: [dist] add doc/API.ja.
2004/06/07: [API] add num_of_elements member to OnigCompileInfo.
2004/05/29: [memo] (thanks Kazuo Saito)
Oniguruma 3.1.0 was merged to Ruby 1.9.0.
2004/05/26: [impl] rename NST_SIMPLE_REPEAT to NST_STOP_BT_SIMPLE_REPEAT.
2004/05/26: [impl] doesn't need to check that target's simple repeat-ness
for EFFECT_MEMORY type node in setup_tree().
2004/05/25: Version 3.1.0
2004/05/25: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32].
2004/05/25: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin].
2004/05/25: [test] success in ruby 1.9.0 (2004-05-23) [i686-linux].
2004/05/25: [test] success in ruby 1.8.2 (2004-05-18) [i686-linux].
2004/05/25: [bug] (thanks Masahiro Sakai) [ruby-dev:23560]
ruby -ruri -ve 'URI::ABS_URI =~
"http://example.org/Andr\xC3\xA9"'
nested STK_REPEAT type stack can't backtrack repeat_stk[].
add OP_REPEAT_INC_SG and OP_REPEAT_INC_NG_SG.
2004/05/25: [new] support UTF-32LE. (ONIG_ENCODING_UTF32_LE)
2004/05/25: [new] support UTF-32BE. (ONIG_ENCODING_UTF32_BE)
2004/05/24: [impl] divide enc/utf16.c to utf16_be.c and utf16_le.c.
2004/05/24: [impl] add enc/unicode.c.
2004/05/24: [API] change calling sequences of onig_new_deluxe() and
onig_recompile_deluxe().
define OnigCompileInfo type.
2004/05/21: [impl] perform ensure process for rb_trap_exec() in match_at().
add onig_exec_trap() and CHECK_INTERRUPT_IN_MATCH_AT.
2004/05/21: [impl] add regex status check to onig_match().
2004/05/21: [new] add onig_get_capture_tree() and
onig_capture_tree_traverse().
2004/05/20: [spec] (thanks Isao Sonobe)
capture history return capture data tree.
(see sample/listcap.c)
2004/05/19: [bug] (thanks Simon Strandgaard)
Control-C does not work in matching process on Ruby.
add calling of CHECK_INTERRUPT into match_at().
ex. /<(?:[^">]+|"[^"]*")+>/.match('')
2004/05/19: [bug] (thanks Simon Strandgaard)
define virtual codepoint values for invalid encoding
byte 0xfe and 0xff in UTF-8.
ex. /\w+/u.match("%a\xffb\xfec%") ==> "a"
2004/05/19: [spec] (thanks Simon Strandgaard)
too big backref number should be treated as a sequence of
an octal char and number digits.
ex. /b\3777\c/.match("b\3777\c")
2004/05/17: [spec] rename encoding names "UTF-16 BE" and "UTF-16 LE"
to "UTF-16BE" and "UTF-16LE".
2004/05/17: [impl] move ismbchar() and mbclen() from oniguruma.h to oniggnu.h.
2004/05/17: [impl] rename onigenc_single_byte_is_allowed_reverse_match() to
onigenc_always_true_is_allowed_reverse_match().
2004/05/14: Version 3.0.0
2004/05/14: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin].
2004/05/14: [test] success in ruby 1.9.0 (2004-05-14) [i686-linux].
2004/05/14: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32].
(* need to edit parse.y:
register int c; ---> int c; in yylex())
2004/05/14: [impl] add regext.c.
2004/05/14: [spec] KOI8 is not included in library archive by default setup.
2004/05/14: [impl] implementation changes are completed for all encoding files.
2004/05/12: [impl] add divide_ambig_string_node().
ambiguous string is divided and normalized before
optimization and compilation process.
2004/05/11: [dist] remove INSTALL-RUBY from distribution.
2004/04/28: [memo] (thanks Kazuo Saito)
Oniguruma 2.2.8 was merged to Ruby 1.9.0.
2004/04/26: [spec] change value DEFAULT_MATCH_STACK_LIMIT_SIZE = 0 : unlimited
2004/04/26: [new] add onig_get_match_stack_limit_size() and
onig_set_match_stack_limit_size().
2004/04/26: [bug] add error check to re.c.181.patch and re.c.168.patch.
2004/04/23: [impl] remove ctype_support_level from OnigEncodingType.
2004/04/22: [spec] allow the range from single byte char to multibyte char in
character class for implementation reason.
ex. /[a-\xbb\xcc]/ in EUC-JP encoding.
2004/04/21: [impl] remove max_enc_len_by_first_byte() from OnigEncodingType.
2004/04/20: [new] add onig_copyright().
2004/04/20: [impl] add regversion.c.
2004/04/15: [new] add onig_get_ambig_flag().
2004/04/14: [bug] (thanks Isao Sonobe)
undefined bytecode error happens if ONIG_OPTION_FIND_LONGEST
is set.
should finish matching process if find-condition
is fail at OP_END in match_at().
2004/04/12: [impl] add ambig_flag to regex_t.
2004/04/09: [impl] move onig_set_meta_char() to regsyntax.c.
2004/04/09: [bug] (thanks HIROSE Masaaki) fix onig_version().
2004/04/08: [impl] add regsyntax.c.
2004/04/07: [new] support UTF-16 LE. (ONIG_ENCODING_UTF16_LE)
2004/04/05: [impl] add ONIGENC_CTYPE_NEWLINE.
2004/04/05: [memo] (thanks Kazuo Saito)
Oniguruma 2.2.6 was merged to Ruby 1.9.0.
2004/04/02: [memo] Version 2.2.6 was released.
2004/03/26: [new] support UTF-16 BE. (ONIG_ENCODING_UTF16_BE)
2004/03/25: [spec] support non 8-bit encodings.
2004/03/16: [memo] 2.X branch for 8-bit encodings only.
2004/03/16: Version 2.2.5
2004/03/16: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32].
2004/03/16: [test] success in ruby 1.9.0 (2004-02-24) [i686-linux].
2004/03/16: [impl] add property name to error message of
ONIGERR_INVALID_CHAR_PROPERTY_NAME.
2004/03/16: [spec] allow prefix 'Is' for \p{...} in ONIG_SYNTAX_PERL.
add syntax op. ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS.
2004/03/15: [dist] add sample/syntax.c.
2004/03/15: [spec] support NOT op. in char property. \p{^...}, \P{^...}.
add syntax op. ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT.
2004/03/15: [spec] rename ONIG_SYN_OP2_ESC_P_CHAR_PROPERTY to
ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY.
2004/03/10: [impl] move ONIGERR_XXX from regenc.h to oniguruma.h,
rename ONIGERR_XXX to ONIGENCERR_XXX in regenc.h.
2004/03/08: [impl] (thanks eban)
replace defined(__CYGWIN__) to defined(__GNUC__).
2004/03/08: [bug] (thanks eban) [ruby-dev:23172]
need to separate initialization for bcc32.
2004/03/06: [memo] (thanks Kazuo Saito)
Oniguruma 2.2.4 was merged to Ruby 1.9.0.
2004/03/05: [API] change second argument type of onig_set_meta_char()
from unsigned int to OnigCodePoint.
2004/03/05: [dist] (thanks Kazuo Saito)
add MANIFEST-RUBY.
2004/03/04: Version 2.2.4
2004/03/04: [impl] (thanks Moriyoshi Koizumi)
fix many warnings in Win32 VC++ with /W3 option.
2004/03/02: Version 2.2.3
2004/03/02: [bug] (thanks Isao Sonobe)
return invalid capture region value if capture history
is used. (OP_MEMORY_END_PUSH_REC bug)
ex. /\g(?@
\(\g\)){0}(?(?:\g
)*|){0}/
.match("((())())")
2004/03/02: [impl] (thanks Kazuo Saito)
add :nodoc: to onig_stat_print() for RDoc.
2004/03/02: [impl] don't use ONIG_SOURCE_IS_WRAPPED.
2004/02/27: Version 2.2.2
2004/02/27: [impl] fix the position of onig_stat_print().
2004/02/27: [impl] define ONIG_RUBY_DEFINE_GLOBAL_FUNCTION() in regint.h
for ignored by RDoc.
2004/02/26: Version 2.2.1
2004/02/26: [bug] [bugs.php.net:#26677] (thanks behrens)
invalid definition at onig_error_code_to_str()
in the case of NOT HAVE_STDARG_PROTOTYPES.
2004/02/25: Version 2.2.0
2004/02/25: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32].
2004/02/24: [test] success in ruby 1.9.0 (2004-02-24) [i686-linux].
2004/02/24: [bug] undefined IS_BLANK() and IS_GRAPH() was used in
onigenc_is_code_ctype() in the case of Ruby M17N.
2004/02/24: [new] support ISO-8859-16. (ONIG_ENCODING_ISO_8859_16)
2004/02/24: [bug] should not fold match for 0xdf in iso8859_6.c.
2004/02/24: [new] support ISO-8859-14. (ONIG_ENCODING_ISO_8859_14)
2004/02/23: [new] support ISO-8859-13. (ONIG_ENCODING_ISO_8859_13)
2004/02/23: [new] support ISO-8859-10. (ONIG_ENCODING_ISO_8859_10)
2004/02/20: [bug] fix iso_8859_4_mbc_is_case_ambig().
2004/02/20: [new] support ISO-8859-9. (ONIG_ENCODING_ISO_8859_9)
2004/02/19: [bug] correct ctype tables for ISO-8859-3, ISO-8859-4,
ISO-8859-6, ISO-8859-7, ISO-8859-8, KOI8_R.
2004/02/18: [bug] wrong replaced name OnigSyntaxGnuOnigex.
2004/02/17: [spec] check capture status for empty infinite loop.
[ruby-dev:20224] etc...
ex. /(?:\1a|())*/.match("a"),
/(?:()|()|()|(x)|()|())*\2b\5/.match("b")
add USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK.
add OP_NULL_CHECK_END_MEMST, OP_NULL_CHECK_END_MEMST_PUSH.
add stack type STK_NULL_CHECK_END.
2004/02/13: [impl] add OnigEncodingEUC_CN to enc/euc_kr.c.
2004/02/13: [bug] (thanks Simon Strandgaard)
parsing of nested repeat was invalid.
ex. /ab{2,3}*/ was /(?:a(?:b{2,3}))*/,
should be /a(?:b{2,3}*)/
2004/02/12: [bug] (thanks Simon Strandgaard)
OP_REPEAT_INC_NG process in match_at() is wrong.
ex. bad match /a.{0,2}?a/ =~ "0aXXXa0"
2004/02/12: [bug] (thanks Simon Strandgaard)
wrong fetch after (?x) option. ex. "(?x)\ta .\n+b"
2004/02/12: [bug] (thanks Simon Strandgaard)
[\^] is not a empty char class.
2004/02/09: [new] add onig_set_syntax_op(), onig_set_syntax_op2(),
onig_set_syntax_behavior(), onig_set_syntax_options().
2004/02/06: [dist] add a new target 'site' to Makefile.in.
2004/02/06: [dist] add index.html.
2004/02/03: [bug] oniggnu.h was not installed by 'make install'.
2004/02/02: Version 2.1.0
2004/02/02: [test] success in ruby 1.9.0 (2004-02-02) [i686-linux].
2004/02/02: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin].
2004/02/02: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32].
2004/02/02: [new] support ISO-8859-11. (ONIG_ENCODING_ISO_8859_11)
2004/02/02: [new] support ISO-8859-5. (ONIG_ENCODING_ISO_8859_5)
2004/02/02: [impl] should check single byte encoding or not in and_cclass()
and or_cclass().
2004/01/30: [dist] add oniggnu.h.
2004/01/30: [bug] ISO-8859-7 0xb7 (middle dot) is Punct type.
2004/01/30: [new] support ISO-8859-8. (ONIG_ENCODING_ISO_8859_8)
2004/01/29: [new] support ISO-8859-7. (ONIG_ENCODING_ISO_8859_7)
2004/01/29: [new] support ISO-8859-6. (ONIG_ENCODING_ISO_8859_6)
2004/01/28: [new] support KOI8-R. (ONIG_ENCODING_KOI8_R)
2004/01/28: [new] support KOI8. (ONIG_ENCODING_KOI8)
2004/01/27: [dist] rename enc/isotable.c to enc/mktable.c.
2004/01/27: [new] support ISO-8859-4. (ONIG_ENCODING_ISO_8859_4)
2004/01/26: [new] support ISO-8859-3. (ONIG_ENCODING_ISO_8859_3)
2004/01/26: [bug] EncISO_8859_{1,15}_CtypeTable[256] was wrong.
(0x80 - 0xff is not ASCII)
2004/01/23: [new] support ISO-8859-2. (ONIG_ENCODING_ISO_8859_2)
2004/01/23: [dist] add enc/isotable.c.
2004/01/22: [new] support EUC-TW. (ONIG_ENCODING_EUC_TW)
2004/01/22: [bug] definition of GET_ALIGNMENT_PAD_SIZE() and
ALIGNMENT_RIGHT() was wrong.
type casting should be unsigned int, not int.
2004/01/22: [impl] add defined(__x86_64) || defined(__x86_64__)
to unaligned word access condition. (AMD64 ?)
2004/01/21: [dist] rename enc/eucjp.c to enc/euc_jp.c.
2004/01/21: [new] support EUC-KR. (ONIG_ENCODING_EUC_KR)
2004/01/20: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin].
2004/01/20: [dist] change Makefile.in.
2004/01/20: [spec] add \p{...}, \P{...} in char class.
2004/01/20: [new] character property operators \p{...}, \P{...}.
supported in ONIG_SYNTAX_JAVA and ONIG_SYNTAX_PERL.
2004/01/19: [spec] allow /a{,n}/ as /a{0,n}/. (but don't allow /a{,}/)
2004/01/19: [dist] rename onigcomp200.h to onigcmpt200.h.
2004/01/19: [dist] update re.c.168.patch. svn add re.c.181.patch.
2004/01/16: [dist] update sample/*.c for new API.
2004/01/16: [dist] add onigcomp200.h. (for old API compatibility)
2004/01/16: [dist] update documents API, RE and RE.ja.
2004/01/16: [spec] change prefix REG_ -> ONIG_, regex_ onig_,
ENC_ -> ONIGENC, enc_ -> onigenc_.
2004/01/15: [impl] rename ENC_IS_MBC_E_WORD() to ENC_IS_MBC_WORD().
rename ENC_CTYPE_SUPPORT_LEVEL_SB_ONLY to
ENC_CTYPE_SUPPORT_LEVEL_SB.
2004/01/14: [impl] rename UNALIGNED_WORD_ACCESS to
PLATFORM_UNALIGNED_WORD_ACCESS.
2004/01/14: [impl] change MATCH_STACK_LIMIT_SIZE value from 200000 to 500000.
2004/01/13: [impl] remove ENC_CODE_TO_MBC_FIRST(enc,code) in regenc.h.
remove code_to_mbc_first member in RegCharEncodingType.
2004/01/13: [impl] remove head byte bitset information in cclass->mbuf.
2003/12/26: [impl] change macro name ismb_xxxx() in enc/*.c for
escape conflict.
2003/12/24: Version 2.0.0
2003/12/24: [spec] ignore case option is effective to numbered char.
ex. /\x61/i =~ "A"
2003/12/24: [test] success in ruby 1.8.1 (2003-12-24) [i686-linux].
2003/12/24: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin].
2003/12/24: [test] success in ruby 1.8.0 (2003-08-08) [i386-mswin32].
2003/12/24: [test] success in regex.c compile test on ruby-m17n.
(but can't make miniruby because re.c patch fail.)
2003/12/24: [bug] (thanks H.Miyamoto) /[\W]/ was wrong in 1.9.5.
2003/12/22: [spec] implement fold match on UTF-8 encoding.
2003/12/19: [impl] add ctype_support_level and ctype_add_codes() member to
RegCharEncoding type.
2003/12/19: [impl] add add_ctype_to_cc() in regparse.c.
2003/12/19: [impl] add enc_is_code_ctype() in REG_RUBY_M17N case.
2003/12/19: [impl] change ENC_CODE_TO_MBC() interface.
2003/12/18: [new] implement fold match. (variable number of char
match in ignore case mode.)
ex. German alphabet ess-tsett(U+00DF) match "SS" and "ss".
2003/12/17: [impl] refactoring of encoding system.
2003/12/17: [impl] add enc_init() in regenc.c.
2003/12/17: [new] support Big5. (REG_ENCODING_BIG5)
2003/12/16: [impl] change CodePoint from unsigned int to unsigned long.
2003/12/16: [new] support ISO 8859-15. (REG_ENCODING_ISO_8859_15)
2003/12/16: [impl] change P_() macro definition condition for Win32.
2003/12/16: [dist] add sample/encode.c
2003/12/16: [new] support ISO 8859-1. (REG_ENCODING_ISO_8859_1)
2003/12/15: [impl] rename IS_ENC_XXXX to ENC_IS_XXXX.
2003/12/15: [impl] rename RegDefaultCharEncoding to EncDefaultCharEncoding.
2003/12/15: [impl] divide encoding files. (enc/ascii.c, enc/utf8.c etc...)
2003/12/15: [bug] unexpected infinite loop in regex_snprintf_with_pattern().
change local var. type char* to UChar*.
2003/12/15: [impl] remove REG_MBLEN_TABLE[].
2003/12/15: [spec] rename function prefix regex_get_prev_char_head(),
regex_get_left_adjust_char_head() and
regex_get_right_adjust_char_head() to enc_xxxxxx().
2003/12/15: [impl] rename function prefixes in regenc.h from regex_ to enc_.
2003/12/12: [impl] remove USE_SBMB_CLASS.
2003/12/12: [impl] rename mb -> mbc, mblen() to enc_len().
2003/12/12: [impl] rename WCINT to CodePoint.
2003/12/11: [impl] delete IS_XXXX() ctype macros from regint.h.
2003/12/11: [impl] add enc->wc_is_ctype() and RegAsciiCtypeTable[256].
2003/12/11: [impl] remove RegAsciiCaseAmbigTable.
2003/12/10: [impl] use ENC_TO_LOWER() for ignore case comparison.
2003/12/08: [impl] *** re-defined RegCharEncoding in oniguruma.h. ***
2003/12/08: [impl] add USE_POSIX_REGION_OPTION to regint.h.
2003/12/08: [impl] add IS_ENC_WORD() to regenc.h.
2003/12/05: [impl] rename IS_CODE_XXXX() to IS_ENC_XXXX().
2003/12/05: [impl] delete IS_CODE_WORD() from regenc.h.
2003/12/04: [spec] rename REG_SYN_OP_BACK_REF to REG_SYN_OP_DECIMAL_BACKREF.
2003/12/04: [spec] add (REG_SYN_OP_ESC_W_WORD | REG_SYN_OP_ESC_B_WORD_BOUND |
REG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | REG_SYN_OP_BACK_REF)
to RegSyntaxGrep.
2003/12/04: [spec] remove REG_ENCODING_DEFAULT and REGCODE_DEFAULT.
2003/12/04: [spec] move declarations of regex_get_default_encoding() and
regex_set_default_encoding() from oniguruma.h to regenc.h.
2003/12/03: [new] add regex_get_default_encoding() and
regex_set_default_encoding().
2003/12/03: [spec] REG_ENCODING_DEFAULT meaning is changed.
(current default value, not initial default value.)
2003/12/03: [spec] REGCODE_XXX is obsoleted. use REG_ENCODING_XXX.
2003/12/02: [memo] alias svnst='svn status | grep -v "^\?"'
2003/12/02: [spec] move regex_set_default_trans_table() declaration
from oniguruma.h to regenc.h. (obsoleted API)
2003/12/02: [impl] move variables RegDefaultCharEncoding, DefaultTransTable and
AmbiguityTable to regenc.c.
2003/12/01: [impl] add regex_continuous_sbmb() to regenc.c.
2003/12/01: [dist] add regenc.h and regenc.c.
2003/11/18: [dist] change testconv.rb.
2003/11/18: [bug] (thanks Masaru Tsuda)
memory leak in parse_subexp().
2003/11/18: [bug] (thanks Masaru Tsuda)
memory leak in names_clear() and parse_char_class().
2003/11/17: [bug] memory leak in parse_char_class().
2003/11/17: [bug] (thanks Masaru Tsuda)
OptExactInfo length should not over OPT_EXACT_MAXLEN.
(concat_opt_exact_info_str())
2003/11/12: Version 1.9.5
2003/11/12: [test] success in ruby 1.8.0 (2003-08-08) [i386-cygwin].
2003/11/12: [test] success in ruby 1.8.1 (2003-11-11) [i686-linux].
2003/11/12: [spec] add definition of REG_INEFFECTIVE_META_CHAR.
2003/11/11: [dist] add a sample program sample/sql.c.
2003/11/11: [new] add variable meta character.
regex_set_meta_char()
2003/11/11: [spec] add syntax op. REG_SYN_OP_VARIABLE_META_CHARS.
2003/11/11: [spec] rename REG_SYN_OP_ESC_CAPITAL_Q_QUOTE to
REG_SYN_OP2_ESC_CAPITAL_Q_QUOTE,
REG_SYN_OP_QMARK_GROUP_EFFECT to
REG_SYN_OP2_QMARK_GROUP_EFFECT.
2003/11/06: [impl] define THREAD_PASS as rb_thread_schedule() in Ruby mode.
2003/11/05: [spec] add syntax behavior REG_SYN_WARN_REDUNDANT_NESTED_REPEAT.
2003/11/05: [spec] rename REG_SYN_WARN_FOR_CC_OP_NOT_ESCAPED to
REG_SYN_WARN_CC_OP_NOT_ESCAPED.
2003/11/04: [new] add regex_set_warn_func() and regex_set_verb_warn_func().
2003/10/30: [new] add regex_name_to_backref_number().
(for multiplex definition name, see sample/names.c)
2003/10/30: [spec] add name_end and reg argument to callback function of
regex_foreach_name(). (see sample/names.c)
2003/10/29: [spec] add syntax behavior REG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME.
add error code REGERR_MULTIPLEX_DEFINED_NAME.
2003/10/14: [dist] modify sample/simple.c.
2003/10/03: [bug] (thanks nobu) [ruby-dev:21472]
sub-anchor of optimization map info was wrong
in concat_left_node_opt_info().
ex. /^(x?y)/ = "xy" fail.
2003/09/17: Version 1.9.4
2003/09/17: [spec] change specification of char-class range in ignore case mode
follows with Ruby 1.8(2003-09-17).
ex. /[H-c]/i ==> (H-Z, 0x5b-0x60, a-c)/i
==> H-Z, h-z, 0x5b-0x60, a-c, A-C
2003/09/16: [bug] (thanks Guy Decoux)
remove env->option == option check in parse_effect().
change env->option for dynamic option in parse_exp().
(ex. bad match /(?i)(?-i)a/ =~ "A")
2003/09/12: [spec] rename REG_SYN_ALLOW_RANGE_OP_IN_CC to
REG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC,
REG_SYN_ESCAPE_IN_CC to REG_SYN_BACKSLASH_ESCAPE_IN_CC.
2003/09/11: [bug] change to IS_SYNTAX_OP2 at REG_SYN_OP2_ESC_GNU_BUF_ANCHOR.
2003/09/09: [spec] rename REG_SYN_OP2_ESC_M_BAR_META to
REG_SYN_OP2_ESC_CAPITAL_M_BAR_META,
REG_SYN_OP_ESC_Q_QUOTE to REG_SYN_OP_ESC_CAPITAL_Q_QUOTE,
REG_SYN_OP_ESC_SUBEXP to REG_SYN_OP_ESC_LPAREN_SUBEXP,
REG_SYN_OP_ESC_BUF_ANCHOR to REG_SYN_OP_ESC_AZ_BUF_ANCHOR,
REG_SYN_OP_ESC_GNU_BUF_ANCHOR to
REG_SYN_OP2_ESC_GNU_BUF_ANCHOR,
REG_SYN_OP_ESC_CONTROL_CHAR to REG_SYN_OP_ESC_CONTROL_CHARS,
REG_SYN_OP_ESC_WORD to REG_SYN_OP_ESC_W_WORD,
REG_SYN_OP_ESC_WORD_BEGIN_END to
REG_SYN_OP_ESC_LTGT_WORD_BEGIN_END,
REG_SYN_OP_ESC_WORD_BOUND to REG_SYN_OP_ESC_B_WORD_BOUND,
REG_SYN_OP_ESC_WHITE_SPACE to REG_SYN_OP_ESC_S_WHITE_SPACE,
REG_SYN_OP_ESC_DIGIT to REG_SYN_OP_ESC_D_DIGIT,
REG_SYN_OP_CC to REG_SYN_OP_BRACKET_CC,
REG_SYN_OP2_CCLASS_SET to REG_SYN_OP2_CCLASS_SET_OP,
REG_SYN_CONTEXT_INDEP_OPS to
REG_SYN_CONTEXT_INDEP_REPEAT_OPS,
REG_SYN_CONTEXT_INVALID_REPEAT_OPS to
REG_SYN_CONTEXT_INVALID_REPEAT_OPS.
add REG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR.
2003/09/08: [spec] rename REG_SYN_OP_ANYCHAR to REG_SYN_OP_DOT_ANYCHAR,
REG_SYN_OP_0INF to REG_SYN_OP_ASTERISK_ZERO_INF,
REG_SYN_OP_ESC_0INF to REG_SYN_OP_ESC_ASTERISK_ZERO_INF,
REG_SYN_OP_1INF to REG_SYN_OP_PLUS_ONE_INF,
REG_SYN_OP_ESC_1INF to REG_SYN_OP_ESC_PLUS_ONE_INF,
REG_SYN_OP_0INF to REG_SYN_OP_QMARK_ZERO_ONE,
REG_SYN_OP_ESC_0INF to REG_SYN_OP_ESC_QMARK_ZERO_ONE,
REG_SYN_OP_INTERVAL to REG_SYN_OP_BRACE_INTERVAL,
REG_SYN_OP_ESC_INTERVAL to REG_SYN_OP_ESC_BRACE_INTERVAL,
REG_SYN_OP_SUBEXP to REG_SYN_OP_LPAREN_SUBEXP,
REG_SYN_OP_ALT to REG_SYN_OP_VBAR_ALT,
REG_SYN_OP_ESC_ALT to REG_SYN_OP_ESC_VBAR_ALT,
REG_SYN_OP_NON_GREEDY to REG_SYN_OP_QMARK_NON_GREEDY,
REG_SYN_OP_SUBEXP_EFFECT to REG_SYN_OP_QMARK_GROUP_EFFECT,
REG_SYN_OP2_POSSESSIVE_{REPEAT,INTERVAL} to
REG_SYN_OP2_PLUS_POSSESSIVE_{REPEAT,INTERVAL},
REG_SYN_OP2_SUBEXP_CALL to REG_SYN_OP2_ESC_G_SUBEXP_CALL,
REG_SYN_OP2_NAMED_GROUP to REG_SYN_OP2_QMARK_LT_NAMED_GROUP
and REG_SYN_OP2_ESC_K_NAMED_BACKREF.
2003/09/02: [tune] call reduce_nested_qualifier() after disabling capture for
no-name group in noname_disable_map().
ex. /(a+)*(?...)/
2003/09/02: [impl] include is forgotten to erase in regcomp.c.
2003/09/01: [dist] update doc/RE and doc/RE.ja.
2003/08/26: [bug] (thanks Guy Decoux)
should not double free node at the case TK_CC_CC_OPEN
in parse_char_class().
2003/08/19: Version 1.9.3
2003/08/19: [inst] change re.c.180.patch.
2003/08/19: [impl] rename 'list of captures' to 'capture history'.
2003/08/19: [dist] add doc/RE.ja. (Japanese)
2003/08/19: [new] add regex_copy_syntax().
2003/08/19: [spec] rename REG_SYN_OP2_ATMARK_LIST_OF_CAPTURES to
REG_SYN_OP2_ATMARK_CAPTURE_HISTORY.
2003/08/18: [spec] (thanks nobu)
don't use IMPORT in oniguruma.h and onigposix.h.
2003/08/18: [impl] (thanks nobu) change error output to stdout in testconv.rb.
2003/08/18: [inst] (thanks nobu) lacked $(srcdir) in Makefile.in.
2003/08/18: [bug] REG_MBLEN_TABLE[SJIS][0xFD-0xFF] should be 1.
2003/08/18: [bug] (thanks nobu) mbctab_sjis[0x80] should be 0.
2003/08/18: [bug] (thanks nobu)
single/multi-byte decision was wrong in parse_char_class().
add regex_wc2mblen().
should not set fetched to 1 in TK_RAW_BYTE case.
2003/08/18: [bug] should update BitSet in the case inc_n >= 0
in add_wc_range_to_buf().
2003/08/13: [bug] change re.c.180.patch for fix rb_reg_to_s() in re.c.
2003/08/11: [bug] should clear region->list in regex_region_resize().
2003/08/08: Version 1.9.2
2003/08/08: [test] success in ruby 1.8.0 (2003-08-08) on Windows 2000
VC++ 6.0 and Cygwin.
2003/08/08: [impl] don't define macro vsnprintf for WIN32 platform,
because definition is added in win32\win32.h.
2003/08/08: [test] success in ruby 1.8.0 and ruby 1.6.8(2003-08-03) on Linux.
2003/08/08: [dist] change re.c.180.patch and re.c.168.patch.
2003/08/08: [new] (thanks akr)
implemented list of captures. (?@...), (?@...)
2003/08/07: [dist] add sample/listcap.c.
2003/08/06: [bug] OP_MEMORY_END_PUSH_REC case in match_at().
renewal of mem_start_stk[] should be after
STACK_PUSH_MEM_END() call.
2003/07/29: [new] add regex_get_encoding(), regex_get_options() and
regex_get_syntax().
2003/07/25: [spec] (thanks akr)
change group(...) to shy-group(?:...) if named group is
used in the pattern.
add REG_SYN_CAPTURE_ONLY_NAMED_GROUP.
2003/07/24: [spec] rename REG_OPTION_CAPTURE_ONLY_NAMED_GROUP to
REG_OPTION_DONT_CAPTURE_GROUP.
add REG_OPTION_CAPTURE_GROUP.
2003/07/17: [spec] rename REG_SYN_OP2_NAMED_SUBEXP to REG_SYN_OP2_NAMED_GROUP.
2003/07/17: [spec] add REGERR_EMPTY_GROUP_NAME.
2003/07/17: [spec] rename REGERR_INVALID_SUBEXP_NAME
to REGERR_INVALID_CHAR_IN_GROUP_NAME.
2003/07/17: [spec] restrict usable chars of group name to alphabet, digit,
'_' or multibyte-char in fetch_name(). [ruby-dev:20706]
2003/07/16: [impl] minor change of sample/names.c.
2003/07/14: [impl] rename USE_NAMED_SUBEXP to USE_NAMED_GROUP.
2003/07/14: [bug] add fetch_name() for USE_NAMED_SUBEXP off case.
2003/07/14: [API] add regex_number_of_names().
2003/07/08: [impl] change error message for undefined group number call.
'undefined group reference: /(a)\g<2>/'
--> 'undefined group <2> reference: /(a)\g<2>/'
2003/07/08: [dist] modify doc/RE.
2003/07/07: [impl] OP_SET_OPTION is not needed in compiled code.
add IS_DYNAMIC_OPTION() to regint.h.
2003/07/07: [spec] called group should not ignore outside option (?i:...).
ex. /(?i:(?(a)\2)){0}\g/.match("aA")
add opcode OP_BACKREFN_IC and OP_BACKREF_MULTI_IC.
set option status to effect memory in optimize_node_left().
2003/07/07: [impl] add opcode OP_ANYCHAR_ML, OP_ANYCHAR_ML_STAR and
OP_ANYCHAR_ML_START_PEEK_NEXT.
2003/07/07: [bug] (thanks nobu) REG_MBLEN_TABLE[SJIS][0x80] should be 1.
2003/07/07: [spec] rename REG_SYN_OP_QUOTE to REG_SYN_OP_ESC_Q_QUOTE.
2003/07/04: Version 1.9.1
2003/07/04: [new] add REG_OPTION_CAPTURE_ONLY_NAMED_GROUP. (thanks .NET)
2003/07/04: [spec] check mbuf member in the case of
REG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC in parse_char_class().
2003/07/04: [spec] typo REG_SYN_WARN_FOR_CC_OP_NOT_ESCAPEED.
should be REG_SYN_WARN_FOR_CC_OP_NOT_ESCAPED.
2003/07/04: [bug] conflict values on REG_SYN_WARN_FOR_CC_OP_NOT_ESCAPEED and
REG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC. (thanks nobu)
2003/07/03: [spec] add REG_SYN_OP_ESC_CONTROL_CHAR flag.
2003/07/03: [spec] remove REG_SYN_OP_ESC_OCTAL3 and REG_SYN_OP_ESC_X_HEX2
flag from RegSyntaxGnuRegex.
2003/07/03: [spec] remove REG_SYN_OP_NON_GREEDY flag from RegSyntaxGnuRegex.
2003/07/02: [dist] fix doc/RE.
2003/07/01: [impl] add config flag USE_VARIABLE_SYNTAX.
(turn off variable syntax on Ruby)
2003/07/01: [spec] add syntax behavior REG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND.
2003/06/30: [spec] allow different length top-level alternatives
in look-behind. ex. (?<=abc|abcd), (? (?>a*)b
(thanks Jeffrey E. F. Friedl)
2003/06/02: [impl] remove multibyte-BitSet for OP_CCLASS_MB/OP_CCLASS_MB_NOT.
2003/05/30: [new] char class intersection operator &&[...] like Java(TM).
(thanks akr)
2003/05/30: [bug] should use bbuf_free() for CClassNode in regex_node_free().
2003/05/29: [bug] wrong usage of syntax REG_SYN_ALLOW_EMPTY_RANGE_IN_CC.
/[d-a]/ should be error.
2003/05/28: [impl] optimize stop-backtrack compiled code.
(/(?>a*)/, /(?>\w+)/ etc...)
add OP_POP opcode.
2003/05/28: [new] possessive repeat operator. (?+, *+, ++, {n,m}+)
2003/05/27: [spec] '-' at beginning of char-class should be warn only if
it is start of range. (ex. /[--a]/)
2003/05/27: [spec] should not warn for right bracket at beginning of pattern.
ex. /]aaa/
2003/05/27: [spec] change CCEND_ESC_WARN() from VERB_WARNING() to WARNING().
2003/05/27: [spec] /[]aaa/ should be empty char-class error.
/[]aaa]/ should be warn for 'without backslash'.
(add char_exist_check() in regparse.c)
2003/05/26: [bug] OP_REPEAT in recursive subexp call.
ex. /(?(a|b\gc){3,5})/.match("baaaaca") => "baaaaca"
was wrong result. (should be "aaaa")
2003/05/26: [impl] add num_call member to regex_t.
2003/05/26: [impl] add repeat_range member to regex_t.
(for delete upper,lower members from StackType.u.repeat)
2003/05/26: [bug] change print_names() to external regex_print_names().
2003/05/26: [tune] change OP_NULL_CHECK_END process in match_at().
2003/05/26: [spec] change CCEND_ESC_WARN() from WARNING() to VERB_WARNING().
2003/05/26: [spec] remove POSIXLINE option. (?p:...)
(be made the same as Ruby.)
2003/05/22: [spec] use OP_NULL_CHECK_XXX only if repeat is infinite.
prev. /(?:()|()){0,10}\1\2/ =~ "" ==> FAIL
now /(?:()|()){0,10}\1\2/ =~ "" ==> MATCH
2003/05/22: [impl] change target_empty setting condition in setup_tree().
2003/05/19: [impl] avoid zero length repeat optimization. (thanks matz)
/()*/ ==> /()?/, /()+/ ==> /()/ etc...
2003/05/19: [impl] minor changes for gcc -Wall. (-DREG_DEBUG_STATISTICS case)
2003/05/19: [spec] rename regex_foreach_names() to regex_foreach_name().
2003/05/16: [new] add --with-statistics option to configure.
2003/05/16: [bug] move RegOpInfo[] definition to regint.h.
2003/05/16: [new] add regex_version().
2003/05/14: Version 1.8.6
2003/05/14: [bug] use _vsnprintf() on Win32.
2003/05/14: [spec] define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE.
(/\n$/ =~ "\n", /\n\Z/ =~ "\n") [ruby-dev:20125]
2003/05/14: [impl] minor changes for gcc -Wall.
2003/05/14: [impl] add string.h check in AC_CHECK_HEADERS().
2003/05/13: [impl] minor changes for gcc -Wall.
2003/05/13: [impl] add regex_snprintf_with_pattern().
2003/05/13: [spec] add warning for char class meta character without escape
in Ruby mode ('[', '-', ']').
2003/05/13: [impl] define WARNING() and VERB_WARNING() in regint.h.
2003/05/13: [bug] correct is_code_ascii() for /[[:ascii:]]/.
2003/05/12: [dist] add regular expression document (doc/RE).
2003/05/12: [spec] specification of $(END_LINE) was made the same as Ruby 1.8.
[ruby-dev:20130] (thanks matz)
2003/05/12: [memo] shifted to Subversion(version 0.21.0) from CVS.
2003/03/19: Version 1.8.5
2003/03/19: [impl] change REG_EXTERN definition. (thanks nobu)
2003/03/19: [impl] abbreviation for long error_par in regex_error_code_to_str().
2003/03/18: [dist] change re.c.XXX.patch for GNU regex API changes.
2003/03/18: [spec] change API regex_new(), regex_recompile() and
regex_error_code_to_str().
change API re_compile_pattern() and re_recompile_pattern().
2003/03/18: [spec] replace REGERR_END_PATTERN_AT_GROUP_{COMMENT|OPTION} to
REGERR_END_PATTERN_IN_GROUP.
2003/03/17: [impl] should free err_arg.
2003/03/17: [bug] mistake(high -> to) in add_wc_range_to_buf().
2003/03/17: [spec] add err_arg argument to regex_new() and regex_recompile().
for detail error message. (thanks akr)
2003/03/12: Version 1.8.4
2003/03/12: [tune] use cached value of effect node in get_min_match_length().
2003/03/12: [bug] escaped alphabet should be TK_RAW_BYTE
in fetch_token() and fetch_token_in_cc().
2003/03/12: [spec] change named backref and subexp call format.
backref: \k, call: \g (thanks akr)
2003/03/11: [inst] add regparse.[ch] in win32/Makefile.
2003/03/11: [bug] if UNALIGNED_WORD_ACCESS isn't set,
then compile error in unset_addr_list_fix(). (thanks knu)
2003/03/10: [impl] divide regcomp.c to regcomp.c, regparse.c and regparse.h.
2003/03/10: [bug] should handle multi-byte code name in fetch_name().
2003/03/10: [spec] remove REGERR_TABLE_FOR_IGNORE_CASE_IS_NOT_SETTED.
2003/03/10: [spec] support POSIX API option REG_NOSUB.
add comp_options member to POSIX API regex_t.
2003/03/10: Version 1.8.3
2003/03/10: [bug] can not compile with Ruby 1.6.8.
(inconsistent st.h with 1.6 and 1.8)
use hash table on Ruby 1.8 only.
2003/03/10: [spec] forbid to use '\' in group name.
2003/03/08: [impl] remove check_backref_number().
2003/03/08: [bug] called group in 0-repeat should not be eliminated from
compile code. ex. /(?*n)(?){0}/ (thanks akr)
add is_refered member to QualifierNode.
2003/03/07: [impl] use hash table(st.[ch]) for implementation of name table.
(enable on Ruby in default)
2003/03/07: [new] add regex_foreach_names().
2003/03/06: [impl] add member reg->stack_pop_level.
2003/03/06: [impl] add operator OP_MEMORY_START and member reg->backtrack_mem.
2003/03/06: [bug] if REG_OPTION_FIND_LONGEST or REG_OPTION_NOT_EMPTY,
should handle backtrack of MEM_END.
add OP_MEMORY_END_PUSH and OP_MEMORY_END_PUSH_REC.
2003/03/06: [impl] rename OP_MEMORY_END_PUSH to OP_MEMORY_END_MARK.
2003/03/06: [spec] change error messages.
2003/03/06: [tune] add tiny_pop check in STACK_POP.
2003/03/05: Version 1.8.2
2003/03/05: [impl] use cache info in EFFECT_MEMORY case
in optimize_node_info().
2003/03/05: [impl] add EFFECT_MEMORY node reference count check
in optimize_node_left().
2003/03/05: [impl] add min-len, max-len, char-len cache in EffectNode.
2003/03/05: [spec] allow to call in look behind. ex. /(?<=(?*a))/
2003/03/05: [bug] forgotten N_ANCHOR case in check_backref_number(),
subexp_inf_recursive_check_trav() etc...
2003/03/05: [impl] rename USE_ONIGURUMA_EXTENSION to USE_SBMB_CLASS.
2003/03/04: [impl] add CALL-node info in optimize_node_left().
2003/03/04: [spec] prohibit left recursion of subexp call. ex. (?|(?*n)a)
add subexp_inf_recursive_check_trav().
2003/03/04: [spec] rename REG_SYN_STRICT_CHECK_BACKREF_NUMBER
to REG_SYN_STRICT_CHECK_BACKREF
2003/03/03: [bug] /(?a(?*n)|)/ isn't infinite recursion.
fix N_LIST case in subexp_recursive_check(). (thanks akr)
2003/03/03: [bug] /(?|(?*n))+/ segmentation fault.
should re-allocate in unset_addr_list_add(). (thanks akr)
2003/03/01: Version 1.8.1
2003/03/01: [bug] change STACK_GET_MEM_START() and STACK_PUSH_MEM_END().
2003/03/01: [new] add reg_name_to_group_numbers() to POSIX API.
2003/03/01: [impl] use OP_MEMORY_END_PUSH in callable subexp compiled code
only if subexp is recursive.
2003/03/01: [spec] rename regex_name_to_backrefs() to
regex_name_to_group_numbers().
2003/02/28: [impl] use function stack_double() instead of macro.
2003/02/28: [new] subexp call. (?*name) (thanks akr)
2003/02/28: [spec] add match stack limit check. (MATCH_STACK_LIMIT_SIZE)
2003/02/28: [impl] check recursive subexp call.
2003/02/28: [impl] add opcode OP_MEMORY_END_PUSH for callable subexp.
2003/02/28: [impl] add opcode OP_CALL, OP_RETURN.
add stack type STK_CALL_FRAME, STK_RETURN, STK_MEM_END.
2003/02/26: [spec] add new syntax behavior REG_SYN_STRICT_CHECK_BACKREF_NUMBER.
if it is set, then error /(\1)/, /\1(..)/ etc...
2003/02/26: [spec] if backref number is greater than max group number,
then return compile error. (REGERR_INVALID_BACKREF_NUMBER)
2003/02/26: [tune] bad implemented N_ALT case in get_min_match_length().
2003/02/26: [dist] auto update testc.c and win32/testc.c in dist target.
2003/02/26: [impl] add -win option to testconv.rb.
2003/02/25: [spec] allow to assign same name to different group.
add OP_BACKREF_MULTI.
2003/02/24: [impl] reduce redundant repeat of empty target.
ex. /()*/ ==> /()?/, /()+/ ==> /()/, /(?:)+/ ==> //
2003/02/24: [impl] change condition in regex_is_allow_reverse_match().
2003/02/24: [impl] convert i(/../, ...) functions in testconv.rb.
2003/02/24: [impl] change name table struct.
2003/02/22: Version 1.8.0
2003/02/22: [new] named subexp, named back reference. (thanks akr)
define: (?...), back-ref: \g
2003/02/22: [impl] use str_node_can_be_split().
2003/02/21: [dist] add sample/posix.c
2003/02/21: [spec] rename some error code symbols.
2003/02/21: [spec] max number of multibyte ranges(255) is small.
255 --> 1000. (thanks MoonWolf)
2003/02/20: [new] supported Basic Regular Expression(BRE) in POSIX API.
(REG_EXTENDED option: Extended RE)
2003/02/20: [new] variable syntax.
2003/02/12: Version 1.7.2
2003/02/12: [bug] mismatch /\?a/i.match('?A').
check raw value in scan_make_node() and scan_backslash().
(thanks Nobu)
2003/02/12: [impl] rename 'max_mem' to 'num_mem' in regex_t.
2003/02/12: [impl] rename 'code' to 'enc' in regex_t.
2003/02/12: [spec] remove transtable argument in regex_new and regex_recompile.
remove transtable member in regex_t.
2003/02/10: [inst] change backup file suffix name from '.orig' to '.ruby_orig'.
(win32/Makefile)
2003/02/10: [spec] number check in scan_char_class() ignore-case mode.
ex. /[\x58-\x64]/i
2003/02/10: [impl] don't use OP_MEMORY_END_PUSH (and STK_MEM_END).
2003/02/10: [impl] lift up head_exact value from child qualifier node to parent.
2003/02/10: [tune] change stack type values.
2003/02/10: [dist] add HISTORY.
2003/02/08: [tune] change stack type values.
2003/02/08: [tune] add STACK_BASE_CHECK().
2003/02/08: [tune] add STACK_PUSH_ENSURED().
2003/02/08: [dist] change contents of doc/API.
2003/02/07: [inst] change backup file suffix name from '.orig' to '.ruby_orig'.
2003/02/07: [spec] range in char-class should be same spec. with Ruby
in ignore-case mode. (ex. /[A-c]/i == /[a-c]/i)
(thanks MoonWolf)
2003/02/07: [spec] [!--] should be allowed. (thanks MoonWolf)
2003/02/07: [dist] refresh re.c.180.patch for re.c (2003-02-06).
2003/02/07: Version 1.7.1
2003/02/07: [impl] check first byte of string in ignore-case mode.
(get_head_exact_node())
2003/02/07: [impl] remove redundant statements in setup_tree().
2003/02/06: [new] create Win32 DLL.
2003/02/06: [impl] use P_() macro for function prototype.
2003/02/06: [impl] add HAVE_PROTOTYPE, HAVE_STDARG_PROTOTYPES in
configure.in and config.h.in.
2003/02/06: [spec] /[0-9-a]/ is allowed as usual char '-' and 'a' in Ruby.
add USE_BETTER_COMPATIBILITY_FOR_ORIGINAL_REGEX in
regint.h. (thanks MoonWolf)
2003/02/06: [spec] rename REG_MBCTYPE_XXXX to REG_ENCODING_XXXX in onigposix.h.
2003/02/05: [spec] rename MBCTYPE_XXXX to REG_MBCTYPE_XXXX in onigposix.h.
2003/02/05: [spec] add POSIX API error REG_EONIG_THREAD to onigposix.h.
2003/02/05: [dist] add .cvsignore file.
2003/02/04: Version 1.7
2003/02/04: [bug] typo miss in regex_region_copy().
2003/02/04: [impl] change THREAD_PASS macro. (regint.h)
2003/02/04: [dist] add API document file doc/API.
2003/02/04: [tune] if sub_anchor has ANCHOR_BEGIN_LINE then
set REG_OPTIMIZE_EXACT_BM in set_optimize_exact_info().
2003/02/04: [spec] reimplement regex_clone() and it is obsoleted.
2003/02/04: [bug] add REGERR_OVER_THREAD_PASS_LIMIT_COUNT
to regerror.c regposix.c.
2003/02/03: [bug] Hankaku-Kana may be second byte in Shift_JIS
regex_is_allow_reverse_match().
2003/02/03: [impl] add optimization type REG_OPTIMIZE_EXACT_BM_NOT_REV.
remove exact_allow_reverse_match member in regex_t.
2003/02/03: [impl] add exact_allow_reverse_match member in regex_t.
2003/02/03: [impl] compile-search conflict in regex_search() is handled.
2003/02/01: [tune] decrease regex_region_clear() calling from regex_search().
2003/02/01: [tune] remove region argument from match_at().
2003/01/31: [tune] don't use strlen() in regexec() and regcomp().
2003/01/31: [tune] decrease regex_reduce_chain() calling in regex_search().
2003/01/31: [bug] STRING_CMP() in regexec.c was wrong in ignore-case.
2003/01/31: [impl] convert to lower-case char at string compile time.
change SBTRANSCMP() in regexec.c.
2003/01/31: [impl] rename TTRANS() to TOLOWER().
2003/01/30: [bug] .c.o --> .c.obj in win32\Makefile.
2003/01/30: [impl] add -DNOT_RUBY to Makefile.in.
NOT_RUBY is refered in regint.h for escape double
including config.h.
2003/01/30: [impl] when string hasn't case ambiguity, don't compile
to ignore case opcode.
2003/01/29: [impl] add SJIS, UTF-8 test_sb() test.
2003/01/29: [dist] add INSTALL-RUBY file.
2003/01/28: [test] success in Cygwin, Ruby 1.8.0 (2003-01-27).
2003/01/24: [inst] add rback target to Makefile.in.
2003/01/24: [impl] change SBCMP() -> IS_NEWLINE() in match_at().
2003/01/23: [impl] add encoding arg to scan_xxxx_number().
2003/01/23: [impl] rename WCInt to WCINT.
2003/01/22: [bug] POSIX API regexec() was not thread safe.
remove region member from POSIX regex_t.
[new] add search time option REG_OPTION_POSIX_REGION.
(region argument is treated as regmatch_t[] type)
speed up regexec().
2003/01/22: [memo] start CVS entry in my box.
2003/01/21: Version 1.6
2003/01/21: [test] Mac OS X 10.1, Ruby 1.8.0 (2003-01-20)
2003/01/20: [impl] add UTF-8 check to test.rb. (thanks UENO Katsuhiro)
2003/01/18: [impl] change REGION_NOTPOS to REG_REGION_NOTPOS in regex.h.
2003/01/17: [dist] add sample/simple.c.
2003/01/17: [inst] add configure option --with-rubydir.
2003/01/17: [bug] bad implemeted POSIX API options.
default: /./ not match "\n", anchor not match "\n"
REG_NEWLINE: /./ not match "\n", anchor match "\n"
2003/01/16: [impl] rewrite POSIX API regexec() for speed up.
2003/01/16: [impl] add region member to POSIX regex_t struct.
2003/01/16: [inst] rename library file from 'libregex.a' to 'libonig.a'.
2003/01/15: [dist] add testc.c to distribution file.
2003/01/15: [test] success in 'make rtest/ctest/ptest' on Windows 2000.
2003/01/15: [bug] change '/' to \' in win32/Makefile.
2003/01/14: [test] success in Ruby make test on Windows 2000.
VC++6.0, Ruby 1.6.8 (2003-01-12)
2003/01/14: [inst] change Makefile.in and win32/Makefile.
2003/01/11: [inst] changes for Win32 platform. (regint.h, reggnu.c, regcomp.c)
2003/01/11: [dist] add win32 directory. (config.h, Makefile, testc.c)
2003/01/10: [inst] add onigposix.h to install target. (Makefile.in)
2003/01/10: [bug] lacked a comma in ESTRING[]. (regposerr.c)
2003/01/10: [bug] local variable name was wrong. buf -> tbuf (regerror())
2003/01/10: [spec] remove REG_RUBY_M17N case from onigposix.h and regposix.c.
2003/01/09: Version 1.5
2003/01/09: [inst] replace Ruby re.c.XXX.patch files. (166 -> 168, 172 -> 180)
2003/01/09: [new] implement POSIX API. (thanks knu)
(onigposix.h, regposix.c, regposerr.c)
2003/01/08: [spec] remove REGERR_END_PATTERN_AFTER_BACKSLASH in regex.h.
2003/01/08: [spec] region arg can be NULL in regex_search() and regex_match().
2003/01/08: Version 1.4
2003/01/08: [inst] add test program converter (test.rb -> testc.c).
2003/01/08: [bug] move GET_WCINT() from regcomp.c to regint.h.
2003/01/07: [inst] add new test script (test.rb).
2002/12/30: [bug] wrong merge in multibyte mode (alt_merge_opt_exact_info()).
2002/12/28: [inst] add rtest target to Makefile.in.
2002/12/28: [bug] /\xfe/.match("\xfe") mismatch in multibyte mode.
add "raw" flag arg to concat_opt_exact_info_str().
2002/12/25: [bug] check condition was wrong in alt_merge_opt_map_info().
2002/12/25: [impl] add threshold_len check in regex_search().
2002/12/23: [bug] prec-read in alternative (/a|(?=z).f/.match("zf") => nil)
2002/12/23: [bug] \G in alternative (/a|\Gz/.match("bza") => "z").
add start member in MatchArg. (regexec.c)
2002/12/21: [impl] **** rewrite all optimization process. ****
2002/12/16: [impl] remove node subtype EFFECT_EMPTY.
2002/12/12: [impl] reconstruct node types. (regcomp.c)
2002/12/11: [impl] add regerror.c
2002/12/10: [bug] [ruby-dev:19042] (thanks Nobu)
anchor(\G etc...) influenced outside of "|". (/a|\Gb/)
2002/11/30: [bug] [ruby-dev:18966] (thanks Nobu)
char-class(\S, [^\s] etc...) optimize map-info was wrong.
2002/11/29: [bug] infinite loop on NULL-pointer str search (regex_search()).
(thanks matz)
2002/11/29: [bug] change static -> extern (regex_chain_reduce()).
2002/11/29: [bug] change encoding to RegDefaultCharEncoding
in re_recompile_pattern(). (adapt to re.c)
2002/04/24: [spec] USE_ONIGURUMA_EXTENSION is disabled in default.
2002/04/24: [new] add searching time option: REG_OPTION_NOTBOL/NOTEOL.
add searching time option argument to regex_search() and
regex_match(). (prepare for POSIX API)
2002/04/20: [impl] divide regex.c file into regcomp.c, regexec.c, reggnu.c
and regint.h.
2002/04/09: [impl] move IS_MULTILINE() to outside of loop in OP_ANYCHAR_STAR.
2002/04/08: [impl] don't use OP_REPEAT operator for '??'.
2002/04/06: [impl] reduce redundant nested repeat operators(?,*,+,??,*?,+?).
ex. (?:a*)?, (?:a??)* etc..
2002/04/06: [spec] should not warn for /(?:a?)+?/.
2002/04/04: [spec] should allow fixed length alternative and repeat pattern
in look-behind. ex. /(?<=(a|b){3})/ (thanks Guy Decoux)
2002/04/02: [spec] should warn for /(?:a+)?/ and /(?:a*)??/. (thanks akr)
2002/04/01: Version 1.3
2002/04/01: [dist] add COPYING.
2002/03/30: [spec] warn redundant nested repeat operator
in Ruby verbose mode. ex. (?:a*)?
2002/03/30: [spec] nested repeat operator error check should be
same with GNU regex. (thanks Guy Decoux)
2002/03/30: [new] add \x{hexadecimal-wide-char}. (thanks matz)
2002/03/27: [bug] MBCTYPE_XXX symbol values should be same with GNU regex.
2002/03/27: [impl] add THREAD_ATOMIC to regex_clone(), regex_init(), regex_end().
2002/03/25: [spec] if encoding is utf-8, allow combination of singlebyte and
multibyte code range in char class.
(cancelled 2002/04/01: for M17N compatibility)
2002/03/25: [dist] description of the license condition is added to README.
2002/03/23: [bug] should set all bits of reg->mem_stats,
if REG_OPTION_FIND_LONGEST or REG_OPTION_NOT_EMPTY.
2002/03/23: [new] add a new option REG_OPTION_NOT_EMPTY.
2002/03/20: [spec] allow incompleted left brace as an usual char.
ex. /{/, /({)/, /a{2,3/ etc...
2002/03/20: [impl] serialize integer in bytecode.
(switch by UNALIGNED_WORD_ACCESS in regex.c)
2002/03/20: [impl] change re_mbcinit() for REG_RUBY_M17N.
2002/03/19: [impl] word alignment of char class multi-byte code ranges.
2002/03/19: [impl] replace OP_EXACTMB4N with OP_EXACTMB3N.
2002/03/19: [bug] OP_CCLASS_MB_NOT process in matchAt() is wrong.
2002/03/19: [new] add re_mbctab[] for Ruby extension library compatibility.
2002/03/19: [spec] allow nested repeat operator, if operator is {n,m} type.
2002/03/19: [new] add REG_IS_PATTERN_ERROR(ecode) in regex.h
2002/03/18: [spec] /[a-b-c]/ should be error.
2002/03/18: [bug] /[\w-a]/ should be error. (thanks Guy Decoux)
2002/03/18: [bug] /[\]/ should be error. (thanks Guy Decoux)
2002/03/18: [bug] /()*/ etc.. should not be error. (thanks Guy Decoux)
2002/03/18: [spec] /a{1}*/ should not be error. (thanks Guy Decoux)
2002/03/18: [bug] ab{2}{3} was interpreded to (?:a(?:b{2})){3}
(thanks Guy Decoux)
2002/03/18: [bug] abort /(?i)*a/ etc... (thanks Guy Decoux)
2002/03/18: [bug] abort /a|*/,/a|{1}/ etc... (thanks Guy Decoux)
2002/03/13: Version 1.2
2002/03/13: [test] success in rubicon/builtin/AllBuiltinTests.rb.
(thanks rubicon)
2002/03/13: [bug] OP_EXACTMBN process in matchAt() is wrong.
2002/03/13: [bug] start argument of BackwardSearchRange() is wrong.
2002/03/12: [spec] change function name style from CamelCase
to underline_separation. (includes API)
2002/03/12: [bug] if pattern has nested null-check, cause infinite loop.
correct STACK_NULL_CHECK() macro. (thanks Guy Decoux)
2002/03/11: [bug] it is wrong that four numbers to continue as
an octal value in scanBackSlash(). ex. /\0111/
(thanks matz)
2002/03/11: [new] \k (single-byte word char), \K (multi-byte char).
2002/03/09: [inst] add two targets to Makefile.in (166 and 172).
2002/03/09: [spec] decrease REG_MAX_BACKREF_NUM, REG_MAX_REPEAT_NUM
values.
2002/03/08: [spec] allow use of "\A"(begin-buf) in look-behind.
2002/03/08: [impl] add a new opcode OP_PUSH_IF_PEEK_NEXT.
2002/03/08: [impl] add a new opcode OP_ANYCHAR_STAR_PEEK_NEXT.
2002/03/07: [spec] prohibit use of capture group "(...)"
in negative look-behind.
2002/03/07: [inst] add configure.in, config.h.in, Makefile.in.
2002/03/07: [impl] call Init_REGEX_STAT() in RegexInit().
2002/03/07: [spec] less length string match with negative look-behind.
ex. /(?
svn copy file:///home/kosako/svnreps/svnrep_onig/trunk file:///home/kosako/svnreps/svnrep_onig/tags/5.0.0 -m "ADD TAG: 5.0.0"
svn propset svn:ignore -F .cvsignore .
svn commit -m "..."
cvs history -T
cvs rtag "VERSION_X_X_X" oniguruma
* write Makefile.am and configure.in.
> aclocal
> libtoolize or glibtoolize
> automake --foreign --add-missing
> autoconf
> configure --with-rubydir=... CFLAGS="-O2 -Wall"
VERSION = current:revision:age
current: interface number (from 0)
revision: implementation number of same interface (from 0)
age: number of supported previous interfaces
(if current only supported then age == 0)
//END
oniguruma-6.7.0/INSTALL 0000664 0000000 0000000 00000036610 13212423352 0014566 0 ustar 00root root 0000000 0000000 Installation Instructions
*************************
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Basic Installation
==================
Briefly, the shell command `./configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX `make' updates targets which have the same time stamps as
their prerequisites, which makes it generally unusable when shipped
generated files such as `configure' are involved. Use GNU `make'
instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
oniguruma-6.7.0/Makefile.am 0000664 0000000 0000000 00000002160 13212423352 0015562 0 ustar 00root root 0000000 0000000 ## Makefile.am for Oniguruma
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src test sample
EXTRA_DIST = oniguruma.pc.in HISTORY README_japanese README.md \
index.html index_ja.html \
CMakeLists.txt dist.info oniguruma.pc.cmake.in cmake/dist.cmake \
src/config.h.cmake.in \
doc/API doc/API.ja doc/RE doc/RE.ja doc/FAQ doc/FAQ.ja \
doc/UNICODE_PROPERTIES \
src/Makefile.windows src/config.h.win32 src/config.h.win64 \
windows/testc.c contributed/libfuzzer-onig.cpp
bin_SCRIPTS = onig-config
onig-config: onig-config.in
do_subst = sed \
-e 's,[@]datadir[@],$(datadir),g' \
-e 's,[@]datarootdir[@],$(datarootdir),g' \
-e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
-e 's,[@]prefix[@],$(prefix),g' \
-e 's,[@]exec_prefix[@],$(exec_prefix),g' \
-e 's,[@]libdir[@],$(libdir),g' \
-e 's,[@]includedir[@],$(includedir),g'
oniguruma.pc: $(srcdir)/oniguruma.pc.in Makefile
$(do_subst) < $(srcdir)/oniguruma.pc.in > $(@)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = oniguruma.pc
oniguruma-6.7.0/NEWS 0000664 0000000 0000000 00000000000 13212423352 0014214 0 ustar 00root root 0000000 0000000 oniguruma-6.7.0/README 0000664 0000000 0000000 00000013222 13212423352 0014407 0 ustar 00root root 0000000 0000000 README 2017/08/25
Oniguruma ---- (C) K.Kosako
https://github.com/kkos/oniguruma
FIXED Security Issues:
CVE-2017-9224, CVE-2017-9225, CVE-2017-9226
CVE-2017-9227, CVE-2017-9228, CVE-2017-9229
---
Oniguruma is a regular expressions library.
The characteristics of this library is that different character encoding
for every regular expression object can be specified.
Supported character encodings:
ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
EUC-JP, EUC-TW, EUC-KR, EUC-CN,
Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
* GB18030: contributed by KUBO Takehiro
* CP1251: contributed by Byte
------------------------------------------------------------
License
BSD license.
Install
Case 1: Unix and Cygwin platform
1. autoreconf -vfi (* case: configure script is not found.)
2. ./configure
3. make
4. make install
* uninstall
make uninstall
* configuration check
onig-config --cflags
onig-config --libs
onig-config --prefix
onig-config --exec-prefix
Case 2: Windows 64/32bit platform (Visual Studio)
execute make_win64 or make_win32
src/onig_s.lib: static link library
src/onig.dll: dynamic link library
* test (ASCII/Shift_JIS)
1. cd src
2. copy ..\windows\testc.c .
3. nmake -f Makefile.windows ctest
(I have checked by Visual Studio Community 2015)
Regular Expressions
See doc/RE (or doc/RE.ja for Japanese).
Usage
Include oniguruma.h in your program. (Oniguruma API)
See doc/API for Oniguruma API.
If you want to disable UChar type (== unsigned char) definition
in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then
include oniguruma.h.
If you want to disable regex_t type definition in oniguruma.h,
define ONIG_ESCAPE_REGEX_T_COLLISION and then include oniguruma.h.
Example of the compiling/linking command line in Unix or Cygwin,
(prefix == /usr/local case)
cc sample.c -L/usr/local/lib -lonig
If you want to use static link library(onig_s.lib) in Win32,
add option -DONIG_EXTERN=extern to C compiler.
Sample Programs
sample/simple.c example of the minimum (Oniguruma API)
sample/names.c example of the named group callback.
sample/encode.c example of some encodings.
sample/listcap.c example of the capture history.
sample/posix.c POSIX API sample.
sample/sql.c example of the variable meta characters.
(SQL-like pattern matching)
sample/user_property.c example of user defined Unicode property.
Test Programs
sample/syntax.c Perl, Java and ASIS syntax test.
sample/crnl.c --enable-crnl-as-line-terminator test
Source Files
oniguruma.h Oniguruma API header file. (public)
onig-config.in configuration check program template.
regenc.h character encodings framework header file.
regint.h internal definitions
regparse.h internal definitions for regparse.c and regcomp.c
regcomp.c compiling and optimization functions
regenc.c character encodings framework.
regerror.c error message function
regext.c extended API functions. (deluxe version API)
regexec.c search and match functions
regparse.c parsing functions.
regsyntax.c pattern syntax functions and built-in syntax definitions.
regtrav.c capture history tree data traverse functions.
regversion.c version info function.
st.h hash table functions header file
st.c hash table functions
oniggnu.h GNU regex API header file. (public)
reggnu.c GNU regex API functions
onigposix.h POSIX API header file. (public)
regposerr.c POSIX error message function.
regposix.c POSIX API functions.
mktable.c character type table generator.
ascii.c ASCII encoding.
euc_jp.c EUC-JP encoding.
euc_tw.c EUC-TW encoding.
euc_kr.c EUC-KR, EUC-CN encoding.
sjis.c Shift_JIS encoding.
big5.c Big5 encoding.
gb18030.c GB18030 encoding.
koi8.c KOI8 encoding.
koi8_r.c KOI8-R encoding.
cp1251.c CP1251 encoding.
iso8859_1.c ISO-8859-1 encoding. (Latin-1)
iso8859_2.c ISO-8859-2 encoding. (Latin-2)
iso8859_3.c ISO-8859-3 encoding. (Latin-3)
iso8859_4.c ISO-8859-4 encoding. (Latin-4)
iso8859_5.c ISO-8859-5 encoding. (Cyrillic)
iso8859_6.c ISO-8859-6 encoding. (Arabic)
iso8859_7.c ISO-8859-7 encoding. (Greek)
iso8859_8.c ISO-8859-8 encoding. (Hebrew)
iso8859_9.c ISO-8859-9 encoding. (Latin-5 or Turkish)
iso8859_10.c ISO-8859-10 encoding. (Latin-6 or Nordic)
iso8859_11.c ISO-8859-11 encoding. (Thai)
iso8859_13.c ISO-8859-13 encoding. (Latin-7 or Baltic Rim)
iso8859_14.c ISO-8859-14 encoding. (Latin-8 or Celtic)
iso8859_15.c ISO-8859-15 encoding. (Latin-9 or West European with Euro)
iso8859_16.c ISO-8859-16 encoding.
(Latin-10 or South-Eastern European with Euro)
utf8.c UTF-8 encoding.
utf16_be.c UTF-16BE encoding.
utf16_le.c UTF-16LE encoding.
utf32_be.c UTF-32BE encoding.
utf32_le.c UTF-32LE encoding.
unicode.c common codes of Unicode encoding.
win32/Makefile Makefile for Win32 (VC++)
win32/config.h config.h for Win32
and I'm thankful to Akinori MUSHA.
oniguruma-6.7.0/README.md 0000664 0000000 0000000 00000022565 13212423352 0015020 0 ustar 00root root 0000000 0000000 Oniguruma
=========
https://github.com/kkos/oniguruma
FIXED Security Issues:
--------------------------
**CVE-2017-9224, CVE-2017-9225, CVE-2017-9226**
**CVE-2017-9227, CVE-2017-9228, CVE-2017-9229**
Oniguruma is a regular expressions library.
The characteristics of this library is that different character encoding
for every regular expression object can be specified.
Supported character encodings:
ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
EUC-JP, EUC-TW, EUC-KR, EUC-CN,
Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
* GB18030: contributed by KUBO Takehiro
* CP1251: contributed by Byte
New feature of version 6.7.0
--------------------------
* NEW: hexadecimal codepoint \uHHHH
* NEW: add ONIG_SYNTAX_ONIGURUMA (== ONIG_SYNTAX_DEFAULT)
* Disabled \N and \O on ONIG_SYNTAX_RUBY
* Reduced object size
New feature of version 6.6.1
--------------------------
* Fix definition of \X
New feature of version 6.6.0
--------------------------
* NEW: ASCII only mode options for character type/property (?WDSP)
* NEW: Extended Grapheme Cluster boundary \y, \Y (*original)
* NEW: Extended Grapheme Cluster \X
* Range-clear (Absent-clear) operator restores previous range in backtrack.
New feature of version 6.5.0
--------------------------
* NEW: \K (keep)
* NEW: \R (general newline) \N (no newline)
* NEW: \O (true anychar)
* NEW: if-then-else syntax (?(...)...\|...)
* NEW: Backreference validity checker (?(xxx)) (*original)
* NEW: Absent repeater (?~absent)
* NEW: Absent expression (?~|absent|expr) (*original)
* NEW: Absent stopper (?~|absent) (*original)
New feature of version 6.4.0
--------------------------
* Fix fatal problem of endless repeat on Windows
* NEW: call zero (call the total regexp) \g<0>
* NEW: relative backref/call by positive number \k<+n>, \g<+n>
New feature of version 6.3.0
--------------------------
* NEW: octal codepoint \o{.....}
New feature of version 6.1.2
--------------------------
* allow word bound, word begin and word end in look-behind.
* NEW option: ONIG_OPTION_CHECK_VALIDITY_OF_STRING
New feature of version 6.1
--------------------------
* improved doc/RE
* NEW API: onig_scan()
New feature of version 6.0
--------------------------
* Update Unicode 8.0 Property/Case-folding
* NEW API: onig_unicode_define_user_property()
License
-------
BSD license.
Install
-------
### Case 1: Unix and Cygwin platform
1. autoreconf -vfi (* case: configure script is not found.)
2. ./configure
3. make
4. make install
* uninstall
make uninstall
* configuration check
onig-config --cflags
onig-config --libs
onig-config --prefix
onig-config --exec-prefix
### Case 2: Windows 64/32bit platform (Visual Studio)
execute make_win64 or make_win32
onig_s.lib: static link library
onig.dll: dynamic link library
* test (ASCII/Shift_JIS)
1. cd src
2. copy ..\windows\testc.c .
3. nmake -f Makefile.windows ctest
(I have checked by Visual Studio Community 2015)
Regular Expressions
-------------------
See [doc/RE](doc/RE) or [doc/RE.ja](doc/RE.ja) for Japanese.
Usage
-----
Include oniguruma.h in your program. (Oniguruma API)
See doc/API for Oniguruma API.
If you want to disable UChar type (== unsigned char) definition
in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then
include oniguruma.h.
If you want to disable regex_t type definition in oniguruma.h,
define ONIG_ESCAPE_REGEX_T_COLLISION and then include oniguruma.h.
Example of the compiling/linking command line in Unix or Cygwin,
(prefix == /usr/local case)
cc sample.c -L/usr/local/lib -lonig
If you want to use static link library(onig_s.lib) in Win32,
add option -DONIG_EXTERN=extern to C compiler.
Sample Programs
---------------
|File |Description |
|:---------------------|:-----------------------------------------|
|sample/simple.c |example of the minimum (Oniguruma API) |
|sample/names.c |example of the named group callback. |
|sample/encode.c |example of some encodings. |
|sample/listcap.c |example of the capture history. |
|sample/posix.c |POSIX API sample. |
|sample/scan.c |example of using onig_scan(). |
|sample/sql.c |example of the variable meta characters. |
|sample/user_property.c|example of user defined Unicode property. |
Test Programs
|File |Description |
|:------------------|:--------------------------------------|
|sample/syntax.c |Perl, Java and ASIS syntax test. |
|sample/crnl.c |--enable-crnl-as-line-terminator test |
Source Files
------------
|File |Description |
|:------------------|:-------------------------------------------------------|
|oniguruma.h |Oniguruma API header file (public) |
|onig-config.in |configuration check program template |
|regenc.h |character encodings framework header file |
|regint.h |internal definitions |
|regparse.h |internal definitions for regparse.c and regcomp.c |
|regcomp.c |compiling and optimization functions |
|regenc.c |character encodings framework |
|regerror.c |error message function |
|regext.c |extended API functions (deluxe version API) |
|regexec.c |search and match functions |
|regparse.c |parsing functions. |
|regsyntax.c |pattern syntax functions and built-in syntax definitions|
|regtrav.c |capture history tree data traverse functions |
|regversion.c |version info function |
|st.h |hash table functions header file |
|st.c |hash table functions |
|oniggnu.h |GNU regex API header file (public) |
|reggnu.c |GNU regex API functions |
|onigposix.h |POSIX API header file (public) |
|regposerr.c |POSIX error message function |
|regposix.c |POSIX API functions |
|mktable.c |character type table generator |
|ascii.c |ASCII encoding |
|euc_jp.c |EUC-JP encoding |
|euc_tw.c |EUC-TW encoding |
|euc_kr.c |EUC-KR, EUC-CN encoding |
|sjis.c |Shift_JIS encoding |
|big5.c |Big5 encoding |
|gb18030.c |GB18030 encoding |
|koi8.c |KOI8 encoding |
|koi8_r.c |KOI8-R encoding |
|cp1251.c |CP1251 encoding |
|iso8859_1.c |ISO-8859-1 (Latin-1) |
|iso8859_2.c |ISO-8859-2 (Latin-2) |
|iso8859_3.c |ISO-8859-3 (Latin-3) |
|iso8859_4.c |ISO-8859-4 (Latin-4) |
|iso8859_5.c |ISO-8859-5 (Cyrillic) |
|iso8859_6.c |ISO-8859-6 (Arabic) |
|iso8859_7.c |ISO-8859-7 (Greek) |
|iso8859_8.c |ISO-8859-8 (Hebrew) |
|iso8859_9.c |ISO-8859-9 (Latin-5 or Turkish) |
|iso8859_10.c |ISO-8859-10 (Latin-6 or Nordic) |
|iso8859_11.c |ISO-8859-11 (Thai) |
|iso8859_13.c |ISO-8859-13 (Latin-7 or Baltic Rim) |
|iso8859_14.c |ISO-8859-14 (Latin-8 or Celtic) |
|iso8859_15.c |ISO-8859-15 (Latin-9 or West European with Euro) |
|iso8859_16.c |ISO-8859-16 (Latin-10) |
|utf8.c |UTF-8 encoding |
|utf16_be.c |UTF-16BE encoding |
|utf16_le.c |UTF-16LE encoding |
|utf32_be.c |UTF-32BE encoding |
|utf32_le.c |UTF-32LE encoding |
|unicode.c |common codes of Unicode encoding |
|unicode_fold_data.c|Unicode folding data |
|win32/Makefile |Makefile for Win32 (VC++) |
|win32/config.h |config.h for Win32 |
oniguruma-6.7.0/README_japanese 0000664 0000000 0000000 00000013206 13212423352 0016257 0 ustar 00root root 0000000 0000000 README.ja 2017/08/25
オエシヨ ---- (C) K.Kosako
https://github.com/kkos/oniguruma
オエシヨ、マタオオャノスクス・鬣、・ヨ・鬣熙ヌ、「、。」
、ウ、ホ・鬣、・ヨ・鬣熙ホニテトケ、マ。「、ス、、セ、、ホタオオャノスクス・ェ・ヨ・ク・ァ・ッ・ネ、エ、ネ、ヒ
ハクサ・ィ・・ウ。シ・ヌ・」・・ー、サリト熙ヌ、ュ、、ウ、ネ、ヌ、「、。」
・オ・ン。シ・ネ、キ、ニ、、、ハクサ・ィ・・ウ。シ・ヌ・」・・ー:
ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
EUC-JP, EUC-TW, EUC-KR, EUC-CN,
Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
* GB18030: オラハンキヘホサ眛カ。
* CP1251: Byteサ眛カ。
------------------------------------------------------------
・鬣、・サ・・ケ
BSD・鬣、・サ・・ケ
・、・・ケ・ネ。シ・
・ア。シ・ケ」ア: Unix、ネCygwinエトカュ
1. autoreconf -vfi (* configure・ケ・ッ・・ラ・ネ、ャ、ハ、、、ネ、ュ、タ、ア)
2. ./configure
3. make
4. make install
・「・・、・・ケ・ネ。シ・
make uninstall
ケスタョウホヌァ
onig-config --cflags
onig-config --libs
onig-config --prefix
onig-config --exec-prefix
・ア。シ・ケ」イ: Windows 64/32bit (Visual Studio)エトカュ
make_win64 、「、、、、マ make_win32 、シツケヤ
onig_s.lib: static link library
onig.dll: dynamic link library
* ニーコ・ニ・ケ・ネ (ASCII/Shift_JIS)
1. cd src
2. copy ..\windows\testc.c .
3. nmake -f Makefile.windows ctest
(Visual Studio Community 2015 、ヌニーコウホヌァ)
タオオャノスクス
doc/RE.ja、サイセネ
サネヘムハヒ。
サネヘム、ケ、・ラ・・ー・鬣爨ヌ。「oniguruma.h、・、・・ッ・。シ・ノ、ケ、(Oniguruma API、ホセケ)。」
Oniguruma API、ヒ、ト、、、ニ、マ。「doc/API.ja、サイセネ。」
oniguruma.h、ヌトオチ、オ、、ニ、、、キソフセUChar(== unsigned char)、フオク、ヒ、キ、ソ、、セケ
、ヒ、マ。「ONIG_ESCAPE_UCHAR_COLLISION、define、キ、ニ、ォ、駮niguruma.h、・、・・ッ・。シ・ノ
、ケ、、ウ、ネ。」、ウ、ホ、ネ、ュ、ヒ、マUChar、マトオチ、オ、、コ。「OnigUChar、ネ、、、ヲフセチー、ホトオチ、ホ、゚、ャ
ヘュク、ヒ、ハ、。」
oniguruma.h、ヌトオチ、オ、、ニ、、、キソフセregex_t、フオク、ヒ、キ、ソ、、セケ遉ヒ、マ。「
ONIG_ESCAPE_REGEX_T_COLLISION、define、キ、ニ、ォ、駮niguruma.h、・、・・ッ・。シ・ノ
、ケ、、ウ、ネ。」、ウ、ホ、ネ、ュ、ヒ、マregex_t、マトオチ、オ、、コ。「OnigRegexType, OnigRegex、ネ、、、ヲ
フセチー、ホトオチ、ホ、゚、ャヘュク、ヒ、ハ、。」
Unix/Cygwinセ螟ヌ・ウ・・ム・、・。「・・・ッ、ケ、セケ遉ホホ罍ァ
(prefix、ャ/usr/local、ホ、ネ、ュ)
cc sample.c -L/usr/local/lib -lonig
GNU libtool、サネヘム、キ、ニ、、、、ホ、ヌ。「・ラ・鬣テ・ネ・ユ・ゥ。シ・爨ャカヲヘュ・鬣、・ヨ・鬣熙・オ・ン。シ・ネ、キ、ニ
、、、、ミ。「サネヘム、ヌ、ュ、、隍ヲ、ヒ、ハ、テ、ニ、、、。」
タナナェ・鬣、・ヨ・鬣熙ネカヲヘュ・鬣、・ヨ・鬣熙ホ、ノ、チ、鬢サネヘム、ケ、、ォ、サリト熙ケ、ハヒ。。「シツケヤサナタ、ヌ、ホ
エトカュタ゚トハヒ。、ヒ、ト、、、ニ、マ。「シォハャ、ヌトエ、ル、ニイシ、オ、、。」
Win32、ヌ・ケ・ソ・ニ・」・テ・ッ・・・ッ・鬣、・ヨ・鬣(onig_s.lib)、・・・ッ、ケ、セケ遉ヒ、マ。「
・ウ・・ム・、・、ケ、、ネ、ュ、ヒ -DONIG_EXTERN=extern 、・ウ・・ム・、・ーソ、ヒトノイテ、ケ、、ウ、ネ。」
サネヘムホ罕ラ・・ー・鬣
sample/simple.c コヌセョホ (Oniguruma API)
sample/names.c フセチーノユ、ュ・ー・。シ・ラ・ウ。シ・・ミ・テ・ッサネヘムホ
sample/encode.c エ、ト、ォ、ホハクサ・ィ・・ウ。シ・ヌ・」・・ーサネヘムホ
sample/listcap.c ハ盖ヘヘホオ。ヌス、ホサネヘムホ
sample/posix.c POSIX APIサネヘムホ
sample/sql.c イトハム・皈ソハクサオ。ヌスサネヘムホ (SQL-like ・ム・ソ。シ・)
sample/user_property.c ・譯シ・カトオチUnicode・ラ・・ム・ニ・」、ホサネヘムホ
・ニ・ケ・ネ・ラ・・ー・鬣
sample/syntax.c Perl。「Java。「ASISハクヒ。、ホ・ニ・ケ・ネ
sample/crnl.c --enable-crnl-as-line-terminator ・ニ・ケ・ネ
・ス。シ・ケ・ユ・。・、・
oniguruma.h オエシヨAPI・リ・テ・タ (クウォ)
onig-config.in onig-config・ラ・・ー・鬣 ・ニ・・ラ・。シ・ネ
regenc.h ハクサ・ィ・・ウ。シ・ヌ・」・・ーマネチネ、゚・リ・テ・タ
regint.h ニ篷タクタ
regparse.h regparse.c、ネregcomp.c、ホ、ソ、皃ホニ篷タクタ
regcomp.c ・ウ・・ム・、・。「コヌナャイスエリソ
regenc.c ハクサ・ィ・・ウ。シ・ヌ・」・・ーマネチネ、゚
regerror.c ・ィ・鬘シ・皈テ・サ。シ・クエリソ
regext.c ウネト・APIエリソ
regexec.c ク。コ。「セネケ邏リソ
regparse.c タオオャノスクス・ム・ソ。シ・イタマエリソ
regsyntax.c タオオャノスクス・ム・ソ。シ・ハクヒ。エリソ。「チネケ、゚ハクヒ。トオチ
regtrav.c ハ盖ヘヘホフレス茣エリソ
regversion.c ネヌセハエリソ
st.h ・マ・テ・キ・螂ニ。シ・ヨ・エリソタクタ
st.c ・マ・テ・キ・螂ニ。シ・ヨ・エリソ
oniggnu.h GNU regex API・リ・テ・タ (クウォ)
reggnu.c GNU regex APIエリソ
onigposix.h POSIX API・リ・テ・タ (クウォ)
regposerr.c POSIX API・ィ・鬘シ・皈テ・サ。シ・クエリソ
regposix.c POSIX APIエリソ
mktable.c ハクサ・ソ・、・ラ・ニ。シ・ヨ・タクタョ・ラ・・ー・鬣
ascii.c ASCII ・ィ・・ウ。シ・ヌ・」・・ー
euc_jp.c EUC-JP ・ィ・・ウ。シ・ヌ・」・・ー
euc_tw.c EUC-TW ・ィ・・ウ。シ・ヌ・」・・ー
euc_kr.c EUC-KR, EUC-CN ・ィ・・ウ。シ・ヌ・」・・ー
sjis.c Shift_JIS ・ィ・・ウ。シ・ヌ・」・・ー
big5.c Big5 ・ィ・・ウ。シ・ヌ・」・・ー
gb18030.c GB18030 ・ィ・・ウ。シ・ヌ・」・・ー
koi8.c KOI8 ・ィ・・ウ。シ・ヌ・」・・ー
koi8_r.c KOI8-R ・ィ・・ウ。シ・ヌ・」・・ー
cp1251.c CP1251 ・ィ・・ウ。シ・ヌ・」・・ー
iso8859_1.c ISO-8859-1 (Latin-1)
iso8859_2.c ISO-8859-2 (Latin-2)
iso8859_3.c ISO-8859-3 (Latin-3)
iso8859_4.c ISO-8859-4 (Latin-4)
iso8859_5.c ISO-8859-5 (Cyrillic)
iso8859_6.c ISO-8859-6 (Arabic)
iso8859_7.c ISO-8859-7 (Greek)
iso8859_8.c ISO-8859-8 (Hebrew)
iso8859_9.c ISO-8859-9 (Latin-5 、゙、ソ、マ Turkish)
iso8859_10.c ISO-8859-10 (Latin-6 、゙、ソ、マ Nordic)
iso8859_11.c ISO-8859-11 (Thai)
iso8859_13.c ISO-8859-13 (Latin-7 、゙、ソ、マ Baltic Rim)
iso8859_14.c ISO-8859-14 (Latin-8 、゙、ソ、マ Celtic)
iso8859_15.c ISO-8859-15 (Latin-9 、゙、ソ、マ West European with Euro)
iso8859_16.c ISO-8859-16
(Latin-10 、゙、ソ、マ South-Eastern European with Euro)
utf8.c UTF-8 ・ィ・・ウ。シ・ヌ・」・・ー
utf16_be.c UTF-16BE ・ィ・・ウ。シ・ヌ・」・・ー
utf16_le.c UTF-16LE ・ィ・・ウ。シ・ヌ・」・・ー
utf32_be.c UTF-32BE ・ィ・・ウ。シ・ヌ・」・・ー
utf32_le.c UTF-32LE ・ィ・・ウ。シ・ヌ・」・・ー
unicode.c Unicode・ィ・・ウ。シ・ヌ・」・・ー、ホカヲトフス靉
win32/Makefile Win32ヘム Makefile (for VC++)
win32/config.h Win32ヘム config.h
and I'm thankful to Akinori MUSHA.
oniguruma-6.7.0/cmake/ 0000775 0000000 0000000 00000000000 13212423352 0014607 5 ustar 00root root 0000000 0000000 oniguruma-6.7.0/cmake/dist.cmake 0000664 0000000 0000000 00000032074 13212423352 0016562 0 ustar 00root root 0000000 0000000 # LuaDist CMake utility library.
# Provides sane project defaults and macros common to LuaDist CMake builds.
#
# Copyright (C) 2007-2012 LuaDist.
# by David Manura, Peter Drahoナ。
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the COPYRIGHT file distributed with LuaDist.
# Please note that the package source code is licensed under its own license.
## Extract information from dist.info
if ( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/dist.info )
message ( FATAL_ERROR
"Missing dist.info file (${CMAKE_CURRENT_SOURCE_DIR}/dist.info)." )
endif ()
file ( READ ${CMAKE_CURRENT_SOURCE_DIR}/dist.info DIST_INFO )
if ( "${DIST_INFO}" STREQUAL "" )
message ( FATAL_ERROR "Failed to load dist.info." )
endif ()
# Reads field `name` from dist.info string `DIST_INFO` into variable `var`.
macro ( _parse_dist_field name var )
string ( REGEX REPLACE ".*${name}[ \t]?=[ \t]?[\"']([^\"']+)[\"'].*" "\\1"
${var} "${DIST_INFO}" )
if ( ${var} STREQUAL DIST_INFO )
message ( FATAL_ERROR "Failed to extract \"${var}\" from dist.info" )
endif ()
endmacro ()
#
_parse_dist_field ( name DIST_NAME )
_parse_dist_field ( version DIST_VERSION )
_parse_dist_field ( license DIST_LICENSE )
_parse_dist_field ( author DIST_AUTHOR )
_parse_dist_field ( maintainer DIST_MAINTAINER )
_parse_dist_field ( url DIST_URL )
_parse_dist_field ( desc DIST_DESC )
message ( "DIST_NAME: ${DIST_NAME}")
message ( "DIST_VERSION: ${DIST_VERSION}")
message ( "DIST_LICENSE: ${DIST_LICENSE}")
message ( "DIST_AUTHOR: ${DIST_AUTHOR}")
message ( "DIST_MAINTAINER: ${DIST_MAINTAINER}")
message ( "DIST_URL: ${DIST_URL}")
message ( "DIST_DESC: ${DIST_DESC}")
string ( REGEX REPLACE ".*depends[ \t]?=[ \t]?[\"']([^\"']+)[\"'].*" "\\1"
DIST_DEPENDS ${DIST_INFO} )
if ( DIST_DEPENDS STREQUAL DIST_INFO )
set ( DIST_DEPENDS "" )
endif ()
message ( "DIST_DEPENDS: ${DIST_DEPENDS}")
## 2DO: Parse DIST_DEPENDS and try to install Dependencies with automatically using externalproject_add
## INSTALL DEFAULTS (Relative to CMAKE_INSTALL_PREFIX)
# Primary paths
set ( INSTALL_BIN bin CACHE PATH "Where to install binaries to." )
set ( INSTALL_LIB lib CACHE PATH "Where to install libraries to." )
set ( INSTALL_INC include CACHE PATH "Where to install headers to." )
set ( INSTALL_ETC etc CACHE PATH "Where to store configuration files" )
set ( INSTALL_SHARE share CACHE PATH "Directory for shared data." )
# Secondary paths
option ( INSTALL_VERSION
"Install runtime libraries and executables with version information." OFF)
set ( INSTALL_DATA ${INSTALL_SHARE}/${DIST_NAME} CACHE PATH
"Directory the package can store documentation, tests or other data in.")
set ( INSTALL_DOC ${INSTALL_DATA}/doc CACHE PATH
"Recommended directory to install documentation into.")
set ( INSTALL_EXAMPLE ${INSTALL_DATA}/example CACHE PATH
"Recommended directory to install examples into.")
set ( INSTALL_TEST ${INSTALL_DATA}/test CACHE PATH
"Recommended directory to install tests into.")
set ( INSTALL_FOO ${INSTALL_DATA}/etc CACHE PATH
"Where to install additional files")
# Tweaks and other defaults
# Setting CMAKE to use loose block and search for find modules in source directory
set ( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
set ( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH} )
option ( BUILD_SHARED_LIBS "Build shared libraries" ON )
# In MSVC, prevent warnings that can occur when using standard libraries.
if ( MSVC )
add_definitions ( -D_CRT_SECURE_NO_WARNINGS )
endif ()
# RPath and relative linking
option ( USE_RPATH "Use relative linking." ON)
if ( USE_RPATH )
string ( REGEX REPLACE "[^!/]+" ".." UP_DIR ${INSTALL_BIN} )
set ( CMAKE_SKIP_BUILD_RPATH FALSE CACHE STRING "" FORCE )
set ( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE CACHE STRING "" FORCE )
set ( CMAKE_INSTALL_RPATH $ORIGIN/${UP_DIR}/${INSTALL_LIB}
CACHE STRING "" FORCE )
set ( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE STRING "" FORCE )
set ( CMAKE_INSTALL_NAME_DIR @executable_path/${UP_DIR}/${INSTALL_LIB}
CACHE STRING "" FORCE )
endif ()
## MACROS
# Parser macro
macro ( parse_arguments prefix arg_names option_names)
set ( DEFAULT_ARGS )
foreach ( arg_name ${arg_names} )
set ( ${prefix}_${arg_name} )
endforeach ()
foreach ( option ${option_names} )
set ( ${prefix}_${option} FALSE )
endforeach ()
set ( current_arg_name DEFAULT_ARGS )
set ( current_arg_list )
foreach ( arg ${ARGN} )
set ( larg_names ${arg_names} )
list ( FIND larg_names "${arg}" is_arg_name )
if ( is_arg_name GREATER -1 )
set ( ${prefix}_${current_arg_name} ${current_arg_list} )
set ( current_arg_name ${arg} )
set ( current_arg_list )
else ()
set ( loption_names ${option_names} )
list ( FIND loption_names "${arg}" is_option )
if ( is_option GREATER -1 )
set ( ${prefix}_${arg} TRUE )
else ()
set ( current_arg_list ${current_arg_list} ${arg} )
endif ()
endif ()
endforeach ()
set ( ${prefix}_${current_arg_name} ${current_arg_list} )
endmacro ()
# install_executable ( executable_targets )
# Installs any executables generated using "add_executable".
# USE: install_executable ( lua )
# NOTE: subdirectories are NOT supported
set ( CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "${DIST_NAME} Runtime" )
set ( CPACK_COMPONENT_RUNTIME_DESCRIPTION
"Executables and runtime libraries. Installed into ${INSTALL_BIN}." )
macro ( install_executable )
foreach ( _file ${ARGN} )
if ( INSTALL_VERSION )
set_target_properties ( ${_file} PROPERTIES VERSION ${DIST_VERSION}
SOVERSION ${DIST_VERSION} )
endif ()
install ( TARGETS ${_file} RUNTIME DESTINATION ${INSTALL_BIN}
COMPONENT Runtime )
endforeach()
endmacro ()
# install_library ( library_targets )
# Installs any libraries generated using "add_library" into apropriate places.
# USE: install_library ( libexpat )
# NOTE: subdirectories are NOT supported
set ( CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "${DIST_NAME} Development Libraries" )
set ( CPACK_COMPONENT_LIBRARY_DESCRIPTION
"Static and import libraries needed for development. Installed into ${INSTALL_LIB} or ${INSTALL_BIN}." )
macro ( install_library )
foreach ( _file ${ARGN} )
if ( INSTALL_VERSION )
set_target_properties ( ${_file} PROPERTIES VERSION ${DIST_VERSION}
SOVERSION ${DIST_VERSION} )
endif ()
install ( TARGETS ${_file}
RUNTIME DESTINATION ${INSTALL_BIN} COMPONENT Runtime
LIBRARY DESTINATION ${INSTALL_LIB} COMPONENT Runtime
ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT Library )
endforeach()
endmacro ()
# helper function for various install_* functions, for PATTERN/REGEX args.
macro ( _complete_install_args )
if ( NOT("${_ARG_PATTERN}" STREQUAL "") )
set ( _ARG_PATTERN PATTERN ${_ARG_PATTERN} )
endif ()
if ( NOT("${_ARG_REGEX}" STREQUAL "") )
set ( _ARG_REGEX REGEX ${_ARG_REGEX} )
endif ()
endmacro ()
# install_header ( files/directories [INTO destination] )
# Install a directories or files into header destination.
# USE: install_header ( lua.h luaconf.h ) or install_header ( GL )
# USE: install_header ( mylib.h INTO mylib )
# For directories, supports optional PATTERN/REGEX arguments like install().
set ( CPACK_COMPONENT_HEADER_DISPLAY_NAME "${DIST_NAME} Development Headers" )
set ( CPACK_COMPONENT_HEADER_DESCRIPTION
"Headers needed for development. Installed into ${INSTALL_INC}." )
macro ( install_header )
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
_complete_install_args()
foreach ( _file ${_ARG_DEFAULT_ARGS} )
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
install ( DIRECTORY ${_file} DESTINATION ${INSTALL_INC}/${_ARG_INTO}
COMPONENT Header ${_ARG_PATTERN} ${_ARG_REGEX} )
else ()
install ( FILES ${_file} DESTINATION ${INSTALL_INC}/${_ARG_INTO}
COMPONENT Header )
endif ()
endforeach()
endmacro ()
# install_data ( files/directories [INTO destination] )
# This installs additional data files or directories.
# USE: install_data ( extra data.dat )
# USE: install_data ( image1.png image2.png INTO images )
# For directories, supports optional PATTERN/REGEX arguments like install().
set ( CPACK_COMPONENT_DATA_DISPLAY_NAME "${DIST_NAME} Data" )
set ( CPACK_COMPONENT_DATA_DESCRIPTION
"Application data. Installed into ${INSTALL_DATA}." )
macro ( install_data )
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
_complete_install_args()
foreach ( _file ${_ARG_DEFAULT_ARGS} )
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
install ( DIRECTORY ${_file}
DESTINATION ${INSTALL_DATA}/${_ARG_INTO}
COMPONENT Data ${_ARG_PATTERN} ${_ARG_REGEX} )
else ()
install ( FILES ${_file} DESTINATION ${INSTALL_DATA}/${_ARG_INTO}
COMPONENT Data )
endif ()
endforeach()
endmacro ()
# INSTALL_DOC ( files/directories [INTO destination] )
# This installs documentation content
# USE: install_doc ( doc/ doc.pdf )
# USE: install_doc ( index.html INTO html )
# For directories, supports optional PATTERN/REGEX arguments like install().
set ( CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "${DIST_NAME} Documentation" )
set ( CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
"Application documentation. Installed into ${INSTALL_DOC}." )
macro ( install_doc )
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
_complete_install_args()
foreach ( _file ${_ARG_DEFAULT_ARGS} )
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
install ( DIRECTORY ${_file} DESTINATION ${INSTALL_DOC}/${_ARG_INTO}
COMPONENT Documentation ${_ARG_PATTERN} ${_ARG_REGEX} )
else ()
install ( FILES ${_file} DESTINATION ${INSTALL_DOC}/${_ARG_INTO}
COMPONENT Documentation )
endif ()
endforeach()
endmacro ()
# install_example ( files/directories [INTO destination] )
# This installs additional examples
# USE: install_example ( examples/ exampleA )
# USE: install_example ( super_example super_data INTO super)
# For directories, supports optional PATTERN/REGEX argument like install().
set ( CPACK_COMPONENT_EXAMPLE_DISPLAY_NAME "${DIST_NAME} Examples" )
set ( CPACK_COMPONENT_EXAMPLE_DESCRIPTION
"Examples and their associated data. Installed into ${INSTALL_EXAMPLE}." )
macro ( install_example )
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
_complete_install_args()
foreach ( _file ${_ARG_DEFAULT_ARGS} )
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
install ( DIRECTORY ${_file} DESTINATION ${INSTALL_EXAMPLE}/${_ARG_INTO}
COMPONENT Example ${_ARG_PATTERN} ${_ARG_REGEX} )
else ()
install ( FILES ${_file} DESTINATION ${INSTALL_EXAMPLE}/${_ARG_INTO}
COMPONENT Example )
endif ()
endforeach()
endmacro ()
# install_test ( files/directories [INTO destination] )
# This installs tests and test files, DOES NOT EXECUTE TESTS
# USE: install_test ( my_test data.sql )
# USE: install_test ( feature_x_test INTO x )
# For directories, supports optional PATTERN/REGEX argument like install().
set ( CPACK_COMPONENT_TEST_DISPLAY_NAME "${DIST_NAME} Tests" )
set ( CPACK_COMPONENT_TEST_DESCRIPTION
"Tests and associated data. Installed into ${INSTALL_TEST}." )
macro ( install_test )
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
_complete_install_args()
foreach ( _file ${_ARG_DEFAULT_ARGS} )
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
install ( DIRECTORY ${_file} DESTINATION ${INSTALL_TEST}/${_ARG_INTO}
COMPONENT Test ${_ARG_PATTERN} ${_ARG_REGEX} )
else ()
install ( FILES ${_file} DESTINATION ${INSTALL_TEST}/${_ARG_INTO}
COMPONENT Test )
endif ()
endforeach()
endmacro ()
# install_foo ( files/directories [INTO destination] )
# This installs optional or otherwise unneeded content
# USE: install_foo ( etc/ example.doc )
# USE: install_foo ( icon.png logo.png INTO icons)
# For directories, supports optional PATTERN/REGEX argument like install().
set ( CPACK_COMPONENT_OTHER_DISPLAY_NAME "${DIST_NAME} Unspecified Content" )
set ( CPACK_COMPONENT_OTHER_DESCRIPTION
"Other unspecified content. Installed into ${INSTALL_FOO}." )
macro ( install_foo )
parse_arguments ( _ARG "INTO;PATTERN;REGEX" "" ${ARGN} )
_complete_install_args()
foreach ( _file ${_ARG_DEFAULT_ARGS} )
if ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_file}" )
install ( DIRECTORY ${_file} DESTINATION ${INSTALL_FOO}/${_ARG_INTO}
COMPONENT Other ${_ARG_PATTERN} ${_ARG_REGEX} )
else ()
install ( FILES ${_file} DESTINATION ${INSTALL_FOO}/${_ARG_INTO}
COMPONENT Other )
endif ()
endforeach()
endmacro ()
## CTest defaults
## CPack defaults
set ( CPACK_GENERATOR "ZIP" )
set ( CPACK_STRIP_FILES TRUE )
set ( CPACK_PACKAGE_NAME "${DIST_NAME}" )
set ( CPACK_PACKAGE_VERSION "${DIST_VERSION}")
set ( CPACK_PACKAGE_VENDOR "LuaDist" )
set ( CPACK_COMPONENTS_ALL Runtime Library Header Data Documentation Example Other )
include ( CPack )
oniguruma-6.7.0/compile 0000775 0000000 0000000 00000016245 13212423352 0015115 0 ustar 00root root 0000000 0000000 #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey .
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to or send patches to
# .
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to .
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
oniguruma-6.7.0/config.guess 0000775 0000000 0000000 00000124753 13212423352 0016063 0 ustar 00root root 0000000 0000000 #! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2015 Free Software Foundation, Inc.
timestamp='2015-08-20'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
#
# Please send patches to .
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help" >&2
exit 1 ;;
* )
break ;;
esac
done
if test $# != 0; then
echo "$me: too many arguments$help" >&2
exit 1
fi
trap 'exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
# Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_SYSTEM}" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
eval $set_cc_for_build
cat <<-EOF > $dummy.c
#include
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
;;
esac
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || \
echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
earmv*)
arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
machine=${arch}${endian}-unknown
;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
case "${UNAME_MACHINE_ARCH}" in
arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
os=netbsd
else
os=netbsdelf
fi
;;
*)
os=netbsd
;;
esac
# Determine ABI tags.
case "${UNAME_MACHINE_ARCH}" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
;;
esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "${UNAME_VERSION}" in
Debian*)
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:Sortix:*:*)
echo ${UNAME_MACHINE}-unknown-sortix
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
exit ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit ;;
*:z/VM:*:*)
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit ;;
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
;;
sun4)
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c &&
dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
SYSTEM_NAME=`$dummy $dummyarg` &&
{ echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos${UNAME_RELEASE}
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
[ ${TARGET_BINARY_INTERFACE}x = x ]
then
echo m88k-dg-dgux${UNAME_RELEASE}
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
then
echo "$SYSTEM_NAME"
else
echo rs6000-ibm-aix3.2.5
fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/lslpp ] ; then
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include
#include
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
eval $set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
# generating 64-bit code. GNU and HP use different nomenclature:
#
# $ CC_FOR_BUILD=cc ./config.guess
# => hppa2.0w-hp-hpux11.23
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
HP_ARCH="hppa64"
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
exit ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW64*:*)
echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i586-pc-interix
exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
e2k:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
*) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-${LIBC}
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
paragon:*:*:*)
echo i860-intel-osf1
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit ;;
M68*:*:R3V[5678]*:*)
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo ${UNAME_MACHINE}-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes .
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
echo ${UNAME_MACHINE}-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
x86_64:Haiku:*:*)
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
eval $set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
# that puts up a graphical alert prompting to install
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
if test "$cputype" = "386"; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
esac ;;
*:XENIX:*:SysV)
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac
cat >&2 < in order to provide the needed
information to handle your system.
config.guess timestamp = $timestamp
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
hostinfo = `(hostinfo) 2>/dev/null`
/bin/universe = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
UNAME_MACHINE = ${UNAME_MACHINE}
UNAME_RELEASE = ${UNAME_RELEASE}
UNAME_SYSTEM = ${UNAME_SYSTEM}
UNAME_VERSION = ${UNAME_VERSION}
EOF
exit 1
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
oniguruma-6.7.0/config.sub 0000775 0000000 0000000 00000106460 13212423352 0015521 0 ustar 00root root 0000000 0000000 #! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2015 Free Software Foundation, Inc.
timestamp='2015-08-20'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to .
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Canonicalize a configuration name.
Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
# First pass through any local machine types.
echo $1
exit ;;
* )
break ;;
esac
done
case $# in
0) echo "$me: missing argument$help" >&2
exit 1;;
1) ;;
*) echo "$me: too many arguments$help" >&2
exit 1;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
-scout)
;;
-wrs)
os=-vxworks
basic_machine=$1
;;
-chorusos*)
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
-mint | -mint[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| e2k | epiphany \
| fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
leon|leon[3-9])
basic_machine=sparc-$basic_machine
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
basic_machine=i386-unknown
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
a29khif)
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-unknown
;;
amigaos | amigados)
basic_machine=m68k-unknown
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-unknown
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
asmjs)
basic_machine=asmjs-unknown
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | j90)
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
go32)
basic_machine=i386-pc
os=-go32
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
hppro)
basic_machine=hppa1.1-hp
os=-proelf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
leon-*|leon[3-9]-*)
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
microblaze*)
basic_machine=microblaze-xilinx
;;
mingw64)
basic_machine=x86_64-pc
os=-mingw64
;;
mingw32)
basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
moxiebox)
basic_machine=moxie-unknown
os=-moxiebox
;;
msdos)
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
basic_machine=i386-unknown
os=-netbsd
;;
netwinder)
basic_machine=armv4l-rebel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
necv70)
basic_machine=v70-nec
os=-sysv
;;
next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
mon960)
basic_machine=i960-intel
os=-mon960
;;
nonstopux)
basic_machine=mips-compaq
os=-nonstopux
;;
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
openrisc | openrisc-*)
basic_machine=or32-unknown
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
os68k)
basic_machine=m68k-none
os=-os68k
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
pw32)
basic_machine=i586-unknown
os=-pw32
;;
rdos | rdos64)
basic_machine=x86_64-pc
os=-rdos
;;
rdos32)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
st2000)
basic_machine=m68k-tandem
;;
stratus)
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
basic_machine=sv1-cray
os=-unicos
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos
;;
tile*)
basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=-none
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
w65*)
basic_machine=w65-wdc
os=-none
;;
w89k-*)
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
w89k)
basic_machine=hppa1.1-winbond
;;
op50n)
basic_machine=hppa1.1-oki
;;
op60c)
basic_machine=hppa1.1-oki
;;
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp10)
# there are many clones, so DEC is not a safe bet
basic_machine=pdp10-unknown
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i*86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-nova*)
os=-rtmk-nova
;;
-ns2 )
os=-nextstep2
;;
-nsk*)
os=-nsk
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-ose*)
os=-ose
;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-aros*)
os=-aros
;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
arm*-rebel)
os=-linux
;;
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
;;
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
mips*-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
*-winbond)
os=-proelf
;;
*-oki)
os=-proelf
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigaos
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next )
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-next)
os=-nextstep3
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f30[01]-fujitsu | f700-fujitsu)
os=-uxpv
;;
*-rom68k)
os=-coff
;;
*-*bug)
os=-coff
;;
*-apple)
os=-macos
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-cnk*|-aix*)
vendor=ibm
;;
-beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
-hms*)
vendor=hitachi
;;
-mpw* | -macos*)
vendor=apple
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
-vos*)
vendor=stratus
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os
exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
oniguruma-6.7.0/configure.ac 0000664 0000000 0000000 00000004435 13212423352 0016023 0 ustar 00root root 0000000 0000000 dnl Process this file with autoconf to produce a configure script.
AC_INIT(onig, 6.7.0)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wno-portability 1.14])
AC_CONFIG_HEADER(src/config.h)
dnl default value for STATISTICS
STATISTICS=""
AC_ARG_WITH(statistics,
[ --with-statistics take matching time statistical data],
[ STATISTICS=-DONIG_DEBUG_STATISTICS ])
AC_SUBST(STATISTICS)
dnl check for COMBINATION_EXPLOSION
AC_ARG_ENABLE(combination-explosion-check,
[ --enable-combination-explosion-check deprecated],
[comb_expl_check=$enableval])
if test "${comb_expl_check}" = yes; then
AC_DEFINE(USE_COMBINATION_EXPLOSION_CHECK,1,[Define if combination explosion check])
fi
dnl check for CRNL_AS_LINE_TERMINATOR
AC_ARG_ENABLE(crnl-as-line-terminator,
[ --enable-crnl-as-line-terminator deprecated],
[crnl_as_line_terminator=$enableval])
if test "${crnl_as_line_terminator}" = yes; then
AC_DEFINE(USE_CRNL_AS_LINE_TERMINATOR,1,[Define if enable CR+NL as line terminator])
fi
dnl Checks for programs.
AC_PROG_CC
AM_PROG_LIBTOOL
LTVERSION="4:0:0"
AC_SUBST(LTVERSION)
AC_PROG_INSTALL
AC_PROG_MAKE_SET
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(stdlib.h string.h strings.h sys/time.h unistd.h sys/times.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(long, 4)
AC_C_CONST
AC_HEADER_TIME
dnl Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_MEMCMP
AC_CACHE_CHECK(for prototypes, _cv_have_prototypes,
[AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
_cv_have_prototypes=yes,
_cv_have_prototypes=no)])
if test "$_cv_have_prototypes" = yes; then
AC_DEFINE(HAVE_PROTOTYPES,1,[Define if compilerr supports prototypes])
fi
AC_CACHE_CHECK(for variable length prototypes and stdarg.h, _cv_stdarg,
[AC_TRY_COMPILE([
#include
int foo(int x, ...) {
va_list va;
va_start(va, x);
va_arg(va, int);
va_arg(va, char *);
va_arg(va, double);
return 0;
}
], [return foo(10, "", 3.14);],
_cv_stdarg=yes,
_cv_stdarg=no)])
if test "$_cv_stdarg" = yes; then
AC_DEFINE(HAVE_STDARG_PROTOTYPES,1,[Define if compiler supports stdarg prototypes])
fi
AC_OUTPUT([Makefile src/Makefile test/Makefile sample/Makefile onig-config], [chmod +x onig-config])
oniguruma-6.7.0/contributed/ 0000775 0000000 0000000 00000000000 13212423352 0016051 5 ustar 00root root 0000000 0000000 oniguruma-6.7.0/contributed/libfuzzer-onig.cpp 0000664 0000000 0000000 00000001713 13212423352 0021525 0 ustar 00root root 0000000 0000000 /* libfuzzer test code for oniguruma
* author: Hanno Bテカck, license: CC0/public domain
Usage:
* compile oniguruma with something like
./configure CC=clang LD=clang CFLAGS="-fsanitize-coverage=edge -fsanitize=address" \
LDFLAGS="-fsanitize-coverage=edge -fsanitize=address"
* Compile libfuzzer stub and link against static libonig.a and libFuzzer.a:
clang++ libfuzzer-onig.cpp src/.libs/libonig.a libFuzzer.a -o libfuzzer-onig \
-fsanitize-coverage=edge -fsanitize=address
* Put sample patterns in directory "in/"
* Run
./libfuzzer-onig in
Consult libfuzzer docs for further details and how to create libFuzzer.a:
http://llvm.org/docs/LibFuzzer.html
*/
#include
#include
#include
extern "C" int LLVMFuzzerTestOneInput(const uint8_t * Data, size_t Size)
{
regex_t *reg;
if (onig_new
(®, Data, Data + Size, ONIG_OPTION_DEFAULT, ONIG_ENCODING_UTF8,
ONIG_SYNTAX_DEFAULT, 0) == 0)
onig_free(reg);
return 0;
}
oniguruma-6.7.0/depcomp 0000775 0000000 0000000 00000056016 13212423352 0015114 0 ustar 00root root 0000000 0000000 #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2013-05-30.07; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva .
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by 'PROGRAMS ARGS'.
object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to .
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
# Get the directory component of the given path, and save it in the
# global variables '$dir'. Note that this directory component will
# be either empty or ending with a '/' character. This is deliberate.
set_dir_from ()
{
case $1 in
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
*) dir=;;
esac
}
# Get the suffix-stripped basename of the given path, and save it the
# global variable '$base'.
set_base_from ()
{
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
}
# If no dependency file was actually created by the compiler invocation,
# we still have to create a dummy depfile, to avoid errors with the
# Makefile "include basename.Plo" scheme.
make_dummy_depfile ()
{
echo "#dummy" > "$depfile"
}
# Factor out some common post-processing of the generated depfile.
# Requires the auxiliary global variable '$tmpdepfile' to be set.
aix_post_process_depfile ()
{
# If the compiler actually managed to produce a dependency file,
# post-process it.
if test -f "$tmpdepfile"; then
# Each line is of the form 'foo.o: dependency.h'.
# Do two passes, one to just change these to
# $object: dependency.h
# and one to simply output
# dependency.h:
# which is needed to avoid the deleted-header problem.
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
} > "$depfile"
rm -f "$tmpdepfile"
else
make_dummy_depfile
fi
}
# A tabulation character.
tab=' '
# A newline character.
nl='
'
# Character ranges might be problematic outside the C locale.
# These definitions help.
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
lower=abcdefghijklmnopqrstuvwxyz
digits=0123456789
alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Avoid interferences from the environment.
gccflag= dashmflag=
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
if test "$depmode" = xlc; then
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say). Also, it might not be
## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The second -e expression handles DOS-style file names with drive
# letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
| tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
aix_post_process_depfile
;;
tcc)
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
# FIXME: That version still under development at the moment of writing.
# Make that this statement remains true also for stable, released
# versions.
# It will wrap lines (doesn't matter whether long or short) with a
# trailing '\', as in:
#
# foo.o : \
# foo.c \
# foo.h \
#
# It will put a trailing '\' even on the last line, and will use leading
# spaces rather than leading tabs (at least since its commit 0394caf7
# "Emit spaces for -MD").
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
# We have to change lines of the first kind to '$object: \'.
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
# And for each line of the second kind, we have to emit a 'dep.h:'
# dummy dependency, to avoid the deleted-header problem.
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
## The order of this option in the case statement is important, since the
## shell code in configure will try each of these formats in the order
## listed in this file. A plain '-MD' option would be understood by many
## compilers, so we must ensure this comes after the gcc and icc options.
pgcc)
# Portland's C compiler understands '-MD'.
# Will always output deps to 'file.d' where file is the root name of the
# source file under compilation, even if file resides in a subdirectory.
# The object file name does not affect the name of the '.d' file.
# pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
set_dir_from "$object"
# Use the source, not the object, to determine the base name, since
# that's sadly what pgcc will do too.
set_base_from "$source"
tmpdepfile=$base.d
# For projects that build the same source file twice into different object
# files, the pgcc approach of using the *source* file root name can cause
# problems in parallel builds. Use a locking strategy to avoid stomping on
# the same $tmpdepfile.
lockdir=$base.d-lock
trap "
echo '$0: caught signal, cleaning up...' >&2
rmdir '$lockdir'
exit 1
" 1 2 13 15
numtries=100
i=$numtries
while test $i -gt 0; do
# mkdir is a portable test-and-set.
if mkdir "$lockdir" 2>/dev/null; then
# This process acquired the lock.
"$@" -MD
stat=$?
# Release the lock.
rmdir "$lockdir"
break
else
# If the lock is being held by a different process, wait
# until the winning process is done or we timeout.
while test -d "$lockdir" && test $i -gt 0; do
sleep 1
i=`expr $i - 1`
done
fi
i=`expr $i - 1`
done
trap - 1 2 13 15
if test $i -le 0; then
echo "$0: failed to acquire lock after $numtries attempts" >&2
echo "$0: check lockdir '$lockdir'" >&2
exit 1
fi
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in 'foo.d' instead, so we check for that too.
# Subdirectories are respected.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
# Libtool generates 2 separate objects for the 2 libraries. These
# two compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir$base.o.d # libtool 1.5
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
# Same post-processing that is required for AIX mode.
aix_post_process_depfile
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/'"$tab"'/
G
p
}' >> "$depfile"
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this sed invocation
# correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process the last invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed '1,2d' "$tmpdepfile" \
| tr ' ' "$nl" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E \
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
| sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
oniguruma-6.7.0/dist.info 0000664 0000000 0000000 00000000346 13212423352 0015352 0 ustar 00root root 0000000 0000000 --- This file is part of LuaDist project
name = "onig"
version = "6.7.0"
desc = "Oniguruma is a regular expressions library."
author = "K.Kosako"
license = "BSD"
url = "https://github.com/kkos/oniguruma"
maintainer = "K.Kosako"
oniguruma-6.7.0/doc/ 0000775 0000000 0000000 00000000000 13212423352 0014274 5 ustar 00root root 0000000 0000000 oniguruma-6.7.0/doc/API 0000664 0000000 0000000 00000046542 13212423352 0014643 0 ustar 00root root 0000000 0000000 Oniguruma API Version 6.7.0 2017/12/08
#include
# int onig_initialize(OnigEncoding use_encodings[], int num_encodings)
Initialize library.
You have to call it explicitly.
* onig_init() is deprecated.
arguments
1 use_encodings: array of encodings used in application.
2 num_encodings: number of encodings.
# int onig_error_code_to_str(UChar* err_buf, int err_code, ...)
Get error message string.
If this function is used for onig_new(),
don't call this after the pattern argument of onig_new() is freed.
normal return: error message string length
arguments
1 err_buf: error message string buffer.
(required size: ONIG_MAX_ERROR_MESSAGE_LEN)
2 err_code: error code returned by other API functions.
3 err_info (optional): error info returned by onig_new().
# void onig_set_warn_func(OnigWarnFunc func)
Set warning function.
WARNING:
'[', '-', ']' in character class without escape.
']' in pattern without escape.
arguments
1 func: function pointer. void (*func)(char* warning_message)
# void onig_set_verb_warn_func(OnigWarnFunc func)
Set verbose warning function.
WARNING:
redundant nested repeat operator.
arguments
1 func: function pointer. void (*func)(char* warning_message)
# int onig_new(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax,
OnigErrorInfo* err_info)
Create a regex object.
normal return: ONIG_NORMAL
arguments
1 reg: return regex object's address.
2 pattern: regex pattern string.
3 pattern_end: terminate address of pattern. (pattern + pattern length)
4 option: compile time options.
ONIG_OPTION_NONE no option
ONIG_OPTION_SINGLELINE '^' -> '\A', '$' -> '\Z'
ONIG_OPTION_MULTILINE '.' match with newline
ONIG_OPTION_IGNORECASE ambiguity match on
ONIG_OPTION_EXTEND extended pattern form
ONIG_OPTION_FIND_LONGEST find longest match
ONIG_OPTION_FIND_NOT_EMPTY ignore empty match
ONIG_OPTION_NEGATE_SINGLELINE
clear ONIG_OPTION_SINGLELINE which is enabled on
ONIG_SYNTAX_POSIX_BASIC, ONIG_SYNTAX_POSIX_EXTENDED,
ONIG_SYNTAX_PERL, ONIG_SYNTAX_PERL_NG, ONIG_SYNTAX_JAVA
ONIG_OPTION_DONT_CAPTURE_GROUP only named group captured.
ONIG_OPTION_CAPTURE_GROUP named and no-named group captured.
ONIG_OPTION_WORD_IS_ASCII ASCII only word (\w, \p{Word}, [[:word:]])
ASCII only word bound (\b)
ONIG_OPTION_DIGIT_IS_ASCII ASCII only digit (\d, \p{Digit}, [[:digit:]])
ONIG_OPTION_SPACE_IS_ASCII ASCII only space (\s, \p{Space}, [[:space:]])
ONIG_OPTION_POSIX_IS_ASCII ASCII only POSIX properties
(includes word, digit, space)
(alnum, alpha, blank, cntrl, digit, graph,
lower, print, punct, space, upper, xdigit,
word)
5 enc: character encoding.
ONIG_ENCODING_ASCII ASCII
ONIG_ENCODING_ISO_8859_1 ISO 8859-1
ONIG_ENCODING_ISO_8859_2 ISO 8859-2
ONIG_ENCODING_ISO_8859_3 ISO 8859-3
ONIG_ENCODING_ISO_8859_4 ISO 8859-4
ONIG_ENCODING_ISO_8859_5 ISO 8859-5
ONIG_ENCODING_ISO_8859_6 ISO 8859-6
ONIG_ENCODING_ISO_8859_7 ISO 8859-7
ONIG_ENCODING_ISO_8859_8 ISO 8859-8
ONIG_ENCODING_ISO_8859_9 ISO 8859-9
ONIG_ENCODING_ISO_8859_10 ISO 8859-10
ONIG_ENCODING_ISO_8859_11 ISO 8859-11
ONIG_ENCODING_ISO_8859_13 ISO 8859-13
ONIG_ENCODING_ISO_8859_14 ISO 8859-14
ONIG_ENCODING_ISO_8859_15 ISO 8859-15
ONIG_ENCODING_ISO_8859_16 ISO 8859-16
ONIG_ENCODING_UTF8 UTF-8
ONIG_ENCODING_UTF16_BE UTF-16BE
ONIG_ENCODING_UTF16_LE UTF-16LE
ONIG_ENCODING_UTF32_BE UTF-32BE
ONIG_ENCODING_UTF32_LE UTF-32LE
ONIG_ENCODING_EUC_JP EUC-JP
ONIG_ENCODING_EUC_TW EUC-TW
ONIG_ENCODING_EUC_KR EUC-KR
ONIG_ENCODING_EUC_CN EUC-CN
ONIG_ENCODING_SJIS Shift_JIS
ONIG_ENCODING_KOI8_R KOI8-R
ONIG_ENCODING_CP1251 CP1251
ONIG_ENCODING_BIG5 Big5
ONIG_ENCODING_GB18030 GB18030
or any OnigEncodingType data address defined by user.
6 syntax: address of pattern syntax definition.
ONIG_SYNTAX_ASIS plain text
ONIG_SYNTAX_POSIX_BASIC POSIX Basic RE
ONIG_SYNTAX_POSIX_EXTENDED POSIX Extended RE
ONIG_SYNTAX_EMACS Emacs
ONIG_SYNTAX_GREP grep
ONIG_SYNTAX_GNU_REGEX GNU regex
ONIG_SYNTAX_JAVA Java (Sun java.util.regex)
ONIG_SYNTAX_PERL Perl
ONIG_SYNTAX_PERL_NG Perl + named group
ONIG_SYNTAX_RUBY Ruby
ONIG_SYNTAX_ONIGURUMA Oniguruma
ONIG_SYNTAX_DEFAULT default (== ONIG_SYNTAX_ONIGURUMA)
onig_set_default_syntax()
or any OnigSyntaxType data address defined by user.
7 err_info: address for return optional error info.
Use this value as 3rd argument of onig_error_code_to_str().
# int onig_new_without_alloc(regex_t* reg, const UChar* pattern,
const UChar* pattern_end,
OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax,
OnigErrorInfo* err_info)
Create a regex object.
reg object area is not allocated in this function.
normal return: ONIG_NORMAL
# int onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
OnigCompileInfo* ci, OnigErrorInfo* einfo)
Create a regex object.
This function is deluxe version of onig_new().
normal return: ONIG_NORMAL
arguments
1 reg: return address of regex object.
2 pattern: regex pattern string.
3 pattern_end: terminate address of pattern. (pattern + pattern length)
4 ci: compile time info.
ci->num_of_elements: number of elements in ci. (current version: 5)
ci->pattern_enc: pattern string character encoding.
ci->target_enc: target string character encoding.
ci->syntax: address of pattern syntax definition.
ci->option: compile time option.
ci->case_fold_flag: character matching case fold bit flag for
ONIG_OPTION_IGNORECASE mode.
ONIGENC_CASE_FOLD_MIN: minimum
ONIGENC_CASE_FOLD_DEFAULT: minimum
onig_set_default_case_fold_flag()
5 err_info: address for return optional error info.
Use this value as 3rd argument of onig_error_code_to_str().
Different character encoding combination is allowed for
the following cases only.
pattern_enc: ASCII, ISO_8859_1
target_enc: UTF16_BE, UTF16_LE, UTF32_BE, UTF32_LE
pattern_enc: UTF16_BE/LE
target_enc: UTF16_LE/BE
pattern_enc: UTF32_BE/LE
target_enc: UTF32_LE/BE
# void onig_free(regex_t* reg)
Free memory used by regex object.
arguments
1 reg: regex object.
# void onig_free_body(regex_t* reg)
Free memory used by regex object. (Except reg oneself.)
arguments
1 reg: regex object.
# int onig_search(regex_t* reg, const UChar* str, const UChar* end, const UChar* start,
const UChar* range, OnigRegion* region, OnigOptionType option)
Search string and return search result and matching region.
normal return: match position offset (i.e. p - str >= 0)
not found: ONIG_MISMATCH (< 0)
arguments
1 reg: regex object
2 str: target string
3 end: terminate address of target string
4 start: search start address of target string
5 range: search terminate address of target string
in forward search (start <= searched string < range)
in backward search (range <= searched string <= start)
6 region: address for return group match range info (NULL is allowed)
7 option: search time option
ONIG_OPTION_NOTBOL string head(str) isn't considered as begin of line
ONIG_OPTION_NOTEOL string end (end) isn't considered as end of line
ONIG_OPTION_POSIX_REGION region argument is regmatch_t[] of POSIX API.
# int onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at,
OnigRegion* region, OnigOptionType option)
Match string and return result and matching region.
normal return: match length (>= 0)
not match: ONIG_MISMATCH ( < 0)
arguments
1 reg: regex object
2 str: target string
3 end: terminate address of target string
4 at: match address of target string
5 region: address for return group match range info (NULL is allowed)
6 option: search time option
ONIG_OPTION_NOTBOL string head(str) isn't considered as begin of line
ONIG_OPTION_NOTEOL string end (end) isn't considered as end of line
ONIG_OPTION_POSIX_REGION region argument is regmatch_t[] type of POSIX API.
# int onig_scan(regex_t* reg, const UChar* str, const UChar* end,
OnigRegion* region, OnigOptionType option,
int (*scan_callback)(int, int, OnigRegion*, void*),
void* callback_arg)
Scan string and callback with matching region.
normal return: number of matching times
error: error code
interruption: return value of callback function (!= 0)
arguments
1 reg: regex object
2 str: target string
3 end: terminate address of target string
4 region: address for return group match range info (NULL is allowed)
5 option: search time option
6 scan_callback: callback function (defined by user)
7 callback_arg: optional argument passed to callback
# OnigRegion* onig_region_new(void)
Create a region.
# void onig_region_free(OnigRegion* region, int free_self)
Free memory used by region.
arguments
1 region: target region
2 free_self: [1: free all, 0: free memory used in region but not self]
# void onig_region_copy(OnigRegion* to, OnigRegion* from)
Copy contents of region.
arguments
1 to: target region
2 from: source region
# void onig_region_clear(OnigRegion* region)
Clear contents of region.
arguments
1 region: target region
# int onig_region_resize(OnigRegion* region, int n)
Resize group range area of region.
normal return: ONIG_NORMAL
arguments
1 region: target region
2 n: new size
# int onig_name_to_group_numbers(regex_t* reg, const UChar* name, const UChar* name_end,
int** num_list)
Return the group number list of the name.
Named subexp is defined by (?....).
normal return: number of groups for the name.
(ex. /(?..)(?..)/ ==> 2)
name not found: -1
arguments
1 reg: regex object.
2 name: group name.
3 name_end: terminate address of group name.
4 num_list: return list of group number.
# int onig_name_to_backref_number(regex_t* reg, const UChar* name, const UChar* name_end,
OnigRegion *region)
Return the group number corresponding to the named backref (\k).
If two or more regions for the groups of the name are effective,
the greatest number in it is obtained.
normal return: group number.
arguments
1 reg: regex object.
2 name: group name.
3 name_end: terminate address of group name.
4 region: search/match result region.
# int onig_foreach_name(regex_t* reg,
int (*func)(const UChar*, const UChar*, int,int*,regex_t*,void*),
void* arg)
Iterate function call for all names.
normal return: 0
error: func's return value.
arguments
1 reg: regex object.
2 func: callback function.
func(name, name_end, , ,
reg, arg);
if func does not return 0, then iteration is stopped.
3 arg: argument for func.
# int onig_number_of_names(regex_t* reg)
Return the number of names defined in the pattern.
Multiple definitions of one name is counted as one.
arguments
1 reg: regex object.
# OnigEncoding onig_get_encoding(regex_t* reg)
# OnigOptionType onig_get_options(regex_t* reg)
# OnigCaseFoldType onig_get_case_fold_flag(regex_t* reg)
# OnigSyntaxType* onig_get_syntax(regex_t* reg)
Return a value of the regex object.
arguments
1 reg: regex object.
# int onig_number_of_captures(regex_t* reg)
Return the number of capture group in the pattern.
arguments
1 reg: regex object.
# int onig_number_of_capture_histories(regex_t* reg)
Return the number of capture history defined in the pattern.
You can't use capture history if ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY
is disabled in the pattern syntax.(disabled in the default syntax)
arguments
1 reg: regex object.
# OnigCaptureTreeNode* onig_get_capture_tree(OnigRegion* region)
Return the root node of capture history data tree.
This value is undefined if matching has faild.
arguments
1 region: matching result.
# int onig_capture_tree_traverse(OnigRegion* region, int at,
int(*func)(int,int,int,int,int,void*), void* arg)
Traverse and callback in capture history data tree.
normal return: 0
error: callback func's return value.
arguments
1 region: match region data.
2 at: callback position.
ONIG_TRAVERSE_CALLBACK_AT_FIRST: callback first, then traverse children.
ONIG_TRAVERSE_CALLBACK_AT_LAST: traverse children first, then callback.
ONIG_TRAVERSE_CALLBACK_AT_BOTH: callback first, then traverse children,
and at last callback again.
3 func: callback function.
if func does not return 0, then traverse is stopped.
int func(int group, int beg, int end, int level, int at,
void* arg)
group: group number
beg: capture start position
end: capture end position
level: nest level (from 0)
at: callback position
ONIG_TRAVERSE_CALLBACK_AT_FIRST
ONIG_TRAVERSE_CALLBACK_AT_LAST
arg: optional callback argument
4 arg; optional callback argument.
# int onig_noname_group_capture_is_active(regex_t* reg)
Return noname group capture activity.
active: 1
inactive: 0
arguments
1 reg: regex object.
if option ONIG_OPTION_DONT_CAPTURE_GROUP == ON
--> inactive
if the regex pattern have named group
and syntax ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP == ON
and option ONIG_OPTION_CAPTURE_GROUP == OFF
--> inactive
else --> active
# UChar* onigenc_get_prev_char_head(OnigEncoding enc, const UChar* start, const UChar* s)
Return previous character head address.
arguments
1 enc: character encoding
2 start: string address
3 s: target address of string
# UChar* onigenc_get_left_adjust_char_head(OnigEncoding enc,
const UChar* start, const UChar* s)
Return left-adjusted head address of a character.
arguments
1 enc: character encoding
2 start: string address
3 s: target address of string
# UChar* onigenc_get_right_adjust_char_head(OnigEncoding enc,
const UChar* start, const UChar* s)
Return right-adjusted head address of a character.
arguments
1 enc: character encoding
2 start: string address
3 s: target address of string
# int onigenc_strlen(OnigEncoding enc, const UChar* s, const UChar* end)
# int onigenc_strlen_null(OnigEncoding enc, const UChar* s)
Return number of characters in the string.
# int onigenc_str_bytelen_null(OnigEncoding enc, const UChar* s)
Return number of bytes in the string.
# int onig_set_default_syntax(OnigSyntaxType* syntax)
Set default syntax.
arguments
1 syntax: address of pattern syntax definition.
# void onig_copy_syntax(OnigSyntaxType* to, OnigSyntaxType* from)
Copy syntax.
arguments
1 to: destination address.
2 from: source address.
# unsigned int onig_get_syntax_op(OnigSyntaxType* syntax)
# unsigned int onig_get_syntax_op2(OnigSyntaxType* syntax)
# unsigned int onig_get_syntax_behavior(OnigSyntaxType* syntax)
# OnigOptionType onig_get_syntax_options(OnigSyntaxType* syntax)
# void onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op)
# void onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2)
# void onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior)
# void onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options)
Get/Set elements of the syntax.
arguments
1 syntax: syntax
2 op, op2, behavior, options: value of element.
# void onig_copy_encoding(OnigEncoding to, OnigEncoding from)
Copy encoding.
arguments
1 to: destination address.
2 from: source address.
# int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what,
OnigCodePoint code)
Set a variable meta character to the code point value.
Except for an escape character, this meta characters specification
is not work, if ONIG_SYN_OP_VARIABLE_META_CHARACTERS is not effective
by the syntax. (Build-in syntaxes are not effective.)
normal return: ONIG_NORMAL
arguments
1 syntax: target syntax
2 what: specifies which meta character it is.
ONIG_META_CHAR_ESCAPE
ONIG_META_CHAR_ANYCHAR
ONIG_META_CHAR_ANYTIME
ONIG_META_CHAR_ZERO_OR_ONE_TIME
ONIG_META_CHAR_ONE_OR_MORE_TIME
ONIG_META_CHAR_ANYCHAR_ANYTIME
3 code: meta character or ONIG_INEFFECTIVE_META_CHAR.
# OnigCaseFoldType onig_get_default_case_fold_flag()
Get default case fold flag.
# int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag)
Set default case fold flag.
1 case_fold_flag: case fold flag
# unsigned int onig_get_match_stack_limit_size(void)
Return the maximum number of stack size.
(default: 0 == unlimited)
# int onig_set_match_stack_limit_size(unsigned int size)
Set the maximum number of stack size.
(size = 0: unlimited)
normal return: ONIG_NORMAL
# int onig_unicode_define_user_property(const char* name, OnigCodePoint* ranges))
Define new Unicode property.
(This function is not thread safe.)
arguments
1 name: property name (ASCII only. character ' ', '-', '_' are ignored.)
2 ranges: property code point ranges
(first element is number of ranges.)
[num-of-ranges, 1st-range-start, 1st-range-end, 2nd-range-start... ]
* Don't destroy the ranges after having called this function.
normal return: ONIG_NORMAL
# unsigned int onig_get_parse_depth_limit(void)
Return the maximum depth of parser recursion.
(default: DEFAULT_PARSE_DEPTH_LIMIT defined in regint.h. Currently 4096.)
# int onig_set_parse_depth_limit(unsigned int depth)
Set the maximum depth of parser recursion.
(depth = 0: Set to the default value defined in regint.h.)
normal return: ONIG_NORMAL
# int onig_end(void)
The use of this library is finished.
normal return: ONIG_NORMAL
It is not allowed to use regex objects which created
before onig_end() call.
# const char* onig_version(void)
Return version string. (ex. "5.0.3")
// END
oniguruma-6.7.0/doc/API.ja 0000664 0000000 0000000 00000055247 13212423352 0015236 0 ustar 00root root 0000000 0000000 鬯シ霆翫う繝ウ繧ソ繝シ繝輔ぉ繝シ繧ケ Version 6.7.0 2017/12/08
#include
# int onig_initialize(OnigEncoding use_encodings[], int num_encodings)
繝ゥ繧、繝悶Λ繝ェ縺ョ蛻晄悄蛹
譛蛻昴↓蜻シ縺ウ蜃コ縺吝ソ隕√′縺ゅk縲
* onig_init() 縺ッ蟒豁「
蠑墓焚
1 use_encodings: 菴ソ逕ィ縺吶k譁蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー縺ョ驟榊
2 num_encodings: 譁蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー縺ョ謨ー
# int onig_error_code_to_str(UChar* err_buf, int err_code, ...)
繧ィ繝ゥ繝シ繝。繝繧サ繝シ繧ク繧貞叙蠕励☆繧九
縺薙ョ髢「謨ー繧偵{nig_new()縺ョ邨先棡縺ォ蟇セ縺励※蜻シ縺ウ蜃コ縺吝エ蜷医↓縺ッ縲{nig_new()縺ョpattern蠑墓焚繧
繝。繝「繝ェ隗」謾セ縺吶k繧医j繧ょ燕縺ォ蜻シ縺ウ蜃コ縺輔↑縺代l縺ー縺ェ繧峨↑縺縲
豁」蟶ク邨ゆコ謌サ繧雁、: 繧ィ繝ゥ繝シ繝。繝繧サ繝シ繧ク譁蟄怜励ョ繝舌う繝磯聞
蠑墓焚
1 err_buf: 繧ィ繝ゥ繝シ繝。繝繧サ繝シ繧ク繧呈シ邏阪☆繧矩伜沺
(蠢隕√↑繧オ繧、繧コ: ONIG_MAX_ERROR_MESSAGE_LEN)
2 err_code: 繧ィ繝ゥ繝シ繧ウ繝シ繝
3 err_info (optional): onig_new()縺ョerr_info
# void onig_set_warn_func(OnigWarnFunc func)
隴ヲ蜻企夂衍髢「謨ー繧偵そ繝繝医☆繧九
隴ヲ蜻:
'[', '-', ']' in character class without escape.
']' in pattern without escape.
蠑墓焚
1 func: 隴ヲ蜻企未謨ー void (*func)(char* warning_message)
# void onig_set_verb_warn_func(OnigWarnFunc func)
隧ウ邏ー隴ヲ蜻企夂衍髢「謨ー繧偵そ繝繝医☆繧九
隧ウ邏ー隴ヲ蜻:
redundant nested repeat operator.
蠑墓焚
1 func: 隧ウ邏ー隴ヲ蜻企未謨ー void (*func)(char* warning_message)
# int onig_new(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax,
OnigErrorInfo* err_info)
豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝(regex)繧剃ス懈舌☆繧九
豁」蟶ク邨ゆコ謌サ繧雁、: ONIG_NORMAL
蠑墓焚
1 reg: 菴懈舌&繧後◆豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝医r霑斐☆繧「繝峨Ξ繧ケ
2 pattern: 豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁蟄怜
3 pattern_end: 豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁蟄怜励ョ邨らォッ繧「繝峨Ξ繧ケ(pattern + pattern length)
4 option: 豁」隕剰。ィ迴セ繧ウ繝ウ繝代う繝ォ譎ゅが繝励す繝ァ繝ウ
ONIG_OPTION_NONE 繧ェ繝励す繝ァ繝ウ縺ェ縺
ONIG_OPTION_SINGLELINE '^' -> '\A', '$' -> '\Z'
ONIG_OPTION_MULTILINE '.'縺梧隼陦後↓繝槭ャ繝√☆繧
ONIG_OPTION_IGNORECASE 譖匁乂繝槭ャ繝 繧ェ繝ウ
ONIG_OPTION_EXTEND 繝代ち繝シ繝ウ諡。蠑オ蠖「蠑
ONIG_OPTION_FIND_LONGEST 譛髟キ繝槭ャ繝
ONIG_OPTION_FIND_NOT_EMPTY 遨コ繝槭ャ繝√r辟。隕
ONIG_OPTION_NEGATE_SINGLELINE
ONIG_SYNTAX_POSIX_BASIC, ONIG_SYNTAX_POSIX_EXTENDED,
ONIG_SYNTAX_PERL, ONIG_SYNTAX_PERL_NG, ONIG_SYNTAX_JAVA縺ァ
繝繝輔か繝ォ繝医〒譛牙柑縺ェONIG_OPTION_SINGLELINE繧偵け繝ェ繧「縺吶k縲
ONIG_OPTION_DONT_CAPTURE_GROUP 蜷榊燕莉倥″謐慕佐蠑城寔蜷医ョ縺ソ謐慕佐
ONIG_OPTION_CAPTURE_GROUP 蜷榊燕辟。縺玲黒迯イ蠑城寔蜷医b謐慕佐
ONIG_OPTION_WORD_IS_ASCII word縺窟SCII縺ョ縺ソ (\w, \p{Word}, [[:word:]])
word bound縺窟SCII縺ョ縺ソ (\b)
ONIG_OPTION_DIGIT_IS_ASCII digit縺窟SCII縺ョ縺ソ (\d, \p{Digit}, [[:digit:]])
ONIG_OPTION_SPACE_IS_ASCII space縺窟SCII縺ョ縺ソ (\s, \p{Space}, [[:space:]])
ONIG_OPTION_POSIX_IS_ASCII POSIX繝励Ο繝代ユ繧」縺窟SCII縺ョ縺ソ
(word, digit, space繧貞ィ縺ヲ蜷ォ繧薙〒縺繧)
(alnum, alpha, blank, cntrl, digit, graph,
lower, print, punct, space, upper, xdigit,
word)
5 enc: 譁蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー
ONIG_ENCODING_ASCII ASCII
ONIG_ENCODING_ISO_8859_1 ISO 8859-1
ONIG_ENCODING_ISO_8859_2 ISO 8859-2
ONIG_ENCODING_ISO_8859_3 ISO 8859-3
ONIG_ENCODING_ISO_8859_4 ISO 8859-4
ONIG_ENCODING_ISO_8859_5 ISO 8859-5
ONIG_ENCODING_ISO_8859_6 ISO 8859-6
ONIG_ENCODING_ISO_8859_7 ISO 8859-7
ONIG_ENCODING_ISO_8859_8 ISO 8859-8
ONIG_ENCODING_ISO_8859_9 ISO 8859-9
ONIG_ENCODING_ISO_8859_10 ISO 8859-10
ONIG_ENCODING_ISO_8859_11 ISO 8859-11
ONIG_ENCODING_ISO_8859_13 ISO 8859-13
ONIG_ENCODING_ISO_8859_14 ISO 8859-14
ONIG_ENCODING_ISO_8859_15 ISO 8859-15
ONIG_ENCODING_ISO_8859_16 ISO 8859-16
ONIG_ENCODING_UTF8 UTF-8
ONIG_ENCODING_UTF16_BE UTF-16BE
ONIG_ENCODING_UTF16_LE UTF-16LE
ONIG_ENCODING_UTF32_BE UTF-32BE
ONIG_ENCODING_UTF32_LE UTF-32LE
ONIG_ENCODING_EUC_JP EUC-JP
ONIG_ENCODING_EUC_TW EUC-TW
ONIG_ENCODING_EUC_KR EUC-KR
ONIG_ENCODING_EUC_CN EUC-CN
ONIG_ENCODING_SJIS Shift_JIS
ONIG_ENCODING_KOI8_R KOI8-R
ONIG_ENCODING_CP1251 CP1251
ONIG_ENCODING_BIG5 Big5
ONIG_ENCODING_GB18030 GB18030
縺セ縺溘ッ縲√Θ繝シ繧カ縺悟ョ夂セゥ縺励◆OnigEncodingType繝繝シ繧ソ縺ョ繧「繝峨Ξ繧ケ
6 syntax: 豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁豕募ョ夂セゥ
ONIG_SYNTAX_ASIS plain text
ONIG_SYNTAX_POSIX_BASIC POSIX Basic RE
ONIG_SYNTAX_POSIX_EXTENDED POSIX Extended RE
ONIG_SYNTAX_EMACS Emacs
ONIG_SYNTAX_GREP grep
ONIG_SYNTAX_GNU_REGEX GNU regex
ONIG_SYNTAX_JAVA Java (Sun java.util.regex)
ONIG_SYNTAX_PERL Perl
ONIG_SYNTAX_PERL_NG Perl + 蜷榊燕莉倥″謐慕佐蠑城寔蜷
ONIG_SYNTAX_RUBY Ruby
ONIG_SYNTAX_ONIGURUMA Oniguruma
ONIG_SYNTAX_DEFAULT default (== ONIG_SYNTAX_ONIGURUMA)
onig_set_default_syntax()
縺セ縺溘ッ縲√Θ繝シ繧カ縺悟ョ夂セゥ縺励◆OnigSyntaxType繝繝シ繧ソ縺ョ繧「繝峨Ξ繧ケ
7 err_info: 繧ィ繝ゥ繝シ諠蝣ア繧定ソ斐☆縺溘a縺ョ繧「繝峨Ξ繧ケ
onig_error_code_to_str()縺ョ荳臥分逶ョ縺ョ蠑墓焚縺ィ縺励※菴ソ逕ィ縺吶k
# int onig_new_without_alloc(regex_t* reg, const UChar* pattern,
const UChar* pattern_end,
OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax,
OnigErrorInfo* err_info)
豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝(regex)繧剃ス懈舌☆繧九
reg縺ョ鬆伜沺繧貞驛ィ縺ァ蜑イ繧雁ス薙※縺ェ縺縲
豁」蟶ク邨ゆコ謌サ繧雁、: ONIG_NORMAL
# int onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
OnigCompileInfo* ci, OnigErrorInfo* einfo)
豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝(regex)繧剃ス懈舌☆繧九
縺薙ョ髢「謨ー縺ッ縲{nig_new()縺ョ繝繝ゥ繝繧ッ繧ケ迚医
豁」蟶ク邨ゆコ謌サ繧雁、: ONIG_NORMAL
蠑墓焚
1 reg: 菴懈舌&繧後◆豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝医r霑斐☆繧「繝峨Ξ繧ケ
2 pattern: 豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁蟄怜
3 pattern_end: 豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁蟄怜励ョ邨らォッ繧「繝峨Ξ繧ケ(pattern + pattern length)
4 ci: 繧ウ繝ウ繝代う繝ォ諠蝣ア
ci->num_of_elements: ci縺ョ隕∫エ謨ー (迴セ蝨ィ縺ョ迚医〒縺ッ: 5)
ci->pattern_enc: 繝代ち繝シ繝ウ譁蟄怜励ョ譁蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー
ci->target_enc: 蟇セ雎。譁蟄怜励ョ譁蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー
ci->syntax: 豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁豕募ョ夂セゥ
ci->option: 豁」隕剰。ィ迴セ繧ウ繝ウ繝代う繝ォ譎ゅが繝励す繝ァ繝ウ
ci->case_fold_flag: ONIG_OPTION_IGNORECASE繝「繝シ繝峨〒縺ョ
譁蟄玲尠譏ァ繝槭ャ繝∵欠螳壹ン繝繝医ヵ繝ゥ繧ー
ONIGENC_CASE_FOLD_MIN: 譛蟆
ONIGENC_CASE_FOLD_DEFAULT: 譛蟆
onig_set_default_case_fold_flag()
5 err_info: 繧ィ繝ゥ繝シ諠蝣ア繧定ソ斐☆縺溘a縺ョ繧「繝峨Ξ繧ケ
onig_error_code_to_str()縺ョ荳臥分逶ョ縺ョ蠑墓焚縺ィ縺励※菴ソ逕ィ縺吶k
逡ー縺ェ繧区枚蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー縺ョ邨縺ソ蜷医o縺帙ッ縲∽サ・荳九ョ蝣エ蜷医↓縺ョ縺ソ險ア縺輔l繧九
pattern_enc: ASCII, ISO_8859_1
target_enc: UTF16_BE, UTF16_LE, UTF32_BE, UTF32_LE
pattern_enc: UTF16_BE/LE
target_enc: UTF16_LE/BE
pattern_enc: UTF32_BE/LE
target_enc: UTF32_LE/BE
# void onig_free(regex_t* reg)
豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝医ョ繝。繝「繝ェ繧定ァ」謾セ縺吶k縲
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
# void onig_free_body(regex_t* reg)
豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝医ョ繝。繝「繝ェ繧定ァ」謾セ縺吶k縲(reg閾ェ霄ォ縺ョ鬆伜沺繧帝勁縺縺ヲ)
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
# int onig_search(regex_t* reg, const UChar* str, const UChar* end, const UChar* start,
const UChar* range, OnigRegion* region, OnigOptionType option)
豁」隕剰。ィ迴セ縺ァ譁蟄怜励r讀懃エ「縺励∵、懃エ「邨先棡縺ィ繝槭ャ繝鬆伜沺繧定ソ斐☆縲
豁」蟶ク邨ゆコ謌サ繧雁、: 繝槭ャ繝∽ス咲スョ (p - str >= 0)
讀懃エ「螟ア謨: ONIG_MISMATCH (< 0)
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
2 str: 讀懃エ「蟇セ雎。譁蟄怜
3 end: 讀懃エ「蟇セ雎。譁蟄怜励ョ邨らォッ繧「繝峨Ξ繧ケ
4 start: 讀懃エ「蟇セ雎。譁蟄怜励ョ讀懃エ「蜈磯ュ菴咲スョ繧「繝峨Ξ繧ケ
5 range: 讀懃エ「蟇セ雎。譁蟄怜励ョ讀懃エ「邨ゆコ菴咲スョ繧「繝峨Ξ繧ケ
蜑肴婿謗「邏「 (start <= 謗「邏「縺輔l繧区枚蟄怜 < range)
蠕梧婿謗「邏「 (range <= 謗「邏「縺輔l繧区枚蟄怜 <= start)
6 region: 繝槭ャ繝鬆伜沺諠蝣ア(region) (NULL繧りィア縺輔l繧)
7 option: 讀懃エ「譎ゅが繝励す繝ァ繝ウ
ONIG_OPTION_NOTBOL 譁蟄怜励ョ蜈磯ュ(str)繧定。碁ュ縺ィ逵句★縺輔↑縺
ONIG_OPTION_NOTEOL 譁蟄怜励ョ邨らォッ(end)繧定。梧忰縺ィ逵句★縺輔↑縺
ONIG_OPTION_POSIX_REGION region蠑墓焚繧単OSIX API縺ョregmatch_t[]縺ォ縺吶k
# int onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at,
OnigRegion* region, OnigOptionType option)
譁蟄怜励ョ謖螳壻ス咲スョ縺ァ繝槭ャ繝√Φ繧ー繧定。後>縲∫オ先棡縺ィ繝槭ャ繝鬆伜沺繧定ソ斐☆縲
豁」蟶ク邨ゆコ謌サ繧雁、: 繝槭ャ繝√@縺溘ヰ繧、繝磯聞 (>= 0)
not match: ONIG_MISMATCH ( < 0)
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
2 str: 讀懃エ「蟇セ雎。譁蟄怜
3 end: 讀懃エ「蟇セ雎。譁蟄怜励ョ邨らォッ繧「繝峨Ξ繧ケ
4 at: 讀懃エ「蟇セ雎。譁蟄怜励ョ讀懃エ「繧「繝峨Ξ繧ケ
5 region: 繝槭ャ繝鬆伜沺諠蝣ア(region) (NULL繧りィア縺輔l繧)
6 option: 讀懃エ「譎ゅが繝励す繝ァ繝ウ
ONIG_OPTION_NOTBOL 譁蟄怜励ョ蜈磯ュ(str)繧定。碁ュ縺ィ逵句★縺輔↑縺
ONIG_OPTION_NOTEOL 譁蟄怜励ョ邨らォッ(end)繧定。梧忰縺ィ逵句★縺輔↑縺
ONIG_OPTION_POSIX_REGION region蠑墓焚繧単OSIX API縺ョregmatch_t[]縺ォ縺吶k
# int onig_scan(regex_t* reg, const UChar* str, const UChar* end,
OnigRegion* region, OnigOptionType option,
int (*scan_callback)(int, int, OnigRegion*, void*),
void* callback_arg)
豁」隕剰。ィ迴セ縺ァ譁蟄怜励r繧ケ繧ュ繝」繝ウ縺励※縲√槭ャ繝√Φ繧ー縺吶k豈弱↓繧ウ繝シ繝ォ繝舌ャ繧ッ髢「謨ー繧貞他縺ウ蜃コ縺吶
豁」蟶ク邨ゆコ: 繝槭ャ繝∝屓謨ー (0蝗槭b蜷ォ繧√k)
繧ィ繝ゥ繝シ: 繧ィ繝ゥ繝シ繧ウ繝シ繝 (< 0)
荳ュ譁ュ: 繧ウ繝シ繝ォ繝舌ャ繧ッ髢「謨ー縺鯉シ蝉サ・螟悶ョ謌サ繧雁、繧定ソ斐@縺溘→縺阪√◎縺ョ蛟、繧呈綾繧雁、縺ィ縺励※荳ュ譁ュ
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
2 str: 讀懃エ「蟇セ雎。譁蟄怜
3 end: 讀懃エ「蟇セ雎。譁蟄怜励ョ邨らォッ繧「繝峨Ξ繧ケ
4 region: 繝槭ャ繝鬆伜沺諠蝣ア(region) (NULL繧りィア縺輔l繧)
5 option: 讀懃エ「譎ゅが繝励す繝ァ繝ウ
6 scan_callback: 繧ウ繝シ繝ォ繝舌ャ繧ッ髢「謨ー
7 callback_arg: 繧ウ繝シ繝ォ繝舌ャ繧ッ髢「謨ー縺ォ貂。縺輔l繧倶サ伜刈蠑墓焚蛟、
# OnigRegion* onig_region_new(void)
繝槭ャ繝鬆伜沺諠蝣ア(region)繧剃ス懈舌☆繧九
# void onig_region_free(OnigRegion* region, int free_self)
繝槭ャ繝鬆伜沺諠蝣ア(region)縺ァ菴ソ逕ィ縺輔l縺ヲ縺繧九Γ繝「繝ェ繧定ァ」謾セ縺吶k縲
蠑墓焚
1 region: 繝槭ャ繝鬆伜沺諠蝣ア繧ェ繝悶ず繧ァ繧ッ繝
2 free_self: [1: region閾ェ霄ォ繧貞性繧√※蜈ィ縺ヲ隗」謾セ, 0: region閾ェ霄ォ縺ッ隗」謾セ縺励↑縺Ь
# void onig_region_copy(OnigRegion* to, OnigRegion* from)
繝槭ャ繝鬆伜沺諠蝣ア(region)繧定、陬ス縺吶k縲
蠑墓焚
1 to: 蟇セ雎。鬆伜沺
2 from: 蜈鬆伜沺
# void onig_region_clear(OnigRegion* region)
繝槭ャ繝鬆伜沺諠蝣ア(region)縺ョ荳ュ蜻ウ繧偵け繝ェ繧「縺吶k縲
蠑墓焚
1 region: 蟇セ雎。鬆伜沺
# int onig_region_resize(OnigRegion* region, int n)
繝槭ャ繝鬆伜沺諠蝣ア(region)縺ョ謐慕佐蠑城寔蜷(繧ー繝ォ繝シ繝)謨ー繧貞、画峩縺吶k縲
豁」蟶ク邨ゆコ謌サ繧雁、: ONIG_NORMAL
蠑墓焚
1 region: 蟇セ雎。鬆伜沺
2 n: 譁ー縺励>繧オ繧、繧コ
# int onig_name_to_group_numbers(regex_t* reg, const UChar* name, const UChar* name_end,
int** num_list)
謖螳壹@縺溷錐蜑阪↓蟇セ縺吶k蜷榊燕莉倥″謐慕佐蠑城寔蜷(繧ー繝ォ繝シ繝)縺ョ
繧ー繝ォ繝シ繝礼分蜿キ繝ェ繧ケ繝医r霑斐☆縲
蜷榊燕莉倥″謐慕佐蠑城寔蜷医ッ縲(?....)縺ォ繧医▲縺ヲ螳夂セゥ縺ァ縺阪k縲
豁」蟶ク邨ゆコ謌サ繧雁、: 謖螳壹&繧後◆蜷榊燕縺ォ蟇セ縺吶k繧ー繝ォ繝シ繝玲焚
(萓 /(?..)(?..)/ ==> 2)
蜷榊燕縺ォ蟇セ縺吶k繧ー繝ォ繝シ繝励′蟄伜惠縺励↑縺: -1
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
2 name: 謐慕佐蠑城寔蜷(繧ー繝ォ繝シ繝)蜷
3 name_end: 謐慕佐蠑城寔蜷(繧ー繝ォ繝シ繝)蜷阪ョ邨らォッ繧「繝峨Ξ繧ケ
4 num_list: 逡ェ蜿キ繝ェ繧ケ繝医r霑斐☆繧「繝峨Ξ繧ケ
# int onig_name_to_backref_number(regex_t* reg, const UChar* name, const UChar* name_end,
OnigRegion *region)
謖螳壹&繧後◆蜷榊燕縺ョ蠕梧婿蜿らァ(\k)縺ォ蟇セ縺吶k謐慕佐蠑城寔蜷(繧ー繝ォ繝シ繝)縺ョ逡ェ蜿キ繧定ソ斐☆縲
蜷榊燕縺ォ蟇セ縺励※縲∬、謨ー縺ョ繝槭ャ繝鬆伜沺縺梧怏蜉ケ縺ァ縺ゅl縺ー縲√◎縺ョ荳ュ縺ョ譛螟ァ縺ョ逡ェ蜿キ繧定ソ斐☆縲
蜷榊燕縺ォ蟇セ縺吶k謐慕佐蠑城寔蜷医′荳蛟九@縺九↑縺縺ィ縺阪↓縺ッ縲∝ッセ蠢懊☆繧九槭ャ繝鬆伜沺縺梧怏蜉ケ縺
縺ゥ縺縺九↓髢「菫ゅ↑縺上√◎縺ョ逡ェ蜿キ繧定ソ斐☆縲(蠕薙▲縺ヲ縲〉egion縺ォ縺ッNULL繧呈ク。縺励※繧ゅh縺縲)
豁」蟶ク邨ゆコ謌サ繧雁、: 逡ェ蜿キ
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
2 name: 謐慕佐蠑城寔蜷(繧ー繝ォ繝シ繝)蜷
3 name_end: 謐慕佐蠑城寔蜷(繧ー繝ォ繝シ繝)蜷阪ョ邨らォッ繧「繝峨Ξ繧ケ
4 region: search/match邨先棡縺ョ繝槭ャ繝鬆伜沺
# int onig_foreach_name(regex_t* reg,
int (*func)(const UChar*, const UChar*, int,int*,regex_t*,void*),
void* arg)
蜈ィ縺ヲ縺ョ蜷榊燕縺ォ蟇セ縺励※繧ウ繝シ繝ォ繝舌ャ繧ッ髢「謨ー蜻シ縺ウ蜃コ縺励r螳溯。後☆繧九
豁」蟶ク邨ゆコ謌サ繧雁、: 0
繧ィ繝ゥ繝シ: 繧ウ繝シ繝ォ繝舌ャ繧ッ髢「謨ー縺ョ謌サ繧雁、
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
2 func: 繧ウ繝シ繝ォ繝舌ャ繧ッ髢「謨ー
func(name, name_end, , ,
reg, arg);
func縺0莉・螟悶ョ蛟、繧定ソ斐☆縺ィ縲√◎繧御サ・髯阪ョ繧ウ繝シ繝ォ繝舌ャ繧ッ縺ッ陦後↑繧上★縺ォ
邨ゆコ縺吶k縲
3 arg: func縺ォ蟇セ縺吶k霑ス蜉蠑墓焚
# int onig_number_of_names(regex_t* reg)
繝代ち繝シ繝ウ荳ュ縺ァ螳夂セゥ縺輔l縺溷錐蜑阪ョ謨ー繧定ソ斐☆縲
荳蛟九ョ蜷榊燕縺ョ螟夐榊ョ夂セゥ縺ッ荳蛟九→逵句★縺吶
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
# OnigEncoding onig_get_encoding(regex_t* reg)
# OnigOptionType onig_get_options(regex_t* reg)
# OnigCaseFoldType onig_get_case_fold_flag(regex_t* reg)
# OnigSyntaxType* onig_get_syntax(regex_t* reg)
豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝医↓蟇セ縺励※縲∝ッセ蠢懊☆繧句、繧定ソ斐☆縲
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
# int onig_number_of_captures(regex_t* reg)
繝代ち繝シ繝ウ荳ュ縺ァ螳夂セゥ縺輔l縺滓黒迯イ繧ー繝ォ繝シ繝励ョ謨ー繧定ソ斐☆縲
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
# int onig_number_of_capture_histories(regex_t* reg)
繝代ち繝シ繝ウ荳ュ縺ァ螳夂セゥ縺輔l縺滓黒迯イ螻・豁エ(?@...)縺ョ謨ー繧定ソ斐☆縲
菴ソ逕ィ縺吶k譁豕輔〒謐慕佐螻・豁エ讖溯ス縺梧怏蜉ケ(ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY)
縺ァ縺ェ縺代l縺ー縲∵黒迯イ螻・豁エ讖溯ス縺ッ菴ソ逕ィ縺ァ縺阪↑縺縲
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
# OnigCaptureTreeNode* onig_get_capture_tree(OnigRegion* region)
謐慕佐螻・豁エ繝繝シ繧ソ縺ョ繝ォ繝シ繝医ヮ繝シ繝峨r霑斐☆縲
繝槭ャ繝√′螟ア謨励@縺ヲ縺繧句エ蜷医↓縺ッ縲√%縺ョ蛟、縺ッ荳榊ョ壹〒縺ゅk縲
蠑墓焚
1 region: 繝槭ャ繝鬆伜沺
# int onig_capture_tree_traverse(OnigRegion* region, int at,
int(*func)(int,int,int,int,int,void*), void* arg)
謐慕佐螻・豁エ繝繝シ繧ソ譛ィ繧貞キ。蝗槭@縺ヲ繧ウ繝シ繝ォ繝舌ャ繧ッ縺吶k縲
豁」蟶ク邨ゆコ謌サ繧雁、: 0
繧ィ繝ゥ繝シ: 繧ウ繝シ繝ォ繝舌ャ繧ッ髢「謨ー縺ョ謌サ繧雁、
蠑墓焚
1 region: 繝槭ャ繝鬆伜沺
2 at: 繧ウ繝シ繝ォ繝舌ャ繧ッ繧定。後↑縺繧ソ繧、繝溘Φ繧ー
ONIG_TRAVERSE_CALLBACK_AT_FIRST:
譛蛻昴↓繧ウ繝シ繝ォ繝舌ャ繧ッ縺励※縲∝ュ舌ヮ繝シ繝峨r蟾。蝗
ONIG_TRAVERSE_CALLBACK_AT_LAST:
蟄舌ヮ繝シ繝峨r蟾。蝗槭@縺ヲ縲√さ繝シ繝ォ繝舌ャ繧ッ
ONIG_TRAVERSE_CALLBACK_AT_BOTH:
譛蛻昴↓繧ウ繝シ繝ォ繝舌ャ繧ッ縺励※縲∝ュ舌ヮ繝シ繝峨r蟾。蝗槭∵怙蠕後↓繧ゅ≧荳蠎ヲ繧ウ繝シ繝ォ繝舌ャ繧ッ
3 func: 繧ウ繝シ繝ォ繝舌ャ繧ッ髢「謨ー
func縺0莉・螟悶ョ蛟、繧定ソ斐☆縺ィ縲√◎繧御サ・髯阪ョ蟾。蝗槭ッ陦後↑繧上★縺ォ
邨ゆコ縺吶k縲
int func(int group, int beg, int end, int level, int at,
void* arg)
group: 繧ー繝ォ繝シ繝礼分蜿キ
beg: 繝槭ャ繝髢句ァ倶ス咲スョ
end 繝槭ャ繝∫オゆコ菴咲スョ
level: 繝阪せ繝医Ξ繝吶Ν (0縺九i)
at: 繧ウ繝シ繝ォ繝舌ャ繧ッ縺悟他縺ウ蜃コ縺輔l縺溘ち繧、繝溘Φ繧ー
ONIG_TRAVERSE_CALLBACK_AT_FIRST
ONIG_TRAVERSE_CALLBACK_AT_LAST
arg: 霑ス蜉蠑墓焚
4 arg; func縺ォ蟇セ縺吶k霑ス蜉蠑墓焚
# int onig_noname_group_capture_is_active(regex_t* reg)
蜷榊燕縺ェ縺怜シ城寔蜷医ョ謐慕佐讖溯ス縺梧怏蜉ケ縺九←縺縺九r霑斐☆縲
譛牙柑: 1
辟。蜉ケ: 0
蠑墓焚
1 reg: 豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
繧ェ繝励す繝ァ繝ウ縺ョONIG_OPTION_DONT_CAPTURE_GROUP縺薫N --> 辟。蜉ケ
繝代ち繝シ繝ウ縺悟錐蜑阪▽縺榊シ城寔蜷医r菴ソ逕ィ縺励※縺繧
AND 菴ソ逕ィ譁豕輔〒縲^NIG_SYN_CAPTURE_ONLY_NAMED_GROUP縺薫N
AND 繧ェ繝励す繝ァ繝ウ縺ョONIG_OPTION_CAPTURE_GROUP縺薫FF
--> 辟。蜉ケ
荳願ィ倅サ・螟悶ョ蝣エ蜷 --> 譛牙柑
# UChar* onigenc_get_prev_char_head(OnigEncoding enc, const UChar* start, const UChar* s)
譁蟄嶺ク蛟句蜑阪ョ譁蟄怜嶺ス咲スョ繧定ソ斐☆縲
蠑墓焚
1 enc: 譁蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー
2 start: 譁蟄怜励ョ蜈磯ュ繧「繝峨Ξ繧ケ
3 s: 譁蟄怜嶺クュ縺ョ菴咲スョ
# UChar* onigenc_get_left_adjust_char_head(OnigEncoding enc,
const UChar* start, const UChar* s)
譁蟄励ョ蜈磯ュ繝舌う繝井ス咲スョ縺ォ縺ェ繧九h縺縺ォ蟾ヲ蛛エ縺ォ隱ソ謨エ縺励◆繧「繝峨Ξ繧ケ繧定ソ斐☆縲
蠑墓焚
1 enc: 譁蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー
2 start: 譁蟄怜励ョ蜈磯ュ繧「繝峨Ξ繧ケ
3 s: 譁蟄怜嶺クュ縺ョ菴咲スョ
# UChar* onigenc_get_right_adjust_char_head(OnigEncoding enc,
const UChar* start, const UChar* s)
譁蟄励ョ蜈磯ュ繝舌う繝井ス咲スョ縺ォ縺ェ繧九h縺縺ォ蜿ウ蛛エ縺ォ隱ソ謨エ縺励◆繧「繝峨Ξ繧ケ繧定ソ斐☆縲
蠑墓焚
1 enc: 譁蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー
2 start: 譁蟄怜励ョ蜈磯ュ繧「繝峨Ξ繧ケ
3 s: 譁蟄怜嶺クュ縺ョ菴咲スョ
# int onigenc_strlen(OnigEncoding enc, const UChar* s, const UChar* end)
# int onigenc_strlen_null(OnigEncoding enc, const UChar* s)
譁蟄怜励ョ譁蟄玲焚繧定ソ斐☆縲
# int onigenc_str_bytelen_null(OnigEncoding enc, const UChar* s)
譁蟄怜励ョ繝舌う繝域焚繧定ソ斐☆縲
# int onig_set_default_syntax(OnigSyntaxType* syntax)
繝繝輔か繝ォ繝医ョ豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁豕輔r繧サ繝繝医☆繧九
蠑墓焚
1 syntax: 豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁豕
# void onig_copy_syntax(OnigSyntaxType* to, OnigSyntaxType* from)
豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁豕輔r繧ウ繝斐シ縺吶k縲
蠑墓焚
1 to: 蟇セ雎。
2 from: 蜈
# unsigned int onig_get_syntax_op(OnigSyntaxType* syntax)
# unsigned int onig_get_syntax_op2(OnigSyntaxType* syntax)
# unsigned int onig_get_syntax_behavior(OnigSyntaxType* syntax)
# OnigOptionType onig_get_syntax_options(OnigSyntaxType* syntax)
# void onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op)
# void onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2)
# void onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior)
# void onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options)
豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁豕輔ョ隕∫エ繧貞盾辣ァ/蜿門セ励☆繧九
蠑墓焚
1 syntax: 豁」隕剰。ィ迴セ繝代ち繝シ繝ウ譁豕
2 op, op2, behavior, options: 隕∫エ縺ョ蛟、
# void onig_copy_encoding(OnigEncoding to, OnigEncoding from)
譁蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー繧偵さ繝斐シ縺吶k縲
蠑墓焚
1 to: 蟇セ雎。
2 from: 蜈
# int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what,
OnigCodePoint code)
繝。繧ソ譁蟄励r謖螳壹@縺溘さ繝シ繝峨昴う繝ウ繝亥、縺ォ繧サ繝繝医☆繧九
ONIG_SYN_OP_VARIABLE_META_CHARACTERS縺梧ュ」隕剰。ィ迴セ繝代ち繝シ繝ウ譁豕輔〒譛牙柑縺ォ
縺ェ縺」縺ヲ縺縺ェ縺蝣エ蜷医↓縺ッ縲√お繧ケ繧ア繝シ繝玲枚蟄励r髯、縺縺ヲ縲√%縺薙〒謖螳壹@縺溘Γ繧ソ譁蟄励ッ
讖溯ス縺励↑縺縲(邨霎シ縺ソ縺ョ譁豕輔〒縺ッ譛牙柑縺ォ縺励※縺縺ェ縺縲)
豁」蟶ク邨ゆコ謌サ繧雁、: ONIG_NORMAL
蠑墓焚
1 syntax: 蟇セ雎。譁豕
2 what: 繝。繧ソ譁蟄玲ゥ溯ス縺ョ謖螳
ONIG_META_CHAR_ESCAPE
ONIG_META_CHAR_ANYCHAR
ONIG_META_CHAR_ANYTIME
ONIG_META_CHAR_ZERO_OR_ONE_TIME
ONIG_META_CHAR_ONE_OR_MORE_TIME
ONIG_META_CHAR_ANYCHAR_ANYTIME
3 code: 繝。繧ソ譁蟄励ョ繧ウ繝シ繝峨昴う繝ウ繝 縺セ縺溘ッ ONIG_INEFFECTIVE_META_CHAR.
# OnigCaseFoldType onig_get_default_case_fold_flag()
繝繝輔か繝ォ繝医ョcase fold繝輔Λ繧ー繧貞叙蠕励☆繧九
# int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag)
繝繝輔か繝ォ繝医ョcase fold繝輔Λ繧ー繧偵そ繝繝医☆繧九
蠑墓焚
1 case_fold_flag: case fold繝輔Λ繧ー
# unsigned int onig_get_match_stack_limit_size(void)
繝槭ャ繝√せ繧ソ繝繧ッ繧オ繧、繧コ縺ョ譛螟ァ蛟、繧定ソ斐☆縲
(繝繝輔か繝ォ繝: 0 == 辟。蛻カ髯)
# int onig_set_match_stack_limit_size(unsigned int size)
繝槭ャ繝√せ繧ソ繝繧ッ繧オ繧、繧コ縺ョ譛螟ァ蛟、繧呈欠螳壹☆繧九
(size = 0: 辟。蛻カ髯)
豁」蟶ク邨ゆコ謌サ繧雁、: ONIG_NORMAL
# int onig_unicode_define_user_property(const char* name, OnigCodePoint* ranges))
譁ー縺励>Unicode繝励Ο繝代ユ繧」繧貞ョ夂セゥ縺吶k縲
(縺薙ョ髢「謨ー縺ッ繧ケ繝ャ繝繝峨そ繝シ繝輔〒縺ッ縺ェ縺)
蠑墓焚
1 name: 繝励Ο繝代ユ繧」蜷 (ASCII繧ウ繝シ繝峨ョ縺ソ縲 譁蟄 ' ', '-', '_' 縺ッ辟。隕悶&繧後k縲)
2 ranges: 繝励Ο繝代ユ繧」繧ウ繝シ繝峨昴う繝ウ繝育ッ蝗イ
(譛蛻昴ョ隕∫エ縺ッ遽蝗イ縺ョ謨ー)
[num-of-ranges, 1st-range-start, 1st-range-end, 2nd-range-start... ]
* 縺薙ョ髢「謨ー繧貞他繧薙□蠕後〒縲〉anges繧貞、画峩/遐エ螢翫@縺ェ縺縺薙→
豁」蟶ク邨ゆコ謌サ繧雁、: ONIG_NORMAL
# unsigned int onig_get_parse_depth_limit(void)
蜀榊クー繝代シ繧ケ蜃ヲ逅縺ョ譛螟ァ豺ア縺輔r霑斐☆縲
(繝繝輔か繝ォ繝: regint.h 縺ァ螳夂セゥ縺輔l縺ヲ縺繧 DEFAULT_PARSE_DEPTH_LIMIT縲ら樟蝨ィ縺ッ 4096)
# int onig_set_parse_depth_limit(unsigned int depth)
蜀榊クー繝代シ繧ケ蜃ヲ逅縺ョ譛螟ァ豺ア縺輔r謖螳壹☆繧九
(depth = 0: regint.h 縺ァ螳夂セゥ縺輔l縺溘ョ繝輔か繝ォ繝亥、縺ォ險ュ螳壹☆繧九)
豁」蟶ク邨ゆコ謌サ繧雁、: ONIG_NORMAL
# int onig_end(void)
繝ゥ繧、繝悶Λ繝ェ縺ョ菴ソ逕ィ繧堤オゆコ縺吶k縲
豁」蟶ク邨ゆコ謌サ繧雁、: ONIG_NORMAL
onig_init()繧貞榊コヲ蜻シ縺ウ蜃コ縺励※繧ゅ∽サ・蜑阪↓菴懈舌@縺滓ュ」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝
繧剃スソ逕ィ縺吶k縺薙→縺ッ縺ァ縺阪↑縺縲
# const char* onig_version(void)
繝舌シ繧ク繝ァ繝ウ譁蟄怜励r霑斐☆縲(萓 "5.0.3")
// END
oniguruma-6.7.0/doc/FAQ 0000664 0000000 0000000 00000000310 13212423352 0014620 0 ustar 00root root 0000000 0000000 FAQ 2006/11/14
1. Lognest match
You can execute longest match by using ONIG_OPTION_FIND_LONGEST option
in onig_new().
2. Mailing list
There is no mailing list about Oniguruma.
// END
oniguruma-6.7.0/doc/FAQ.ja 0000664 0000000 0000000 00000000653 13212423352 0015223 0 ustar 00root root 0000000 0000000 FAQ 2016/04/06
1. 譛髟キ繝槭ャ繝
onig_new()縺ョ荳ュ縺ァ縲^NIG_OPTION_FIND_LONGEST繧ェ繝励す繝ァ繝ウ
繧剃スソ逕ィ縺吶l縺ー譛髟キ繝槭ャ繝√↓縺ェ繧九
2. CR + LF
DOS縺ョ謾ケ陦(CR(0x0c) + LF(0x0a)縺ョ騾」邯)
regenc.h縺ョ荳ュ縺ョ縲∽サ・荳九ョ驛ィ蛻繧呈怏蜉ケ縺ォ縺吶k縲
/* #define USE_CRNL_AS_LINE_TERMINATOR */
3. 繝。繝シ繝ェ繝ウ繧ー繝ェ繧ケ繝
鬯シ霆翫↓髢「縺吶k繝。繝シ繝ェ繝ウ繧ー繝ェ繧ケ繝医ッ蟄伜惠縺励↑縺縲
//END
oniguruma-6.7.0/doc/RE 0000664 0000000 0000000 00000037641 13212423352 0014540 0 ustar 00root root 0000000 0000000 Oniguruma Regular Expressions Version 6.7.0 2017/12/08
syntax: ONIG_SYNTAX_ONIGURUMA (default)
1. Syntax elements
\ escape (enable or disable meta character)
| alternation
(...) group
[...] character class
2. Characters
\t horizontal tab (0x09)
\v vertical tab (0x0B)
\n newline (line feed) (0x0A)
\r carriage return (0x0D)
\b backspace (0x08)
\f form feed (0x0C)
\a bell (0x07)
\e escape (0x1B)
\nnn octal char (encoded byte value)
\o{17777777777} wide octal char (character code point value)
\uHHHH wide hexadecimal char (character code point value)
\xHH hexadecimal char (encoded byte value)
\x{7HHHHHHH} wide hexadecimal char (character code point value)
\cx control char (character code point value)
\C-x control char (character code point value)
\M-x meta (x|0x80) (character code point value)
\M-\C-x meta control char (character code point value)
(* \b as backspace is effective in character class only)
3. Character types
. any character (except newline)
\w word character
Not Unicode:
alphanumeric, "_" and multibyte char.
Unicode:
General_Category -- (Letter|Mark|Number|Connector_Punctuation)
\W non-word char
\s whitespace char
Not Unicode:
\t, \n, \v, \f, \r, \x20
Unicode case:
U+0009, U+000A, U+000B, U+000C, U+000D, U+0085(NEL),
General_Category -- Line_Separator
-- Paragraph_Separator
-- Space_Separator
\S non-whitespace char
\d decimal digit char
Unicode: General_Category -- Decimal_Number
\D non-decimal-digit char
\h hexadecimal digit char [0-9a-fA-F]
\H non-hexdigit char
\R general newline (* can't be used in character-class)
"\r\n" or \n,\v,\f,\r (* but doesn't backtrack from \r\n to \r)
Unicode case:
"\r\n" or \n,\v,\f,\r or U+0085, U+2028, U+2029
\N negative newline (?-m:.)
\O true anychar (?m:.) (* original function)
\X Extended Grapheme Cluster (?>\O(?:\Y\O)*)
\X doesn't check whether matching start position is boundary.
Write as \y\X if you want to ensure it.
Unicode case:
See [Unicode Standard Annex #29: http://unicode.org/reports/tr29/]
Not Unicode: (?>\r\n|\O)
Character Property
* \p{property-name}
* \p{^property-name} (negative)
* \P{property-name} (negative)
property-name:
+ works on all encodings
Alnum, Alpha, Blank, Cntrl, Digit, Graph, Lower,
Print, Punct, Space, Upper, XDigit, Word, ASCII
+ works on EUC_JP, Shift_JIS
Hiragana, Katakana
+ works on UTF8, UTF16, UTF32
See doc/UNICODE_PROPERTIES.
4. Quantifier
greedy
? 1 or 0 times
* 0 or more times
+ 1 or more times
{n,m} at least n but no more than m times
{n,} at least n times
{,n} at least 0 but no more than n times ({0,n})
{n} n times
reluctant
?? 1 or 0 times
*? 0 or more times
+? 1 or more times
{n,m}? at least n but not more than m times
{n,}? at least n times
{,n}? at least 0 but not more than n times (== {0,n}?)
possessive (greedy and does not backtrack once match)
?+ 1 or 0 times
*+ 0 or more times
++ 1 or more times
({n,m}+, {n,}+, {n}+ are possessive op. in ONIG_SYNTAX_JAVA only)
ex. /a*+/ === /(?>a*)/
5. Anchors
^ beginning of the line
$ end of the line
\b word boundary
\B non-word boundary
\y Extended Grapheme Cluster boundary
\Y Extended Grapheme Cluster non-boundary
\A beginning of string
\Z end of string, or before newline at the end
\z end of string
\G where the current search attempt begins
\K keep (keep start position of the result string)
6. Character class
^... negative class (lowest precedence)
x-y range from x to y
[...] set (character class in character class)
..&&.. intersection (low precedence, only higher than ^)
ex. [a-w&&[^c-g]z] ==> ([a-w] AND ([^c-g] OR z)) ==> [abh-w]
* If you want to use '[', '-', or ']' as a normal character
in character class, you should escape them with '\'.
POSIX bracket ([:xxxxx:], negate [:^xxxxx:])
Not Unicode Case:
alnum alphabet or digit char
alpha alphabet
ascii code value: [0 - 127]
blank \t, \x20
cntrl
digit 0-9
graph include all of multibyte encoded characters
lower
print include all of multibyte encoded characters
punct
space \t, \n, \v, \f, \r, \x20
upper
xdigit 0-9, a-f, A-F
word alphanumeric, "_" and multibyte characters
Unicode Case:
alnum Letter | Mark | Decimal_Number
alpha Letter | Mark
ascii 0000 - 007F
blank Space_Separator | 0009
cntrl Control | Format | Unassigned | Private_Use | Surrogate
digit Decimal_Number
graph [[:^space:]] && ^Control && ^Unassigned && ^Surrogate
lower Lowercase_Letter
print [[:graph:]] | [[:space:]]
punct Connector_Punctuation | Dash_Punctuation | Close_Punctuation |
Final_Punctuation | Initial_Punctuation | Other_Punctuation |
Open_Punctuation
space Space_Separator | Line_Separator | Paragraph_Separator |
U+0009 | U+000A | U+000B | U+000C | U+000D | U+0085
upper Uppercase_Letter
xdigit U+0030 - U+0039 | U+0041 - U+0046 | U+0061 - U+0066
(0-9, a-f, A-F)
word Letter | Mark | Decimal_Number | Connector_Punctuation
7. Extended groups
(?#...) comment
(?imxWDSP-imxWDSP) option on/off
i: ignore case
m: multi-line (dot (.) also matches newline)
x: extended form
W: ASCII only word (\w, \p{Word}, [[:word:]])
ASCII only word bound (\b)
D: ASCII only digit (\d, \p{Digit}, [[:digit:]])
S: ASCII only space (\s, \p{Space}, [[:space:]])
P: ASCII only POSIX properties (includes W,D,S)
(alnum, alpha, blank, cntrl, digit, graph,
lower, print, punct, space, upper, xdigit, word)
(?imxWDSP-imxWDSP:subexp) option on/off for subexp
(?:subexp) non-capturing group
(subexp) capturing group
(?=subexp) look-ahead
(?!subexp) negative look-ahead
(?<=subexp) look-behind
(?subexp) atomic group
no backtracks in subexp.
(?subexp), (?'name'subexp)
define named group
(Each character of the name must be a word character.)
Not only a name but a number is assigned like a capturing
group.
Assigning the same name to two or more subexps is allowed.
(?~absent) Absent repeater (* proposed by Tanaka Akira)
This works like .* (more precisely \O*), but it is
limited by the range that does not include the string
match with .
This is a written abbreviation of (?~|absent|\O*).
\O* is used as a repeater.
(?~|absent|exp) Absent expression (* original)
This works like "exp", but it is limited by the range
that does not include the string match with .
ex. (?~|345|\d*) "12345678" ==> "12", "1", ""
(?~|absent) Absent stopper (* original)
After passed this operator, string right range is limited
at the point that does not include the string match whth
.
(?~|) Range clear
Clear the effects caused by Absent stoppers.
* Nested Absent functions are not supported and the behavior
is undefined.
(?(condition_exp)then_exp|else_exp) if-then-else
(?(condition_exp)then_exp) if-then
condition_exp can be a backreference number/name or a normal
regular expression.
When condition_exp is a backreference number/name, both then_exp and
else_exp can be omitted.
Then it works as a backreference validity checker.
[ backreference validity checker ] (* original)
(?(n)), (?(-n)), (?(+n)), (?(n+level)) ...
(?()), (?('-n')), (?(<+n>)) ...
(?()), (?('name')), (?()) ...
8. Backreferences
When we say "backreference a group," it actually means, "re-match the same
text matched by the subexp in that group."
\n \k \k'n' (n >= 1) backreference the nth group in the regexp
\k<-n> \k'-n' (n >= 1) backreference the nth group counting
backwards from the referring position
\k<+n> \k'+n' (n >= 1) backreference the nth group counting
forwards from the referring position
\k \k'name' backreference a group with the specified name
When backreferencing with a name that is assigned to more than one groups,
the last group with the name is checked first, if not matched then the
previous one with the name, and so on, until there is a match.
* Backreference by number is forbidden if any named group is defined and
ONIG_OPTION_CAPTURE_GROUP is not set.
backreference with recursion level
(n >= 1, level >= 0)
\k \k'n+level'
\k \k'n-level'
\k \k'name+level'
\k \k'name-level'
Destine a group on the recursion level relative to the referring position.
ex 1.
/\A(?|.|(?:(?.)\g\k))\z/.match("reee")
/\A(?|.|(?:(?.)\g\k))\z/.match("reer")
\k refers to the (?.) on the same recursion level with it.
ex 2.
r = Regexp.compile(<<'__REGEXP__'.strip, Regexp::EXTENDED)
(? \g \g* \g ){0}
(? < \g \s* > ){0}
(? [a-zA-Z_:]+ ){0}
(? [^<&]+ (\g | [^<&]+)* ){0}
(? \k >){0}
\g
__REGEXP__
p r.match("fbbbf").captures
9. Subexp calls ("Tanaka Akira special") (* original function)
When we say "call a group," it actually means, "re-execute the subexp in
that group."
\g \g'n' (n >= 1) call the nth group
\g<0> \g'0' call zero (call the total regexp)
\g<-n> \g'-n' (n >= 1) call the nth group counting backwards from
the calling position
\g<+n> \g'+n' (n >= 1) call the nth group counting forwards from
the calling position
\g \g'name' call the group with the specified name
* Left-most recursive calls are not allowed.
ex. (?a|\gb) => error
(?a|b\gc) => OK
* Calls with a name that is assigned to more than one groups are not
allowed.
* Call by number is forbidden if any named group is defined and
ONIG_OPTION_CAPTURE_GROUP is not set.
* The option status of the called group is always effective.
ex. /(?-i:\g)(?i:(?a)){0}/.match("A")
10. Captured group
Behavior of an unnamed group (...) changes with the following conditions.
(But named group is not changed.)
case 1. /.../ (named group is not used, no option)
(...) is treated as a capturing group.
case 2. /.../g (named group is not used, 'g' option)
(...) is treated as a non-capturing group (?:...).
case 3. /..(?..)../ (named group is used, no option)
(...) is treated as a non-capturing group.
numbered-backref/call is not allowed.
case 4. /..(?..)../G (named group is used, 'G' option)
(...) is treated as a capturing group.
numbered-backref/call is allowed.
where
g: ONIG_OPTION_DONT_CAPTURE_GROUP
G: ONIG_OPTION_CAPTURE_GROUP
('g' and 'G' options are argued in ruby-dev ML)
-----------------------------
A-1. Syntax-dependent options
+ ONIG_SYNTAX_ONIGURUMA
(?m): dot (.) also matches newline
+ ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA
(?s): dot (.) also matches newline
(?m): ^ matches after newline, $ matches before newline
A-2. Original extensions
+ hexadecimal digit char type \h, \H
+ named group (?...), (?'name'...)
+ named backref \k
+ subexp call \g, \g
A-3. Missing features compared with perl 5.8.0
+ \N{name}
+ \l,\u,\L,\U,\C
+ (?{code})
+ (??{code})
* \Q...\E
This is effective on ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA.
A-4. Differences with Japanized GNU regex(version 0.12) of Ruby 1.8
+ add character property (\p{property}, \P{property})
+ add hexadecimal digit char type (\h, \H)
+ add look-behind
(?<=fixed-width-pattern), (?>]/ in EUC-JP encoding.
+ effect range of isolated option is to next ')'.
ex. (?:(?i)a|b) is interpreted as (?:(?i:a|b)), not (?:(?i:a)|b).
+ isolated option is not transparent to previous pattern.
ex. a(?i)* is a syntax error pattern.
+ allowed unpaired left brace as a normal character.
ex. /{/, /({)/, /a{2,3/ etc...
+ negative POSIX bracket [:^xxxx:] is supported.
+ POSIX bracket [:ascii:] is added.
+ repeat of look-ahead is not allowed.
ex. /(?=a)*/, /(?!b){5}/
+ Ignore case option is effective to escape sequence.
ex. /\x61/i =~ "A"
+ In the range quantifier, the number of the minimum is optional.
/a{,n}/ == /a{0,n}/
The omission of both minimum and maximum values is not allowed.
/a{,}/
+ /{n}?/ is not a reluctant quantifier.
/a{n}?/ == /(?:a{n})?/
+ invalid back reference is checked and raises error.
/\1/, /(a)\2/
+ Zero-width match in an infinite loop stops the repeat,
then changes of the capture group status are checked as stop condition.
/(?:()|())*\1\2/ =~ ""
/(?:\1a|())*/ =~ "a"
A-5. Features disabled in default syntax
+ capture history
(?@...) and (?@...)
ex. /(?@a)*/.match("aaa") ==> [<0-1>, <1-2>, <2-3>]
see sample/listcap.c file.
A-6. Problems
+ Invalid encoding byte sequence is not checked.
ex. UTF-8
* Invalid first byte is treated as a character.
/./u =~ "\xa3"
* Incomplete byte sequence is not checked.
/\w+/ =~ "a\xf3\x8ec"
// END
oniguruma-6.7.0/doc/RE.ja 0000664 0000000 0000000 00000045715 13212423352 0015132 0 ustar 00root root 0000000 0000000 鬯シ霆 豁」隕剰。ィ迴セ Version 6.7.0 2017/12/08
菴ソ逕ィ譁豕: ONIG_SYNTAX_ONIGURUMA (譌「螳壼、)
1. 蝓コ譛ャ隕∫エ
\ 騾驕ソ菫ョ鬟セ (繧ィ繧ケ繧ア繝シ繝) 豁」隕剰。ィ迴セ險伜捷縺ョ譛牙柑/辟。蜉ケ縺ョ蛻カ蠕。
| 驕ク謚槫ュ
(...) 蠑城寔蜷 (繧ー繝ォ繝シ繝)
[...] 譁蟄鈴寔蜷 (譁蟄励け繝ゥ繧ケ)
2. 譁蟄
\t 豌エ蟷ウ繧ソ繝 (0x09)
\v 蝙ら峩繧ソ繝 (0x0B)
\n 謾ケ陦 (0x0A)
\r 蠕ゥ蟶ー (0x0D)
\b 蠕碁遨コ逋ス (0x08)
\f 謾ケ鬆 (0x0C)
\a 髏 (0x07)
\e 騾驕ソ菫ョ鬟セ (0x1B)
\nnn 蜈ォ騾イ謨ー陦ィ迴セ 隨ヲ蜿キ蛹悶ヰ繧、繝亥、(縺ョ荳驛ィ)
\o{17777777777} 諡。蠑オ蜈ォ騾イ謨ー陦ィ迴セ 繧ウ繝シ繝峨昴う繝ウ繝亥、
\uHHHH 諡。蠑オ蜊∝ュ騾イ謨ー陦ィ迴セ 繧ウ繝シ繝峨昴う繝ウ繝亥、
\xHH 蜊∝ュ騾イ謨ー陦ィ迴セ 隨ヲ蜿キ蛹悶ヰ繧、繝亥、(縺ョ荳驛ィ)
\x{7HHHHHHH} 諡。蠑オ蜊∝ュ騾イ謨ー陦ィ迴セ 繧ウ繝シ繝峨昴う繝ウ繝亥、
\cx 蛻カ蠕。譁蟄苓。ィ迴セ 繧ウ繝シ繝峨昴う繝ウ繝亥、
\C-x 蛻カ蠕。譁蟄苓。ィ迴セ 繧ウ繝シ繝峨昴う繝ウ繝亥、
\M-x 雜 (x|0x80) 繧ウ繝シ繝峨昴う繝ウ繝亥、
\M-\C-x 雜 + 蛻カ蠕。譁蟄苓。ィ迴セ 繧ウ繝シ繝峨昴う繝ウ繝亥、
窶サ \b縺ッ縲∵枚蟄鈴寔蜷亥縺ァ縺ョ縺ソ譛牙柑
3. 譁蟄礼ィョ
. 莉サ諢乗枚蟄 (謾ケ陦後r髯、縺: 繧ェ繝励す繝ァ繝ウ縺ォ萓晏ュ)
\w 蜊倩ェ樊ァ区先枚蟄
Unicode莉・螟悶ョ蝣エ蜷:
闍ア謨ー蟄, "_" 縺翫h縺ウ 螟壹ヰ繧、繝域枚蟄励
Unicode縺ョ蝣エ蜷:
General_Category -- (Letter|Mark|Number|Connector_Punctuation)
\W 髱槫腰隱樊ァ区先枚蟄
\s 遨コ逋ス譁蟄
Unicode莉・螟悶ョ蝣エ蜷:
\t, \n, \v, \f, \r, \x20
Unicode縺ョ蝣エ蜷:
U+0009, U+000A, U+000B, U+000C, U+000D, U+0085(NEL),
General_Category -- Line_Separator
-- Paragraph_Separator
-- Space_Separator
\S 髱樒ゥコ逋ス譁蟄
\d 10騾イ謨ー蟄
Unicode縺ョ蝣エ蜷: General_Category -- Decimal_Number
\D 髱10騾イ謨ー蟄
\h 16騾イ謨ー蟄 [0-9a-fA-F]
\H 髱16騾イ謨ー蟄
\R 豎取隼陦 (* 譁蟄鈴寔蜷医ョ荳ュ縺ァ縺ッ菴ソ逕ィ縺ァ縺阪↑縺)
"\r\n" or \n,\v,\f,\r (* 菴縺 \r\n縺九i\r縺ォ縺ッ繝舌ャ繧ッ繝医Λ繝繧ッ縺励↑縺)
Unicode縺ョ蝣エ蜷:
"\r\n" or \n,\v,\f,\r or U+0085, U+2028, U+2029
\N 髱樊隼陦梧枚蟄 (?-m:.)
\O 逵滉ササ諢乗枚蟄 (?m:.) (* 蜴滉ス)
\X 諡。蠑オ譖ク險倡エ謌ソ (?>\O(?:\Y\O)*)
\X縺ッ辣ァ蜷医ョ髢句ァ倶ス咲スョ縺梧僑蠑オ譖ク險倡エ謌ソ縺ョ蠅逡後°縺ゥ縺縺九r遒コ隱阪@縺ェ縺縲
縺昴l繧堤「コ螳溘↓縺励◆縺代l縺ー縲―y\X縺ィ譖ク縺代ー濶ッ縺縲
Unicode縺ョ蝣エ蜷:
蜿らァ [Unicode Standard Annex #29: http://unicode.org/reports/tr29/]
Unicode莉・螟悶ョ蝣エ蜷: (?>\r\n|\O)
Character Property
* \p{property-name}
* \p{^property-name} (negative)
* \P{property-name} (negative)
property-name:
+ 蜈ィ縺ヲ縺ョ繧ィ繝ウ繧ウ繝シ繝繧」繝ウ繧ー縺ァ譛牙柑
Alnum, Alpha, Blank, Cntrl, Digit, Graph, Lower,
Print, Punct, Space, Upper, XDigit, Word, ASCII,
+ EUC-JP, Shift_JIS縺ァ譛牙柑
Hiragana, Katakana
+ UTF8, UTF16, UTF32縺ァ譛牙柑
doc/UNICODE_PROPERTIES蜿らァ
4. 驥乗欠螳壼ュ
谺イ蠑オ繧
? 荳蝗槭∪縺溘ッ髮カ蝗
* 髮カ蝗樔サ・荳
+ 荳蝗樔サ・荳
{n,m} n蝗樔サ・荳確蝗樔サ・荳
{n,} n蝗樔サ・荳
{,n} 髮カ蝗樔サ・荳穫蝗樔サ・荳 ({0,n})
{n} n蝗
辟。谺イ
?? 荳蝗槭∪縺溘ッ髮カ蝗
*? 髮カ蝗樔サ・荳
+? 荳蝗樔サ・荳
{n,m}? n蝗樔サ・荳確蝗樔サ・荳
{n,}? n蝗樔サ・荳
{,n}? 髮カ蝗樔サ・荳穫蝗樔サ・荳 (== {0,n}?)
蠑キ谺イ (谺イ蠑オ繧翫〒縲∫ケー繧願ソ斐@縺ォ謌仙粥縺励◆蠕後ッ蝗樊焚繧呈ク帙i縺吶h縺縺ェ蠕碁蜀崎ゥヲ陦後r縺励↑縺)
?+ 荳蝗槭∪縺溘ッ髮カ蝗
*+ 髮カ蝗樔サ・荳
++ 荳蝗樔サ・荳
({n,m}+, {n,}+, {n}+ 縺ッ縲^NIG_SYNTAX_JAVA縺ァ縺ョ縺ソ蠑キ谺イ縺ェ謖螳壼ュ)
萓. /a*+/ === /(?>a*)/
5. 骭ィ
^ 陦碁ュ
$ 陦梧忰
\b 蜊倩ェ槫「逡
\B 髱槫腰隱槫「逡
\y 諡。蠑オ譖ク險倡エ謌ソ 蠅逡
\Y 諡。蠑オ譖ク險倡エ謌ソ 髱槫「逡
\A 譁蟄怜怜磯ュ
\Z 譁蟄怜玲忰蟆セ縲√∪縺溘ッ譁蟄怜玲忰蟆セ縺ョ謾ケ陦後ョ逶エ蜑
\z 譁蟄怜玲忰蟆セ
\G 謗「邏「髢句ァ倶ス咲スョ
\K 菫晄戟 (邨先棡縺ョ髢句ァ倶ス咲スョ繧偵%縺ョ菴咲スョ縺ォ菫昴▽)
6. 譁蟄鈴寔蜷
^... 蜷ヲ螳 (譛菴主━蜈亥コヲ貍皮ョ怜ュ)
x-y 遽蝗イ (x縺九iy縺セ縺ァ)
[...] 髮蜷 (譁蟄鈴寔蜷亥譁蟄鈴寔蜷)
..&&.. 遨肴シ皮ョ (^縺ョ谺。縺ォ蜆ェ蜈亥コヲ縺御ス弱>貍皮ョ怜ュ)
萓. [a-w&&[^c-g]z] ==> ([a-w] and ([^c-g] or z)) ==> [abh-w]
窶サ '[', '-', ']'繧偵∵枚蟄鈴寔蜷亥縺ァ騾壼クク譁蟄励ョ諢丞袖縺ァ菴ソ逕ィ縺励◆縺蝣エ蜷医↓縺ッ縲
縺薙l繧峨ョ譁蟄励r'\'縺ァ騾驕ソ菫ョ鬟セ縺励↑縺代l縺ー縺ェ繧峨↑縺縲
POSIX繝悶Λ繧ア繝繝 ([:xxxxx:], 蜷ヲ螳 [:^xxxxx:])
Unicode莉・螟悶ョ蝣エ蜷:
alnum 闍ア謨ー蟄
alpha 闍ア蟄
ascii 0 - 127
blank \t, \x20
cntrl
digit 0-9
graph 螟壹ヰ繧、繝域枚蟄怜ィ驛ィ繧貞性繧
lower
print 螟壹ヰ繧、繝域枚蟄怜ィ驛ィ繧貞性繧
punct
space \t, \n, \v, \f, \r, \x20
upper
xdigit 0-9, a-f, A-F
word 闍ア謨ー蟄, "_" 縺翫h縺ウ 螟壹ヰ繧、繝域枚蟄
Unicode縺ョ蝣エ蜷:
alnum Letter | Mark | Decimal_Number
alpha Letter | Mark
ascii 0000 - 007F
blank Space_Separator | 0009
cntrl Control | Format | Unassigned | Private_Use | Surrogate
digit Decimal_Number
graph [[:^space:]] && ^Control && ^Unassigned && ^Surrogate
lower Lowercase_Letter
print [[:graph:]] | [[:space:]]
punct Connector_Punctuation | Dash_Punctuation | Close_Punctuation |
Final_Punctuation | Initial_Punctuation | Other_Punctuation |
Open_Punctuation
space Space_Separator | Line_Separator | Paragraph_Separator |
U+0009 | U+000A | U+000B | U+000C | U+000D | U+0085
upper Uppercase_Letter
xdigit U+0030 - U+0039 | U+0041 - U+0046 | U+0061 - U+0066
(0-9, a-f, A-F)
word Letter | Mark | Decimal_Number | Connector_Punctuation
7. 諡。蠑オ蠑城寔蜷
(?#...) 豕ィ驥
(?imxWDSP-imxWDSP) 蟄、遶九が繝励す繝ァ繝ウ
i: 螟ァ譁蟄怜ー乗枚蟄礼ァ蜷
m: 隍謨ー陦
x: 諡。蠑オ蠖「蠑
W: word縺窟SCII縺ョ縺ソ (\w, \p{Word}, [[:word:]])
word蠅逡後′ASCII縺ョ縺ソ (\b)
D: digit縺窟SCII縺ョ縺ソ (\d, \p{Digit}, [[:digit:]])
S: space縺窟SCII縺ョ縺ソ (\s, \p{Space}, [[:space:]])
P: POSIX繝励Ο繝代ユ繧」縺窟SCII縺ョ縺ソ (W,D,S繧貞ィ縺ヲ蜷ォ繧薙〒縺繧)
(alnum, alpha, blank, cntrl, digit, graph,
lower, print, punct, space, upper, xdigit, word)
(?imxWDSP-imxWDSP:蠑) 蠑上が繝励す繝ァ繝ウ
(蠑) 謐慕佐蠑城寔蜷
(?:蠑) 髱樊黒迯イ蠑城寔蜷
(?=蠑) 蜈郁ェュ縺ソ
(?!蠑) 蜷ヲ螳壼郁ェュ縺ソ
(?<=蠑) 謌サ繧願ェュ縺ソ
(?蠑) 蜴溷ュ千噪蠑城寔蜷
蠑丞ィ菴薙r騾夐℃縺励◆縺ィ縺阪∝シ上ョ荳ュ縺ァ縺ョ蠕碁蜀崎ゥヲ陦後r陦後↑繧上↑縺
(?蠑), (?'name'蠑)
蜷榊燕莉倥″謐慕佐蠑城寔蜷
蠑城寔蜷医↓蜷榊燕繧貞牡繧雁ス薙※繧(螳夂セゥ縺吶k)縲
(蜷榊燕縺ッ蜊倩ェ樊ァ区先枚蟄励〒縺ェ縺代l縺ー縺ェ繧峨↑縺縲)
蜷榊燕縺縺代〒縺ェ縺上∵黒迯イ蠑城寔蜷医→蜷梧ァ倥↓逡ェ蜿キ繧ょ牡繧雁ス薙※繧峨l繧九
逡ェ蜿キ謖螳壹′遖∵ュ「縺輔l縺ヲ縺縺ェ縺迥カ諷 (10. 謐慕佐蠑城寔蜷 繧貞盾辣ァ)
縺ョ縺ィ縺阪ッ縲∝錐蜑阪r菴ソ繧上↑縺縺ァ逡ェ蜿キ縺ァ繧ょ盾辣ァ縺ァ縺阪k縲
隍謨ー縺ョ蠑城寔蜷医↓蜷後§蜷榊燕繧剃ク弱∴繧九%縺ィ縺ッ險ア縺輔l縺ヲ縺繧九
縺薙ョ蝣エ蜷医↓縺ッ縲√%縺ョ蜷榊燕繧剃スソ逕ィ縺励◆蠕梧婿蜿らァ縺ッ蜿ッ閭ス縺ァ縺ゅk縺後
驛ィ蛻蠑丞他蜃コ縺励ッ縺ァ縺阪↑縺縲
<荳榊惠讖溯ス鄒、>
(?~荳榊惠蠑) 荳榊惠郢ー繧願ソ斐@ (*蜴滓。 逕ー荳ュ蜩イ)
縺薙l縺ッ.*(繧医j豁」遒コ縺ォ縺ッ\O*)縺ョ繧医≧縺ォ蜍穂ス懊☆繧九′縲<荳榊惠蠑>縺ォ
驕ゥ蜷医☆繧区枚蟄怜励r蜷ォ縺セ縺ェ縺遽蝗イ縺ォ蛻カ髯舌&繧後k縲
縺薙l縺ッ(?~|荳榊惠蠑楯\O*)縺ョ逵∫払陦ィ險倥〒縺ゅk縲
(?~|荳榊惠蠑楯蠑) 荳榊惠蠑 (* 蜴滉ス)
縺薙l縺ッ<蠑>縺ョ繧医≧縺ォ蜍穂ス懊☆繧九′縲<荳榊惠蠑>縺ォ驕ゥ蜷医☆繧区枚蟄怜励r
蜷ォ縺セ縺ェ縺遽蝗イ縺ォ蛻カ髯舌&繧後k縲
萓 (?~|345|\d*) "12345678" ==> "12", "1", ""
(?~|荳榊惠蠑) 荳榊惠蛛懈ュ「 (* 蜴滉ス)
縺薙ョ貍皮ョ怜ュ舌r騾夐℃縺励◆蠕後ッ縲∝ッセ雎。譁蟄怜励ョ驕ゥ蜷育ッ蝗イ縺ョ譛蠕後′
<荳榊惠蠑>縺ォ驕ゥ蜷医☆繧区枚蟄怜励r蜷ォ縺セ縺ェ縺遽蝗イ縺ォ蛻カ髯舌&繧後k縲
(?~|) 遽蝗イ豸亥悉
荳榊惠蛛懈ュ「縺ョ蜉ケ譫懊r豸医@縺ヲ縲∝晄悄迥カ諷九↓縺吶k縲
* 荳榊惠讖溯ス縺ョ蜈・繧悟ュ舌↓縺ッ蟇セ蠢懊@縺ヲ縺翫i縺壹∵嫌蜍輔ッ荳榊ョ壹→縺吶k縲
(?(譚。莉カ蠑)謌仙粥蠑楯螟ア謨怜シ) 譚。莉カ蠑上′謌仙粥縺吶l縺ー謌仙粥蠑上∝、ア謨励☆繧後ー螟ア謨怜シ上r螳溯。後☆繧
縺薙ョ讖溯ス縺ョ蟄伜惠逅逕ア縺ッ縲∵仙粥蠑上′螟ア謨励@縺ヲ繧ょ、ア謨怜シ上↓縺ッ
陦後°縺ェ縺縺薙→縲ゅ%繧後ッ莉悶ョ豁」隕剰。ィ迴セ縺ァ譖ク縺上%縺ィ縺後〒縺阪↑縺縲
繧ゅ≧縺イ縺ィ縺、縺ッ縲∵擅莉カ蠑上′蠕梧婿蜿らァ縺ョ逡ェ蜿キ/蜷榊燕縺ョ縺ィ縺阪
蠕梧婿蜿らァ蛟、縺ョ譛牙柑諤ァ繧定ェソ縺ケ繧(譁蟄怜励→辣ァ蜷医ッ縺励↑縺)
諢丞袖縺ォ縺ェ繧九
(?(譚。莉カ蠑)謌仙粥蠑) 譚。莉カ蠑上′謌仙粥縺吶l縺ー謌仙粥蠑上r螳溯。後☆繧
(譚。莉カ蠑上′騾壼クク縺ョ蠑上ョ縺ィ縺阪↓縺ッ縲√%縺ョ讒区枚縺ッ荳榊ソ隕√□縺
莉翫ョ縺ィ縺薙m繧ィ繝ゥ繝シ縺ォ縺ッ縺励↑縺縲)
譚。莉カ蠑上ッ蠕梧婿蜿らァ縺ョ逡ェ蜿キ/蜷榊燕縺セ縺溘ッ譎ョ騾壹ョ蠑上r菴ソ逕ィ縺ァ縺阪k縲
譚。莉カ蠑上′蠕梧婿蜿らァ縺ョ蝣エ蜷医∵仙粥蠑上→螟ア謨怜シ上ョ荳。譁ケ繧堤怐逡・蜿ッ閭ス縺ァ縺ゅj縲
縺薙ョ蝣エ蜷医∝セ梧婿蜿らァ蛟、譛牙柑諤ァ繧定ェソ縺ケ繧(謌仙粥/螟ア謨)讖溯ス縺ョ縺ソ縺ォ縺ェ繧九
[蠕梧婿蜿らァ蛟、譛牙柑諤ァ遒コ隱榊勣] (* 蜴滉ス)
(?(n)), (?(-n)), (?(+n)), (?(n+level)) ...
(?()), (?('-n')), (?(<+n>)) ...
(?()), (?('name')), (?()) ...
8. 蠕梧婿蜿らァ
\n 逡ェ蜿キ謖螳壼盾辣ァ (n >= 1)
\k 逡ェ蜿キ謖螳壼盾辣ァ (n >= 1)
\k'n' 逡ェ蜿キ謖螳壼盾辣ァ (n >= 1)
\k<-n> 逶ク蟇セ逡ェ蜿キ謖螳壼盾辣ァ (n >= 1)
\k'-n' 逶ク蟇セ逡ェ蜿キ謖螳壼盾辣ァ (n >= 1)
\k<+n> 逶ク蟇セ逡ェ蜿キ謖螳壼盾辣ァ (n >= 1)
\k'+n' 逶ク蟇セ逡ェ蜿キ謖螳壼盾辣ァ (n >= 1)
\k 蜷榊燕謖螳壼盾辣ァ
\k'name' 蜷榊燕謖螳壼盾辣ァ
蜷榊燕謖螳壼盾辣ァ縺ァ縲√◎縺ョ蜷榊燕縺瑚、謨ー縺ョ蠑城寔蜷医〒螟夐榊ョ夂セゥ縺輔l縺ヲ縺繧句エ蜷医↓縺ッ縲
逡ェ蜿キ縺ョ螟ァ縺阪>蠑城寔蜷医°繧牙━蜈育噪縺ォ蜿らァ縺輔l繧九
(繝槭ャ繝√@縺ェ縺縺ィ縺阪↓縺ッ逡ェ蜿キ縺ョ蟆上&縺蠑城寔蜷医′蜿らァ縺輔l繧)
窶サ 逡ェ蜿キ謖螳壼盾辣ァ縺ッ縲∝錐蜑堺サ倥″謐慕佐蠑城寔蜷医′螳夂セゥ縺輔l縲
縺九▽ ONIG_OPTION_CAPTURE_GROUP縺梧欠螳壹&繧後※縺縺ェ縺蝣エ蜷医↓縺ッ縲
遖∵ュ「縺輔l繧九(10. 謐慕佐蠑城寔蜷 繧貞盾辣ァ)
繝阪せ繝医Ξ繝吶Ν莉倥″蠕梧婿蜿らァ
level: 0, 1, 2, ...
\k (n >= 1)
\k (n >= 1)
\k'n+level' (n >= 1)
\k'n-level' (n >= 1)
\k
\k
\k'name+level'
\k'name-level'
蠕梧婿蜿らァ縺ョ菴咲スョ縺九i逶ク蟇セ逧縺ェ驛ィ蛻蠑丞他蜃コ縺励ロ繧ケ繝医Ξ繝吶Ν繧呈欠螳壹@縺ヲ縲√◎縺ョ繝ャ繝吶Ν縺ァ縺ョ
謐慕佐蛟、繧貞盾辣ァ縺吶k縲
萓-1.
/\A(?|.|(?:(?.)\g\k))\z/.match("reer")
萓-2.
r = Regexp.compile(<<'__REGEXP__'.strip, Regexp::EXTENDED)
(? \g \g* \g ){0}
(? < \g \s* > ){0}
(? [a-zA-Z_:]+ ){0}
(? [^<&]+ (\g | [^<&]+)* ){0}
(? \k >){0}
\g
__REGEXP__
p r.match('fbbbf').captures
9. 驛ィ蛻蠑丞他蜃コ縺 ("逕ー荳ュ蜩イ繧ケ繝壹す繝」繝ォ") (* 蜴滉ス)
\g 蜷榊燕謖螳壼他蜃コ縺
\g'name' 蜷榊燕謖螳壼他蜃コ縺
\g 逡ェ蜿キ謖螳壼他蜃コ縺 (n >= 1)
\g'n' 逡ェ蜿キ謖螳壼他蜃コ縺 (n >= 1)
\g<0> 逡ェ蜿キ謖螳壼他蜃コ縺(蜈ィ菴灘他縺ウ蜃コ縺)
\g'0' 逡ェ蜿キ謖螳壼他蜃コ縺(蜈ィ菴灘他縺ウ蜃コ縺)
\g<-n> 逶ク蟇セ逡ェ蜿キ謖螳壼他蜃コ縺 (n >= 1)
\g'-n' 逶ク蟇セ逡ェ蜿キ謖螳壼他蜃コ縺 (n >= 1)
\g<+n> 逶ク蟇セ逡ェ蜿キ謖螳壼他蜃コ縺 (n >= 1)
\g'+n' 逶ク蟇セ逡ェ蜿キ謖螳壼他蜃コ縺 (n >= 1)
窶サ 譛蟾ヲ菴咲スョ縺ァ縺ョ蜀榊クー蜻シ蜃コ縺励ッ遖∵ュ「縺輔l繧九
萓. (?a|\gb) => error
(?a|b\gc) => OK
窶サ 逡ェ蜿キ謖螳壼他蜃コ縺励ッ縲∝錐蜑堺サ倥″謐慕佐蠑城寔蜷医′螳夂セゥ縺輔l縲
縺九▽ ONIG_OPTION_CAPTURE_GROUP縺梧欠螳壹&繧後※縺縺ェ縺蝣エ蜷医↓縺ッ縲
遖∵ュ「縺輔l繧九 (10. 謐慕佐蠑城寔蜷 繧貞盾辣ァ)
窶サ 蜻シ縺ウ蜃コ縺輔l縺溷シ城寔蜷医ョ繧ェ繝励す繝ァ繝ウ迥カ諷九′蜻シ蜃コ縺怜エ縺ョ繧ェ繝励す繝ァ繝ウ迥カ諷九→逡ー縺ェ縺」縺ヲ縺繧
縺ィ縺阪∝他縺ウ蜃コ縺輔l縺溷エ縺ョ繧ェ繝励す繝ァ繝ウ迥カ諷九′譛牙柑縺ァ縺ゅk縲
萓. (?-i:\g)(?i:(?a)){0} 縺ッ "A" 縺ォ辣ァ蜷域仙粥縺吶k縲
10. 謐慕佐蠑城寔蜷
謐慕佐蠑城寔蜷(...)縺ッ縲∽サ・荳九ョ譚。莉カ縺ォ蠢懊§縺ヲ謖ッ闊槭′螟牙喧縺吶k縲
(蜷榊燕莉倥″謐慕佐蠑城寔蜷医ッ螟牙喧縺励↑縺)
case 1. /.../ (蜷榊燕莉倥″謐慕佐蠑城寔蜷医ッ荳堺スソ逕ィ縲√が繝励す繝ァ繝ウ縺ェ縺)
(...) 縺ッ縲∵黒迯イ蠑城寔蜷医→縺励※謇ア繧上l繧九
case 2. /.../g (蜷榊燕莉倥″謐慕佐蠑城寔蜷医ッ荳堺スソ逕ィ縲√が繝励す繝ァ繝ウ 'g'繧呈欠螳)
(...) 縺ッ縲髱樊黒迯イ蠑城寔蜷医→縺励※謇ア繧上l繧九
case 3. /..(?..)../ (蜷榊燕莉倥″謐慕佐蠑城寔蜷医ッ菴ソ逕ィ縲√が繝励す繝ァ繝ウ縺ェ縺)
(...) 縺ッ縲髱樊黒迯イ蠑城寔蜷医→縺励※謇ア繧上l繧九
逡ェ蜿キ謖螳壼盾辣ァ/蜻シ縺ウ蜃コ縺励ッ荳崎ィア蜿ッ縲
case 4. /..(?..)../G (蜷榊燕莉倥″謐慕佐蠑城寔蜷医ッ菴ソ逕ィ縲√が繝励す繝ァ繝ウ 'G'繧呈欠螳)
(...) 縺ッ縲∵黒迯イ蠑城寔蜷医→縺励※謇ア繧上l繧九
逡ェ蜿キ謖螳壼盾辣ァ/蜻シ縺ウ蜃コ縺励ッ險ア蜿ッ縲
菴縺
g: ONIG_OPTION_DONT_CAPTURE_GROUP
G: ONIG_OPTION_CAPTURE_GROUP
('g'縺ィ'G'繧ェ繝励す繝ァ繝ウ縺ッ縲〉uby-dev ML縺ァ隴ー隲悶&繧後◆縲)
縺薙l繧峨ョ謖ッ闊槭ョ諢丞袖縺ッ縲
蜷榊燕莉倥″謐慕佐縺ィ蜷榊燕辟。縺玲黒迯イ繧貞酔譎ゅ↓菴ソ逕ィ縺吶k蠢辟カ諤ァ縺ョ縺ゅk蝣エ髱「縺ッ蟆代↑縺縺ァ縺ゅm縺
縺ィ縺縺逅逕ア縺九i閠縺医i繧後◆繧ゅョ縺ァ縺ゅk縲
-----------------------------
陬懆ィ 1. 譁豕穂セ晏ュ倥が繝励す繝ァ繝ウ
+ ONIG_SYNTAX_ONIGURUMA
(?m): 邨よュ「隨ヲ險伜捷(.)縺ッ謾ケ陦後→辣ァ蜷域仙粥
+ ONIG_SYNTAX_PERL 縺ィ ONIG_SYNTAX_JAVA
(?s): 邨よュ「隨ヲ險伜捷(.)縺ッ謾ケ陦後→辣ァ蜷域仙粥
(?m): ^ 縺ッ謾ケ陦後ョ逶エ蠕後↓辣ァ蜷医☆繧九$ 縺ッ謾ケ陦後ョ逶エ蜑阪↓辣ァ蜷医☆繧
陬懆ィ 2. 迢ャ閾ェ諡。蠑オ讖溯ス
+ 16騾イ謨ー謨ー蟄励髱16騾イ謨ー蟄 \h, \H
+ 蜷榊燕莉倥″謐慕佐蠑城寔蜷 (?...), (?'name'...)
+ 蜷榊燕謖螳壼セ梧婿蜿らァ \k
+ 驛ィ蛻蠑丞他蜃コ縺 \g, \g
陬懆ィ 3. Perl 5.8.0縺ィ豈碑シ縺励※蟄伜惠縺励↑縺讖溯ス
+ \N{name}
+ \l,\u,\L,\U,\C
+ (?{code})
+ (??{code})
* \Q...\E
菴縺涌NIG_SYNTAX_PERL縺ィONIG_SYNTAX_JAVA縺ァ縺ッ譛牙柑
陬懆ィ 4. Ruby 1.8 縺ョ譌・譛ャ隱槫喧 GNU regex(version 0.12)縺ィ縺ョ驕輔>
+ 譁蟄猶roperty讖溯ス霑ス蜉 (\p{property}, \P{Property})
+ 16騾イ謨ー蟄励ち繧、繝苓ソス蜉 (\h, \H)
+ 謌サ繧願ェュ縺ソ讖溯ス繧定ソス蜉
+ 蠑キ谺イ縺ェ郢ー繧願ソ斐@謖螳壼ュ舌r霑ス蜉 (?+, *+, ++)
+ 譁蟄鈴寔蜷医ョ荳ュ縺ョ貍皮ョ怜ュ舌r霑ス蜉 ([...], &&)
('[' 縺ッ縲∵枚蟄鈴寔蜷医ョ荳ュ縺ァ騾壼クク縺ョ譁蟄励→縺励※菴ソ逕ィ縺吶k縺ィ縺阪↓縺ッ
騾驕ソ菫ョ鬟セ縺励↑縺代l縺ー縺ェ繧峨↑縺)
+ 蜷榊燕莉倥″謐慕佐蠑城寔蜷医→縲驛ィ蛻蠑丞他蜃コ縺玲ゥ溯ス霑ス蜉
+ 螟壹ヰ繧、繝域枚蟄励さ繝シ繝峨′謖螳壹&繧後※縺繧九→縺阪
譁蟄鈴寔蜷医ョ荳ュ縺ァ蜈ォ騾イ謨ー縺セ縺溘ッ蜊∝ュ騾イ謨ー陦ィ迴セ縺ョ騾」邯壹ッ縲∝、壹ヰ繧、繝育ャヲ蜿キ縺ァ陦ィ迴セ縺輔l縺
荳蛟九ョ譁蟄励→隗」驥医&繧後k
(萓. [\xa1\xa2], [\xa1\xa7-\xa4\xa1])
+ 譁蟄鈴寔蜷医ョ荳ュ縺ァ縲∽ク繝舌う繝域枚蟄励→螟壹ヰ繧、繝域枚蟄励ョ遽蝗イ謖螳壹ッ險ア縺輔l繧九
ex. /[a-縺]/
+ 蟄、遶九が繝励す繝ァ繝ウ縺ョ譛牙柑遽蝗イ縺ッ縲√◎縺ョ蟄、遶九が繝励す繝ァ繝ウ繧貞性繧薙〒縺繧句シ城寔蜷医ョ
邨ゅo繧翫∪縺ァ縺ァ縺ゅk
萓. (?:(?i)a|b) 縺ッ (?:(?i:a|b)) 縺ィ隗」驥医&繧後k縲(?:(?i:a)|b)縺ァ縺ッ縺ェ縺
+ 蟄、遶九が繝励す繝ァ繝ウ縺ッ縺昴ョ蜑阪ョ蠑上↓蟇セ縺励※騾城℃逧縺ァ縺ッ縺ェ縺
萓. /a(?i)*/ 縺ッ譁豕輔お繝ゥ繝シ縺ィ縺ェ繧
+ 荳榊ョ悟ィ縺ェ郢ー繧願ソ斐@遽蝗イ謖螳壼ュ舌ッ騾壼クク縺ョ譁蟄怜励→縺励※險ア蜿ッ縺輔l繧
萓. /{/, /({)/, /a{2,3/
+ 蜷ヲ螳夂噪POSIX繝悶Λ繧ア繝繝 [:^xxxx:] 繧定ソス蜉
+ POSIX繝悶Λ繧ア繝繝 [:ascii:] 繧定ソス蜉
+ 蜈郁ェュ縺ソ縺ョ郢ー繧願ソ斐@縺ッ荳崎ィア蜿ッ
萓. /(?=a)*/, /(?!b){5}/
+ 謨ー蛟、縺ァ謖螳壹&繧後◆譁蟄励↓蟇セ縺励※繧ゅ∝、ァ譁蟄怜ー乗枚蟄礼ァ蜷医が繝励す繝ァ繝ウ縺ッ譛牙柑
萓. /\x61/i =~ "A"
+ 郢ー繧願ソ斐@蝗樊焚謖螳壹〒縲∵怙菴主屓謨ー縺ョ逵∫払(0蝗)縺後〒縺阪k
/a{,n}/ == /a{0,n}/
譛菴主屓謨ー縺ィ譛螟ァ蝗樊焚縺ョ蜷梧凾逵∫払縺ッ險ア縺輔l縺ェ縺縲(/a{,}/)
+ /a{n}?/縺ッ辟。谺イ縺ェ貍皮ョ怜ュ舌〒縺ッ縺ェ縺縲
/a{n}?/ == /(?:a{n})?/
+ 辟。蜉ケ縺ェ蠕梧婿蜿らァ繧偵メ繧ァ繝繧ッ縺励※繧ィ繝ゥ繝シ縺ォ縺吶k縲
/\1/, /(a)\2/
+ 辟。髯千ケー繧願ソ斐@縺ョ荳ュ縺ァ縲髟キ縺暮峺縺ァ縺ョ辣ァ蜷域仙粥縺ッ郢ー繧願ソ斐@繧剃クュ譁ュ縺輔○繧九′縲
縺薙ョ縺ィ縺阪∽クュ譁ュ縺吶∋縺阪°縺ゥ縺縺九ョ蛻、螳壹→縺励※縲∵黒迯イ蠑城寔蜷医ョ謐慕佐迥カ諷九ョ
螟牙喧縺セ縺ァ閠諷ョ縺励※縺繧
/(?:()|())*\1\2/ =~ ""
/(?:\1a|())*/ =~ "a"
陬懆ィ 5. 螳溯」縺輔l縺ヲ縺繧九′縲∵里螳壼、縺ァ縺ッ譛牙柑縺ォ縺励※縺縺ェ縺讖溯ス
+ 謐慕佐螻・豁エ蜿らァ
(?@...) 縺ィ (?@...)
萓. /(?@a)*/.match("aaa") ==> [<0-1>, <1-2>, <2-3>]
菴ソ逕ィ譁ケ豕輔ッ縲《ample/listcap.c繧貞盾辣ァ
譛牙柑縺ォ縺励※縺縺ェ縺逅逕ア縺ッ縲√←縺ョ遞句コヲ蠖ケ縺ォ遶九▽縺九ッ縺」縺阪j縺励↑縺縺溘a縲
陬懆ィ 6. 蝠城。檎せ
+ 繧ィ繝ウ繧ウ繝シ繝繧」繝ウ繧ー繝舌う繝亥、縺碁←豁」縺ェ萓。縺九←縺縺九ョ繝√ぉ繝繧ッ縺ッ陦後↑縺」縺ヲ縺縺ェ縺縲
萓: UTF-8
* 蜈磯ュ繝舌う繝医→縺励※荳肴ュ」縺ェ繝舌う繝医r荳譁蟄励→縺ソ縺ェ縺
/./u =~ "\xa3"
* 荳榊ョ悟ィ縺ェ繝舌う繝医す繝シ繧ア繝ウ繧ケ縺ョ繝√ぉ繝繧ッ繧偵@縺ェ縺
/\w+/u =~ "a\xf3\x8ec"
縺薙l繧定ェソ縺ケ繧九%縺ィ縺ッ蜿ッ閭ス縺ァ縺ッ縺ゅk縺後驕縺上↑繧九ョ縺ァ陦後↑繧上↑縺縲
譁蟄怜励→縺励※縲√◎縺ョ繧医≧縺ェ繝舌う繝亥励r謖螳壹@縺溷エ蜷医ョ蜍穂ス懊ッ菫晁ィシ縺励↑縺縲
邨ゅj
oniguruma-6.7.0/doc/UNICODE_PROPERTIES 0000664 0000000 0000000 00000027723 13212423352 0017074 0 ustar 00root root 0000000 0000000 Unicode Properties (from Unicode Version: 8.0.0)
15: ASCII_Hex_Digit
16: Ahom
17: Alphabetic
18: Anatolian_Hieroglyphs
19: Any
20: Arabic
21: Armenian
22: Assigned
23: Avestan
24: Balinese
25: Bamum
26: Bassa_Vah
27: Batak
28: Bengali
29: Bidi_Control
30: Bopomofo
31: Brahmi
32: Braille
33: Buginese
34: Buhid
35: C
36: Canadian_Aboriginal
37: Carian
38: Case_Ignorable
39: Cased
40: Caucasian_Albanian
41: Cc
42: Cf
43: Chakma
44: Cham
45: Changes_When_Casefolded
46: Changes_When_Casemapped
47: Changes_When_Lowercased
48: Changes_When_Titlecased
49: Changes_When_Uppercased
50: Cherokee
51: Cn
52: Co
53: Common
54: Coptic
55: Cs
56: Cuneiform
57: Cypriot
58: Cyrillic
59: Dash
60: Default_Ignorable_Code_Point
61: Deprecated
62: Deseret
63: Devanagari
64: Diacritic
65: Duployan
66: Egyptian_Hieroglyphs
67: Elbasan
68: Ethiopic
69: Extender
70: Georgian
71: Glagolitic
72: Gothic
73: Grantha
74: Grapheme_Base
75: Grapheme_Extend
76: Grapheme_Link
77: Greek
78: Gujarati
79: Gurmukhi
80: Han
81: Hangul
82: Hanunoo
83: Hatran
84: Hebrew
85: Hex_Digit
86: Hiragana
87: Hyphen
88: IDS_Binary_Operator
89: IDS_Trinary_Operator
90: ID_Continue
91: ID_Start
92: Ideographic
93: Imperial_Aramaic
94: Inherited
95: Inscriptional_Pahlavi
96: Inscriptional_Parthian
97: Javanese
98: Join_Control
99: Kaithi
100: Kannada
101: Katakana
102: Kayah_Li
103: Kharoshthi
104: Khmer
105: Khojki
106: Khudawadi
107: L
108: LC
109: Lao
110: Latin
111: Lepcha
112: Limbu
113: Linear_A
114: Linear_B
115: Lisu
116: Ll
117: Lm
118: Lo
119: Logical_Order_Exception
120: Lowercase
121: Lt
122: Lu
123: Lycian
124: Lydian
125: M
126: Mahajani
127: Malayalam
128: Mandaic
129: Manichaean
130: Math
131: Mc
132: Me
133: Meetei_Mayek
134: Mende_Kikakui
135: Meroitic_Cursive
136: Meroitic_Hieroglyphs
137: Miao
138: Mn
139: Modi
140: Mongolian
141: Mro
142: Multani
143: Myanmar
144: N
145: Nabataean
146: Nd
147: New_Tai_Lue
148: Nko
149: Nl
150: No
151: Noncharacter_Code_Point
152: Ogham
153: Ol_Chiki
154: Old_Hungarian
155: Old_Italic
156: Old_North_Arabian
157: Old_Permic
158: Old_Persian
159: Old_South_Arabian
160: Old_Turkic
161: Oriya
162: Osmanya
163: Other_Alphabetic
164: Other_Default_Ignorable_Code_Point
165: Other_Grapheme_Extend
166: Other_ID_Continue
167: Other_ID_Start
168: Other_Lowercase
169: Other_Math
170: Other_Uppercase
171: P
172: Pahawh_Hmong
173: Palmyrene
174: Pattern_Syntax
175: Pattern_White_Space
176: Pau_Cin_Hau
177: Pc
178: Pd
179: Pe
180: Pf
181: Phags_Pa
182: Phoenician
183: Pi
184: Po
185: Ps
186: Psalter_Pahlavi
187: Quotation_Mark
188: Radical
189: Rejang
190: Runic
191: S
192: STerm
193: Samaritan
194: Saurashtra
195: Sc
196: Sharada
197: Shavian
198: Siddham
199: SignWriting
200: Sinhala
201: Sk
202: Sm
203: So
204: Soft_Dotted
205: Sora_Sompeng
206: Sundanese
207: Syloti_Nagri
208: Syriac
209: Tagalog
210: Tagbanwa
211: Tai_Le
212: Tai_Tham
213: Tai_Viet
214: Takri
215: Tamil
216: Telugu
217: Terminal_Punctuation
218: Thaana
219: Thai
220: Tibetan
221: Tifinagh
222: Tirhuta
223: Ugaritic
224: Unified_Ideograph
225: Unknown
226: Uppercase
227: Vai
228: Variation_Selector
229: Warang_Citi
230: White_Space
231: XID_Continue
232: XID_Start
233: Yi
234: Z
235: Zl
236: Zp
237: Zs
40: Aghb
15: AHex
20: Arab
93: Armi
21: Armn
23: Avst
24: Bali
25: Bamu
26: Bass
27: Batk
28: Beng
29: Bidi_C
30: Bopo
31: Brah
32: Brai
33: Bugi
34: Buhd
43: Cakm
36: Cans
37: Cari
108: Cased_Letter
50: Cher
38: CI
179: Close_Punctuation
125: Combining_Mark
177: Connector_Punctuation
41: Control
54: Copt
57: Cprt
195: Currency_Symbol
45: CWCF
46: CWCM
47: CWL
48: CWT
49: CWU
58: Cyrl
178: Dash_Punctuation
146: Decimal_Number
61: Dep
63: Deva
60: DI
64: Dia
62: Dsrt
65: Dupl
66: Egyp
67: Elba
132: Enclosing_Mark
68: Ethi
69: Ext
180: Final_Punctuation
42: Format
70: Geor
71: Glag
72: Goth
73: Gran
74: Gr_Base
77: Grek
75: Gr_Ext
76: Gr_Link
78: Gujr
79: Guru
81: Hang
80: Hani
82: Hano
83: Hatr
84: Hebr
85: Hex
86: Hira
18: Hluw
172: Hmng
154: Hung
90: IDC
92: Ideo
91: IDS
88: IDSB
89: IDST
183: Initial_Punctuation
155: Ital
97: Java
98: Join_C
102: Kali
101: Kana
103: Khar
104: Khmr
105: Khoj
100: Knda
99: Kthi
212: Lana
109: Laoo
110: Latn
111: Lepc
107: Letter
149: Letter_Number
112: Limb
113: Lina
114: Linb
235: Line_Separator
119: LOE
116: Lowercase_Letter
123: Lyci
124: Lydi
126: Mahj
128: Mand
129: Mani
125: Mark
202: Math_Symbol
134: Mend
135: Merc
136: Mero
127: Mlym
117: Modifier_Letter
201: Modifier_Symbol
140: Mong
141: Mroo
133: Mtei
142: Mult
143: Mymr
156: Narb
145: Nbat
151: NChar
148: Nkoo
138: Nonspacing_Mark
144: Number
163: OAlpha
164: ODI
152: Ogam
165: OGr_Ext
166: OIDC
167: OIDS
153: Olck
168: OLower
169: OMath
185: Open_Punctuation
160: Orkh
161: Orya
162: Osma
35: Other
118: Other_Letter
150: Other_Number
184: Other_Punctuation
203: Other_Symbol
170: OUpper
173: Palm
236: Paragraph_Separator
174: Pat_Syn
175: Pat_WS
176: Pauc
157: Perm
181: Phag
95: Phli
186: Phlp
182: Phnx
137: Plrd
52: Private_Use
96: Prti
171: Punctuation
54: Qaac
94: Qaai
187: QMark
189: Rjng
190: Runr
193: Samr
159: Sarb
194: Saur
204: SD
234: Separator
199: Sgnw
197: Shaw
196: Shrd
198: Sidd
106: Sind
200: Sinh
205: Sora
237: Space_Separator
131: Spacing_Mark
206: Sund
55: Surrogate
207: Sylo
191: Symbol
208: Syrc
210: Tagb
214: Takr
211: Tale
147: Talu
215: Taml
213: Tavt
216: Telu
217: Term
221: Tfng
209: Tglg
218: Thaa
220: Tibt
222: Tirh
121: Titlecase_Letter
223: Ugar
224: UIdeo
51: Unassigned
122: Uppercase_Letter
227: Vaii
228: VS
229: Wara
230: WSpace
231: XIDC
232: XIDS
158: Xpeo
56: Xsux
233: Yiii
94: Zinh
53: Zyyy
225: Zzzz
238: In_Basic_Latin
239: In_Latin_1_Supplement
240: In_Latin_Extended_A
241: In_Latin_Extended_B
242: In_IPA_Extensions
243: In_Spacing_Modifier_Letters
244: In_Combining_Diacritical_Marks
245: In_Greek_and_Coptic
246: In_Cyrillic
247: In_Cyrillic_Supplement
248: In_Armenian
249: In_Hebrew
250: In_Arabic
251: In_Syriac
252: In_Arabic_Supplement
253: In_Thaana
254: In_NKo
255: In_Samaritan
256: In_Mandaic
257: In_Arabic_Extended_A
258: In_Devanagari
259: In_Bengali
260: In_Gurmukhi
261: In_Gujarati
262: In_Oriya
263: In_Tamil
264: In_Telugu
265: In_Kannada
266: In_Malayalam
267: In_Sinhala
268: In_Thai
269: In_Lao
270: In_Tibetan
271: In_Myanmar
272: In_Georgian
273: In_Hangul_Jamo
274: In_Ethiopic
275: In_Ethiopic_Supplement
276: In_Cherokee
277: In_Unified_Canadian_Aboriginal_Syllabics
278: In_Ogham
279: In_Runic
280: In_Tagalog
281: In_Hanunoo
282: In_Buhid
283: In_Tagbanwa
284: In_Khmer
285: In_Mongolian
286: In_Unified_Canadian_Aboriginal_Syllabics_Extended
287: In_Limbu
288: In_Tai_Le
289: In_New_Tai_Lue
290: In_Khmer_Symbols
291: In_Buginese
292: In_Tai_Tham
293: In_Combining_Diacritical_Marks_Extended
294: In_Balinese
295: In_Sundanese
296: In_Batak
297: In_Lepcha
298: In_Ol_Chiki
299: In_Sundanese_Supplement
300: In_Vedic_Extensions
301: In_Phonetic_Extensions
302: In_Phonetic_Extensions_Supplement
303: In_Combining_Diacritical_Marks_Supplement
304: In_Latin_Extended_Additional
305: In_Greek_Extended
306: In_General_Punctuation
307: In_Superscripts_and_Subscripts
308: In_Currency_Symbols
309: In_Combining_Diacritical_Marks_for_Symbols
310: In_Letterlike_Symbols
311: In_Number_Forms
312: In_Arrows
313: In_Mathematical_Operators
314: In_Miscellaneous_Technical
315: In_Control_Pictures
316: In_Optical_Character_Recognition
317: In_Enclosed_Alphanumerics
318: In_Box_Drawing
319: In_Block_Elements
320: In_Geometric_Shapes
321: In_Miscellaneous_Symbols
322: In_Dingbats
323: In_Miscellaneous_Mathematical_Symbols_A
324: In_Supplemental_Arrows_A
325: In_Braille_Patterns
326: In_Supplemental_Arrows_B
327: In_Miscellaneous_Mathematical_Symbols_B
328: In_Supplemental_Mathematical_Operators
329: In_Miscellaneous_Symbols_and_Arrows
330: In_Glagolitic
331: In_Latin_Extended_C
332: In_Coptic
333: In_Georgian_Supplement
334: In_Tifinagh
335: In_Ethiopic_Extended
336: In_Cyrillic_Extended_A
337: In_Supplemental_Punctuation
338: In_CJK_Radicals_Supplement
339: In_Kangxi_Radicals
340: In_Ideographic_Description_Characters
341: In_CJK_Symbols_and_Punctuation
342: In_Hiragana
343: In_Katakana
344: In_Bopomofo
345: In_Hangul_Compatibility_Jamo
346: In_Kanbun
347: In_Bopomofo_Extended
348: In_CJK_Strokes
349: In_Katakana_Phonetic_Extensions
350: In_Enclosed_CJK_Letters_and_Months
351: In_CJK_Compatibility
352: In_CJK_Unified_Ideographs_Extension_A
353: In_Yijing_Hexagram_Symbols
354: In_CJK_Unified_Ideographs
355: In_Yi_Syllables
356: In_Yi_Radicals
357: In_Lisu
358: In_Vai
359: In_Cyrillic_Extended_B
360: In_Bamum
361: In_Modifier_Tone_Letters
362: In_Latin_Extended_D
363: In_Syloti_Nagri
364: In_Common_Indic_Number_Forms
365: In_Phags_pa
366: In_Saurashtra
367: In_Devanagari_Extended
368: In_Kayah_Li
369: In_Rejang
370: In_Hangul_Jamo_Extended_A
371: In_Javanese
372: In_Myanmar_Extended_B
373: In_Cham
374: In_Myanmar_Extended_A
375: In_Tai_Viet
376: In_Meetei_Mayek_Extensions
377: In_Ethiopic_Extended_A
378: In_Latin_Extended_E
379: In_Cherokee_Supplement
380: In_Meetei_Mayek
381: In_Hangul_Syllables
382: In_Hangul_Jamo_Extended_B
383: In_High_Surrogates
384: In_High_Private_Use_Surrogates
385: In_Low_Surrogates
386: In_Private_Use_Area
387: In_CJK_Compatibility_Ideographs
388: In_Alphabetic_Presentation_Forms
389: In_Arabic_Presentation_Forms_A
390: In_Variation_Selectors
391: In_Vertical_Forms
392: In_Combining_Half_Marks
393: In_CJK_Compatibility_Forms
394: In_Small_Form_Variants
395: In_Arabic_Presentation_Forms_B
396: In_Halfwidth_and_Fullwidth_Forms
397: In_Specials
398: In_Linear_B_Syllabary
399: In_Linear_B_Ideograms
400: In_Aegean_Numbers
401: In_Ancient_Greek_Numbers
402: In_Ancient_Symbols
403: In_Phaistos_Disc
404: In_Lycian
405: In_Carian
406: In_Coptic_Epact_Numbers
407: In_Old_Italic
408: In_Gothic
409: In_Old_Permic
410: In_Ugaritic
411: In_Old_Persian
412: In_Deseret
413: In_Shavian
414: In_Osmanya
415: In_Elbasan
416: In_Caucasian_Albanian
417: In_Linear_A
418: In_Cypriot_Syllabary
419: In_Imperial_Aramaic
420: In_Palmyrene
421: In_Nabataean
422: In_Hatran
423: In_Phoenician
424: In_Lydian
425: In_Meroitic_Hieroglyphs
426: In_Meroitic_Cursive
427: In_Kharoshthi
428: In_Old_South_Arabian
429: In_Old_North_Arabian
430: In_Manichaean
431: In_Avestan
432: In_Inscriptional_Parthian
433: In_Inscriptional_Pahlavi
434: In_Psalter_Pahlavi
435: In_Old_Turkic
436: In_Old_Hungarian
437: In_Rumi_Numeral_Symbols
438: In_Brahmi
439: In_Kaithi
440: In_Sora_Sompeng
441: In_Chakma
442: In_Mahajani
443: In_Sharada
444: In_Sinhala_Archaic_Numbers
445: In_Khojki
446: In_Multani
447: In_Khudawadi
448: In_Grantha
449: In_Tirhuta
450: In_Siddham
451: In_Modi
452: In_Takri
453: In_Ahom
454: In_Warang_Citi
455: In_Pau_Cin_Hau
456: In_Cuneiform
457: In_Cuneiform_Numbers_and_Punctuation
458: In_Early_Dynastic_Cuneiform
459: In_Egyptian_Hieroglyphs
460: In_Anatolian_Hieroglyphs
461: In_Bamum_Supplement
462: In_Mro
463: In_Bassa_Vah
464: In_Pahawh_Hmong
465: In_Miao
466: In_Kana_Supplement
467: In_Duployan
468: In_Shorthand_Format_Controls
469: In_Byzantine_Musical_Symbols
470: In_Musical_Symbols
471: In_Ancient_Greek_Musical_Notation
472: In_Tai_Xuan_Jing_Symbols
473: In_Counting_Rod_Numerals
474: In_Mathematical_Alphanumeric_Symbols
475: In_Sutton_SignWriting
476: In_Mende_Kikakui
477: In_Arabic_Mathematical_Alphabetic_Symbols
478: In_Mahjong_Tiles
479: In_Domino_Tiles
480: In_Playing_Cards
481: In_Enclosed_Alphanumeric_Supplement
482: In_Enclosed_Ideographic_Supplement
483: In_Miscellaneous_Symbols_and_Pictographs
484: In_Emoticons
485: In_Ornamental_Dingbats
486: In_Transport_and_Map_Symbols
487: In_Alchemical_Symbols
488: In_Geometric_Shapes_Extended
489: In_Supplemental_Arrows_C
490: In_Supplemental_Symbols_and_Pictographs
491: In_CJK_Unified_Ideographs_Extension_B
492: In_CJK_Unified_Ideographs_Extension_C
493: In_CJK_Unified_Ideographs_Extension_D
494: In_CJK_Unified_Ideographs_Extension_E
495: In_CJK_Compatibility_Ideographs_Supplement
496: In_Tags
497: In_Variation_Selectors_Supplement
498: In_Supplementary_Private_Use_Area_A
499: In_Supplementary_Private_Use_Area_B
500: In_No_Block
oniguruma-6.7.0/index.html 0000664 0000000 0000000 00000020037 13212423352 0015526 0 ustar 00root root 0000000 0000000
Oniguruma
Oniguruma
(Japanese)
(c) K.Kosako, updated at: 2017/12/08
- What's new
- 2017/12/11: Version 6.7.0 released.
- 2017/08/30: Version 6.6.1 released.
- 2017/08/28: Version 6.6.0 released.
- 2017/08/03: Version 6.5.0 released.
- 2017/07/03: Version 6.4.0 released.
- 2017/05/29: Version 6.3.0 released.
- 2017/04/08: Version 6.2.0 released.
- 2016/12/11: Version 6.1.3 released.
Oniguruma is a regular expressions library.
The characteristics of this library is that different character encoding
for every regular expression object can be specified.
(supported APIs: GNU regex, POSIX and Oniguruma native)
- Supported character encodings:
ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
EUC-JP, EUC-TW, EUC-KR, EUC-CN,
Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
(GB18030 encoding was contributed by KUBO Takehiro)
(CP1251 encoding was contributed by Byte)
License: BSD license.
- Platform:
- Unix (include Mac OS X)
- Cygwin
- Win32
Maintainer of 2.x was changed to Hannes Wyss <hwyss AT ywesee.com>.
About 2.x, please contact him.
* 5.x supports Unicode Property/Script.
* 2.x supports Ruby1.6/1.8.
- Documents: (version 6.1.0)
- Sample Programs:
- Site Links:
- Links:
- References:
and I'm thankful to Akinori MUSHA.
- Other Libraries:
oniguruma-6.7.0/index_ja.html 0000664 0000000 0000000 00000020170 13212423352 0016176 0 ustar 00root root 0000000 0000000
鬯シ霆
鬯シ霆
(c) K.Kosako, 譛邨よ峩譁ー: 2017/12/08
- 譖エ譁ー諠蝣ア
- 2017/12/11: Version 6.7.0 繝ェ繝ェ繝シ繧ケ
- 2017/08/30: Version 6.6.1 繝ェ繝ェ繝シ繧ケ
- 2017/08/28: Version 6.6.0 繝ェ繝ェ繝シ繧ケ
- 2017/08/03: Version 6.5.0 繝ェ繝ェ繝シ繧ケ
- 2017/07/03: Version 6.4.0 繝ェ繝ェ繝シ繧ケ
- 2017/05/29: Version 6.3.0 繝ェ繝ェ繝シ繧ケ
- 2017/04/08: Version 6.2.0 繝ェ繝ェ繝シ繧ケ
- 2016/12/11: Version 6.1.3 繝ェ繝ェ繝シ繧ケ
鬯シ霆翫ッ豁」隕剰。ィ迴セ繝ゥ繧、繝悶Λ繝ェ縺ァ縺ゅk縲
縺薙ョ繝ゥ繧、繝悶Λ繝ェ縺ョ迚ケ蠕エ縺ッ縲√◎繧後◇繧後ョ豁」隕剰。ィ迴セ繧ェ繝悶ず繧ァ繧ッ繝医#縺ィ縺ォ逡ー縺ェ繧区枚蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー繧
謖螳壹〒縺阪k縺薙→縲
(API: GNU regex, POSIX and Oniguruma native)
- 蟇セ蠢懊@縺ヲ縺繧区枚蟄励お繝ウ繧ウ繝シ繝繧」繝ウ繧ー:
ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
EUC-JP, EUC-TW, EUC-KR, EUC-CN,
Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
(GB18030縺ッ縲゜UBO Takehiro豌乗署萓)
(CP1251縺ッ縲。yte豌乗署萓)
繝ゥ繧、繧サ繝ウ繧ケ:BSD繝ゥ繧、繧サ繝ウ繧ケ
- 繝励Λ繝繝医ヵ繧ゥ繝シ繝:
- Unix (Mac OS X繧貞性繧)
- Cygwin
- Win32
2.x縺ョ菫晏ョ域球蠖薙ッ縲?annes Wyss <hwyss AT ywesee.com>縺ォ莠、譖ソ縺励∪縺励◆縲
2.x縺ォ縺、縺縺ヲ縺ッ縲∝スシ縺ォ騾」邨。縺励※縺上□縺輔>縲
* 5.x縺ッUnicode Property/Script繧呈署萓
* 2.x縺ッRuby1.6/1.8邨霎シ縺ソ繝ゥ繧、繝悶Λ繝ェ縺ィ縺励※蜍穂ス懊☆繧九 (2006蟷エ譛ォ縺ァ菫晏ョ医r邨ゆコ)
- 繝峨く繝・繝。繝ウ繝: (version 6.1.0)
- 繧オ繝ウ繝励Ν繝励Ο繧ー繝ゥ繝:
- 繧オ繧、繝:
- 繝ェ繝ウ繧ッ:
- 蜿り雉譁:
and I'm thankful to Akinori MUSHA.
- 莉悶ョ繝ゥ繧、繝悶Λ繝ェ:
繝帙シ繝縺ォ繧ゅ←繧
oniguruma-6.7.0/install-sh 0000775 0000000 0000000 00000035463 13212423352 0015546 0 ustar 00root root 0000000 0000000 #!/bin/sh
# install - install a program, script, or datafile
scriptversion=2014-09-12.12; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
tab=' '
nl='
'
IFS=" $tab$nl"
# Set DOITPROG to "echo" to test this script.
doit=${DOITPROG-}
doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t)
is_target_a_directory=always
dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
# We allow the use of options -d and -T together, by making -d
# take the precedence; this is for compatibility with GNU install.
if test -n "$dir_arg"; then
if test -n "$dst_arg"; then
echo "$0: target directory not allowed when installing a directory." >&2
exit 1
fi
fi
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
if test $# -gt 1 || test "$is_target_a_directory" = always; then
if test ! -d "$dst_arg"; then
echo "$0: $dst_arg: Is not a directory." >&2
exit 1
fi
fi
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
# $RANDOM is not portable (e.g. dash); use it when possible to
# lower collision chance
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
# As "mkdir -p" follows symlinks and we work in /tmp possibly; so
# create the $tmpdir first (and fail if unsuccessful) to make sure
# that nobody tries to guess the $tmpdir name.
if (umask $mkdir_umask &&
$mkdirprog $mkdir_mode "$tmpdir" &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
test_tmpdir="$tmpdir/a"
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
oIFS=$IFS
IFS=/
set -f
set fnord $dstdir
shift
set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
oniguruma-6.7.0/m4/ 0000775 0000000 0000000 00000000000 13212423352 0014047 5 ustar 00root root 0000000 0000000 oniguruma-6.7.0/m4/.whatever 0000664 0000000 0000000 00000000000 13212423352 0015663 0 ustar 00root root 0000000 0000000 oniguruma-6.7.0/make_win32.bat 0000664 0000000 0000000 00000000101 13212423352 0016146 0 ustar 00root root 0000000 0000000 cd src
copy config.h.win32 config.h
nmake -f Makefile.windows
oniguruma-6.7.0/make_win64.bat 0000664 0000000 0000000 00000000101 13212423352 0016153 0 ustar 00root root 0000000 0000000 cd src
copy config.h.win64 config.h
nmake -f Makefile.windows
oniguruma-6.7.0/missing 0000775 0000000 0000000 00000015330 13212423352 0015130 0 ustar 00root root 0000000 0000000 #! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
case $1 in
--is-lightweight)
# Used by our autoconf macros to check whether the available missing
# script is modern enough.
exit 0
;;
--run)
# Back-compat with the calling convention used by older automake.
shift
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Supported PROGRAM values:
aclocal autoconf autoheader autom4te automake makeinfo
bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
Send bug reports to ."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
# Run the given program, remember its exit status.
"$@"; st=$?
# If it succeeded, we are done.
test $st -eq 0 && exit 0
# Also exit now if we it failed (or wasn't found), and '--version' was
# passed; such an option is passed most likely to detect whether the
# program is present and works.
case $2 in --version|--help) exit $st;; esac
# Exit code 63 means version mismatch. This often happens when the user
# tries to use an ancient version of a tool on a file that requires a
# minimum version.
if test $st -eq 63; then
msg="probably too old"
elif test $st -eq 127; then
# Program was missing.
msg="missing on your system"
else
# Program was found and executed, but failed. Give up.
exit $st
fi
perl_URL=http://www.perl.org/
flex_URL=http://flex.sourceforge.net/
gnu_software_URL=http://www.gnu.org/software
program_details ()
{
case $1 in
aclocal|automake)
echo "The '$1' program is part of the GNU Automake package:"
echo "<$gnu_software_URL/automake>"
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/autoconf>"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
autoconf|autom4te|autoheader)
echo "The '$1' program is part of the GNU Autoconf package:"
echo "<$gnu_software_URL/autoconf/>"
echo "It also requires GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
esac
}
give_advice ()
{
# Normalize program name to check for.
normalized_program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
printf '%s\n' "'$1' is $msg."
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
case $normalized_program in
autoconf*)
echo "You should only need it if you modified 'configure.ac',"
echo "or m4 files included by it."
program_details 'autoconf'
;;
autoheader*)
echo "You should only need it if you modified 'acconfig.h' or"
echo "$configure_deps."
program_details 'autoheader'
;;
automake*)
echo "You should only need it if you modified 'Makefile.am' or"
echo "$configure_deps."
program_details 'automake'
;;
aclocal*)
echo "You should only need it if you modified 'acinclude.m4' or"
echo "$configure_deps."
program_details 'aclocal'
;;
autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
echo "You should only need it if you modified a '.y' file."
echo "You may want to install the GNU Bison package:"
echo "<$gnu_software_URL/bison/>"
;;
lex*|flex*)
echo "You should only need it if you modified a '.l' file."
echo "You may want to install the Fast Lexical Analyzer package:"
echo "<$flex_URL>"
;;
help2man*)
echo "You should only need it if you modified a dependency" \
"of a man page."
echo "You may want to install the GNU Help2man package:"
echo "<$gnu_software_URL/help2man/>"
;;
makeinfo*)
echo "You should only need it if you modified a '.texi' file, or"
echo "any other file indirectly affecting the aspect of the manual."
echo "You might want to install the Texinfo package:"
echo "<$gnu_software_URL/texinfo/>"
echo "The spurious makeinfo call might also be the consequence of"
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
echo "want to install GNU make:"
echo "<$gnu_software_URL/make/>"
;;
*)
echo "You might have modified some files without having the proper"
echo "tools for further handling them. Check the 'README' file, it"
echo "often tells you about the needed prerequisites for installing"
echo "this package. You may also peek at any GNU archive site, in"
echo "case some other package contains this missing '$1' program."
;;
esac
}
give_advice "$1" | sed -e '1s/^/WARNING: /' \
-e '2,$s/^/ /' >&2
# Propagate the correct exit status (expected to be 127 for a program
# not found, 63 for a program that failed due to version mismatch).
exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
oniguruma-6.7.0/onig-config.in 0000664 0000000 0000000 00000002537 13212423352 0016265 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Copyright (C) 2006 K.Kosako
ONIG_VERSION=@PACKAGE_VERSION@
show_usage()
{
cat <