Ruby 1.9.2p136(2010-12-25revision30365)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# enc/us_ascii.c

Go to the documentation of this file.

    00001 #include "regenc.h"
    00002
    00003 static int
    00004 us_ascii_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc)
    00005 {
    00006     if (*p & 0x80)
    00007         return ONIGENC_CONSTRUCT_MBCLEN_INVALID();
    00008     return ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1);
    00009 }
    00010
    00011 OnigEncodingDefine(us_ascii, US_ASCII) = {
    00012   us_ascii_mbc_enc_len,
    00013   "US-ASCII",/* name */
    00014   1,           /* max byte length */
    00015   1,           /* min byte length */
    00016   onigenc_is_mbc_newline_0x0a,
    00017   onigenc_single_byte_mbc_to_code,
    00018   onigenc_single_byte_code_to_mbclen,
    00019   onigenc_single_byte_code_to_mbc,
    00020   onigenc_ascii_mbc_case_fold,
    00021   onigenc_ascii_apply_all_case_fold,
    00022   onigenc_ascii_get_case_fold_codes_by_str,
    00023   onigenc_minimum_property_name_to_ctype,
    00024   onigenc_ascii_is_code_ctype,
    00025   onigenc_not_support_get_ctype_code_range,
    00026   onigenc_single_byte_left_adjust_char_head,
    00027   onigenc_always_true_is_allowed_reverse_match
    00028 };
    00029 ENC_ALIAS("ASCII", "US-ASCII")
    00030 ENC_ALIAS("ANSI_X3.4-1968", "US-ASCII")
    00031 ENC_ALIAS("646", "US-ASCII")
    00032