1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

iso_8859.h: SHARP_s

* enc/iso_8859.h (SHARP_s): name frequently used codepoint.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-06-11 02:24:38 +00:00
parent 9fa8b80550
commit 2d2b6460f4
17 changed files with 61 additions and 28 deletions

View file

@ -1,3 +1,7 @@
Sat Jun 11 11:24:36 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enc/iso_8859.h (SHARP_s): name frequently used codepoint.
Sat Jun 11 09:58:45 2016 Martin Duerst <duerst@it.aoyama.ac.jp> Sat Jun 11 09:58:45 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
* enc/iso_8859_1.c: Revert to older version of code. * enc/iso_8859_1.c: Revert to older version of code.

View file

@ -272,12 +272,14 @@ enc/gbk.$(OBJEXT): oniguruma.h
enc/iso_8859_1.$(OBJEXT): $(top_srcdir)/regenc.h enc/iso_8859_1.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_1.$(OBJEXT): config.h enc/iso_8859_1.$(OBJEXT): config.h
enc/iso_8859_1.$(OBJEXT): defines.h enc/iso_8859_1.$(OBJEXT): defines.h
enc/iso_8859_1.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_1.$(OBJEXT): enc/iso_8859_1.c enc/iso_8859_1.$(OBJEXT): enc/iso_8859_1.c
enc/iso_8859_1.$(OBJEXT): missing.h enc/iso_8859_1.$(OBJEXT): missing.h
enc/iso_8859_1.$(OBJEXT): oniguruma.h enc/iso_8859_1.$(OBJEXT): oniguruma.h
enc/iso_8859_10.$(OBJEXT): $(top_srcdir)/regenc.h enc/iso_8859_10.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_10.$(OBJEXT): config.h enc/iso_8859_10.$(OBJEXT): config.h
enc/iso_8859_10.$(OBJEXT): defines.h enc/iso_8859_10.$(OBJEXT): defines.h
enc/iso_8859_10.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_10.$(OBJEXT): enc/iso_8859_10.c enc/iso_8859_10.$(OBJEXT): enc/iso_8859_10.c
enc/iso_8859_10.$(OBJEXT): missing.h enc/iso_8859_10.$(OBJEXT): missing.h
enc/iso_8859_10.$(OBJEXT): oniguruma.h enc/iso_8859_10.$(OBJEXT): oniguruma.h
@ -290,42 +292,49 @@ enc/iso_8859_11.$(OBJEXT): oniguruma.h
enc/iso_8859_13.$(OBJEXT): $(top_srcdir)/regenc.h enc/iso_8859_13.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_13.$(OBJEXT): config.h enc/iso_8859_13.$(OBJEXT): config.h
enc/iso_8859_13.$(OBJEXT): defines.h enc/iso_8859_13.$(OBJEXT): defines.h
enc/iso_8859_13.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_13.$(OBJEXT): enc/iso_8859_13.c enc/iso_8859_13.$(OBJEXT): enc/iso_8859_13.c
enc/iso_8859_13.$(OBJEXT): missing.h enc/iso_8859_13.$(OBJEXT): missing.h
enc/iso_8859_13.$(OBJEXT): oniguruma.h enc/iso_8859_13.$(OBJEXT): oniguruma.h
enc/iso_8859_14.$(OBJEXT): $(top_srcdir)/regenc.h enc/iso_8859_14.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_14.$(OBJEXT): config.h enc/iso_8859_14.$(OBJEXT): config.h
enc/iso_8859_14.$(OBJEXT): defines.h enc/iso_8859_14.$(OBJEXT): defines.h
enc/iso_8859_14.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_14.$(OBJEXT): enc/iso_8859_14.c enc/iso_8859_14.$(OBJEXT): enc/iso_8859_14.c
enc/iso_8859_14.$(OBJEXT): missing.h enc/iso_8859_14.$(OBJEXT): missing.h
enc/iso_8859_14.$(OBJEXT): oniguruma.h enc/iso_8859_14.$(OBJEXT): oniguruma.h
enc/iso_8859_15.$(OBJEXT): $(top_srcdir)/regenc.h enc/iso_8859_15.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_15.$(OBJEXT): config.h enc/iso_8859_15.$(OBJEXT): config.h
enc/iso_8859_15.$(OBJEXT): defines.h enc/iso_8859_15.$(OBJEXT): defines.h
enc/iso_8859_15.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_15.$(OBJEXT): enc/iso_8859_15.c enc/iso_8859_15.$(OBJEXT): enc/iso_8859_15.c
enc/iso_8859_15.$(OBJEXT): missing.h enc/iso_8859_15.$(OBJEXT): missing.h
enc/iso_8859_15.$(OBJEXT): oniguruma.h enc/iso_8859_15.$(OBJEXT): oniguruma.h
enc/iso_8859_16.$(OBJEXT): $(top_srcdir)/regenc.h enc/iso_8859_16.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_16.$(OBJEXT): config.h enc/iso_8859_16.$(OBJEXT): config.h
enc/iso_8859_16.$(OBJEXT): defines.h enc/iso_8859_16.$(OBJEXT): defines.h
enc/iso_8859_16.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_16.$(OBJEXT): enc/iso_8859_16.c enc/iso_8859_16.$(OBJEXT): enc/iso_8859_16.c
enc/iso_8859_16.$(OBJEXT): missing.h enc/iso_8859_16.$(OBJEXT): missing.h
enc/iso_8859_16.$(OBJEXT): oniguruma.h enc/iso_8859_16.$(OBJEXT): oniguruma.h
enc/iso_8859_2.$(OBJEXT): $(top_srcdir)/regenc.h enc/iso_8859_2.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_2.$(OBJEXT): config.h enc/iso_8859_2.$(OBJEXT): config.h
enc/iso_8859_2.$(OBJEXT): defines.h enc/iso_8859_2.$(OBJEXT): defines.h
enc/iso_8859_2.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_2.$(OBJEXT): enc/iso_8859_2.c enc/iso_8859_2.$(OBJEXT): enc/iso_8859_2.c
enc/iso_8859_2.$(OBJEXT): missing.h enc/iso_8859_2.$(OBJEXT): missing.h
enc/iso_8859_2.$(OBJEXT): oniguruma.h enc/iso_8859_2.$(OBJEXT): oniguruma.h
enc/iso_8859_3.$(OBJEXT): $(top_srcdir)/regenc.h enc/iso_8859_3.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_3.$(OBJEXT): config.h enc/iso_8859_3.$(OBJEXT): config.h
enc/iso_8859_3.$(OBJEXT): defines.h enc/iso_8859_3.$(OBJEXT): defines.h
enc/iso_8859_3.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_3.$(OBJEXT): enc/iso_8859_3.c enc/iso_8859_3.$(OBJEXT): enc/iso_8859_3.c
enc/iso_8859_3.$(OBJEXT): missing.h enc/iso_8859_3.$(OBJEXT): missing.h
enc/iso_8859_3.$(OBJEXT): oniguruma.h enc/iso_8859_3.$(OBJEXT): oniguruma.h
enc/iso_8859_4.$(OBJEXT): $(top_srcdir)/regenc.h enc/iso_8859_4.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_4.$(OBJEXT): config.h enc/iso_8859_4.$(OBJEXT): config.h
enc/iso_8859_4.$(OBJEXT): defines.h enc/iso_8859_4.$(OBJEXT): defines.h
enc/iso_8859_4.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_4.$(OBJEXT): enc/iso_8859_4.c enc/iso_8859_4.$(OBJEXT): enc/iso_8859_4.c
enc/iso_8859_4.$(OBJEXT): missing.h enc/iso_8859_4.$(OBJEXT): missing.h
enc/iso_8859_4.$(OBJEXT): oniguruma.h enc/iso_8859_4.$(OBJEXT): oniguruma.h
@ -356,6 +365,7 @@ enc/iso_8859_8.$(OBJEXT): oniguruma.h
enc/iso_8859_9.$(OBJEXT): $(top_srcdir)/regenc.h enc/iso_8859_9.$(OBJEXT): $(top_srcdir)/regenc.h
enc/iso_8859_9.$(OBJEXT): config.h enc/iso_8859_9.$(OBJEXT): config.h
enc/iso_8859_9.$(OBJEXT): defines.h enc/iso_8859_9.$(OBJEXT): defines.h
enc/iso_8859_9.$(OBJEXT): enc/iso_8859.h
enc/iso_8859_9.$(OBJEXT): enc/iso_8859_9.c enc/iso_8859_9.$(OBJEXT): enc/iso_8859_9.c
enc/iso_8859_9.$(OBJEXT): missing.h enc/iso_8859_9.$(OBJEXT): missing.h
enc/iso_8859_9.$(OBJEXT): oniguruma.h enc/iso_8859_9.$(OBJEXT): oniguruma.h
@ -609,24 +619,28 @@ enc/us_ascii.$(OBJEXT): oniguruma.h
enc/utf_16be.$(OBJEXT): $(top_srcdir)/regenc.h enc/utf_16be.$(OBJEXT): $(top_srcdir)/regenc.h
enc/utf_16be.$(OBJEXT): config.h enc/utf_16be.$(OBJEXT): config.h
enc/utf_16be.$(OBJEXT): defines.h enc/utf_16be.$(OBJEXT): defines.h
enc/utf_16be.$(OBJEXT): enc/iso_8859.h
enc/utf_16be.$(OBJEXT): enc/utf_16be.c enc/utf_16be.$(OBJEXT): enc/utf_16be.c
enc/utf_16be.$(OBJEXT): missing.h enc/utf_16be.$(OBJEXT): missing.h
enc/utf_16be.$(OBJEXT): oniguruma.h enc/utf_16be.$(OBJEXT): oniguruma.h
enc/utf_16le.$(OBJEXT): $(top_srcdir)/regenc.h enc/utf_16le.$(OBJEXT): $(top_srcdir)/regenc.h
enc/utf_16le.$(OBJEXT): config.h enc/utf_16le.$(OBJEXT): config.h
enc/utf_16le.$(OBJEXT): defines.h enc/utf_16le.$(OBJEXT): defines.h
enc/utf_16le.$(OBJEXT): enc/iso_8859.h
enc/utf_16le.$(OBJEXT): enc/utf_16le.c enc/utf_16le.$(OBJEXT): enc/utf_16le.c
enc/utf_16le.$(OBJEXT): missing.h enc/utf_16le.$(OBJEXT): missing.h
enc/utf_16le.$(OBJEXT): oniguruma.h enc/utf_16le.$(OBJEXT): oniguruma.h
enc/utf_32be.$(OBJEXT): $(top_srcdir)/regenc.h enc/utf_32be.$(OBJEXT): $(top_srcdir)/regenc.h
enc/utf_32be.$(OBJEXT): config.h enc/utf_32be.$(OBJEXT): config.h
enc/utf_32be.$(OBJEXT): defines.h enc/utf_32be.$(OBJEXT): defines.h
enc/utf_32be.$(OBJEXT): enc/iso_8859.h
enc/utf_32be.$(OBJEXT): enc/utf_32be.c enc/utf_32be.$(OBJEXT): enc/utf_32be.c
enc/utf_32be.$(OBJEXT): missing.h enc/utf_32be.$(OBJEXT): missing.h
enc/utf_32be.$(OBJEXT): oniguruma.h enc/utf_32be.$(OBJEXT): oniguruma.h
enc/utf_32le.$(OBJEXT): $(top_srcdir)/regenc.h enc/utf_32le.$(OBJEXT): $(top_srcdir)/regenc.h
enc/utf_32le.$(OBJEXT): config.h enc/utf_32le.$(OBJEXT): config.h
enc/utf_32le.$(OBJEXT): defines.h enc/utf_32le.$(OBJEXT): defines.h
enc/utf_32le.$(OBJEXT): enc/iso_8859.h
enc/utf_32le.$(OBJEXT): enc/utf_32le.c enc/utf_32le.$(OBJEXT): enc/utf_32le.c
enc/utf_32le.$(OBJEXT): missing.h enc/utf_32le.$(OBJEXT): missing.h
enc/utf_32le.$(OBJEXT): oniguruma.h enc/utf_32le.$(OBJEXT): oniguruma.h

1
enc/iso_8859.h Normal file
View file

@ -0,0 +1 @@
#define SHARP_s 0xdf

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#define ENC_IS_ISO_8859_1_CTYPE(code,ctype) \ #define ENC_IS_ISO_8859_1_CTYPE(code,ctype) \
((EncISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) ((EncISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
@ -125,7 +126,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
&& (*(p+1) == 0x53 || *(p+1) == 0x73)) { /* SS */ && (*(p+1) == 0x53 || *(p+1) == 0x73)) { /* SS */
items[1].byte_len = 2; items[1].byte_len = 2;
items[1].code_len = 1; items[1].code_len = 1;
items[1].code[0] = (OnigCodePoint )0xdf; items[1].code[0] = (OnigCodePoint )SHARP_s;
return 2; return 2;
} }
else else
@ -139,7 +140,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
&& (*(p+1) == 0x73 || *(p+1) == 0x53)) { /* ss */ && (*(p+1) == 0x73 || *(p+1) == 0x53)) { /* ss */
items[1].byte_len = 2; items[1].byte_len = 2;
items[1].code_len = 1; items[1].code_len = 1;
items[1].code[0] = (OnigCodePoint )0xdf; items[1].code[0] = (OnigCodePoint )SHARP_s;
return 2; return 2;
} }
else else
@ -152,7 +153,7 @@ get_case_fold_codes_by_str(OnigCaseFoldType flag,
return 1; return 1;
} }
else if (0xd0 <= *p && *p <= 0xdf) { else if (0xd0 <= *p && *p <= 0xdf) {
if (*p == 0xdf) { if (*p == SHARP_s) {
items[0].byte_len = 1; items[0].byte_len = 1;
items[0].code_len = 2; items[0].code_len = 2;
items[0].code[0] = (OnigCodePoint )'s'; items[0].code[0] = (OnigCodePoint )'s';
@ -206,7 +207,7 @@ mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end ARG_UNUS
{ {
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's'; *lower++ = 's';
*lower = 's'; *lower = 's';
(*pp)++; (*pp)++;
@ -226,7 +227,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
int v; int v;
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++; (*pp)++;
return TRUE; return TRUE;
} }
@ -266,7 +267,7 @@ case_map (OnigCaseFoldType* flagP, const OnigUChar** pp,
while (*pp<end && to<to_end) { while (*pp<end && to<to_end) {
code = *(*pp)++; code = *(*pp)++;
if (code==0xdf) { /* sharp s */ if (code==SHARP_s) {
if (flags&ONIGENC_CASE_UPCASE) { if (flags&ONIGENC_CASE_UPCASE) {
flags |= ONIGENC_CASE_MODIFIED; flags |= ONIGENC_CASE_MODIFIED;
*to++ = 'S'; *to++ = 'S';

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#define ENC_ISO_8859_10_TO_LOWER_CASE(c) EncISO_8859_10_ToLowerCaseTable[c] #define ENC_ISO_8859_10_TO_LOWER_CASE(c) EncISO_8859_10_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_10_CTYPE(code,ctype) \ #define ENC_IS_ISO_8859_10_CTYPE(code,ctype) \
@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{ {
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's'; *lower++ = 's';
*lower = 's'; *lower = 's';
(*pp)++; (*pp)++;
@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v; int v;
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++; (*pp)++;
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#define ENC_ISO_8859_13_TO_LOWER_CASE(c) EncISO_8859_13_ToLowerCaseTable[c] #define ENC_ISO_8859_13_TO_LOWER_CASE(c) EncISO_8859_13_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_13_CTYPE(code,ctype) \ #define ENC_IS_ISO_8859_13_CTYPE(code,ctype) \
@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{ {
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's'; *lower++ = 's';
*lower = 's'; *lower = 's';
(*pp)++; (*pp)++;
@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v; int v;
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++; (*pp)++;
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#define ENC_ISO_8859_14_TO_LOWER_CASE(c) EncISO_8859_14_ToLowerCaseTable[c] #define ENC_ISO_8859_14_TO_LOWER_CASE(c) EncISO_8859_14_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_14_CTYPE(code,ctype) \ #define ENC_IS_ISO_8859_14_CTYPE(code,ctype) \
@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{ {
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's'; *lower++ = 's';
*lower = 's'; *lower = 's';
(*pp)++; (*pp)++;
@ -130,7 +131,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
int v; int v;
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++; (*pp)++;
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#define ENC_ISO_8859_15_TO_LOWER_CASE(c) EncISO_8859_15_ToLowerCaseTable[c] #define ENC_ISO_8859_15_TO_LOWER_CASE(c) EncISO_8859_15_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_15_CTYPE(code,ctype) \ #define ENC_IS_ISO_8859_15_CTYPE(code,ctype) \
@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{ {
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's'; *lower++ = 's';
*lower = 's'; *lower = 's';
(*pp)++; (*pp)++;
@ -130,7 +131,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag,
int v; int v;
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++; (*pp)++;
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#define ENC_ISO_8859_16_TO_LOWER_CASE(c) EncISO_8859_16_ToLowerCaseTable[c] #define ENC_ISO_8859_16_TO_LOWER_CASE(c) EncISO_8859_16_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_16_CTYPE(code,ctype) \ #define ENC_IS_ISO_8859_16_CTYPE(code,ctype) \
@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{ {
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's'; *lower++ = 's';
*lower = 's'; *lower = 's';
(*pp)++; (*pp)++;
@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v; int v;
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++; (*pp)++;
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#define ENC_ISO_8859_2_TO_LOWER_CASE(c) EncISO_8859_2_ToLowerCaseTable[c] #define ENC_ISO_8859_2_TO_LOWER_CASE(c) EncISO_8859_2_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_2_CTYPE(code,ctype) \ #define ENC_IS_ISO_8859_2_CTYPE(code,ctype) \
@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{ {
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's'; *lower++ = 's';
*lower = 's'; *lower = 's';
(*pp)++; (*pp)++;
@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v; int v;
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++; (*pp)++;
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#define ENC_ISO_8859_3_TO_LOWER_CASE(c) EncISO_8859_3_ToLowerCaseTable[c] #define ENC_ISO_8859_3_TO_LOWER_CASE(c) EncISO_8859_3_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_3_CTYPE(code,ctype) \ #define ENC_IS_ISO_8859_3_CTYPE(code,ctype) \
@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{ {
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's'; *lower++ = 's';
*lower = 's'; *lower = 's';
(*pp)++; (*pp)++;
@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v; int v;
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++; (*pp)++;
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#define ENC_ISO_8859_4_TO_LOWER_CASE(c) EncISO_8859_4_ToLowerCaseTable[c] #define ENC_ISO_8859_4_TO_LOWER_CASE(c) EncISO_8859_4_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_4_CTYPE(code,ctype) \ #define ENC_IS_ISO_8859_4_CTYPE(code,ctype) \
@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{ {
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's'; *lower++ = 's';
*lower = 's'; *lower = 's';
(*pp)++; (*pp)++;
@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v; int v;
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++; (*pp)++;
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#define ENC_ISO_8859_9_TO_LOWER_CASE(c) EncISO_8859_9_ToLowerCaseTable[c] #define ENC_ISO_8859_9_TO_LOWER_CASE(c) EncISO_8859_9_ToLowerCaseTable[c]
#define ENC_IS_ISO_8859_9_CTYPE(code,ctype) \ #define ENC_IS_ISO_8859_9_CTYPE(code,ctype) \
@ -110,7 +111,7 @@ mbc_case_fold(OnigCaseFoldType flag,
{ {
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
*lower++ = 's'; *lower++ = 's';
*lower = 's'; *lower = 's';
(*pp)++; (*pp)++;
@ -129,7 +130,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end)
int v; int v;
const UChar* p = *pp; const UChar* p = *pp;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
(*pp)++; (*pp)++;
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#if 0 #if 0
static const int EncLen_UTF16[] = { static const int EncLen_UTF16[] = {
@ -183,7 +184,7 @@ utf16be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* e
int c, v; int c, v;
p++; p++;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
#if 0 #if 0
static const int EncLen_UTF16[] = { static const int EncLen_UTF16[] = {
@ -177,7 +178,7 @@ utf16le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp,
if (*(p+1) == 0) { if (*(p+1) == 0) {
int c, v; int c, v;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
static int static int
utf32be_mbc_enc_len(const UChar* p ARG_UNUSED, const OnigUChar* e ARG_UNUSED, utf32be_mbc_enc_len(const UChar* p ARG_UNUSED, const OnigUChar* e ARG_UNUSED,
@ -126,7 +127,7 @@ utf32be_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* e
int c, v; int c, v;
p += 3; p += 3;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
return TRUE; return TRUE;
} }

View file

@ -28,6 +28,7 @@
*/ */
#include "regenc.h" #include "regenc.h"
#include "iso_8859.h"
static int static int
utf32le_mbc_enc_len(const UChar* p ARG_UNUSED, const OnigUChar* e ARG_UNUSED, utf32le_mbc_enc_len(const UChar* p ARG_UNUSED, const OnigUChar* e ARG_UNUSED,
@ -126,7 +127,7 @@ utf32le_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* e
if (*(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) { if (*(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) {
int c, v; int c, v;
if (*p == 0xdf && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) { if (*p == SHARP_s && (flag & INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR) != 0) {
return TRUE; return TRUE;
} }