diff options
author | ksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-05 15:31:51 +0000 |
---|---|---|
committer | ksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-05 15:31:51 +0000 |
commit | 5770336f8be4ac6dbdff43587fda2b508d3786de (patch) | |
tree | d75456ec841c8a8d8eba9c3a4d25b39243c56ef6 /ascii.c | |
parent | 33a06e4acac0cb7f080436507e06c82de45f7b9b (diff) |
Initial revision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ascii.c')
-rw-r--r-- | ascii.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/ascii.c b/ascii.c new file mode 100644 index 0000000000..44cc78f77c --- /dev/null +++ b/ascii.c @@ -0,0 +1,54 @@ +/********************************************************************** + + ascii.c - Oniguruma (regular expression library) + + Copyright (C) 2003-2004 K.Kosako ([email protected]) + +**********************************************************************/ +#include "regenc.h" + +static int +ascii_code_is_ctype(OnigCodePoint code, unsigned int ctype) +{ + if (code < 128) + return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype); + else + return FALSE; +} + +OnigEncodingType OnigEncodingASCII = { + { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + }, + "US-ASCII", /* name */ + 1, /* max byte length */ + FALSE, /* is_fold_match */ + ONIGENC_CTYPE_SUPPORT_LEVEL_SB, /* ctype_support_level */ + TRUE, /* is continuous sb mb codepoint */ + onigenc_single_byte_mbc_to_code, + onigenc_single_byte_code_to_mbclen, + onigenc_single_byte_code_to_mbc, + onigenc_ascii_mbc_to_lower, + onigenc_ascii_mbc_is_case_ambig, + ascii_code_is_ctype, + onigenc_nothing_get_ctype_code_range, + onigenc_single_byte_left_adjust_char_head, + onigenc_single_byte_is_allowed_reverse_match, + onigenc_nothing_get_all_fold_match_code, + onigenc_nothing_get_fold_match_info +}; |