Conversion code update (revised option definitions).
This commit is contained in:
parent
e88ee34d6d
commit
485b269f9c
11
src/pcre2.h
11
src/pcre2.h
|
@ -184,10 +184,13 @@ ignored for pcre2_jit_match(). */
|
||||||
|
|
||||||
#define PCRE2_CONVERT_UTF 0x00000001u
|
#define PCRE2_CONVERT_UTF 0x00000001u
|
||||||
#define PCRE2_CONVERT_NO_UTF_CHECK 0x00000002u
|
#define PCRE2_CONVERT_NO_UTF_CHECK 0x00000002u
|
||||||
#define PCRE2_CONVERT_GLOB_BASIC 0x00000004u
|
#define PCRE2_CONVERT_POSIX_BASIC 0x00000004u
|
||||||
#define PCRE2_CONVERT_GLOB_BASH 0x00000008u
|
#define PCRE2_CONVERT_POSIX_EXTENDED 0x00000008u
|
||||||
#define PCRE2_CONVERT_POSIX_BASIC 0x00000010u
|
#define PCRE2_CONVERT_GLOB 0x00000010u
|
||||||
#define PCRE2_CONVERT_POSIX_EXTENDED 0x00000020u
|
#define PCRE2_CONVERT_GLOB_NO_BACKSLASH 0x00000030u
|
||||||
|
#define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR 0x00000050u
|
||||||
|
#define PCRE2_CONVERT_GLOB_NO_STARSTAR 0x00000090u
|
||||||
|
#define PCRE2_CONVERT_GLOB_BASIC 0x000000f0u
|
||||||
|
|
||||||
/* Newline and \R settings, for use in compile contexts. The newline values
|
/* Newline and \R settings, for use in compile contexts. The newline values
|
||||||
must be kept in step with values set in config.h and both sets must all be
|
must be kept in step with values set in config.h and both sets must all be
|
||||||
|
|
|
@ -184,10 +184,13 @@ ignored for pcre2_jit_match(). */
|
||||||
|
|
||||||
#define PCRE2_CONVERT_UTF 0x00000001u
|
#define PCRE2_CONVERT_UTF 0x00000001u
|
||||||
#define PCRE2_CONVERT_NO_UTF_CHECK 0x00000002u
|
#define PCRE2_CONVERT_NO_UTF_CHECK 0x00000002u
|
||||||
#define PCRE2_CONVERT_GLOB_BASIC 0x00000004u
|
#define PCRE2_CONVERT_POSIX_BASIC 0x00000004u
|
||||||
#define PCRE2_CONVERT_GLOB_BASH 0x00000008u
|
#define PCRE2_CONVERT_POSIX_EXTENDED 0x00000008u
|
||||||
#define PCRE2_CONVERT_POSIX_BASIC 0x00000010u
|
#define PCRE2_CONVERT_GLOB 0x00000010u
|
||||||
#define PCRE2_CONVERT_POSIX_EXTENDED 0x00000020u
|
#define PCRE2_CONVERT_GLOB_NO_BACKSLASH 0x00000030u
|
||||||
|
#define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR 0x00000050u
|
||||||
|
#define PCRE2_CONVERT_GLOB_NO_STARSTAR 0x00000090u
|
||||||
|
#define PCRE2_CONVERT_GLOB_BASIC 0x000000f0u
|
||||||
|
|
||||||
/* Newline and \R settings, for use in compile contexts. The newline values
|
/* Newline and \R settings, for use in compile contexts. The newline values
|
||||||
must be kept in step with values set in config.h and both sets must all be
|
must be kept in step with values set in config.h and both sets must all be
|
||||||
|
|
|
@ -45,11 +45,12 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include "pcre2_internal.h"
|
#include "pcre2_internal.h"
|
||||||
|
|
||||||
#define TYPE_OPTIONS (PCRE2_CONVERT_GLOB_BASIC|PCRE2_CONVERT_GLOB_BASH| \
|
#define TYPE_OPTIONS (PCRE2_CONVERT_GLOB| \
|
||||||
PCRE2_CONVERT_POSIX_BASIC|PCRE2_CONVERT_POSIX_EXTENDED)
|
PCRE2_CONVERT_POSIX_BASIC|PCRE2_CONVERT_POSIX_EXTENDED)
|
||||||
|
|
||||||
#define ALL_OPTIONS (PCRE2_CONVERT_UTF|PCRE2_CONVERT_NO_UTF_CHECK| \
|
#define ALL_OPTIONS (PCRE2_CONVERT_UTF|PCRE2_CONVERT_NO_UTF_CHECK| \
|
||||||
TYPE_OPTIONS)
|
PCRE2_CONVERT_GLOB_NO_BACKSLASH|PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR| \
|
||||||
|
PCRE2_CONVERT_GLOB_NO_STARSTAR|TYPE_OPTIONS)
|
||||||
|
|
||||||
#define DUMMY_BUFFER_SIZE 100
|
#define DUMMY_BUFFER_SIZE 100
|
||||||
|
|
||||||
|
@ -1128,15 +1129,17 @@ for (i = 0; i < 2; i++)
|
||||||
|
|
||||||
switch(pattype)
|
switch(pattype)
|
||||||
{
|
{
|
||||||
case PCRE2_CONVERT_GLOB_BASIC:
|
case PCRE2_CONVERT_GLOB:
|
||||||
rc = convert_glob(pattype, pattern, plength, utf, use_buffer, use_length,
|
rc = convert_glob(pattype, pattern, plength, utf, use_buffer, use_length,
|
||||||
bufflenptr, dummyrun, ccontext);
|
bufflenptr, dummyrun, ccontext);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/*
|
||||||
case PCRE2_CONVERT_GLOB_BASH:
|
case PCRE2_CONVERT_GLOB_BASH:
|
||||||
rc = convert_glob_bash(options, pattern, plength, utf, use_buffer, use_length,
|
rc = convert_glob_bash(options, pattern, plength, utf, use_buffer, use_length,
|
||||||
bufflenptr, dummyrun, ccontext);
|
bufflenptr, dummyrun, ccontext);
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
|
|
||||||
case PCRE2_CONVERT_POSIX_BASIC:
|
case PCRE2_CONVERT_POSIX_BASIC:
|
||||||
case PCRE2_CONVERT_POSIX_EXTENDED:
|
case PCRE2_CONVERT_POSIX_EXTENDED:
|
||||||
|
|
|
@ -400,8 +400,11 @@ typedef struct convertstruct {
|
||||||
} convertstruct;
|
} convertstruct;
|
||||||
|
|
||||||
static convertstruct convertlist[] = {
|
static convertstruct convertlist[] = {
|
||||||
|
{ "glob", PCRE2_CONVERT_GLOB },
|
||||||
{ "glob_basic", PCRE2_CONVERT_GLOB_BASIC },
|
{ "glob_basic", PCRE2_CONVERT_GLOB_BASIC },
|
||||||
{ "glob_bash", PCRE2_CONVERT_GLOB_BASH },
|
{ "glob_no_backslash", PCRE2_CONVERT_GLOB_NO_BACKSLASH },
|
||||||
|
{ "glob_no_starstar", PCRE2_CONVERT_GLOB_NO_STARSTAR },
|
||||||
|
{ "glob_no_wild_separator", PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR },
|
||||||
{ "posix_basic", PCRE2_CONVERT_POSIX_BASIC },
|
{ "posix_basic", PCRE2_CONVERT_POSIX_BASIC },
|
||||||
{ "posix_extended", PCRE2_CONVERT_POSIX_EXTENDED },
|
{ "posix_extended", PCRE2_CONVERT_POSIX_EXTENDED },
|
||||||
{ "unset", CONVERT_UNSET }};
|
{ "unset", CONVERT_UNSET }};
|
||||||
|
|
Loading…
Reference in New Issue