Fix Unicode version and JIT target output.
This commit is contained in:
parent
14ed10fc3a
commit
29ae875dd7
|
@ -616,6 +616,7 @@ static uint32_t maxlookbehind;
|
||||||
static uint32_t max_oveccount;
|
static uint32_t max_oveccount;
|
||||||
static uint32_t callout_count;
|
static uint32_t callout_count;
|
||||||
|
|
||||||
|
static VERSION_TYPE jittarget[VERSION_SIZE];
|
||||||
static VERSION_TYPE version[VERSION_SIZE];
|
static VERSION_TYPE version[VERSION_SIZE];
|
||||||
static VERSION_TYPE uversion[VERSION_SIZE];
|
static VERSION_TYPE uversion[VERSION_SIZE];
|
||||||
|
|
||||||
|
@ -1103,7 +1104,7 @@ the three different cases. */
|
||||||
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
|
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
|
||||||
G(pcre2_jit_stack_free_,BITONE)((G(pcre2_jit_stack_,BITONE) *)a); \
|
G(pcre2_jit_stack_free_,BITONE)((G(pcre2_jit_stack_,BITONE) *)a); \
|
||||||
else \
|
else \
|
||||||
G(pcre2_jit_stack_free_,BITWO)((G(pcre2_jit_stack_,BITTWO) *)a);
|
G(pcre2_jit_stack_free_,BITTWO)((G(pcre2_jit_stack_,BITTWO) *)a);
|
||||||
|
|
||||||
#define PCRE2_MAKETABLES(a) \
|
#define PCRE2_MAKETABLES(a) \
|
||||||
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
|
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
|
||||||
|
@ -5103,8 +5104,6 @@ return PR_OK;
|
||||||
* Print PCRE2 version *
|
* Print PCRE2 version *
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
/* The version string was read into 'version' at the start of execution. */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_version(FILE *f)
|
print_version(FILE *f)
|
||||||
{
|
{
|
||||||
|
@ -5116,6 +5115,33 @@ fprintf(f, "\n");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************
|
||||||
|
* Print Unicode version *
|
||||||
|
*************************************************/
|
||||||
|
|
||||||
|
static void
|
||||||
|
print_unicode_version(FILE *f)
|
||||||
|
{
|
||||||
|
VERSION_TYPE *vp;
|
||||||
|
fprintf(f, "Unicode version ");
|
||||||
|
for (vp = uversion; *vp != 0; vp++) fprintf(f, "%c", *vp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************
|
||||||
|
* Print JIT target *
|
||||||
|
*************************************************/
|
||||||
|
|
||||||
|
static void
|
||||||
|
print_jit_target(FILE *f)
|
||||||
|
{
|
||||||
|
VERSION_TYPE *vp;
|
||||||
|
for (vp = jittarget; *vp != 0; vp++) fprintf(f, "%c", *vp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* Print newline configuration *
|
* Print newline configuration *
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
@ -5293,23 +5319,25 @@ printf(" 32-bit support\n");
|
||||||
|
|
||||||
(void)PCRE2_CONFIG(PCRE2_CONFIG_UNICODE, &rc, sizeof(rc));
|
(void)PCRE2_CONFIG(PCRE2_CONFIG_UNICODE, &rc, sizeof(rc));
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
printf(" UTF and UCP support (Unicode version %s)\n", uversion);
|
{
|
||||||
else
|
printf(" UTF and UCP support (");
|
||||||
printf(" No UTF or UCP support\n");
|
print_unicode_version(stdout);
|
||||||
|
printf(")\n");
|
||||||
|
}
|
||||||
|
else printf(" No UTF or UCP support\n");
|
||||||
|
|
||||||
(void)PCRE2_CONFIG(PCRE2_CONFIG_JIT, &rc, sizeof(rc));
|
(void)PCRE2_CONFIG(PCRE2_CONFIG_JIT, &rc, sizeof(rc));
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
{
|
{
|
||||||
/* FIXME: config needs sorting for jit target
|
printf(" Just-in-time compiler support: ");
|
||||||
const char *arch;
|
print_jit_target(stdout);
|
||||||
(void)PCRE2_CONFIG(PCRE2_CONFIG_JITTARGET, (void *)(&arch));
|
printf("\n");
|
||||||
printf(" Just-in-time compiler support: %s\n", arch);
|
|
||||||
*/
|
|
||||||
printf(" Just-in-time compiler support: FIXME\n");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf(" No just-in-time compiler support\n");
|
printf(" No just-in-time compiler support\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)PCRE2_CONFIG(PCRE2_CONFIG_NEWLINE, &rc, sizeof(rc));
|
(void)PCRE2_CONFIG(PCRE2_CONFIG_NEWLINE, &rc, sizeof(rc));
|
||||||
print_newline_config(rc, FALSE);
|
print_newline_config(rc, FALSE);
|
||||||
(void)PCRE2_CONFIG(PCRE2_CONFIG_BSR, &rc, sizeof(rc));
|
(void)PCRE2_CONFIG(PCRE2_CONFIG_BSR, &rc, sizeof(rc));
|
||||||
|
@ -5362,11 +5390,13 @@ if (PO(options) != DO(options) || PO(control) != DO(control))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the PCRE2 and Unicode version number information. */
|
/* Get the PCRE2 and Unicode version number and JIT target information. */
|
||||||
|
|
||||||
PCRE2_CONFIG(PCRE2_CONFIG_VERSION, version, sizeof(VERSION_TYPE)*VERSION_SIZE);
|
PCRE2_CONFIG(PCRE2_CONFIG_VERSION, version, sizeof(VERSION_TYPE)*VERSION_SIZE);
|
||||||
PCRE2_CONFIG(PCRE2_CONFIG_UNICODE_VERSION, uversion,
|
PCRE2_CONFIG(PCRE2_CONFIG_UNICODE_VERSION, uversion,
|
||||||
sizeof(VERSION_TYPE)*VERSION_SIZE);
|
sizeof(VERSION_TYPE)*VERSION_SIZE);
|
||||||
|
PCRE2_CONFIG(PCRE2_CONFIG_JITTARGET, jittarget,
|
||||||
|
sizeof(VERSION_TYPE)*VERSION_SIZE);
|
||||||
|
|
||||||
/* Get buffers from malloc() so that valgrind will check their misuse when
|
/* Get buffers from malloc() so that valgrind will check their misuse when
|
||||||
debugging. They grow automatically when very long lines are read. The 16-
|
debugging. They grow automatically when very long lines are read. The 16-
|
||||||
|
|
Loading…
Reference in New Issue