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
+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
+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
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().
+ dead-lock in onig_end().
2006/05/11: [dist] update index.html.
2006/05/08: Version 4.0.3
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: [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
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
+ utf-8 character comments in extended mode leads
invalid result.
ex. /(?x)(?<= # <any-utf-8 multibyte char>o\n~) /
fix onigenc_unicode_is_code_ctype() and
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(),
+ 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().
remove oniggnu.h from make 19.
2005/03/01: [bug] (thanks matz) [ruby-dev:25778]
uninitialized member (OptEnv.backrefed_status)
- was used.
+ was used.
2005/02/19: Version 3.7.0
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
+ 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().
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
+ 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/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,
+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.
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_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/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.
+ ex. /^(x?y)/ = "xy" fail.
2003/09/17: Version 1.9.4
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().
+ in parse_char_class().
2003/08/19: Version 1.9.3
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: [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)
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
+ 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
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: [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/06/12: [spec] add syntax behavior REG_SYN_WARN_FOR_CC_OP_NOT_ESCAPEED.
2003/06/12: [spec] invalid POSIX bracket should be error. ex. [[:upper :]]
2003/06/11: [new] char-class in char-class (as Java(TM)).
-2003/06/11: [spec] change AND operator in char-class from &&[..] to &&.
+2003/06/11: [spec] change AND operator in char-class from &&[..] to &&.
2003/06/04: [spec] {n,m}+ should not be possessive operator.
ex. a{3}+ should be (?:a{3})+
2003/06/03: [bug] should compare strings with min-length in is_not_included().
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.
+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/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
+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
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
+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.
ex. /(?:abc){10}/
2002/03/06: [new] add a symbol REG_TRANSTABLE_USE_DEFAULT in regex.h.
2002/03/06: [impl] rename RegDefaultCharCode to RegDefaultCharEncoding.
-2002/03/06: [bug] if pattern has NULL(\000) char, infinite loop happens
+2002/03/06: [bug] if pattern has NULL(\000) char, infinite loop happens
in ScanMakeNode(). (beware of strchr(). thanks Nobu)
2002/03/06: [bug] range argument of ForwardSearchRange() is wrong.
ex. /\A.a/, /\G.a/ mismatched with "aa". (thanks Nobu)
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
+ 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,
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
+ 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,
dnl default value for STATISTICS
STATISTICS=""
AC_ARG_WITH(statistics,
- [ --with-statistics take matching time statistical data],
+ [ --with-statistics take matching time statistical data],
[ STATISTICS=-DONIG_DEBUG_STATISTICS ])
AC_SUBST(STATISTICS)
-clean:
+clean:
rm -f $(TARGETS)
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
+ ci->case_fold_flag: character matching case fold bit flag for
ONIG_OPTION_IGNORECASE mode.
ONIGENC_CASE_FOLD_MIN: minimum
\t, \n, \v, \f, \r, \x20
Unicodeの場合:
- U+0009, U+000A, U+000B, U+000C, U+000D, U+0085(NEL),
+ U+0009, U+000A, U+000B, U+000C, U+000D, U+0085(NEL),
General_Category -- Line_Separator
-- Paragraph_Separator
-- Space_Separator
case "$1" in
-*=*) val=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
;;
- *) val=
+ *) val=
;;
esac
* crnl.c 2007/05/30 K.Kosako
*
* !!! You should enable USE_CRNL_AS_LINE_TERMINATOR. !!!
- *
+ *
* USE_CRNL_AS_LINE_TERMINATOR config test program.
*/
#include <stdio.h>
/* enable capture hostory */
onig_copy_syntax(&syn, ONIG_SYNTAX_DEFAULT);
- onig_set_syntax_op2(&syn,
+ onig_set_syntax_op2(&syn,
onig_get_syntax_op2(&syn) | ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY);
r = ex(str1, pattern1, &syn);
p++;
break;
}
- }
+ }
}
len = enclen(ONIG_ENCODING_BIG5, p);
if (p + len > s) return (UChar* )p;
#if 1
if (enclen(ONIG_ENCODING_EUC_JP, buf) != (p - buf))
return ONIGERR_INVALID_CODE_POINT_VALUE;
-#endif
+#endif
return (int )(p - buf);
}
for (i = 0; i < item_num; i++) {
snode = onig_node_new_str(NULL, NULL);
if (IS_NULL(snode)) goto mem_err;
-
+
for (j = 0; j < items[i].code_len; j++) {
len = ONIGENC_CODE_TO_MBC(reg->enc, items[i].code[j], buf);
if (len < 0) {
{
/* 1000 / (min-max-dist + 1) */
static const short int dist_vals[] = {
- 1000, 500, 333, 250, 200, 167, 143, 125, 111, 100,
- 91, 83, 77, 71, 67, 63, 59, 56, 53, 50,
- 48, 45, 43, 42, 40, 38, 37, 36, 34, 33,
- 32, 31, 30, 29, 29, 28, 27, 26, 26, 25,
- 24, 24, 23, 23, 22, 22, 21, 21, 20, 20,
- 20, 19, 19, 19, 18, 18, 18, 17, 17, 17,
- 16, 16, 16, 16, 15, 15, 15, 15, 14, 14,
- 14, 14, 14, 14, 13, 13, 13, 13, 13, 13,
- 12, 12, 12, 12, 12, 12, 11, 11, 11, 11,
+ 1000, 500, 333, 250, 200, 167, 143, 125, 111, 100,
+ 91, 83, 77, 71, 67, 63, 59, 56, 53, 50,
+ 48, 45, 43, 42, 40, 38, 37, 36, 34, 33,
+ 32, 31, 30, 29, 29, 28, 27, 26, 26, 25,
+ 24, 24, 23, 23, 22, 22, 21, 21, 20, 20,
+ 20, 19, 19, 19, 18, 18, 18, 17, 17, 17,
+ 16, 16, 16, 16, 15, 15, 15, 15, 14, 14,
+ 14, 14, 14, 14, 13, 13, 13, 13, 13, 13,
+ 12, 12, 12, 12, 12, 12, 11, 11, 11, 11,
11, 11, 11, 11, 11, 10, 10, 10, 10, 10
};
reg->exact = onigenc_strdup(reg->enc, e->s, e->s + e->len);
CHECK_NULL_RETURN_MEMERR(reg->exact);
reg->exact_end = reg->exact + e->len;
-
+
allow_reverse =
ONIGENC_IS_ALLOWED_REVERSE_MATCH(reg->enc, reg->exact, reg->exact_end);
{
int n = 0;
UChar* q = (UChar* )p;
-
+
while (q < end) {
q += ONIGENC_MBC_ENC_LEN(enc, q);
n++;
{
int n = 0;
UChar* p = (UChar* )s;
-
+
while (1) {
if (*p == '\0') {
UChar* q;
#define ONIGENC_IS_ASCII_CODE_CASE_AMBIG(code) \
(ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_UPPER) ||\
ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_LOWER))
-
+
#define ONIGENC_IS_UNICODE_ENCODING(enc) \
(((enc)->flag & ENC_FLAG_UNICODE) != 0)
onig_error_code_to_str(s, code, va_alist)
UChar* s;
int code;
- va_dcl
+ va_dcl
#endif
{
UChar *p, *q;
onig_region_resize_clear(OnigRegion* region, int n)
{
int r;
-
+
r = onig_region_resize(region, n);
if (r != 0) return r;
onig_region_clear(region);
return 0;
}
-
+
extern int
onig_region_set(OnigRegion* region, int at, int beg, int end)
{
int r = onig_region_resize(region, at + 1);
if (r < 0) return r;
}
-
+
region->beg[at] = beg;
region->end[at] = end;
return 0;
ONIG_SYN_OP2_CCLASS_SET_OP | ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL |
ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META | ONIG_SYN_OP2_ESC_V_VTAB |
ONIG_SYN_OP2_ESC_H_XDIGIT | ONIG_SYN_OP2_ESC_U_HEX4 )
- , ( SYN_GNU_REGEX_BV |
+ , ( SYN_GNU_REGEX_BV |
ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV |
ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND |
ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP |
ONIG_SYN_OP2_CCLASS_SET_OP | ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL |
ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META | ONIG_SYN_OP2_ESC_V_VTAB |
ONIG_SYN_OP2_ESC_H_XDIGIT | ONIG_SYN_OP2_ESC_U_HEX4 )
- , ( SYN_GNU_REGEX_BV |
+ , ( SYN_GNU_REGEX_BV |
ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV |
ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND |
ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP |
else {
r = make_absent_tail(&ns[5], &ns[6], id1, env);
if (r != 0) goto err;
-
+
x = make_list(7, ns);
if (IS_NULL(x)) goto err0;
}
r = ONIGERR_MEMORY;
err:
for (i = 0; i < 7; i++) onig_node_free(ns[i]);
- return r;
+ return r;
}
extern int
OnigCodePoint x;
UChar *q;
UChar *p = from;
-
+
while (p < to) {
x = ONIGENC_MBC_TO_CODE(enc, p, to);
q = p + enclen(enc, p);
goto skip_backref;
}
- if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_DECIMAL_BACKREF) &&
+ if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_DECIMAL_BACKREF) &&
(num <= env->num_mem || num <= 9)) { /* This spec. from GNU regex */
if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {
if (num > env->num_mem || IS_NULL(SCANENV_MEMENV(env)[num].node))
ONIG_SYN_OP_BRACE_INTERVAL |
ONIG_SYN_OP_PLUS_ONE_INF | ONIG_SYN_OP_QMARK_ZERO_ONE | ONIG_SYN_OP_VBAR_ALT )
, 0
- , ( ONIG_SYN_CONTEXT_INDEP_ANCHORS |
- ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS |
+ , ( ONIG_SYN_CONTEXT_INDEP_ANCHORS |
+ ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS |
ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP |
ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC )
, ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE )
const UChar** pp, const UChar* end)
{
return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_SJIS, flag, pp, end);
-
+
}
#endif
p++;
break;
}
- }
+ }
}
len = enclen(ONIG_ENCODING_SJIS, p);
if (p + len > s) return (UChar* )p;