~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to enc/us_ascii.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "regenc.h"
 
2
 
 
3
extern int
 
4
mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc)
 
5
{
 
6
    if (*p & 0x80)
 
7
        return ONIGENC_CONSTRUCT_MBCLEN_INVALID();
 
8
    return ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(1);
 
9
}
 
10
 
 
11
OnigEncodingDefine(us_ascii, US_ASCII) = {
 
12
  mbc_enc_len,
 
13
  "US-ASCII",/* name */
 
14
  1,           /* max byte length */
 
15
  1,           /* min byte length */
 
16
  onigenc_is_mbc_newline_0x0a,
 
17
  onigenc_single_byte_mbc_to_code,
 
18
  onigenc_single_byte_code_to_mbclen,
 
19
  onigenc_single_byte_code_to_mbc,
 
20
  onigenc_ascii_mbc_case_fold,
 
21
  onigenc_ascii_apply_all_case_fold,
 
22
  onigenc_ascii_get_case_fold_codes_by_str,
 
23
  onigenc_minimum_property_name_to_ctype,
 
24
  onigenc_ascii_is_code_ctype,
 
25
  onigenc_not_support_get_ctype_code_range,
 
26
  onigenc_single_byte_left_adjust_char_head,
 
27
  onigenc_always_true_is_allowed_reverse_match
 
28
};