Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/alt/ruby27/include/ruby
File: onigmo.h
#ifndef ONIGMO_H
[0] Fix | Delete
#define ONIGMO_H
[1] Fix | Delete
/**********************************************************************
[2] Fix | Delete
onigmo.h - Onigmo (Oniguruma-mod) (regular expression library)
[3] Fix | Delete
**********************************************************************/
[4] Fix | Delete
/*-
[5] Fix | Delete
* Copyright (c) 2002-2009 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
[6] Fix | Delete
* Copyright (c) 2011-2017 K.Takata <kentkt AT csc DOT jp>
[7] Fix | Delete
* All rights reserved.
[8] Fix | Delete
*
[9] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[10] Fix | Delete
* modification, are permitted provided that the following conditions
[11] Fix | Delete
* are met:
[12] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[13] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[14] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[15] Fix | Delete
* notice, this list of conditions and the following disclaimer in the
[16] Fix | Delete
* documentation and/or other materials provided with the distribution.
[17] Fix | Delete
*
[18] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
[19] Fix | Delete
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[20] Fix | Delete
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[21] Fix | Delete
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
[22] Fix | Delete
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
[23] Fix | Delete
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
[24] Fix | Delete
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
[25] Fix | Delete
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
[26] Fix | Delete
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
[27] Fix | Delete
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
[28] Fix | Delete
* SUCH DAMAGE.
[29] Fix | Delete
*/
[30] Fix | Delete
[31] Fix | Delete
#ifdef __cplusplus
[32] Fix | Delete
extern "C" {
[33] Fix | Delete
# if 0
[34] Fix | Delete
} /* satisfy cc-mode */
[35] Fix | Delete
# endif
[36] Fix | Delete
#endif
[37] Fix | Delete
[38] Fix | Delete
#define ONIGMO_VERSION_MAJOR 6
[39] Fix | Delete
#define ONIGMO_VERSION_MINOR 1
[40] Fix | Delete
#define ONIGMO_VERSION_TEENY 3
[41] Fix | Delete
[42] Fix | Delete
#ifndef ONIG_EXTERN
[43] Fix | Delete
# ifdef RUBY_EXTERN
[44] Fix | Delete
# define ONIG_EXTERN RUBY_EXTERN
[45] Fix | Delete
# else
[46] Fix | Delete
# if defined(_WIN32) && !defined(__GNUC__)
[47] Fix | Delete
# if defined(EXPORT) || defined(RUBY_EXPORT)
[48] Fix | Delete
# define ONIG_EXTERN extern __declspec(dllexport)
[49] Fix | Delete
# else
[50] Fix | Delete
# define ONIG_EXTERN extern __declspec(dllimport)
[51] Fix | Delete
# endif
[52] Fix | Delete
# endif
[53] Fix | Delete
# endif
[54] Fix | Delete
#endif
[55] Fix | Delete
[56] Fix | Delete
#ifndef ONIG_EXTERN
[57] Fix | Delete
# define ONIG_EXTERN extern
[58] Fix | Delete
#endif
[59] Fix | Delete
[60] Fix | Delete
#ifndef RUBY
[61] Fix | Delete
# ifndef RUBY_SYMBOL_EXPORT_BEGIN
[62] Fix | Delete
# define RUBY_SYMBOL_EXPORT_BEGIN
[63] Fix | Delete
# define RUBY_SYMBOL_EXPORT_END
[64] Fix | Delete
# endif
[65] Fix | Delete
#endif
[66] Fix | Delete
[67] Fix | Delete
RUBY_SYMBOL_EXPORT_BEGIN
[68] Fix | Delete
[69] Fix | Delete
#include <stddef.h> /* for size_t */
[70] Fix | Delete
[71] Fix | Delete
/* PART: character encoding */
[72] Fix | Delete
[73] Fix | Delete
#ifndef ONIG_ESCAPE_UCHAR_COLLISION
[74] Fix | Delete
# define UChar OnigUChar
[75] Fix | Delete
#endif
[76] Fix | Delete
[77] Fix | Delete
typedef unsigned char OnigUChar;
[78] Fix | Delete
typedef unsigned int OnigCodePoint;
[79] Fix | Delete
typedef unsigned int OnigCtype;
[80] Fix | Delete
typedef size_t OnigDistance;
[81] Fix | Delete
typedef ptrdiff_t OnigPosition;
[82] Fix | Delete
[83] Fix | Delete
#define ONIG_INFINITE_DISTANCE ~((OnigDistance )0)
[84] Fix | Delete
[85] Fix | Delete
/*
[86] Fix | Delete
* Onig casefold/case mapping flags and related definitions
[87] Fix | Delete
*
[88] Fix | Delete
* Subfields (starting with 0 at LSB):
[89] Fix | Delete
* 0-2: Code point count in casefold.h
[90] Fix | Delete
* 3-12: Index into SpecialCaseMapping array in casefold.h
[91] Fix | Delete
* 13-22: Case folding/mapping flags
[92] Fix | Delete
*/
[93] Fix | Delete
typedef unsigned int OnigCaseFoldType; /* case fold flag */
[94] Fix | Delete
[95] Fix | Delete
ONIG_EXTERN OnigCaseFoldType OnigDefaultCaseFoldFlag;
[96] Fix | Delete
[97] Fix | Delete
/* bits for actual code point count; 3 bits is more than enough, currently only 2 used */
[98] Fix | Delete
#define OnigCodePointMaskWidth 3
[99] Fix | Delete
#define OnigCodePointMask ((1<<OnigCodePointMaskWidth)-1)
[100] Fix | Delete
#define OnigCodePointCount(n) ((n)&OnigCodePointMask)
[101] Fix | Delete
#define OnigCaseFoldFlags(n) ((n)&~OnigCodePointMask)
[102] Fix | Delete
[103] Fix | Delete
/* #define ONIGENC_CASE_FOLD_HIRAGANA_KATAKANA (1<<1) */ /* no longer usable with these values! */
[104] Fix | Delete
/* #define ONIGENC_CASE_FOLD_KATAKANA_WIDTH (1<<2) */ /* no longer usable with these values! */
[105] Fix | Delete
[106] Fix | Delete
/* bits for index into table with separate titlecase mappings */
[107] Fix | Delete
/* 10 bits provide 1024 values */
[108] Fix | Delete
#define OnigSpecialIndexShift 3
[109] Fix | Delete
#define OnigSpecialIndexWidth 10
[110] Fix | Delete
[111] Fix | Delete
#define ONIGENC_CASE_UPCASE (1<<13) /* has/needs uppercase mapping */
[112] Fix | Delete
#define ONIGENC_CASE_DOWNCASE (1<<14) /* has/needs lowercase mapping */
[113] Fix | Delete
#define ONIGENC_CASE_TITLECASE (1<<15) /* has/needs (special) titlecase mapping */
[114] Fix | Delete
#define ONIGENC_CASE_SPECIAL_OFFSET 3 /* offset in bits from ONIGENC_CASE to ONIGENC_CASE_SPECIAL */
[115] Fix | Delete
#define ONIGENC_CASE_UP_SPECIAL (1<<16) /* has special upcase mapping */
[116] Fix | Delete
#define ONIGENC_CASE_DOWN_SPECIAL (1<<17) /* has special downcase mapping */
[117] Fix | Delete
#define ONIGENC_CASE_MODIFIED (1<<18) /* data has been modified */
[118] Fix | Delete
#define ONIGENC_CASE_FOLD (1<<19) /* has/needs case folding */
[119] Fix | Delete
[120] Fix | Delete
#define ONIGENC_CASE_FOLD_TURKISH_AZERI (1<<20) /* needs mapping specific to Turkic languages; better not change original value! */
[121] Fix | Delete
[122] Fix | Delete
#define ONIGENC_CASE_FOLD_LITHUANIAN (1<<21) /* needs Lithuanian-specific mapping */
[123] Fix | Delete
#define ONIGENC_CASE_ASCII_ONLY (1<<22) /* only modify ASCII range */
[124] Fix | Delete
#define ONIGENC_CASE_IS_TITLECASE (1<<23) /* character itself is already titlecase */
[125] Fix | Delete
[126] Fix | Delete
#define INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR (1<<30) /* better not change original value! */
[127] Fix | Delete
[128] Fix | Delete
#define ONIGENC_CASE_FOLD_MIN INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR
[129] Fix | Delete
#define ONIGENC_CASE_FOLD_DEFAULT OnigDefaultCaseFoldFlag
[130] Fix | Delete
[131] Fix | Delete
[132] Fix | Delete
#define ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN 3
[133] Fix | Delete
#define ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM 13
[134] Fix | Delete
/* 13 => Unicode:0x1ffc */
[135] Fix | Delete
[136] Fix | Delete
/* code range */
[137] Fix | Delete
#define ONIGENC_CODE_RANGE_NUM(range) ((int )range[0])
[138] Fix | Delete
#define ONIGENC_CODE_RANGE_FROM(range,i) range[((i)*2) + 1]
[139] Fix | Delete
#define ONIGENC_CODE_RANGE_TO(range,i) range[((i)*2) + 2]
[140] Fix | Delete
[141] Fix | Delete
typedef struct {
[142] Fix | Delete
int byte_len; /* argument(original) character(s) byte length */
[143] Fix | Delete
int code_len; /* number of code */
[144] Fix | Delete
OnigCodePoint code[ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN];
[145] Fix | Delete
} OnigCaseFoldCodeItem;
[146] Fix | Delete
[147] Fix | Delete
typedef struct {
[148] Fix | Delete
OnigCodePoint esc;
[149] Fix | Delete
OnigCodePoint anychar;
[150] Fix | Delete
OnigCodePoint anytime;
[151] Fix | Delete
OnigCodePoint zero_or_one_time;
[152] Fix | Delete
OnigCodePoint one_or_more_time;
[153] Fix | Delete
OnigCodePoint anychar_anytime;
[154] Fix | Delete
} OnigMetaCharTableType;
[155] Fix | Delete
[156] Fix | Delete
typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg);
[157] Fix | Delete
[158] Fix | Delete
typedef struct OnigEncodingTypeST {
[159] Fix | Delete
int (*precise_mbc_enc_len)(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc);
[160] Fix | Delete
const char* name;
[161] Fix | Delete
int max_enc_len;
[162] Fix | Delete
int min_enc_len;
[163] Fix | Delete
int (*is_mbc_newline)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
[164] Fix | Delete
OnigCodePoint (*mbc_to_code)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
[165] Fix | Delete
int (*code_to_mbclen)(OnigCodePoint code, const struct OnigEncodingTypeST* enc);
[166] Fix | Delete
int (*code_to_mbc)(OnigCodePoint code, OnigUChar *buf, const struct OnigEncodingTypeST* enc);
[167] Fix | Delete
int (*mbc_case_fold)(OnigCaseFoldType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, const struct OnigEncodingTypeST* enc);
[168] Fix | Delete
int (*apply_all_case_fold)(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg, const struct OnigEncodingTypeST* enc);
[169] Fix | Delete
int (*get_case_fold_codes_by_str)(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem acs[], const struct OnigEncodingTypeST* enc);
[170] Fix | Delete
int (*property_name_to_ctype)(const struct OnigEncodingTypeST* enc, const OnigUChar* p, const OnigUChar* end);
[171] Fix | Delete
int (*is_code_ctype)(OnigCodePoint code, OnigCtype ctype, const struct OnigEncodingTypeST* enc);
[172] Fix | Delete
int (*get_ctype_code_range)(OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], const struct OnigEncodingTypeST* enc);
[173] Fix | Delete
OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
[174] Fix | Delete
int (*is_allowed_reverse_match)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
[175] Fix | Delete
int (*case_map)(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc);
[176] Fix | Delete
int ruby_encoding_index;
[177] Fix | Delete
unsigned int flags;
[178] Fix | Delete
} OnigEncodingType;
[179] Fix | Delete
[180] Fix | Delete
typedef const OnigEncodingType* OnigEncoding;
[181] Fix | Delete
[182] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingASCII;
[183] Fix | Delete
#ifndef RUBY
[184] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_1;
[185] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_2;
[186] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_3;
[187] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_4;
[188] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_5;
[189] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_6;
[190] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_7;
[191] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_8;
[192] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_9;
[193] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_10;
[194] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_11;
[195] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_13;
[196] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_14;
[197] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_15;
[198] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingISO_8859_16;
[199] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingUTF_8;
[200] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingUTF_16BE;
[201] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingUTF_16LE;
[202] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingUTF_32BE;
[203] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingUTF_32LE;
[204] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingEUC_JP;
[205] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingEUC_TW;
[206] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingEUC_KR;
[207] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingEUC_CN;
[208] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingShift_JIS;
[209] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_31J;
[210] Fix | Delete
/* ONIG_EXTERN const OnigEncodingType OnigEncodingKOI8; */
[211] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingKOI8_R;
[212] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingKOI8_U;
[213] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1250;
[214] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1251;
[215] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1252;
[216] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1253;
[217] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1254;
[218] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingWindows_1257;
[219] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingBIG5;
[220] Fix | Delete
ONIG_EXTERN const OnigEncodingType OnigEncodingGB18030;
[221] Fix | Delete
#endif /* RUBY */
[222] Fix | Delete
[223] Fix | Delete
#define ONIG_ENCODING_ASCII (&OnigEncodingASCII)
[224] Fix | Delete
#ifndef RUBY
[225] Fix | Delete
# define ONIG_ENCODING_ISO_8859_1 (&OnigEncodingISO_8859_1)
[226] Fix | Delete
# define ONIG_ENCODING_ISO_8859_2 (&OnigEncodingISO_8859_2)
[227] Fix | Delete
# define ONIG_ENCODING_ISO_8859_3 (&OnigEncodingISO_8859_3)
[228] Fix | Delete
# define ONIG_ENCODING_ISO_8859_4 (&OnigEncodingISO_8859_4)
[229] Fix | Delete
# define ONIG_ENCODING_ISO_8859_5 (&OnigEncodingISO_8859_5)
[230] Fix | Delete
# define ONIG_ENCODING_ISO_8859_6 (&OnigEncodingISO_8859_6)
[231] Fix | Delete
# define ONIG_ENCODING_ISO_8859_7 (&OnigEncodingISO_8859_7)
[232] Fix | Delete
# define ONIG_ENCODING_ISO_8859_8 (&OnigEncodingISO_8859_8)
[233] Fix | Delete
# define ONIG_ENCODING_ISO_8859_9 (&OnigEncodingISO_8859_9)
[234] Fix | Delete
# define ONIG_ENCODING_ISO_8859_10 (&OnigEncodingISO_8859_10)
[235] Fix | Delete
# define ONIG_ENCODING_ISO_8859_11 (&OnigEncodingISO_8859_11)
[236] Fix | Delete
# define ONIG_ENCODING_ISO_8859_13 (&OnigEncodingISO_8859_13)
[237] Fix | Delete
# define ONIG_ENCODING_ISO_8859_14 (&OnigEncodingISO_8859_14)
[238] Fix | Delete
# define ONIG_ENCODING_ISO_8859_15 (&OnigEncodingISO_8859_15)
[239] Fix | Delete
# define ONIG_ENCODING_ISO_8859_16 (&OnigEncodingISO_8859_16)
[240] Fix | Delete
# define ONIG_ENCODING_UTF_8 (&OnigEncodingUTF_8)
[241] Fix | Delete
# define ONIG_ENCODING_UTF_16BE (&OnigEncodingUTF_16BE)
[242] Fix | Delete
# define ONIG_ENCODING_UTF_16LE (&OnigEncodingUTF_16LE)
[243] Fix | Delete
# define ONIG_ENCODING_UTF_32BE (&OnigEncodingUTF_32BE)
[244] Fix | Delete
# define ONIG_ENCODING_UTF_32LE (&OnigEncodingUTF_32LE)
[245] Fix | Delete
# define ONIG_ENCODING_EUC_JP (&OnigEncodingEUC_JP)
[246] Fix | Delete
# define ONIG_ENCODING_EUC_TW (&OnigEncodingEUC_TW)
[247] Fix | Delete
# define ONIG_ENCODING_EUC_KR (&OnigEncodingEUC_KR)
[248] Fix | Delete
# define ONIG_ENCODING_EUC_CN (&OnigEncodingEUC_CN)
[249] Fix | Delete
# define ONIG_ENCODING_SHIFT_JIS (&OnigEncodingShift_JIS)
[250] Fix | Delete
# define ONIG_ENCODING_WINDOWS_31J (&OnigEncodingWindows_31J)
[251] Fix | Delete
/* # define ONIG_ENCODING_KOI8 (&OnigEncodingKOI8) */
[252] Fix | Delete
# define ONIG_ENCODING_KOI8_R (&OnigEncodingKOI8_R)
[253] Fix | Delete
# define ONIG_ENCODING_KOI8_U (&OnigEncodingKOI8_U)
[254] Fix | Delete
# define ONIG_ENCODING_WINDOWS_1250 (&OnigEncodingWindows_1250)
[255] Fix | Delete
# define ONIG_ENCODING_WINDOWS_1251 (&OnigEncodingWindows_1251)
[256] Fix | Delete
# define ONIG_ENCODING_WINDOWS_1252 (&OnigEncodingWindows_1252)
[257] Fix | Delete
# define ONIG_ENCODING_WINDOWS_1253 (&OnigEncodingWindows_1253)
[258] Fix | Delete
# define ONIG_ENCODING_WINDOWS_1254 (&OnigEncodingWindows_1254)
[259] Fix | Delete
# define ONIG_ENCODING_WINDOWS_1257 (&OnigEncodingWindows_1257)
[260] Fix | Delete
# define ONIG_ENCODING_BIG5 (&OnigEncodingBIG5)
[261] Fix | Delete
# define ONIG_ENCODING_GB18030 (&OnigEncodingGB18030)
[262] Fix | Delete
[263] Fix | Delete
/* old names */
[264] Fix | Delete
# define ONIG_ENCODING_SJIS ONIG_ENCODING_SHIFT_JIS
[265] Fix | Delete
# define ONIG_ENCODING_CP932 ONIG_ENCODING_WINDOWS_31J
[266] Fix | Delete
# define ONIG_ENCODING_CP1250 ONIG_ENCODING_WINDOWS_1250
[267] Fix | Delete
# define ONIG_ENCODING_CP1251 ONIG_ENCODING_WINDOWS_1251
[268] Fix | Delete
# define ONIG_ENCODING_CP1252 ONIG_ENCODING_WINDOWS_1252
[269] Fix | Delete
# define ONIG_ENCODING_CP1253 ONIG_ENCODING_WINDOWS_1253
[270] Fix | Delete
# define ONIG_ENCODING_CP1254 ONIG_ENCODING_WINDOWS_1254
[271] Fix | Delete
# define ONIG_ENCODING_CP1257 ONIG_ENCODING_WINDOWS_1257
[272] Fix | Delete
# define ONIG_ENCODING_UTF8 ONIG_ENCODING_UTF_8
[273] Fix | Delete
# define ONIG_ENCODING_UTF16_BE ONIG_ENCODING_UTF_16BE
[274] Fix | Delete
# define ONIG_ENCODING_UTF16_LE ONIG_ENCODING_UTF_16LE
[275] Fix | Delete
# define ONIG_ENCODING_UTF32_BE ONIG_ENCODING_UTF_32BE
[276] Fix | Delete
# define ONIG_ENCODING_UTF32_LE ONIG_ENCODING_UTF_32LE
[277] Fix | Delete
#endif /* RUBY */
[278] Fix | Delete
[279] Fix | Delete
#define ONIG_ENCODING_UNDEF ((OnigEncoding )0)
[280] Fix | Delete
[281] Fix | Delete
/* this declaration needs to be here because it is used in string.c in Ruby */
[282] Fix | Delete
ONIG_EXTERN
[283] Fix | Delete
int onigenc_ascii_only_case_map(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc);
[284] Fix | Delete
[285] Fix | Delete
[286] Fix | Delete
/* work size */
[287] Fix | Delete
#define ONIGENC_CODE_TO_MBC_MAXLEN 7
[288] Fix | Delete
#define ONIGENC_MBC_CASE_FOLD_MAXLEN 18
[289] Fix | Delete
/* 18: 6(max-byte) * 3(case-fold chars) */
[290] Fix | Delete
[291] Fix | Delete
/* character types */
[292] Fix | Delete
#define ONIGENC_CTYPE_NEWLINE 0
[293] Fix | Delete
#define ONIGENC_CTYPE_ALPHA 1
[294] Fix | Delete
#define ONIGENC_CTYPE_BLANK 2
[295] Fix | Delete
#define ONIGENC_CTYPE_CNTRL 3
[296] Fix | Delete
#define ONIGENC_CTYPE_DIGIT 4
[297] Fix | Delete
#define ONIGENC_CTYPE_GRAPH 5
[298] Fix | Delete
#define ONIGENC_CTYPE_LOWER 6
[299] Fix | Delete
#define ONIGENC_CTYPE_PRINT 7
[300] Fix | Delete
#define ONIGENC_CTYPE_PUNCT 8
[301] Fix | Delete
#define ONIGENC_CTYPE_SPACE 9
[302] Fix | Delete
#define ONIGENC_CTYPE_UPPER 10
[303] Fix | Delete
#define ONIGENC_CTYPE_XDIGIT 11
[304] Fix | Delete
#define ONIGENC_CTYPE_WORD 12
[305] Fix | Delete
#define ONIGENC_CTYPE_ALNUM 13 /* alpha || digit */
[306] Fix | Delete
#define ONIGENC_CTYPE_ASCII 14
[307] Fix | Delete
#define ONIGENC_MAX_STD_CTYPE ONIGENC_CTYPE_ASCII
[308] Fix | Delete
[309] Fix | Delete
/* flags */
[310] Fix | Delete
#define ONIGENC_FLAG_NONE 0U
[311] Fix | Delete
#define ONIGENC_FLAG_UNICODE 1U
[312] Fix | Delete
[313] Fix | Delete
#define onig_enc_len(enc,p,e) ONIGENC_MBC_ENC_LEN(enc, p, e)
[314] Fix | Delete
[315] Fix | Delete
#define ONIGENC_IS_UNDEF(enc) ((enc) == ONIG_ENCODING_UNDEF)
[316] Fix | Delete
#define ONIGENC_IS_SINGLEBYTE(enc) (ONIGENC_MBC_MAXLEN(enc) == 1)
[317] Fix | Delete
#define ONIGENC_IS_MBC_HEAD(enc,p,e) (ONIGENC_MBC_ENC_LEN(enc,p,e) != 1)
[318] Fix | Delete
#define ONIGENC_IS_MBC_ASCII(p) (*(p) < 128)
[319] Fix | Delete
#define ONIGENC_IS_CODE_ASCII(code) ((code) < 128)
[320] Fix | Delete
#define ONIGENC_IS_MBC_WORD(enc,s,end) \
[321] Fix | Delete
ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end))
[322] Fix | Delete
#define ONIGENC_IS_MBC_ASCII_WORD(enc,s,end) \
[323] Fix | Delete
onigenc_ascii_is_code_ctype( \
[324] Fix | Delete
ONIGENC_MBC_TO_CODE(enc,s,end),ONIGENC_CTYPE_WORD,enc)
[325] Fix | Delete
#define ONIGENC_IS_UNICODE(enc) ((enc)->flags & ONIGENC_FLAG_UNICODE)
[326] Fix | Delete
[327] Fix | Delete
[328] Fix | Delete
#define ONIGENC_NAME(enc) ((enc)->name)
[329] Fix | Delete
[330] Fix | Delete
#define ONIGENC_MBC_CASE_FOLD(enc,flag,pp,end,buf) \
[331] Fix | Delete
(enc)->mbc_case_fold(flag,(const OnigUChar** )pp,end,buf,enc)
[332] Fix | Delete
#define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) \
[333] Fix | Delete
(enc)->is_allowed_reverse_match(s,end,enc)
[334] Fix | Delete
#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s,end) \
[335] Fix | Delete
(enc)->left_adjust_char_head(start, s, end, enc)
[336] Fix | Delete
#define ONIGENC_APPLY_ALL_CASE_FOLD(enc,case_fold_flag,f,arg) \
[337] Fix | Delete
(enc)->apply_all_case_fold(case_fold_flag,f,arg,enc)
[338] Fix | Delete
#define ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc,case_fold_flag,p,end,acs) \
[339] Fix | Delete
(enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs,enc)
[340] Fix | Delete
#define ONIGENC_STEP_BACK(enc,start,s,end,n) \
[341] Fix | Delete
onigenc_step_back((enc),(start),(s),(end),(n))
[342] Fix | Delete
[343] Fix | Delete
#define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) (n)
[344] Fix | Delete
#define ONIGENC_MBCLEN_CHARFOUND_P(r) (0 < (r))
[345] Fix | Delete
#define ONIGENC_MBCLEN_CHARFOUND_LEN(r) (r)
[346] Fix | Delete
[347] Fix | Delete
#define ONIGENC_CONSTRUCT_MBCLEN_INVALID() (-1)
[348] Fix | Delete
#define ONIGENC_MBCLEN_INVALID_P(r) ((r) == -1)
[349] Fix | Delete
[350] Fix | Delete
#define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n) (-1-(n))
[351] Fix | Delete
#define ONIGENC_MBCLEN_NEEDMORE_P(r) ((r) < -1)
[352] Fix | Delete
#define ONIGENC_MBCLEN_NEEDMORE_LEN(r) (-1-(r))
[353] Fix | Delete
[354] Fix | Delete
#define ONIGENC_PRECISE_MBC_ENC_LEN(enc,p,e) (enc)->precise_mbc_enc_len(p,e,enc)
[355] Fix | Delete
[356] Fix | Delete
ONIG_EXTERN
[357] Fix | Delete
int onigenc_mbclen_approximate(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc);
[358] Fix | Delete
[359] Fix | Delete
#define ONIGENC_MBC_ENC_LEN(enc,p,e) onigenc_mbclen_approximate(p,e,enc)
[360] Fix | Delete
#define ONIGENC_MBC_MAXLEN(enc) ((enc)->max_enc_len)
[361] Fix | Delete
#define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc)
[362] Fix | Delete
#define ONIGENC_MBC_MINLEN(enc) ((enc)->min_enc_len)
[363] Fix | Delete
#define ONIGENC_IS_MBC_NEWLINE(enc,p,end) (enc)->is_mbc_newline((p),(end),enc)
[364] Fix | Delete
#define ONIGENC_MBC_TO_CODE(enc,p,end) (enc)->mbc_to_code((p),(end),enc)
[365] Fix | Delete
#define ONIGENC_CODE_TO_MBCLEN(enc,code) (enc)->code_to_mbclen(code,enc)
[366] Fix | Delete
#define ONIGENC_CODE_TO_MBC(enc,code,buf) (enc)->code_to_mbc(code,buf,enc)
[367] Fix | Delete
#define ONIGENC_PROPERTY_NAME_TO_CTYPE(enc,p,end) \
[368] Fix | Delete
(enc)->property_name_to_ctype(enc,p,end)
[369] Fix | Delete
[370] Fix | Delete
#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) (enc)->is_code_ctype(code,ctype,enc)
[371] Fix | Delete
[372] Fix | Delete
#define ONIGENC_IS_CODE_NEWLINE(enc,code) \
[373] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE)
[374] Fix | Delete
#define ONIGENC_IS_CODE_GRAPH(enc,code) \
[375] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_GRAPH)
[376] Fix | Delete
#define ONIGENC_IS_CODE_PRINT(enc,code) \
[377] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PRINT)
[378] Fix | Delete
#define ONIGENC_IS_CODE_ALNUM(enc,code) \
[379] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALNUM)
[380] Fix | Delete
#define ONIGENC_IS_CODE_ALPHA(enc,code) \
[381] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALPHA)
[382] Fix | Delete
#define ONIGENC_IS_CODE_LOWER(enc,code) \
[383] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_LOWER)
[384] Fix | Delete
#define ONIGENC_IS_CODE_UPPER(enc,code) \
[385] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_UPPER)
[386] Fix | Delete
#define ONIGENC_IS_CODE_CNTRL(enc,code) \
[387] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_CNTRL)
[388] Fix | Delete
#define ONIGENC_IS_CODE_PUNCT(enc,code) \
[389] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PUNCT)
[390] Fix | Delete
#define ONIGENC_IS_CODE_SPACE(enc,code) \
[391] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_SPACE)
[392] Fix | Delete
#define ONIGENC_IS_CODE_BLANK(enc,code) \
[393] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_BLANK)
[394] Fix | Delete
#define ONIGENC_IS_CODE_DIGIT(enc,code) \
[395] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
[396] Fix | Delete
#define ONIGENC_IS_CODE_XDIGIT(enc,code) \
[397] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT)
[398] Fix | Delete
#define ONIGENC_IS_CODE_WORD(enc,code) \
[399] Fix | Delete
ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
[400] Fix | Delete
[401] Fix | Delete
#define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbout,ranges) \
[402] Fix | Delete
(enc)->get_ctype_code_range(ctype,sbout,ranges,enc)
[403] Fix | Delete
[404] Fix | Delete
ONIG_EXTERN
[405] Fix | Delete
OnigUChar* onigenc_step_back(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, int n);
[406] Fix | Delete
[407] Fix | Delete
[408] Fix | Delete
/* encoding API */
[409] Fix | Delete
ONIG_EXTERN
[410] Fix | Delete
int onigenc_init(void);
[411] Fix | Delete
ONIG_EXTERN
[412] Fix | Delete
int onigenc_set_default_encoding(OnigEncoding enc);
[413] Fix | Delete
ONIG_EXTERN
[414] Fix | Delete
OnigEncoding onigenc_get_default_encoding(void);
[415] Fix | Delete
ONIG_EXTERN
[416] Fix | Delete
OnigUChar* onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, const OnigUChar** prev);
[417] Fix | Delete
ONIG_EXTERN
[418] Fix | Delete
OnigUChar* onigenc_get_prev_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
[419] Fix | Delete
ONIG_EXTERN
[420] Fix | Delete
OnigUChar* onigenc_get_left_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
[421] Fix | Delete
ONIG_EXTERN
[422] Fix | Delete
OnigUChar* onigenc_get_right_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
[423] Fix | Delete
ONIG_EXTERN
[424] Fix | Delete
int onigenc_strlen(OnigEncoding enc, const OnigUChar* p, const OnigUChar* end);
[425] Fix | Delete
ONIG_EXTERN
[426] Fix | Delete
int onigenc_strlen_null(OnigEncoding enc, const OnigUChar* p);
[427] Fix | Delete
ONIG_EXTERN
[428] Fix | Delete
int onigenc_str_bytelen_null(OnigEncoding enc, const OnigUChar* p);
[429] Fix | Delete
[430] Fix | Delete
[431] Fix | Delete
[432] Fix | Delete
/* PART: regular expression */
[433] Fix | Delete
[434] Fix | Delete
/* config parameters */
[435] Fix | Delete
#define ONIG_NREGION 4
[436] Fix | Delete
#define ONIG_MAX_CAPTURE_GROUP_NUM 32767
[437] Fix | Delete
#define ONIG_MAX_BACKREF_NUM 1000
[438] Fix | Delete
#define ONIG_MAX_REPEAT_NUM 100000
[439] Fix | Delete
#define ONIG_MAX_MULTI_BYTE_RANGES_NUM 10000
[440] Fix | Delete
/* constants */
[441] Fix | Delete
#define ONIG_MAX_ERROR_MESSAGE_LEN 90
[442] Fix | Delete
[443] Fix | Delete
typedef unsigned int OnigOptionType;
[444] Fix | Delete
[445] Fix | Delete
#define ONIG_OPTION_DEFAULT ONIG_OPTION_NONE
[446] Fix | Delete
[447] Fix | Delete
/* options */
[448] Fix | Delete
#define ONIG_OPTION_NONE 0U
[449] Fix | Delete
#define ONIG_OPTION_IGNORECASE 1U
[450] Fix | Delete
#define ONIG_OPTION_EXTEND (ONIG_OPTION_IGNORECASE << 1)
[451] Fix | Delete
#define ONIG_OPTION_MULTILINE (ONIG_OPTION_EXTEND << 1)
[452] Fix | Delete
#define ONIG_OPTION_DOTALL ONIG_OPTION_MULTILINE
[453] Fix | Delete
#define ONIG_OPTION_SINGLELINE (ONIG_OPTION_MULTILINE << 1)
[454] Fix | Delete
#define ONIG_OPTION_FIND_LONGEST (ONIG_OPTION_SINGLELINE << 1)
[455] Fix | Delete
#define ONIG_OPTION_FIND_NOT_EMPTY (ONIG_OPTION_FIND_LONGEST << 1)
[456] Fix | Delete
#define ONIG_OPTION_NEGATE_SINGLELINE (ONIG_OPTION_FIND_NOT_EMPTY << 1)
[457] Fix | Delete
#define ONIG_OPTION_DONT_CAPTURE_GROUP (ONIG_OPTION_NEGATE_SINGLELINE << 1)
[458] Fix | Delete
#define ONIG_OPTION_CAPTURE_GROUP (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
[459] Fix | Delete
/* options (search time) */
[460] Fix | Delete
#define ONIG_OPTION_NOTBOL (ONIG_OPTION_CAPTURE_GROUP << 1)
[461] Fix | Delete
#define ONIG_OPTION_NOTEOL (ONIG_OPTION_NOTBOL << 1)
[462] Fix | Delete
#define ONIG_OPTION_NOTBOS (ONIG_OPTION_NOTEOL << 1)
[463] Fix | Delete
#define ONIG_OPTION_NOTEOS (ONIG_OPTION_NOTBOS << 1)
[464] Fix | Delete
/* options (ctype range) */
[465] Fix | Delete
#define ONIG_OPTION_ASCII_RANGE (ONIG_OPTION_NOTEOS << 1)
[466] Fix | Delete
#define ONIG_OPTION_POSIX_BRACKET_ALL_RANGE (ONIG_OPTION_ASCII_RANGE << 1)
[467] Fix | Delete
#define ONIG_OPTION_WORD_BOUND_ALL_RANGE (ONIG_OPTION_POSIX_BRACKET_ALL_RANGE << 1)
[468] Fix | Delete
/* options (newline) */
[469] Fix | Delete
#define ONIG_OPTION_NEWLINE_CRLF (ONIG_OPTION_WORD_BOUND_ALL_RANGE << 1)
[470] Fix | Delete
#define ONIG_OPTION_MAXBIT ONIG_OPTION_NEWLINE_CRLF /* limit */
[471] Fix | Delete
[472] Fix | Delete
#define ONIG_OPTION_ON(options,regopt) ((options) |= (regopt))
[473] Fix | Delete
#define ONIG_OPTION_OFF(options,regopt) ((options) &= ~(regopt))
[474] Fix | Delete
#define ONIG_IS_OPTION_ON(options,option) ((options) & (option))
[475] Fix | Delete
[476] Fix | Delete
/* syntax */
[477] Fix | Delete
typedef struct {
[478] Fix | Delete
unsigned int op;
[479] Fix | Delete
unsigned int op2;
[480] Fix | Delete
unsigned int behavior;
[481] Fix | Delete
OnigOptionType options; /* default option */
[482] Fix | Delete
OnigMetaCharTableType meta_char_table;
[483] Fix | Delete
} OnigSyntaxType;
[484] Fix | Delete
[485] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxASIS;
[486] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPosixBasic;
[487] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPosixExtended;
[488] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxEmacs;
[489] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxGrep;
[490] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxGnuRegex;
[491] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxJava;
[492] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPerl58;
[493] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPerl58_NG;
[494] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPerl;
[495] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxRuby;
[496] Fix | Delete
ONIG_EXTERN const OnigSyntaxType OnigSyntaxPython;
[497] Fix | Delete
[498] Fix | Delete
/* predefined syntaxes (see regsyntax.c) */
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function