diff options
author | ksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-13 01:54:52 +0000 |
---|---|---|
committer | ksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-13 01:54:52 +0000 |
commit | 7049aeb893d9bc9b7205e2f70581760cb54091ab (patch) | |
tree | cd11abe5bd68146ddbf7ad300bde58907d261fab | |
parent | 2e3d3bb91681a9f916f862a05ebc9736a15e3dda (diff) |
* oniggnu.h, oniguruma.h, regcomp.c, st.c: imported Oni Guruma 3.6.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | oniguruma.h | 26 | ||||
-rw-r--r-- | regcomp.c | 18 | ||||
-rw-r--r-- | st.c | 1 |
4 files changed, 43 insertions, 7 deletions
@@ -1,3 +1,8 @@ +Sun Feb 13 10:53:08 2005 Kazuo Saito <ksaito@uranus.dti.ne.jp> + + * oniggnu.h, oniguruma.h, regcomp.c, st.c: imported + Oni Guruma 3.6.0. + Sun Feb 13 01:33:19 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp> * lib/erb.rb (ERB::Util.h, u): make it module_function. diff --git a/oniguruma.h b/oniguruma.h index 95cd109384..69dd939e5b 100644 --- a/oniguruma.h +++ b/oniguruma.h @@ -29,10 +29,14 @@ * SUCH DAMAGE. */ +#ifdef __cplusplus +extern "C" { +#endif + #define ONIGURUMA #define ONIGURUMA_VERSION_MAJOR 3 -#define ONIGURUMA_VERSION_MINOR 5 -#define ONIGURUMA_VERSION_TEENY 4 +#define ONIGURUMA_VERSION_MINOR 6 +#define ONIGURUMA_VERSION_TEENY 0 #ifdef __cplusplus # ifndef HAVE_PROTOTYPES @@ -82,6 +86,10 @@ typedef unsigned int OnigDistance; #define ONIG_INFINITE_DISTANCE ~((OnigDistance )0) /* ambiguous match flag */ +typedef unsigned int OnigAmbigType; + +ONIG_EXTERN OnigAmbigType OnigDefaultAmbigFlag; + #define ONIGENC_AMBIGUOUS_MATCH_NONE 0 #define ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE (1<<0) #define ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE (1<<1) @@ -96,12 +104,8 @@ typedef unsigned int OnigDistance; ( ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE | \ ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE | \ ONIGENC_AMBIGUOUS_MATCH_COMPOUND ) -#define ONIGENC_AMBIGUOUS_MATCH_DEFAULT \ - (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE | \ - ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE | \ - ONIGENC_AMBIGUOUS_MATCH_COMPOUND ) +#define ONIGENC_AMBIGUOUS_MATCH_DEFAULT OnigDefaultAmbigFlag -typedef unsigned int OnigAmbigType; #define ONIGENC_MAX_COMP_AMBIG_CODE_LEN 3 #define ONIGENC_MAX_COMP_AMBIG_CODE_ITEM_NUM 4 @@ -851,6 +855,10 @@ int onig_set_meta_char P_((OnigEncoding enc, unsigned int what, OnigCodePoint co ONIG_EXTERN void onig_copy_encoding P_((OnigEncoding to, OnigEncoding from)); ONIG_EXTERN +OnigAmbigType onig_get_default_ambig_flag P_(()); +ONIG_EXTERN +int onig_set_default_ambig_flag P_((OnigAmbigType ambig_flag)); +ONIG_EXTERN unsigned int onig_get_match_stack_limit_size P_((void)); ONIG_EXTERN int onig_set_match_stack_limit_size P_((unsigned int size)); @@ -861,4 +869,8 @@ const char* onig_version P_((void)); ONIG_EXTERN const char* onig_copyright P_((void)); +#ifdef __cplusplus +} +#endif + #endif /* ONIGURUMA_H */ @@ -29,6 +29,24 @@ #include "regparse.h" +OnigAmbigType OnigDefaultAmbigFlag = + (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE | + ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE); + +extern OnigAmbigType +onig_get_default_ambig_flag() +{ + return OnigDefaultAmbigFlag; +} + +extern int +onig_set_default_ambig_flag(OnigAmbigType ambig_flag) +{ + OnigDefaultAmbigFlag = ambig_flag; + return 0; +} + + #ifndef PLATFORM_UNALIGNED_WORD_ACCESS static unsigned char PadBuf[WORD_ALIGNMENT_SIZE]; #endif @@ -246,6 +246,7 @@ st_free_table(table) ptr = table->bins[i]; while (ptr != 0) { next = ptr->next; + table->type->key_free(ptr->key); free(ptr); ptr = next; } |