Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include
File: pcre2posix.h
/*************************************************
[0] Fix | Delete
* Perl-Compatible Regular Expressions *
[1] Fix | Delete
*************************************************/
[2] Fix | Delete
[3] Fix | Delete
/* PCRE2 is a library of functions to support regular expressions whose syntax
[4] Fix | Delete
and semantics are as close as possible to those of the Perl 5 language.
[5] Fix | Delete
[6] Fix | Delete
Written by Philip Hazel
[7] Fix | Delete
Original API code Copyright (c) 1997-2012 University of Cambridge
[8] Fix | Delete
New API code Copyright (c) 2016 University of Cambridge
[9] Fix | Delete
[10] Fix | Delete
-----------------------------------------------------------------------------
[11] Fix | Delete
Redistribution and use in source and binary forms, with or without
[12] Fix | Delete
modification, are permitted provided that the following conditions are met:
[13] Fix | Delete
[14] Fix | Delete
* Redistributions of source code must retain the above copyright notice,
[15] Fix | Delete
this list of conditions and the following disclaimer.
[16] Fix | Delete
[17] Fix | Delete
* Redistributions in binary form must reproduce the above copyright
[18] Fix | Delete
notice, this list of conditions and the following disclaimer in the
[19] Fix | Delete
documentation and/or other materials provided with the distribution.
[20] Fix | Delete
[21] Fix | Delete
* Neither the name of the University of Cambridge nor the names of its
[22] Fix | Delete
contributors may be used to endorse or promote products derived from
[23] Fix | Delete
this software without specific prior written permission.
[24] Fix | Delete
[25] Fix | Delete
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
[26] Fix | Delete
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[27] Fix | Delete
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[28] Fix | Delete
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
[29] Fix | Delete
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
[30] Fix | Delete
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
[31] Fix | Delete
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
[32] Fix | Delete
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
[33] Fix | Delete
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
[34] Fix | Delete
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
[35] Fix | Delete
POSSIBILITY OF SUCH DAMAGE.
[36] Fix | Delete
-----------------------------------------------------------------------------
[37] Fix | Delete
*/
[38] Fix | Delete
[39] Fix | Delete
[40] Fix | Delete
/* Have to include stdlib.h in order to ensure that size_t is defined. */
[41] Fix | Delete
[42] Fix | Delete
#include <stdlib.h>
[43] Fix | Delete
[44] Fix | Delete
/* Allow for C++ users */
[45] Fix | Delete
[46] Fix | Delete
#ifdef __cplusplus
[47] Fix | Delete
extern "C" {
[48] Fix | Delete
#endif
[49] Fix | Delete
[50] Fix | Delete
/* Options, mostly defined by POSIX, but with some extras. */
[51] Fix | Delete
[52] Fix | Delete
#define REG_ICASE 0x0001 /* Maps to PCRE2_CASELESS */
[53] Fix | Delete
#define REG_NEWLINE 0x0002 /* Maps to PCRE2_MULTILINE */
[54] Fix | Delete
#define REG_NOTBOL 0x0004 /* Maps to PCRE2_NOTBOL */
[55] Fix | Delete
#define REG_NOTEOL 0x0008 /* Maps to PCRE2_NOTEOL */
[56] Fix | Delete
#define REG_DOTALL 0x0010 /* NOT defined by POSIX; maps to PCRE2_DOTALL */
[57] Fix | Delete
#define REG_NOSUB 0x0020 /* Do not report what was matched */
[58] Fix | Delete
#define REG_UTF 0x0040 /* NOT defined by POSIX; maps to PCRE2_UTF */
[59] Fix | Delete
#define REG_STARTEND 0x0080 /* BSD feature: pass subject string by so,eo */
[60] Fix | Delete
#define REG_NOTEMPTY 0x0100 /* NOT defined by POSIX; maps to PCRE2_NOTEMPTY */
[61] Fix | Delete
#define REG_UNGREEDY 0x0200 /* NOT defined by POSIX; maps to PCRE2_UNGREEDY */
[62] Fix | Delete
#define REG_UCP 0x0400 /* NOT defined by POSIX; maps to PCRE2_UCP */
[63] Fix | Delete
#define REG_PEND 0x0800 /* GNU feature: pass end pattern by re_endp */
[64] Fix | Delete
#define REG_NOSPEC 0x1000 /* Maps to PCRE2_LITERAL */
[65] Fix | Delete
[66] Fix | Delete
/* This is not used by PCRE2, but by defining it we make it easier
[67] Fix | Delete
to slot PCRE2 into existing programs that make POSIX calls. */
[68] Fix | Delete
[69] Fix | Delete
#define REG_EXTENDED 0
[70] Fix | Delete
[71] Fix | Delete
/* Error values. Not all these are relevant or used by the wrapper. */
[72] Fix | Delete
[73] Fix | Delete
enum {
[74] Fix | Delete
REG_ASSERT = 1, /* internal error ? */
[75] Fix | Delete
REG_BADBR, /* invalid repeat counts in {} */
[76] Fix | Delete
REG_BADPAT, /* pattern error */
[77] Fix | Delete
REG_BADRPT, /* ? * + invalid */
[78] Fix | Delete
REG_EBRACE, /* unbalanced {} */
[79] Fix | Delete
REG_EBRACK, /* unbalanced [] */
[80] Fix | Delete
REG_ECOLLATE, /* collation error - not relevant */
[81] Fix | Delete
REG_ECTYPE, /* bad class */
[82] Fix | Delete
REG_EESCAPE, /* bad escape sequence */
[83] Fix | Delete
REG_EMPTY, /* empty expression */
[84] Fix | Delete
REG_EPAREN, /* unbalanced () */
[85] Fix | Delete
REG_ERANGE, /* bad range inside [] */
[86] Fix | Delete
REG_ESIZE, /* expression too big */
[87] Fix | Delete
REG_ESPACE, /* failed to get memory */
[88] Fix | Delete
REG_ESUBREG, /* bad back reference */
[89] Fix | Delete
REG_INVARG, /* bad argument */
[90] Fix | Delete
REG_NOMATCH /* match failed */
[91] Fix | Delete
};
[92] Fix | Delete
[93] Fix | Delete
[94] Fix | Delete
/* The structure representing a compiled regular expression. It is also used
[95] Fix | Delete
for passing the pattern end pointer when REG_PEND is set. */
[96] Fix | Delete
[97] Fix | Delete
typedef struct {
[98] Fix | Delete
void *re_pcre2_code;
[99] Fix | Delete
void *re_match_data;
[100] Fix | Delete
const char *re_endp;
[101] Fix | Delete
size_t re_nsub;
[102] Fix | Delete
size_t re_erroffset;
[103] Fix | Delete
int re_cflags;
[104] Fix | Delete
} regex_t;
[105] Fix | Delete
[106] Fix | Delete
/* The structure in which a captured offset is returned. */
[107] Fix | Delete
[108] Fix | Delete
typedef int regoff_t;
[109] Fix | Delete
[110] Fix | Delete
typedef struct {
[111] Fix | Delete
regoff_t rm_so;
[112] Fix | Delete
regoff_t rm_eo;
[113] Fix | Delete
} regmatch_t;
[114] Fix | Delete
[115] Fix | Delete
/* When an application links to a PCRE2 DLL in Windows, the symbols that are
[116] Fix | Delete
imported have to be identified as such. When building PCRE2, the appropriate
[117] Fix | Delete
export settings are needed, and are set in pcre2posix.c before including this
[118] Fix | Delete
file. */
[119] Fix | Delete
[120] Fix | Delete
#if defined(_WIN32) && !defined(PCRE2_STATIC) && !defined(PCRE2POSIX_EXP_DECL)
[121] Fix | Delete
# define PCRE2POSIX_EXP_DECL extern __declspec(dllimport)
[122] Fix | Delete
# define PCRE2POSIX_EXP_DEFN __declspec(dllimport)
[123] Fix | Delete
#endif
[124] Fix | Delete
[125] Fix | Delete
/* By default, we use the standard "extern" declarations. */
[126] Fix | Delete
[127] Fix | Delete
#ifndef PCRE2POSIX_EXP_DECL
[128] Fix | Delete
# ifdef __cplusplus
[129] Fix | Delete
# define PCRE2POSIX_EXP_DECL extern "C"
[130] Fix | Delete
# define PCRE2POSIX_EXP_DEFN extern "C"
[131] Fix | Delete
# else
[132] Fix | Delete
# define PCRE2POSIX_EXP_DECL extern
[133] Fix | Delete
# define PCRE2POSIX_EXP_DEFN extern
[134] Fix | Delete
# endif
[135] Fix | Delete
#endif
[136] Fix | Delete
[137] Fix | Delete
/* The functions */
[138] Fix | Delete
[139] Fix | Delete
PCRE2POSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
[140] Fix | Delete
PCRE2POSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
[141] Fix | Delete
regmatch_t *, int);
[142] Fix | Delete
PCRE2POSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
[143] Fix | Delete
PCRE2POSIX_EXP_DECL void regfree(regex_t *);
[144] Fix | Delete
[145] Fix | Delete
#ifdef __cplusplus
[146] Fix | Delete
} /* extern "C" */
[147] Fix | Delete
#endif
[148] Fix | Delete
[149] Fix | Delete
/* End of pcre2posix.h */
[150] Fix | Delete
[151] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function