diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-17 07:42:23 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-17 07:42:23 +0000 |
commit | 0424e152c684a85f4b0691f1e84aec203115333d (patch) | |
tree | ccb4af1c7fa12a09934f315edba0b9d839e57ceb /regenc.h | |
parent | 5362e7fcddf70d16fc4261383f99175c90881353 (diff) |
* Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
https://github.com/k-takata/Onigmo
cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h
cp oniguruma.h
cp tool/enc-unicode.rb
cp -r enc/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regenc.h')
-rw-r--r-- | regenc.h | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1,10 +1,11 @@ #ifndef ONIGURUMA_REGENC_H #define ONIGURUMA_REGENC_H /********************************************************************** - regenc.h - Oniguruma (regular expression library) + regenc.h - Onigmo (Oniguruma-mod) (regular expression library) **********************************************************************/ /*- * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp> + * Copyright (c) 2011 K.Takata <kentkt AT csc DOT jp> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -107,10 +108,10 @@ typedef struct { #define PosixBracketEntryInit(name, ctype) {(const UChar *)name, ctype, (short int)(sizeof(name) - 1)} -/* #define USE_CRNL_AS_LINE_TERMINATOR */ +#define USE_CRNL_AS_LINE_TERMINATOR #define USE_UNICODE_PROPERTIES /* #define USE_UNICODE_CASE_FOLD_TURKISH_AZERI */ -/* #define USE_UNICODE_ALL_LINE_TERMINATORS */ /* see Unicode.org UTF#18 */ +/* #define USE_UNICODE_ALL_LINE_TERMINATORS */ /* see Unicode.org UTS #18 */ #define ONIG_ENCODING_INIT_DEFAULT ONIG_ENCODING_ASCII @@ -170,6 +171,8 @@ ONIG_EXTERN const UChar OnigEncISO_8859_1_ToUpperCaseTable[]; ONIG_EXTERN int onigenc_with_ascii_strncmp P_((OnigEncoding enc, const UChar* p, const UChar* end, const UChar* sascii /* ascii */, int n)); +ONIG_EXTERN int +onigenc_with_ascii_strnicmp P_((OnigEncoding enc, const UChar* p, const UChar* end, const UChar* sascii /* ascii */, int n)); ONIG_EXTERN UChar* onigenc_step P_((OnigEncoding enc, const UChar* p, const UChar* end, int n)); @@ -190,6 +193,11 @@ ONIG_EXTERN const unsigned short OnigEncAsciiCtypeTable[]; (ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_UPPER) ||\ ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_LOWER)) +/* Check if the code is in the range. (from <= code && code <= to) */ +#define ONIGENC_IS_IN_RANGE(code, from, to) \ + ((OnigCodePoint )((code) - (from)) <= (OnigCodePoint )((to) - (from))) + + #ifdef ONIG_ENC_REGISTER extern int ONIG_ENC_REGISTER(const char *, OnigEncodingType*); #define OnigEncodingName(n) encoding_##n |