Ejemplo n.º 1
0
static int
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
{
  UChar *s = p, *e = end;
  const struct enc_property *prop = onig_jis_property((const char *)s, (unsigned int)(e-s));

  if (!prop) {
    return onigenc_minimum_property_name_to_ctype(enc, s, e);
  }

  return (int)prop->ctype;
}
Ejemplo n.º 2
0
static int
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
{
  st_data_t ctype;

  PROPERTY_LIST_INIT_CHECK;

  if (onig_st_lookup_strend(PropertyNameTable, p, end, &ctype) == 0) {
    return onigenc_minimum_property_name_to_ctype(enc, p, end);
  }

  return ctype;
}
Ejemplo n.º 3
0
static int
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
{
  hash_data_type ctype;
  UChar *s, *e;

  PROPERTY_LIST_INIT_CHECK;

  s = e = ALLOCA_N(UChar, end-p+1);
  for (; p < end; p++) {
    *e++ = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
  }

  if (onig_st_lookup_strend(PropertyNameTable, s, e, &ctype) == 0) {
    return onigenc_minimum_property_name_to_ctype(enc, s, e);
  }

  return (int)ctype;
}