mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 14:11:29 +00:00
Update libpcre to 10.45
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o Upgraded included libraries: Lua 5.4.7, libssh2 1.11.1, libpcap 1.10.5
|
||||
o Upgraded included libraries: Lua 5.4.7, libssh2 1.11.1, libpcap 1.10.5,
|
||||
libpcre 10.45
|
||||
|
||||
o [NSE] New script targets-ipv6-eui64 generates target IPv6 addresses from a
|
||||
user-provided file of MAC addresses, using the EUI-64 method. [Daniel Miller]
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
THE MAIN PCRE2 LIBRARY CODE
|
||||
---------------------------
|
||||
|
||||
Written by: Philip Hazel
|
||||
Email local part: Philip.Hazel
|
||||
Email domain: gmail.com
|
||||
|
||||
Retired from University of Cambridge Computing Service,
|
||||
Cambridge, England.
|
||||
|
||||
Copyright (c) 1997-2024 University of Cambridge
|
||||
All rights reserved
|
||||
|
||||
|
||||
PCRE2 JUST-IN-TIME COMPILATION SUPPORT
|
||||
--------------------------------------
|
||||
|
||||
Written by: Zoltan Herczeg
|
||||
Email local part: hzmester
|
||||
Emain domain: freemail.hu
|
||||
|
||||
Copyright(c) 2010-2024 Zoltan Herczeg
|
||||
All rights reserved.
|
||||
|
||||
|
||||
STACK-LESS JUST-IN-TIME COMPILER
|
||||
--------------------------------
|
||||
|
||||
Written by: Zoltan Herczeg
|
||||
Email local part: hzmester
|
||||
Emain domain: freemail.hu
|
||||
|
||||
Copyright(c) 2009-2024 Zoltan Herczeg
|
||||
All rights reserved.
|
||||
|
||||
####
|
||||
200
libpcre/AUTHORS.md
Normal file
200
libpcre/AUTHORS.md
Normal file
@@ -0,0 +1,200 @@
|
||||
PCRE2 Authorship and Contributors
|
||||
=================================
|
||||
|
||||
COPYRIGHT
|
||||
---------
|
||||
|
||||
Please see the file [LICENCE](./LICENCE.md) in the PCRE2 distribution for
|
||||
copyright details.
|
||||
|
||||
|
||||
MAINTAINERS
|
||||
-----------
|
||||
|
||||
The PCRE and PCRE2 libraries were authored and maintained by Philip Hazel.
|
||||
|
||||
Since 2024, the contributors with administrator access to the project are now
|
||||
Nicholas Wilson and Zoltán Herczeg. See the file [SECURITY](./SECURITY.md) for
|
||||
GPG keys.
|
||||
|
||||
Both administrators are volunteers acting in a personal capacity.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Role</th>
|
||||
<tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
Nicholas Wilson<br/>
|
||||
`nicholas@nicholaswilson.me.uk`<br/>
|
||||
Currently of Microsoft Research Cambridge, UK
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
* General project administration & maintenance
|
||||
* Release management
|
||||
* Code maintenance
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
Zoltán Herczeg<br/>
|
||||
`hzmester@freemail.hu`<br/>
|
||||
Currently of the University of Szeged, Hungary
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
* Code maintenance
|
||||
* Ownership of `sljit` and PCRE2's JIT
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
CONTRIBUTORS
|
||||
------------
|
||||
|
||||
Many others have participated and contributed to PCRE2 over its history.
|
||||
|
||||
The maintainers are grateful for all contributions and participation over the
|
||||
years. We apologise for any names we have forgotten.
|
||||
|
||||
We are especially grateful to Philip Hazel, creator of PCRE and PCRE2, and
|
||||
maintainer from 1997 to 2024.
|
||||
|
||||
All names listed alphabetically.
|
||||
|
||||
### Contributors to PCRE2
|
||||
|
||||
This list includes names up until the PCRE2 10.44 release. New names will be
|
||||
added from the Git history on each release.
|
||||
|
||||
Scott Bell
|
||||
Carlo Marcelo Arenas Belón
|
||||
Edward Betts
|
||||
Jan-Willem Blokland
|
||||
Ross Burton
|
||||
Dmitry Cherniachenko
|
||||
Alexey Chupahin
|
||||
Jessica Clarke
|
||||
Alejandro Colomar
|
||||
Jeremie Courreges-Anglas
|
||||
Addison Crump
|
||||
Alex Dowad
|
||||
Daniel Engberg
|
||||
Daniel Richard G
|
||||
David Gaussmann
|
||||
Andrey Gorbachev
|
||||
Jordan Griege
|
||||
Jason Hood
|
||||
Bumsu Hyeon
|
||||
Roy Ivy
|
||||
Martin Joerg
|
||||
Guillem Jover
|
||||
Ralf Junker
|
||||
Ayesh Karunaratne
|
||||
Michael Kaufmann
|
||||
Yunho Kim
|
||||
Joshua Kinard
|
||||
David Korczynski
|
||||
Uwe Korn
|
||||
Jonas Kvinge
|
||||
Kristian Larsson
|
||||
Kai Lu
|
||||
Behzod Mansurov
|
||||
B. Scott Michel
|
||||
Nathan Moinvaziri
|
||||
Mike Munday
|
||||
Marc Mutz
|
||||
Fabio Pagani
|
||||
Christian Persch
|
||||
Tristan Ross
|
||||
William A Rowe Jr
|
||||
David Seifert
|
||||
Yaakov Selkowitz
|
||||
Rich Siegel
|
||||
Karl Skomski
|
||||
Maciej Sroczyński
|
||||
Wolfgang Stöggl
|
||||
Thomas Tempelmann
|
||||
Greg Thain
|
||||
Lucas Trzesniewski
|
||||
Theodore Tsirpanis
|
||||
Matthew Vernon
|
||||
Rémi Verschelde
|
||||
Thomas Voss
|
||||
Ezekiel Warren
|
||||
Carl Weaver
|
||||
Chris Wilson
|
||||
Amin Yahyaabadi
|
||||
Joe Zhang
|
||||
|
||||
### Contributors to PCRE1
|
||||
|
||||
These people contributed either by sending patches or reporting serious issues.
|
||||
|
||||
Irfan Adilovic
|
||||
Alexander Barkov
|
||||
Daniel Bergström
|
||||
David Burgess
|
||||
Ross Burton
|
||||
David Byron
|
||||
Fred Cox
|
||||
Christian Ehrlicher
|
||||
Tom Fortmann
|
||||
Lionel Fourquaux
|
||||
Mike Frysinger
|
||||
Daniel Richard G
|
||||
Dair Gran
|
||||
"Graycode" (Red Hat Product Security)
|
||||
Viktor Griph
|
||||
Wen Guanxing
|
||||
Robin Houston
|
||||
Martin Jerabek
|
||||
Peter Kankowski
|
||||
Stephen Kelly
|
||||
Yunho Kim
|
||||
Joshua Kinard
|
||||
Carsten Klein
|
||||
Evgeny Kotkov
|
||||
Ronald Landheer-Cieslak
|
||||
Alan Lehotsky
|
||||
Dmitry V. Levin
|
||||
Nuno Lopes
|
||||
Kai Lu
|
||||
Giuseppe Maxia
|
||||
Dan Mooney
|
||||
Marc Mutz
|
||||
Markus Oberhumer
|
||||
Sheri Pierce
|
||||
Petr Pisar
|
||||
Ari Pollak
|
||||
Bob Rossi
|
||||
Ruiger Rill
|
||||
Michael Shigorin
|
||||
Rich Siegel
|
||||
Craig Silverstein (C++ wrapper)
|
||||
Karl Skomski
|
||||
Paul Sokolovsky
|
||||
Stan Switzer
|
||||
Ian Taylor
|
||||
Mark Tetrode
|
||||
Jeff Trawick
|
||||
Steven Van Ingelgem
|
||||
Lawrence Velazquez
|
||||
Jiong Wang
|
||||
Stefan Weber
|
||||
Chris Wilson
|
||||
|
||||
Thanks go to Jeffrey Friedl for testing and debugging assistance.
|
||||
172
libpcre/BUILD.bazel
Normal file
172
libpcre/BUILD.bazel
Normal file
@@ -0,0 +1,172 @@
|
||||
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
|
||||
load("@bazel_skylib//rules:native_binary.bzl", "native_test")
|
||||
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
|
||||
|
||||
copy_file(
|
||||
name = "config_h_generic",
|
||||
src = "src/config.h.generic",
|
||||
out = "src/config.h",
|
||||
)
|
||||
|
||||
copy_file(
|
||||
name = "pcre2_h_generic",
|
||||
src = "src/pcre2.h.generic",
|
||||
out = "src/pcre2.h",
|
||||
)
|
||||
|
||||
copy_file(
|
||||
name = "pcre2_chartables_c",
|
||||
src = "src/pcre2_chartables.c.dist",
|
||||
out = "src/pcre2_chartables.c",
|
||||
)
|
||||
|
||||
# Removed src/pcre2_ucptables.c below because it is #included in
|
||||
# src/pcre2_tables.c. Also fixed typo: ckdint should be chkdint.
|
||||
# PH, 22-March-2023.
|
||||
cc_library(
|
||||
name = "pcre2",
|
||||
srcs = [
|
||||
"src/pcre2_auto_possess.c",
|
||||
"src/pcre2_chkdint.c",
|
||||
"src/pcre2_compile.c",
|
||||
"src/pcre2_compile_class.c",
|
||||
"src/pcre2_config.c",
|
||||
"src/pcre2_context.c",
|
||||
"src/pcre2_convert.c",
|
||||
"src/pcre2_dfa_match.c",
|
||||
"src/pcre2_error.c",
|
||||
"src/pcre2_extuni.c",
|
||||
"src/pcre2_find_bracket.c",
|
||||
"src/pcre2_jit_compile.c",
|
||||
"src/pcre2_maketables.c",
|
||||
"src/pcre2_match.c",
|
||||
"src/pcre2_match_data.c",
|
||||
"src/pcre2_newline.c",
|
||||
"src/pcre2_ord2utf.c",
|
||||
"src/pcre2_pattern_info.c",
|
||||
"src/pcre2_script_run.c",
|
||||
"src/pcre2_serialize.c",
|
||||
"src/pcre2_string_utils.c",
|
||||
"src/pcre2_study.c",
|
||||
"src/pcre2_substitute.c",
|
||||
"src/pcre2_substring.c",
|
||||
"src/pcre2_tables.c",
|
||||
"src/pcre2_ucd.c",
|
||||
"src/pcre2_valid_utf.c",
|
||||
"src/pcre2_xclass.c",
|
||||
":pcre2_chartables_c",
|
||||
"src/pcre2_compile.h",
|
||||
"src/pcre2_internal.h",
|
||||
"src/pcre2_intmodedep.h",
|
||||
"src/pcre2_ucp.h",
|
||||
"src/pcre2_util.h",
|
||||
":config_h_generic",
|
||||
],
|
||||
textual_hdrs = [
|
||||
"src/pcre2_jit_match.c",
|
||||
"src/pcre2_jit_misc.c",
|
||||
"src/pcre2_ucptables.c",
|
||||
],
|
||||
hdrs = [
|
||||
":pcre2_h_generic",
|
||||
],
|
||||
local_defines = [
|
||||
"HAVE_CONFIG_H",
|
||||
"HAVE_MEMMOVE",
|
||||
"PCRE2_CODE_UNIT_WIDTH=8",
|
||||
"PCRE2_STATIC",
|
||||
"SUPPORT_UNICODE",
|
||||
],
|
||||
includes = ["src"],
|
||||
strip_include_prefix = "src",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "pcre2-posix",
|
||||
srcs = [
|
||||
"src/pcre2posix.c",
|
||||
":config_h_generic",
|
||||
],
|
||||
hdrs = [
|
||||
"src/pcre2posix.h",
|
||||
],
|
||||
local_defines = [
|
||||
"HAVE_CONFIG_H",
|
||||
"HAVE_MEMMOVE",
|
||||
"PCRE2_CODE_UNIT_WIDTH=8",
|
||||
"PCRE2_STATIC",
|
||||
"SUPPORT_UNICODE",
|
||||
],
|
||||
includes = ["src"],
|
||||
strip_include_prefix = "src",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [":pcre2"],
|
||||
)
|
||||
|
||||
# Totally weird issue in Bazel. It won't let you #include any files unless they
|
||||
# are declared to the build system. OK, fair enough. But - for a cc_binary it
|
||||
# uses the file extension to determine whether it's a header or a compilation
|
||||
# unit. But... we have several .c files which are #included, rather than treated
|
||||
# as a compilation unit.
|
||||
#
|
||||
# For cc_library() above, we can overcome this with textual_hdrs. But that
|
||||
# doesn't work for cc_binary(). Here's our workaround.
|
||||
#
|
||||
# https://github.com/bazelbuild/bazel/issues/680
|
||||
cc_library(
|
||||
name = "pcre2test_dotc_headers",
|
||||
hdrs = [
|
||||
"src/pcre2_chkdint.c",
|
||||
"src/pcre2_printint.c",
|
||||
"src/pcre2_tables.c",
|
||||
"src/pcre2_ucd.c",
|
||||
"src/pcre2_valid_utf.c",
|
||||
],
|
||||
strip_include_prefix = "src",
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "pcre2test",
|
||||
srcs = [
|
||||
"src/pcre2test.c",
|
||||
":config_h_generic",
|
||||
],
|
||||
local_defines = [
|
||||
"HAVE_CONFIG_H",
|
||||
"HAVE_MEMMOVE",
|
||||
"HAVE_STRERROR",
|
||||
"PCRE2_STATIC",
|
||||
"SUPPORT_UNICODE",
|
||||
"SUPPORT_PCRE2_8",
|
||||
] + select({
|
||||
"@platforms//os:windows": [],
|
||||
"//conditions:default": ["HAVE_UNISTD_H"],
|
||||
}),
|
||||
linkopts = select({
|
||||
"@platforms//os:windows": ["-STACK:2500000"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [":pcre2test_dotc_headers", ":pcre2", ":pcre2-posix"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "testdata",
|
||||
srcs = glob(["testdata/*"]),
|
||||
)
|
||||
|
||||
native_test(
|
||||
name = "pcre2_test",
|
||||
src = select({
|
||||
"@platforms//os:windows": "RunTest.bat",
|
||||
"//conditions:default": "RunTest",
|
||||
}),
|
||||
out = select({
|
||||
"@platforms//os:windows": "RunTest.bat",
|
||||
"//conditions:default": "RunTest",
|
||||
}),
|
||||
data = [":pcre2test", ":testdata"],
|
||||
size = "small",
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,8 @@
|
||||
PCRE2 LICENCE
|
||||
-------------
|
||||
PCRE2 License
|
||||
=============
|
||||
|
||||
| SPDX-License-Identifier: | BSD-3-Clause WITH PCRE2-exception |
|
||||
|---------|-------|
|
||||
|
||||
PCRE2 is a library of functions to support regular expressions whose syntax
|
||||
and semantics are as close as possible to those of the Perl 5 language.
|
||||
@@ -16,40 +19,46 @@ optimize pattern matching. This is an optional feature that can be omitted when
|
||||
the library is built.
|
||||
|
||||
|
||||
THE BASIC LIBRARY FUNCTIONS
|
||||
---------------------------
|
||||
COPYRIGHT
|
||||
---------
|
||||
|
||||
Written by: Philip Hazel
|
||||
Email local part: Philip.Hazel
|
||||
Email domain: gmail.com
|
||||
### The basic library functions
|
||||
|
||||
Retired from University of Cambridge Computing Service,
|
||||
Cambridge, England.
|
||||
Written by: Philip Hazel
|
||||
Email local part: Philip.Hazel
|
||||
Email domain: gmail.com
|
||||
|
||||
Copyright (c) 1997-2024 University of Cambridge
|
||||
All rights reserved.
|
||||
Retired from University of Cambridge Computing Service,
|
||||
Cambridge, England.
|
||||
|
||||
Copyright (c) 1997-2007 University of Cambridge
|
||||
Copyright (c) 2007-2024 Philip Hazel
|
||||
All rights reserved.
|
||||
|
||||
PCRE2 JUST-IN-TIME COMPILATION SUPPORT
|
||||
--------------------------------------
|
||||
### PCRE2 Just-In-Time compilation support
|
||||
|
||||
Written by: Zoltan Herczeg
|
||||
Email local part: hzmester
|
||||
Email domain: freemail.hu
|
||||
Written by: Zoltan Herczeg
|
||||
Email local part: hzmester
|
||||
Email domain: freemail.hu
|
||||
|
||||
Copyright(c) 2010-2024 Zoltan Herczeg
|
||||
All rights reserved.
|
||||
Copyright (c) 2010-2024 Zoltan Herczeg
|
||||
All rights reserved.
|
||||
|
||||
### Stack-less Just-In-Time compiler
|
||||
|
||||
STACK-LESS JUST-IN-TIME COMPILER
|
||||
--------------------------------
|
||||
Written by: Zoltan Herczeg
|
||||
Email local part: hzmester
|
||||
Email domain: freemail.hu
|
||||
|
||||
Written by: Zoltan Herczeg
|
||||
Email local part: hzmester
|
||||
Email domain: freemail.hu
|
||||
Copyright (c) 2009-2024 Zoltan Herczeg
|
||||
All rights reserved.
|
||||
|
||||
Copyright(c) 2009-2024 Zoltan Herczeg
|
||||
All rights reserved.
|
||||
### All other contributions
|
||||
|
||||
Many other contributors have participated in the authorship of PCRE2. As PCRE2
|
||||
has never required a Contributor Licensing Agreement, or other copyright
|
||||
assignment agreement, all contributions have copyright retained by each
|
||||
original contributor or their employer.
|
||||
|
||||
|
||||
THE "BSD" LICENCE
|
||||
@@ -58,16 +67,16 @@ THE "BSD" LICENCE
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notices,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions of source code must retain the above copyright notices,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notices, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notices, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the University of Cambridge nor the names of any
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
* Neither the name of the University of Cambridge nor the names of any
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
9
libpcre/MODULE.bazel
Normal file
9
libpcre/MODULE.bazel
Normal file
@@ -0,0 +1,9 @@
|
||||
module(
|
||||
name = "pcre2",
|
||||
version = "10.45",
|
||||
compatibility_level = 1,
|
||||
)
|
||||
|
||||
bazel_dep(name = "rules_cc", version = "0.0.1")
|
||||
bazel_dep(name = "bazel_skylib", version = "1.2.1")
|
||||
bazel_dep(name = "platforms", version = "0.0.4")
|
||||
@@ -10,12 +10,9 @@ AM_CPPFLAGS="-I$(srcdir)/src"
|
||||
## Specify the documentation files that are distributed.
|
||||
|
||||
dist_doc_DATA = \
|
||||
AUTHORS \
|
||||
LICENCE
|
||||
|
||||
dist_html_DATA =
|
||||
|
||||
dist_man_MANS =
|
||||
AUTHORS.md \
|
||||
LICENCE.md \
|
||||
SECURITY.md
|
||||
|
||||
# The Libtool libraries to install. We'll add to this later.
|
||||
|
||||
@@ -35,9 +32,19 @@ bin_PROGRAMS =
|
||||
noinst_PROGRAMS =
|
||||
|
||||
# Additional files to delete on 'make clean', 'make distclean',
|
||||
# and 'make maintainer-clean'.
|
||||
# and 'make maintainer-clean'. It turns out that the default is to delete only
|
||||
# those binaries that *this* configuration has created. If the configuration
|
||||
# has been changed, some binaries may not get automatically deleted. Therefore
|
||||
# we list them here.
|
||||
|
||||
CLEANFILES = \
|
||||
pcre2_dftables \
|
||||
pcre2_jit_test \
|
||||
pcre2fuzzcheck-8 \
|
||||
pcre2fuzzcheck-16 \
|
||||
pcre2fuzzcheck-32 \
|
||||
pcre2demo
|
||||
|
||||
CLEANFILES =
|
||||
DISTCLEANFILES = src/config.h.in~
|
||||
MAINTAINERCLEANFILES =
|
||||
|
||||
@@ -51,6 +58,22 @@ EXTRA_DIST =
|
||||
EXTRA_DIST += \
|
||||
m4/ax_pthread.m4 m4/pcre2_visibility.m4
|
||||
|
||||
# These are support files for building with Bazel or Zig
|
||||
|
||||
EXTRA_DIST += \
|
||||
BUILD.bazel \
|
||||
MODULE.bazel \
|
||||
WORKSPACE.bazel \
|
||||
build.zig
|
||||
|
||||
# These are support files for building under VMS
|
||||
|
||||
EXTRA_DIST += \
|
||||
vms/configure.com \
|
||||
vms/openvms_readme.txt \
|
||||
vms/pcre2.h_patch \
|
||||
vms/stdint.h
|
||||
|
||||
# These files are usable versions of pcre2.h and config.h that are distributed
|
||||
# for the benefit of people who are building PCRE2 manually, without the
|
||||
# Autotools support.
|
||||
@@ -135,6 +158,8 @@ COMMON_SOURCES = \
|
||||
src/pcre2_auto_possess.c \
|
||||
src/pcre2_chkdint.c \
|
||||
src/pcre2_compile.c \
|
||||
src/pcre2_compile.h \
|
||||
src/pcre2_compile_class.c \
|
||||
src/pcre2_config.c \
|
||||
src/pcre2_context.c \
|
||||
src/pcre2_convert.c \
|
||||
@@ -144,6 +169,7 @@ COMMON_SOURCES = \
|
||||
src/pcre2_find_bracket.c \
|
||||
src/pcre2_internal.h \
|
||||
src/pcre2_intmodedep.h \
|
||||
src/pcre2_jit_char_inc.h \
|
||||
src/pcre2_jit_compile.c \
|
||||
src/pcre2_maketables.c \
|
||||
src/pcre2_match.c \
|
||||
@@ -160,6 +186,7 @@ COMMON_SOURCES = \
|
||||
src/pcre2_tables.c \
|
||||
src/pcre2_ucd.c \
|
||||
src/pcre2_ucp.h \
|
||||
src/pcre2_util.h \
|
||||
src/pcre2_valid_utf.c \
|
||||
src/pcre2_xclass.c
|
||||
|
||||
@@ -215,6 +242,7 @@ endif # WITH_PCRE2_32
|
||||
EXTRA_DIST += src/pcre2_chartables.c.dist
|
||||
CLEANFILES += src/pcre2_chartables.c
|
||||
|
||||
|
||||
if WITH_PCRE2_8
|
||||
libpcre2_8_la_LDFLAGS = $(EXTRA_LIBPCRE2_8_LDFLAGS)
|
||||
endif # WITH_PCRE2_8
|
||||
@@ -264,6 +292,10 @@ libpcre2_posix_la_CFLAGS += $(GCOV_CFLAGS)
|
||||
endif # WITH_GCOV
|
||||
endif # WITH_PCRE2_8
|
||||
|
||||
## If fuzzer support is enabled, build a non-distributed library containing the
|
||||
## fuzzing function. Also build the standalone checking binary from the same
|
||||
## source but using -DSTANDALONE.
|
||||
|
||||
# gcov/lcov code coverage reporting
|
||||
#
|
||||
# Coverage reporting targets:
|
||||
@@ -367,7 +399,8 @@ endif # WITH_GCOV
|
||||
|
||||
EXTRA_DIST += \
|
||||
cmake/COPYING-CMAKE-SCRIPTS \
|
||||
cmake/FindPackageHandleStandardArgs.cmake \
|
||||
cmake/FindEditline.cmake \
|
||||
cmake/FindReadline.cmake \
|
||||
cmake/pcre2-config-version.cmake.in \
|
||||
cmake/pcre2-config.cmake.in \
|
||||
CMakeLists.txt \
|
||||
|
||||
@@ -110,16 +110,17 @@ noinst_PROGRAMS = $(am__EXEEXT_1)
|
||||
@WITH_GCOV_FALSE@am__append_13 = src/*.gcda src/*.gcno
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/pcre2_visibility.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps) $(dist_noinst_SCRIPTS) $(dist_doc_DATA) \
|
||||
$(dist_html_DATA) $(include_HEADERS) $(am__DIST_COMMON)
|
||||
$(include_HEADERS) $(am__DIST_COMMON)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
@@ -128,8 +129,7 @@ CONFIG_CLEAN_FILES = pcre2-config src/pcre2.h
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \
|
||||
"$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" \
|
||||
"$(DESTDIR)$(htmldir)" "$(DESTDIR)$(includedir)" \
|
||||
"$(DESTDIR)$(includedir)"
|
||||
"$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"
|
||||
@WITH_REBUILD_CHARTABLES_TRUE@am__EXEEXT_1 = pcre2_dftables$(EXEEXT)
|
||||
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
@@ -162,22 +162,24 @@ am__uninstall_files_from_dir = { \
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libpcre2_16_la_DEPENDENCIES =
|
||||
am__libpcre2_16_la_SOURCES_DIST = src/pcre2_auto_possess.c \
|
||||
src/pcre2_chkdint.c src/pcre2_compile.c src/pcre2_config.c \
|
||||
src/pcre2_chkdint.c src/pcre2_compile.c src/pcre2_compile.h \
|
||||
src/pcre2_compile_class.c src/pcre2_config.c \
|
||||
src/pcre2_context.c src/pcre2_convert.c src/pcre2_dfa_match.c \
|
||||
src/pcre2_error.c src/pcre2_extuni.c src/pcre2_find_bracket.c \
|
||||
src/pcre2_internal.h src/pcre2_intmodedep.h \
|
||||
src/pcre2_jit_compile.c src/pcre2_maketables.c \
|
||||
src/pcre2_match.c src/pcre2_match_data.c src/pcre2_newline.c \
|
||||
src/pcre2_ord2utf.c src/pcre2_pattern_info.c \
|
||||
src/pcre2_script_run.c src/pcre2_serialize.c \
|
||||
src/pcre2_string_utils.c src/pcre2_study.c \
|
||||
src/pcre2_substitute.c src/pcre2_substring.c \
|
||||
src/pcre2_jit_char_inc.h src/pcre2_jit_compile.c \
|
||||
src/pcre2_maketables.c src/pcre2_match.c \
|
||||
src/pcre2_match_data.c src/pcre2_newline.c src/pcre2_ord2utf.c \
|
||||
src/pcre2_pattern_info.c src/pcre2_script_run.c \
|
||||
src/pcre2_serialize.c src/pcre2_string_utils.c \
|
||||
src/pcre2_study.c src/pcre2_substitute.c src/pcre2_substring.c \
|
||||
src/pcre2_tables.c src/pcre2_ucd.c src/pcre2_ucp.h \
|
||||
src/pcre2_valid_utf.c src/pcre2_xclass.c
|
||||
src/pcre2_util.h src/pcre2_valid_utf.c src/pcre2_xclass.c
|
||||
am__dirstamp = $(am__leading_dot)dirstamp
|
||||
am__objects_1 = src/libpcre2_16_la-pcre2_auto_possess.lo \
|
||||
src/libpcre2_16_la-pcre2_chkdint.lo \
|
||||
src/libpcre2_16_la-pcre2_compile.lo \
|
||||
src/libpcre2_16_la-pcre2_compile_class.lo \
|
||||
src/libpcre2_16_la-pcre2_config.lo \
|
||||
src/libpcre2_16_la-pcre2_context.lo \
|
||||
src/libpcre2_16_la-pcre2_convert.lo \
|
||||
@@ -218,21 +220,23 @@ libpcre2_16_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||
@WITH_PCRE2_16_TRUE@am_libpcre2_16_la_rpath = -rpath $(libdir)
|
||||
libpcre2_32_la_DEPENDENCIES =
|
||||
am__libpcre2_32_la_SOURCES_DIST = src/pcre2_auto_possess.c \
|
||||
src/pcre2_chkdint.c src/pcre2_compile.c src/pcre2_config.c \
|
||||
src/pcre2_chkdint.c src/pcre2_compile.c src/pcre2_compile.h \
|
||||
src/pcre2_compile_class.c src/pcre2_config.c \
|
||||
src/pcre2_context.c src/pcre2_convert.c src/pcre2_dfa_match.c \
|
||||
src/pcre2_error.c src/pcre2_extuni.c src/pcre2_find_bracket.c \
|
||||
src/pcre2_internal.h src/pcre2_intmodedep.h \
|
||||
src/pcre2_jit_compile.c src/pcre2_maketables.c \
|
||||
src/pcre2_match.c src/pcre2_match_data.c src/pcre2_newline.c \
|
||||
src/pcre2_ord2utf.c src/pcre2_pattern_info.c \
|
||||
src/pcre2_script_run.c src/pcre2_serialize.c \
|
||||
src/pcre2_string_utils.c src/pcre2_study.c \
|
||||
src/pcre2_substitute.c src/pcre2_substring.c \
|
||||
src/pcre2_jit_char_inc.h src/pcre2_jit_compile.c \
|
||||
src/pcre2_maketables.c src/pcre2_match.c \
|
||||
src/pcre2_match_data.c src/pcre2_newline.c src/pcre2_ord2utf.c \
|
||||
src/pcre2_pattern_info.c src/pcre2_script_run.c \
|
||||
src/pcre2_serialize.c src/pcre2_string_utils.c \
|
||||
src/pcre2_study.c src/pcre2_substitute.c src/pcre2_substring.c \
|
||||
src/pcre2_tables.c src/pcre2_ucd.c src/pcre2_ucp.h \
|
||||
src/pcre2_valid_utf.c src/pcre2_xclass.c
|
||||
src/pcre2_util.h src/pcre2_valid_utf.c src/pcre2_xclass.c
|
||||
am__objects_3 = src/libpcre2_32_la-pcre2_auto_possess.lo \
|
||||
src/libpcre2_32_la-pcre2_chkdint.lo \
|
||||
src/libpcre2_32_la-pcre2_compile.lo \
|
||||
src/libpcre2_32_la-pcre2_compile_class.lo \
|
||||
src/libpcre2_32_la-pcre2_config.lo \
|
||||
src/libpcre2_32_la-pcre2_context.lo \
|
||||
src/libpcre2_32_la-pcre2_convert.lo \
|
||||
@@ -269,21 +273,23 @@ libpcre2_32_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||
@WITH_PCRE2_32_TRUE@am_libpcre2_32_la_rpath = -rpath $(libdir)
|
||||
libpcre2_8_la_DEPENDENCIES =
|
||||
am__libpcre2_8_la_SOURCES_DIST = src/pcre2_auto_possess.c \
|
||||
src/pcre2_chkdint.c src/pcre2_compile.c src/pcre2_config.c \
|
||||
src/pcre2_chkdint.c src/pcre2_compile.c src/pcre2_compile.h \
|
||||
src/pcre2_compile_class.c src/pcre2_config.c \
|
||||
src/pcre2_context.c src/pcre2_convert.c src/pcre2_dfa_match.c \
|
||||
src/pcre2_error.c src/pcre2_extuni.c src/pcre2_find_bracket.c \
|
||||
src/pcre2_internal.h src/pcre2_intmodedep.h \
|
||||
src/pcre2_jit_compile.c src/pcre2_maketables.c \
|
||||
src/pcre2_match.c src/pcre2_match_data.c src/pcre2_newline.c \
|
||||
src/pcre2_ord2utf.c src/pcre2_pattern_info.c \
|
||||
src/pcre2_script_run.c src/pcre2_serialize.c \
|
||||
src/pcre2_string_utils.c src/pcre2_study.c \
|
||||
src/pcre2_substitute.c src/pcre2_substring.c \
|
||||
src/pcre2_jit_char_inc.h src/pcre2_jit_compile.c \
|
||||
src/pcre2_maketables.c src/pcre2_match.c \
|
||||
src/pcre2_match_data.c src/pcre2_newline.c src/pcre2_ord2utf.c \
|
||||
src/pcre2_pattern_info.c src/pcre2_script_run.c \
|
||||
src/pcre2_serialize.c src/pcre2_string_utils.c \
|
||||
src/pcre2_study.c src/pcre2_substitute.c src/pcre2_substring.c \
|
||||
src/pcre2_tables.c src/pcre2_ucd.c src/pcre2_ucp.h \
|
||||
src/pcre2_valid_utf.c src/pcre2_xclass.c
|
||||
src/pcre2_util.h src/pcre2_valid_utf.c src/pcre2_xclass.c
|
||||
am__objects_5 = src/libpcre2_8_la-pcre2_auto_possess.lo \
|
||||
src/libpcre2_8_la-pcre2_chkdint.lo \
|
||||
src/libpcre2_8_la-pcre2_compile.lo \
|
||||
src/libpcre2_8_la-pcre2_compile_class.lo \
|
||||
src/libpcre2_8_la-pcre2_config.lo \
|
||||
src/libpcre2_8_la-pcre2_context.lo \
|
||||
src/libpcre2_8_la-pcre2_convert.lo \
|
||||
@@ -353,6 +359,7 @@ am__depfiles_remade = \
|
||||
src/$(DEPDIR)/libpcre2_16_la-pcre2_chartables.Plo \
|
||||
src/$(DEPDIR)/libpcre2_16_la-pcre2_chkdint.Plo \
|
||||
src/$(DEPDIR)/libpcre2_16_la-pcre2_compile.Plo \
|
||||
src/$(DEPDIR)/libpcre2_16_la-pcre2_compile_class.Plo \
|
||||
src/$(DEPDIR)/libpcre2_16_la-pcre2_config.Plo \
|
||||
src/$(DEPDIR)/libpcre2_16_la-pcre2_context.Plo \
|
||||
src/$(DEPDIR)/libpcre2_16_la-pcre2_convert.Plo \
|
||||
@@ -381,6 +388,7 @@ am__depfiles_remade = \
|
||||
src/$(DEPDIR)/libpcre2_32_la-pcre2_chartables.Plo \
|
||||
src/$(DEPDIR)/libpcre2_32_la-pcre2_chkdint.Plo \
|
||||
src/$(DEPDIR)/libpcre2_32_la-pcre2_compile.Plo \
|
||||
src/$(DEPDIR)/libpcre2_32_la-pcre2_compile_class.Plo \
|
||||
src/$(DEPDIR)/libpcre2_32_la-pcre2_config.Plo \
|
||||
src/$(DEPDIR)/libpcre2_32_la-pcre2_context.Plo \
|
||||
src/$(DEPDIR)/libpcre2_32_la-pcre2_convert.Plo \
|
||||
@@ -409,6 +417,7 @@ am__depfiles_remade = \
|
||||
src/$(DEPDIR)/libpcre2_8_la-pcre2_chartables.Plo \
|
||||
src/$(DEPDIR)/libpcre2_8_la-pcre2_chkdint.Plo \
|
||||
src/$(DEPDIR)/libpcre2_8_la-pcre2_compile.Plo \
|
||||
src/$(DEPDIR)/libpcre2_8_la-pcre2_compile_class.Plo \
|
||||
src/$(DEPDIR)/libpcre2_8_la-pcre2_config.Plo \
|
||||
src/$(DEPDIR)/libpcre2_8_la-pcre2_context.Plo \
|
||||
src/$(DEPDIR)/libpcre2_8_la-pcre2_convert.Plo \
|
||||
@@ -468,7 +477,7 @@ am__can_run_installinfo = \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
DATA = $(dist_doc_DATA) $(dist_html_DATA)
|
||||
DATA = $(dist_doc_DATA)
|
||||
HEADERS = $(include_HEADERS) $(nodist_include_HEADERS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
@@ -663,11 +672,10 @@ am__set_b = \
|
||||
*) \
|
||||
b='$*';; \
|
||||
esac
|
||||
am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
|
||||
$(srcdir)/pcre2-config.in $(top_srcdir)/src/config.h.in \
|
||||
$(top_srcdir)/src/pcre2.h.in AUTHORS ar-lib compile \
|
||||
config.guess config.sub depcomp install-sh ltmain.sh missing \
|
||||
test-driver
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/pcre2-config.in \
|
||||
$(top_srcdir)/src/config.h.in $(top_srcdir)/src/pcre2.h.in \
|
||||
AUTHORS.md ar-lib compile config.guess config.sub depcomp \
|
||||
install-sh ltmain.sh missing test-driver
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
@@ -678,9 +686,9 @@ am__remove_distdir = \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
DIST_TARGETS = dist-bzip2 dist-gzip dist-zip
|
||||
# Exists only to be overridden by the user if desired.
|
||||
AM_DISTCHECK_DVI_TARGET = dvi
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
@@ -721,6 +729,7 @@ EXTRA_LIBPCRE2_32_LDFLAGS = @EXTRA_LIBPCRE2_32_LDFLAGS@
|
||||
EXTRA_LIBPCRE2_8_LDFLAGS = @EXTRA_LIBPCRE2_8_LDFLAGS@
|
||||
EXTRA_LIBPCRE2_POSIX_LDFLAGS = @EXTRA_LIBPCRE2_POSIX_LDFLAGS@
|
||||
FGREP = @FGREP@
|
||||
FILECMD = @FILECMD@
|
||||
GCOV_CFLAGS = @GCOV_CFLAGS@
|
||||
GCOV_CXXFLAGS = @GCOV_CXXFLAGS@
|
||||
GCOV_LIBS = @GCOV_LIBS@
|
||||
@@ -735,14 +744,18 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LCOV = @LCOV@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBBZ2 = @LIBBZ2@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBREADLINE = @LIBREADLINE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBZ = @LIBZ@
|
||||
LIB_POSTFIX = @LIB_POSTFIX@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
@@ -766,15 +779,22 @@ PCRE2_MAJOR = @PCRE2_MAJOR@
|
||||
PCRE2_MINOR = @PCRE2_MINOR@
|
||||
PCRE2_PRERELEASE = @PCRE2_PRERELEASE@
|
||||
PCRE2_STATIC_CFLAG = @PCRE2_STATIC_CFLAG@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
PTHREAD_CC = @PTHREAD_CC@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SHTOOL = @SHTOOL@
|
||||
STRIP = @STRIP@
|
||||
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
|
||||
VALGRIND_LIBS = @VALGRIND_LIBS@
|
||||
VERSION = @VERSION@
|
||||
VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@
|
||||
VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
@@ -787,6 +807,7 @@ am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_pthread_config = @ax_pthread_config@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
@@ -835,11 +856,10 @@ AUTOMAKE_OPTIONS = subdir-objects
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
AM_CPPFLAGS = "-I$(srcdir)/src"
|
||||
dist_doc_DATA = \
|
||||
AUTHORS \
|
||||
LICENCE
|
||||
AUTHORS.md \
|
||||
LICENCE.md \
|
||||
SECURITY.md
|
||||
|
||||
dist_html_DATA =
|
||||
dist_man_MANS =
|
||||
|
||||
# The Libtool libraries to install. We'll add to this later.
|
||||
lib_LTLIBRARIES = $(am__append_2) $(am__append_3) $(am__append_4) \
|
||||
@@ -848,8 +868,13 @@ check_SCRIPTS =
|
||||
dist_noinst_SCRIPTS =
|
||||
|
||||
# Additional files to delete on 'make clean', 'make distclean',
|
||||
# and 'make maintainer-clean'.
|
||||
CLEANFILES = src/pcre2_chartables.c
|
||||
# and 'make maintainer-clean'. It turns out that the default is to delete only
|
||||
# those binaries that *this* configuration has created. If the configuration
|
||||
# has been changed, some binaries may not get automatically deleted. Therefore
|
||||
# we list them here.
|
||||
CLEANFILES = pcre2_dftables pcre2_jit_test pcre2fuzzcheck-8 \
|
||||
pcre2fuzzcheck-16 pcre2fuzzcheck-32 pcre2demo \
|
||||
src/pcre2_chartables.c
|
||||
DISTCLEANFILES = src/config.h.in~ $(am__append_13)
|
||||
MAINTAINERCLEANFILES = src/pcre2.h.generic src/config.h.generic
|
||||
|
||||
@@ -858,6 +883,10 @@ MAINTAINERCLEANFILES = src/pcre2.h.generic src/config.h.generic
|
||||
|
||||
# These files contain additional m4 macros that are used by autoconf.
|
||||
|
||||
# These are support files for building with Bazel or Zig
|
||||
|
||||
# These are support files for building under VMS
|
||||
|
||||
# These files are usable versions of pcre2.h and config.h that are distributed
|
||||
# for the benefit of people who are building PCRE2 manually, without the
|
||||
# Autotools support.
|
||||
@@ -866,10 +895,12 @@ MAINTAINERCLEANFILES = src/pcre2.h.generic src/config.h.generic
|
||||
|
||||
# The pcre2_chartables.c.dist file is the default version of
|
||||
# pcre2_chartables.c, used unless --enable-rebuild-chartables is specified.
|
||||
EXTRA_DIST = m4/ax_pthread.m4 m4/pcre2_visibility.m4 \
|
||||
EXTRA_DIST = m4/ax_pthread.m4 m4/pcre2_visibility.m4 BUILD.bazel \
|
||||
MODULE.bazel WORKSPACE.bazel build.zig vms/configure.com \
|
||||
vms/openvms_readme.txt vms/pcre2.h_patch vms/stdint.h \
|
||||
src/pcre2.h.generic src/config.h.generic src/pcre2_ucptables.c \
|
||||
src/pcre2_chartables.c.dist cmake/COPYING-CMAKE-SCRIPTS \
|
||||
cmake/FindPackageHandleStandardArgs.cmake \
|
||||
cmake/FindEditline.cmake cmake/FindReadline.cmake \
|
||||
cmake/pcre2-config-version.cmake.in \
|
||||
cmake/pcre2-config.cmake.in CMakeLists.txt config-cmake.h.in
|
||||
|
||||
@@ -887,6 +918,8 @@ COMMON_SOURCES = \
|
||||
src/pcre2_auto_possess.c \
|
||||
src/pcre2_chkdint.c \
|
||||
src/pcre2_compile.c \
|
||||
src/pcre2_compile.h \
|
||||
src/pcre2_compile_class.c \
|
||||
src/pcre2_config.c \
|
||||
src/pcre2_context.c \
|
||||
src/pcre2_convert.c \
|
||||
@@ -896,6 +929,7 @@ COMMON_SOURCES = \
|
||||
src/pcre2_find_bracket.c \
|
||||
src/pcre2_internal.h \
|
||||
src/pcre2_intmodedep.h \
|
||||
src/pcre2_jit_char_inc.h \
|
||||
src/pcre2_jit_compile.c \
|
||||
src/pcre2_maketables.c \
|
||||
src/pcre2_match.c \
|
||||
@@ -912,6 +946,7 @@ COMMON_SOURCES = \
|
||||
src/pcre2_tables.c \
|
||||
src/pcre2_ucd.c \
|
||||
src/pcre2_ucp.h \
|
||||
src/pcre2_util.h \
|
||||
src/pcre2_valid_utf.c \
|
||||
src/pcre2_xclass.c
|
||||
|
||||
@@ -991,7 +1026,7 @@ all: $(BUILT_SOURCES)
|
||||
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
@@ -1017,9 +1052,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
@@ -1030,7 +1065,7 @@ src/config.h: src/stamp-h1
|
||||
src/stamp-h1: $(top_srcdir)/src/config.h.in $(top_builddir)/config.status
|
||||
@rm -f src/stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status src/config.h
|
||||
$(top_srcdir)/src/config.h.in: $(am__configure_deps)
|
||||
$(top_srcdir)/src/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f src/stamp-h1
|
||||
touch $@
|
||||
@@ -1146,6 +1181,8 @@ src/libpcre2_16_la-pcre2_chkdint.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_16_la-pcre2_compile.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_16_la-pcre2_compile_class.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_16_la-pcre2_config.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_16_la-pcre2_context.lo: src/$(am__dirstamp) \
|
||||
@@ -1205,6 +1242,8 @@ src/libpcre2_32_la-pcre2_chkdint.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_32_la-pcre2_compile.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_32_la-pcre2_compile_class.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_32_la-pcre2_config.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_32_la-pcre2_context.lo: src/$(am__dirstamp) \
|
||||
@@ -1264,6 +1303,8 @@ src/libpcre2_8_la-pcre2_chkdint.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_8_la-pcre2_compile.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_8_la-pcre2_compile_class.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_8_la-pcre2_config.lo: src/$(am__dirstamp) \
|
||||
src/$(DEPDIR)/$(am__dirstamp)
|
||||
src/libpcre2_8_la-pcre2_context.lo: src/$(am__dirstamp) \
|
||||
@@ -1376,6 +1417,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_chartables.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_chkdint.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_compile.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_compile_class.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_config.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_context.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_convert.Plo@am__quote@ # am--include-marker
|
||||
@@ -1404,6 +1446,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_chartables.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_chkdint.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_compile.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_compile_class.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_config.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_context.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_convert.Plo@am__quote@ # am--include-marker
|
||||
@@ -1432,6 +1475,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_chartables.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_chkdint.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_compile.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_compile_class.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_config.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_context.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_convert.Plo@am__quote@ # am--include-marker
|
||||
@@ -1510,6 +1554,13 @@ src/libpcre2_16_la-pcre2_compile.lo: src/pcre2_compile.c
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_16_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_16_la-pcre2_compile.lo `test -f 'src/pcre2_compile.c' || echo '$(srcdir)/'`src/pcre2_compile.c
|
||||
|
||||
src/libpcre2_16_la-pcre2_compile_class.lo: src/pcre2_compile_class.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_16_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_16_la-pcre2_compile_class.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_16_la-pcre2_compile_class.Tpo -c -o src/libpcre2_16_la-pcre2_compile_class.lo `test -f 'src/pcre2_compile_class.c' || echo '$(srcdir)/'`src/pcre2_compile_class.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_16_la-pcre2_compile_class.Tpo src/$(DEPDIR)/libpcre2_16_la-pcre2_compile_class.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/pcre2_compile_class.c' object='src/libpcre2_16_la-pcre2_compile_class.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_16_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_16_la-pcre2_compile_class.lo `test -f 'src/pcre2_compile_class.c' || echo '$(srcdir)/'`src/pcre2_compile_class.c
|
||||
|
||||
src/libpcre2_16_la-pcre2_config.lo: src/pcre2_config.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_16_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_16_la-pcre2_config.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_16_la-pcre2_config.Tpo -c -o src/libpcre2_16_la-pcre2_config.lo `test -f 'src/pcre2_config.c' || echo '$(srcdir)/'`src/pcre2_config.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_16_la-pcre2_config.Tpo src/$(DEPDIR)/libpcre2_16_la-pcre2_config.Plo
|
||||
@@ -1706,6 +1757,13 @@ src/libpcre2_32_la-pcre2_compile.lo: src/pcre2_compile.c
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_32_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_32_la-pcre2_compile.lo `test -f 'src/pcre2_compile.c' || echo '$(srcdir)/'`src/pcre2_compile.c
|
||||
|
||||
src/libpcre2_32_la-pcre2_compile_class.lo: src/pcre2_compile_class.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_32_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_32_la-pcre2_compile_class.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_32_la-pcre2_compile_class.Tpo -c -o src/libpcre2_32_la-pcre2_compile_class.lo `test -f 'src/pcre2_compile_class.c' || echo '$(srcdir)/'`src/pcre2_compile_class.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_32_la-pcre2_compile_class.Tpo src/$(DEPDIR)/libpcre2_32_la-pcre2_compile_class.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/pcre2_compile_class.c' object='src/libpcre2_32_la-pcre2_compile_class.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_32_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_32_la-pcre2_compile_class.lo `test -f 'src/pcre2_compile_class.c' || echo '$(srcdir)/'`src/pcre2_compile_class.c
|
||||
|
||||
src/libpcre2_32_la-pcre2_config.lo: src/pcre2_config.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_32_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_32_la-pcre2_config.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_32_la-pcre2_config.Tpo -c -o src/libpcre2_32_la-pcre2_config.lo `test -f 'src/pcre2_config.c' || echo '$(srcdir)/'`src/pcre2_config.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_32_la-pcre2_config.Tpo src/$(DEPDIR)/libpcre2_32_la-pcre2_config.Plo
|
||||
@@ -1902,6 +1960,13 @@ src/libpcre2_8_la-pcre2_compile.lo: src/pcre2_compile.c
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_8_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_8_la-pcre2_compile.lo `test -f 'src/pcre2_compile.c' || echo '$(srcdir)/'`src/pcre2_compile.c
|
||||
|
||||
src/libpcre2_8_la-pcre2_compile_class.lo: src/pcre2_compile_class.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_8_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_8_la-pcre2_compile_class.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_8_la-pcre2_compile_class.Tpo -c -o src/libpcre2_8_la-pcre2_compile_class.lo `test -f 'src/pcre2_compile_class.c' || echo '$(srcdir)/'`src/pcre2_compile_class.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_8_la-pcre2_compile_class.Tpo src/$(DEPDIR)/libpcre2_8_la-pcre2_compile_class.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/pcre2_compile_class.c' object='src/libpcre2_8_la-pcre2_compile_class.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_8_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_8_la-pcre2_compile_class.lo `test -f 'src/pcre2_compile_class.c' || echo '$(srcdir)/'`src/pcre2_compile_class.c
|
||||
|
||||
src/libpcre2_8_la-pcre2_config.lo: src/pcre2_config.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_8_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_8_la-pcre2_config.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_8_la-pcre2_config.Tpo -c -o src/libpcre2_8_la-pcre2_config.lo `test -f 'src/pcre2_config.c' || echo '$(srcdir)/'`src/pcre2_config.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_8_la-pcre2_config.Tpo src/$(DEPDIR)/libpcre2_8_la-pcre2_config.Plo
|
||||
@@ -2114,27 +2179,6 @@ uninstall-dist_docDATA:
|
||||
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
|
||||
install-dist_htmlDATA: $(dist_html_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-dist_htmlDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir)
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
@@ -2437,7 +2481,6 @@ distdir-am: $(DISTFILES)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
@@ -2467,7 +2510,6 @@ dist-shar: distdir
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
@@ -2574,7 +2616,7 @@ all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(DATA) \
|
||||
install-binPROGRAMS: install-libLTLIBRARIES
|
||||
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: $(BUILT_SOURCES)
|
||||
@@ -2630,6 +2672,7 @@ distclean: distclean-am
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_chartables.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_chkdint.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_compile.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_compile_class.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_config.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_context.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_convert.Plo
|
||||
@@ -2658,6 +2701,7 @@ distclean: distclean-am
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_chartables.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_chkdint.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_compile.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_compile_class.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_config.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_context.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_convert.Plo
|
||||
@@ -2686,6 +2730,7 @@ distclean: distclean-am
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_chartables.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_chkdint.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_compile.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_compile_class.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_config.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_context.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_convert.Plo
|
||||
@@ -2728,8 +2773,8 @@ info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dist_docDATA install-dist_htmlDATA \
|
||||
install-includeHEADERS install-nodist_includeHEADERS
|
||||
install-data-am: install-dist_docDATA install-includeHEADERS \
|
||||
install-nodist_includeHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
@@ -2765,6 +2810,7 @@ maintainer-clean: maintainer-clean-am
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_chartables.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_chkdint.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_compile.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_compile_class.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_config.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_context.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_16_la-pcre2_convert.Plo
|
||||
@@ -2793,6 +2839,7 @@ maintainer-clean: maintainer-clean-am
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_chartables.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_chkdint.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_compile.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_compile_class.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_config.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_context.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_32_la-pcre2_convert.Plo
|
||||
@@ -2821,6 +2868,7 @@ maintainer-clean: maintainer-clean-am
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_chartables.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_chkdint.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_compile.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_compile_class.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_config.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_context.Plo
|
||||
-rm -f src/$(DEPDIR)/libpcre2_8_la-pcre2_convert.Plo
|
||||
@@ -2864,9 +2912,8 @@ ps: ps-am
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
|
||||
uninstall-dist_docDATA uninstall-dist_htmlDATA \
|
||||
uninstall-includeHEADERS uninstall-libLTLIBRARIES \
|
||||
uninstall-nodist_includeHEADERS
|
||||
uninstall-dist_docDATA uninstall-includeHEADERS \
|
||||
uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS
|
||||
|
||||
.MAKE: all check check-am install install-am install-exec \
|
||||
install-strip
|
||||
@@ -2882,10 +2929,10 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-binSCRIPTS install-data install-data-am \
|
||||
install-dist_docDATA install-dist_htmlDATA install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-includeHEADERS install-info \
|
||||
install-info-am install-libLTLIBRARIES install-man \
|
||||
install-dist_docDATA install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am \
|
||||
install-includeHEADERS install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man \
|
||||
install-nodist_includeHEADERS install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
@@ -2893,9 +2940,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
recheck tags tags-am uninstall uninstall-am \
|
||||
uninstall-binPROGRAMS uninstall-binSCRIPTS \
|
||||
uninstall-dist_docDATA uninstall-dist_htmlDATA \
|
||||
uninstall-includeHEADERS uninstall-libLTLIBRARIES \
|
||||
uninstall-nodist_includeHEADERS
|
||||
uninstall-dist_docDATA uninstall-includeHEADERS \
|
||||
uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ o Started this NMAP_MODIFICATIONS file
|
||||
o Removed these directories:
|
||||
doc
|
||||
testdata
|
||||
src/sljit/
|
||||
deps
|
||||
|
||||
o Removed these files:
|
||||
src/pcre2test.c
|
||||
@@ -18,11 +18,11 @@ src/pcre2grep.c
|
||||
src/pcre2demo.c
|
||||
src/pcre2_fuzzsupport.c
|
||||
src/pcre2_printint.c
|
||||
src/pcre2_jit_char_inc.h
|
||||
src/pcre2_jit_match.c
|
||||
src/pcre2_jit_misc.c
|
||||
src/pcre2_jit_neon_inc.h
|
||||
src/pcre2_jit_simd_inc.h
|
||||
src/pcre2_jit_test.c
|
||||
RunGrepTest.bat
|
||||
RunGrepTest
|
||||
RunTest
|
||||
@@ -34,18 +34,14 @@ libpcre2-8.pc.in
|
||||
libpcre2-posix.pc.in
|
||||
cmake/FindEditline.cmake
|
||||
cmake/FindReadline.cmake
|
||||
Detrail
|
||||
PrepareRelease
|
||||
CheckMan
|
||||
132html
|
||||
CleanTxt
|
||||
ChangeLog
|
||||
NEWS
|
||||
HACKING
|
||||
COPYING [Look at LICENCE]
|
||||
COPYING [Look at LICENCE.md]
|
||||
README
|
||||
INSTALL
|
||||
NON-AUTOTOOLS-BUILDS
|
||||
|
||||
o Made relevant changes to Makefile.am, configure.ac, CMakeLists.txt, and
|
||||
src/pcre2_jit_compile.c to accommodate our smaller, non-JIT build.
|
||||
src/pcre2_jit_compile.c to accommodate our smaller, non-JIT build
|
||||
and to disable Unicode support by default.
|
||||
|
||||
44
libpcre/SECURITY.md
Normal file
44
libpcre/SECURITY.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Security policies
|
||||
|
||||
## Release security
|
||||
|
||||
The PCRE2 project provides source-only releases, with no binaries.
|
||||
|
||||
These source releases can be downloaded from the
|
||||
[GitHub Releases](https://github.com/PCRE2Project/pcre2/releases) page. Each
|
||||
release file is GPG-signed.
|
||||
|
||||
* Releases up to and including 10.44 are signed by Philip Hazel (GPG key:
|
||||
<kbd>45F68D54BBE23FB3039B46E59766E084FB0F43D8</kbd>)
|
||||
* Releases from 10.45 onwards will be signed by Nicholas Wilson (GPG key:
|
||||
<kbd>A95536204A3BB489715231282A98E77EB6F24CA8</kbd>, cross-signed by Philip
|
||||
Hazel's key for release continuity)
|
||||
|
||||
From releases 10.45 onwards, the source code will additionally be provided via
|
||||
Git checkout of the (GPG-signed) release tag.
|
||||
|
||||
Please contact the maintainers for any queries about release integrity or the
|
||||
project's supply-chain.
|
||||
|
||||
## Reporting vulnerabilities
|
||||
|
||||
The PCRE2 project prioritises security. We appreciate third-party testing and
|
||||
security research, and would be grateful if you could responsibly disclose your
|
||||
findings to us. We will make every effort to acknowledge your contributions.
|
||||
|
||||
To report a security issue, please use the GitHub Security Advisory
|
||||
["Report a Vulnerability"](https://github.com/PCRE2Project/pcre2/security/advisories/new)
|
||||
tab. (Alternatively, if you prefer you may send a GPG-encrypted email to one of
|
||||
the maintainers.)
|
||||
|
||||
### Timeline
|
||||
|
||||
As a very small volunteer team, we cannot guarantee rapid response, but would
|
||||
aim to respond within 1 week, or perhaps 2 during holidays.
|
||||
|
||||
### Response procedure
|
||||
|
||||
PCRE2 has never previously made a rapid or embargoed release in response to a
|
||||
security incident. We would work with security managers from trusted downstream
|
||||
distributors, such as major Linux distributions, before disclosing the
|
||||
vulnerability publicly.
|
||||
1
libpcre/WORKSPACE.bazel
Normal file
1
libpcre/WORKSPACE.bazel
Normal file
@@ -0,0 +1 @@
|
||||
# See MODULE.bazel
|
||||
381
libpcre/aclocal.m4
vendored
381
libpcre/aclocal.m4
vendored
@@ -20,6 +20,350 @@ You have another version of autoconf. It may work, but is not guaranteed to.
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||
|
||||
# pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*-
|
||||
# serial 12 (pkg-config-0.29.2)
|
||||
|
||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful, but
|
||||
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
dnl 02111-1307, USA.
|
||||
dnl
|
||||
dnl As a special exception to the GNU General Public License, if you
|
||||
dnl distribute this file as part of a program that contains a
|
||||
dnl configuration script generated by Autoconf, you may include it under
|
||||
dnl the same distribution terms that you use for the rest of that
|
||||
dnl program.
|
||||
|
||||
dnl PKG_PREREQ(MIN-VERSION)
|
||||
dnl -----------------------
|
||||
dnl Since: 0.29
|
||||
dnl
|
||||
dnl Verify that the version of the pkg-config macros are at least
|
||||
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
|
||||
dnl installed version of pkg-config, this checks the developer's version
|
||||
dnl of pkg.m4 when generating configure.
|
||||
dnl
|
||||
dnl To ensure that this macro is defined, also add:
|
||||
dnl m4_ifndef([PKG_PREREQ],
|
||||
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
|
||||
dnl
|
||||
dnl See the "Since" comment for each macro you use to see what version
|
||||
dnl of the macros you require.
|
||||
m4_defun([PKG_PREREQ],
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29.2])
|
||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
||||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||
])dnl PKG_PREREQ
|
||||
|
||||
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
dnl ----------------------------------
|
||||
dnl Since: 0.16
|
||||
dnl
|
||||
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
|
||||
dnl first found in the path. Checks that the version of pkg-config found
|
||||
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
|
||||
dnl used since that's the first version where most current features of
|
||||
dnl pkg-config existed.
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
||||
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
||||
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
||||
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
fi[]dnl
|
||||
])dnl PKG_PROG_PKG_CONFIG
|
||||
|
||||
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
dnl -------------------------------------------------------------------
|
||||
dnl Since: 0.18
|
||||
dnl
|
||||
dnl Check to see whether a particular set of modules exists. Similar to
|
||||
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
dnl
|
||||
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
dnl only at the first occurrence in configure.ac, so if the first place
|
||||
dnl it's called might be skipped (such as if it is within an "if", you
|
||||
dnl have to call PKG_CHECK_EXISTS manually
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_default([$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
dnl ---------------------------------------------
|
||||
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
|
||||
dnl pkg_failed based on the result.
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes ],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])dnl _PKG_CONFIG
|
||||
|
||||
dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||
dnl ---------------------------
|
||||
dnl Internal check to see if pkg-config supports short errors.
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
dnl [ACTION-IF-NOT-FOUND])
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Since: 0.4.0
|
||||
dnl
|
||||
dnl Note that if there is a possibility the first call to
|
||||
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $2])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
m4_default([$4], [AC_MSG_ERROR(
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT])[]dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
||||
])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
$3
|
||||
fi[]dnl
|
||||
])dnl PKG_CHECK_MODULES
|
||||
|
||||
|
||||
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
dnl [ACTION-IF-NOT-FOUND])
|
||||
dnl ---------------------------------------------------------------------
|
||||
dnl Since: 0.29
|
||||
dnl
|
||||
dnl Checks for existence of MODULES and gathers its build flags with
|
||||
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
|
||||
dnl and VARIABLE-PREFIX_LIBS from --libs.
|
||||
dnl
|
||||
dnl Note that if there is a possibility the first call to
|
||||
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
|
||||
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
|
||||
dnl configure.ac.
|
||||
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
_save_PKG_CONFIG=$PKG_CONFIG
|
||||
PKG_CONFIG="$PKG_CONFIG --static"
|
||||
PKG_CHECK_MODULES($@)
|
||||
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
|
||||
])dnl PKG_CHECK_MODULES_STATIC
|
||||
|
||||
|
||||
dnl PKG_INSTALLDIR([DIRECTORY])
|
||||
dnl -------------------------
|
||||
dnl Since: 0.27
|
||||
dnl
|
||||
dnl Substitutes the variable pkgconfigdir as the location where a module
|
||||
dnl should install pkg-config .pc files. By default the directory is
|
||||
dnl $libdir/pkgconfig, but the default can be changed by passing
|
||||
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||
dnl parameter.
|
||||
AC_DEFUN([PKG_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
||||
[with_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
])dnl PKG_INSTALLDIR
|
||||
|
||||
|
||||
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
|
||||
dnl --------------------------------
|
||||
dnl Since: 0.27
|
||||
dnl
|
||||
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||
dnl module should install arch-independent pkg-config .pc files. By
|
||||
dnl default the directory is $datadir/pkgconfig, but the default can be
|
||||
dnl changed by passing DIRECTORY. The user can override through the
|
||||
dnl --with-noarch-pkgconfigdir parameter.
|
||||
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([noarch-pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
||||
[with_noarch_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
])dnl PKG_NOARCH_INSTALLDIR
|
||||
|
||||
|
||||
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
||||
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
dnl -------------------------------------------
|
||||
dnl Since: 0.28
|
||||
dnl
|
||||
dnl Retrieves the value of the pkg-config variable for the given module.
|
||||
AC_DEFUN([PKG_CHECK_VAR],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
||||
|
||||
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
||||
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||
|
||||
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])dnl PKG_CHECK_VAR
|
||||
|
||||
dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
|
||||
dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
|
||||
dnl [DESCRIPTION], [DEFAULT])
|
||||
dnl ------------------------------------------
|
||||
dnl
|
||||
dnl Prepare a "--with-" configure option using the lowercase
|
||||
dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
|
||||
dnl PKG_CHECK_MODULES in a single macro.
|
||||
AC_DEFUN([PKG_WITH_MODULES],
|
||||
[
|
||||
m4_pushdef([with_arg], m4_tolower([$1]))
|
||||
|
||||
m4_pushdef([description],
|
||||
[m4_default([$5], [build with ]with_arg[ support])])
|
||||
|
||||
m4_pushdef([def_arg], [m4_default([$6], [auto])])
|
||||
m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
|
||||
m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
|
||||
|
||||
m4_case(def_arg,
|
||||
[yes],[m4_pushdef([with_without], [--without-]with_arg)],
|
||||
[m4_pushdef([with_without],[--with-]with_arg)])
|
||||
|
||||
AC_ARG_WITH(with_arg,
|
||||
AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
|
||||
[AS_TR_SH([with_]with_arg)=def_arg])
|
||||
|
||||
AS_CASE([$AS_TR_SH([with_]with_arg)],
|
||||
[yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
|
||||
[auto],[PKG_CHECK_MODULES([$1],[$2],
|
||||
[m4_n([def_action_if_found]) $3],
|
||||
[m4_n([def_action_if_not_found]) $4])])
|
||||
|
||||
m4_popdef([with_arg])
|
||||
m4_popdef([description])
|
||||
m4_popdef([def_arg])
|
||||
|
||||
])dnl PKG_WITH_MODULES
|
||||
|
||||
dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
|
||||
dnl [DESCRIPTION], [DEFAULT])
|
||||
dnl -----------------------------------------------
|
||||
dnl
|
||||
dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
|
||||
dnl check._[VARIABLE-PREFIX] is exported as make variable.
|
||||
AC_DEFUN([PKG_HAVE_WITH_MODULES],
|
||||
[
|
||||
PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
|
||||
|
||||
AM_CONDITIONAL([HAVE_][$1],
|
||||
[test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
|
||||
])dnl PKG_HAVE_WITH_MODULES
|
||||
|
||||
dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
|
||||
dnl [DESCRIPTION], [DEFAULT])
|
||||
dnl ------------------------------------------------------
|
||||
dnl
|
||||
dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
|
||||
dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
|
||||
dnl and preprocessor variable.
|
||||
AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
|
||||
[
|
||||
PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
|
||||
|
||||
AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
|
||||
[AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
|
||||
])dnl PKG_HAVE_DEFINE_WITH_MODULES
|
||||
|
||||
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
@@ -715,6 +1059,42 @@ fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_MAINTAINER_MODE([DEFAULT-MODE])
|
||||
# ----------------------------------
|
||||
# Control maintainer-specific portions of Makefiles.
|
||||
# Default is to disable them, unless 'enable' is passed literally.
|
||||
# For symmetry, 'disable' may be passed as well. Anyway, the user
|
||||
# can override the default with the --enable/--disable switch.
|
||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[m4_case(m4_default([$1], [disable]),
|
||||
[enable], [m4_define([am_maintainer_other], [disable])],
|
||||
[disable], [m4_define([am_maintainer_other], [enable])],
|
||||
[m4_define([am_maintainer_other], [enable])
|
||||
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
||||
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
|
||||
AC_ARG_ENABLE([maintainer-mode],
|
||||
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
|
||||
am_maintainer_other[ make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer])],
|
||||
[USE_MAINTAINER_MODE=$enableval],
|
||||
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
|
||||
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
||||
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
AC_SUBST([MAINT])dnl
|
||||
]
|
||||
)
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
@@ -1208,6 +1588,7 @@ AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([m4/ax_pthread.m4])
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
m4_include([m4/ltsugar.m4])
|
||||
|
||||
173
libpcre/build.zig
Normal file
173
libpcre/build.zig
Normal file
@@ -0,0 +1,173 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub const CodeUnitWidth = enum {
|
||||
@"8",
|
||||
@"16",
|
||||
@"32",
|
||||
};
|
||||
|
||||
pub fn build(b: *std.Build) !void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
const linkage = b.option(std.builtin.LinkMode, "linkage", "whether to statically or dynamically link the library") orelse @as(std.builtin.LinkMode, if (target.result.isGnuLibC()) .dynamic else .static);
|
||||
const codeUnitWidth = b.option(CodeUnitWidth, "code-unit-width", "Sets the code unit width") orelse .@"8";
|
||||
|
||||
const pcre2_header_dir = b.addWriteFiles();
|
||||
const pcre2_header = pcre2_header_dir.addCopyFile(b.path("src/pcre2.h.generic"), "pcre2.h");
|
||||
|
||||
const config_header = b.addConfigHeader(
|
||||
.{
|
||||
.style = .{ .cmake = b.path("config-cmake.h.in") },
|
||||
.include_path = "config.h",
|
||||
},
|
||||
.{
|
||||
.HAVE_ASSERT_H = true,
|
||||
.HAVE_UNISTD_H = (target.result.os.tag != .windows),
|
||||
.HAVE_WINDOWS_H = (target.result.os.tag == .windows),
|
||||
|
||||
.HAVE_MEMMOVE = true,
|
||||
.HAVE_STRERROR = true,
|
||||
|
||||
.SUPPORT_PCRE2_8 = codeUnitWidth == CodeUnitWidth.@"8",
|
||||
.SUPPORT_PCRE2_16 = codeUnitWidth == CodeUnitWidth.@"16",
|
||||
.SUPPORT_PCRE2_32 = codeUnitWidth == CodeUnitWidth.@"32",
|
||||
.SUPPORT_UNICODE = true,
|
||||
|
||||
.PCRE2_EXPORT = null,
|
||||
.PCRE2_LINK_SIZE = 2,
|
||||
.PCRE2_HEAP_LIMIT = 20000000,
|
||||
.PCRE2_MATCH_LIMIT = 10000000,
|
||||
.PCRE2_MATCH_LIMIT_DEPTH = "MATCH_LIMIT",
|
||||
.PCRE2_MAX_VARLOOKBEHIND = 255,
|
||||
.NEWLINE_DEFAULT = 2,
|
||||
.PCRE2_PARENS_NEST_LIMIT = 250,
|
||||
},
|
||||
);
|
||||
|
||||
// pcre2-8/16/32.so
|
||||
|
||||
const lib = std.Build.Step.Compile.create(b, .{
|
||||
.name = b.fmt("pcre2-{s}", .{@tagName(codeUnitWidth)}),
|
||||
.root_module = .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
},
|
||||
.kind = .lib,
|
||||
.linkage = linkage,
|
||||
});
|
||||
|
||||
lib.defineCMacro("HAVE_CONFIG_H", null);
|
||||
lib.defineCMacro("PCRE2_CODE_UNIT_WIDTH", @tagName(codeUnitWidth));
|
||||
if (linkage == .static) {
|
||||
lib.defineCMacro("PCRE2_STATIC", null);
|
||||
}
|
||||
|
||||
lib.addConfigHeader(config_header);
|
||||
lib.addIncludePath(pcre2_header_dir.getDirectory());
|
||||
lib.addIncludePath(b.path("src"));
|
||||
|
||||
lib.addCSourceFile(.{
|
||||
.file = b.addWriteFiles().addCopyFile(b.path("src/pcre2_chartables.c.dist"), "pcre2_chartables.c"),
|
||||
});
|
||||
|
||||
lib.addCSourceFiles(.{
|
||||
.files = &.{
|
||||
"src/pcre2_auto_possess.c",
|
||||
"src/pcre2_chkdint.c",
|
||||
"src/pcre2_compile.c",
|
||||
"src/pcre2_compile_class.c",
|
||||
"src/pcre2_config.c",
|
||||
"src/pcre2_context.c",
|
||||
"src/pcre2_convert.c",
|
||||
"src/pcre2_dfa_match.c",
|
||||
"src/pcre2_error.c",
|
||||
"src/pcre2_extuni.c",
|
||||
"src/pcre2_find_bracket.c",
|
||||
"src/pcre2_jit_compile.c",
|
||||
"src/pcre2_maketables.c",
|
||||
"src/pcre2_match.c",
|
||||
"src/pcre2_match_data.c",
|
||||
"src/pcre2_newline.c",
|
||||
"src/pcre2_ord2utf.c",
|
||||
"src/pcre2_pattern_info.c",
|
||||
"src/pcre2_script_run.c",
|
||||
"src/pcre2_serialize.c",
|
||||
"src/pcre2_string_utils.c",
|
||||
"src/pcre2_study.c",
|
||||
"src/pcre2_substitute.c",
|
||||
"src/pcre2_substring.c",
|
||||
"src/pcre2_tables.c",
|
||||
"src/pcre2_ucd.c",
|
||||
"src/pcre2_valid_utf.c",
|
||||
"src/pcre2_xclass.c",
|
||||
},
|
||||
});
|
||||
|
||||
lib.installHeader(pcre2_header, "pcre2.h");
|
||||
b.installArtifact(lib);
|
||||
|
||||
|
||||
// pcre2test
|
||||
|
||||
const pcre2test = b.addExecutable(.{
|
||||
.name = "pcre2test",
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
|
||||
// pcre2-posix.so
|
||||
|
||||
if (codeUnitWidth == CodeUnitWidth.@"8") {
|
||||
const posixLib = std.Build.Step.Compile.create(b, .{
|
||||
.name = "pcre2-posix",
|
||||
.root_module = .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
},
|
||||
.kind = .lib,
|
||||
.linkage = linkage,
|
||||
});
|
||||
|
||||
posixLib.defineCMacro("HAVE_CONFIG_H", null);
|
||||
posixLib.defineCMacro("PCRE2_CODE_UNIT_WIDTH", @tagName(codeUnitWidth));
|
||||
if (linkage == .static) {
|
||||
posixLib.defineCMacro("PCRE2_STATIC", null);
|
||||
}
|
||||
|
||||
posixLib.addConfigHeader(config_header);
|
||||
posixLib.addIncludePath(pcre2_header_dir.getDirectory());
|
||||
posixLib.addIncludePath(b.path("src"));
|
||||
|
||||
posixLib.addCSourceFiles(.{
|
||||
.files = &.{
|
||||
"src/pcre2posix.c",
|
||||
},
|
||||
});
|
||||
|
||||
posixLib.installHeader(b.path("src/pcre2posix.h"), "pcre2posix.h");
|
||||
b.installArtifact(posixLib);
|
||||
|
||||
pcre2test.linkLibrary(posixLib);
|
||||
}
|
||||
|
||||
|
||||
// pcre2test (again)
|
||||
|
||||
pcre2test.defineCMacro("HAVE_CONFIG_H", null);
|
||||
|
||||
pcre2test.addConfigHeader(config_header);
|
||||
pcre2test.addIncludePath(pcre2_header_dir.getDirectory());
|
||||
pcre2test.addIncludePath(b.path("src"));
|
||||
|
||||
pcre2test.addCSourceFile(.{
|
||||
.file = b.path("src/pcre2test.c"),
|
||||
});
|
||||
|
||||
pcre2test.linkLibC();
|
||||
pcre2test.linkLibrary(lib);
|
||||
|
||||
b.installArtifact(pcre2test);
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... )
|
||||
# This macro is intended to be used in FindXXX.cmake modules files.
|
||||
# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and
|
||||
# it also sets the <UPPERCASED_NAME>_FOUND variable.
|
||||
# The package is found if all variables listed are TRUE.
|
||||
# Example:
|
||||
#
|
||||
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
|
||||
#
|
||||
# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and
|
||||
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
|
||||
# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
|
||||
# independent whether QUIET was used or not.
|
||||
# If it is found, the location is reported using the VAR1 argument, so
|
||||
# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out.
|
||||
# If the second argument is DEFAULT_MSG, the message in the failure case will
|
||||
# be "Could NOT find LibXml2", if you don't like this message you can specify
|
||||
# your own custom failure message there.
|
||||
|
||||
MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
|
||||
|
||||
IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
|
||||
IF (${_NAME}_FIND_REQUIRED)
|
||||
SET(_FAIL_MESSAGE "Could not find REQUIRED package ${_NAME}")
|
||||
ELSE (${_NAME}_FIND_REQUIRED)
|
||||
SET(_FAIL_MESSAGE "Could not find OPTIONAL package ${_NAME}")
|
||||
ENDIF (${_NAME}_FIND_REQUIRED)
|
||||
ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
|
||||
SET(_FAIL_MESSAGE "${_FAIL_MSG}")
|
||||
ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
|
||||
|
||||
STRING(TOUPPER ${_NAME} _NAME_UPPER)
|
||||
|
||||
SET(${_NAME_UPPER}_FOUND TRUE)
|
||||
IF(NOT ${_VAR1})
|
||||
SET(${_NAME_UPPER}_FOUND FALSE)
|
||||
ENDIF(NOT ${_VAR1})
|
||||
|
||||
FOREACH(_CURRENT_VAR ${ARGN})
|
||||
IF(NOT ${_CURRENT_VAR})
|
||||
SET(${_NAME_UPPER}_FOUND FALSE)
|
||||
ENDIF(NOT ${_CURRENT_VAR})
|
||||
ENDFOREACH(_CURRENT_VAR)
|
||||
|
||||
IF (${_NAME_UPPER}_FOUND)
|
||||
IF (NOT ${_NAME}_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found ${_NAME}: ${${_VAR1}}")
|
||||
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
|
||||
ELSE (${_NAME_UPPER}_FOUND)
|
||||
IF (${_NAME}_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}")
|
||||
ELSE (${_NAME}_FIND_REQUIRED)
|
||||
IF (NOT ${_NAME}_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "${_FAIL_MESSAGE}")
|
||||
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
|
||||
ENDIF (${_NAME}_FIND_REQUIRED)
|
||||
ENDIF (${_NAME_UPPER}_FOUND)
|
||||
ENDMACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
|
||||
@@ -4,8 +4,7 @@ set(PACKAGE_VERSION_PATCH 0)
|
||||
set(PACKAGE_VERSION @PCRE2_MAJOR@.@PCRE2_MINOR@.0)
|
||||
|
||||
# Check whether the requested PACKAGE_FIND_VERSION is compatible
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION OR
|
||||
PACKAGE_VERSION_MAJOR GREATER PACKAGE_FIND_VERSION_MAJOR)
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION OR PACKAGE_VERSION_MAJOR GREATER PACKAGE_FIND_VERSION_MAJOR)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
|
||||
@@ -30,31 +30,49 @@ set(PCRE2_16BIT_NAME pcre2-16)
|
||||
set(PCRE2_32BIT_NAME pcre2-32)
|
||||
set(PCRE2_POSIX_NAME pcre2-posix)
|
||||
find_path(PCRE2_INCLUDE_DIR NAMES pcre2.h DOC "PCRE2 include directory")
|
||||
if (PCRE2_USE_STATIC_LIBS)
|
||||
if (MSVC)
|
||||
if(PCRE2_USE_STATIC_LIBS)
|
||||
if(MSVC)
|
||||
set(PCRE2_8BIT_NAME pcre2-8-static)
|
||||
set(PCRE2_16BIT_NAME pcre2-16-static)
|
||||
set(PCRE2_32BIT_NAME pcre2-32-static)
|
||||
set(PCRE2_POSIX_NAME pcre2-posix-static)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
set(PCRE2_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
|
||||
set(PCRE2_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
else ()
|
||||
else()
|
||||
set(PCRE2_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
|
||||
if (MINGW AND PCRE2_NON_STANDARD_LIB_PREFIX)
|
||||
if(MINGW AND PCRE2_NON_STANDARD_LIB_PREFIX)
|
||||
set(PCRE2_PREFIX "")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
set(PCRE2_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
if (MINGW AND PCRE2_NON_STANDARD_LIB_SUFFIX)
|
||||
if(MINGW AND PCRE2_NON_STANDARD_LIB_SUFFIX)
|
||||
set(PCRE2_SUFFIX "-0.dll")
|
||||
endif ()
|
||||
endif ()
|
||||
find_library(PCRE2_8BIT_LIBRARY NAMES ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}d${PCRE2_SUFFIX} DOC "8 bit PCRE2 library")
|
||||
find_library(PCRE2_16BIT_LIBRARY NAMES ${PCRE2_PREFIX}${PCRE2_16BIT_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_16BIT_NAME}d${PCRE2_SUFFIX} DOC "16 bit PCRE2 library")
|
||||
find_library(PCRE2_32BIT_LIBRARY NAMES ${PCRE2_PREFIX}${PCRE2_32BIT_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_32BIT_NAME}d${PCRE2_SUFFIX} DOC "32 bit PCRE2 library")
|
||||
find_library(PCRE2_POSIX_LIBRARY NAMES ${PCRE2_PREFIX}${PCRE2_POSIX_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_POSIX_NAME}d${PCRE2_SUFFIX} DOC "8 bit POSIX PCRE2 library")
|
||||
elseif(MSVC)
|
||||
set(PCRE2_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
endif()
|
||||
endif()
|
||||
find_library(
|
||||
PCRE2_8BIT_LIBRARY
|
||||
NAMES ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}d${PCRE2_SUFFIX}
|
||||
DOC "8 bit PCRE2 library"
|
||||
)
|
||||
find_library(
|
||||
PCRE2_16BIT_LIBRARY
|
||||
NAMES ${PCRE2_PREFIX}${PCRE2_16BIT_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_16BIT_NAME}d${PCRE2_SUFFIX}
|
||||
DOC "16 bit PCRE2 library"
|
||||
)
|
||||
find_library(
|
||||
PCRE2_32BIT_LIBRARY
|
||||
NAMES ${PCRE2_PREFIX}${PCRE2_32BIT_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_32BIT_NAME}d${PCRE2_SUFFIX}
|
||||
DOC "32 bit PCRE2 library"
|
||||
)
|
||||
find_library(
|
||||
PCRE2_POSIX_LIBRARY
|
||||
NAMES ${PCRE2_PREFIX}${PCRE2_POSIX_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_POSIX_NAME}d${PCRE2_SUFFIX}
|
||||
DOC "8 bit POSIX PCRE2 library"
|
||||
)
|
||||
unset(PCRE2_NON_STANDARD_LIB_PREFIX)
|
||||
unset(PCRE2_NON_STANDARD_LIB_SUFFIX)
|
||||
unset(PCRE2_8BIT_NAME)
|
||||
@@ -63,51 +81,55 @@ unset(PCRE2_32BIT_NAME)
|
||||
unset(PCRE2_POSIX_NAME)
|
||||
|
||||
# Set version
|
||||
if (PCRE2_INCLUDE_DIR)
|
||||
if(PCRE2_INCLUDE_DIR)
|
||||
set(PCRE2_VERSION "@PCRE2_MAJOR@.@PCRE2_MINOR@.0")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
# Which components have been found.
|
||||
if (PCRE2_8BIT_LIBRARY)
|
||||
if(PCRE2_8BIT_LIBRARY)
|
||||
set(PCRE2_8BIT_FOUND TRUE)
|
||||
endif ()
|
||||
if (PCRE2_16BIT_LIBRARY)
|
||||
endif()
|
||||
if(PCRE2_16BIT_LIBRARY)
|
||||
set(PCRE2_16BIT_FOUND TRUE)
|
||||
endif ()
|
||||
if (PCRE2_32BIT_LIBRARY)
|
||||
endif()
|
||||
if(PCRE2_32BIT_LIBRARY)
|
||||
set(PCRE2_32BIT_FOUND TRUE)
|
||||
endif ()
|
||||
if (PCRE2_POSIX_LIBRARY)
|
||||
endif()
|
||||
if(PCRE2_POSIX_LIBRARY)
|
||||
set(PCRE2_POSIX_FOUND TRUE)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
# Check if at least one component has been specified.
|
||||
list(LENGTH PCRE2_FIND_COMPONENTS PCRE2_NCOMPONENTS)
|
||||
if (PCRE2_NCOMPONENTS LESS 1)
|
||||
if(PCRE2_NCOMPONENTS LESS 1)
|
||||
message(FATAL_ERROR "No components have been specified. This is not allowed. Please, specify at least one component.")
|
||||
endif ()
|
||||
endif()
|
||||
unset(PCRE2_NCOMPONENTS)
|
||||
|
||||
# When POSIX component has been specified make sure that also 8BIT component is specified.
|
||||
set(PCRE2_8BIT_COMPONENT FALSE)
|
||||
set(PCRE2_POSIX_COMPONENT FALSE)
|
||||
foreach(component ${PCRE2_FIND_COMPONENTS})
|
||||
if (component STREQUAL "8BIT")
|
||||
if(component STREQUAL "8BIT")
|
||||
set(PCRE2_8BIT_COMPONENT TRUE)
|
||||
elseif (component STREQUAL "POSIX")
|
||||
elseif(component STREQUAL "POSIX")
|
||||
set(PCRE2_POSIX_COMPONENT TRUE)
|
||||
endif ()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (PCRE2_POSIX_COMPONENT AND NOT PCRE2_8BIT_COMPONENT)
|
||||
message(FATAL_ERROR "The component POSIX is specified while the 8BIT one is not. This is not allowed. Please, also specify the 8BIT component.")
|
||||
if(PCRE2_POSIX_COMPONENT AND NOT PCRE2_8BIT_COMPONENT)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"The component POSIX is specified while the 8BIT one is not. This is not allowed. Please, also specify the 8BIT component."
|
||||
)
|
||||
endif()
|
||||
unset(PCRE2_8BIT_COMPONENT)
|
||||
unset(PCRE2_POSIX_COMPONENT)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG "${CMAKE_CURRENT_LIST_FILE}")
|
||||
find_package_handle_standard_args(PCRE2
|
||||
find_package_handle_standard_args(
|
||||
PCRE2
|
||||
FOUND_VAR PCRE2_FOUND
|
||||
REQUIRED_VARS PCRE2_INCLUDE_DIR
|
||||
HANDLE_COMPONENTS
|
||||
@@ -116,31 +138,31 @@ find_package_handle_standard_args(PCRE2
|
||||
)
|
||||
|
||||
set(PCRE2_LIBRARIES)
|
||||
if (PCRE2_FOUND)
|
||||
if(PCRE2_FOUND)
|
||||
foreach(component ${PCRE2_FIND_COMPONENTS})
|
||||
if (PCRE2_USE_STATIC_LIBS)
|
||||
if(PCRE2_USE_STATIC_LIBS)
|
||||
add_library(PCRE2::${component} STATIC IMPORTED)
|
||||
target_compile_definitions(PCRE2::${component} INTERFACE PCRE2_STATIC)
|
||||
else ()
|
||||
else()
|
||||
add_library(PCRE2::${component} SHARED IMPORTED)
|
||||
endif ()
|
||||
set_target_properties(PCRE2::${component} PROPERTIES
|
||||
IMPORTED_LOCATION "${PCRE2_${component}_LIBRARY}"
|
||||
IMPORTED_IMPLIB "${PCRE2_${component}_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PCRE2_INCLUDE_DIR}"
|
||||
endif()
|
||||
set_target_properties(
|
||||
PCRE2::${component}
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${PCRE2_${component}_LIBRARY}"
|
||||
IMPORTED_IMPLIB "${PCRE2_${component}_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PCRE2_INCLUDE_DIR}"
|
||||
)
|
||||
if (component STREQUAL "POSIX")
|
||||
set_target_properties(PCRE2::${component} PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES "PCRE2::8BIT"
|
||||
LINK_LIBRARIES "PCRE2::8BIT"
|
||||
if(component STREQUAL "POSIX")
|
||||
set_target_properties(
|
||||
PCRE2::${component}
|
||||
PROPERTIES INTERFACE_LINK_LIBRARIES "PCRE2::8BIT" LINK_LIBRARIES "PCRE2::8BIT"
|
||||
)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
set(PCRE2_LIBRARIES ${PCRE2_LIBRARIES} ${PCRE2_${component}_LIBRARY})
|
||||
mark_as_advanced(PCRE2_${component}_LIBRARY)
|
||||
endforeach()
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
PCRE2_INCLUDE_DIR
|
||||
)
|
||||
mark_as_advanced(PCRE2_INCLUDE_DIR)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/* config.h for CMake builds */
|
||||
|
||||
#cmakedefine HAVE_ASSERT_H 1
|
||||
#cmakedefine HAVE_BUILTIN_ASSUME 1
|
||||
#cmakedefine HAVE_BUILTIN_MUL_OVERFLOW 1
|
||||
#cmakedefine HAVE_BUILTIN_UNREACHABLE 1
|
||||
#cmakedefine HAVE_ATTRIBUTE_UNINITIALIZED 1
|
||||
#cmakedefine HAVE_DIRENT_H 1
|
||||
#cmakedefine HAVE_SYS_STAT_H 1
|
||||
@@ -17,7 +20,6 @@
|
||||
#cmakedefine SUPPORT_PCRE2_8 1
|
||||
#cmakedefine SUPPORT_PCRE2_16 1
|
||||
#cmakedefine SUPPORT_PCRE2_32 1
|
||||
#cmakedefine PCRE2_DEBUG 1
|
||||
#cmakedefine DISABLE_PERCENT_ZT 1
|
||||
|
||||
#cmakedefine SUPPORT_LIBBZ2 1
|
||||
@@ -39,18 +41,18 @@
|
||||
#cmakedefine HEAP_MATCH_RECURSE 1
|
||||
#cmakedefine NEVER_BACKSLASH_C 1
|
||||
|
||||
#define PCRE2_EXPORT @PCRE2_EXPORT@
|
||||
#define LINK_SIZE @PCRE2_LINK_SIZE@
|
||||
#define PCRE2_EXPORT @PCRE2_EXPORT@
|
||||
#define LINK_SIZE @PCRE2_LINK_SIZE@
|
||||
#define HEAP_LIMIT @PCRE2_HEAP_LIMIT@
|
||||
#define MATCH_LIMIT @PCRE2_MATCH_LIMIT@
|
||||
#define MATCH_LIMIT_DEPTH @PCRE2_MATCH_LIMIT_DEPTH@
|
||||
#define MATCH_LIMIT @PCRE2_MATCH_LIMIT@
|
||||
#define MATCH_LIMIT_DEPTH @PCRE2_MATCH_LIMIT_DEPTH@
|
||||
#define MAX_VARLOOKBEHIND @PCRE2_MAX_VARLOOKBEHIND@
|
||||
#define NEWLINE_DEFAULT @NEWLINE_DEFAULT@
|
||||
#define PARENS_NEST_LIMIT @PCRE2_PARENS_NEST_LIMIT@
|
||||
#define PCRE2GREP_BUFSIZE @PCRE2GREP_BUFSIZE@
|
||||
#define PCRE2GREP_MAX_BUFSIZE @PCRE2GREP_MAX_BUFSIZE@
|
||||
|
||||
#define MAX_NAME_SIZE 32
|
||||
#define MAX_NAME_SIZE 128
|
||||
#define MAX_NAME_COUNT 10000
|
||||
|
||||
/* end config.h for CMake builds */
|
||||
|
||||
16
libpcre/config.guess
vendored
16
libpcre/config.guess
vendored
@@ -1,14 +1,14 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2021 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2021-06-03'
|
||||
timestamp='2022-01-09'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
@@ -60,7 +60,7 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright 1992-2021 Free Software Foundation, Inc.
|
||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -437,7 +437,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
|
||||
# This test works for both compilers.
|
||||
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
SUN_ARCH=x86_64
|
||||
@@ -929,6 +929,9 @@ EOF
|
||||
i*:PW*:*)
|
||||
GUESS=$UNAME_MACHINE-pc-pw32
|
||||
;;
|
||||
*:SerenityOS:*:*)
|
||||
GUESS=$UNAME_MACHINE-pc-serenity
|
||||
;;
|
||||
*:Interix*:*)
|
||||
case $UNAME_MACHINE in
|
||||
x86)
|
||||
@@ -1522,6 +1525,9 @@ EOF
|
||||
i*86:rdos:*:*)
|
||||
GUESS=$UNAME_MACHINE-pc-rdos
|
||||
;;
|
||||
i*86:Fiwix:*:*)
|
||||
GUESS=$UNAME_MACHINE-pc-fiwix
|
||||
;;
|
||||
*:AROS:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-aros
|
||||
;;
|
||||
|
||||
20
libpcre/config.sub
vendored
20
libpcre/config.sub
vendored
@@ -1,14 +1,14 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2021 Free Software Foundation, Inc.
|
||||
# Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2021-08-14'
|
||||
timestamp='2022-01-03'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
@@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright 1992-2021 Free Software Foundation, Inc.
|
||||
Copyright 1992-2022 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -1020,6 +1020,11 @@ case $cpu-$vendor in
|
||||
;;
|
||||
|
||||
# Here we normalize CPU types with a missing or matching vendor
|
||||
armh-unknown | armh-alt)
|
||||
cpu=armv7l
|
||||
vendor=alt
|
||||
basic_os=${basic_os:-linux-gnueabihf}
|
||||
;;
|
||||
dpx20-unknown | dpx20-bull)
|
||||
cpu=rs6000
|
||||
vendor=bull
|
||||
@@ -1121,7 +1126,7 @@ case $cpu-$vendor in
|
||||
xscale-* | xscalee[bl]-*)
|
||||
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
|
||||
;;
|
||||
arm64-*)
|
||||
arm64-* | aarch64le-*)
|
||||
cpu=aarch64
|
||||
;;
|
||||
|
||||
@@ -1304,7 +1309,7 @@ esac
|
||||
if test x$basic_os != x
|
||||
then
|
||||
|
||||
# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
|
||||
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
|
||||
# set os.
|
||||
case $basic_os in
|
||||
gnu/linux*)
|
||||
@@ -1748,7 +1753,8 @@ case $os in
|
||||
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
|
||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
|
||||
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
||||
| fiwix* )
|
||||
;;
|
||||
# This one is extra strict with allowed versions
|
||||
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
||||
|
||||
2176
libpcre/configure
vendored
2176
libpcre/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -9,23 +9,32 @@ dnl The PCRE2_PRERELEASE feature is for identifying release candidates. It might
|
||||
dnl be defined as -RC2, for example. For real releases, it should be empty.
|
||||
|
||||
m4_define(pcre2_major, [10])
|
||||
m4_define(pcre2_minor, [43])
|
||||
m4_define(pcre2_minor, [45])
|
||||
m4_define(pcre2_prerelease, [])
|
||||
m4_define(pcre2_date, [2024-02-16])
|
||||
m4_define(pcre2_date, [2025-02-05])
|
||||
|
||||
# Libtool shared library interface versions (current:revision:age)
|
||||
m4_define(libpcre2_8_version, [12:0:12])
|
||||
m4_define(libpcre2_16_version, [12:0:12])
|
||||
m4_define(libpcre2_32_version, [12:0:12])
|
||||
m4_define(libpcre2_posix_version, [3:5:0])
|
||||
m4_define(libpcre2_8_version, [14:0:14])
|
||||
m4_define(libpcre2_16_version, [14:0:14])
|
||||
m4_define(libpcre2_32_version, [14:0:14])
|
||||
m4_define(libpcre2_posix_version, [3:6:0])
|
||||
|
||||
# NOTE: The CMakeLists.txt file searches for the above variables in the first
|
||||
# 50 lines of this file. Please update that if the variables above are moved.
|
||||
|
||||
AC_PREREQ([2.62])
|
||||
AC_PREREQ([2.60])
|
||||
AC_INIT([PCRE2],pcre2_major.pcre2_minor[]pcre2_prerelease,[],[pcre2])
|
||||
AC_CONFIG_SRCDIR([src/pcre2.h.in])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2 dist-zip foreign])
|
||||
ifelse(pcre2_prerelease, [-DEV],
|
||||
[dnl For development builds, ./configure is not checked in to Git, so we are
|
||||
dnl happy to have it regenerated as needed.
|
||||
AM_MAINTAINER_MODE([enable])],
|
||||
[dnl For a release build (or RC), the ./configure script we ship in the
|
||||
dnl tarball (and check in to the Git tag) should not be regenerated
|
||||
dnl implicitly. This is important if users want to check out a release tag
|
||||
dnl using Git.
|
||||
AM_MAINTAINER_MODE])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
AC_CONFIG_HEADERS(src/config.h)
|
||||
|
||||
@@ -73,6 +82,40 @@ AC_SYS_LARGEFILE
|
||||
|
||||
PCRE2_VISIBILITY
|
||||
|
||||
# Check for Clang __attribute__((uninitialized)) feature
|
||||
|
||||
AC_MSG_CHECKING([for __attribute__((uninitialized))])
|
||||
AC_LANG_PUSH([C])
|
||||
tmp_CFLAGS=$CFLAGS
|
||||
if test $WORKING_WERROR -eq 1; then
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
fi
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,
|
||||
[[char buf[128] __attribute__((uninitialized));(void)buf]])],
|
||||
[pcre2_cc_cv_attribute_uninitialized=yes],
|
||||
[pcre2_cc_cv_attribute_uninitialized=no])
|
||||
AC_MSG_RESULT([$pcre2_cc_cv_attribute_uninitialized])
|
||||
if test "$pcre2_cc_cv_attribute_uninitialized" = yes; then
|
||||
AC_DEFINE([HAVE_ATTRIBUTE_UNINITIALIZED], 1, [Define this if your compiler
|
||||
supports __attribute__((uninitialized))])
|
||||
fi
|
||||
CFLAGS=$tmp_CFLAGS
|
||||
AC_LANG_POP([C])
|
||||
|
||||
# Check for the assume() builtin
|
||||
|
||||
AC_MSG_CHECKING([for __assume()])
|
||||
AC_LANG_PUSH([C])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[__assume(1)]])],
|
||||
[pcre2_cc_cv_builtin_assume=yes],
|
||||
[pcre2_cc_cv_builtin_assume=no])
|
||||
AC_MSG_RESULT([$pcre2_cc_cv_builtin_assume])
|
||||
if test "$pcre2_cc_cv_builtin_assume" = yes; then
|
||||
AC_DEFINE([HAVE_BUILTIN_ASSUME], 1,
|
||||
[Define this if your compiler provides __assume()])
|
||||
fi
|
||||
AC_LANG_POP([C])
|
||||
|
||||
# Check for the mul_overflow() builtin
|
||||
|
||||
AC_MSG_CHECKING([for __builtin_mul_overflow()])
|
||||
@@ -95,22 +138,18 @@ if test "$pcre2_cc_cv_builtin_mul_overflow" = yes; then
|
||||
fi
|
||||
AC_LANG_POP([C])
|
||||
|
||||
# Check for Clang __attribute__((uninitialized)) feature
|
||||
# Check for the unreachable() builtin
|
||||
|
||||
AC_MSG_CHECKING([for __attribute__((uninitialized))])
|
||||
AC_MSG_CHECKING([for __builtin_unreachable()])
|
||||
AC_LANG_PUSH([C])
|
||||
tmp_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,
|
||||
[[char buf[128] __attribute__((uninitialized));(void)buf]])],
|
||||
[pcre2_cc_cv_attribute_uninitialized=yes],
|
||||
[pcre2_cc_cv_attribute_uninitialized=no])
|
||||
AC_MSG_RESULT([$pcre2_cc_cv_attribute_uninitialized])
|
||||
if test "$pcre2_cc_cv_attribute_uninitialized" = yes; then
|
||||
AC_DEFINE([HAVE_ATTRIBUTE_UNINITIALIZED], 1, [Define this if your compiler
|
||||
supports __attribute__((uninitialized))])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[int r;]], [[if (r) __builtin_unreachable()]])],
|
||||
[pcre2_cc_cv_builtin_unreachable=yes],
|
||||
[pcre2_cc_cv_builtin_unreachable=no])
|
||||
AC_MSG_RESULT([$pcre2_cc_cv_builtin_unreachable])
|
||||
if test "$pcre2_cc_cv_builtin_unreachable" = yes; then
|
||||
AC_DEFINE([HAVE_BUILTIN_UNREACHABLE], 1,
|
||||
[Define this if your compiler provides __builtin_unreachable()])
|
||||
fi
|
||||
CFLAGS=$tmp_CFLAGS
|
||||
AC_LANG_POP([C])
|
||||
|
||||
# Versioning
|
||||
@@ -178,6 +217,58 @@ AC_ARG_ENABLE(debug,
|
||||
[enable debugging code]),
|
||||
, enable_debug=no)
|
||||
|
||||
# Handle --enable-jit (disabled by default)
|
||||
AC_ARG_ENABLE(jit,
|
||||
AS_HELP_STRING([--enable-jit],
|
||||
[enable Just-In-Time compiling support]),
|
||||
, enable_jit=no)
|
||||
|
||||
# This code enables JIT if the hardware supports it.
|
||||
if test "$enable_jit" = "auto"; then
|
||||
AC_LANG(C)
|
||||
SAVE_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$srcdir
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#define SLJIT_CONFIG_AUTO 1
|
||||
#include "deps/sljit/sljit_src/sljitConfigCPU.h"
|
||||
#if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
|
||||
#error unsupported
|
||||
#endif]])], enable_jit=yes, enable_jit=no)
|
||||
CPPFLAGS=$SAVE_CPPFLAGS
|
||||
echo checking for JIT support on this hardware... $enable_jit
|
||||
fi
|
||||
|
||||
# Handle --enable-jit-sealloc (disabled by default and only experimental)
|
||||
case $host_os in
|
||||
linux* | netbsd*)
|
||||
AC_ARG_ENABLE(jit-sealloc,
|
||||
AS_HELP_STRING([--enable-jit-sealloc],
|
||||
[enable SELinux compatible execmem allocator in JIT (experimental)]),
|
||||
,enable_jit_sealloc=no)
|
||||
;;
|
||||
*)
|
||||
enable_jit_sealloc=unsupported
|
||||
;;
|
||||
esac
|
||||
|
||||
# Handle --disable-pcre2grep-jit (enabled by default)
|
||||
AC_ARG_ENABLE(pcre2grep-jit,
|
||||
AS_HELP_STRING([--disable-pcre2grep-jit],
|
||||
[disable JIT support in pcre2grep]),
|
||||
, enable_pcre2grep_jit=yes)
|
||||
|
||||
# Handle --disable-pcre2grep-callout (enabled by default)
|
||||
AC_ARG_ENABLE(pcre2grep-callout,
|
||||
AS_HELP_STRING([--disable-pcre2grep-callout],
|
||||
[disable callout script support in pcre2grep]),
|
||||
, enable_pcre2grep_callout=yes)
|
||||
|
||||
# Handle --disable-pcre2grep-callout-fork (enabled by default)
|
||||
AC_ARG_ENABLE(pcre2grep-callout-fork,
|
||||
AS_HELP_STRING([--disable-pcre2grep-callout-fork],
|
||||
[disable callout script fork support in pcre2grep]),
|
||||
, enable_pcre2grep_callout_fork=yes)
|
||||
|
||||
# Handle --enable-rebuild-chartables
|
||||
AC_ARG_ENABLE(rebuild-chartables,
|
||||
AS_HELP_STRING([--enable-rebuild-chartables],
|
||||
@@ -188,7 +279,7 @@ AC_ARG_ENABLE(rebuild-chartables,
|
||||
AC_ARG_ENABLE(unicode,
|
||||
AS_HELP_STRING([--disable-unicode],
|
||||
[disable Unicode support]),
|
||||
, enable_unicode=unset)
|
||||
, enable_unicode=no)
|
||||
|
||||
# Handle newline options
|
||||
ac_pcre2_newline=lf
|
||||
@@ -233,7 +324,7 @@ AC_ARG_ENABLE(never-backslash-C,
|
||||
# Handle --enable-ebcdic
|
||||
AC_ARG_ENABLE(ebcdic,
|
||||
AS_HELP_STRING([--enable-ebcdic],
|
||||
[assume EBCDIC coding rather than ASCII; incompatible with --enable-utf; use only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]),
|
||||
[assume EBCDIC coding rather than ASCII; incompatible with --enable-unicode; use only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]),
|
||||
, enable_ebcdic=no)
|
||||
|
||||
# Handle --enable-ebcdic-nl25
|
||||
@@ -242,6 +333,42 @@ AC_ARG_ENABLE(ebcdic-nl25,
|
||||
[set EBCDIC code for NL to 0x25 instead of 0x15; it implies --enable-ebcdic]),
|
||||
, enable_ebcdic_nl25=no)
|
||||
|
||||
# Handle --enable-pcre2grep-libz
|
||||
AC_ARG_ENABLE(pcre2grep-libz,
|
||||
AS_HELP_STRING([--enable-pcre2grep-libz],
|
||||
[link pcre2grep with libz to handle .gz files]),
|
||||
, enable_pcre2grep_libz=no)
|
||||
|
||||
# Handle --enable-pcre2grep-libbz2
|
||||
AC_ARG_ENABLE(pcre2grep-libbz2,
|
||||
AS_HELP_STRING([--enable-pcre2grep-libbz2],
|
||||
[link pcre2grep with libbz2 to handle .bz2 files]),
|
||||
, enable_pcre2grep_libbz2=no)
|
||||
|
||||
# Handle --with-pcre2grep-bufsize=N
|
||||
AC_ARG_WITH(pcre2grep-bufsize,
|
||||
AS_HELP_STRING([--with-pcre2grep-bufsize=N],
|
||||
[pcre2grep initial buffer size (default=20480, minimum=8192)]),
|
||||
, with_pcre2grep_bufsize=20480)
|
||||
|
||||
# Handle --with-pcre2grep-max-bufsize=N
|
||||
AC_ARG_WITH(pcre2grep-max-bufsize,
|
||||
AS_HELP_STRING([--with-pcre2grep-max-bufsize=N],
|
||||
[pcre2grep maximum buffer size (default=1048576, minimum=8192)]),
|
||||
, with_pcre2grep_max_bufsize=1048576)
|
||||
|
||||
# Handle --enable-pcre2test-libedit
|
||||
AC_ARG_ENABLE(pcre2test-libedit,
|
||||
AS_HELP_STRING([--enable-pcre2test-libedit],
|
||||
[link pcre2test with libedit]),
|
||||
, enable_pcre2test_libedit=no)
|
||||
|
||||
# Handle --enable-pcre2test-libreadline
|
||||
AC_ARG_ENABLE(pcre2test-libreadline,
|
||||
AS_HELP_STRING([--enable-pcre2test-libreadline],
|
||||
[link pcre2test with libreadline]),
|
||||
, enable_pcre2test_libreadline=no)
|
||||
|
||||
# Handle --with-link-size=N
|
||||
AC_ARG_WITH(link-size,
|
||||
AS_HELP_STRING([--with-link-size=N],
|
||||
@@ -301,6 +428,18 @@ AC_ARG_ENABLE(coverage,
|
||||
[enable code coverage reports using gcov]),
|
||||
, enable_coverage=no)
|
||||
|
||||
# Handle --enable-fuzz-support
|
||||
AC_ARG_ENABLE(fuzz_support,
|
||||
AS_HELP_STRING([--enable-fuzz-support],
|
||||
[enable fuzzer support]),
|
||||
, enable_fuzz_support=no)
|
||||
|
||||
# Handle --enable-diff-fuzz-support
|
||||
AC_ARG_ENABLE(diff_fuzz_support,
|
||||
AS_HELP_STRING([--enable-diff-fuzz-support],
|
||||
[enable differential fuzzer support]),
|
||||
, enable_diff_fuzz_support=no)
|
||||
|
||||
# Handle --disable-stack-for-recursion
|
||||
# This option became obsolete at release 10.30.
|
||||
AC_ARG_ENABLE(stack-for-recursion,,
|
||||
@@ -421,7 +560,7 @@ HAVE_BCOPY is defined. If your system has neither bcopy() nor memmove(), make
|
||||
sure both macros are undefined; an emulation function will then be used. */])
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS(limits.h sys/types.h sys/stat.h dirent.h)
|
||||
AC_CHECK_HEADERS(assert.h limits.h sys/types.h sys/stat.h dirent.h)
|
||||
AC_CHECK_HEADERS([windows.h], [HAVE_WINDOWS_H=1])
|
||||
AC_CHECK_HEADERS([sys/wait.h], [HAVE_SYS_WAIT_H=1])
|
||||
|
||||
@@ -429,10 +568,30 @@ AC_CHECK_HEADERS([sys/wait.h], [HAVE_SYS_WAIT_H=1])
|
||||
AM_CONDITIONAL(WITH_PCRE2_8, test "x$enable_pcre2_8" = "xyes")
|
||||
AM_CONDITIONAL(WITH_PCRE2_16, test "x$enable_pcre2_16" = "xyes")
|
||||
AM_CONDITIONAL(WITH_PCRE2_32, test "x$enable_pcre2_32" = "xyes")
|
||||
AM_CONDITIONAL(WITH_DEBUG, test "x$enable_debug" = "xyes")
|
||||
AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
|
||||
AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
|
||||
AM_CONDITIONAL(WITH_UNICODE, test "x$enable_unicode" = "xyes")
|
||||
AM_CONDITIONAL(WITH_VALGRIND, test "x$enable_valgrind" = "xyes")
|
||||
AM_CONDITIONAL(WITH_FUZZ_SUPPORT, test "x$enable_fuzz_support" = "xyes")
|
||||
AM_CONDITIONAL(WITH_DIFF_FUZZ_SUPPORT, test "x$enable_diff_fuzz_support" = "xyes")
|
||||
|
||||
if test "$enable_fuzz_support" = "yes" -a "$enable_pcre2_8" = "no"; then
|
||||
echo "** ERROR: Fuzzer support requires the 8-bit library"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "$enable_diff_fuzz_support" = "yes"; then
|
||||
if test "$enable_fuzz_support" = "no"; then
|
||||
echo "** ERROR: Differential fuzzing support requires fuzzing support"
|
||||
exit 1
|
||||
fi
|
||||
if test "$enable_jit" = "no"; then
|
||||
echo "** ERROR: Differential fuzzing support requires Just-in-Time compilation support"
|
||||
exit 1
|
||||
fi
|
||||
AC_DEFINE([SUPPORT_DIFF_FUZZ], [], [
|
||||
Define to any value to enable differential fuzzing support.])
|
||||
fi
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
@@ -456,6 +615,87 @@ realpath(".", buffer);
|
||||
],
|
||||
AC_MSG_RESULT([no]))
|
||||
|
||||
# Check for the availability of libz (aka zlib)
|
||||
|
||||
AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H=1])
|
||||
AC_CHECK_LIB([z], [gzopen], [HAVE_LIBZ=1])
|
||||
|
||||
# Check for the availability of libbz2. Originally we just used AC_CHECK_LIB,
|
||||
# as for libz. However, this had the following problem, diagnosed and fixed by
|
||||
# a user:
|
||||
#
|
||||
# - libbz2 uses the Pascal calling convention (WINAPI) for the functions
|
||||
# under Win32.
|
||||
# - The standard autoconf AC_CHECK_LIB fails to include "bzlib.h",
|
||||
# therefore missing the function definition.
|
||||
# - The compiler thus generates a "C" signature for the test function.
|
||||
# - The linker fails to find the "C" function.
|
||||
# - PCRE2 fails to configure if asked to do so against libbz2.
|
||||
#
|
||||
# Solution:
|
||||
#
|
||||
# - Replace the AC_CHECK_LIB test with a custom test.
|
||||
|
||||
AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_H=1])
|
||||
# Original test
|
||||
# AC_CHECK_LIB([bz2], [BZ2_bzopen], [HAVE_LIBBZ2=1])
|
||||
#
|
||||
# Custom test follows
|
||||
|
||||
AC_MSG_CHECKING([for libbz2])
|
||||
OLD_LIBS="$LIBS"
|
||||
LIBS="$LIBS -lbz2"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifdef HAVE_BZLIB_H
|
||||
#include <bzlib.h>
|
||||
#endif]],
|
||||
[[return (int)BZ2_bzopen("conftest", "rb");]])],
|
||||
[AC_MSG_RESULT([yes]);HAVE_LIBBZ2=1; break;],
|
||||
AC_MSG_RESULT([no]))
|
||||
LIBS="$OLD_LIBS"
|
||||
|
||||
# Check for the availabiity of libreadline
|
||||
|
||||
if test "$enable_pcre2test_libreadline" = "yes"; then
|
||||
AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_H=1])
|
||||
AC_CHECK_HEADERS([readline/history.h], [HAVE_HISTORY_H=1])
|
||||
AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lreadline"],
|
||||
[unset ac_cv_lib_readline_readline;
|
||||
AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltinfo"],
|
||||
[unset ac_cv_lib_readline_readline;
|
||||
AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lcurses"],
|
||||
[unset ac_cv_lib_readline_readline;
|
||||
AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncurses"],
|
||||
[unset ac_cv_lib_readline_readline;
|
||||
AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncursesw"],
|
||||
[unset ac_cv_lib_readline_readline;
|
||||
AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltermcap"],
|
||||
[LIBREADLINE=""],
|
||||
[-ltermcap])],
|
||||
[-lncursesw])],
|
||||
[-lncurses])],
|
||||
[-lcurses])],
|
||||
[-ltinfo])])
|
||||
AC_SUBST(LIBREADLINE)
|
||||
if test -n "$LIBREADLINE"; then
|
||||
if test "$LIBREADLINE" != "-lreadline"; then
|
||||
echo "-lreadline needs $LIBREADLINE"
|
||||
LIBREADLINE="-lreadline $LIBREADLINE"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for the availability of libedit. Different distributions put its
|
||||
# headers in different places. Try to cover the most common ones.
|
||||
|
||||
if test "$enable_pcre2test_libedit" = "yes"; then
|
||||
AC_CHECK_HEADERS([editline/readline.h edit/readline/readline.h readline.h], [
|
||||
HAVE_LIBEDIT_HEADER=1
|
||||
break
|
||||
])
|
||||
AC_CHECK_LIB([edit], [readline], [LIBEDIT="-ledit"])
|
||||
fi
|
||||
|
||||
PCRE2_STATIC_CFLAG=""
|
||||
if test "x$enable_shared" = "xno" ; then
|
||||
AC_DEFINE([PCRE2_STATIC], [1], [
|
||||
@@ -500,6 +740,52 @@ else
|
||||
enable_percent_zt=auto
|
||||
fi
|
||||
|
||||
# Unless running under Windows, JIT support requires pthreads.
|
||||
|
||||
if test "$enable_jit" = "yes"; then
|
||||
if test "$HAVE_WINDOWS_H" != "1"; then
|
||||
AX_PTHREAD([], [AC_MSG_ERROR([JIT support requires pthreads])])
|
||||
CC="$PTHREAD_CC"
|
||||
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
fi
|
||||
AC_DEFINE([SUPPORT_JIT], [], [
|
||||
Define to any value to enable support for Just-In-Time compiling.])
|
||||
else
|
||||
enable_pcre2grep_jit="no"
|
||||
fi
|
||||
|
||||
if test "$enable_jit_sealloc" = "yes"; then
|
||||
AC_DEFINE([SLJIT_PROT_EXECUTABLE_ALLOCATOR], [1], [
|
||||
Define to any non-zero number to enable support for SELinux
|
||||
compatible executable memory allocator in JIT. Note that this
|
||||
will have no effect unless SUPPORT_JIT is also defined.])
|
||||
fi
|
||||
|
||||
if test "$enable_pcre2grep_jit" = "yes"; then
|
||||
AC_DEFINE([SUPPORT_PCRE2GREP_JIT], [], [
|
||||
Define to any value to enable JIT support in pcre2grep. Note that this will
|
||||
have no effect unless SUPPORT_JIT is also defined.])
|
||||
fi
|
||||
|
||||
if test "$enable_pcre2grep_callout" = "yes"; then
|
||||
if test "$enable_pcre2grep_callout_fork" = "yes"; then
|
||||
if test "$HAVE_WINDOWS_H" != "1"; then
|
||||
if test "$HAVE_SYS_WAIT_H" != "1"; then
|
||||
AC_MSG_ERROR([Callout script support needs sys/wait.h.])
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE([SUPPORT_PCRE2GREP_CALLOUT_FORK], [], [
|
||||
Define to any value to enable fork support in pcre2grep callout scripts.
|
||||
This will have no effect unless SUPPORT_PCRE2GREP_CALLOUT is also
|
||||
defined.])
|
||||
fi
|
||||
AC_DEFINE([SUPPORT_PCRE2GREP_CALLOUT], [], [
|
||||
Define to any value to enable callout script support in pcre2grep.])
|
||||
else
|
||||
enable_pcre2grep_callout_fork="no"
|
||||
fi
|
||||
|
||||
if test "$enable_unicode" = "yes"; then
|
||||
AC_DEFINE([SUPPORT_UNICODE], [], [
|
||||
Define to any value to enable support for Unicode and UTF encoding.
|
||||
@@ -508,6 +794,57 @@ if test "$enable_unicode" = "yes"; then
|
||||
code *or* ASCII/Unicode, but not both at once.])
|
||||
fi
|
||||
|
||||
if test "$enable_pcre2grep_libz" = "yes"; then
|
||||
AC_DEFINE([SUPPORT_LIBZ], [], [
|
||||
Define to any value to allow pcre2grep to be linked with libz, so that it is
|
||||
able to handle .gz files.])
|
||||
fi
|
||||
|
||||
if test "$enable_pcre2grep_libbz2" = "yes"; then
|
||||
AC_DEFINE([SUPPORT_LIBBZ2], [], [
|
||||
Define to any value to allow pcre2grep to be linked with libbz2, so that it
|
||||
is able to handle .bz2 files.])
|
||||
fi
|
||||
|
||||
if test $with_pcre2grep_bufsize -lt 8192 ; then
|
||||
AC_MSG_WARN([$with_pcre2grep_bufsize is too small for --with-pcre2grep-bufsize; using 8192])
|
||||
with_pcre2grep_bufsize="8192"
|
||||
else
|
||||
if test $? -gt 1 ; then
|
||||
AC_MSG_ERROR([Bad value for --with-pcre2grep-bufsize])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $with_pcre2grep_max_bufsize -lt $with_pcre2grep_bufsize ; then
|
||||
with_pcre2grep_max_bufsize="$with_pcre2grep_bufsize"
|
||||
else
|
||||
if test $? -gt 1 ; then
|
||||
AC_MSG_ERROR([Bad value for --with-pcre2grep-max-bufsize])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([PCRE2GREP_BUFSIZE], [$with_pcre2grep_bufsize], [
|
||||
The value of PCRE2GREP_BUFSIZE is the starting size of the buffer used by
|
||||
pcre2grep to hold parts of the file it is searching. The buffer will be
|
||||
expanded up to PCRE2GREP_MAX_BUFSIZE if necessary, for files containing very
|
||||
long lines. The actual amount of memory used by pcre2grep is three times this
|
||||
number, because it allows for the buffering of "before" and "after" lines.])
|
||||
|
||||
AC_DEFINE_UNQUOTED([PCRE2GREP_MAX_BUFSIZE], [$with_pcre2grep_max_bufsize], [
|
||||
The value of PCRE2GREP_MAX_BUFSIZE specifies the maximum size of the buffer
|
||||
used by pcre2grep to hold parts of the file it is searching. The actual
|
||||
amount of memory used by pcre2grep is three times this number, because it
|
||||
allows for the buffering of "before" and "after" lines.])
|
||||
|
||||
if test "$enable_pcre2test_libedit" = "yes"; then
|
||||
AC_DEFINE([SUPPORT_LIBEDIT], [], [
|
||||
Define to any value to allow pcre2test to be linked with libedit.])
|
||||
LIBREADLINE="$LIBEDIT"
|
||||
elif test "$enable_pcre2test_libreadline" = "yes"; then
|
||||
AC_DEFINE([SUPPORT_LIBREADLINE], [], [
|
||||
Define to any value to allow pcre2test to be linked with libreadline.])
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([NEWLINE_DEFAULT], [$ac_pcre2_newline_value], [
|
||||
The value of NEWLINE_DEFAULT determines the default newline character
|
||||
sequence. PCRE2 client programs can override this by selecting other values
|
||||
@@ -584,7 +921,7 @@ AC_DEFINE_UNQUOTED([HEAP_LIMIT], [$with_heap_limit], [
|
||||
a pattern. It applies to both pcre2_match() and pcre2_dfa_match(). It does
|
||||
not apply to JIT matching. The value is in kibibytes (units of 1024 bytes).])
|
||||
|
||||
AC_DEFINE([MAX_NAME_SIZE], [32], [
|
||||
AC_DEFINE([MAX_NAME_SIZE], [128], [
|
||||
This limit is parameterized just in case anybody ever wants to
|
||||
change it. Care must be taken if it is increased, because it guards
|
||||
against integer overflow caused by enormously large patterns.])
|
||||
@@ -666,6 +1003,68 @@ AC_SUBST(EXTRA_LIBPCRE2_POSIX_LDFLAGS)
|
||||
DISTCHECK_CONFIGURE_FLAGS="CFLAGS='' CXXFLAGS='' --enable-pcre2-16 --enable-pcre2-32 --enable-jit"
|
||||
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
|
||||
|
||||
# Check that, if --enable-pcre2grep-libz or --enable-pcre2grep-libbz2 is
|
||||
# specified, the relevant library is available.
|
||||
|
||||
if test "$enable_pcre2grep_libz" = "yes"; then
|
||||
if test "$HAVE_ZLIB_H" != "1"; then
|
||||
echo "** Cannot --enable-pcre2grep-libz because zlib.h was not found"
|
||||
exit 1
|
||||
fi
|
||||
if test "$HAVE_LIBZ" != "1"; then
|
||||
echo "** Cannot --enable-pcre2grep-libz because libz was not found"
|
||||
exit 1
|
||||
fi
|
||||
LIBZ="-lz"
|
||||
fi
|
||||
AC_SUBST(LIBZ)
|
||||
|
||||
if test "$enable_pcre2grep_libbz2" = "yes"; then
|
||||
if test "$HAVE_BZLIB_H" != "1"; then
|
||||
echo "** Cannot --enable-pcre2grep-libbz2 because bzlib.h was not found"
|
||||
exit 1
|
||||
fi
|
||||
if test "$HAVE_LIBBZ2" != "1"; then
|
||||
echo "** Cannot --enable-pcre2grep-libbz2 because libbz2 was not found"
|
||||
exit 1
|
||||
fi
|
||||
LIBBZ2="-lbz2"
|
||||
fi
|
||||
AC_SUBST(LIBBZ2)
|
||||
|
||||
# Similarly for --enable-pcre2test-readline
|
||||
|
||||
if test "$enable_pcre2test_libedit" = "yes"; then
|
||||
if test "$enable_pcre2test_libreadline" = "yes"; then
|
||||
echo "** Cannot use both --enable-pcre2test-libedit and --enable-pcre2test-readline"
|
||||
exit 1
|
||||
fi
|
||||
if test -z "$HAVE_LIBEDIT_HEADER"; then
|
||||
echo "** Cannot --enable-pcre2test-libedit because neither editline/readline.h,"
|
||||
echo "** edit/readline/readline.h nor a compatible header was found."
|
||||
exit 1
|
||||
fi
|
||||
if test -z "$LIBEDIT"; then
|
||||
echo "** Cannot --enable-pcre2test-libedit because libedit library was not found."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$enable_pcre2test_libreadline" = "yes"; then
|
||||
if test "$HAVE_READLINE_H" != "1"; then
|
||||
echo "** Cannot --enable-pcre2test-readline because readline/readline.h was not found."
|
||||
exit 1
|
||||
fi
|
||||
if test "$HAVE_HISTORY_H" != "1"; then
|
||||
echo "** Cannot --enable-pcre2test-readline because readline/history.h was not found."
|
||||
exit 1
|
||||
fi
|
||||
if test -z "$LIBREADLINE"; then
|
||||
echo "** Cannot --enable-pcre2test-readline because readline library was not found."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Handle valgrind support
|
||||
|
||||
if test "$enable_valgrind" = "yes"; then
|
||||
@@ -788,6 +1187,8 @@ $PACKAGE-$VERSION configuration summary:
|
||||
Build 16-bit pcre2 library ......... : ${enable_pcre2_16}
|
||||
Build 32-bit pcre2 library ......... : ${enable_pcre2_32}
|
||||
Include debugging code ............. : ${enable_debug}
|
||||
Enable JIT compiling support ....... : ${enable_jit}
|
||||
Use SELinux allocator in JIT ....... : ${enable_jit_sealloc}
|
||||
Enable Unicode support ............. : ${enable_unicode}
|
||||
Newline char/sequence .............. : ${enable_newline}
|
||||
\R matches only ANYCRLF ............ : ${enable_bsr_anycrlf}
|
||||
@@ -803,8 +1204,19 @@ $PACKAGE-$VERSION configuration summary:
|
||||
Match depth limit .................. : ${with_match_limit_depth}
|
||||
Build shared libs .................. : ${enable_shared}
|
||||
Build static libs .................. : ${enable_static}
|
||||
Use JIT in pcre2grep ............... : ${enable_pcre2grep_jit}
|
||||
Enable callouts in pcre2grep ....... : ${enable_pcre2grep_callout}
|
||||
Enable fork in pcre2grep callouts .. : ${enable_pcre2grep_callout_fork}
|
||||
Initial buffer size for pcre2grep .. : ${with_pcre2grep_bufsize}
|
||||
Maximum buffer size for pcre2grep .. : ${with_pcre2grep_max_bufsize}
|
||||
Link pcre2grep with libz ........... : ${enable_pcre2grep_libz}
|
||||
Link pcre2grep with libbz2 ......... : ${enable_pcre2grep_libbz2}
|
||||
Link pcre2test with libedit ........ : ${enable_pcre2test_libedit}
|
||||
Link pcre2test with libreadline .... : ${enable_pcre2test_libreadline}
|
||||
Valgrind support ................... : ${enable_valgrind}
|
||||
Code coverage ...................... : ${enable_coverage}
|
||||
Fuzzer support ..................... : ${enable_fuzz_support}
|
||||
Differential fuzzer support ........ : ${enable_diff_fuzz_support}
|
||||
Use %zu and %td .................... : ${enable_percent_zt}
|
||||
|
||||
EOF
|
||||
|
||||
888
libpcre/ltmain.sh
Normal file → Executable file
888
libpcre/ltmain.sh
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
251
libpcre/m4/libtool.m4
vendored
251
libpcre/m4/libtool.m4
vendored
@@ -1,6 +1,7 @@
|
||||
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gordon Matzigkeit, 1996
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
@@ -31,7 +32,7 @@ m4_define([_LT_COPYING], [dnl
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
])
|
||||
|
||||
# serial 58 LT_INIT
|
||||
# serial 59 LT_INIT
|
||||
|
||||
|
||||
# LT_PREREQ(VERSION)
|
||||
@@ -181,6 +182,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
|
||||
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
|
||||
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
|
||||
m4_require([_LT_CMD_RELOAD])dnl
|
||||
m4_require([_LT_DECL_FILECMD])dnl
|
||||
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
|
||||
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
|
||||
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
|
||||
@@ -219,8 +221,8 @@ esac
|
||||
ofile=libtool
|
||||
can_build_shared=yes
|
||||
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
# All known linkers require a '.a' archive for static linking (except MSVC and
|
||||
# ICC, which need '.lib').
|
||||
libext=a
|
||||
|
||||
with_gnu_ld=$lt_cv_prog_gnu_ld
|
||||
@@ -728,7 +730,6 @@ _LT_CONFIG_SAVE_COMMANDS([
|
||||
cat <<_LT_EOF >> "$cfgfile"
|
||||
#! $SHELL
|
||||
# Generated automatically by $as_me ($PACKAGE) $VERSION
|
||||
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
|
||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||
|
||||
# Provide generalized library-building support services.
|
||||
@@ -778,7 +779,7 @@ _LT_EOF
|
||||
# if finds mixed CR/LF and LF-only lines. Since sed operates in
|
||||
# text mode, it properly converts lines to CR/LF. This bash problem
|
||||
# is reportedly fixed, but why not run on old versions too?
|
||||
sed '$q' "$ltmain" >> "$cfgfile" \
|
||||
$SED '$q' "$ltmain" >> "$cfgfile" \
|
||||
|| (rm -f "$cfgfile"; exit 1)
|
||||
|
||||
mv -f "$cfgfile" "$ofile" ||
|
||||
@@ -1042,8 +1043,8 @@ int forced_loaded() { return 2;}
|
||||
_LT_EOF
|
||||
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
|
||||
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
|
||||
echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
|
||||
$AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
|
||||
echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
|
||||
$AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
|
||||
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
|
||||
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
|
||||
cat > conftest.c << _LT_EOF
|
||||
@@ -1067,17 +1068,12 @@ _LT_EOF
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
|
||||
darwin1.*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
darwin*) # darwin 5.x on
|
||||
# if running on 10.5 or later, the deployment target defaults
|
||||
# to the OS version, if on x86, and 10.4, the deployment
|
||||
# target defaults to 10.4. Don't you love it?
|
||||
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
|
||||
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
10.[[012]][[,.]]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
10.*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
darwin*)
|
||||
case $MACOSX_DEPLOYMENT_TARGET,$host in
|
||||
10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -1126,12 +1122,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
||||
output_verbose_link_cmd=func_echo_all
|
||||
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
|
||||
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
|
||||
m4_if([$1], [CXX],
|
||||
[ if test yes != "$lt_cv_apple_cc_single_mod"; then
|
||||
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
|
||||
fi
|
||||
],[])
|
||||
else
|
||||
@@ -1245,7 +1241,8 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
|
||||
# _LT_WITH_SYSROOT
|
||||
# ----------------
|
||||
AC_DEFUN([_LT_WITH_SYSROOT],
|
||||
[AC_MSG_CHECKING([for sysroot])
|
||||
[m4_require([_LT_DECL_SED])dnl
|
||||
AC_MSG_CHECKING([for sysroot])
|
||||
AC_ARG_WITH([sysroot],
|
||||
[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
|
||||
[Search for dependent libraries within DIR (or the compiler's sysroot
|
||||
@@ -1262,7 +1259,7 @@ case $with_sysroot in #(
|
||||
fi
|
||||
;; #(
|
||||
/*)
|
||||
lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
|
||||
lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
|
||||
;; #(
|
||||
no|'')
|
||||
;; #(
|
||||
@@ -1292,7 +1289,7 @@ ia64-*-hpux*)
|
||||
# options accordingly.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*ELF-32*)
|
||||
HPUX_IA64_MODE=32
|
||||
;;
|
||||
@@ -1309,7 +1306,7 @@ ia64-*-hpux*)
|
||||
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
if test yes = "$lt_cv_prog_gnu_ld"; then
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -melf32bsmip"
|
||||
;;
|
||||
@@ -1321,7 +1318,7 @@ ia64-*-hpux*)
|
||||
;;
|
||||
esac
|
||||
else
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
@@ -1343,7 +1340,7 @@ mips64*-*linux*)
|
||||
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
emul=elf
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*32-bit*)
|
||||
emul="${emul}32"
|
||||
;;
|
||||
@@ -1351,7 +1348,7 @@ mips64*-*linux*)
|
||||
emul="${emul}64"
|
||||
;;
|
||||
esac
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*MSB*)
|
||||
emul="${emul}btsmip"
|
||||
;;
|
||||
@@ -1359,7 +1356,7 @@ mips64*-*linux*)
|
||||
emul="${emul}ltsmip"
|
||||
;;
|
||||
esac
|
||||
case `/usr/bin/file conftest.$ac_objext` in
|
||||
case `$FILECMD conftest.$ac_objext` in
|
||||
*N32*)
|
||||
emul="${emul}n32"
|
||||
;;
|
||||
@@ -1379,14 +1376,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
# not appear in the list.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*32-bit*)
|
||||
case $host in
|
||||
x86_64-*kfreebsd*-gnu)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
;;
|
||||
@@ -1454,7 +1451,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
# options accordingly.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case `/usr/bin/file conftest.o` in
|
||||
case `$FILECMD conftest.o` in
|
||||
*64-bit*)
|
||||
case $lt_cv_prog_gnu_ld in
|
||||
yes*)
|
||||
@@ -1493,9 +1490,22 @@ need_locks=$enable_libtool_lock
|
||||
m4_defun([_LT_PROG_AR],
|
||||
[AC_CHECK_TOOLS(AR, [ar], false)
|
||||
: ${AR=ar}
|
||||
: ${AR_FLAGS=cru}
|
||||
_LT_DECL([], [AR], [1], [The archiver])
|
||||
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
|
||||
|
||||
# Use ARFLAGS variable as AR's operation code to sync the variable naming with
|
||||
# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
|
||||
# higher priority because thats what people were doing historically (setting
|
||||
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
|
||||
# variable obsoleted/removed.
|
||||
|
||||
test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
|
||||
lt_ar_flags=$AR_FLAGS
|
||||
_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
|
||||
|
||||
# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
|
||||
# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
|
||||
_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
|
||||
[Flags to create an archive])
|
||||
|
||||
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
|
||||
[lt_cv_ar_at_file=no
|
||||
@@ -1714,7 +1724,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
lt_cv_sys_max_cmd_len=8192;
|
||||
;;
|
||||
|
||||
bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
|
||||
bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
|
||||
# This has been around since 386BSD, at least. Likely further.
|
||||
if test -x /sbin/sysctl; then
|
||||
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
|
||||
@@ -1757,7 +1767,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
sysv5* | sco5v6* | sysv4.2uw2*)
|
||||
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
|
||||
if test -n "$kargmax"; then
|
||||
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
|
||||
lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
|
||||
else
|
||||
lt_cv_sys_max_cmd_len=32768
|
||||
fi
|
||||
@@ -2207,26 +2217,35 @@ m4_defun([_LT_CMD_STRIPLIB],
|
||||
striplib=
|
||||
old_striplib=
|
||||
AC_MSG_CHECKING([whether stripping libraries is possible])
|
||||
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
|
||||
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
|
||||
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
|
||||
AC_MSG_RESULT([yes])
|
||||
if test -z "$STRIP"; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
# FIXME - insert some real tests, host_os isn't really good enough
|
||||
case $host_os in
|
||||
darwin*)
|
||||
if test -n "$STRIP"; then
|
||||
if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
|
||||
old_striplib="$STRIP --strip-debug"
|
||||
striplib="$STRIP --strip-unneeded"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
case $host_os in
|
||||
darwin*)
|
||||
# FIXME - insert some real tests, host_os isn't really good enough
|
||||
striplib="$STRIP -x"
|
||||
old_striplib="$STRIP -S"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
;;
|
||||
freebsd*)
|
||||
if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
|
||||
old_striplib="$STRIP --strip-debug"
|
||||
striplib="$STRIP --strip-unneeded"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
|
||||
_LT_DECL([], [striplib], [1])
|
||||
@@ -2549,7 +2568,7 @@ cygwin* | mingw* | pw32* | cegcc*)
|
||||
case $host_os in
|
||||
cygwin*)
|
||||
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
|
||||
soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
m4_if([$1], [],[
|
||||
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
|
||||
;;
|
||||
@@ -2559,14 +2578,14 @@ m4_if([$1], [],[
|
||||
;;
|
||||
pw32*)
|
||||
# pw32 DLLs use 'pw' prefix rather than 'lib'
|
||||
library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
;;
|
||||
esac
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
|
||||
*,cl*)
|
||||
# Native MSVC
|
||||
*,cl* | *,icl*)
|
||||
# Native MSVC or ICC
|
||||
libname_spec='$name'
|
||||
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
|
||||
library_names_spec='$libname.dll.lib'
|
||||
@@ -2585,7 +2604,7 @@ m4_if([$1], [],[
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
# Convert to MSYS style.
|
||||
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
|
||||
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
|
||||
;;
|
||||
cygwin*)
|
||||
# Convert to unix form, then to dos form, then back to unix form
|
||||
@@ -2622,7 +2641,7 @@ m4_if([$1], [],[
|
||||
;;
|
||||
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
|
||||
dynamic_linker='Win32 ld.exe'
|
||||
;;
|
||||
@@ -2655,7 +2674,7 @@ dgux*)
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
if test -x /usr/bin/objformat; then
|
||||
@@ -3466,7 +3485,7 @@ beos*)
|
||||
|
||||
bsdi[[45]]*)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
|
||||
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
||||
lt_cv_file_magic_cmd='$FILECMD -L'
|
||||
lt_cv_file_magic_test_file=/shlib/libc.so
|
||||
;;
|
||||
|
||||
@@ -3500,14 +3519,14 @@ darwin* | rhapsody*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
||||
case $host_cpu in
|
||||
i*86 )
|
||||
# Not sure whether the presence of OpenBSD here was a mistake.
|
||||
# Let's accept both of them until this is cleared up.
|
||||
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
|
||||
;;
|
||||
esac
|
||||
@@ -3521,7 +3540,7 @@ haiku*)
|
||||
;;
|
||||
|
||||
hpux10.20* | hpux11*)
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
|
||||
@@ -3568,7 +3587,7 @@ netbsd* | netbsdelf*-gnu)
|
||||
|
||||
newos6*)
|
||||
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
|
||||
lt_cv_file_magic_cmd=/usr/bin/file
|
||||
lt_cv_file_magic_cmd=$FILECMD
|
||||
lt_cv_file_magic_test_file=/usr/lib/libnls.so
|
||||
;;
|
||||
|
||||
@@ -3695,13 +3714,13 @@ else
|
||||
mingw*) lt_bad_file=conftest.nm/nofile ;;
|
||||
*) lt_bad_file=/dev/null ;;
|
||||
esac
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
|
||||
case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
|
||||
*$lt_bad_file* | *'Invalid file or object type'*)
|
||||
lt_cv_path_NM="$tmp_nm -B"
|
||||
break 2
|
||||
;;
|
||||
*)
|
||||
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
|
||||
case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
|
||||
*/dev/null*)
|
||||
lt_cv_path_NM="$tmp_nm -p"
|
||||
break 2
|
||||
@@ -3727,7 +3746,7 @@ else
|
||||
# Let the user override the test.
|
||||
else
|
||||
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
|
||||
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
|
||||
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
|
||||
*COFF*)
|
||||
DUMPBIN="$DUMPBIN -symbols -headers"
|
||||
;;
|
||||
@@ -3967,7 +3986,7 @@ esac
|
||||
|
||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Gets list of data symbols to import.
|
||||
lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
|
||||
lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
|
||||
# Adjust the below global symbol transforms to fixup imported variables.
|
||||
lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
|
||||
lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
|
||||
@@ -3985,20 +4004,20 @@ fi
|
||||
# Transform an extracted symbol line into a proper C declaration.
|
||||
# Some systems (esp. on ia64) link data and code symbols differently,
|
||||
# so use this general approach.
|
||||
lt_cv_sys_global_symbol_to_cdecl="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
|
||||
$lt_cdecl_hook\
|
||||
" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
|
||||
|
||||
# Transform an extracted symbol line into symbol name and symbol address
|
||||
lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
|
||||
$lt_c_name_hook\
|
||||
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
|
||||
|
||||
# Transform an extracted symbol line into symbol name with lib prefix and
|
||||
# symbol address.
|
||||
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
|
||||
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
|
||||
$lt_c_name_lib_hook\
|
||||
" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
|
||||
" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
|
||||
@@ -4022,7 +4041,7 @@ for ac_symprfx in "" "_"; do
|
||||
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
|
||||
# Fake it for dumpbin and say T for any non-static function,
|
||||
# D for any global variable and I for any imported variable.
|
||||
# Also find C++ and __fastcall symbols from MSVC++,
|
||||
# Also find C++ and __fastcall symbols from MSVC++ or ICC,
|
||||
# which start with @ or ?.
|
||||
lt_cv_sys_global_symbol_pipe="$AWK ['"\
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
@@ -4040,9 +4059,9 @@ for ac_symprfx in "" "_"; do
|
||||
" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
|
||||
" ' prfx=^$ac_symprfx]"
|
||||
else
|
||||
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
|
||||
lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
|
||||
fi
|
||||
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
|
||||
lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
|
||||
|
||||
# Check to see that the pipe works correctly.
|
||||
pipe_works=no
|
||||
@@ -4064,7 +4083,8 @@ _LT_EOF
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
# Now try to grab the symbols.
|
||||
nlist=conftest.nm
|
||||
if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
|
||||
$ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
|
||||
if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
|
||||
# Try sorting and uniquifying the output.
|
||||
if sort "$nlist" | uniq > "$nlist"T; then
|
||||
mv -f "$nlist"T "$nlist"
|
||||
@@ -4329,7 +4349,7 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
# FreeBSD uses GNU C++
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
@@ -4412,7 +4432,7 @@ m4_if([$1], [CXX], [
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*)
|
||||
# Sun C++ 5.9
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
@@ -4704,6 +4724,12 @@ m4_if([$1], [CXX], [
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
;;
|
||||
# flang / f18. f95 an alias for gfortran or flang on Debian
|
||||
flang* | f18* | f95*)
|
||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
;;
|
||||
# icc used to be incompatible with GCC.
|
||||
# ICC 10 doesn't accept -KPIC any more.
|
||||
icc* | ifort*)
|
||||
@@ -4748,7 +4774,7 @@ m4_if([$1], [CXX], [
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
|
||||
# Sun Fortran 8.3 passes all unrecognized flags to the linker
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
@@ -4931,7 +4957,7 @@ m4_if([$1], [CXX], [
|
||||
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
|
||||
else
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
fi
|
||||
;;
|
||||
pw32*)
|
||||
@@ -4939,7 +4965,7 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
cygwin* | mingw* | cegcc*)
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
cl* | icl*)
|
||||
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
|
||||
;;
|
||||
*)
|
||||
@@ -4999,15 +5025,15 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
||||
|
||||
case $host_os in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
if test yes != "$GCC"; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd* | bitrig*)
|
||||
@@ -5062,7 +5088,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)=
|
||||
fi
|
||||
supports_anon_versioning=no
|
||||
case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
|
||||
case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
|
||||
*GNU\ gold*) supports_anon_versioning=yes ;;
|
||||
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
|
||||
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
|
||||
@@ -5174,6 +5200,7 @@ _LT_EOF
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
|
||||
interix[[3-9]]*)
|
||||
@@ -5188,7 +5215,7 @@ _LT_EOF
|
||||
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
|
||||
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
;;
|
||||
|
||||
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
@@ -5231,7 +5258,7 @@ _LT_EOF
|
||||
_LT_TAGVAR(compiler_needs_object, $1)=yes
|
||||
;;
|
||||
esac
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*) # Sun C 5.9
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
_LT_TAGVAR(compiler_needs_object, $1)=yes
|
||||
@@ -5243,13 +5270,14 @@ _LT_EOF
|
||||
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
|
||||
case $cc_basename in
|
||||
tcc*)
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
|
||||
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
|
||||
;;
|
||||
xlf* | bgf* | bgxlf* | mpixlf*)
|
||||
@@ -5259,7 +5287,7 @@ _LT_EOF
|
||||
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
@@ -5391,7 +5419,7 @@ _LT_EOF
|
||||
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
|
||||
else
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
|
||||
fi
|
||||
aix_use_runtimelinking=no
|
||||
|
||||
@@ -5574,12 +5602,12 @@ _LT_EOF
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# Microsoft Visual C++ or Intel C++ Compiler.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
case $cc_basename in
|
||||
cl*)
|
||||
# Native MSVC
|
||||
cl* | icl*)
|
||||
# Native MSVC or ICC
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
_LT_TAGVAR(always_export_symbols, $1)=yes
|
||||
@@ -5620,7 +5648,7 @@ _LT_EOF
|
||||
fi'
|
||||
;;
|
||||
*)
|
||||
# Assume MSVC wrapper
|
||||
# Assume MSVC and ICC wrapper
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
|
||||
# Tell ltmain to make .lib files, not .a files.
|
||||
@@ -5668,7 +5696,7 @@ _LT_EOF
|
||||
;;
|
||||
|
||||
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
|
||||
_LT_TAGVAR(hardcode_direct, $1)=yes
|
||||
@@ -5809,6 +5837,7 @@ _LT_EOF
|
||||
# Fabrice Bellard et al's Tiny C Compiler
|
||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -5880,6 +5909,7 @@ _LT_EOF
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
|
||||
osf3*)
|
||||
@@ -6439,7 +6469,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
|
||||
|
||||
else
|
||||
GXX=no
|
||||
@@ -6650,8 +6680,8 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
case $GXX,$cc_basename in
|
||||
,cl* | no,cl*)
|
||||
# Native MSVC
|
||||
,cl* | no,cl* | ,icl* | no,icl*)
|
||||
# Native MSVC or ICC
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
|
||||
@@ -6749,6 +6779,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
emximp -o $lib $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
|
||||
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
|
||||
_LT_TAGVAR(file_list_spec, $1)='@'
|
||||
;;
|
||||
|
||||
dgux*)
|
||||
@@ -6779,7 +6810,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
|
||||
# conventions
|
||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||
@@ -6814,7 +6845,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
;;
|
||||
*)
|
||||
if test yes = "$GXX"; then
|
||||
@@ -6879,7 +6910,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# explicitly linking system object files so we need to strip them
|
||||
# from the output so that they don't get included in the library
|
||||
# dependencies.
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
|
||||
;;
|
||||
*)
|
||||
if test yes = "$GXX"; then
|
||||
@@ -6916,7 +6947,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
|
||||
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
case $cc_basename in
|
||||
@@ -7056,13 +7087,13 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
|
||||
if test yes = "$supports_anon_versioning"; then
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
|
||||
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
|
||||
echo "local: *; };" >> $output_objdir/$libname.ver~
|
||||
$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
case `$CC -V 2>&1 | $SED 5q` in
|
||||
*Sun\ C*)
|
||||
# Sun C++ 5.9
|
||||
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
|
||||
@@ -7218,7 +7249,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
|
||||
|
||||
else
|
||||
# FIXME: insert proper C++ library support
|
||||
@@ -7302,7 +7333,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
|
||||
else
|
||||
# g++ 2.7 appears to require '-G' NOT '-shared' on this
|
||||
# platform.
|
||||
@@ -7313,7 +7344,7 @@ if test yes != "$_lt_caught_CXX_error"; then
|
||||
# Commands to make compiler produce verbose output that lists
|
||||
# what "hidden" libraries, object files and flags are used when
|
||||
# linking a shared library.
|
||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
|
||||
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
|
||||
fi
|
||||
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
|
||||
@@ -8208,6 +8239,14 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
|
||||
AC_SUBST([DLLTOOL])
|
||||
])
|
||||
|
||||
# _LT_DECL_FILECMD
|
||||
# ----------------
|
||||
# Check for a file(cmd) program that can be used to detect file type and magic
|
||||
m4_defun([_LT_DECL_FILECMD],
|
||||
[AC_CHECK_TOOL([FILECMD], [file], [:])
|
||||
_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
|
||||
])# _LD_DECL_FILECMD
|
||||
|
||||
# _LT_DECL_SED
|
||||
# ------------
|
||||
# Check for a fully-functional sed program, that truncates
|
||||
|
||||
4
libpcre/m4/ltoptions.m4
vendored
4
libpcre/m4/ltoptions.m4
vendored
@@ -1,7 +1,7 @@
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
||||
2
libpcre/m4/ltsugar.m4
vendored
2
libpcre/m4/ltsugar.m4
vendored
@@ -1,6 +1,6 @@
|
||||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
|
||||
13
libpcre/m4/ltversion.m4
vendored
13
libpcre/m4/ltversion.m4
vendored
@@ -1,6 +1,7 @@
|
||||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
|
||||
# Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
@@ -9,15 +10,15 @@
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4179 ltversion.m4
|
||||
# serial 4245 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.7])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.7])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
[macro_version='2.4.7'
|
||||
macro_revision='2.4.7'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
||||
|
||||
4
libpcre/m4/lt~obsolete.m4
vendored
4
libpcre/m4/lt~obsolete.m4
vendored
@@ -1,7 +1,7 @@
|
||||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
|
||||
@@ -4,63 +4,63 @@ dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
dnl Originally From Bruno Haible.
|
||||
|
||||
dnl Tests whether the compiler supports the command-line option
|
||||
dnl -fvisibility=hidden and the function and variable attributes
|
||||
dnl __attribute__((__visibility__("hidden"))) and
|
||||
dnl -fvisibility=hidden and the function attribute
|
||||
dnl __attribute__((__visibility__("default"))).
|
||||
dnl Does *not* test for __visibility__("protected") - which has tricky
|
||||
dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
|
||||
dnl MacOS X.
|
||||
dnl Does *not* test for __visibility__("internal") - which has processor
|
||||
dnl dependent semantics.
|
||||
dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
|
||||
dnl "really only recommended for legacy code".
|
||||
dnl Set the variable CFLAG_VISIBILITY.
|
||||
dnl
|
||||
dnl Set the variable VISIBILITY_CFLAGS.
|
||||
dnl Defines and sets the variable HAVE_VISIBILITY.
|
||||
dnl Defines and sets the variable WORKING_WERROR.
|
||||
|
||||
dnl Modified to fit with PCRE build environment by Cristian Rodríguez.
|
||||
dnl Adjusted for PCRE2 by PH
|
||||
dnl Adjusted for PCRE2 by PH.
|
||||
dnl Refactored to work with non GCC (but compatible) compilers.
|
||||
|
||||
AC_DEFUN([PCRE2_VISIBILITY],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
VISIBILITY_CFLAGS=
|
||||
VISIBILITY_CXXFLAGS=
|
||||
HAVE_VISIBILITY=0
|
||||
if test -n "$GCC"; then
|
||||
dnl First, check whether -Werror can be added to the command line, or
|
||||
dnl whether it leads to an error because of some other option that the
|
||||
dnl user has put into $CC $CFLAGS $CPPFLAGS.
|
||||
AC_MSG_CHECKING([whether the -Werror option is usable])
|
||||
AC_CACHE_VAL([pcre2_cv_cc_vis_werror], [
|
||||
pcre2_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]], [[]])],
|
||||
[pcre2_cv_cc_vis_werror=yes],
|
||||
[pcre2_cv_cc_vis_werror=no])
|
||||
CFLAGS="$pcre2_save_CFLAGS"])
|
||||
AC_MSG_RESULT([$pcre2_cv_cc_vis_werror])
|
||||
dnl Now check whether visibility declarations are supported.
|
||||
AC_MSG_CHECKING([for simple visibility declarations])
|
||||
dnl First, check whether -Werror can be added to the command line, or
|
||||
dnl whether it leads to an error because of some other option that the
|
||||
dnl user has put into $CC $CFLAGS $CPPFLAGS.
|
||||
AC_MSG_CHECKING([whether the -Werror option is usable])
|
||||
AC_CACHE_VAL([pcre2_cv_cc_vis_werror], [
|
||||
pcre2_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
pcre2_cv_cc_vis_werror=no
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]], [[]])],
|
||||
[
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]], [[ #warning e ]])],
|
||||
[], [pcre2_cv_cc_vis_werror=yes]
|
||||
)
|
||||
], [])
|
||||
CFLAGS="$pcre2_save_CFLAGS"])
|
||||
AC_MSG_RESULT([$pcre2_cv_cc_vis_werror])
|
||||
if test -n "$pcre2_cv_cc_vis_werror" && test $pcre2_cv_cc_vis_werror = yes
|
||||
then
|
||||
WORKING_WERROR=1
|
||||
else
|
||||
WORKING_WERROR=0
|
||||
fi
|
||||
if test $pcre2_cv_cc_vis_werror = yes; then
|
||||
dnl Now check whether GCC compatible visibility declarations are supported.
|
||||
AC_MSG_CHECKING([for GCC compatible visibility declarations])
|
||||
AC_CACHE_VAL([pcre2_cv_cc_visibility], [
|
||||
pcre2_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden"
|
||||
CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
|
||||
dnl We use the option -Werror and a function dummyfunc, because on some
|
||||
dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
|
||||
dnl "visibility attribute not supported in this configuration; ignored"
|
||||
dnl at the first function definition in every compilation unit, and we
|
||||
dnl don't want to use the option in this case.
|
||||
if test $pcre2_cv_cc_vis_werror = yes; then
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
fi
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
|
||||
extern __attribute__((__visibility__("default"))) int exportedvar;
|
||||
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
|
||||
[[extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
|
||||
extern __attribute__((__visibility__("default"))) int exportedfunc (void);
|
||||
void dummyfunc (void) {}
|
||||
]],
|
||||
@@ -68,19 +68,18 @@ AC_DEFUN([PCRE2_VISIBILITY],
|
||||
[pcre2_cv_cc_visibility=yes],
|
||||
[pcre2_cv_cc_visibility=no])
|
||||
CFLAGS="$pcre2_save_CFLAGS"])
|
||||
AC_MSG_RESULT([$pcre2_cv_cc_visibility])
|
||||
if test $pcre2_cv_cc_visibility = yes; then
|
||||
VISIBILITY_CFLAGS="-fvisibility=hidden"
|
||||
VISIBILITY_CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden"
|
||||
HAVE_VISIBILITY=1
|
||||
AC_DEFINE(PCRE2_EXPORT, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
|
||||
else
|
||||
AC_DEFINE(PCRE2_EXPORT, [], [to make a symbol visible])
|
||||
fi
|
||||
AC_MSG_RESULT([$pcre2_cv_cc_visibility])
|
||||
fi
|
||||
if test -n "$pcre2_cv_cc_visibility" && test $pcre2_cv_cc_visibility = yes
|
||||
then
|
||||
VISIBILITY_CFLAGS="-fvisibility=hidden"
|
||||
HAVE_VISIBILITY=1
|
||||
AC_DEFINE(PCRE2_EXPORT, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
|
||||
else
|
||||
AC_DEFINE(PCRE2_EXPORT, [], [to make a symbol visible])
|
||||
fi
|
||||
AC_SUBST([VISIBILITY_CFLAGS])
|
||||
AC_SUBST([VISIBILITY_CXXFLAGS])
|
||||
AC_SUBST([HAVE_VISIBILITY])
|
||||
AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
|
||||
[Define to 1 if the compiler supports simple visibility declarations.])
|
||||
[Define to 1 if the compiler supports GCC compatible visibility declarations.])
|
||||
])
|
||||
|
||||
@@ -52,15 +52,24 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
LF does in an ASCII/Unicode environment. */
|
||||
/* #undef EBCDIC_NL25 */
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
/* #undef HAVE_ASSERT_H */
|
||||
|
||||
/* Define this if your compiler supports __attribute__((uninitialized)) */
|
||||
/* #undef HAVE_ATTRIBUTE_UNINITIALIZED */
|
||||
|
||||
/* Define to 1 if you have the 'bcopy' function. */
|
||||
/* Define to 1 if you have the `bcopy' function. */
|
||||
/* #undef HAVE_BCOPY */
|
||||
|
||||
/* Define this if your compiler provides __assume() */
|
||||
/* #undef HAVE_BUILTIN_ASSUME */
|
||||
|
||||
/* Define this if your compiler provides __builtin_mul_overflow() */
|
||||
/* #undef HAVE_BUILTIN_MUL_OVERFLOW */
|
||||
|
||||
/* Define this if your compiler provides __builtin_unreachable() */
|
||||
/* #undef HAVE_BUILTIN_UNREACHABLE */
|
||||
|
||||
/* Define to 1 if you have the <bzlib.h> header file. */
|
||||
/* #undef HAVE_BZLIB_H */
|
||||
|
||||
@@ -82,16 +91,16 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
/* #undef HAVE_LIMITS_H */
|
||||
|
||||
/* Define to 1 if you have the 'memfd_create' function. */
|
||||
/* Define to 1 if you have the `memfd_create' function. */
|
||||
/* #undef HAVE_MEMFD_CREATE */
|
||||
|
||||
/* Define to 1 if you have the 'memmove' function. */
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
/* #undef HAVE_MEMMOVE */
|
||||
|
||||
/* Define to 1 if you have the <minix/config.h> header file. */
|
||||
/* #undef HAVE_MINIX_CONFIG_H */
|
||||
|
||||
/* Define to 1 if you have the 'mkostemp' function. */
|
||||
/* Define to 1 if you have the `mkostemp' function. */
|
||||
/* #undef HAVE_MKOSTEMP */
|
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */
|
||||
@@ -112,7 +121,7 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* Define to 1 if you have the `realpath' function. */
|
||||
/* #undef HAVE_REALPATH */
|
||||
|
||||
/* Define to 1 if you have the 'secure_getenv' function. */
|
||||
/* Define to 1 if you have the `secure_getenv' function. */
|
||||
/* #undef HAVE_SECURE_GETENV */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
@@ -124,7 +133,7 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
/* #undef HAVE_STDLIB_H */
|
||||
|
||||
/* Define to 1 if you have the 'strerror' function. */
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
/* #undef HAVE_STRERROR */
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
@@ -145,7 +154,8 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
|
||||
/* Define to 1 if the compiler supports simple visibility declarations. */
|
||||
/* Define to 1 if the compiler supports GCC compatible visibility
|
||||
declarations. */
|
||||
/* #undef HAVE_VISIBILITY */
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
@@ -215,7 +225,7 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
Care must be taken if it is increased, because it guards against integer
|
||||
overflow caused by enormously large patterns. */
|
||||
#ifndef MAX_NAME_SIZE
|
||||
#define MAX_NAME_SIZE 32
|
||||
#define MAX_NAME_SIZE 128
|
||||
#endif
|
||||
|
||||
/* The value of MAX_VARLOOKBEHIND specifies the default maximum length, in
|
||||
@@ -245,7 +255,7 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
#define PACKAGE_NAME "PCRE2"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "PCRE2 10.43"
|
||||
#define PACKAGE_STRING "PCRE2 10.45"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "pcre2"
|
||||
@@ -254,7 +264,7 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "10.43"
|
||||
#define PACKAGE_VERSION "10.45"
|
||||
|
||||
/* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
|
||||
parentheses (of any kind) in a pattern. This limits the amount of system
|
||||
@@ -311,7 +321,7 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
unless SUPPORT_JIT is also defined. */
|
||||
/* #undef SLJIT_PROT_EXECUTABLE_ALLOCATOR */
|
||||
|
||||
/* Define to 1 if all of the C89 standard headers exist (not just the ones
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
/* #undef STDC_HEADERS */
|
||||
@@ -366,7 +376,7 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* Define to any value for valgrind support to find invalid memory reads. */
|
||||
/* #undef SUPPORT_VALGRIND */
|
||||
|
||||
/* Enable extensions on AIX, Interix, z/OS. */
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# define _ALL_SOURCE 1
|
||||
#endif
|
||||
@@ -427,15 +437,11 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||
# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
|
||||
#endif
|
||||
/* Enable extensions specified by C23 Annex F. */
|
||||
#ifndef __STDC_WANT_IEC_60559_EXT__
|
||||
# define __STDC_WANT_IEC_60559_EXT__ 1
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
|
||||
#endif
|
||||
/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
|
||||
#endif
|
||||
@@ -458,26 +464,20 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
#endif
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "10.43"
|
||||
#define VERSION "10.45"
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define to 1 on platforms where this makes off_t a 64-bit type. */
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/* Number of bits in time_t, on hosts where this is settable. */
|
||||
/* #undef _TIME_BITS */
|
||||
|
||||
/* Define to 1 on platforms where this makes time_t a 64-bit type. */
|
||||
/* #undef __MINGW_USE_VC2005_COMPAT */
|
||||
|
||||
/* Define to empty if 'const' does not conform to ANSI C. */
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to the type of a signed integer type of width exactly 64 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
/* #undef int64_t */
|
||||
|
||||
/* Define as 'unsigned int' if <stddef.h> doesn't define. */
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
@@ -52,21 +52,39 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
LF does in an ASCII/Unicode environment. */
|
||||
#undef EBCDIC_NL25
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#undef HAVE_ASSERT_H
|
||||
|
||||
/* Define this if your compiler supports __attribute__((uninitialized)) */
|
||||
#undef HAVE_ATTRIBUTE_UNINITIALIZED
|
||||
|
||||
/* Define to 1 if you have the `bcopy' function. */
|
||||
#undef HAVE_BCOPY
|
||||
|
||||
/* Define this if your compiler provides __assume() */
|
||||
#undef HAVE_BUILTIN_ASSUME
|
||||
|
||||
/* Define this if your compiler provides __builtin_mul_overflow() */
|
||||
#undef HAVE_BUILTIN_MUL_OVERFLOW
|
||||
|
||||
/* Define this if your compiler provides __builtin_unreachable() */
|
||||
#undef HAVE_BUILTIN_UNREACHABLE
|
||||
|
||||
/* Define to 1 if you have the <bzlib.h> header file. */
|
||||
#undef HAVE_BZLIB_H
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file. */
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <editline/readline.h> header file. */
|
||||
#undef HAVE_EDITLINE_READLINE_H
|
||||
|
||||
/* Define to 1 if you have the <edit/readline/readline.h> header file. */
|
||||
#undef HAVE_EDIT_READLINE_READLINE_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
@@ -85,6 +103,21 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* Define to 1 if you have the `mkostemp' function. */
|
||||
#undef HAVE_MKOSTEMP
|
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */
|
||||
#undef HAVE_PTHREAD
|
||||
|
||||
/* Have PTHREAD_PRIO_INHERIT. */
|
||||
#undef HAVE_PTHREAD_PRIO_INHERIT
|
||||
|
||||
/* Define to 1 if you have the <readline.h> header file. */
|
||||
#undef HAVE_READLINE_H
|
||||
|
||||
/* Define to 1 if you have the <readline/history.h> header file. */
|
||||
#undef HAVE_READLINE_HISTORY_H
|
||||
|
||||
/* Define to 1 if you have the <readline/readline.h> header file. */
|
||||
#undef HAVE_READLINE_READLINE_H
|
||||
|
||||
/* Define to 1 if you have the `realpath' function. */
|
||||
#undef HAVE_REALPATH
|
||||
|
||||
@@ -121,7 +154,8 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if the compiler supports simple visibility declarations. */
|
||||
/* Define to 1 if the compiler supports GCC compatible visibility
|
||||
declarations. */
|
||||
#undef HAVE_VISIBILITY
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
@@ -130,6 +164,9 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* Define to 1 if you have the <windows.h> header file. */
|
||||
#undef HAVE_WINDOWS_H
|
||||
|
||||
/* Define to 1 if you have the <zlib.h> header file. */
|
||||
#undef HAVE_ZLIB_H
|
||||
|
||||
/* This limits the amount of memory that may be used while matching a pattern.
|
||||
It applies to both pcre2_match() and pcre2_dfa_match(). It does not apply
|
||||
to JIT matching. The value is in kibibytes (units of 1024 bytes). */
|
||||
@@ -215,6 +252,20 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
stack that is used while compiling a pattern. */
|
||||
#undef PARENS_NEST_LIMIT
|
||||
|
||||
/* The value of PCRE2GREP_BUFSIZE is the starting size of the buffer used by
|
||||
pcre2grep to hold parts of the file it is searching. The buffer will be
|
||||
expanded up to PCRE2GREP_MAX_BUFSIZE if necessary, for files containing
|
||||
very long lines. The actual amount of memory used by pcre2grep is three
|
||||
times this number, because it allows for the buffering of "before" and
|
||||
"after" lines. */
|
||||
#undef PCRE2GREP_BUFSIZE
|
||||
|
||||
/* The value of PCRE2GREP_MAX_BUFSIZE specifies the maximum size of the buffer
|
||||
used by pcre2grep to hold parts of the file it is searching. The actual
|
||||
amount of memory used by pcre2grep is three times this number, because it
|
||||
allows for the buffering of "before" and "after" lines. */
|
||||
#undef PCRE2GREP_MAX_BUFSIZE
|
||||
|
||||
/* Define to any value to include debugging code. */
|
||||
#undef PCRE2_DEBUG
|
||||
|
||||
@@ -237,11 +288,52 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* Define to any value if linking statically (TODO: make nice with Libtool) */
|
||||
#undef PCRE2_STATIC
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
#undef PTHREAD_CREATE_JOINABLE
|
||||
|
||||
/* Define to any non-zero number to enable support for SELinux compatible
|
||||
executable memory allocator in JIT. Note that this will have no effect
|
||||
unless SUPPORT_JIT is also defined. */
|
||||
#undef SLJIT_PROT_EXECUTABLE_ALLOCATOR
|
||||
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to any value to enable differential fuzzing support. */
|
||||
#undef SUPPORT_DIFF_FUZZ
|
||||
|
||||
/* Define to any value to enable support for Just-In-Time compiling. */
|
||||
#undef SUPPORT_JIT
|
||||
|
||||
/* Define to any value to allow pcre2grep to be linked with libbz2, so that it
|
||||
is able to handle .bz2 files. */
|
||||
#undef SUPPORT_LIBBZ2
|
||||
|
||||
/* Define to any value to allow pcre2test to be linked with libedit. */
|
||||
#undef SUPPORT_LIBEDIT
|
||||
|
||||
/* Define to any value to allow pcre2test to be linked with libreadline. */
|
||||
#undef SUPPORT_LIBREADLINE
|
||||
|
||||
/* Define to any value to allow pcre2grep to be linked with libz, so that it
|
||||
is able to handle .gz files. */
|
||||
#undef SUPPORT_LIBZ
|
||||
|
||||
/* Define to any value to enable callout script support in pcre2grep. */
|
||||
#undef SUPPORT_PCRE2GREP_CALLOUT
|
||||
|
||||
/* Define to any value to enable fork support in pcre2grep callout scripts.
|
||||
This will have no effect unless SUPPORT_PCRE2GREP_CALLOUT is also defined.
|
||||
*/
|
||||
#undef SUPPORT_PCRE2GREP_CALLOUT_FORK
|
||||
|
||||
/* Define to any value to enable JIT support in pcre2grep. Note that this will
|
||||
have no effect unless SUPPORT_JIT is also defined. */
|
||||
#undef SUPPORT_PCRE2GREP_JIT
|
||||
|
||||
/* Define to any value to enable the 16 bit PCRE2 library. */
|
||||
#undef SUPPORT_PCRE2_16
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
/* The current PCRE version information. */
|
||||
|
||||
#define PCRE2_MAJOR 10
|
||||
#define PCRE2_MINOR 43
|
||||
#define PCRE2_MINOR 45
|
||||
#define PCRE2_PRERELEASE
|
||||
#define PCRE2_DATE 2024-02-16
|
||||
#define PCRE2_DATE 2025-02-05
|
||||
|
||||
/* When an application links to a PCRE DLL in Windows, the symbols that are
|
||||
imported have to be identified as such. When building PCRE2, the appropriate
|
||||
@@ -143,6 +143,7 @@ D is inspected during pcre2_dfa_match() execution
|
||||
#define PCRE2_EXTENDED_MORE 0x01000000u /* C */
|
||||
#define PCRE2_LITERAL 0x02000000u /* C */
|
||||
#define PCRE2_MATCH_INVALID_UTF 0x04000000u /* J M D */
|
||||
#define PCRE2_ALT_EXTENDED_CLASS 0x08000000u /* C */
|
||||
|
||||
/* An additional compile options word is available in the compile context. */
|
||||
|
||||
@@ -159,6 +160,10 @@ D is inspected during pcre2_dfa_match() execution
|
||||
#define PCRE2_EXTRA_ASCII_BSW 0x00000400u /* C */
|
||||
#define PCRE2_EXTRA_ASCII_POSIX 0x00000800u /* C */
|
||||
#define PCRE2_EXTRA_ASCII_DIGIT 0x00001000u /* C */
|
||||
#define PCRE2_EXTRA_PYTHON_OCTAL 0x00002000u /* C */
|
||||
#define PCRE2_EXTRA_NO_BS0 0x00004000u /* C */
|
||||
#define PCRE2_EXTRA_NEVER_CALLOUT 0x00008000u /* C */
|
||||
#define PCRE2_EXTRA_TURKISH_CASING 0x00010000u /* C */
|
||||
|
||||
/* These are for pcre2_jit_compile(). */
|
||||
|
||||
@@ -166,6 +171,7 @@ D is inspected during pcre2_dfa_match() execution
|
||||
#define PCRE2_JIT_PARTIAL_SOFT 0x00000002u
|
||||
#define PCRE2_JIT_PARTIAL_HARD 0x00000004u
|
||||
#define PCRE2_JIT_INVALID_UTF 0x00000100u
|
||||
#define PCRE2_JIT_TEST_ALLOC 0x00000200u
|
||||
|
||||
/* These are for pcre2_match(), pcre2_dfa_match(), pcre2_jit_match(), and
|
||||
pcre2_substitute(). Some are allowed only for one of the functions, and in
|
||||
@@ -318,9 +324,25 @@ pcre2_pattern_convert(). */
|
||||
#define PCRE2_ERROR_ALPHA_ASSERTION_UNKNOWN 195
|
||||
#define PCRE2_ERROR_SCRIPT_RUN_NOT_AVAILABLE 196
|
||||
#define PCRE2_ERROR_TOO_MANY_CAPTURES 197
|
||||
#define PCRE2_ERROR_CONDITION_ATOMIC_ASSERTION_EXPECTED 198
|
||||
#define PCRE2_ERROR_MISSING_OCTAL_DIGIT 198
|
||||
#define PCRE2_ERROR_BACKSLASH_K_IN_LOOKAROUND 199
|
||||
|
||||
#define PCRE2_ERROR_MAX_VAR_LOOKBEHIND_EXCEEDED 200
|
||||
#define PCRE2_ERROR_PATTERN_COMPILED_SIZE_TOO_BIG 201
|
||||
#define PCRE2_ERROR_OVERSIZE_PYTHON_OCTAL 202
|
||||
#define PCRE2_ERROR_CALLOUT_CALLER_DISABLED 203
|
||||
#define PCRE2_ERROR_EXTRA_CASING_REQUIRES_UNICODE 204
|
||||
#define PCRE2_ERROR_TURKISH_CASING_REQUIRES_UTF 205
|
||||
#define PCRE2_ERROR_EXTRA_CASING_INCOMPATIBLE 206
|
||||
#define PCRE2_ERROR_ECLASS_NEST_TOO_DEEP 207
|
||||
#define PCRE2_ERROR_ECLASS_INVALID_OPERATOR 208
|
||||
#define PCRE2_ERROR_ECLASS_UNEXPECTED_OPERATOR 209
|
||||
#define PCRE2_ERROR_ECLASS_EXPECTED_OPERAND 210
|
||||
#define PCRE2_ERROR_ECLASS_MIXED_OPERATORS 211
|
||||
#define PCRE2_ERROR_ECLASS_HINT_SQUARE_BRACKET 212
|
||||
#define PCRE2_ERROR_PERL_ECLASS_UNEXPECTED_EXPR 213
|
||||
#define PCRE2_ERROR_PERL_ECLASS_EMPTY_EXPR 214
|
||||
#define PCRE2_ERROR_PERL_ECLASS_MISSING_CLOSE 215
|
||||
#define PCRE2_ERROR_PERL_ECLASS_UNEXPECTED_CHAR 216
|
||||
|
||||
/* "Expected" matching error codes: no match and partial match. */
|
||||
|
||||
@@ -407,6 +429,9 @@ released, the numbers must not be changed. */
|
||||
#define PCRE2_ERROR_INTERNAL_DUPMATCH (-65)
|
||||
#define PCRE2_ERROR_DFA_UINVALID_UTF (-66)
|
||||
#define PCRE2_ERROR_INVALIDOFFSET (-67)
|
||||
#define PCRE2_ERROR_JIT_UNSUPPORTED (-68)
|
||||
#define PCRE2_ERROR_REPLACECASE (-69)
|
||||
#define PCRE2_ERROR_TOOLARGEREPLACE (-70)
|
||||
|
||||
|
||||
/* Request types for pcre2_pattern_info() */
|
||||
@@ -460,6 +485,30 @@ released, the numbers must not be changed. */
|
||||
#define PCRE2_CONFIG_COMPILED_WIDTHS 14
|
||||
#define PCRE2_CONFIG_TABLES_LENGTH 15
|
||||
|
||||
/* Optimization directives for pcre2_set_optimize().
|
||||
For binary compatibility, only add to this list; do not renumber. */
|
||||
|
||||
#define PCRE2_OPTIMIZATION_NONE 0
|
||||
#define PCRE2_OPTIMIZATION_FULL 1
|
||||
|
||||
#define PCRE2_AUTO_POSSESS 64
|
||||
#define PCRE2_AUTO_POSSESS_OFF 65
|
||||
#define PCRE2_DOTSTAR_ANCHOR 66
|
||||
#define PCRE2_DOTSTAR_ANCHOR_OFF 67
|
||||
#define PCRE2_START_OPTIMIZE 68
|
||||
#define PCRE2_START_OPTIMIZE_OFF 69
|
||||
|
||||
/* Types used in pcre2_set_substitute_case_callout().
|
||||
|
||||
PCRE2_SUBSTITUTE_CASE_LOWER and PCRE2_SUBSTITUTE_CASE_UPPER are passed to the
|
||||
callout to indicate that the case of the entire callout input should be
|
||||
case-transformed. PCRE2_SUBSTITUTE_CASE_TITLE_FIRST is passed to indicate that
|
||||
only the first character or glyph should be transformed to Unicode titlecase,
|
||||
and the rest to lowercase. */
|
||||
|
||||
#define PCRE2_SUBSTITUTE_CASE_LOWER 1
|
||||
#define PCRE2_SUBSTITUTE_CASE_UPPER 2
|
||||
#define PCRE2_SUBSTITUTE_CASE_TITLE_FIRST 3
|
||||
|
||||
/* Types for code units in patterns and subject strings. */
|
||||
|
||||
@@ -603,6 +652,8 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_compile_extra_options(pcre2_compile_context *, uint32_t); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_max_pattern_length(pcre2_compile_context *, PCRE2_SIZE); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_max_pattern_compiled_length(pcre2_compile_context *, PCRE2_SIZE); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_max_varlookbehind(pcre2_compile_context *, uint32_t); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
@@ -611,7 +662,9 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_parens_nest_limit(pcre2_compile_context *, uint32_t); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_compile_recursion_guard(pcre2_compile_context *, \
|
||||
int (*)(uint32_t, void *), void *);
|
||||
int (*)(uint32_t, void *), void *); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_optimize(pcre2_compile_context *, uint32_t);
|
||||
|
||||
#define PCRE2_MATCH_CONTEXT_FUNCTIONS \
|
||||
PCRE2_EXP_DECL pcre2_match_context *PCRE2_CALL_CONVENTION \
|
||||
@@ -626,6 +679,11 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_substitute_callout(pcre2_match_context *, \
|
||||
int (*)(pcre2_substitute_callout_block *, void *), void *); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_substitute_case_callout(pcre2_match_context *, \
|
||||
PCRE2_SIZE (*)(PCRE2_SPTR, PCRE2_SIZE, PCRE2_UCHAR *, PCRE2_SIZE, int, \
|
||||
void *), \
|
||||
void *); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_depth_limit(pcre2_match_context *, uint32_t); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
@@ -738,6 +796,7 @@ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_substring_list_get(pcre2_match_data *, PCRE2_UCHAR ***, PCRE2_SIZE **);
|
||||
|
||||
|
||||
/* Functions for serializing / deserializing compiled patterns. */
|
||||
|
||||
#define PCRE2_SERIALIZE_FUNCTIONS \
|
||||
@@ -901,10 +960,13 @@ pcre2_compile are called by application code. */
|
||||
#define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_)
|
||||
#define pcre2_set_max_varlookbehind PCRE2_SUFFIX(pcre2_set_max_varlookbehind_)
|
||||
#define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_)
|
||||
#define pcre2_set_max_pattern_compiled_length PCRE2_SUFFIX(pcre2_set_max_pattern_compiled_length_)
|
||||
#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
|
||||
#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
|
||||
#define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_)
|
||||
#define pcre2_set_optimize PCRE2_SUFFIX(pcre2_set_optimize_)
|
||||
#define pcre2_set_substitute_callout PCRE2_SUFFIX(pcre2_set_substitute_callout_)
|
||||
#define pcre2_set_substitute_case_callout PCRE2_SUFFIX(pcre2_set_substitute_case_callout_)
|
||||
#define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_)
|
||||
#define pcre2_substring_copy_byname PCRE2_SUFFIX(pcre2_substring_copy_byname_)
|
||||
#define pcre2_substring_copy_bynumber PCRE2_SUFFIX(pcre2_substring_copy_bynumber_)
|
||||
|
||||
@@ -143,6 +143,7 @@ D is inspected during pcre2_dfa_match() execution
|
||||
#define PCRE2_EXTENDED_MORE 0x01000000u /* C */
|
||||
#define PCRE2_LITERAL 0x02000000u /* C */
|
||||
#define PCRE2_MATCH_INVALID_UTF 0x04000000u /* J M D */
|
||||
#define PCRE2_ALT_EXTENDED_CLASS 0x08000000u /* C */
|
||||
|
||||
/* An additional compile options word is available in the compile context. */
|
||||
|
||||
@@ -159,6 +160,10 @@ D is inspected during pcre2_dfa_match() execution
|
||||
#define PCRE2_EXTRA_ASCII_BSW 0x00000400u /* C */
|
||||
#define PCRE2_EXTRA_ASCII_POSIX 0x00000800u /* C */
|
||||
#define PCRE2_EXTRA_ASCII_DIGIT 0x00001000u /* C */
|
||||
#define PCRE2_EXTRA_PYTHON_OCTAL 0x00002000u /* C */
|
||||
#define PCRE2_EXTRA_NO_BS0 0x00004000u /* C */
|
||||
#define PCRE2_EXTRA_NEVER_CALLOUT 0x00008000u /* C */
|
||||
#define PCRE2_EXTRA_TURKISH_CASING 0x00010000u /* C */
|
||||
|
||||
/* These are for pcre2_jit_compile(). */
|
||||
|
||||
@@ -166,6 +171,7 @@ D is inspected during pcre2_dfa_match() execution
|
||||
#define PCRE2_JIT_PARTIAL_SOFT 0x00000002u
|
||||
#define PCRE2_JIT_PARTIAL_HARD 0x00000004u
|
||||
#define PCRE2_JIT_INVALID_UTF 0x00000100u
|
||||
#define PCRE2_JIT_TEST_ALLOC 0x00000200u
|
||||
|
||||
/* These are for pcre2_match(), pcre2_dfa_match(), pcre2_jit_match(), and
|
||||
pcre2_substitute(). Some are allowed only for one of the functions, and in
|
||||
@@ -318,9 +324,25 @@ pcre2_pattern_convert(). */
|
||||
#define PCRE2_ERROR_ALPHA_ASSERTION_UNKNOWN 195
|
||||
#define PCRE2_ERROR_SCRIPT_RUN_NOT_AVAILABLE 196
|
||||
#define PCRE2_ERROR_TOO_MANY_CAPTURES 197
|
||||
#define PCRE2_ERROR_CONDITION_ATOMIC_ASSERTION_EXPECTED 198
|
||||
#define PCRE2_ERROR_MISSING_OCTAL_DIGIT 198
|
||||
#define PCRE2_ERROR_BACKSLASH_K_IN_LOOKAROUND 199
|
||||
|
||||
#define PCRE2_ERROR_MAX_VAR_LOOKBEHIND_EXCEEDED 200
|
||||
#define PCRE2_ERROR_PATTERN_COMPILED_SIZE_TOO_BIG 201
|
||||
#define PCRE2_ERROR_OVERSIZE_PYTHON_OCTAL 202
|
||||
#define PCRE2_ERROR_CALLOUT_CALLER_DISABLED 203
|
||||
#define PCRE2_ERROR_EXTRA_CASING_REQUIRES_UNICODE 204
|
||||
#define PCRE2_ERROR_TURKISH_CASING_REQUIRES_UTF 205
|
||||
#define PCRE2_ERROR_EXTRA_CASING_INCOMPATIBLE 206
|
||||
#define PCRE2_ERROR_ECLASS_NEST_TOO_DEEP 207
|
||||
#define PCRE2_ERROR_ECLASS_INVALID_OPERATOR 208
|
||||
#define PCRE2_ERROR_ECLASS_UNEXPECTED_OPERATOR 209
|
||||
#define PCRE2_ERROR_ECLASS_EXPECTED_OPERAND 210
|
||||
#define PCRE2_ERROR_ECLASS_MIXED_OPERATORS 211
|
||||
#define PCRE2_ERROR_ECLASS_HINT_SQUARE_BRACKET 212
|
||||
#define PCRE2_ERROR_PERL_ECLASS_UNEXPECTED_EXPR 213
|
||||
#define PCRE2_ERROR_PERL_ECLASS_EMPTY_EXPR 214
|
||||
#define PCRE2_ERROR_PERL_ECLASS_MISSING_CLOSE 215
|
||||
#define PCRE2_ERROR_PERL_ECLASS_UNEXPECTED_CHAR 216
|
||||
|
||||
/* "Expected" matching error codes: no match and partial match. */
|
||||
|
||||
@@ -407,6 +429,9 @@ released, the numbers must not be changed. */
|
||||
#define PCRE2_ERROR_INTERNAL_DUPMATCH (-65)
|
||||
#define PCRE2_ERROR_DFA_UINVALID_UTF (-66)
|
||||
#define PCRE2_ERROR_INVALIDOFFSET (-67)
|
||||
#define PCRE2_ERROR_JIT_UNSUPPORTED (-68)
|
||||
#define PCRE2_ERROR_REPLACECASE (-69)
|
||||
#define PCRE2_ERROR_TOOLARGEREPLACE (-70)
|
||||
|
||||
|
||||
/* Request types for pcre2_pattern_info() */
|
||||
@@ -460,6 +485,30 @@ released, the numbers must not be changed. */
|
||||
#define PCRE2_CONFIG_COMPILED_WIDTHS 14
|
||||
#define PCRE2_CONFIG_TABLES_LENGTH 15
|
||||
|
||||
/* Optimization directives for pcre2_set_optimize().
|
||||
For binary compatibility, only add to this list; do not renumber. */
|
||||
|
||||
#define PCRE2_OPTIMIZATION_NONE 0
|
||||
#define PCRE2_OPTIMIZATION_FULL 1
|
||||
|
||||
#define PCRE2_AUTO_POSSESS 64
|
||||
#define PCRE2_AUTO_POSSESS_OFF 65
|
||||
#define PCRE2_DOTSTAR_ANCHOR 66
|
||||
#define PCRE2_DOTSTAR_ANCHOR_OFF 67
|
||||
#define PCRE2_START_OPTIMIZE 68
|
||||
#define PCRE2_START_OPTIMIZE_OFF 69
|
||||
|
||||
/* Types used in pcre2_set_substitute_case_callout().
|
||||
|
||||
PCRE2_SUBSTITUTE_CASE_LOWER and PCRE2_SUBSTITUTE_CASE_UPPER are passed to the
|
||||
callout to indicate that the case of the entire callout input should be
|
||||
case-transformed. PCRE2_SUBSTITUTE_CASE_TITLE_FIRST is passed to indicate that
|
||||
only the first character or glyph should be transformed to Unicode titlecase,
|
||||
and the rest to lowercase. */
|
||||
|
||||
#define PCRE2_SUBSTITUTE_CASE_LOWER 1
|
||||
#define PCRE2_SUBSTITUTE_CASE_UPPER 2
|
||||
#define PCRE2_SUBSTITUTE_CASE_TITLE_FIRST 3
|
||||
|
||||
/* Types for code units in patterns and subject strings. */
|
||||
|
||||
@@ -603,6 +652,8 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_compile_extra_options(pcre2_compile_context *, uint32_t); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_max_pattern_length(pcre2_compile_context *, PCRE2_SIZE); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_max_pattern_compiled_length(pcre2_compile_context *, PCRE2_SIZE); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_max_varlookbehind(pcre2_compile_context *, uint32_t); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
@@ -611,7 +662,9 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_parens_nest_limit(pcre2_compile_context *, uint32_t); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_compile_recursion_guard(pcre2_compile_context *, \
|
||||
int (*)(uint32_t, void *), void *);
|
||||
int (*)(uint32_t, void *), void *); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_optimize(pcre2_compile_context *, uint32_t);
|
||||
|
||||
#define PCRE2_MATCH_CONTEXT_FUNCTIONS \
|
||||
PCRE2_EXP_DECL pcre2_match_context *PCRE2_CALL_CONVENTION \
|
||||
@@ -626,6 +679,11 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_substitute_callout(pcre2_match_context *, \
|
||||
int (*)(pcre2_substitute_callout_block *, void *), void *); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_substitute_case_callout(pcre2_match_context *, \
|
||||
PCRE2_SIZE (*)(PCRE2_SPTR, PCRE2_SIZE, PCRE2_UCHAR *, PCRE2_SIZE, int, \
|
||||
void *), \
|
||||
void *); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_set_depth_limit(pcre2_match_context *, uint32_t); \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
@@ -738,6 +796,7 @@ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
|
||||
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
|
||||
pcre2_substring_list_get(pcre2_match_data *, PCRE2_UCHAR ***, PCRE2_SIZE **);
|
||||
|
||||
|
||||
/* Functions for serializing / deserializing compiled patterns. */
|
||||
|
||||
#define PCRE2_SERIALIZE_FUNCTIONS \
|
||||
@@ -901,10 +960,13 @@ pcre2_compile are called by application code. */
|
||||
#define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_)
|
||||
#define pcre2_set_max_varlookbehind PCRE2_SUFFIX(pcre2_set_max_varlookbehind_)
|
||||
#define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_)
|
||||
#define pcre2_set_max_pattern_compiled_length PCRE2_SUFFIX(pcre2_set_max_pattern_compiled_length_)
|
||||
#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
|
||||
#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
|
||||
#define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_)
|
||||
#define pcre2_set_optimize PCRE2_SUFFIX(pcre2_set_optimize_)
|
||||
#define pcre2_set_substitute_callout PCRE2_SUFFIX(pcre2_set_substitute_callout_)
|
||||
#define pcre2_set_substitute_case_callout PCRE2_SUFFIX(pcre2_set_substitute_case_callout_)
|
||||
#define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_)
|
||||
#define pcre2_substring_copy_byname PCRE2_SUFFIX(pcre2_substring_copy_byname_)
|
||||
#define pcre2_substring_copy_bynumber PCRE2_SUFFIX(pcre2_substring_copy_bynumber_)
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2022 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -49,6 +49,10 @@ repeats into possessive repeats where possible. */
|
||||
|
||||
#include "pcre2_internal.h"
|
||||
|
||||
/* This macro represents the max size of list[] and that is used to keep
|
||||
track of UCD info in several places, it should be kept on sync with the
|
||||
value used by GenerateUcd.py */
|
||||
#define MAX_LIST 8
|
||||
|
||||
/*************************************************
|
||||
* Tables for auto-possessification *
|
||||
@@ -64,7 +68,7 @@ The Unicode property types (\P and \p) have to be present to fill out the table
|
||||
because of what their opcode values are, but the table values should always be
|
||||
zero because property types are handled separately in the code. The last four
|
||||
columns apply to items that cannot be repeated, so there is no need to have
|
||||
rows for them. Note that OP_DIGIT etc. are generated only when PCRE_UCP is
|
||||
rows for them. Note that OP_DIGIT etc. are generated only when PCRE2_UCP is
|
||||
*not* set. When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */
|
||||
|
||||
#define APTROWS (LAST_AUTOTAB_LEFT_OP - FIRST_AUTOTAB_OP + 1)
|
||||
@@ -123,21 +127,21 @@ opcode is used to select the column. The values are as follows:
|
||||
*/
|
||||
|
||||
static const uint8_t propposstab[PT_TABSIZE][PT_TABSIZE] = {
|
||||
/* ANY LAMP GC PC SC SCX ALNUM SPACE PXSPACE WORD CLIST UCNC BIDICL BOOL */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_ANY */
|
||||
{ 0, 3, 0, 0, 0, 0, 3, 1, 1, 0, 0, 0, 0, 0 }, /* PT_LAMP */
|
||||
{ 0, 0, 2, 4, 0, 0, 9, 10, 10, 11, 0, 0, 0, 0 }, /* PT_GC */
|
||||
{ 0, 0, 5, 2, 0, 0, 15, 16, 16, 17, 0, 0, 0, 0 }, /* PT_PC */
|
||||
{ 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_SC */
|
||||
{ 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_SCX */
|
||||
{ 0, 3, 6, 12, 0, 0, 3, 1, 1, 0, 0, 0, 0, 0 }, /* PT_ALNUM */
|
||||
{ 0, 1, 7, 13, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0 }, /* PT_SPACE */
|
||||
{ 0, 1, 7, 13, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0 }, /* PT_PXSPACE */
|
||||
{ 0, 0, 8, 14, 0, 0, 0, 1, 1, 3, 0, 0, 0, 0 }, /* PT_WORD */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_CLIST */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0 }, /* PT_UCNC */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_BIDICL */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } /* PT_BOOL */
|
||||
/* LAMP GC PC SC SCX ALNUM SPACE PXSPACE WORD CLIST UCNC BIDICL BOOL */
|
||||
{ 3, 0, 0, 0, 0, 3, 1, 1, 0, 0, 0, 0, 0 }, /* PT_LAMP */
|
||||
{ 0, 2, 4, 0, 0, 9, 10, 10, 11, 0, 0, 0, 0 }, /* PT_GC */
|
||||
{ 0, 5, 2, 0, 0, 15, 16, 16, 17, 0, 0, 0, 0 }, /* PT_PC */
|
||||
{ 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_SC */
|
||||
{ 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_SCX */
|
||||
{ 3, 6, 12, 0, 0, 3, 1, 1, 0, 0, 0, 0, 0 }, /* PT_ALNUM */
|
||||
{ 1, 7, 13, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0 }, /* PT_SPACE */
|
||||
{ 1, 7, 13, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0 }, /* PT_PXSPACE */
|
||||
{ 0, 8, 14, 0, 0, 0, 1, 1, 3, 0, 0, 0, 0 }, /* PT_WORD */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_CLIST */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0 }, /* PT_UCNC */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_BIDICL */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } /* PT_BOOL */
|
||||
/* PT_ANY does not need a record. */
|
||||
};
|
||||
|
||||
/* This table is used to check whether auto-possessification is possible
|
||||
@@ -199,7 +203,7 @@ static BOOL
|
||||
check_char_prop(uint32_t c, unsigned int ptype, unsigned int pdata,
|
||||
BOOL negated)
|
||||
{
|
||||
BOOL ok;
|
||||
BOOL ok, rc;
|
||||
const uint32_t *p;
|
||||
const ucd_record *prop = GET_UCD(c);
|
||||
|
||||
@@ -240,12 +244,13 @@ switch(ptype)
|
||||
{
|
||||
HSPACE_CASES:
|
||||
VSPACE_CASES:
|
||||
return negated;
|
||||
rc = negated;
|
||||
break;
|
||||
|
||||
default:
|
||||
return (PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == negated;
|
||||
rc = (PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == negated;
|
||||
}
|
||||
break; /* Control never reaches here */
|
||||
return rc;
|
||||
|
||||
case PT_WORD:
|
||||
return (PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
|
||||
@@ -259,7 +264,8 @@ switch(ptype)
|
||||
if (c < *p) return !negated;
|
||||
if (c == *p++) return negated;
|
||||
}
|
||||
break; /* Control never reaches here */
|
||||
PCRE2_DEBUG_UNREACHABLE(); /* Control should never reach here */
|
||||
break;
|
||||
|
||||
/* Haven't yet thought these through. */
|
||||
|
||||
@@ -328,6 +334,7 @@ get_chr_property_list(PCRE2_SPTR code, BOOL utf, BOOL ucp, const uint8_t *fcc,
|
||||
PCRE2_UCHAR c = *code;
|
||||
PCRE2_UCHAR base;
|
||||
PCRE2_SPTR end;
|
||||
PCRE2_SPTR class_end;
|
||||
uint32_t chr;
|
||||
|
||||
#ifdef SUPPORT_UNICODE
|
||||
@@ -450,10 +457,12 @@ switch(c)
|
||||
code += 2;
|
||||
|
||||
do {
|
||||
if (clist_dest >= list + 8)
|
||||
if (clist_dest >= list + MAX_LIST)
|
||||
{
|
||||
/* Early return if there is not enough space. This should never
|
||||
happen, since all clists are shorter than 5 character now. */
|
||||
/* Early return if there is not enough space. GenerateUcd.py
|
||||
generated a list with more than 5 characters and something
|
||||
must be done about that going forward. */
|
||||
PCRE2_DEBUG_UNREACHABLE(); /* Remove if it ever triggers */
|
||||
list[2] = code[0];
|
||||
list[3] = code[1];
|
||||
return code;
|
||||
@@ -473,11 +482,13 @@ switch(c)
|
||||
case OP_CLASS:
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
case OP_XCLASS:
|
||||
if (c == OP_XCLASS)
|
||||
case OP_ECLASS:
|
||||
if (c == OP_XCLASS || c == OP_ECLASS)
|
||||
end = code + GET(code, 0) - 1;
|
||||
else
|
||||
#endif
|
||||
end = code + 32 / sizeof(PCRE2_UCHAR);
|
||||
class_end = end;
|
||||
|
||||
switch(*end)
|
||||
{
|
||||
@@ -505,6 +516,7 @@ switch(c)
|
||||
break;
|
||||
}
|
||||
list[2] = (uint32_t)(end - code);
|
||||
list[3] = (uint32_t)(end - class_end);
|
||||
return end;
|
||||
}
|
||||
|
||||
@@ -537,7 +549,7 @@ compare_opcodes(PCRE2_SPTR code, BOOL utf, BOOL ucp, const compile_block *cb,
|
||||
const uint32_t *base_list, PCRE2_SPTR base_end, int *rec_limit)
|
||||
{
|
||||
PCRE2_UCHAR c;
|
||||
uint32_t list[8];
|
||||
uint32_t list[MAX_LIST];
|
||||
const uint32_t *chr_ptr;
|
||||
const uint32_t *ochr_ptr;
|
||||
const uint32_t *list_ptr;
|
||||
@@ -581,7 +593,7 @@ for(;;)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* At the end of a branch, skip to the end of the group. */
|
||||
/* At the end of a branch, skip to the end of the group and process it. */
|
||||
|
||||
if (c == OP_ALT)
|
||||
{
|
||||
@@ -638,19 +650,29 @@ for(;;)
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
/* Atomic sub-patterns and assertions can always auto-possessify their
|
||||
last iterator except for variable length lookbehinds. However, if the
|
||||
group was entered as a result of checking a previous iterator, this is
|
||||
not possible. */
|
||||
/* Atomic sub-patterns and forward assertions can always auto-possessify
|
||||
their last iterator. However, if the group was entered as a result of
|
||||
checking a previous iterator, this is not possible. */
|
||||
|
||||
case OP_ASSERT:
|
||||
case OP_ASSERT_NOT:
|
||||
case OP_ONCE:
|
||||
return !entered_a_group;
|
||||
|
||||
/* Fixed-length lookbehinds can be treated the same way, but variable
|
||||
length lookbehinds must not auto-possessify their last iterator. Note
|
||||
that in order to identify a variable length lookbehind we must check
|
||||
through all branches, because some may be of fixed length. */
|
||||
|
||||
case OP_ASSERTBACK:
|
||||
case OP_ASSERTBACK_NOT:
|
||||
return (bracode[1+LINK_SIZE] == OP_VREVERSE)? FALSE : !entered_a_group;
|
||||
do
|
||||
{
|
||||
if (bracode[1+LINK_SIZE] == OP_VREVERSE) return FALSE; /* Variable */
|
||||
bracode += GET(bracode, 1);
|
||||
}
|
||||
while (*bracode == OP_ALT);
|
||||
return !entered_a_group; /* Not variable length */
|
||||
|
||||
/* Non-atomic assertions - don't possessify last iterator. This needs
|
||||
more thought. */
|
||||
@@ -748,12 +770,12 @@ for(;;)
|
||||
if (base_list[0] == OP_CLASS)
|
||||
#endif
|
||||
{
|
||||
set1 = (uint8_t *)(base_end - base_list[2]);
|
||||
set1 = (const uint8_t *)(base_end - base_list[2]);
|
||||
list_ptr = list;
|
||||
}
|
||||
else
|
||||
{
|
||||
set1 = (uint8_t *)(code - list[2]);
|
||||
set1 = (const uint8_t *)(code - list[2]);
|
||||
list_ptr = base_list;
|
||||
}
|
||||
|
||||
@@ -762,13 +784,14 @@ for(;;)
|
||||
{
|
||||
case OP_CLASS:
|
||||
case OP_NCLASS:
|
||||
set2 = (uint8_t *)
|
||||
set2 = (const uint8_t *)
|
||||
((list_ptr == list ? code : base_end) - list_ptr[2]);
|
||||
break;
|
||||
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
case OP_XCLASS:
|
||||
xclass_flags = (list_ptr == list ? code : base_end) - list_ptr[2] + LINK_SIZE;
|
||||
xclass_flags = (list_ptr == list ? code : base_end) -
|
||||
list_ptr[2] + LINK_SIZE;
|
||||
if ((*xclass_flags & XCL_HASPROP) != 0) return FALSE;
|
||||
if ((*xclass_flags & XCL_MAP) == 0)
|
||||
{
|
||||
@@ -777,7 +800,7 @@ for(;;)
|
||||
/* Might be an empty repeat. */
|
||||
continue;
|
||||
}
|
||||
set2 = (uint8_t *)(xclass_flags + 1);
|
||||
set2 = (const uint8_t *)(xclass_flags + 1);
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -785,21 +808,21 @@ for(;;)
|
||||
invert_bits = TRUE;
|
||||
/* Fall through */
|
||||
case OP_DIGIT:
|
||||
set2 = (uint8_t *)(cb->cbits + cbit_digit);
|
||||
set2 = (const uint8_t *)(cb->cbits + cbit_digit);
|
||||
break;
|
||||
|
||||
case OP_NOT_WHITESPACE:
|
||||
invert_bits = TRUE;
|
||||
/* Fall through */
|
||||
case OP_WHITESPACE:
|
||||
set2 = (uint8_t *)(cb->cbits + cbit_space);
|
||||
set2 = (const uint8_t *)(cb->cbits + cbit_space);
|
||||
break;
|
||||
|
||||
case OP_NOT_WORDCHAR:
|
||||
invert_bits = TRUE;
|
||||
/* Fall through */
|
||||
case OP_WORDCHAR:
|
||||
set2 = (uint8_t *)(cb->cbits + cbit_word);
|
||||
set2 = (const uint8_t *)(cb->cbits + cbit_word);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1084,7 +1107,7 @@ for(;;)
|
||||
|
||||
case OP_CLASS:
|
||||
if (chr > 255) break;
|
||||
class_bitset = (uint8_t *)
|
||||
class_bitset = (const uint8_t *)
|
||||
((list_ptr == list ? code : base_end) - list_ptr[2]);
|
||||
if ((class_bitset[chr >> 3] & (1u << (chr & 7))) != 0) return FALSE;
|
||||
break;
|
||||
@@ -1092,9 +1115,18 @@ for(;;)
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
case OP_XCLASS:
|
||||
if (PRIV(xclass)(chr, (list_ptr == list ? code : base_end) -
|
||||
list_ptr[2] + LINK_SIZE, utf)) return FALSE;
|
||||
list_ptr[2] + LINK_SIZE, (const uint8_t*)cb->start_code, utf))
|
||||
return FALSE;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case OP_ECLASS:
|
||||
if (PRIV(eclass)(chr,
|
||||
(list_ptr == list ? code : base_end) - list_ptr[2] + LINK_SIZE,
|
||||
(list_ptr == list ? code : base_end) - list_ptr[3],
|
||||
(const uint8_t*)cb->start_code, utf))
|
||||
return FALSE;
|
||||
break;
|
||||
#endif /* SUPPORT_WIDE_CHARS */
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
@@ -1109,8 +1141,8 @@ for(;;)
|
||||
if (list[1] == 0) return TRUE;
|
||||
}
|
||||
|
||||
/* Control never reaches here. There used to be a fail-save return FALSE; here,
|
||||
but some compilers complain about an unreachable statement. */
|
||||
PCRE2_DEBUG_UNREACHABLE(); /* Control should never reach here */
|
||||
return FALSE; /* Avoid compiler warnings */
|
||||
}
|
||||
|
||||
|
||||
@@ -1140,7 +1172,7 @@ PRIV(auto_possessify)(PCRE2_UCHAR *code, const compile_block *cb)
|
||||
PCRE2_UCHAR c;
|
||||
PCRE2_SPTR end;
|
||||
PCRE2_UCHAR *repeat_opcode;
|
||||
uint32_t list[8];
|
||||
uint32_t list[MAX_LIST];
|
||||
int rec_limit = 1000; /* Was 10,000 but clang+ASAN uses a lot of stack. */
|
||||
BOOL utf = (cb->external_options & PCRE2_UTF) != 0;
|
||||
BOOL ucp = (cb->external_options & PCRE2_UCP) != 0;
|
||||
@@ -1149,7 +1181,11 @@ for (;;)
|
||||
{
|
||||
c = *code;
|
||||
|
||||
if (c >= OP_TABLE_LENGTH) return -1; /* Something gone wrong */
|
||||
if (c >= OP_TABLE_LENGTH)
|
||||
{
|
||||
PCRE2_DEBUG_UNREACHABLE();
|
||||
return -1; /* Something gone wrong */
|
||||
}
|
||||
|
||||
if (c >= OP_STAR && c <= OP_TYPEPOSUPTO)
|
||||
{
|
||||
@@ -1198,10 +1234,14 @@ for (;;)
|
||||
}
|
||||
c = *code;
|
||||
}
|
||||
else if (c == OP_CLASS || c == OP_NCLASS || c == OP_XCLASS)
|
||||
else if (c == OP_CLASS || c == OP_NCLASS
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
|| c == OP_XCLASS || c == OP_ECLASS
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
if (c == OP_XCLASS)
|
||||
if (c == OP_XCLASS || c == OP_ECLASS)
|
||||
repeat_opcode = code + GET(code, 1);
|
||||
else
|
||||
#endif
|
||||
@@ -1211,7 +1251,7 @@ for (;;)
|
||||
if (c >= OP_CRSTAR && c <= OP_CRMINRANGE)
|
||||
{
|
||||
/* The return from get_chr_property_list() will never be NULL when
|
||||
*code (aka c) is one of the three class opcodes. However, gcc with
|
||||
*code (aka c) is one of the four class opcodes. However, gcc with
|
||||
-fanalyzer notes that a NULL return is possible, and grumbles. Hence we
|
||||
put in a check. */
|
||||
|
||||
@@ -1279,6 +1319,7 @@ for (;;)
|
||||
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
case OP_XCLASS:
|
||||
case OP_ECLASS:
|
||||
code += GET(code, 1);
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -74,9 +74,7 @@ if (__builtin_mul_overflow(a, b, &m)) return TRUE;
|
||||
#else
|
||||
INT64_OR_DOUBLE m;
|
||||
|
||||
#ifdef PCRE2_DEBUG
|
||||
if (a < 0 || b < 0) abort();
|
||||
#endif
|
||||
PCRE2_ASSERT(a >= 0 && b >= 0);
|
||||
|
||||
m = (INT64_OR_DOUBLE)a * (INT64_OR_DOUBLE)b;
|
||||
|
||||
@@ -93,4 +91,4 @@ if (m > PCRE2_SIZE_MAX) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* End of pcre_chkdint.c */
|
||||
/* End of pcre2_chkdint.c */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
280
libpcre/src/pcre2_compile.h
Normal file
280
libpcre/src/pcre2_compile.h
Normal file
@@ -0,0 +1,280 @@
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
||||
/* PCRE2 is a library of functions to support regular expressions whose syntax
|
||||
and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the University of Cambridge nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef PCRE2_COMPILE_H_IDEMPOTENT_GUARD
|
||||
#define PCRE2_COMPILE_H_IDEMPOTENT_GUARD
|
||||
|
||||
#include "pcre2_internal.h"
|
||||
|
||||
/* Compile time error code numbers. They are given names so that they can more
|
||||
easily be tracked. When a new number is added, the tables called eint1 and
|
||||
eint2 in pcre2posix.c may need to be updated, and a new error text must be
|
||||
added to compile_error_texts in pcre2_error.c. Also, the error codes in
|
||||
pcre2.h.in must be updated - their values are exactly 100 greater than these
|
||||
values. */
|
||||
|
||||
enum { ERR0 = COMPILE_ERROR_BASE,
|
||||
ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, ERR10,
|
||||
ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, ERR20,
|
||||
ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR28, ERR29, ERR30,
|
||||
ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, ERR40,
|
||||
ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49, ERR50,
|
||||
ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59, ERR60,
|
||||
ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69, ERR70,
|
||||
ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERR79, ERR80,
|
||||
ERR81, ERR82, ERR83, ERR84, ERR85, ERR86, ERR87, ERR88, ERR89, ERR90,
|
||||
ERR91, ERR92, ERR93, ERR94, ERR95, ERR96, ERR97, ERR98, ERR99, ERR100,
|
||||
ERR101,ERR102,ERR103,ERR104,ERR105,ERR106,ERR107,ERR108,ERR109,ERR110,
|
||||
ERR111,ERR112,ERR113,ERR114,ERR115,ERR116 };
|
||||
|
||||
/* Code values for parsed patterns, which are stored in a vector of 32-bit
|
||||
unsigned ints. Values less than META_END are literal data values. The coding
|
||||
for identifying the item is in the top 16-bits, leaving 16 bits for the
|
||||
additional data that some of them need. The META_CODE, META_DATA, and META_DIFF
|
||||
macros are used to manipulate parsed pattern elements.
|
||||
|
||||
NOTE: When these definitions are changed, the table of extra lengths for each
|
||||
code (meta_extra_lengths) must be updated to remain in step. */
|
||||
|
||||
#define META_END 0x80000000u /* End of pattern */
|
||||
|
||||
#define META_ALT 0x80010000u /* alternation */
|
||||
#define META_ATOMIC 0x80020000u /* atomic group */
|
||||
#define META_BACKREF 0x80030000u /* Back ref */
|
||||
#define META_BACKREF_BYNAME 0x80040000u /* \k'name' */
|
||||
#define META_BIGVALUE 0x80050000u /* Next is a literal > META_END */
|
||||
#define META_CALLOUT_NUMBER 0x80060000u /* (?C with numerical argument */
|
||||
#define META_CALLOUT_STRING 0x80070000u /* (?C with string argument */
|
||||
#define META_CAPTURE 0x80080000u /* Capturing parenthesis */
|
||||
#define META_CIRCUMFLEX 0x80090000u /* ^ metacharacter */
|
||||
#define META_CLASS 0x800a0000u /* start non-empty class */
|
||||
#define META_CLASS_EMPTY 0x800b0000u /* empty class */
|
||||
#define META_CLASS_EMPTY_NOT 0x800c0000u /* negative empty class */
|
||||
#define META_CLASS_END 0x800d0000u /* end of non-empty class */
|
||||
#define META_CLASS_NOT 0x800e0000u /* start non-empty negative class */
|
||||
#define META_COND_ASSERT 0x800f0000u /* (?(?assertion)... */
|
||||
#define META_COND_DEFINE 0x80100000u /* (?(DEFINE)... */
|
||||
#define META_COND_NAME 0x80110000u /* (?(<name>)... */
|
||||
#define META_COND_NUMBER 0x80120000u /* (?(digits)... */
|
||||
#define META_COND_RNAME 0x80130000u /* (?(R&name)... */
|
||||
#define META_COND_RNUMBER 0x80140000u /* (?(Rdigits)... */
|
||||
#define META_COND_VERSION 0x80150000u /* (?(VERSION<op>x.y)... */
|
||||
#define META_OFFSET 0x80160000u /* Setting offset for various
|
||||
META codes (e.g. META_SCS_NAME) */
|
||||
#define META_SCS 0x80170000u /* (*scan_substring:... */
|
||||
#define META_SCS_NAME 0x80180000u /* Next <name> of scan_substring */
|
||||
#define META_SCS_NUMBER 0x80190000u /* Next digits of scan_substring */
|
||||
#define META_DOLLAR 0x801a0000u /* $ metacharacter */
|
||||
#define META_DOT 0x801b0000u /* . metacharacter */
|
||||
#define META_ESCAPE 0x801c0000u /* \d and friends */
|
||||
#define META_KET 0x801d0000u /* closing parenthesis */
|
||||
#define META_NOCAPTURE 0x801e0000u /* no capture parens */
|
||||
#define META_OPTIONS 0x801f0000u /* (?i) and friends */
|
||||
#define META_POSIX 0x80200000u /* POSIX class item */
|
||||
#define META_POSIX_NEG 0x80210000u /* negative POSIX class item */
|
||||
#define META_RANGE_ESCAPED 0x80220000u /* range with at least one escape */
|
||||
#define META_RANGE_LITERAL 0x80230000u /* range defined literally */
|
||||
#define META_RECURSE 0x80240000u /* Recursion */
|
||||
#define META_RECURSE_BYNAME 0x80250000u /* (?&name) */
|
||||
#define META_SCRIPT_RUN 0x80260000u /* (*script_run:...) */
|
||||
|
||||
/* These must be kept together to make it easy to check that an assertion
|
||||
is present where expected in a conditional group. */
|
||||
|
||||
#define META_LOOKAHEAD 0x80270000u /* (?= */
|
||||
#define META_LOOKAHEADNOT 0x80280000u /* (?! */
|
||||
#define META_LOOKBEHIND 0x80290000u /* (?<= */
|
||||
#define META_LOOKBEHINDNOT 0x802a0000u /* (?<! */
|
||||
|
||||
/* These cannot be conditions */
|
||||
|
||||
#define META_LOOKAHEAD_NA 0x802b0000u /* (*napla: */
|
||||
#define META_LOOKBEHIND_NA 0x802c0000u /* (*naplb: */
|
||||
|
||||
/* These must be kept in this order, with consecutive values, and the _ARG
|
||||
versions of COMMIT, PRUNE, SKIP, and THEN immediately after their non-argument
|
||||
versions. */
|
||||
|
||||
#define META_MARK 0x802d0000u /* (*MARK) */
|
||||
#define META_ACCEPT 0x802e0000u /* (*ACCEPT) */
|
||||
#define META_FAIL 0x802f0000u /* (*FAIL) */
|
||||
#define META_COMMIT 0x80300000u /* These */
|
||||
#define META_COMMIT_ARG 0x80310000u /* pairs */
|
||||
#define META_PRUNE 0x80320000u /* must */
|
||||
#define META_PRUNE_ARG 0x80330000u /* be */
|
||||
#define META_SKIP 0x80340000u /* kept */
|
||||
#define META_SKIP_ARG 0x80350000u /* in */
|
||||
#define META_THEN 0x80360000u /* this */
|
||||
#define META_THEN_ARG 0x80370000u /* order */
|
||||
|
||||
/* These must be kept in groups of adjacent 3 values, and all together. */
|
||||
|
||||
#define META_ASTERISK 0x80380000u /* * */
|
||||
#define META_ASTERISK_PLUS 0x80390000u /* *+ */
|
||||
#define META_ASTERISK_QUERY 0x803a0000u /* *? */
|
||||
#define META_PLUS 0x803b0000u /* + */
|
||||
#define META_PLUS_PLUS 0x803c0000u /* ++ */
|
||||
#define META_PLUS_QUERY 0x803d0000u /* +? */
|
||||
#define META_QUERY 0x803e0000u /* ? */
|
||||
#define META_QUERY_PLUS 0x803f0000u /* ?+ */
|
||||
#define META_QUERY_QUERY 0x80400000u /* ?? */
|
||||
#define META_MINMAX 0x80410000u /* {n,m} repeat */
|
||||
#define META_MINMAX_PLUS 0x80420000u /* {n,m}+ repeat */
|
||||
#define META_MINMAX_QUERY 0x80430000u /* {n,m}? repeat */
|
||||
|
||||
/* These meta codes must be kept in a group, with the OR/SUB/XOR in
|
||||
this order, and AND/NOT at the start/end. */
|
||||
|
||||
#define META_ECLASS_AND 0x80440000u /* && (or &) in a class */
|
||||
#define META_ECLASS_OR 0x80450000u /* || (or |, +) in a class */
|
||||
#define META_ECLASS_SUB 0x80460000u /* -- (or -) in a class */
|
||||
#define META_ECLASS_XOR 0x80470000u /* ~~ (or ^) in a class */
|
||||
#define META_ECLASS_NOT 0x80480000u /* ! in a class */
|
||||
|
||||
/* Convenience aliases. */
|
||||
|
||||
#define META_FIRST_QUANTIFIER META_ASTERISK
|
||||
#define META_LAST_QUANTIFIER META_MINMAX_QUERY
|
||||
|
||||
/* This is a special "meta code" that is used only to distinguish (*asr: from
|
||||
(*sr: in the table of alphabetic assertions. It is never stored in the parsed
|
||||
pattern because (*asr: is turned into (*sr:(*atomic: at that stage. There is
|
||||
therefore no need for it to have a length entry, so use a high value. */
|
||||
|
||||
#define META_ATOMIC_SCRIPT_RUN 0x8fff0000u
|
||||
|
||||
/* Macros for manipulating elements of the parsed pattern vector. */
|
||||
|
||||
#define META_CODE(x) (x & 0xffff0000u)
|
||||
#define META_DATA(x) (x & 0x0000ffffu)
|
||||
#define META_DIFF(x,y) ((x-y)>>16)
|
||||
|
||||
/* Extended class management flags. */
|
||||
|
||||
#define CLASS_IS_ECLASS 0x1
|
||||
|
||||
/* Macro for the highest character value. */
|
||||
|
||||
#if PCRE2_CODE_UNIT_WIDTH == 8
|
||||
#define MAX_UCHAR_VALUE 0xffu
|
||||
#elif PCRE2_CODE_UNIT_WIDTH == 16
|
||||
#define MAX_UCHAR_VALUE 0xffffu
|
||||
#else
|
||||
#define MAX_UCHAR_VALUE 0xffffffffu
|
||||
#endif
|
||||
|
||||
#define GET_MAX_CHAR_VALUE(utf) \
|
||||
((utf) ? MAX_UTF_CODE_POINT : MAX_UCHAR_VALUE)
|
||||
|
||||
/* Macro for setting individual bits in class bitmaps. */
|
||||
|
||||
#define SETBIT(a,b) a[(b) >> 3] |= (uint8_t)(1u << ((b) & 0x7))
|
||||
|
||||
/* Macro for 8 bit specific checks. */
|
||||
#if PCRE2_CODE_UNIT_WIDTH == 8
|
||||
#define SELECT_VALUE8(value8, value) (value8)
|
||||
#else
|
||||
#define SELECT_VALUE8(value8, value) (value)
|
||||
#endif
|
||||
|
||||
/* Macro for aligning data. */
|
||||
#define CLIST_ALIGN_TO(base, align) \
|
||||
((base + ((size_t)(align) - 1)) & ~((size_t)(align) - 1))
|
||||
|
||||
/* Structure for holding information about an OP_ECLASS internal operand.
|
||||
An "operand" here could be just a single OP_[X]CLASS, or it could be some
|
||||
complex expression; but it's some sequence of ECL_* codes which pushes one
|
||||
value to the stack. */
|
||||
typedef struct {
|
||||
/* The position of the operand - or NULL if (lengthptr != NULL). */
|
||||
PCRE2_UCHAR *code_start;
|
||||
PCRE2_SIZE length;
|
||||
/* The operand's type if it is a single code (ECL_XCLASS, ECL_ANY, ECL_NONE);
|
||||
otherwise zero if the operand is not atomic. */
|
||||
uint8_t op_single_type;
|
||||
/* Regardless of whether it's a single code or not, we fully constant-fold
|
||||
the bitmap for code points < 256. */
|
||||
class_bits_storage bits;
|
||||
} eclass_op_info;
|
||||
|
||||
/* Macros for the definitions below, to prevent name collisions. */
|
||||
|
||||
#define _pcre2_posix_class_maps PCRE2_SUFFIX(_pcre2_posix_class_maps)
|
||||
#define _pcre2_update_classbits PCRE2_SUFFIX(_pcre2_update_classbits_)
|
||||
#define _pcre2_compile_class_nested PCRE2_SUFFIX(_pcre2_compile_class_nested_)
|
||||
#define _pcre2_compile_class_not_nested PCRE2_SUFFIX(_pcre2_compile_class_not_nested_)
|
||||
|
||||
|
||||
/* Indices of the POSIX classes in posix_names, posix_name_lengths,
|
||||
posix_class_maps, and posix_substitutes. They must be kept in sync. */
|
||||
|
||||
#define PC_DIGIT 7
|
||||
#define PC_GRAPH 8
|
||||
#define PC_PRINT 9
|
||||
#define PC_PUNCT 10
|
||||
#define PC_XDIGIT 13
|
||||
|
||||
extern const int PRIV(posix_class_maps)[];
|
||||
|
||||
|
||||
/* Set bits in classbits according to the property type */
|
||||
|
||||
void PRIV(update_classbits)(uint32_t ptype, uint32_t pdata, BOOL negated,
|
||||
uint8_t *classbits);
|
||||
|
||||
/* Compile the META codes from start_ptr...end_ptr, writing a single OP_CLASS
|
||||
OP_CLASS, OP_NCLASS, OP_XCLASS, or OP_ALLANY into pcode. */
|
||||
|
||||
uint32_t *PRIV(compile_class_not_nested)(uint32_t options, uint32_t xoptions,
|
||||
uint32_t *start_ptr, PCRE2_UCHAR **pcode, BOOL negate_class, BOOL* has_bitmap,
|
||||
int *errorcodeptr, compile_block *cb, PCRE2_SIZE *lengthptr);
|
||||
|
||||
/* Compile the META codes in pptr into opcodes written to pcode. The pptr must
|
||||
start at a META_CLASS or META_CLASS_NOT.
|
||||
|
||||
The pptr will be left pointing at the matching META_CLASS_END. */
|
||||
|
||||
BOOL PRIV(compile_class_nested)(uint32_t options, uint32_t xoptions,
|
||||
uint32_t **pptr, PCRE2_UCHAR **pcode, int *errorcodeptr,
|
||||
compile_block *cb, PCRE2_SIZE *lengthptr);
|
||||
|
||||
#endif /* PCRE2_COMPILE_H_IDEMPOTENT_GUARD */
|
||||
|
||||
/* End of pcre2_compile.h */
|
||||
2737
libpcre/src/pcre2_compile_class.c
Normal file
2737
libpcre/src/pcre2_compile_class.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -224,8 +224,8 @@ switch (what)
|
||||
XSTRING when PCRE2_PRERELEASE is not empty, an unwanted space is inserted.
|
||||
There are problems using an "obvious" approach like this:
|
||||
|
||||
XSTRING(PCRE2_MAJOR) "." XSTRING(PCRE_MINOR)
|
||||
XSTRING(PCRE2_PRERELEASE) " " XSTRING(PCRE_DATE)
|
||||
XSTRING(PCRE2_MAJOR) "." XSTRING(PCRE2_MINOR)
|
||||
XSTRING(PCRE2_PRERELEASE) " " XSTRING(PCRE2_DATE)
|
||||
|
||||
because, when PCRE2_PRERELEASE is empty, this leads to an attempted expansion
|
||||
of STRING(). The C standard states: "If (before argument substitution) any
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2023 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -130,17 +130,19 @@ return gcontext;
|
||||
/* A default compile context is set up to save having to initialize at run time
|
||||
when no context is supplied to the compile function. */
|
||||
|
||||
const pcre2_compile_context PRIV(default_compile_context) = {
|
||||
pcre2_compile_context PRIV(default_compile_context) = {
|
||||
{ default_malloc, default_free, NULL }, /* Default memory handling */
|
||||
NULL, /* Stack guard */
|
||||
NULL, /* Stack guard data */
|
||||
PRIV(default_tables), /* Character tables */
|
||||
PCRE2_UNSET, /* Max pattern length */
|
||||
PCRE2_UNSET, /* Max pattern compiled length */
|
||||
BSR_DEFAULT, /* Backslash R default */
|
||||
NEWLINE_DEFAULT, /* Newline convention */
|
||||
PARENS_NEST_LIMIT, /* As it says */
|
||||
0, /* Extra options */
|
||||
MAX_VARLOOKBEHIND /* As it says */
|
||||
MAX_VARLOOKBEHIND, /* As it says */
|
||||
PCRE2_OPTIMIZATION_ALL /* All optimizations enabled */
|
||||
};
|
||||
|
||||
/* The create function copies the default into the new memory, but must
|
||||
@@ -162,7 +164,7 @@ return ccontext;
|
||||
/* A default match context is set up to save having to initialize at run time
|
||||
when no context is supplied to a match function. */
|
||||
|
||||
const pcre2_match_context PRIV(default_match_context) = {
|
||||
pcre2_match_context PRIV(default_match_context) = {
|
||||
{ default_malloc, default_free, NULL },
|
||||
#ifdef SUPPORT_JIT
|
||||
NULL, /* JIT callback */
|
||||
@@ -172,6 +174,8 @@ const pcre2_match_context PRIV(default_match_context) = {
|
||||
NULL, /* Callout data */
|
||||
NULL, /* Substitute callout function */
|
||||
NULL, /* Substitute callout data */
|
||||
NULL, /* Substitute case callout function */
|
||||
NULL, /* Substitute case callout data */
|
||||
PCRE2_UNSET, /* Offset limit */
|
||||
HEAP_LIMIT,
|
||||
MATCH_LIMIT,
|
||||
@@ -196,7 +200,7 @@ return mcontext;
|
||||
/* A default convert context is set up to save having to initialize at run time
|
||||
when no context is supplied to the convert function. */
|
||||
|
||||
const pcre2_convert_context PRIV(default_convert_context) = {
|
||||
pcre2_convert_context PRIV(default_convert_context) = {
|
||||
{ default_malloc, default_free, NULL }, /* Default memory handling */
|
||||
#ifdef _WIN32
|
||||
CHAR_BACKSLASH, /* Default path separator */
|
||||
@@ -352,6 +356,13 @@ ccontext->max_pattern_length = length;
|
||||
return 0;
|
||||
}
|
||||
|
||||
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
pcre2_set_max_pattern_compiled_length(pcre2_compile_context *ccontext, PCRE2_SIZE length)
|
||||
{
|
||||
ccontext->max_pattern_compiled_length = length;
|
||||
return 0;
|
||||
}
|
||||
|
||||
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
pcre2_set_newline(pcre2_compile_context *ccontext, uint32_t newline)
|
||||
{
|
||||
@@ -401,6 +412,38 @@ ccontext->stack_guard_data = user_data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
pcre2_set_optimize(pcre2_compile_context *ccontext, uint32_t directive)
|
||||
{
|
||||
if (ccontext == NULL)
|
||||
return PCRE2_ERROR_NULL;
|
||||
|
||||
switch (directive)
|
||||
{
|
||||
case PCRE2_OPTIMIZATION_NONE:
|
||||
ccontext->optimization_flags = 0;
|
||||
break;
|
||||
|
||||
case PCRE2_OPTIMIZATION_FULL:
|
||||
ccontext->optimization_flags = PCRE2_OPTIMIZATION_ALL;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (directive >= PCRE2_AUTO_POSSESS && directive <= PCRE2_START_OPTIMIZE_OFF)
|
||||
{
|
||||
/* Even directive numbers starting from 64 switch a bit on;
|
||||
* Odd directive numbers starting from 65 switch a bit off */
|
||||
if ((directive & 1) != 0)
|
||||
ccontext->optimization_flags &= ~(1u << ((directive >> 1) - 32));
|
||||
else
|
||||
ccontext->optimization_flags |= 1u << ((directive >> 1) - 32);
|
||||
return 0;
|
||||
}
|
||||
return PCRE2_ERROR_BADOPTION;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ------------ Match context ------------ */
|
||||
|
||||
@@ -416,13 +459,24 @@ return 0;
|
||||
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
pcre2_set_substitute_callout(pcre2_match_context *mcontext,
|
||||
int (*substitute_callout)(pcre2_substitute_callout_block *, void *),
|
||||
void *substitute_callout_data)
|
||||
void *substitute_callout_data)
|
||||
{
|
||||
mcontext->substitute_callout = substitute_callout;
|
||||
mcontext->substitute_callout_data = substitute_callout_data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
pcre2_set_substitute_case_callout(pcre2_match_context *mcontext,
|
||||
PCRE2_SIZE (*substitute_case_callout)(PCRE2_SPTR, PCRE2_SIZE, PCRE2_UCHAR *,
|
||||
PCRE2_SIZE, int, void *),
|
||||
void *substitute_case_callout_data)
|
||||
{
|
||||
mcontext->substitute_case_callout = substitute_case_callout;
|
||||
mcontext->substitute_case_callout_data = substitute_case_callout_data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
pcre2_set_heap_limit(pcre2_match_context *mcontext, uint32_t limit)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2022 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -74,7 +74,7 @@ enum { POSIX_START_REGEX, POSIX_ANCHORED, POSIX_NOT_BRACKET,
|
||||
|
||||
#define PUTCHARS(string) \
|
||||
{ \
|
||||
for (s = (char *)(string); *s != 0; s++) \
|
||||
for (const char *s = string; *s != 0; s++) \
|
||||
{ \
|
||||
if (p >= endp) return PCRE2_ERROR_NOMEMORY; \
|
||||
*p++ = *s; \
|
||||
@@ -125,7 +125,6 @@ convert_posix(uint32_t pattype, PCRE2_SPTR pattern, PCRE2_SIZE plength,
|
||||
BOOL utf, PCRE2_UCHAR *use_buffer, PCRE2_SIZE use_length,
|
||||
PCRE2_SIZE *bufflenptr, BOOL dummyrun, pcre2_convert_context *ccontext)
|
||||
{
|
||||
char *s;
|
||||
PCRE2_SPTR posix = pattern;
|
||||
PCRE2_UCHAR *p = use_buffer;
|
||||
PCRE2_UCHAR *pp = p;
|
||||
@@ -1065,7 +1064,7 @@ pcre2_pattern_convert(PCRE2_SPTR pattern, PCRE2_SIZE plength, uint32_t options,
|
||||
PCRE2_UCHAR **buffptr, PCRE2_SIZE *bufflenptr,
|
||||
pcre2_convert_context *ccontext)
|
||||
{
|
||||
int i, rc;
|
||||
int rc;
|
||||
PCRE2_UCHAR dummy_buffer[DUMMY_BUFFER_SIZE];
|
||||
PCRE2_UCHAR *use_buffer = dummy_buffer;
|
||||
PCRE2_SIZE use_length = DUMMY_BUFFER_SIZE;
|
||||
@@ -1119,7 +1118,7 @@ if (buffptr != NULL && *buffptr != NULL)
|
||||
/* Call an individual converter, either just once (if a buffer was provided or
|
||||
just the length is needed), or twice (if a memory allocation is required). */
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
PCRE2_UCHAR *allocated;
|
||||
BOOL dummyrun = buffptr == NULL || *buffptr == NULL;
|
||||
@@ -1138,8 +1137,7 @@ for (i = 0; i < 2; i++)
|
||||
break;
|
||||
|
||||
default:
|
||||
*bufflenptr = 0; /* Error offset */
|
||||
return PCRE2_ERROR_INTERNAL;
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
if (rc != 0 || /* Error */
|
||||
@@ -1159,8 +1157,12 @@ for (i = 0; i < 2; i++)
|
||||
use_length = *bufflenptr + 1;
|
||||
}
|
||||
|
||||
/* Control should never get here. */
|
||||
/* Something went terribly wrong. Trigger an assert and return an error */
|
||||
PCRE2_DEBUG_UNREACHABLE();
|
||||
|
||||
EXIT:
|
||||
|
||||
*bufflenptr = 0; /* Error offset */
|
||||
return PCRE2_ERROR_INTERNAL;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2023 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -156,6 +156,7 @@ static const uint8_t coptable[] = {
|
||||
0, /* CLASS */
|
||||
0, /* NCLASS */
|
||||
0, /* XCLASS - variable length */
|
||||
0, /* ECLASS - variable length */
|
||||
0, /* REF */
|
||||
0, /* REFI */
|
||||
0, /* DNREF */
|
||||
@@ -175,6 +176,7 @@ static const uint8_t coptable[] = {
|
||||
0, /* Assert behind not */
|
||||
0, /* NA assert */
|
||||
0, /* NA assert behind */
|
||||
0, /* Assert scan substring */
|
||||
0, /* ONCE */
|
||||
0, /* SCRIPT_RUN */
|
||||
0, 0, 0, 0, 0, /* BRA, BRAPOS, CBRA, CBRAPOS, COND */
|
||||
@@ -188,7 +190,7 @@ static const uint8_t coptable[] = {
|
||||
0, 0, /* COMMIT, COMMIT_ARG */
|
||||
0, 0, 0, /* FAIL, ACCEPT, ASSERT_ACCEPT */
|
||||
0, 0, 0, /* CLOSE, SKIPZERO, DEFINE */
|
||||
0, 0 /* \B and \b in UCP mode */
|
||||
0, 0, /* \B and \b in UCP mode */
|
||||
};
|
||||
|
||||
/* This table identifies those opcodes that inspect a character. It is used to
|
||||
@@ -234,6 +236,7 @@ static const uint8_t poptable[] = {
|
||||
1, /* CLASS */
|
||||
1, /* NCLASS */
|
||||
1, /* XCLASS - variable length */
|
||||
1, /* ECLASS - variable length */
|
||||
0, /* REF */
|
||||
0, /* REFI */
|
||||
0, /* DNREF */
|
||||
@@ -253,6 +256,7 @@ static const uint8_t poptable[] = {
|
||||
0, /* Assert behind not */
|
||||
0, /* NA assert */
|
||||
0, /* NA assert behind */
|
||||
0, /* Assert scan substring */
|
||||
0, /* ONCE */
|
||||
0, /* SCRIPT_RUN */
|
||||
0, 0, 0, 0, 0, /* BRA, BRAPOS, CBRA, CBRAPOS, COND */
|
||||
@@ -266,9 +270,13 @@ static const uint8_t poptable[] = {
|
||||
0, 0, /* COMMIT, COMMIT_ARG */
|
||||
0, 0, 0, /* FAIL, ACCEPT, ASSERT_ACCEPT */
|
||||
0, 0, 0, /* CLOSE, SKIPZERO, DEFINE */
|
||||
1, 1 /* \B and \b in UCP mode */
|
||||
1, 1, /* \B and \b in UCP mode */
|
||||
};
|
||||
|
||||
/* Compile-time check that these tables have the correct size. */
|
||||
STATIC_ASSERT(sizeof(coptable) == OP_TABLE_LENGTH, coptable);
|
||||
STATIC_ASSERT(sizeof(poptable) == OP_TABLE_LENGTH, poptable);
|
||||
|
||||
/* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W,
|
||||
and \w */
|
||||
|
||||
@@ -695,7 +703,6 @@ for (;;)
|
||||
int i, j;
|
||||
int clen, dlen;
|
||||
uint32_t c, d;
|
||||
int forced_fail = 0;
|
||||
BOOL partial_newline = FALSE;
|
||||
BOOL could_continue = reset_could_continue;
|
||||
reset_could_continue = FALSE;
|
||||
@@ -841,19 +848,6 @@ for (;;)
|
||||
|
||||
switch (codevalue)
|
||||
{
|
||||
/* ========================================================================== */
|
||||
/* These cases are never obeyed. This is a fudge that causes a compile-
|
||||
time error if the vectors coptable or poptable, which are indexed by
|
||||
opcode, are not the correct length. It seems to be the only way to do
|
||||
such a check at compile time, as the sizeof() operator does not work
|
||||
in the C preprocessor. */
|
||||
|
||||
case OP_TABLE_LENGTH:
|
||||
case OP_TABLE_LENGTH +
|
||||
((sizeof(coptable) == OP_TABLE_LENGTH) &&
|
||||
(sizeof(poptable) == OP_TABLE_LENGTH)):
|
||||
return 0;
|
||||
|
||||
/* ========================================================================== */
|
||||
/* Reached a closing bracket. If not at the end of the pattern, carry
|
||||
on with the next opcode. For repeating opcodes, also add the repeat
|
||||
@@ -1179,10 +1173,6 @@ for (;;)
|
||||
const ucd_record * prop = GET_UCD(c);
|
||||
switch(code[1])
|
||||
{
|
||||
case PT_ANY:
|
||||
OK = TRUE;
|
||||
break;
|
||||
|
||||
case PT_LAMP:
|
||||
chartype = prop->chartype;
|
||||
OK = chartype == ucp_Lu || chartype == ucp_Ll ||
|
||||
@@ -1462,10 +1452,6 @@ for (;;)
|
||||
const ucd_record * prop = GET_UCD(c);
|
||||
switch(code[2])
|
||||
{
|
||||
case PT_ANY:
|
||||
OK = TRUE;
|
||||
break;
|
||||
|
||||
case PT_LAMP:
|
||||
chartype = prop->chartype;
|
||||
OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt;
|
||||
@@ -1727,10 +1713,6 @@ for (;;)
|
||||
const ucd_record * prop = GET_UCD(c);
|
||||
switch(code[2])
|
||||
{
|
||||
case PT_ANY:
|
||||
OK = TRUE;
|
||||
break;
|
||||
|
||||
case PT_LAMP:
|
||||
chartype = prop->chartype;
|
||||
OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt;
|
||||
@@ -2017,10 +1999,6 @@ for (;;)
|
||||
const ucd_record * prop = GET_UCD(c);
|
||||
switch(code[1 + IMM2_SIZE + 1])
|
||||
{
|
||||
case PT_ANY:
|
||||
OK = TRUE;
|
||||
break;
|
||||
|
||||
case PT_LAMP:
|
||||
chartype = prop->chartype;
|
||||
OK = chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt;
|
||||
@@ -2663,35 +2641,54 @@ for (;;)
|
||||
|
||||
case OP_CLASS:
|
||||
case OP_NCLASS:
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
case OP_XCLASS:
|
||||
case OP_ECLASS:
|
||||
#endif
|
||||
{
|
||||
BOOL isinclass = FALSE;
|
||||
int next_state_offset;
|
||||
PCRE2_SPTR ecode;
|
||||
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
/* An extended class may have a table or a list of single characters,
|
||||
ranges, or both, and it may be positive or negative. There's a
|
||||
function that sorts all this out. */
|
||||
|
||||
if (codevalue == OP_XCLASS)
|
||||
{
|
||||
ecode = code + GET(code, 1);
|
||||
if (clen > 0)
|
||||
isinclass = PRIV(xclass)(c, code + 1 + LINK_SIZE,
|
||||
(const uint8_t*)mb->start_code, utf);
|
||||
}
|
||||
|
||||
/* A nested set-based class has internal opcodes for performing
|
||||
set operations. */
|
||||
|
||||
else if (codevalue == OP_ECLASS)
|
||||
{
|
||||
ecode = code + GET(code, 1);
|
||||
if (clen > 0)
|
||||
isinclass = PRIV(eclass)(c, code + 1 + LINK_SIZE, ecode,
|
||||
(const uint8_t*)mb->start_code, utf);
|
||||
}
|
||||
|
||||
else
|
||||
#endif /* SUPPORT_WIDE_CHARS */
|
||||
|
||||
/* For a simple class, there is always just a 32-byte table, and we
|
||||
can set isinclass from it. */
|
||||
|
||||
if (codevalue != OP_XCLASS)
|
||||
{
|
||||
ecode = code + 1 + (32 / sizeof(PCRE2_UCHAR));
|
||||
if (clen > 0)
|
||||
{
|
||||
isinclass = (c > 255)? (codevalue == OP_NCLASS) :
|
||||
((((uint8_t *)(code + 1))[c/8] & (1u << (c&7))) != 0);
|
||||
((((const uint8_t *)(code + 1))[c/8] & (1u << (c&7))) != 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* An extended class may have a table or a list of single characters,
|
||||
ranges, or both, and it may be positive or negative. There's a
|
||||
function that sorts all this out. */
|
||||
|
||||
else
|
||||
{
|
||||
ecode = code + GET(code, 1);
|
||||
if (clen > 0) isinclass = PRIV(xclass)(c, code + 1 + LINK_SIZE, utf);
|
||||
}
|
||||
|
||||
/* At this point, isinclass is set for all kinds of class, and ecode
|
||||
points to the byte after the end of the class. If there is a
|
||||
quantifier, this is where it will be. */
|
||||
@@ -2784,7 +2781,6 @@ for (;;)
|
||||
though the other "backtracking verbs" are not supported. */
|
||||
|
||||
case OP_FAIL:
|
||||
forced_fail++; /* Count FAILs for multiple states */
|
||||
break;
|
||||
|
||||
case OP_ASSERT:
|
||||
@@ -3058,7 +3054,7 @@ for (;;)
|
||||
if (codevalue == OP_BRAPOSZERO)
|
||||
{
|
||||
allow_zero = TRUE;
|
||||
codevalue = *(++code); /* Codevalue will be one of above BRAs */
|
||||
++code; /* The following opcode will be one of the above BRAs */
|
||||
}
|
||||
else allow_zero = FALSE;
|
||||
|
||||
@@ -3271,18 +3267,12 @@ for (;;)
|
||||
matches that we are going to find. If partial matching has been requested,
|
||||
check for appropriate conditions.
|
||||
|
||||
The "forced_ fail" variable counts the number of (*F) encountered for the
|
||||
character. If it is equal to the original active_count (saved in
|
||||
workspace[1]) it means that (*F) was found on every active state. In this
|
||||
case we don't want to give a partial match.
|
||||
|
||||
The "could_continue" variable is true if a state could have continued but
|
||||
for the fact that the end of the subject was reached. */
|
||||
|
||||
if (new_count <= 0)
|
||||
{
|
||||
if (could_continue && /* Some could go on, and */
|
||||
forced_fail != workspace[1] && /* Not all forced fail & */
|
||||
( /* either... */
|
||||
(mb->moptions & PCRE2_PARTIAL_HARD) != 0 /* Hard partial */
|
||||
|| /* or... */
|
||||
@@ -3438,7 +3428,7 @@ if ((re->flags & PCRE2_MODE_MASK) != PCRE2_CODE_UNIT_WIDTH/8)
|
||||
/* PCRE2_NOTEMPTY and PCRE2_NOTEMPTY_ATSTART are match-time flags in the
|
||||
options variable for this function. Users of PCRE2 who are not calling the
|
||||
function directly would like to have a way of setting these flags, in the same
|
||||
way that they can set pcre2_compile() flags like PCRE2_NO_AUTOPOSSESS with
|
||||
way that they can set pcre2_compile() flags like PCRE2_NO_AUTO_POSSESS with
|
||||
constructions like (*NO_AUTOPOSSESS). To enable this, (*NOTEMPTY) and
|
||||
(*NOTEMPTY_ATSTART) set bits in the pattern's "flag" function which can now be
|
||||
transferred to the options for this function. The bits are guaranteed to be
|
||||
@@ -3528,8 +3518,7 @@ if (mb->match_limit_depth > re->limit_depth)
|
||||
if (mb->heap_limit > re->limit_heap)
|
||||
mb->heap_limit = re->limit_heap;
|
||||
|
||||
mb->start_code = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)) +
|
||||
re->name_count * re->name_entry_size;
|
||||
mb->start_code = (PCRE2_SPTR)((const uint8_t *)re + re->code_start);
|
||||
mb->tables = re->tables;
|
||||
mb->start_subject = subject;
|
||||
mb->end_subject = end_subject;
|
||||
@@ -3576,7 +3565,9 @@ switch(re->newline_convention)
|
||||
mb->nltype = NLTYPE_ANYCRLF;
|
||||
break;
|
||||
|
||||
default: return PCRE2_ERROR_INTERNAL;
|
||||
default:
|
||||
PCRE2_DEBUG_UNREACHABLE();
|
||||
return PCRE2_ERROR_INTERNAL;
|
||||
}
|
||||
|
||||
/* Check a UTF string for validity if required. For 8-bit and 16-bit strings,
|
||||
@@ -3705,7 +3696,7 @@ for (;;)
|
||||
these, for testing and for ensuring that all callouts do actually occur.
|
||||
The optimizations must also be avoided when restarting a DFA match. */
|
||||
|
||||
if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0 &&
|
||||
if ((re->optimization_flags & PCRE2_OPTIM_START_OPTIMIZE) != 0 &&
|
||||
(options & PCRE2_DFA_RESTART) == 0)
|
||||
{
|
||||
/* If firstline is TRUE, the start of the match is constrained to the first
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2023 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -96,7 +96,7 @@ static const unsigned char compile_error_texts[] =
|
||||
"length of lookbehind assertion is not limited\0"
|
||||
"a relative value of zero is not allowed\0"
|
||||
"conditional subpattern contains more than two branches\0"
|
||||
"assertion expected after (?( or (?(?C)\0"
|
||||
"atomic assertion expected after (?( or (?(?C)\0"
|
||||
"digit expected after (?+ or (?-\0"
|
||||
/* 30 */
|
||||
"unknown POSIX class name\0"
|
||||
@@ -161,7 +161,7 @@ static const unsigned char compile_error_texts[] =
|
||||
"using UCP is disabled by the application\0"
|
||||
"name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)\0"
|
||||
"character code point value in \\u.... sequence is too large\0"
|
||||
"digits missing in \\x{} or \\o{} or \\N{U+}\0"
|
||||
"digits missing after \\x or in \\x{} or \\o{} or \\N{U+}\0"
|
||||
"syntax error or number too big in (?(VERSION condition\0"
|
||||
/* 80 */
|
||||
"internal error: unknown opcode in auto_possessify()\0"
|
||||
@@ -185,10 +185,29 @@ static const unsigned char compile_error_texts[] =
|
||||
"(*alpha_assertion) not recognized\0"
|
||||
"script runs require Unicode support, which this version of PCRE2 does not have\0"
|
||||
"too many capturing groups (maximum 65535)\0"
|
||||
"atomic assertion expected after (?( or (?(?C)\0"
|
||||
"octal digit missing after \\0 (PCRE2_EXTRA_NO_BS0 is set)\0"
|
||||
"\\K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK)\0"
|
||||
/* 100 */
|
||||
"branch too long in variable-length lookbehind assertion\0"
|
||||
"compiled pattern would be longer than the limit set by the application\0"
|
||||
"octal value given by \\ddd is greater than \\377 (forbidden by PCRE2_EXTRA_PYTHON_OCTAL)\0"
|
||||
"using callouts is disabled by the application\0"
|
||||
"PCRE2_EXTRA_TURKISH_CASING require Unicode (UTF or UCP) mode\0"
|
||||
/* 105 */
|
||||
"PCRE2_EXTRA_TURKISH_CASING requires UTF in 8-bit mode\0"
|
||||
"PCRE2_EXTRA_TURKISH_CASING and PCRE2_EXTRA_CASELESS_RESTRICT are not compatible\0"
|
||||
"extended character class nesting is too deep\0"
|
||||
"invalid operator in extended character class\0"
|
||||
"unexpected operator in extended character class (no preceding operand)\0"
|
||||
/* 110 */
|
||||
"expected operand after operator in extended character class\0"
|
||||
"square brackets needed to clarify operator precedence in extended character class\0"
|
||||
"missing terminating ] for extended character class (note '[' must be escaped under PCRE2_ALT_EXTENDED_CLASS)\0"
|
||||
"unexpected expression in extended character class (no preceding operator)\0"
|
||||
"empty expression in extended character class\0"
|
||||
/* 115 */
|
||||
"terminating ] with no following closing parenthesis in (?[...]\0"
|
||||
"unexpected character in (?[...]) extended character class\0"
|
||||
;
|
||||
|
||||
/* Match-time and UTF error texts are in the same format. */
|
||||
@@ -275,6 +294,10 @@ static const unsigned char match_error_texts[] =
|
||||
"internal error - duplicate substitution match\0"
|
||||
"PCRE2_MATCH_INVALID_UTF is not supported for DFA matching\0"
|
||||
"INTERNAL ERROR: invalid substring offset\0"
|
||||
"feature is not supported by the JIT compiler\0"
|
||||
"error performing replacement case transformation\0"
|
||||
/* 70 */
|
||||
"replacement too large (longer than PCRE2_SIZE)\0"
|
||||
;
|
||||
|
||||
|
||||
@@ -317,7 +340,7 @@ else if (enumber < 0) /* Match or UTF error */
|
||||
}
|
||||
else /* Invalid error number */
|
||||
{
|
||||
message = (unsigned char *)"\0"; /* Empty message list */
|
||||
message = (const unsigned char *)"\0"; /* Empty message list */
|
||||
n = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2021 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -40,7 +40,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
/* This module contains an internal function that is used to match a Unicode
|
||||
extended grapheme sequence. It is used by both pcre2_match() and
|
||||
pcre2_def_match(). However, it is called only when Unicode support is being
|
||||
pcre2_dfa_match(). However, it is called only when Unicode support is being
|
||||
compiled. Nevertheless, we provide a dummy function when there is no Unicode
|
||||
support, because some compilers do not like functionless source files. */
|
||||
|
||||
@@ -75,7 +75,11 @@ return NULL;
|
||||
* Match an extended grapheme sequence *
|
||||
*************************************************/
|
||||
|
||||
/*
|
||||
/* NOTE: The logic contained in this function is replicated in three special-
|
||||
purpose functions in the pcre2_jit_compile.c module. If the logic below is
|
||||
changed, they must be kept in step so that the interpreter and the JIT have the
|
||||
same behaviour.
|
||||
|
||||
Arguments:
|
||||
c the first character
|
||||
eptr pointer to next character
|
||||
@@ -92,6 +96,7 @@ PCRE2_SPTR
|
||||
PRIV(extuni)(uint32_t c, PCRE2_SPTR eptr, PCRE2_SPTR start_subject,
|
||||
PCRE2_SPTR end_subject, BOOL utf, int *xcount)
|
||||
{
|
||||
BOOL was_ep_ZWJ = FALSE;
|
||||
int lgb = UCD_GRAPHBREAK(c);
|
||||
|
||||
while (eptr < end_subject)
|
||||
@@ -102,6 +107,12 @@ while (eptr < end_subject)
|
||||
rgb = UCD_GRAPHBREAK(c);
|
||||
if ((PRIV(ucp_gbtable)[lgb] & (1u << rgb)) == 0) break;
|
||||
|
||||
/* ZWJ followed by Extended Pictographic is allowed only if the ZWJ was
|
||||
preceded by Extended Pictographic. */
|
||||
|
||||
if (lgb == ucp_gbZWJ && rgb == ucp_gbExtended_Pictographic && !was_ep_ZWJ)
|
||||
break;
|
||||
|
||||
/* Not breaking between Regional Indicators is allowed only if there
|
||||
are an even number of preceding RIs. */
|
||||
|
||||
@@ -129,12 +140,15 @@ while (eptr < end_subject)
|
||||
if ((ricount & 1) != 0) break; /* Grapheme break required */
|
||||
}
|
||||
|
||||
/* If Extend or ZWJ follows Extended_Pictographic, do not update lgb; this
|
||||
allows any number of them before a following Extended_Pictographic. */
|
||||
/* Set a flag when ZWJ follows Extended Pictographic (with optional Extend in
|
||||
between; see next statement). */
|
||||
|
||||
if ((rgb != ucp_gbExtend && rgb != ucp_gbZWJ) ||
|
||||
lgb != ucp_gbExtended_Pictographic)
|
||||
lgb = rgb;
|
||||
was_ep_ZWJ = (lgb == ucp_gbExtended_Pictographic && rgb == ucp_gbZWJ);
|
||||
|
||||
/* If Extend follows Extended_Pictographic, do not update lgb; this allows
|
||||
any number of them before a following ZWJ. */
|
||||
|
||||
if (rgb != ucp_gbExtend || lgb != ucp_gbExtended_Pictographic) lgb = rgb;
|
||||
|
||||
eptr += len;
|
||||
if (xcount != NULL) *xcount += 1;
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2023 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -76,18 +76,19 @@ for (;;)
|
||||
if (c == OP_END) return NULL;
|
||||
|
||||
/* XCLASS is used for classes that cannot be represented just by a bit map.
|
||||
This includes negated single high-valued characters. CALLOUT_STR is used for
|
||||
callouts with string arguments. In both cases the length in the table is
|
||||
This includes negated single high-valued characters. ECLASS is used for
|
||||
classes that use set operations internally. CALLOUT_STR is used for
|
||||
callouts with string arguments. In each case the length in the table is
|
||||
zero; the actual length is stored in the compiled code. */
|
||||
|
||||
if (c == OP_XCLASS) code += GET(code, 1);
|
||||
else if (c == OP_CALLOUT_STR) code += GET(code, 1 + 2*LINK_SIZE);
|
||||
if (c == OP_XCLASS || c == OP_ECLASS) code += GET(code, 1);
|
||||
else if (c == OP_CALLOUT_STR) code += GET(code, 1 + 2*LINK_SIZE);
|
||||
|
||||
/* Handle lookbehind */
|
||||
|
||||
else if (c == OP_REVERSE || c == OP_VREVERSE)
|
||||
{
|
||||
if (number < 0) return (PCRE2_UCHAR *)code;
|
||||
if (number < 0) return code;
|
||||
code += PRIV(OP_lengths)[c];
|
||||
}
|
||||
|
||||
@@ -97,7 +98,7 @@ for (;;)
|
||||
c == OP_CBRAPOS || c == OP_SCBRAPOS)
|
||||
{
|
||||
int n = (int)GET2(code, 1+LINK_SIZE);
|
||||
if (n == number) return (PCRE2_UCHAR *)code;
|
||||
if (n == number) return code;
|
||||
code += PRIV(OP_lengths)[c];
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2023 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -88,6 +88,12 @@ typedef int BOOL;
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
/* Helper macro for static (compile-time) assertions. Can be used inside
|
||||
functions, or at the top-level of a file. */
|
||||
#define STATIC_ASSERT_JOIN(a,b) a ## b
|
||||
#define STATIC_ASSERT(cond, msg) \
|
||||
typedef int STATIC_ASSERT_JOIN(static_assertion_,msg)[(cond)?1:-1]
|
||||
|
||||
/* Valgrind (memcheck) support */
|
||||
|
||||
#ifdef SUPPORT_VALGRIND
|
||||
@@ -523,29 +529,29 @@ start/end of string field names are. */
|
||||
three must not be changed, because whichever is set is actually the number of
|
||||
bytes in a code unit in that mode. */
|
||||
|
||||
#define PCRE2_MODE8 0x00000001 /* compiled in 8 bit mode */
|
||||
#define PCRE2_MODE16 0x00000002 /* compiled in 16 bit mode */
|
||||
#define PCRE2_MODE32 0x00000004 /* compiled in 32 bit mode */
|
||||
#define PCRE2_FIRSTSET 0x00000010 /* first_code unit is set */
|
||||
#define PCRE2_FIRSTCASELESS 0x00000020 /* caseless first code unit */
|
||||
#define PCRE2_FIRSTMAPSET 0x00000040 /* bitmap of first code units is set */
|
||||
#define PCRE2_LASTSET 0x00000080 /* last code unit is set */
|
||||
#define PCRE2_LASTCASELESS 0x00000100 /* caseless last code unit */
|
||||
#define PCRE2_STARTLINE 0x00000200 /* start after \n for multiline */
|
||||
#define PCRE2_JCHANGED 0x00000400 /* j option used in pattern */
|
||||
#define PCRE2_HASCRORLF 0x00000800 /* explicit \r or \n in pattern */
|
||||
#define PCRE2_HASTHEN 0x00001000 /* pattern contains (*THEN) */
|
||||
#define PCRE2_MATCH_EMPTY 0x00002000 /* pattern can match empty string */
|
||||
#define PCRE2_BSR_SET 0x00004000 /* BSR was set in the pattern */
|
||||
#define PCRE2_NL_SET 0x00008000 /* newline was set in the pattern */
|
||||
#define PCRE2_NOTEMPTY_SET 0x00010000 /* (*NOTEMPTY) used ) keep */
|
||||
#define PCRE2_NE_ATST_SET 0x00020000 /* (*NOTEMPTY_ATSTART) used) together */
|
||||
#define PCRE2_DEREF_TABLES 0x00040000 /* release character tables */
|
||||
#define PCRE2_NOJIT 0x00080000 /* (*NOJIT) used */
|
||||
#define PCRE2_HASBKPORX 0x00100000 /* contains \P, \p, or \X */
|
||||
#define PCRE2_DUPCAPUSED 0x00200000 /* contains (?| */
|
||||
#define PCRE2_HASBKC 0x00400000 /* contains \C */
|
||||
#define PCRE2_HASACCEPT 0x00800000 /* contains (*ACCEPT) */
|
||||
#define PCRE2_MODE8 0x00000001u /* compiled in 8 bit mode */
|
||||
#define PCRE2_MODE16 0x00000002u /* compiled in 16 bit mode */
|
||||
#define PCRE2_MODE32 0x00000004u /* compiled in 32 bit mode */
|
||||
#define PCRE2_FIRSTSET 0x00000010u /* first_code unit is set */
|
||||
#define PCRE2_FIRSTCASELESS 0x00000020u /* caseless first code unit */
|
||||
#define PCRE2_FIRSTMAPSET 0x00000040u /* bitmap of first code units is set */
|
||||
#define PCRE2_LASTSET 0x00000080u /* last code unit is set */
|
||||
#define PCRE2_LASTCASELESS 0x00000100u /* caseless last code unit */
|
||||
#define PCRE2_STARTLINE 0x00000200u /* start after \n for multiline */
|
||||
#define PCRE2_JCHANGED 0x00000400u /* j option used in pattern */
|
||||
#define PCRE2_HASCRORLF 0x00000800u /* explicit \r or \n in pattern */
|
||||
#define PCRE2_HASTHEN 0x00001000u /* pattern contains (*THEN) */
|
||||
#define PCRE2_MATCH_EMPTY 0x00002000u /* pattern can match empty string */
|
||||
#define PCRE2_BSR_SET 0x00004000u /* BSR was set in the pattern */
|
||||
#define PCRE2_NL_SET 0x00008000u /* newline was set in the pattern */
|
||||
#define PCRE2_NOTEMPTY_SET 0x00010000u /* (*NOTEMPTY) used ) keep */
|
||||
#define PCRE2_NE_ATST_SET 0x00020000u /* (*NOTEMPTY_ATSTART) used) together */
|
||||
#define PCRE2_DEREF_TABLES 0x00040000u /* release character tables */
|
||||
#define PCRE2_NOJIT 0x00080000u /* (*NOJIT) used */
|
||||
#define PCRE2_HASBKPORX 0x00100000u /* contains \P, \p, or \X */
|
||||
#define PCRE2_DUPCAPUSED 0x00200000u /* contains (?| */
|
||||
#define PCRE2_HASBKC 0x00400000u /* contains \C */
|
||||
#define PCRE2_HASACCEPT 0x00800000u /* contains (*ACCEPT) */
|
||||
|
||||
#define PCRE2_MODE_MASK (PCRE2_MODE8 | PCRE2_MODE16 | PCRE2_MODE32)
|
||||
|
||||
@@ -574,6 +580,16 @@ modes. */
|
||||
#define REQ_CU_MAX 2000
|
||||
#endif
|
||||
|
||||
/* The maximum nesting depth for Unicode character class sets.
|
||||
Currently fixed. Warning: the interpreter relies on this so it can encode
|
||||
the operand stack in a uint32_t. A nesting limit of 15 implies (15*2+1)=31
|
||||
stack operands required, due to the fact that we have two (and only two)
|
||||
levels of operator precedence. In the UTS#18 syntax, you can write 'x&&y[z]'
|
||||
and in Perl syntax you can write '(?[ x - y & (z) ])', both of which imply
|
||||
pushing the match results for x & y to the stack. */
|
||||
|
||||
#define ECLASS_NEST_LIMIT 15
|
||||
|
||||
/* Offsets for the bitmap tables in the cbits set of tables. Each table
|
||||
contains a set of bits for a class map. Some classes are built by combining
|
||||
these tables. */
|
||||
@@ -609,6 +625,13 @@ total length of the tables. */
|
||||
#define ctypes_offset (cbits_offset + cbit_length) /* Character types */
|
||||
#define TABLES_LENGTH (ctypes_offset + 256)
|
||||
|
||||
/* Private flags used in compile_context.optimization_flags */
|
||||
|
||||
#define PCRE2_OPTIM_AUTO_POSSESS 0x00000001u
|
||||
#define PCRE2_OPTIM_DOTSTAR_ANCHOR 0x00000002u
|
||||
#define PCRE2_OPTIM_START_OPTIMIZE 0x00000004u
|
||||
|
||||
#define PCRE2_OPTIMIZATION_ALL 0x00000007u
|
||||
|
||||
/* -------------------- Character and string names ------------------------ */
|
||||
|
||||
@@ -915,6 +938,7 @@ a positive value. */
|
||||
#define STRING_naplb0 "naplb\0"
|
||||
#define STRING_nla0 "nla\0"
|
||||
#define STRING_nlb0 "nlb\0"
|
||||
#define STRING_scs0 "scs\0"
|
||||
#define STRING_sr0 "sr\0"
|
||||
#define STRING_asr0 "asr\0"
|
||||
#define STRING_positive_lookahead0 "positive_lookahead\0"
|
||||
@@ -925,6 +949,7 @@ a positive value. */
|
||||
#define STRING_negative_lookbehind0 "negative_lookbehind\0"
|
||||
#define STRING_script_run0 "script_run\0"
|
||||
#define STRING_atomic_script_run "atomic_script_run"
|
||||
#define STRING_scan_substring0 "scan_substring\0"
|
||||
|
||||
#define STRING_alpha0 "alpha\0"
|
||||
#define STRING_lower0 "lower\0"
|
||||
@@ -965,6 +990,8 @@ a positive value. */
|
||||
#define STRING_NO_START_OPT_RIGHTPAR "NO_START_OPT)"
|
||||
#define STRING_NOTEMPTY_RIGHTPAR "NOTEMPTY)"
|
||||
#define STRING_NOTEMPTY_ATSTART_RIGHTPAR "NOTEMPTY_ATSTART)"
|
||||
#define STRING_CASELESS_RESTRICT_RIGHTPAR "CASELESS_RESTRICT)"
|
||||
#define STRING_TURKISH_CASING_RIGHTPAR "TURKISH_CASING)"
|
||||
#define STRING_LIMIT_HEAP_EQ "LIMIT_HEAP="
|
||||
#define STRING_LIMIT_MATCH_EQ "LIMIT_MATCH="
|
||||
#define STRING_LIMIT_DEPTH_EQ "LIMIT_DEPTH="
|
||||
@@ -1216,6 +1243,7 @@ only. */
|
||||
#define STRING_naplb0 STR_n STR_a STR_p STR_l STR_b "\0"
|
||||
#define STRING_nla0 STR_n STR_l STR_a "\0"
|
||||
#define STRING_nlb0 STR_n STR_l STR_b "\0"
|
||||
#define STRING_scs0 STR_s STR_c STR_s "\0"
|
||||
#define STRING_sr0 STR_s STR_r "\0"
|
||||
#define STRING_asr0 STR_a STR_s STR_r "\0"
|
||||
#define STRING_positive_lookahead0 STR_p STR_o STR_s STR_i STR_t STR_i STR_v STR_e STR_UNDERSCORE STR_l STR_o STR_o STR_k STR_a STR_h STR_e STR_a STR_d "\0"
|
||||
@@ -1226,6 +1254,7 @@ only. */
|
||||
#define STRING_negative_lookbehind0 STR_n STR_e STR_g STR_a STR_t STR_i STR_v STR_e STR_UNDERSCORE STR_l STR_o STR_o STR_k STR_b STR_e STR_h STR_i STR_n STR_d "\0"
|
||||
#define STRING_script_run0 STR_s STR_c STR_r STR_i STR_p STR_t STR_UNDERSCORE STR_r STR_u STR_n "\0"
|
||||
#define STRING_atomic_script_run STR_a STR_t STR_o STR_m STR_i STR_c STR_UNDERSCORE STR_s STR_c STR_r STR_i STR_p STR_t STR_UNDERSCORE STR_r STR_u STR_n
|
||||
#define STRING_scan_substring0 STR_s STR_c STR_a STR_n STR_UNDERSCORE STR_s STR_u STR_b STR_s STR_t STR_r STR_i STR_n STR_g "\0"
|
||||
|
||||
#define STRING_alpha0 STR_a STR_l STR_p STR_h STR_a "\0"
|
||||
#define STRING_lower0 STR_l STR_o STR_w STR_e STR_r "\0"
|
||||
@@ -1266,6 +1295,8 @@ only. */
|
||||
#define STRING_NO_START_OPT_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_S STR_T STR_A STR_R STR_T STR_UNDERSCORE STR_O STR_P STR_T STR_RIGHT_PARENTHESIS
|
||||
#define STRING_NOTEMPTY_RIGHTPAR STR_N STR_O STR_T STR_E STR_M STR_P STR_T STR_Y STR_RIGHT_PARENTHESIS
|
||||
#define STRING_NOTEMPTY_ATSTART_RIGHTPAR STR_N STR_O STR_T STR_E STR_M STR_P STR_T STR_Y STR_UNDERSCORE STR_A STR_T STR_S STR_T STR_A STR_R STR_T STR_RIGHT_PARENTHESIS
|
||||
#define STRING_CASELESS_RESTRICT_RIGHTPAR STR_C STR_A STR_S STR_E STR_L STR_E STR_S STR_S STR_UNDERSCORE STR_R STR_E STR_S STR_T STR_R STR_I STR_C STR_T STR_RIGHT_PARENTHESIS
|
||||
#define STRING_TURKISH_CASING_RIGHTPAR STR_T STR_U STR_R STR_K STR_I STR_S STR_H STR_UNDERSCORE STR_C STR_A STR_S STR_I STR_N STR_G STR_RIGHT_PARENTHESIS
|
||||
#define STRING_LIMIT_HEAP_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_H STR_E STR_A STR_P STR_EQUALS_SIGN
|
||||
#define STRING_LIMIT_MATCH_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_M STR_A STR_T STR_C STR_H STR_EQUALS_SIGN
|
||||
#define STRING_LIMIT_DEPTH_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_D STR_E STR_P STR_T STR_H STR_EQUALS_SIGN
|
||||
@@ -1290,21 +1321,22 @@ only. */
|
||||
changed, the autopossessifying table in pcre2_auto_possess.c must be updated to
|
||||
match. */
|
||||
|
||||
#define PT_ANY 0 /* Any property - matches all chars */
|
||||
#define PT_LAMP 1 /* L& - the union of Lu, Ll, Lt */
|
||||
#define PT_GC 2 /* Specified general characteristic (e.g. L) */
|
||||
#define PT_PC 3 /* Specified particular characteristic (e.g. Lu) */
|
||||
#define PT_SC 4 /* Script only (e.g. Han) */
|
||||
#define PT_SCX 5 /* Script extensions (includes SC) */
|
||||
#define PT_ALNUM 6 /* Alphanumeric - the union of L and N */
|
||||
#define PT_SPACE 7 /* Perl space - general category Z plus 9,10,12,13 */
|
||||
#define PT_PXSPACE 8 /* POSIX space - Z plus 9,10,11,12,13 */
|
||||
#define PT_WORD 9 /* Word - L, N, Mn, or Pc */
|
||||
#define PT_CLIST 10 /* Pseudo-property: match character list */
|
||||
#define PT_UCNC 11 /* Universal Character nameable character */
|
||||
#define PT_BIDICL 12 /* Specified bidi class */
|
||||
#define PT_BOOL 13 /* Boolean property */
|
||||
#define PT_TABSIZE 14 /* Size of square table for autopossessify tests */
|
||||
#define PT_LAMP 0 /* L& - the union of Lu, Ll, Lt */
|
||||
#define PT_GC 1 /* Specified general characteristic (e.g. L) */
|
||||
#define PT_PC 2 /* Specified particular characteristic (e.g. Lu) */
|
||||
#define PT_SC 3 /* Script only (e.g. Han) */
|
||||
#define PT_SCX 4 /* Script extensions (includes SC) */
|
||||
#define PT_ALNUM 5 /* Alphanumeric - the union of L and N */
|
||||
#define PT_SPACE 6 /* Perl space - general category Z plus 9,10,12,13 */
|
||||
#define PT_PXSPACE 7 /* POSIX space - Z plus 9,10,11,12,13 */
|
||||
#define PT_WORD 8 /* Word - L, N, Mn, or Pc */
|
||||
#define PT_CLIST 9 /* Pseudo-property: match character list */
|
||||
#define PT_UCNC 10 /* Universal Character nameable character */
|
||||
#define PT_BIDICL 11 /* Specified bidi class */
|
||||
#define PT_BOOL 12 /* Boolean property */
|
||||
#define PT_ANY 13 /* Must be the last entry!
|
||||
Any property - matches all chars */
|
||||
#define PT_TABSIZE PT_ANY /* Size of square table for autopossessify tests */
|
||||
|
||||
/* The following special properties are used only in XCLASS items, when POSIX
|
||||
classes are specified and PCRE2_UCP is set - in other words, for Unicode
|
||||
@@ -1334,6 +1366,94 @@ contain characters with values greater than 255. */
|
||||
#define XCL_RANGE 2 /* A range (two multibyte chars) follows */
|
||||
#define XCL_PROP 3 /* Unicode property (2-byte property code follows) */
|
||||
#define XCL_NOTPROP 4 /* Unicode inverted property (ditto) */
|
||||
/* This value represents the beginning of character lists. The value
|
||||
is 16 bit long, and stored as a high and low byte pair in 8 bit mode.
|
||||
The lower 12 bit contains information about character lists (see later). */
|
||||
#define XCL_LIST (sizeof(PCRE2_UCHAR) == 1 ? 0x10 : 0x1000)
|
||||
|
||||
/* When a character class contains many characters/ranges,
|
||||
they are stored in character lists. There are four character
|
||||
lists which contain characters/ranges within a given range.
|
||||
|
||||
The name, character range and item size for each list:
|
||||
Low16 [0x100 - 0x7fff] 16 bit items
|
||||
High16 [0x8000 - 0xffff] 16 bit items
|
||||
Low32 [0x10000 - 0x7fffffff] 32 bit items
|
||||
High32 [0x80000000 - 0xffffffff] 32 bit items
|
||||
|
||||
The Low32 character list is used only when utf encoding or 32 bit
|
||||
character width is enabled, and the High32 character is used only
|
||||
when 32 bit character width is enabled.
|
||||
|
||||
Each character list contain items. The lowest bit represents that
|
||||
an item is the beginning of a range (bit is cleared), or not (bit
|
||||
is set). The other bits represent the character shifted left by
|
||||
one, so its highest bit is discarded. Due to the layout of character
|
||||
lists, the highest bit of a character is always known:
|
||||
|
||||
Low16 and Low32: the highest bit is always zero
|
||||
High16 and High32: the highest bit is always one
|
||||
|
||||
The items are ordered in increasing order, so binary search can be
|
||||
used to find the lower bound of an input character. The lower bound
|
||||
is the highest item, which value is less or equal than the input
|
||||
character. If the lower bit of the item is cleard, or the character
|
||||
stored in the item equals to the input character, the input
|
||||
character is in the character list. */
|
||||
|
||||
/* Character list constants. */
|
||||
#define XCL_CHAR_LIST_LOW_16_START 0x100
|
||||
#define XCL_CHAR_LIST_LOW_16_END 0x7fff
|
||||
#define XCL_CHAR_LIST_LOW_16_ADD 0x0
|
||||
|
||||
#define XCL_CHAR_LIST_HIGH_16_START 0x8000
|
||||
#define XCL_CHAR_LIST_HIGH_16_END 0xffff
|
||||
#define XCL_CHAR_LIST_HIGH_16_ADD 0x8000
|
||||
|
||||
#define XCL_CHAR_LIST_LOW_32_START 0x10000
|
||||
#define XCL_CHAR_LIST_LOW_32_END 0x7fffffff
|
||||
#define XCL_CHAR_LIST_LOW_32_ADD 0x0
|
||||
|
||||
#define XCL_CHAR_LIST_HIGH_32_START 0x80000000
|
||||
#define XCL_CHAR_LIST_HIGH_32_END 0xffffffff
|
||||
#define XCL_CHAR_LIST_HIGH_32_ADD 0x80000000
|
||||
|
||||
/* Mask for getting the descriptors of character list ranges.
|
||||
Each descriptor has XCL_TYPE_BIT_LEN bits, and can be processed
|
||||
by XCL_BEGIN_WITH_RANGE and XCL_ITEM_COUNT_MASK macros. */
|
||||
#define XCL_TYPE_MASK 0xfff
|
||||
#define XCL_TYPE_BIT_LEN 3
|
||||
/* If this bit is set, the first item of the character list is the
|
||||
end of a range, which started before the starting character of the
|
||||
character list. */
|
||||
#define XCL_BEGIN_WITH_RANGE 0x4
|
||||
/* Number of items in the character list: 0, 1, or 2. The value 3
|
||||
represents that the item count is stored at the begining of the
|
||||
character list. The item count has the same width as the items
|
||||
in the character list (e.g. 16 bit for Low16 and High16 lists). */
|
||||
#define XCL_ITEM_COUNT_MASK 0x3
|
||||
/* Shift and flag for constructing character list items. The XCL_CHAR_END
|
||||
is set, when the item is not the beginning of a range. The XCL_CHAR_SHIFT
|
||||
can be used to encode / decode the character value stored in an item. */
|
||||
#define XCL_CHAR_END 0x1
|
||||
#define XCL_CHAR_SHIFT 1
|
||||
|
||||
/* Flag bits for an extended class (OP_ECLASS), which is used for complex
|
||||
character matches such as [\p{Greek} && \p{Ll}]. */
|
||||
|
||||
#define ECL_MAP 0x01 /* Flag: a 32-byte map is present */
|
||||
|
||||
/* Type tags for the items stored in an extended class (OP_ECLASS). These items
|
||||
follow the OP_ECLASS's flag char and bitmap, and represent a Reverse Polish
|
||||
Notation list of operands and operators manipulating a stack of bits. */
|
||||
|
||||
#define ECL_AND 1 /* Pop two from the stack, AND, and push result. */
|
||||
#define ECL_OR 2 /* Pop two from the stack, OR, and push result. */
|
||||
#define ECL_XOR 3 /* Pop two from the stack, XOR, and push result. */
|
||||
#define ECL_NOT 4 /* Pop one from the stack, NOT, and push result. */
|
||||
#define ECL_XCLASS 5 /* XCLASS nested within ECLASS; match and push result. */
|
||||
#define ECL_ANY 6 /* Temporary, only used during compilation. */
|
||||
#define ECL_NONE 7 /* Temporary, only used during compilation. */
|
||||
|
||||
/* These are escaped items that aren't just an encoding of a particular data
|
||||
value such as \n. They must have non-zero values, as check_escape() returns 0
|
||||
@@ -1555,102 +1675,105 @@ enum {
|
||||
character > 255 is encountered. */
|
||||
OP_XCLASS, /* 112 Extended class for handling > 255 chars within the
|
||||
class. This does both positive and negative. */
|
||||
OP_REF, /* 113 Match a back reference, casefully */
|
||||
OP_REFI, /* 114 Match a back reference, caselessly */
|
||||
OP_DNREF, /* 115 Match a duplicate name backref, casefully */
|
||||
OP_DNREFI, /* 116 Match a duplicate name backref, caselessly */
|
||||
OP_RECURSE, /* 117 Match a numbered subpattern (possibly recursive) */
|
||||
OP_CALLOUT, /* 118 Call out to external function if provided */
|
||||
OP_CALLOUT_STR, /* 119 Call out with string argument */
|
||||
OP_ECLASS, /* 113 Really-extended class, for handling logical
|
||||
expressions computed over characters. */
|
||||
OP_REF, /* 114 Match a back reference, casefully */
|
||||
OP_REFI, /* 115 Match a back reference, caselessly */
|
||||
OP_DNREF, /* 116 Match a duplicate name backref, casefully */
|
||||
OP_DNREFI, /* 117 Match a duplicate name backref, caselessly */
|
||||
OP_RECURSE, /* 118 Match a numbered subpattern (possibly recursive) */
|
||||
OP_CALLOUT, /* 119 Call out to external function if provided */
|
||||
OP_CALLOUT_STR, /* 120 Call out with string argument */
|
||||
|
||||
OP_ALT, /* 120 Start of alternation */
|
||||
OP_KET, /* 121 End of group that doesn't have an unbounded repeat */
|
||||
OP_KETRMAX, /* 122 These two must remain together and in this */
|
||||
OP_KETRMIN, /* 123 order. They are for groups the repeat for ever. */
|
||||
OP_KETRPOS, /* 124 Possessive unlimited repeat. */
|
||||
OP_ALT, /* 121 Start of alternation */
|
||||
OP_KET, /* 122 End of group that doesn't have an unbounded repeat */
|
||||
OP_KETRMAX, /* 123 These two must remain together and in this */
|
||||
OP_KETRMIN, /* 124 order. They are for groups the repeat for ever. */
|
||||
OP_KETRPOS, /* 125 Possessive unlimited repeat. */
|
||||
|
||||
/* The assertions must come before BRA, CBRA, ONCE, and COND. */
|
||||
|
||||
OP_REVERSE, /* 125 Move pointer back - used in lookbehind assertions */
|
||||
OP_VREVERSE, /* 126 Move pointer back - variable */
|
||||
OP_ASSERT, /* 127 Positive lookahead */
|
||||
OP_ASSERT_NOT, /* 128 Negative lookahead */
|
||||
OP_ASSERTBACK, /* 129 Positive lookbehind */
|
||||
OP_ASSERTBACK_NOT, /* 130 Negative lookbehind */
|
||||
OP_ASSERT_NA, /* 131 Positive non-atomic lookahead */
|
||||
OP_ASSERTBACK_NA, /* 132 Positive non-atomic lookbehind */
|
||||
OP_REVERSE, /* 126 Move pointer back - used in lookbehind assertions */
|
||||
OP_VREVERSE, /* 127 Move pointer back - variable */
|
||||
OP_ASSERT, /* 128 Positive lookahead */
|
||||
OP_ASSERT_NOT, /* 129 Negative lookahead */
|
||||
OP_ASSERTBACK, /* 130 Positive lookbehind */
|
||||
OP_ASSERTBACK_NOT, /* 131 Negative lookbehind */
|
||||
OP_ASSERT_NA, /* 132 Positive non-atomic lookahead */
|
||||
OP_ASSERTBACK_NA, /* 133 Positive non-atomic lookbehind */
|
||||
OP_ASSERT_SCS, /* 134 Scan substring */
|
||||
|
||||
/* ONCE, SCRIPT_RUN, BRA, BRAPOS, CBRA, CBRAPOS, and COND must come
|
||||
immediately after the assertions, with ONCE first, as there's a test for >=
|
||||
ONCE for a subpattern that isn't an assertion. The POS versions must
|
||||
immediately follow the non-POS versions in each case. */
|
||||
|
||||
OP_ONCE, /* 133 Atomic group, contains captures */
|
||||
OP_SCRIPT_RUN, /* 134 Non-capture, but check characters' scripts */
|
||||
OP_BRA, /* 135 Start of non-capturing bracket */
|
||||
OP_BRAPOS, /* 136 Ditto, with unlimited, possessive repeat */
|
||||
OP_CBRA, /* 137 Start of capturing bracket */
|
||||
OP_CBRAPOS, /* 138 Ditto, with unlimited, possessive repeat */
|
||||
OP_COND, /* 139 Conditional group */
|
||||
OP_ONCE, /* 135 Atomic group, contains captures */
|
||||
OP_SCRIPT_RUN, /* 136 Non-capture, but check characters' scripts */
|
||||
OP_BRA, /* 137 Start of non-capturing bracket */
|
||||
OP_BRAPOS, /* 138 Ditto, with unlimited, possessive repeat */
|
||||
OP_CBRA, /* 139 Start of capturing bracket */
|
||||
OP_CBRAPOS, /* 140 Ditto, with unlimited, possessive repeat */
|
||||
OP_COND, /* 141 Conditional group */
|
||||
|
||||
/* These five must follow the previous five, in the same order. There's a
|
||||
check for >= SBRA to distinguish the two sets. */
|
||||
|
||||
OP_SBRA, /* 140 Start of non-capturing bracket, check empty */
|
||||
OP_SBRAPOS, /* 141 Ditto, with unlimited, possessive repeat */
|
||||
OP_SCBRA, /* 142 Start of capturing bracket, check empty */
|
||||
OP_SCBRAPOS, /* 143 Ditto, with unlimited, possessive repeat */
|
||||
OP_SCOND, /* 144 Conditional group, check empty */
|
||||
OP_SBRA, /* 142 Start of non-capturing bracket, check empty */
|
||||
OP_SBRAPOS, /* 143 Ditto, with unlimited, possessive repeat */
|
||||
OP_SCBRA, /* 144 Start of capturing bracket, check empty */
|
||||
OP_SCBRAPOS, /* 145 Ditto, with unlimited, possessive repeat */
|
||||
OP_SCOND, /* 146 Conditional group, check empty */
|
||||
|
||||
/* The next two pairs must (respectively) be kept together. */
|
||||
|
||||
OP_CREF, /* 145 Used to hold a capture number as condition */
|
||||
OP_DNCREF, /* 146 Used to point to duplicate names as a condition */
|
||||
OP_RREF, /* 147 Used to hold a recursion number as condition */
|
||||
OP_DNRREF, /* 148 Used to point to duplicate names as a condition */
|
||||
OP_FALSE, /* 149 Always false (used by DEFINE and VERSION) */
|
||||
OP_TRUE, /* 150 Always true (used by VERSION) */
|
||||
OP_CREF, /* 147 Used to hold a capture number as condition */
|
||||
OP_DNCREF, /* 148 Used to point to duplicate names as a condition */
|
||||
OP_RREF, /* 149 Used to hold a recursion number as condition */
|
||||
OP_DNRREF, /* 150 Used to point to duplicate names as a condition */
|
||||
OP_FALSE, /* 151 Always false (used by DEFINE and VERSION) */
|
||||
OP_TRUE, /* 152 Always true (used by VERSION) */
|
||||
|
||||
OP_BRAZERO, /* 151 These two must remain together and in this */
|
||||
OP_BRAMINZERO, /* 152 order. */
|
||||
OP_BRAPOSZERO, /* 153 */
|
||||
OP_BRAZERO, /* 153 These two must remain together and in this */
|
||||
OP_BRAMINZERO, /* 154 order. */
|
||||
OP_BRAPOSZERO, /* 155 */
|
||||
|
||||
/* These are backtracking control verbs */
|
||||
|
||||
OP_MARK, /* 154 always has an argument */
|
||||
OP_PRUNE, /* 155 */
|
||||
OP_PRUNE_ARG, /* 156 same, but with argument */
|
||||
OP_SKIP, /* 157 */
|
||||
OP_SKIP_ARG, /* 158 same, but with argument */
|
||||
OP_THEN, /* 159 */
|
||||
OP_THEN_ARG, /* 160 same, but with argument */
|
||||
OP_COMMIT, /* 161 */
|
||||
OP_COMMIT_ARG, /* 162 same, but with argument */
|
||||
OP_MARK, /* 156 always has an argument */
|
||||
OP_PRUNE, /* 157 */
|
||||
OP_PRUNE_ARG, /* 158 same, but with argument */
|
||||
OP_SKIP, /* 159 */
|
||||
OP_SKIP_ARG, /* 160 same, but with argument */
|
||||
OP_THEN, /* 161 */
|
||||
OP_THEN_ARG, /* 162 same, but with argument */
|
||||
OP_COMMIT, /* 163 */
|
||||
OP_COMMIT_ARG, /* 164 same, but with argument */
|
||||
|
||||
/* These are forced failure and success verbs. FAIL and ACCEPT do accept an
|
||||
argument, but these cases can be compiled as, for example, (*MARK:X)(*FAIL)
|
||||
without the need for a special opcode. */
|
||||
|
||||
OP_FAIL, /* 163 */
|
||||
OP_ACCEPT, /* 164 */
|
||||
OP_ASSERT_ACCEPT, /* 165 Used inside assertions */
|
||||
OP_CLOSE, /* 166 Used before OP_ACCEPT to close open captures */
|
||||
OP_FAIL, /* 165 */
|
||||
OP_ACCEPT, /* 166 */
|
||||
OP_ASSERT_ACCEPT, /* 167 Used inside assertions */
|
||||
OP_CLOSE, /* 168 Used before OP_ACCEPT to close open captures */
|
||||
|
||||
/* This is used to skip a subpattern with a {0} quantifier */
|
||||
|
||||
OP_SKIPZERO, /* 167 */
|
||||
OP_SKIPZERO, /* 169 */
|
||||
|
||||
/* This is used to identify a DEFINE group during compilation so that it can
|
||||
be checked for having only one branch. It is changed to OP_FALSE before
|
||||
compilation finishes. */
|
||||
|
||||
OP_DEFINE, /* 168 */
|
||||
OP_DEFINE, /* 170 */
|
||||
|
||||
/* These opcodes replace their normal counterparts in UCP mode when
|
||||
PCRE2_EXTRA_ASCII_BSW is not set. */
|
||||
|
||||
OP_NOT_UCP_WORD_BOUNDARY, /* 169 */
|
||||
OP_UCP_WORD_BOUNDARY, /* 170 */
|
||||
OP_NOT_UCP_WORD_BOUNDARY, /* 171 */
|
||||
OP_UCP_WORD_BOUNDARY, /* 172 */
|
||||
|
||||
/* This is not an opcode, but is used to check that tables indexed by opcode
|
||||
are the correct length, in order to catch updating errors - there have been
|
||||
@@ -1693,19 +1816,21 @@ some cases doesn't actually use these names at all). */
|
||||
"*+","++", "?+", "{", \
|
||||
"*", "*?", "+", "+?", "?", "??", "{", "{", \
|
||||
"*+","++", "?+", "{", \
|
||||
"class", "nclass", "xclass", "Ref", "Refi", "DnRef", "DnRefi", \
|
||||
"class", "nclass", "xclass", "eclass", \
|
||||
"Ref", "Refi", "DnRef", "DnRefi", \
|
||||
"Recurse", "Callout", "CalloutStr", \
|
||||
"Alt", "Ket", "KetRmax", "KetRmin", "KetRpos", \
|
||||
"Reverse", "VReverse", "Assert", "Assert not", \
|
||||
"Assert back", "Assert back not", \
|
||||
"Non-atomic assert", "Non-atomic assert back", \
|
||||
"Scan substring", \
|
||||
"Once", \
|
||||
"Script run", \
|
||||
"Bra", "BraPos", "CBra", "CBraPos", \
|
||||
"Cond", \
|
||||
"SBra", "SBraPos", "SCBra", "SCBraPos", \
|
||||
"SCond", \
|
||||
"Cond ref", "Cond dnref", "Cond rec", "Cond dnrec", \
|
||||
"Capture ref", "Capture dnref", "Cond rec", "Cond dnrec", \
|
||||
"Cond false", "Cond true", \
|
||||
"Brazero", "Braminzero", "Braposzero", \
|
||||
"*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP", \
|
||||
@@ -1766,10 +1891,11 @@ in UTF-8 mode. The code that uses this table must know about such things. */
|
||||
1+(32/sizeof(PCRE2_UCHAR)), /* CLASS */ \
|
||||
1+(32/sizeof(PCRE2_UCHAR)), /* NCLASS */ \
|
||||
0, /* XCLASS - variable length */ \
|
||||
0, /* ECLASS - variable length */ \
|
||||
1+IMM2_SIZE, /* REF */ \
|
||||
1+IMM2_SIZE, /* REFI */ \
|
||||
1+IMM2_SIZE+1, /* REFI */ \
|
||||
1+2*IMM2_SIZE, /* DNREF */ \
|
||||
1+2*IMM2_SIZE, /* DNREFI */ \
|
||||
1+2*IMM2_SIZE+1, /* DNREFI */ \
|
||||
1+LINK_SIZE, /* RECURSE */ \
|
||||
1+2*LINK_SIZE+1, /* CALLOUT */ \
|
||||
0, /* CALLOUT_STR - variable length */ \
|
||||
@@ -1786,6 +1912,7 @@ in UTF-8 mode. The code that uses this table must know about such things. */
|
||||
1+LINK_SIZE, /* Assert behind not */ \
|
||||
1+LINK_SIZE, /* NA Assert */ \
|
||||
1+LINK_SIZE, /* NA Assert behind */ \
|
||||
1+LINK_SIZE, /* Scan substring */ \
|
||||
1+LINK_SIZE, /* ONCE */ \
|
||||
1+LINK_SIZE, /* SCRIPT_RUN */ \
|
||||
1+LINK_SIZE, /* BRA */ \
|
||||
@@ -1815,6 +1942,11 @@ in UTF-8 mode. The code that uses this table must know about such things. */
|
||||
|
||||
#define RREF_ANY 0xffff
|
||||
|
||||
/* Constants used by OP_REFI and OP_DNREFI to control matching behaviour. */
|
||||
|
||||
#define REFI_FLAG_CASELESS_RESTRICT 0x1
|
||||
#define REFI_FLAG_TURKISH_CASING 0x2
|
||||
|
||||
|
||||
/* ---------- Private structures that are mode-independent. ---------- */
|
||||
|
||||
@@ -1890,6 +2022,14 @@ typedef struct {
|
||||
#define UCD_SCRIPTX(ch) UCD_SCRIPTX_PROP(GET_UCD(ch))
|
||||
#define UCD_BPROPS(ch) UCD_BPROPS_PROP(GET_UCD(ch))
|
||||
#define UCD_BIDICLASS(ch) UCD_BIDICLASS_PROP(GET_UCD(ch))
|
||||
#define UCD_ANY_I(ch) \
|
||||
/* match any of the four characters 'i', 'I', U+0130, U+0131 */ \
|
||||
(((uint32_t)(ch) | 0x20u) == 0x69u || ((uint32_t)(ch) | 1u) == 0x0131u)
|
||||
#define UCD_DOTTED_I(ch) \
|
||||
((uint32_t)(ch) == 0x69u || (uint32_t)(ch) == 0x0130u)
|
||||
#define UCD_FOLD_I_TURKISH(ch) \
|
||||
((uint32_t)(ch) == 0x0130u ? 0x69u : \
|
||||
(uint32_t)(ch) == 0x49u ? 0x0131u : (uint32_t)(ch))
|
||||
|
||||
/* The "scriptx" and bprops fields contain offsets into vectors of 32-bit words
|
||||
that form a bitmap representing a list of scripts or boolean properties. These
|
||||
@@ -1955,6 +2095,9 @@ extern const uint8_t PRIV(utf8_table4)[];
|
||||
#define _pcre2_vspace_list PCRE2_SUFFIX(_pcre2_vspace_list_)
|
||||
#define _pcre2_ucd_boolprop_sets PCRE2_SUFFIX(_pcre2_ucd_boolprop_sets_)
|
||||
#define _pcre2_ucd_caseless_sets PCRE2_SUFFIX(_pcre2_ucd_caseless_sets_)
|
||||
#define _pcre2_ucd_turkish_dotted_i_caseset PCRE2_SUFFIX(_pcre2_ucd_turkish_dotted_i_caseset_)
|
||||
#define _pcre2_ucd_nocase_ranges PCRE2_SUFFIX(_pcre2_ucd_nocase_ranges_)
|
||||
#define _pcre2_ucd_nocase_ranges_size PCRE2_SUFFIX(_pcre2_ucd_nocase_ranges_size_)
|
||||
#define _pcre2_ucd_digit_sets PCRE2_SUFFIX(_pcre2_ucd_digit_sets_)
|
||||
#define _pcre2_ucd_script_sets PCRE2_SUFFIX(_pcre2_ucd_script_sets_)
|
||||
#define _pcre2_ucd_records PCRE2_SUFFIX(_pcre2_ucd_records_)
|
||||
@@ -1971,14 +2114,17 @@ extern const uint8_t PRIV(utf8_table4)[];
|
||||
extern const uint8_t PRIV(OP_lengths)[];
|
||||
extern const uint32_t PRIV(callout_end_delims)[];
|
||||
extern const uint32_t PRIV(callout_start_delims)[];
|
||||
extern const pcre2_compile_context PRIV(default_compile_context);
|
||||
extern const pcre2_convert_context PRIV(default_convert_context);
|
||||
extern const pcre2_match_context PRIV(default_match_context);
|
||||
extern pcre2_compile_context PRIV(default_compile_context);
|
||||
extern pcre2_convert_context PRIV(default_convert_context);
|
||||
extern pcre2_match_context PRIV(default_match_context);
|
||||
extern const uint8_t PRIV(default_tables)[];
|
||||
extern const uint32_t PRIV(hspace_list)[];
|
||||
extern const uint32_t PRIV(vspace_list)[];
|
||||
extern const uint32_t PRIV(ucd_boolprop_sets)[];
|
||||
extern const uint32_t PRIV(ucd_caseless_sets)[];
|
||||
extern const uint32_t PRIV(ucd_turkish_dotted_i_caseset);
|
||||
extern const uint32_t PRIV(ucd_nocase_ranges)[];
|
||||
extern const uint32_t PRIV(ucd_nocase_ranges_size);
|
||||
extern const uint32_t PRIV(ucd_digit_sets)[];
|
||||
extern const uint32_t PRIV(ucd_script_sets)[];
|
||||
extern const ucd_record PRIV(ucd_records)[];
|
||||
@@ -2039,11 +2185,12 @@ is available. */
|
||||
#define _pcre2_valid_utf PCRE2_SUFFIX(_pcre2_valid_utf_)
|
||||
#define _pcre2_was_newline PCRE2_SUFFIX(_pcre2_was_newline_)
|
||||
#define _pcre2_xclass PCRE2_SUFFIX(_pcre2_xclass_)
|
||||
#define _pcre2_eclass PCRE2_SUFFIX(_pcre2_eclass_)
|
||||
|
||||
extern int _pcre2_auto_possessify(PCRE2_UCHAR *,
|
||||
const compile_block *);
|
||||
extern int _pcre2_check_escape(PCRE2_SPTR *, PCRE2_SPTR, uint32_t *,
|
||||
int *, uint32_t, uint32_t, BOOL, compile_block *);
|
||||
int *, uint32_t, uint32_t, uint32_t, BOOL, compile_block *);
|
||||
extern PCRE2_SPTR _pcre2_extuni(uint32_t, PCRE2_SPTR, PCRE2_SPTR, PCRE2_SPTR,
|
||||
BOOL, int *);
|
||||
extern PCRE2_SPTR _pcre2_find_bracket(PCRE2_SPTR, BOOL, int);
|
||||
@@ -2066,7 +2213,9 @@ extern int _pcre2_study(pcre2_real_code *);
|
||||
extern int _pcre2_valid_utf(PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE *);
|
||||
extern BOOL _pcre2_was_newline(PCRE2_SPTR, uint32_t, PCRE2_SPTR,
|
||||
uint32_t *, BOOL);
|
||||
extern BOOL _pcre2_xclass(uint32_t, PCRE2_SPTR, BOOL);
|
||||
extern BOOL _pcre2_xclass(uint32_t, PCRE2_SPTR, const uint8_t *, BOOL);
|
||||
extern BOOL _pcre2_eclass(uint32_t, PCRE2_SPTR, PCRE2_SPTR,
|
||||
const uint8_t *, BOOL);
|
||||
|
||||
/* This function is needed only when memmove() is not available. */
|
||||
|
||||
@@ -2079,6 +2228,8 @@ extern void * _pcre2_memmove(void *, const void *, size_t);
|
||||
|
||||
extern BOOL PRIV(ckd_smul)(PCRE2_SIZE *, int, int);
|
||||
|
||||
#include "pcre2_util.h"
|
||||
|
||||
#endif /* PCRE2_INTERNAL_H_IDEMPOTENT_GUARD */
|
||||
|
||||
/* End of pcre2_internal.h */
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2023 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -47,7 +47,7 @@ to have access to the hidden structures at all supported widths.
|
||||
|
||||
Some of the mode-dependent macros are required at different widths for
|
||||
different parts of the pcre2test code (in particular, the included
|
||||
pcre_printint.c file). We undefine them here so that they can be re-defined for
|
||||
pcre2_printint.c file). We undefine them here so that they can be re-defined for
|
||||
multiple inclusions. Not all of these are used in pcre2test, but it's easier
|
||||
just to undefine them all. */
|
||||
|
||||
@@ -435,7 +435,7 @@ UTF-16 mode. */
|
||||
c = *eptr; \
|
||||
if ((c & 0xfc00u) == 0xd800u) GETUTF16LEN(c, eptr, len);
|
||||
|
||||
/* Get the next UTF-816character, testing for UTF-16 mode, not advancing the
|
||||
/* Get the next UTF-16 character, testing for UTF-16 mode, not advancing the
|
||||
pointer, incrementing length if there is a low surrogate. This is called when
|
||||
we do not know if we are in UTF-16 mode. */
|
||||
|
||||
@@ -556,6 +556,11 @@ code that uses them is simpler because it assumes this. */
|
||||
/* The real general context structure. At present it holds only data for custom
|
||||
memory control. */
|
||||
|
||||
/* WARNING: if this is ever changed, code in pcre2_substitute.c will have to be
|
||||
changed because it builds a general context "by hand" in order to avoid the
|
||||
malloc() call in pcre2_general_context)_create(). There is also code in
|
||||
pcre2_match.c that makes the same assumption. */
|
||||
|
||||
typedef struct pcre2_real_general_context {
|
||||
pcre2_memctl memctl;
|
||||
} pcre2_real_general_context;
|
||||
@@ -568,11 +573,13 @@ typedef struct pcre2_real_compile_context {
|
||||
void *stack_guard_data;
|
||||
const uint8_t *tables;
|
||||
PCRE2_SIZE max_pattern_length;
|
||||
PCRE2_SIZE max_pattern_compiled_length;
|
||||
uint16_t bsr_convention;
|
||||
uint16_t newline_convention;
|
||||
uint32_t parens_nest_limit;
|
||||
uint32_t extra_options;
|
||||
uint32_t max_varlookbehind;
|
||||
uint32_t optimization_flags;
|
||||
} pcre2_real_compile_context;
|
||||
|
||||
/* The real match context structure. */
|
||||
@@ -583,10 +590,13 @@ typedef struct pcre2_real_match_context {
|
||||
pcre2_jit_callback jit_callback;
|
||||
void *jit_callback_data;
|
||||
#endif
|
||||
int (*callout)(pcre2_callout_block *, void *);
|
||||
void *callout_data;
|
||||
int (*substitute_callout)(pcre2_substitute_callout_block *, void *);
|
||||
void *substitute_callout_data;
|
||||
int (*callout)(pcre2_callout_block *, void *);
|
||||
void *callout_data;
|
||||
int (*substitute_callout)(pcre2_substitute_callout_block *, void *);
|
||||
void *substitute_callout_data;
|
||||
PCRE2_SIZE (*substitute_case_callout)(PCRE2_SPTR, PCRE2_SIZE, PCRE2_UCHAR *,
|
||||
PCRE2_SIZE, int, void *);
|
||||
void *substitute_case_callout_data;
|
||||
PCRE2_SIZE offset_limit;
|
||||
uint32_t heap_limit;
|
||||
uint32_t match_limit;
|
||||
@@ -622,6 +632,7 @@ typedef struct pcre2_real_code {
|
||||
void *executable_jit; /* Pointer to JIT code */
|
||||
uint8_t start_bitmap[32]; /* Bitmap for starting code unit < 256 */
|
||||
CODE_BLOCKSIZE_TYPE blocksize; /* Total (bytes) that was malloc-ed */
|
||||
CODE_BLOCKSIZE_TYPE code_start; /* Byte code start offset */
|
||||
uint32_t magic_number; /* Paranoid and endianness check */
|
||||
uint32_t compile_options; /* Options passed to pcre2_compile() */
|
||||
uint32_t overall_options; /* Options after processing the pattern */
|
||||
@@ -640,6 +651,7 @@ typedef struct pcre2_real_code {
|
||||
uint16_t top_backref; /* Highest numbered back reference */
|
||||
uint16_t name_entry_size; /* Size (code units) of table entries */
|
||||
uint16_t name_count; /* Number of name entries in the table */
|
||||
uint32_t optimization_flags; /* Optimizations enabled at compile time */
|
||||
} pcre2_real_code;
|
||||
|
||||
/* The real match data structure. Define ovector as large as it can ever
|
||||
@@ -715,6 +727,23 @@ typedef struct named_group {
|
||||
uint16_t isdup; /* TRUE if a duplicate */
|
||||
} named_group;
|
||||
|
||||
/* Structure for caching sorted ranges. This improves the performance
|
||||
of translating META code to byte code. */
|
||||
|
||||
typedef struct class_ranges {
|
||||
struct class_ranges *next; /* Next class ranges */
|
||||
size_t char_lists_size; /* Total size of encoded char lists */
|
||||
size_t char_lists_start; /* Start offset of encoded char lists */
|
||||
uint16_t range_list_size; /* Size of ranges array */
|
||||
uint16_t char_lists_types; /* The XCL_LIST header of char lists */
|
||||
/* Followed by the list of ranges (start/end pairs) */
|
||||
} class_ranges;
|
||||
|
||||
typedef union class_bits_storage {
|
||||
uint8_t classbits[32];
|
||||
uint32_t classwords[8];
|
||||
} class_bits_storage;
|
||||
|
||||
/* Structure for passing "static" information around between the functions
|
||||
doing the compiling, so that they are thread-safe. */
|
||||
|
||||
@@ -724,14 +753,15 @@ typedef struct compile_block {
|
||||
const uint8_t *fcc; /* Points to case-flipping table */
|
||||
const uint8_t *cbits; /* Points to character type table */
|
||||
const uint8_t *ctypes; /* Points to table of type maps */
|
||||
PCRE2_SPTR start_workspace; /* The start of working space */
|
||||
PCRE2_SPTR start_code; /* The start of the compiled code */
|
||||
PCRE2_UCHAR *start_workspace; /* The start of working space */
|
||||
PCRE2_UCHAR *start_code; /* The start of the compiled code */
|
||||
PCRE2_SPTR start_pattern; /* The start of the pattern */
|
||||
PCRE2_SPTR end_pattern; /* The end of the pattern */
|
||||
PCRE2_UCHAR *name_table; /* The name/number table */
|
||||
PCRE2_SIZE workspace_size; /* Size of workspace */
|
||||
PCRE2_SIZE small_ref_offset[10]; /* Offsets for \1 to \9 */
|
||||
PCRE2_SIZE erroroffset; /* Offset of error in pattern */
|
||||
class_bits_storage classbits; /* Temporary store for classbits */
|
||||
uint16_t names_found; /* Number of entries so far */
|
||||
uint16_t name_entry_size; /* Size of each entry */
|
||||
uint16_t parens_depth; /* Depth of nested parentheses */
|
||||
@@ -749,9 +779,9 @@ typedef struct compile_block {
|
||||
uint32_t backref_map; /* Bitmap of low back refs */
|
||||
uint32_t nltype; /* Newline type */
|
||||
uint32_t nllen; /* Newline string length */
|
||||
uint32_t class_range_start; /* Overall class range start */
|
||||
uint32_t class_range_end; /* Overall class range end */
|
||||
PCRE2_UCHAR nl[4]; /* Newline string when fixed length */
|
||||
uint8_t class_op_used[ECLASS_NEST_LIMIT]; /* Operation used for
|
||||
extended classes */
|
||||
uint32_t req_varyopt; /* "After variable item" flag for reqbyte */
|
||||
uint32_t max_varlookbehind; /* Limit for variable lookbehinds */
|
||||
int max_lookbehind; /* Maximum lookbehind encountered (characters) */
|
||||
@@ -759,6 +789,11 @@ typedef struct compile_block {
|
||||
BOOL had_pruneorskip; /* (*PRUNE) or (*SKIP) encountered */
|
||||
BOOL had_recurse; /* Had a pattern recursion or subroutine call */
|
||||
BOOL dupnames; /* Duplicate names exist */
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
class_ranges *cranges; /* First class range. */
|
||||
class_ranges *next_cranges; /* Next class range. */
|
||||
size_t char_lists_size; /* Current size of character lists */
|
||||
#endif
|
||||
} compile_block;
|
||||
|
||||
/* Structure for keeping the properties of the in-memory stack used
|
||||
@@ -792,7 +827,7 @@ typedef struct heapframe {
|
||||
to RRMATCH(), but which do not need to be copied to new frames. */
|
||||
|
||||
PCRE2_SPTR ecode; /* The current position in the pattern */
|
||||
PCRE2_SPTR temp_sptr[2]; /* Used for short-term PCRE_SPTR values */
|
||||
PCRE2_SPTR temp_sptr[2]; /* Used for short-term PCRE2_SPTR values */
|
||||
PCRE2_SIZE length; /* Used for character, string, or code lengths */
|
||||
PCRE2_SIZE back_frame; /* Amount to subtract on RRETURN */
|
||||
PCRE2_SIZE temp_size; /* Used for short-term PCRE2_SIZE values */
|
||||
@@ -840,11 +875,10 @@ typedef struct heapframe {
|
||||
PCRE2_SIZE ovector[131072]; /* Must be last in the structure */
|
||||
} heapframe;
|
||||
|
||||
/* This typedef is a check that the size of the heapframe structure is a
|
||||
multiple of PCRE2_SIZE. See various comments above. */
|
||||
/* Assert that the size of the heapframe structure is a multiple of PCRE2_SIZE.
|
||||
See various comments above. */
|
||||
|
||||
typedef char check_heapframe_size[
|
||||
((sizeof(heapframe) % sizeof(PCRE2_SIZE)) == 0)? (+1):(-1)];
|
||||
STATIC_ASSERT((sizeof(heapframe) % sizeof(PCRE2_SIZE)) == 0, heapframe_size);
|
||||
|
||||
/* Structure for computing the alignment of heapframe. */
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2020 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -155,10 +155,10 @@ return yield;
|
||||
PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
|
||||
pcre2_maketables_free(pcre2_general_context *gcontext, const uint8_t *tables)
|
||||
{
|
||||
if (gcontext)
|
||||
gcontext->memctl.free((void *)tables, gcontext->memctl.memory_data);
|
||||
else
|
||||
free((void *)tables);
|
||||
if (gcontext != NULL)
|
||||
gcontext->memctl.free((void *)tables, gcontext->memctl.memory_data);
|
||||
else
|
||||
free((void *)tables);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2022 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -77,14 +77,16 @@ return yield;
|
||||
* Create a match data block using pattern data *
|
||||
*************************************************/
|
||||
|
||||
/* If no context is supplied, use the memory allocator from the code. */
|
||||
/* If no context is supplied, use the memory allocator from the code. This code
|
||||
assumes that a general context contains nothing other than a memory allocator.
|
||||
If that ever changes, this code will need fixing. */
|
||||
|
||||
PCRE2_EXP_DEFN pcre2_match_data * PCRE2_CALL_CONVENTION
|
||||
pcre2_match_data_create_from_pattern(const pcre2_code *code,
|
||||
pcre2_general_context *gcontext)
|
||||
{
|
||||
if (gcontext == NULL) gcontext = (pcre2_general_context *)code;
|
||||
return pcre2_match_data_create(((pcre2_real_code *)code)->top_bracket + 1,
|
||||
return pcre2_match_data_create(((const pcre2_real_code *)code)->top_bracket + 1,
|
||||
gcontext);
|
||||
}
|
||||
|
||||
|
||||
@@ -117,4 +117,4 @@ return 1;
|
||||
}
|
||||
#endif /* SUPPORT_UNICODE */
|
||||
|
||||
/* End of pcre_ord2utf.c */
|
||||
/* End of pcre2_ord2utf.c */
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2018 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -64,7 +64,7 @@ Returns: 0 when data returned
|
||||
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
pcre2_pattern_info(const pcre2_code *code, uint32_t what, void *where)
|
||||
{
|
||||
const pcre2_real_code *re = (pcre2_real_code *)code;
|
||||
const pcre2_real_code *re = (const pcre2_real_code *)code;
|
||||
|
||||
if (where == NULL) /* Requests field length */
|
||||
{
|
||||
@@ -230,7 +230,8 @@ switch(what)
|
||||
break;
|
||||
|
||||
case PCRE2_INFO_NAMETABLE:
|
||||
*((PCRE2_SPTR *)where) = (PCRE2_SPTR)((char *)re + sizeof(pcre2_real_code));
|
||||
*((PCRE2_SPTR *)where) = (PCRE2_SPTR)((const char *)re +
|
||||
sizeof(pcre2_real_code));
|
||||
break;
|
||||
|
||||
case PCRE2_INFO_NEWLINE:
|
||||
@@ -268,7 +269,7 @@ PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||
pcre2_callout_enumerate(const pcre2_code *code,
|
||||
int (*callback)(pcre2_callout_enumerate_block *, void *), void *callout_data)
|
||||
{
|
||||
pcre2_real_code *re = (pcre2_real_code *)code;
|
||||
const pcre2_real_code *re = (const pcre2_real_code *)code;
|
||||
pcre2_callout_enumerate_block cb;
|
||||
PCRE2_SPTR cc;
|
||||
#ifdef SUPPORT_UNICODE
|
||||
@@ -291,7 +292,7 @@ if (re->magic_number != MAGIC_NUMBER) return PCRE2_ERROR_BADMAGIC;
|
||||
if ((re->flags & (PCRE2_CODE_UNIT_WIDTH/8)) == 0) return PCRE2_ERROR_BADMODE;
|
||||
|
||||
cb.version = 0;
|
||||
cc = (PCRE2_SPTR)((uint8_t *)re + sizeof(pcre2_real_code))
|
||||
cc = (PCRE2_SPTR)((const uint8_t *)re + sizeof(pcre2_real_code))
|
||||
+ re->name_count * re->name_entry_size;
|
||||
|
||||
while (TRUE)
|
||||
@@ -383,8 +384,9 @@ while (TRUE)
|
||||
#endif
|
||||
break;
|
||||
|
||||
#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
case OP_XCLASS:
|
||||
case OP_ECLASS:
|
||||
cc += GET(cc, 1);
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2020 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -127,7 +127,7 @@ dst_bytes += TABLES_LENGTH;
|
||||
for (i = 0; i < number_of_codes; i++)
|
||||
{
|
||||
re = (const pcre2_real_code *)(codes[i]);
|
||||
(void)memcpy(dst_bytes, (char *)re, re->blocksize);
|
||||
(void)memcpy(dst_bytes, (const char *)re, re->blocksize);
|
||||
|
||||
/* Certain fields in the compiled code block are re-set during
|
||||
deserialization. In order to ensure that the serialized data stream is always
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2023 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -114,7 +114,7 @@ uint32_t once_fudge = 0;
|
||||
BOOL had_recurse = FALSE;
|
||||
BOOL dupcapused = (re->flags & PCRE2_DUPCAPUSED) != 0;
|
||||
PCRE2_SPTR nextbranch = code + GET(code, 1);
|
||||
PCRE2_UCHAR *cc = (PCRE2_UCHAR *)code + 1 + LINK_SIZE;
|
||||
PCRE2_SPTR cc = code + 1 + LINK_SIZE;
|
||||
recurse_check this_recurse;
|
||||
|
||||
/* If this is a "could be empty" group, its minimum length is 0. */
|
||||
@@ -136,12 +136,13 @@ passes 16-bits, reset to that value and skip the rest of the branch. */
|
||||
for (;;)
|
||||
{
|
||||
int d, min, recno;
|
||||
PCRE2_UCHAR op, *cs, *ce;
|
||||
PCRE2_UCHAR op;
|
||||
PCRE2_SPTR cs, ce;
|
||||
|
||||
if (branchlength >= UINT16_MAX)
|
||||
{
|
||||
branchlength = UINT16_MAX;
|
||||
cc = (PCRE2_UCHAR *)nextbranch;
|
||||
cc = nextbranch;
|
||||
}
|
||||
|
||||
op = *cc;
|
||||
@@ -249,6 +250,7 @@ for (;;)
|
||||
case OP_ASSERTBACK:
|
||||
case OP_ASSERTBACK_NOT:
|
||||
case OP_ASSERT_NA:
|
||||
case OP_ASSERT_SCS:
|
||||
case OP_ASSERTBACK_NA:
|
||||
do cc += GET(cc, 1); while (*cc == OP_ALT);
|
||||
/* Fall through */
|
||||
@@ -417,15 +419,14 @@ for (;;)
|
||||
case OP_NCLASS:
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
case OP_XCLASS:
|
||||
case OP_ECLASS:
|
||||
/* The original code caused an unsigned overflow in 64 bit systems,
|
||||
so now we use a conditional statement. */
|
||||
if (op == OP_XCLASS)
|
||||
if (op == OP_XCLASS || op == OP_ECLASS)
|
||||
cc += GET(cc, 1);
|
||||
else
|
||||
cc += PRIV(OP_lengths)[OP_CLASS];
|
||||
#else
|
||||
cc += PRIV(OP_lengths)[OP_CLASS];
|
||||
#endif
|
||||
cc += PRIV(OP_lengths)[OP_CLASS];
|
||||
|
||||
switch (*cc)
|
||||
{
|
||||
@@ -479,8 +480,8 @@ for (;;)
|
||||
if (!dupcapused && (re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0)
|
||||
{
|
||||
int count = GET2(cc, 1+IMM2_SIZE);
|
||||
PCRE2_UCHAR *slot =
|
||||
(PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)) +
|
||||
PCRE2_SPTR slot =
|
||||
(PCRE2_SPTR)((const uint8_t *)re + sizeof(pcre2_real_code)) +
|
||||
GET2(cc, 1) * re->name_entry_size;
|
||||
|
||||
d = INT_MAX;
|
||||
@@ -496,13 +497,12 @@ for (;;)
|
||||
dd = backref_cache[recno];
|
||||
else
|
||||
{
|
||||
ce = cs = (PCRE2_UCHAR *)PRIV(find_bracket)(startcode, utf, recno);
|
||||
ce = cs = PRIV(find_bracket)(startcode, utf, recno);
|
||||
if (cs == NULL) return -2;
|
||||
do ce += GET(ce, 1); while (*ce == OP_ALT);
|
||||
|
||||
dd = 0;
|
||||
if (!dupcapused ||
|
||||
(PCRE2_UCHAR *)PRIV(find_bracket)(ce, utf, recno) == NULL)
|
||||
if (!dupcapused || PRIV(find_bracket)(ce, utf, recno) == NULL)
|
||||
{
|
||||
if (cc > cs && cc < ce) /* Simple recursion */
|
||||
{
|
||||
@@ -539,7 +539,7 @@ for (;;)
|
||||
}
|
||||
}
|
||||
else d = 0;
|
||||
cc += 1 + 2*IMM2_SIZE;
|
||||
cc += PRIV(OP_lengths)[*cc];
|
||||
goto REPEAT_BACK_REFERENCE;
|
||||
|
||||
/* Single back reference by number. References by name are converted to by
|
||||
@@ -557,12 +557,11 @@ for (;;)
|
||||
|
||||
if ((re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0)
|
||||
{
|
||||
ce = cs = (PCRE2_UCHAR *)PRIV(find_bracket)(startcode, utf, recno);
|
||||
ce = cs = PRIV(find_bracket)(startcode, utf, recno);
|
||||
if (cs == NULL) return -2;
|
||||
do ce += GET(ce, 1); while (*ce == OP_ALT);
|
||||
|
||||
if (!dupcapused ||
|
||||
(PCRE2_UCHAR *)PRIV(find_bracket)(ce, utf, recno) == NULL)
|
||||
if (!dupcapused || PRIV(find_bracket)(ce, utf, recno) == NULL)
|
||||
{
|
||||
if (cc > cs && cc < ce) /* Simple recursion */
|
||||
{
|
||||
@@ -593,7 +592,7 @@ for (;;)
|
||||
backref_cache[0] = recno;
|
||||
}
|
||||
|
||||
cc += 1 + IMM2_SIZE;
|
||||
cc += PRIV(OP_lengths)[*cc];
|
||||
|
||||
/* Handle repeated back references */
|
||||
|
||||
@@ -643,7 +642,7 @@ for (;;)
|
||||
pattern contains multiple subpatterns with the same number. */
|
||||
|
||||
case OP_RECURSE:
|
||||
cs = ce = (PCRE2_UCHAR *)startcode + GET(cc, 1);
|
||||
cs = ce = startcode + GET(cc, 1);
|
||||
recno = GET2(cs, 1+LINK_SIZE);
|
||||
if (recno == prev_recurse_recno)
|
||||
{
|
||||
@@ -755,10 +754,13 @@ for (;;)
|
||||
new ones get added they are properly considered. */
|
||||
|
||||
default:
|
||||
PCRE2_DEBUG_UNREACHABLE();
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
/* Control never gets here */
|
||||
|
||||
PCRE2_DEBUG_UNREACHABLE(); /* Control should never reach here */
|
||||
return -3; /* Avoid compiler warnings */
|
||||
}
|
||||
|
||||
|
||||
@@ -919,6 +921,138 @@ if (table_limit != 32) for (c = 24; c < 32; c++) re->start_bitmap[c] = 0xff;
|
||||
|
||||
|
||||
|
||||
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
|
||||
/*************************************************
|
||||
* Set starting bits for a character list. *
|
||||
*************************************************/
|
||||
|
||||
/* This function sets starting bits for a character list. It enumerates
|
||||
all characters and character ranges in the character list, and sets
|
||||
the starting bits accordingly.
|
||||
|
||||
Arguments:
|
||||
code pointer to the code
|
||||
start_bitmap pointer to the starting bitmap
|
||||
|
||||
Returns: nothing
|
||||
*/
|
||||
static void
|
||||
study_char_list(PCRE2_SPTR code, uint8_t *start_bitmap,
|
||||
const uint8_t *char_lists_end)
|
||||
{
|
||||
uint32_t type, list_ind;
|
||||
uint32_t char_list_add = XCL_CHAR_LIST_LOW_16_ADD;
|
||||
uint32_t range_start = ~(uint32_t)0, range_end = 0;
|
||||
const uint8_t *next_char;
|
||||
PCRE2_UCHAR start_buffer[6], end_buffer[6];
|
||||
PCRE2_UCHAR start, end;
|
||||
|
||||
/* Only needed in 8-bit mode at the moment. */
|
||||
type = (uint32_t)(code[0] << 8) | code[1];
|
||||
code += 2;
|
||||
|
||||
/* Align characters. */
|
||||
next_char = char_lists_end - (GET(code, 0) << 1);
|
||||
type &= XCL_TYPE_MASK;
|
||||
list_ind = 0;
|
||||
|
||||
if ((type & XCL_BEGIN_WITH_RANGE) != 0)
|
||||
range_start = XCL_CHAR_LIST_LOW_16_START;
|
||||
|
||||
while (type > 0)
|
||||
{
|
||||
uint32_t item_count = type & XCL_ITEM_COUNT_MASK;
|
||||
|
||||
if (item_count == XCL_ITEM_COUNT_MASK)
|
||||
{
|
||||
if (list_ind <= 1)
|
||||
{
|
||||
item_count = *(const uint16_t*)next_char;
|
||||
next_char += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
item_count = *(const uint32_t*)next_char;
|
||||
next_char += 4;
|
||||
}
|
||||
}
|
||||
|
||||
while (item_count > 0)
|
||||
{
|
||||
if (list_ind <= 1)
|
||||
{
|
||||
range_end = *(const uint16_t*)next_char;
|
||||
next_char += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
range_end = *(const uint32_t*)next_char;
|
||||
next_char += 4;
|
||||
}
|
||||
|
||||
if ((range_end & XCL_CHAR_END) != 0)
|
||||
{
|
||||
range_end = char_list_add + (range_end >> XCL_CHAR_SHIFT);
|
||||
|
||||
PRIV(ord2utf)(range_end, end_buffer);
|
||||
end = end_buffer[0];
|
||||
|
||||
if (range_start < range_end)
|
||||
{
|
||||
PRIV(ord2utf)(range_start, start_buffer);
|
||||
for (start = start_buffer[0]; start <= end; start++)
|
||||
start_bitmap[start / 8] |= (1u << (start & 7));
|
||||
}
|
||||
else
|
||||
start_bitmap[end / 8] |= (1u << (end & 7));
|
||||
|
||||
range_start = ~(uint32_t)0;
|
||||
}
|
||||
else
|
||||
range_start = char_list_add + (range_end >> XCL_CHAR_SHIFT);
|
||||
|
||||
item_count--;
|
||||
}
|
||||
|
||||
list_ind++;
|
||||
type >>= XCL_TYPE_BIT_LEN;
|
||||
|
||||
if (range_start == ~(uint32_t)0)
|
||||
{
|
||||
if ((type & XCL_BEGIN_WITH_RANGE) != 0)
|
||||
{
|
||||
/* In 8 bit mode XCL_CHAR_LIST_HIGH_32_START is not possible. */
|
||||
if (list_ind == 1) range_start = XCL_CHAR_LIST_HIGH_16_START;
|
||||
else range_start = XCL_CHAR_LIST_LOW_32_START;
|
||||
}
|
||||
}
|
||||
else if ((type & XCL_BEGIN_WITH_RANGE) == 0)
|
||||
{
|
||||
PRIV(ord2utf)(range_start, start_buffer);
|
||||
|
||||
/* In 8 bit mode XCL_CHAR_LIST_LOW_32_END and
|
||||
XCL_CHAR_LIST_HIGH_32_END are not possible. */
|
||||
if (list_ind == 1) range_end = XCL_CHAR_LIST_LOW_16_END;
|
||||
else range_end = XCL_CHAR_LIST_HIGH_16_END;
|
||||
|
||||
PRIV(ord2utf)(range_end, end_buffer);
|
||||
end = end_buffer[0];
|
||||
|
||||
for (start = start_buffer[0]; start <= end; start++)
|
||||
start_bitmap[start / 8] |= (1u << (start & 7));
|
||||
|
||||
range_start = ~(uint32_t)0;
|
||||
}
|
||||
|
||||
/* In 8 bit mode XCL_CHAR_LIST_HIGH_32_ADD is not possible. */
|
||||
if (list_ind == 1) char_list_add = XCL_CHAR_LIST_HIGH_16_ADD;
|
||||
else char_list_add = XCL_CHAR_LIST_LOW_32_ADD;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*************************************************
|
||||
* Create bitmap of starting code units *
|
||||
*************************************************/
|
||||
@@ -980,7 +1114,7 @@ do
|
||||
{
|
||||
int rc;
|
||||
PCRE2_SPTR ncode;
|
||||
uint8_t *classmap = NULL;
|
||||
const uint8_t *classmap = NULL;
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
PCRE2_UCHAR xclassflags;
|
||||
#endif
|
||||
@@ -1134,6 +1268,7 @@ do
|
||||
case OP_ASSERTBACK_NOT:
|
||||
case OP_ASSERT_NA:
|
||||
case OP_ASSERTBACK_NA:
|
||||
case OP_ASSERT_SCS:
|
||||
ncode += GET(ncode, 1);
|
||||
while (*ncode == OP_ALT) ncode += GET(ncode, 1);
|
||||
ncode += 1 + LINK_SIZE;
|
||||
@@ -1252,12 +1387,14 @@ do
|
||||
tcode += GET(tcode, 1 + 2*LINK_SIZE);
|
||||
break;
|
||||
|
||||
/* Skip over lookbehind and negative lookahead assertions */
|
||||
/* Skip over lookbehind, negative lookahead, and scan substring
|
||||
assertions */
|
||||
|
||||
case OP_ASSERT_NOT:
|
||||
case OP_ASSERTBACK:
|
||||
case OP_ASSERTBACK_NOT:
|
||||
case OP_ASSERTBACK_NA:
|
||||
case OP_ASSERT_SCS:
|
||||
do tcode += GET(tcode, 1); while (*tcode == OP_ALT);
|
||||
tcode += 1 + LINK_SIZE;
|
||||
break;
|
||||
@@ -1578,6 +1715,13 @@ do
|
||||
tcode += 2;
|
||||
break;
|
||||
|
||||
/* Set-based ECLASS: treat it the same as a "complex" XCLASS; give up. */
|
||||
|
||||
#ifdef SUPPORT_WIDE_CHARS
|
||||
case OP_ECLASS:
|
||||
return SSB_FAIL;
|
||||
#endif
|
||||
|
||||
/* Extended class: if there are any property checks, or if this is a
|
||||
negative XCLASS without a map, give up. If there are no property checks,
|
||||
there must be wide characters on the XCLASS list, because otherwise an
|
||||
@@ -1596,7 +1740,7 @@ do
|
||||
map pointer if there is one, and fall through. */
|
||||
|
||||
classmap = ((xclassflags & XCL_MAP) == 0)? NULL :
|
||||
(uint8_t *)(tcode + 1 + LINK_SIZE + 1);
|
||||
(const uint8_t *)(tcode + 1 + LINK_SIZE + 1);
|
||||
|
||||
/* In UTF-8 mode, scan the character list and set bits for leading bytes,
|
||||
then jump to handle the map. */
|
||||
@@ -1608,6 +1752,13 @@ do
|
||||
PCRE2_SPTR p = tcode + 1 + LINK_SIZE + 1 + ((classmap == NULL)? 0:32);
|
||||
tcode += GET(tcode, 1);
|
||||
|
||||
if (*p >= XCL_LIST)
|
||||
{
|
||||
study_char_list(p, re->start_bitmap,
|
||||
((const uint8_t *)re + re->code_start));
|
||||
goto HANDLE_CLASSMAP;
|
||||
}
|
||||
|
||||
for (;;) switch (*p++)
|
||||
{
|
||||
case XCL_SINGLE:
|
||||
@@ -1629,6 +1780,7 @@ do
|
||||
goto HANDLE_CLASSMAP;
|
||||
|
||||
default:
|
||||
PCRE2_DEBUG_UNREACHABLE();
|
||||
return SSB_UNKNOWN; /* Internal error, should not occur */
|
||||
}
|
||||
}
|
||||
@@ -1665,7 +1817,7 @@ do
|
||||
case OP_CLASS:
|
||||
if (*tcode == OP_XCLASS) tcode += GET(tcode, 1); else
|
||||
{
|
||||
classmap = (uint8_t *)(++tcode);
|
||||
classmap = (const uint8_t *)(++tcode);
|
||||
tcode += 32 / sizeof(PCRE2_UCHAR);
|
||||
}
|
||||
|
||||
@@ -1768,8 +1920,7 @@ BOOL ucp = (re->overall_options & PCRE2_UCP) != 0;
|
||||
|
||||
/* Find start of compiled code */
|
||||
|
||||
code = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)) +
|
||||
re->name_entry_size * re->name_count;
|
||||
code = (PCRE2_UCHAR *)((uint8_t *)re + re->code_start);
|
||||
|
||||
/* For a pattern that has a first code unit, or a multiline pattern that
|
||||
matches only at "line start", there is no point in seeking a list of starting
|
||||
@@ -1779,7 +1930,11 @@ if ((re->flags & (PCRE2_FIRSTSET|PCRE2_STARTLINE)) == 0)
|
||||
{
|
||||
int depth = 0;
|
||||
int rc = set_start_bits(re, code, utf, ucp, &depth);
|
||||
if (rc == SSB_UNKNOWN) return 1;
|
||||
if (rc == SSB_UNKNOWN)
|
||||
{
|
||||
PCRE2_DEBUG_UNREACHABLE();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* If a list of starting code units was set up, scan the list to see if only
|
||||
one or two were listed. Having only one listed is rare because usually a
|
||||
@@ -1852,25 +2007,22 @@ if ((re->flags & (PCRE2_FIRSTSET|PCRE2_STARTLINE)) == 0)
|
||||
}
|
||||
}
|
||||
|
||||
/* Replace the start code unit bits with a first code unit, but only if it
|
||||
is not the same as a required later code unit. This is because a search for
|
||||
a required code unit starts after an explicit first code unit, but at a
|
||||
code unit found from the bitmap. Patterns such as /a*a/ don't work
|
||||
if both the start unit and required unit are the same. */
|
||||
/* Replace the start code unit bits with a first code unit. If it is the
|
||||
same as a required later code unit, then clear the required later code
|
||||
unit. This is because a search for a required code unit starts after an
|
||||
explicit first code unit, but at a code unit found from the bitmap.
|
||||
Patterns such as /a*a/ don't work if both the start unit and required
|
||||
unit are the same. */
|
||||
|
||||
if (a >= 0 &&
|
||||
(
|
||||
(re->flags & PCRE2_LASTSET) == 0 ||
|
||||
(
|
||||
re->last_codeunit != (uint32_t)a &&
|
||||
(b < 0 || re->last_codeunit != (uint32_t)b)
|
||||
)
|
||||
))
|
||||
{
|
||||
if (a >= 0) {
|
||||
if ((re->flags & PCRE2_LASTSET) && (re->last_codeunit == (uint32_t)a || (b >= 0 && re->last_codeunit == (uint32_t)b))) {
|
||||
re->flags &= ~(PCRE2_LASTSET | PCRE2_LASTCASELESS);
|
||||
re->last_codeunit = 0;
|
||||
}
|
||||
re->first_codeunit = a;
|
||||
flags = PCRE2_FIRSTSET;
|
||||
if (b >= 0) flags |= PCRE2_FIRSTCASELESS;
|
||||
}
|
||||
}
|
||||
|
||||
DONE:
|
||||
re->flags |= flags;
|
||||
@@ -1898,9 +2050,11 @@ if ((re->flags & (PCRE2_MATCH_EMPTY|PCRE2_HASACCEPT)) == 0 &&
|
||||
break; /* Leave minlength unchanged (will be zero) */
|
||||
|
||||
case -2:
|
||||
PCRE2_DEBUG_UNREACHABLE();
|
||||
return 2; /* missing capturing bracket */
|
||||
|
||||
case -3:
|
||||
PCRE2_DEBUG_UNREACHABLE();
|
||||
return 3; /* unrecognized opcode */
|
||||
|
||||
default:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2023 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -486,7 +486,7 @@ pcre2_substring_nametable_scan(const pcre2_code *code, PCRE2_SPTR stringname,
|
||||
uint16_t bot = 0;
|
||||
uint16_t top = code->name_count;
|
||||
uint16_t entrysize = code->name_entry_size;
|
||||
PCRE2_SPTR nametable = (PCRE2_SPTR)((char *)code + sizeof(pcre2_real_code));
|
||||
PCRE2_SPTR nametable = (PCRE2_SPTR)((const char *)code + sizeof(pcre2_real_code));
|
||||
|
||||
while (top > bot)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2021 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -171,9 +171,9 @@ are implementing).
|
||||
6. Do not break after Prepend characters.
|
||||
|
||||
7. Do not break within emoji modifier sequences or emoji zwj sequences. That
|
||||
is, do not break between characters with the Extended_Pictographic property.
|
||||
Extend and ZWJ characters are allowed between the characters; this cannot be
|
||||
represented in this table, the code has to deal with it.
|
||||
is, do not break between characters with the Extended_Pictographic property
|
||||
if a ZWJ intervenes. Extend characters are allowed between the characters;
|
||||
this cannot be represented in this table, the code has to deal with it.
|
||||
|
||||
8. Do not break within emoji flag sequences. That is, do not break between
|
||||
regional indicator (RI) symbols if there are an odd number of RI characters
|
||||
@@ -203,8 +203,8 @@ const uint32_t PRIV(ucp_gbtable)[] = {
|
||||
ESZ|(1u<<ucp_gbT), /* 10 LVT */
|
||||
(1u<<ucp_gbRegional_Indicator), /* 11 Regional Indicator */
|
||||
ESZ, /* 12 Other */
|
||||
ESZ, /* 13 ZWJ */
|
||||
ESZ|(1u<<ucp_gbExtended_Pictographic) /* 14 Extended Pictographic */
|
||||
ESZ|(1u<<ucp_gbExtended_Pictographic), /* 13 ZWJ */
|
||||
ESZ /* 14 Extended Pictographic */
|
||||
};
|
||||
|
||||
#undef ESZ
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -132,13 +132,18 @@ enum {
|
||||
ucp_Hex_Digit,
|
||||
ucp_IDS_Binary_Operator,
|
||||
ucp_IDS_Trinary_Operator,
|
||||
ucp_IDS_Unary_Operator,
|
||||
ucp_ID_Compat_Math_Continue,
|
||||
ucp_ID_Compat_Math_Start,
|
||||
ucp_ID_Continue,
|
||||
ucp_ID_Start,
|
||||
ucp_Ideographic,
|
||||
ucp_InCB,
|
||||
ucp_Join_Control,
|
||||
ucp_Logical_Order_Exception,
|
||||
ucp_Lowercase,
|
||||
ucp_Math,
|
||||
ucp_Modifier_Combining_Mark,
|
||||
ucp_Noncharacter_Code_Point,
|
||||
ucp_Pattern_Syntax,
|
||||
ucp_Pattern_White_Space,
|
||||
@@ -219,6 +224,8 @@ enum {
|
||||
ucp_Latin,
|
||||
ucp_Greek,
|
||||
ucp_Cyrillic,
|
||||
ucp_Armenian,
|
||||
ucp_Hebrew,
|
||||
ucp_Arabic,
|
||||
ucp_Syriac,
|
||||
ucp_Thaana,
|
||||
@@ -232,15 +239,21 @@ enum {
|
||||
ucp_Kannada,
|
||||
ucp_Malayalam,
|
||||
ucp_Sinhala,
|
||||
ucp_Thai,
|
||||
ucp_Tibetan,
|
||||
ucp_Myanmar,
|
||||
ucp_Georgian,
|
||||
ucp_Hangul,
|
||||
ucp_Ethiopic,
|
||||
ucp_Cherokee,
|
||||
ucp_Runic,
|
||||
ucp_Mongolian,
|
||||
ucp_Hiragana,
|
||||
ucp_Katakana,
|
||||
ucp_Bopomofo,
|
||||
ucp_Han,
|
||||
ucp_Yi,
|
||||
ucp_Gothic,
|
||||
ucp_Tagalog,
|
||||
ucp_Hanunoo,
|
||||
ucp_Buhid,
|
||||
@@ -248,21 +261,33 @@ enum {
|
||||
ucp_Limbu,
|
||||
ucp_Tai_Le,
|
||||
ucp_Linear_B,
|
||||
ucp_Shavian,
|
||||
ucp_Cypriot,
|
||||
ucp_Buginese,
|
||||
ucp_Coptic,
|
||||
ucp_Glagolitic,
|
||||
ucp_Tifinagh,
|
||||
ucp_Syloti_Nagri,
|
||||
ucp_Phags_Pa,
|
||||
ucp_Nko,
|
||||
ucp_Kayah_Li,
|
||||
ucp_Lycian,
|
||||
ucp_Carian,
|
||||
ucp_Lydian,
|
||||
ucp_Avestan,
|
||||
ucp_Samaritan,
|
||||
ucp_Lisu,
|
||||
ucp_Javanese,
|
||||
ucp_Old_Turkic,
|
||||
ucp_Kaithi,
|
||||
ucp_Mandaic,
|
||||
ucp_Chakma,
|
||||
ucp_Meroitic_Hieroglyphs,
|
||||
ucp_Sharada,
|
||||
ucp_Takri,
|
||||
ucp_Caucasian_Albanian,
|
||||
ucp_Duployan,
|
||||
ucp_Elbasan,
|
||||
ucp_Grantha,
|
||||
ucp_Khojki,
|
||||
ucp_Linear_A,
|
||||
@@ -274,7 +299,10 @@ enum {
|
||||
ucp_Khudawadi,
|
||||
ucp_Tirhuta,
|
||||
ucp_Multani,
|
||||
ucp_Old_Hungarian,
|
||||
ucp_Adlam,
|
||||
ucp_Osage,
|
||||
ucp_Tangut,
|
||||
ucp_Masaram_Gondi,
|
||||
ucp_Dogra,
|
||||
ucp_Gunjala_Gondi,
|
||||
@@ -284,31 +312,28 @@ enum {
|
||||
ucp_Yezidi,
|
||||
ucp_Cypro_Minoan,
|
||||
ucp_Old_Uyghur,
|
||||
ucp_Toto,
|
||||
ucp_Garay,
|
||||
ucp_Gurung_Khema,
|
||||
ucp_Ol_Onal,
|
||||
ucp_Sunuwar,
|
||||
ucp_Todhri,
|
||||
ucp_Tulu_Tigalari,
|
||||
|
||||
/* Scripts which has no characters in other scripts. */
|
||||
ucp_Unknown,
|
||||
ucp_Common,
|
||||
ucp_Armenian,
|
||||
ucp_Hebrew,
|
||||
ucp_Thai,
|
||||
ucp_Lao,
|
||||
ucp_Tibetan,
|
||||
ucp_Ethiopic,
|
||||
ucp_Cherokee,
|
||||
ucp_Canadian_Aboriginal,
|
||||
ucp_Ogham,
|
||||
ucp_Runic,
|
||||
ucp_Khmer,
|
||||
ucp_Old_Italic,
|
||||
ucp_Gothic,
|
||||
ucp_Deseret,
|
||||
ucp_Inherited,
|
||||
ucp_Ugaritic,
|
||||
ucp_Shavian,
|
||||
ucp_Osmanya,
|
||||
ucp_Braille,
|
||||
ucp_New_Tai_Lue,
|
||||
ucp_Tifinagh,
|
||||
ucp_Old_Persian,
|
||||
ucp_Kharoshthi,
|
||||
ucp_Balinese,
|
||||
@@ -320,32 +345,22 @@ enum {
|
||||
ucp_Vai,
|
||||
ucp_Saurashtra,
|
||||
ucp_Rejang,
|
||||
ucp_Lycian,
|
||||
ucp_Carian,
|
||||
ucp_Lydian,
|
||||
ucp_Cham,
|
||||
ucp_Tai_Tham,
|
||||
ucp_Tai_Viet,
|
||||
ucp_Avestan,
|
||||
ucp_Egyptian_Hieroglyphs,
|
||||
ucp_Samaritan,
|
||||
ucp_Lisu,
|
||||
ucp_Bamum,
|
||||
ucp_Meetei_Mayek,
|
||||
ucp_Imperial_Aramaic,
|
||||
ucp_Old_South_Arabian,
|
||||
ucp_Inscriptional_Parthian,
|
||||
ucp_Inscriptional_Pahlavi,
|
||||
ucp_Old_Turkic,
|
||||
ucp_Batak,
|
||||
ucp_Brahmi,
|
||||
ucp_Meroitic_Cursive,
|
||||
ucp_Meroitic_Hieroglyphs,
|
||||
ucp_Miao,
|
||||
ucp_Sora_Sompeng,
|
||||
ucp_Caucasian_Albanian,
|
||||
ucp_Bassa_Vah,
|
||||
ucp_Elbasan,
|
||||
ucp_Pahawh_Hmong,
|
||||
ucp_Mende_Kikakui,
|
||||
ucp_Mro,
|
||||
@@ -358,13 +373,10 @@ enum {
|
||||
ucp_Ahom,
|
||||
ucp_Anatolian_Hieroglyphs,
|
||||
ucp_Hatran,
|
||||
ucp_Old_Hungarian,
|
||||
ucp_SignWriting,
|
||||
ucp_Bhaiksuki,
|
||||
ucp_Marchen,
|
||||
ucp_Newa,
|
||||
ucp_Osage,
|
||||
ucp_Tangut,
|
||||
ucp_Nushu,
|
||||
ucp_Soyombo,
|
||||
ucp_Zanabazar_Square,
|
||||
@@ -378,10 +390,10 @@ enum {
|
||||
ucp_Dives_Akuru,
|
||||
ucp_Khitan_Small_Script,
|
||||
ucp_Tangsa,
|
||||
ucp_Toto,
|
||||
ucp_Vithkuqi,
|
||||
ucp_Kawi,
|
||||
ucp_Nag_Mundari,
|
||||
ucp_Kirat_Rai,
|
||||
|
||||
/* This must be last */
|
||||
ucp_Script_Count
|
||||
@@ -389,7 +401,7 @@ enum {
|
||||
|
||||
/* Size of entries in ucd_script_sets[] */
|
||||
|
||||
#define ucd_script_sets_item_size 3
|
||||
#define ucd_script_sets_item_size 4
|
||||
|
||||
#endif /* PCRE2_UCP_H_IDEMPOTENT_GUARD */
|
||||
|
||||
|
||||
@@ -199,6 +199,8 @@ the "loose matching" rules that Unicode advises and Perl uses. */
|
||||
#define STRING_extendedpictographic0 STR_e STR_x STR_t STR_e STR_n STR_d STR_e STR_d STR_p STR_i STR_c STR_t STR_o STR_g STR_r STR_a STR_p STR_h STR_i STR_c "\0"
|
||||
#define STRING_extender0 STR_e STR_x STR_t STR_e STR_n STR_d STR_e STR_r "\0"
|
||||
#define STRING_extpict0 STR_e STR_x STR_t STR_p STR_i STR_c STR_t "\0"
|
||||
#define STRING_gara0 STR_g STR_a STR_r STR_a "\0"
|
||||
#define STRING_garay0 STR_g STR_a STR_r STR_a STR_y "\0"
|
||||
#define STRING_geor0 STR_g STR_e STR_o STR_r "\0"
|
||||
#define STRING_georgian0 STR_g STR_e STR_o STR_r STR_g STR_i STR_a STR_n "\0"
|
||||
#define STRING_glag0 STR_g STR_l STR_a STR_g "\0"
|
||||
@@ -219,9 +221,11 @@ the "loose matching" rules that Unicode advises and Perl uses. */
|
||||
#define STRING_grlink0 STR_g STR_r STR_l STR_i STR_n STR_k "\0"
|
||||
#define STRING_gujarati0 STR_g STR_u STR_j STR_a STR_r STR_a STR_t STR_i "\0"
|
||||
#define STRING_gujr0 STR_g STR_u STR_j STR_r "\0"
|
||||
#define STRING_gukh0 STR_g STR_u STR_k STR_h "\0"
|
||||
#define STRING_gunjalagondi0 STR_g STR_u STR_n STR_j STR_a STR_l STR_a STR_g STR_o STR_n STR_d STR_i "\0"
|
||||
#define STRING_gurmukhi0 STR_g STR_u STR_r STR_m STR_u STR_k STR_h STR_i "\0"
|
||||
#define STRING_guru0 STR_g STR_u STR_r STR_u "\0"
|
||||
#define STRING_gurungkhema0 STR_g STR_u STR_r STR_u STR_n STR_g STR_k STR_h STR_e STR_m STR_a "\0"
|
||||
#define STRING_han0 STR_h STR_a STR_n "\0"
|
||||
#define STRING_hang0 STR_h STR_a STR_n STR_g "\0"
|
||||
#define STRING_hangul0 STR_h STR_a STR_n STR_g STR_u STR_l "\0"
|
||||
@@ -242,6 +246,8 @@ the "loose matching" rules that Unicode advises and Perl uses. */
|
||||
#define STRING_hmnp0 STR_h STR_m STR_n STR_p "\0"
|
||||
#define STRING_hung0 STR_h STR_u STR_n STR_g "\0"
|
||||
#define STRING_idc0 STR_i STR_d STR_c "\0"
|
||||
#define STRING_idcompatmathcontinue0 STR_i STR_d STR_c STR_o STR_m STR_p STR_a STR_t STR_m STR_a STR_t STR_h STR_c STR_o STR_n STR_t STR_i STR_n STR_u STR_e "\0"
|
||||
#define STRING_idcompatmathstart0 STR_i STR_d STR_c STR_o STR_m STR_p STR_a STR_t STR_m STR_a STR_t STR_h STR_s STR_t STR_a STR_r STR_t "\0"
|
||||
#define STRING_idcontinue0 STR_i STR_d STR_c STR_o STR_n STR_t STR_i STR_n STR_u STR_e "\0"
|
||||
#define STRING_ideo0 STR_i STR_d STR_e STR_o "\0"
|
||||
#define STRING_ideographic0 STR_i STR_d STR_e STR_o STR_g STR_r STR_a STR_p STR_h STR_i STR_c "\0"
|
||||
@@ -251,7 +257,10 @@ the "loose matching" rules that Unicode advises and Perl uses. */
|
||||
#define STRING_idst0 STR_i STR_d STR_s STR_t "\0"
|
||||
#define STRING_idstart0 STR_i STR_d STR_s STR_t STR_a STR_r STR_t "\0"
|
||||
#define STRING_idstrinaryoperator0 STR_i STR_d STR_s STR_t STR_r STR_i STR_n STR_a STR_r STR_y STR_o STR_p STR_e STR_r STR_a STR_t STR_o STR_r "\0"
|
||||
#define STRING_idsu0 STR_i STR_d STR_s STR_u "\0"
|
||||
#define STRING_idsunaryoperator0 STR_i STR_d STR_s STR_u STR_n STR_a STR_r STR_y STR_o STR_p STR_e STR_r STR_a STR_t STR_o STR_r "\0"
|
||||
#define STRING_imperialaramaic0 STR_i STR_m STR_p STR_e STR_r STR_i STR_a STR_l STR_a STR_r STR_a STR_m STR_a STR_i STR_c "\0"
|
||||
#define STRING_incb0 STR_i STR_n STR_c STR_b "\0"
|
||||
#define STRING_inherited0 STR_i STR_n STR_h STR_e STR_r STR_i STR_t STR_e STR_d "\0"
|
||||
#define STRING_inscriptionalpahlavi0 STR_i STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_p STR_a STR_h STR_l STR_a STR_v STR_i "\0"
|
||||
#define STRING_inscriptionalparthian0 STR_i STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_p STR_a STR_r STR_t STR_h STR_i STR_a STR_n "\0"
|
||||
@@ -275,8 +284,10 @@ the "loose matching" rules that Unicode advises and Perl uses. */
|
||||
#define STRING_khoj0 STR_k STR_h STR_o STR_j "\0"
|
||||
#define STRING_khojki0 STR_k STR_h STR_o STR_j STR_k STR_i "\0"
|
||||
#define STRING_khudawadi0 STR_k STR_h STR_u STR_d STR_a STR_w STR_a STR_d STR_i "\0"
|
||||
#define STRING_kiratrai0 STR_k STR_i STR_r STR_a STR_t STR_r STR_a STR_i "\0"
|
||||
#define STRING_kits0 STR_k STR_i STR_t STR_s "\0"
|
||||
#define STRING_knda0 STR_k STR_n STR_d STR_a "\0"
|
||||
#define STRING_krai0 STR_k STR_r STR_a STR_i "\0"
|
||||
#define STRING_kthi0 STR_k STR_t STR_h STR_i "\0"
|
||||
#define STRING_l0 STR_l "\0"
|
||||
#define STRING_l_AMPERSAND0 STR_l STR_AMPERSAND "\0"
|
||||
@@ -323,6 +334,7 @@ the "loose matching" rules that Unicode advises and Perl uses. */
|
||||
#define STRING_masaramgondi0 STR_m STR_a STR_s STR_a STR_r STR_a STR_m STR_g STR_o STR_n STR_d STR_i "\0"
|
||||
#define STRING_math0 STR_m STR_a STR_t STR_h "\0"
|
||||
#define STRING_mc0 STR_m STR_c "\0"
|
||||
#define STRING_mcm0 STR_m STR_c STR_m "\0"
|
||||
#define STRING_me0 STR_m STR_e "\0"
|
||||
#define STRING_medefaidrin0 STR_m STR_e STR_d STR_e STR_f STR_a STR_i STR_d STR_r STR_i STR_n "\0"
|
||||
#define STRING_medf0 STR_m STR_e STR_d STR_f "\0"
|
||||
@@ -337,6 +349,7 @@ the "loose matching" rules that Unicode advises and Perl uses. */
|
||||
#define STRING_mlym0 STR_m STR_l STR_y STR_m "\0"
|
||||
#define STRING_mn0 STR_m STR_n "\0"
|
||||
#define STRING_modi0 STR_m STR_o STR_d STR_i "\0"
|
||||
#define STRING_modifiercombiningmark0 STR_m STR_o STR_d STR_i STR_f STR_i STR_e STR_r STR_c STR_o STR_m STR_b STR_i STR_n STR_i STR_n STR_g STR_m STR_a STR_r STR_k "\0"
|
||||
#define STRING_mong0 STR_m STR_o STR_n STR_g "\0"
|
||||
#define STRING_mongolian0 STR_m STR_o STR_n STR_g STR_o STR_l STR_i STR_a STR_n "\0"
|
||||
#define STRING_mro0 STR_m STR_r STR_o "\0"
|
||||
@@ -379,6 +392,8 @@ the "loose matching" rules that Unicode advises and Perl uses. */
|
||||
#define STRING_oldsoutharabian0 STR_o STR_l STR_d STR_s STR_o STR_u STR_t STR_h STR_a STR_r STR_a STR_b STR_i STR_a STR_n "\0"
|
||||
#define STRING_oldturkic0 STR_o STR_l STR_d STR_t STR_u STR_r STR_k STR_i STR_c "\0"
|
||||
#define STRING_olduyghur0 STR_o STR_l STR_d STR_u STR_y STR_g STR_h STR_u STR_r "\0"
|
||||
#define STRING_olonal0 STR_o STR_l STR_o STR_n STR_a STR_l "\0"
|
||||
#define STRING_onao0 STR_o STR_n STR_a STR_o "\0"
|
||||
#define STRING_oriya0 STR_o STR_r STR_i STR_y STR_a "\0"
|
||||
#define STRING_orkh0 STR_o STR_r STR_k STR_h "\0"
|
||||
#define STRING_orya0 STR_o STR_r STR_y STR_a "\0"
|
||||
@@ -463,6 +478,8 @@ the "loose matching" rules that Unicode advises and Perl uses. */
|
||||
#define STRING_sterm0 STR_s STR_t STR_e STR_r STR_m "\0"
|
||||
#define STRING_sund0 STR_s STR_u STR_n STR_d "\0"
|
||||
#define STRING_sundanese0 STR_s STR_u STR_n STR_d STR_a STR_n STR_e STR_s STR_e "\0"
|
||||
#define STRING_sunu0 STR_s STR_u STR_n STR_u "\0"
|
||||
#define STRING_sunuwar0 STR_s STR_u STR_n STR_u STR_w STR_a STR_r "\0"
|
||||
#define STRING_sylo0 STR_s STR_y STR_l STR_o "\0"
|
||||
#define STRING_sylotinagri0 STR_s STR_y STR_l STR_o STR_t STR_i STR_n STR_a STR_g STR_r STR_i "\0"
|
||||
#define STRING_syrc0 STR_s STR_y STR_r STR_c "\0"
|
||||
@@ -498,7 +515,11 @@ the "loose matching" rules that Unicode advises and Perl uses. */
|
||||
#define STRING_tirh0 STR_t STR_i STR_r STR_h "\0"
|
||||
#define STRING_tirhuta0 STR_t STR_i STR_r STR_h STR_u STR_t STR_a "\0"
|
||||
#define STRING_tnsa0 STR_t STR_n STR_s STR_a "\0"
|
||||
#define STRING_todhri0 STR_t STR_o STR_d STR_h STR_r STR_i "\0"
|
||||
#define STRING_todr0 STR_t STR_o STR_d STR_r "\0"
|
||||
#define STRING_toto0 STR_t STR_o STR_t STR_o "\0"
|
||||
#define STRING_tulutigalari0 STR_t STR_u STR_l STR_u STR_t STR_i STR_g STR_a STR_l STR_a STR_r STR_i "\0"
|
||||
#define STRING_tutg0 STR_t STR_u STR_t STR_g "\0"
|
||||
#define STRING_ugar0 STR_u STR_g STR_a STR_r "\0"
|
||||
#define STRING_ugaritic0 STR_u STR_g STR_a STR_r STR_i STR_t STR_i STR_c "\0"
|
||||
#define STRING_uideo0 STR_u STR_i STR_d STR_e STR_o "\0"
|
||||
@@ -690,6 +711,8 @@ const char PRIV(utt_names)[] =
|
||||
STRING_extendedpictographic0
|
||||
STRING_extender0
|
||||
STRING_extpict0
|
||||
STRING_gara0
|
||||
STRING_garay0
|
||||
STRING_geor0
|
||||
STRING_georgian0
|
||||
STRING_glag0
|
||||
@@ -710,9 +733,11 @@ const char PRIV(utt_names)[] =
|
||||
STRING_grlink0
|
||||
STRING_gujarati0
|
||||
STRING_gujr0
|
||||
STRING_gukh0
|
||||
STRING_gunjalagondi0
|
||||
STRING_gurmukhi0
|
||||
STRING_guru0
|
||||
STRING_gurungkhema0
|
||||
STRING_han0
|
||||
STRING_hang0
|
||||
STRING_hangul0
|
||||
@@ -733,6 +758,8 @@ const char PRIV(utt_names)[] =
|
||||
STRING_hmnp0
|
||||
STRING_hung0
|
||||
STRING_idc0
|
||||
STRING_idcompatmathcontinue0
|
||||
STRING_idcompatmathstart0
|
||||
STRING_idcontinue0
|
||||
STRING_ideo0
|
||||
STRING_ideographic0
|
||||
@@ -742,7 +769,10 @@ const char PRIV(utt_names)[] =
|
||||
STRING_idst0
|
||||
STRING_idstart0
|
||||
STRING_idstrinaryoperator0
|
||||
STRING_idsu0
|
||||
STRING_idsunaryoperator0
|
||||
STRING_imperialaramaic0
|
||||
STRING_incb0
|
||||
STRING_inherited0
|
||||
STRING_inscriptionalpahlavi0
|
||||
STRING_inscriptionalparthian0
|
||||
@@ -766,8 +796,10 @@ const char PRIV(utt_names)[] =
|
||||
STRING_khoj0
|
||||
STRING_khojki0
|
||||
STRING_khudawadi0
|
||||
STRING_kiratrai0
|
||||
STRING_kits0
|
||||
STRING_knda0
|
||||
STRING_krai0
|
||||
STRING_kthi0
|
||||
STRING_l0
|
||||
STRING_l_AMPERSAND0
|
||||
@@ -814,6 +846,7 @@ const char PRIV(utt_names)[] =
|
||||
STRING_masaramgondi0
|
||||
STRING_math0
|
||||
STRING_mc0
|
||||
STRING_mcm0
|
||||
STRING_me0
|
||||
STRING_medefaidrin0
|
||||
STRING_medf0
|
||||
@@ -828,6 +861,7 @@ const char PRIV(utt_names)[] =
|
||||
STRING_mlym0
|
||||
STRING_mn0
|
||||
STRING_modi0
|
||||
STRING_modifiercombiningmark0
|
||||
STRING_mong0
|
||||
STRING_mongolian0
|
||||
STRING_mro0
|
||||
@@ -870,6 +904,8 @@ const char PRIV(utt_names)[] =
|
||||
STRING_oldsoutharabian0
|
||||
STRING_oldturkic0
|
||||
STRING_olduyghur0
|
||||
STRING_olonal0
|
||||
STRING_onao0
|
||||
STRING_oriya0
|
||||
STRING_orkh0
|
||||
STRING_orya0
|
||||
@@ -954,6 +990,8 @@ const char PRIV(utt_names)[] =
|
||||
STRING_sterm0
|
||||
STRING_sund0
|
||||
STRING_sundanese0
|
||||
STRING_sunu0
|
||||
STRING_sunuwar0
|
||||
STRING_sylo0
|
||||
STRING_sylotinagri0
|
||||
STRING_syrc0
|
||||
@@ -989,7 +1027,11 @@ const char PRIV(utt_names)[] =
|
||||
STRING_tirh0
|
||||
STRING_tirhuta0
|
||||
STRING_tnsa0
|
||||
STRING_todhri0
|
||||
STRING_todr0
|
||||
STRING_toto0
|
||||
STRING_tulutigalari0
|
||||
STRING_tutg0
|
||||
STRING_ugar0
|
||||
STRING_ugaritic0
|
||||
STRING_uideo0
|
||||
@@ -1037,7 +1079,7 @@ const char PRIV(utt_names)[] =
|
||||
const ucp_type_table PRIV(utt)[] = {
|
||||
{ 0, PT_SCX, ucp_Adlam },
|
||||
{ 6, PT_SCX, ucp_Adlam },
|
||||
{ 11, PT_SC, ucp_Caucasian_Albanian },
|
||||
{ 11, PT_SCX, ucp_Caucasian_Albanian },
|
||||
{ 16, PT_BOOL, ucp_ASCII_Hex_Digit },
|
||||
{ 21, PT_SC, ucp_Ahom },
|
||||
{ 26, PT_BOOL, ucp_Alphabetic },
|
||||
@@ -1046,13 +1088,13 @@ const ucp_type_table PRIV(utt)[] = {
|
||||
{ 64, PT_ANY, 0 },
|
||||
{ 68, PT_SCX, ucp_Arabic },
|
||||
{ 73, PT_SCX, ucp_Arabic },
|
||||
{ 80, PT_SC, ucp_Armenian },
|
||||
{ 80, PT_SCX, ucp_Armenian },
|
||||
{ 89, PT_SC, ucp_Imperial_Aramaic },
|
||||
{ 94, PT_SC, ucp_Armenian },
|
||||
{ 94, PT_SCX, ucp_Armenian },
|
||||
{ 99, PT_BOOL, ucp_ASCII },
|
||||
{ 105, PT_BOOL, ucp_ASCII_Hex_Digit },
|
||||
{ 119, PT_SC, ucp_Avestan },
|
||||
{ 127, PT_SC, ucp_Avestan },
|
||||
{ 119, PT_SCX, ucp_Avestan },
|
||||
{ 127, PT_SCX, ucp_Avestan },
|
||||
{ 132, PT_SC, ucp_Balinese },
|
||||
{ 137, PT_SC, ucp_Balinese },
|
||||
{ 146, PT_SC, ucp_Bamum },
|
||||
@@ -1106,11 +1148,11 @@ const ucp_type_table PRIV(utt)[] = {
|
||||
{ 480, PT_SCX, ucp_Chakma },
|
||||
{ 485, PT_SC, ucp_Canadian_Aboriginal },
|
||||
{ 504, PT_SC, ucp_Canadian_Aboriginal },
|
||||
{ 509, PT_SC, ucp_Carian },
|
||||
{ 514, PT_SC, ucp_Carian },
|
||||
{ 509, PT_SCX, ucp_Carian },
|
||||
{ 514, PT_SCX, ucp_Carian },
|
||||
{ 521, PT_BOOL, ucp_Cased },
|
||||
{ 527, PT_BOOL, ucp_Case_Ignorable },
|
||||
{ 541, PT_SC, ucp_Caucasian_Albanian },
|
||||
{ 541, PT_SCX, ucp_Caucasian_Albanian },
|
||||
{ 559, PT_PC, ucp_Cc },
|
||||
{ 562, PT_PC, ucp_Cf },
|
||||
{ 565, PT_SCX, ucp_Chakma },
|
||||
@@ -1120,8 +1162,8 @@ const ucp_type_table PRIV(utt)[] = {
|
||||
{ 621, PT_BOOL, ucp_Changes_When_Lowercased },
|
||||
{ 643, PT_BOOL, ucp_Changes_When_Titlecased },
|
||||
{ 665, PT_BOOL, ucp_Changes_When_Uppercased },
|
||||
{ 687, PT_SC, ucp_Cherokee },
|
||||
{ 692, PT_SC, ucp_Cherokee },
|
||||
{ 687, PT_SCX, ucp_Cherokee },
|
||||
{ 692, PT_SCX, ucp_Cherokee },
|
||||
{ 701, PT_SC, ucp_Chorasmian },
|
||||
{ 712, PT_SC, ucp_Chorasmian },
|
||||
{ 717, PT_BOOL, ucp_Case_Ignorable },
|
||||
@@ -1164,8 +1206,8 @@ const ucp_type_table PRIV(utt)[] = {
|
||||
{ 963, PT_BOOL, ucp_Emoji_Component },
|
||||
{ 969, PT_SC, ucp_Egyptian_Hieroglyphs },
|
||||
{ 974, PT_SC, ucp_Egyptian_Hieroglyphs },
|
||||
{ 994, PT_SC, ucp_Elbasan },
|
||||
{ 999, PT_SC, ucp_Elbasan },
|
||||
{ 994, PT_SCX, ucp_Elbasan },
|
||||
{ 999, PT_SCX, ucp_Elbasan },
|
||||
{ 1007, PT_SC, ucp_Elymaic },
|
||||
{ 1012, PT_SC, ucp_Elymaic },
|
||||
{ 1020, PT_BOOL, ucp_Emoji_Modifier },
|
||||
@@ -1175,355 +1217,376 @@ const ucp_type_table PRIV(utt)[] = {
|
||||
{ 1060, PT_BOOL, ucp_Emoji_Modifier_Base },
|
||||
{ 1078, PT_BOOL, ucp_Emoji_Presentation },
|
||||
{ 1096, PT_BOOL, ucp_Emoji_Presentation },
|
||||
{ 1102, PT_SC, ucp_Ethiopic },
|
||||
{ 1107, PT_SC, ucp_Ethiopic },
|
||||
{ 1102, PT_SCX, ucp_Ethiopic },
|
||||
{ 1107, PT_SCX, ucp_Ethiopic },
|
||||
{ 1116, PT_BOOL, ucp_Extender },
|
||||
{ 1120, PT_BOOL, ucp_Extended_Pictographic },
|
||||
{ 1141, PT_BOOL, ucp_Extender },
|
||||
{ 1150, PT_BOOL, ucp_Extended_Pictographic },
|
||||
{ 1158, PT_SCX, ucp_Georgian },
|
||||
{ 1163, PT_SCX, ucp_Georgian },
|
||||
{ 1172, PT_SCX, ucp_Glagolitic },
|
||||
{ 1177, PT_SCX, ucp_Glagolitic },
|
||||
{ 1188, PT_SCX, ucp_Gunjala_Gondi },
|
||||
{ 1193, PT_SCX, ucp_Masaram_Gondi },
|
||||
{ 1198, PT_SC, ucp_Gothic },
|
||||
{ 1203, PT_SC, ucp_Gothic },
|
||||
{ 1210, PT_SCX, ucp_Grantha },
|
||||
{ 1215, PT_SCX, ucp_Grantha },
|
||||
{ 1223, PT_BOOL, ucp_Grapheme_Base },
|
||||
{ 1236, PT_BOOL, ucp_Grapheme_Extend },
|
||||
{ 1251, PT_BOOL, ucp_Grapheme_Link },
|
||||
{ 1264, PT_BOOL, ucp_Grapheme_Base },
|
||||
{ 1271, PT_SCX, ucp_Greek },
|
||||
{ 1277, PT_SCX, ucp_Greek },
|
||||
{ 1282, PT_BOOL, ucp_Grapheme_Extend },
|
||||
{ 1288, PT_BOOL, ucp_Grapheme_Link },
|
||||
{ 1295, PT_SCX, ucp_Gujarati },
|
||||
{ 1304, PT_SCX, ucp_Gujarati },
|
||||
{ 1309, PT_SCX, ucp_Gunjala_Gondi },
|
||||
{ 1322, PT_SCX, ucp_Gurmukhi },
|
||||
{ 1331, PT_SCX, ucp_Gurmukhi },
|
||||
{ 1336, PT_SCX, ucp_Han },
|
||||
{ 1340, PT_SCX, ucp_Hangul },
|
||||
{ 1345, PT_SCX, ucp_Hangul },
|
||||
{ 1352, PT_SCX, ucp_Han },
|
||||
{ 1357, PT_SCX, ucp_Hanifi_Rohingya },
|
||||
{ 1372, PT_SCX, ucp_Hanunoo },
|
||||
{ 1377, PT_SCX, ucp_Hanunoo },
|
||||
{ 1385, PT_SC, ucp_Hatran },
|
||||
{ 1390, PT_SC, ucp_Hatran },
|
||||
{ 1397, PT_SC, ucp_Hebrew },
|
||||
{ 1402, PT_SC, ucp_Hebrew },
|
||||
{ 1409, PT_BOOL, ucp_Hex_Digit },
|
||||
{ 1413, PT_BOOL, ucp_Hex_Digit },
|
||||
{ 1422, PT_SCX, ucp_Hiragana },
|
||||
{ 1427, PT_SCX, ucp_Hiragana },
|
||||
{ 1436, PT_SC, ucp_Anatolian_Hieroglyphs },
|
||||
{ 1441, PT_SC, ucp_Pahawh_Hmong },
|
||||
{ 1446, PT_SC, ucp_Nyiakeng_Puachue_Hmong },
|
||||
{ 1451, PT_SC, ucp_Old_Hungarian },
|
||||
{ 1456, PT_BOOL, ucp_ID_Continue },
|
||||
{ 1460, PT_BOOL, ucp_ID_Continue },
|
||||
{ 1471, PT_BOOL, ucp_Ideographic },
|
||||
{ 1476, PT_BOOL, ucp_Ideographic },
|
||||
{ 1488, PT_BOOL, ucp_ID_Start },
|
||||
{ 1492, PT_BOOL, ucp_IDS_Binary_Operator },
|
||||
{ 1497, PT_BOOL, ucp_IDS_Binary_Operator },
|
||||
{ 1515, PT_BOOL, ucp_IDS_Trinary_Operator },
|
||||
{ 1520, PT_BOOL, ucp_ID_Start },
|
||||
{ 1528, PT_BOOL, ucp_IDS_Trinary_Operator },
|
||||
{ 1547, PT_SC, ucp_Imperial_Aramaic },
|
||||
{ 1563, PT_SC, ucp_Inherited },
|
||||
{ 1573, PT_SC, ucp_Inscriptional_Pahlavi },
|
||||
{ 1594, PT_SC, ucp_Inscriptional_Parthian },
|
||||
{ 1616, PT_SC, ucp_Old_Italic },
|
||||
{ 1621, PT_SCX, ucp_Javanese },
|
||||
{ 1626, PT_SCX, ucp_Javanese },
|
||||
{ 1635, PT_BOOL, ucp_Join_Control },
|
||||
{ 1641, PT_BOOL, ucp_Join_Control },
|
||||
{ 1653, PT_SCX, ucp_Kaithi },
|
||||
{ 1660, PT_SCX, ucp_Kayah_Li },
|
||||
{ 1665, PT_SCX, ucp_Katakana },
|
||||
{ 1670, PT_SCX, ucp_Kannada },
|
||||
{ 1678, PT_SCX, ucp_Katakana },
|
||||
{ 1687, PT_SC, ucp_Kawi },
|
||||
{ 1692, PT_SCX, ucp_Kayah_Li },
|
||||
{ 1700, PT_SC, ucp_Kharoshthi },
|
||||
{ 1705, PT_SC, ucp_Kharoshthi },
|
||||
{ 1716, PT_SC, ucp_Khitan_Small_Script },
|
||||
{ 1734, PT_SC, ucp_Khmer },
|
||||
{ 1740, PT_SC, ucp_Khmer },
|
||||
{ 1745, PT_SCX, ucp_Khojki },
|
||||
{ 1750, PT_SCX, ucp_Khojki },
|
||||
{ 1757, PT_SCX, ucp_Khudawadi },
|
||||
{ 1767, PT_SC, ucp_Khitan_Small_Script },
|
||||
{ 1772, PT_SCX, ucp_Kannada },
|
||||
{ 1777, PT_SCX, ucp_Kaithi },
|
||||
{ 1782, PT_GC, ucp_L },
|
||||
{ 1784, PT_LAMP, 0 },
|
||||
{ 1787, PT_SC, ucp_Tai_Tham },
|
||||
{ 1792, PT_SC, ucp_Lao },
|
||||
{ 1796, PT_SC, ucp_Lao },
|
||||
{ 1801, PT_SCX, ucp_Latin },
|
||||
{ 1807, PT_SCX, ucp_Latin },
|
||||
{ 1812, PT_LAMP, 0 },
|
||||
{ 1815, PT_SC, ucp_Lepcha },
|
||||
{ 1820, PT_SC, ucp_Lepcha },
|
||||
{ 1827, PT_SCX, ucp_Limbu },
|
||||
{ 1832, PT_SCX, ucp_Limbu },
|
||||
{ 1838, PT_SCX, ucp_Linear_A },
|
||||
{ 1843, PT_SCX, ucp_Linear_B },
|
||||
{ 1848, PT_SCX, ucp_Linear_A },
|
||||
{ 1856, PT_SCX, ucp_Linear_B },
|
||||
{ 1864, PT_SC, ucp_Lisu },
|
||||
{ 1869, PT_PC, ucp_Ll },
|
||||
{ 1872, PT_PC, ucp_Lm },
|
||||
{ 1875, PT_PC, ucp_Lo },
|
||||
{ 1878, PT_BOOL, ucp_Logical_Order_Exception },
|
||||
{ 1882, PT_BOOL, ucp_Logical_Order_Exception },
|
||||
{ 1904, PT_BOOL, ucp_Lowercase },
|
||||
{ 1910, PT_BOOL, ucp_Lowercase },
|
||||
{ 1920, PT_PC, ucp_Lt },
|
||||
{ 1923, PT_PC, ucp_Lu },
|
||||
{ 1926, PT_SC, ucp_Lycian },
|
||||
{ 1931, PT_SC, ucp_Lycian },
|
||||
{ 1938, PT_SC, ucp_Lydian },
|
||||
{ 1943, PT_SC, ucp_Lydian },
|
||||
{ 1950, PT_GC, ucp_M },
|
||||
{ 1952, PT_SCX, ucp_Mahajani },
|
||||
{ 1961, PT_SCX, ucp_Mahajani },
|
||||
{ 1966, PT_SC, ucp_Makasar },
|
||||
{ 1971, PT_SC, ucp_Makasar },
|
||||
{ 1979, PT_SCX, ucp_Malayalam },
|
||||
{ 1989, PT_SCX, ucp_Mandaic },
|
||||
{ 1994, PT_SCX, ucp_Mandaic },
|
||||
{ 2002, PT_SCX, ucp_Manichaean },
|
||||
{ 2007, PT_SCX, ucp_Manichaean },
|
||||
{ 2018, PT_SC, ucp_Marchen },
|
||||
{ 2023, PT_SC, ucp_Marchen },
|
||||
{ 2031, PT_SCX, ucp_Masaram_Gondi },
|
||||
{ 2044, PT_BOOL, ucp_Math },
|
||||
{ 2049, PT_PC, ucp_Mc },
|
||||
{ 2052, PT_PC, ucp_Me },
|
||||
{ 2055, PT_SC, ucp_Medefaidrin },
|
||||
{ 2067, PT_SC, ucp_Medefaidrin },
|
||||
{ 2072, PT_SC, ucp_Meetei_Mayek },
|
||||
{ 2084, PT_SC, ucp_Mende_Kikakui },
|
||||
{ 2089, PT_SC, ucp_Mende_Kikakui },
|
||||
{ 2102, PT_SC, ucp_Meroitic_Cursive },
|
||||
{ 2107, PT_SC, ucp_Meroitic_Hieroglyphs },
|
||||
{ 2112, PT_SC, ucp_Meroitic_Cursive },
|
||||
{ 2128, PT_SC, ucp_Meroitic_Hieroglyphs },
|
||||
{ 2148, PT_SC, ucp_Miao },
|
||||
{ 2153, PT_SCX, ucp_Malayalam },
|
||||
{ 2158, PT_PC, ucp_Mn },
|
||||
{ 2161, PT_SCX, ucp_Modi },
|
||||
{ 2166, PT_SCX, ucp_Mongolian },
|
||||
{ 2171, PT_SCX, ucp_Mongolian },
|
||||
{ 2181, PT_SC, ucp_Mro },
|
||||
{ 2185, PT_SC, ucp_Mro },
|
||||
{ 2190, PT_SC, ucp_Meetei_Mayek },
|
||||
{ 2195, PT_SCX, ucp_Multani },
|
||||
{ 2200, PT_SCX, ucp_Multani },
|
||||
{ 2208, PT_SCX, ucp_Myanmar },
|
||||
{ 2216, PT_SCX, ucp_Myanmar },
|
||||
{ 2221, PT_GC, ucp_N },
|
||||
{ 2223, PT_SC, ucp_Nabataean },
|
||||
{ 2233, PT_SC, ucp_Nag_Mundari },
|
||||
{ 2238, PT_SC, ucp_Nag_Mundari },
|
||||
{ 2249, PT_SCX, ucp_Nandinagari },
|
||||
{ 2254, PT_SCX, ucp_Nandinagari },
|
||||
{ 2266, PT_SC, ucp_Old_North_Arabian },
|
||||
{ 2271, PT_SC, ucp_Nabataean },
|
||||
{ 2276, PT_BOOL, ucp_Noncharacter_Code_Point },
|
||||
{ 2282, PT_PC, ucp_Nd },
|
||||
{ 2285, PT_SC, ucp_Newa },
|
||||
{ 2290, PT_SC, ucp_New_Tai_Lue },
|
||||
{ 2300, PT_SCX, ucp_Nko },
|
||||
{ 2304, PT_SCX, ucp_Nko },
|
||||
{ 2309, PT_PC, ucp_Nl },
|
||||
{ 2312, PT_PC, ucp_No },
|
||||
{ 2315, PT_BOOL, ucp_Noncharacter_Code_Point },
|
||||
{ 2337, PT_SC, ucp_Nushu },
|
||||
{ 2342, PT_SC, ucp_Nushu },
|
||||
{ 2348, PT_SC, ucp_Nyiakeng_Puachue_Hmong },
|
||||
{ 2369, PT_SC, ucp_Ogham },
|
||||
{ 2374, PT_SC, ucp_Ogham },
|
||||
{ 2380, PT_SC, ucp_Ol_Chiki },
|
||||
{ 2388, PT_SC, ucp_Ol_Chiki },
|
||||
{ 2393, PT_SC, ucp_Old_Hungarian },
|
||||
{ 2406, PT_SC, ucp_Old_Italic },
|
||||
{ 2416, PT_SC, ucp_Old_North_Arabian },
|
||||
{ 2432, PT_SCX, ucp_Old_Permic },
|
||||
{ 2442, PT_SC, ucp_Old_Persian },
|
||||
{ 2453, PT_SC, ucp_Old_Sogdian },
|
||||
{ 2464, PT_SC, ucp_Old_South_Arabian },
|
||||
{ 2480, PT_SC, ucp_Old_Turkic },
|
||||
{ 2490, PT_SCX, ucp_Old_Uyghur },
|
||||
{ 2500, PT_SCX, ucp_Oriya },
|
||||
{ 2506, PT_SC, ucp_Old_Turkic },
|
||||
{ 2511, PT_SCX, ucp_Oriya },
|
||||
{ 2516, PT_SC, ucp_Osage },
|
||||
{ 2522, PT_SC, ucp_Osage },
|
||||
{ 2527, PT_SC, ucp_Osmanya },
|
||||
{ 2532, PT_SC, ucp_Osmanya },
|
||||
{ 2540, PT_SCX, ucp_Old_Uyghur },
|
||||
{ 2545, PT_GC, ucp_P },
|
||||
{ 2547, PT_SC, ucp_Pahawh_Hmong },
|
||||
{ 2559, PT_SC, ucp_Palmyrene },
|
||||
{ 2564, PT_SC, ucp_Palmyrene },
|
||||
{ 2574, PT_BOOL, ucp_Pattern_Syntax },
|
||||
{ 2581, PT_BOOL, ucp_Pattern_Syntax },
|
||||
{ 2595, PT_BOOL, ucp_Pattern_White_Space },
|
||||
{ 2613, PT_BOOL, ucp_Pattern_White_Space },
|
||||
{ 2619, PT_SC, ucp_Pau_Cin_Hau },
|
||||
{ 2624, PT_SC, ucp_Pau_Cin_Hau },
|
||||
{ 2634, PT_PC, ucp_Pc },
|
||||
{ 2637, PT_BOOL, ucp_Prepended_Concatenation_Mark },
|
||||
{ 2641, PT_PC, ucp_Pd },
|
||||
{ 2644, PT_PC, ucp_Pe },
|
||||
{ 2647, PT_SCX, ucp_Old_Permic },
|
||||
{ 2652, PT_PC, ucp_Pf },
|
||||
{ 2655, PT_SCX, ucp_Phags_Pa },
|
||||
{ 2660, PT_SCX, ucp_Phags_Pa },
|
||||
{ 2668, PT_SC, ucp_Inscriptional_Pahlavi },
|
||||
{ 2673, PT_SCX, ucp_Psalter_Pahlavi },
|
||||
{ 2678, PT_SC, ucp_Phoenician },
|
||||
{ 2683, PT_SC, ucp_Phoenician },
|
||||
{ 2694, PT_PC, ucp_Pi },
|
||||
{ 2697, PT_SC, ucp_Miao },
|
||||
{ 2702, PT_PC, ucp_Po },
|
||||
{ 2705, PT_BOOL, ucp_Prepended_Concatenation_Mark },
|
||||
{ 2732, PT_SC, ucp_Inscriptional_Parthian },
|
||||
{ 2737, PT_PC, ucp_Ps },
|
||||
{ 2740, PT_SCX, ucp_Psalter_Pahlavi },
|
||||
{ 2755, PT_SCX, ucp_Coptic },
|
||||
{ 2760, PT_SC, ucp_Inherited },
|
||||
{ 2765, PT_BOOL, ucp_Quotation_Mark },
|
||||
{ 2771, PT_BOOL, ucp_Quotation_Mark },
|
||||
{ 2785, PT_BOOL, ucp_Radical },
|
||||
{ 2793, PT_BOOL, ucp_Regional_Indicator },
|
||||
{ 2811, PT_SC, ucp_Rejang },
|
||||
{ 2818, PT_BOOL, ucp_Regional_Indicator },
|
||||
{ 2821, PT_SC, ucp_Rejang },
|
||||
{ 2826, PT_SCX, ucp_Hanifi_Rohingya },
|
||||
{ 2831, PT_SC, ucp_Runic },
|
||||
{ 2837, PT_SC, ucp_Runic },
|
||||
{ 2842, PT_GC, ucp_S },
|
||||
{ 2844, PT_SC, ucp_Samaritan },
|
||||
{ 2854, PT_SC, ucp_Samaritan },
|
||||
{ 2859, PT_SC, ucp_Old_South_Arabian },
|
||||
{ 2864, PT_SC, ucp_Saurashtra },
|
||||
{ 2869, PT_SC, ucp_Saurashtra },
|
||||
{ 2880, PT_PC, ucp_Sc },
|
||||
{ 2883, PT_BOOL, ucp_Soft_Dotted },
|
||||
{ 2886, PT_BOOL, ucp_Sentence_Terminal },
|
||||
{ 2903, PT_SC, ucp_SignWriting },
|
||||
{ 2908, PT_SCX, ucp_Sharada },
|
||||
{ 2916, PT_SC, ucp_Shavian },
|
||||
{ 2924, PT_SC, ucp_Shavian },
|
||||
{ 2929, PT_SCX, ucp_Sharada },
|
||||
{ 2934, PT_SC, ucp_Siddham },
|
||||
{ 2939, PT_SC, ucp_Siddham },
|
||||
{ 2947, PT_SC, ucp_SignWriting },
|
||||
{ 2959, PT_SCX, ucp_Khudawadi },
|
||||
{ 2964, PT_SCX, ucp_Sinhala },
|
||||
{ 2969, PT_SCX, ucp_Sinhala },
|
||||
{ 2977, PT_PC, ucp_Sk },
|
||||
{ 2980, PT_PC, ucp_Sm },
|
||||
{ 2983, PT_PC, ucp_So },
|
||||
{ 2986, PT_BOOL, ucp_Soft_Dotted },
|
||||
{ 2997, PT_SCX, ucp_Sogdian },
|
||||
{ 3002, PT_SCX, ucp_Sogdian },
|
||||
{ 3010, PT_SC, ucp_Old_Sogdian },
|
||||
{ 3015, PT_SC, ucp_Sora_Sompeng },
|
||||
{ 3020, PT_SC, ucp_Sora_Sompeng },
|
||||
{ 3032, PT_SC, ucp_Soyombo },
|
||||
{ 3037, PT_SC, ucp_Soyombo },
|
||||
{ 3045, PT_BOOL, ucp_White_Space },
|
||||
{ 3051, PT_BOOL, ucp_Sentence_Terminal },
|
||||
{ 3057, PT_SC, ucp_Sundanese },
|
||||
{ 3062, PT_SC, ucp_Sundanese },
|
||||
{ 3072, PT_SCX, ucp_Syloti_Nagri },
|
||||
{ 3077, PT_SCX, ucp_Syloti_Nagri },
|
||||
{ 3089, PT_SCX, ucp_Syriac },
|
||||
{ 3094, PT_SCX, ucp_Syriac },
|
||||
{ 3101, PT_SCX, ucp_Tagalog },
|
||||
{ 3109, PT_SCX, ucp_Tagbanwa },
|
||||
{ 3114, PT_SCX, ucp_Tagbanwa },
|
||||
{ 3123, PT_SCX, ucp_Tai_Le },
|
||||
{ 3129, PT_SC, ucp_Tai_Tham },
|
||||
{ 3137, PT_SC, ucp_Tai_Viet },
|
||||
{ 3145, PT_SCX, ucp_Takri },
|
||||
{ 3150, PT_SCX, ucp_Takri },
|
||||
{ 3156, PT_SCX, ucp_Tai_Le },
|
||||
{ 3161, PT_SC, ucp_New_Tai_Lue },
|
||||
{ 3166, PT_SCX, ucp_Tamil },
|
||||
{ 3172, PT_SCX, ucp_Tamil },
|
||||
{ 3177, PT_SC, ucp_Tangut },
|
||||
{ 3182, PT_SC, ucp_Tangsa },
|
||||
{ 3189, PT_SC, ucp_Tangut },
|
||||
{ 3196, PT_SC, ucp_Tai_Viet },
|
||||
{ 3201, PT_SCX, ucp_Telugu },
|
||||
{ 3206, PT_SCX, ucp_Telugu },
|
||||
{ 3213, PT_BOOL, ucp_Terminal_Punctuation },
|
||||
{ 3218, PT_BOOL, ucp_Terminal_Punctuation },
|
||||
{ 3238, PT_SC, ucp_Tifinagh },
|
||||
{ 3243, PT_SCX, ucp_Tagalog },
|
||||
{ 3248, PT_SCX, ucp_Thaana },
|
||||
{ 3253, PT_SCX, ucp_Thaana },
|
||||
{ 3260, PT_SC, ucp_Thai },
|
||||
{ 3265, PT_SC, ucp_Tibetan },
|
||||
{ 3273, PT_SC, ucp_Tibetan },
|
||||
{ 3278, PT_SC, ucp_Tifinagh },
|
||||
{ 3287, PT_SCX, ucp_Tirhuta },
|
||||
{ 3292, PT_SCX, ucp_Tirhuta },
|
||||
{ 3300, PT_SC, ucp_Tangsa },
|
||||
{ 3305, PT_SC, ucp_Toto },
|
||||
{ 3310, PT_SC, ucp_Ugaritic },
|
||||
{ 3315, PT_SC, ucp_Ugaritic },
|
||||
{ 3324, PT_BOOL, ucp_Unified_Ideograph },
|
||||
{ 3330, PT_BOOL, ucp_Unified_Ideograph },
|
||||
{ 3347, PT_SC, ucp_Unknown },
|
||||
{ 3355, PT_BOOL, ucp_Uppercase },
|
||||
{ 3361, PT_BOOL, ucp_Uppercase },
|
||||
{ 3371, PT_SC, ucp_Vai },
|
||||
{ 3375, PT_SC, ucp_Vai },
|
||||
{ 3380, PT_BOOL, ucp_Variation_Selector },
|
||||
{ 3398, PT_SC, ucp_Vithkuqi },
|
||||
{ 3403, PT_SC, ucp_Vithkuqi },
|
||||
{ 3412, PT_BOOL, ucp_Variation_Selector },
|
||||
{ 3415, PT_SC, ucp_Wancho },
|
||||
{ 3422, PT_SC, ucp_Warang_Citi },
|
||||
{ 3427, PT_SC, ucp_Warang_Citi },
|
||||
{ 3438, PT_SC, ucp_Wancho },
|
||||
{ 3443, PT_BOOL, ucp_White_Space },
|
||||
{ 3454, PT_BOOL, ucp_White_Space },
|
||||
{ 3461, PT_ALNUM, 0 },
|
||||
{ 3465, PT_BOOL, ucp_XID_Continue },
|
||||
{ 3470, PT_BOOL, ucp_XID_Continue },
|
||||
{ 3482, PT_BOOL, ucp_XID_Start },
|
||||
{ 3487, PT_BOOL, ucp_XID_Start },
|
||||
{ 3496, PT_SC, ucp_Old_Persian },
|
||||
{ 3501, PT_PXSPACE, 0 },
|
||||
{ 3505, PT_SPACE, 0 },
|
||||
{ 3509, PT_SC, ucp_Cuneiform },
|
||||
{ 3514, PT_UCNC, 0 },
|
||||
{ 3518, PT_WORD, 0 },
|
||||
{ 3522, PT_SCX, ucp_Yezidi },
|
||||
{ 3527, PT_SCX, ucp_Yezidi },
|
||||
{ 3534, PT_SCX, ucp_Yi },
|
||||
{ 3537, PT_SCX, ucp_Yi },
|
||||
{ 3542, PT_GC, ucp_Z },
|
||||
{ 3544, PT_SC, ucp_Zanabazar_Square },
|
||||
{ 3560, PT_SC, ucp_Zanabazar_Square },
|
||||
{ 3565, PT_SC, ucp_Inherited },
|
||||
{ 3570, PT_PC, ucp_Zl },
|
||||
{ 3573, PT_PC, ucp_Zp },
|
||||
{ 3576, PT_PC, ucp_Zs },
|
||||
{ 3579, PT_SC, ucp_Common },
|
||||
{ 3584, PT_SC, ucp_Unknown }
|
||||
{ 1158, PT_SCX, ucp_Garay },
|
||||
{ 1163, PT_SCX, ucp_Garay },
|
||||
{ 1169, PT_SCX, ucp_Georgian },
|
||||
{ 1174, PT_SCX, ucp_Georgian },
|
||||
{ 1183, PT_SCX, ucp_Glagolitic },
|
||||
{ 1188, PT_SCX, ucp_Glagolitic },
|
||||
{ 1199, PT_SCX, ucp_Gunjala_Gondi },
|
||||
{ 1204, PT_SCX, ucp_Masaram_Gondi },
|
||||
{ 1209, PT_SCX, ucp_Gothic },
|
||||
{ 1214, PT_SCX, ucp_Gothic },
|
||||
{ 1221, PT_SCX, ucp_Grantha },
|
||||
{ 1226, PT_SCX, ucp_Grantha },
|
||||
{ 1234, PT_BOOL, ucp_Grapheme_Base },
|
||||
{ 1247, PT_BOOL, ucp_Grapheme_Extend },
|
||||
{ 1262, PT_BOOL, ucp_Grapheme_Link },
|
||||
{ 1275, PT_BOOL, ucp_Grapheme_Base },
|
||||
{ 1282, PT_SCX, ucp_Greek },
|
||||
{ 1288, PT_SCX, ucp_Greek },
|
||||
{ 1293, PT_BOOL, ucp_Grapheme_Extend },
|
||||
{ 1299, PT_BOOL, ucp_Grapheme_Link },
|
||||
{ 1306, PT_SCX, ucp_Gujarati },
|
||||
{ 1315, PT_SCX, ucp_Gujarati },
|
||||
{ 1320, PT_SCX, ucp_Gurung_Khema },
|
||||
{ 1325, PT_SCX, ucp_Gunjala_Gondi },
|
||||
{ 1338, PT_SCX, ucp_Gurmukhi },
|
||||
{ 1347, PT_SCX, ucp_Gurmukhi },
|
||||
{ 1352, PT_SCX, ucp_Gurung_Khema },
|
||||
{ 1364, PT_SCX, ucp_Han },
|
||||
{ 1368, PT_SCX, ucp_Hangul },
|
||||
{ 1373, PT_SCX, ucp_Hangul },
|
||||
{ 1380, PT_SCX, ucp_Han },
|
||||
{ 1385, PT_SCX, ucp_Hanifi_Rohingya },
|
||||
{ 1400, PT_SCX, ucp_Hanunoo },
|
||||
{ 1405, PT_SCX, ucp_Hanunoo },
|
||||
{ 1413, PT_SC, ucp_Hatran },
|
||||
{ 1418, PT_SC, ucp_Hatran },
|
||||
{ 1425, PT_SCX, ucp_Hebrew },
|
||||
{ 1430, PT_SCX, ucp_Hebrew },
|
||||
{ 1437, PT_BOOL, ucp_Hex_Digit },
|
||||
{ 1441, PT_BOOL, ucp_Hex_Digit },
|
||||
{ 1450, PT_SCX, ucp_Hiragana },
|
||||
{ 1455, PT_SCX, ucp_Hiragana },
|
||||
{ 1464, PT_SC, ucp_Anatolian_Hieroglyphs },
|
||||
{ 1469, PT_SC, ucp_Pahawh_Hmong },
|
||||
{ 1474, PT_SC, ucp_Nyiakeng_Puachue_Hmong },
|
||||
{ 1479, PT_SCX, ucp_Old_Hungarian },
|
||||
{ 1484, PT_BOOL, ucp_ID_Continue },
|
||||
{ 1488, PT_BOOL, ucp_ID_Compat_Math_Continue },
|
||||
{ 1509, PT_BOOL, ucp_ID_Compat_Math_Start },
|
||||
{ 1527, PT_BOOL, ucp_ID_Continue },
|
||||
{ 1538, PT_BOOL, ucp_Ideographic },
|
||||
{ 1543, PT_BOOL, ucp_Ideographic },
|
||||
{ 1555, PT_BOOL, ucp_ID_Start },
|
||||
{ 1559, PT_BOOL, ucp_IDS_Binary_Operator },
|
||||
{ 1564, PT_BOOL, ucp_IDS_Binary_Operator },
|
||||
{ 1582, PT_BOOL, ucp_IDS_Trinary_Operator },
|
||||
{ 1587, PT_BOOL, ucp_ID_Start },
|
||||
{ 1595, PT_BOOL, ucp_IDS_Trinary_Operator },
|
||||
{ 1614, PT_BOOL, ucp_IDS_Unary_Operator },
|
||||
{ 1619, PT_BOOL, ucp_IDS_Unary_Operator },
|
||||
{ 1636, PT_SC, ucp_Imperial_Aramaic },
|
||||
{ 1652, PT_BOOL, ucp_InCB },
|
||||
{ 1657, PT_SC, ucp_Inherited },
|
||||
{ 1667, PT_SC, ucp_Inscriptional_Pahlavi },
|
||||
{ 1688, PT_SC, ucp_Inscriptional_Parthian },
|
||||
{ 1710, PT_SC, ucp_Old_Italic },
|
||||
{ 1715, PT_SCX, ucp_Javanese },
|
||||
{ 1720, PT_SCX, ucp_Javanese },
|
||||
{ 1729, PT_BOOL, ucp_Join_Control },
|
||||
{ 1735, PT_BOOL, ucp_Join_Control },
|
||||
{ 1747, PT_SCX, ucp_Kaithi },
|
||||
{ 1754, PT_SCX, ucp_Kayah_Li },
|
||||
{ 1759, PT_SCX, ucp_Katakana },
|
||||
{ 1764, PT_SCX, ucp_Kannada },
|
||||
{ 1772, PT_SCX, ucp_Katakana },
|
||||
{ 1781, PT_SC, ucp_Kawi },
|
||||
{ 1786, PT_SCX, ucp_Kayah_Li },
|
||||
{ 1794, PT_SC, ucp_Kharoshthi },
|
||||
{ 1799, PT_SC, ucp_Kharoshthi },
|
||||
{ 1810, PT_SC, ucp_Khitan_Small_Script },
|
||||
{ 1828, PT_SC, ucp_Khmer },
|
||||
{ 1834, PT_SC, ucp_Khmer },
|
||||
{ 1839, PT_SCX, ucp_Khojki },
|
||||
{ 1844, PT_SCX, ucp_Khojki },
|
||||
{ 1851, PT_SCX, ucp_Khudawadi },
|
||||
{ 1861, PT_SC, ucp_Kirat_Rai },
|
||||
{ 1870, PT_SC, ucp_Khitan_Small_Script },
|
||||
{ 1875, PT_SCX, ucp_Kannada },
|
||||
{ 1880, PT_SC, ucp_Kirat_Rai },
|
||||
{ 1885, PT_SCX, ucp_Kaithi },
|
||||
{ 1890, PT_GC, ucp_L },
|
||||
{ 1892, PT_LAMP, 0 },
|
||||
{ 1895, PT_SC, ucp_Tai_Tham },
|
||||
{ 1900, PT_SC, ucp_Lao },
|
||||
{ 1904, PT_SC, ucp_Lao },
|
||||
{ 1909, PT_SCX, ucp_Latin },
|
||||
{ 1915, PT_SCX, ucp_Latin },
|
||||
{ 1920, PT_LAMP, 0 },
|
||||
{ 1923, PT_SC, ucp_Lepcha },
|
||||
{ 1928, PT_SC, ucp_Lepcha },
|
||||
{ 1935, PT_SCX, ucp_Limbu },
|
||||
{ 1940, PT_SCX, ucp_Limbu },
|
||||
{ 1946, PT_SCX, ucp_Linear_A },
|
||||
{ 1951, PT_SCX, ucp_Linear_B },
|
||||
{ 1956, PT_SCX, ucp_Linear_A },
|
||||
{ 1964, PT_SCX, ucp_Linear_B },
|
||||
{ 1972, PT_SCX, ucp_Lisu },
|
||||
{ 1977, PT_PC, ucp_Ll },
|
||||
{ 1980, PT_PC, ucp_Lm },
|
||||
{ 1983, PT_PC, ucp_Lo },
|
||||
{ 1986, PT_BOOL, ucp_Logical_Order_Exception },
|
||||
{ 1990, PT_BOOL, ucp_Logical_Order_Exception },
|
||||
{ 2012, PT_BOOL, ucp_Lowercase },
|
||||
{ 2018, PT_BOOL, ucp_Lowercase },
|
||||
{ 2028, PT_PC, ucp_Lt },
|
||||
{ 2031, PT_PC, ucp_Lu },
|
||||
{ 2034, PT_SCX, ucp_Lycian },
|
||||
{ 2039, PT_SCX, ucp_Lycian },
|
||||
{ 2046, PT_SCX, ucp_Lydian },
|
||||
{ 2051, PT_SCX, ucp_Lydian },
|
||||
{ 2058, PT_GC, ucp_M },
|
||||
{ 2060, PT_SCX, ucp_Mahajani },
|
||||
{ 2069, PT_SCX, ucp_Mahajani },
|
||||
{ 2074, PT_SC, ucp_Makasar },
|
||||
{ 2079, PT_SC, ucp_Makasar },
|
||||
{ 2087, PT_SCX, ucp_Malayalam },
|
||||
{ 2097, PT_SCX, ucp_Mandaic },
|
||||
{ 2102, PT_SCX, ucp_Mandaic },
|
||||
{ 2110, PT_SCX, ucp_Manichaean },
|
||||
{ 2115, PT_SCX, ucp_Manichaean },
|
||||
{ 2126, PT_SC, ucp_Marchen },
|
||||
{ 2131, PT_SC, ucp_Marchen },
|
||||
{ 2139, PT_SCX, ucp_Masaram_Gondi },
|
||||
{ 2152, PT_BOOL, ucp_Math },
|
||||
{ 2157, PT_PC, ucp_Mc },
|
||||
{ 2160, PT_BOOL, ucp_Modifier_Combining_Mark },
|
||||
{ 2164, PT_PC, ucp_Me },
|
||||
{ 2167, PT_SC, ucp_Medefaidrin },
|
||||
{ 2179, PT_SC, ucp_Medefaidrin },
|
||||
{ 2184, PT_SC, ucp_Meetei_Mayek },
|
||||
{ 2196, PT_SC, ucp_Mende_Kikakui },
|
||||
{ 2201, PT_SC, ucp_Mende_Kikakui },
|
||||
{ 2214, PT_SC, ucp_Meroitic_Cursive },
|
||||
{ 2219, PT_SCX, ucp_Meroitic_Hieroglyphs },
|
||||
{ 2224, PT_SC, ucp_Meroitic_Cursive },
|
||||
{ 2240, PT_SCX, ucp_Meroitic_Hieroglyphs },
|
||||
{ 2260, PT_SC, ucp_Miao },
|
||||
{ 2265, PT_SCX, ucp_Malayalam },
|
||||
{ 2270, PT_PC, ucp_Mn },
|
||||
{ 2273, PT_SCX, ucp_Modi },
|
||||
{ 2278, PT_BOOL, ucp_Modifier_Combining_Mark },
|
||||
{ 2300, PT_SCX, ucp_Mongolian },
|
||||
{ 2305, PT_SCX, ucp_Mongolian },
|
||||
{ 2315, PT_SC, ucp_Mro },
|
||||
{ 2319, PT_SC, ucp_Mro },
|
||||
{ 2324, PT_SC, ucp_Meetei_Mayek },
|
||||
{ 2329, PT_SCX, ucp_Multani },
|
||||
{ 2334, PT_SCX, ucp_Multani },
|
||||
{ 2342, PT_SCX, ucp_Myanmar },
|
||||
{ 2350, PT_SCX, ucp_Myanmar },
|
||||
{ 2355, PT_GC, ucp_N },
|
||||
{ 2357, PT_SC, ucp_Nabataean },
|
||||
{ 2367, PT_SC, ucp_Nag_Mundari },
|
||||
{ 2372, PT_SC, ucp_Nag_Mundari },
|
||||
{ 2383, PT_SCX, ucp_Nandinagari },
|
||||
{ 2388, PT_SCX, ucp_Nandinagari },
|
||||
{ 2400, PT_SC, ucp_Old_North_Arabian },
|
||||
{ 2405, PT_SC, ucp_Nabataean },
|
||||
{ 2410, PT_BOOL, ucp_Noncharacter_Code_Point },
|
||||
{ 2416, PT_PC, ucp_Nd },
|
||||
{ 2419, PT_SC, ucp_Newa },
|
||||
{ 2424, PT_SC, ucp_New_Tai_Lue },
|
||||
{ 2434, PT_SCX, ucp_Nko },
|
||||
{ 2438, PT_SCX, ucp_Nko },
|
||||
{ 2443, PT_PC, ucp_Nl },
|
||||
{ 2446, PT_PC, ucp_No },
|
||||
{ 2449, PT_BOOL, ucp_Noncharacter_Code_Point },
|
||||
{ 2471, PT_SC, ucp_Nushu },
|
||||
{ 2476, PT_SC, ucp_Nushu },
|
||||
{ 2482, PT_SC, ucp_Nyiakeng_Puachue_Hmong },
|
||||
{ 2503, PT_SC, ucp_Ogham },
|
||||
{ 2508, PT_SC, ucp_Ogham },
|
||||
{ 2514, PT_SC, ucp_Ol_Chiki },
|
||||
{ 2522, PT_SC, ucp_Ol_Chiki },
|
||||
{ 2527, PT_SCX, ucp_Old_Hungarian },
|
||||
{ 2540, PT_SC, ucp_Old_Italic },
|
||||
{ 2550, PT_SC, ucp_Old_North_Arabian },
|
||||
{ 2566, PT_SCX, ucp_Old_Permic },
|
||||
{ 2576, PT_SC, ucp_Old_Persian },
|
||||
{ 2587, PT_SC, ucp_Old_Sogdian },
|
||||
{ 2598, PT_SC, ucp_Old_South_Arabian },
|
||||
{ 2614, PT_SCX, ucp_Old_Turkic },
|
||||
{ 2624, PT_SCX, ucp_Old_Uyghur },
|
||||
{ 2634, PT_SCX, ucp_Ol_Onal },
|
||||
{ 2641, PT_SCX, ucp_Ol_Onal },
|
||||
{ 2646, PT_SCX, ucp_Oriya },
|
||||
{ 2652, PT_SCX, ucp_Old_Turkic },
|
||||
{ 2657, PT_SCX, ucp_Oriya },
|
||||
{ 2662, PT_SCX, ucp_Osage },
|
||||
{ 2668, PT_SCX, ucp_Osage },
|
||||
{ 2673, PT_SC, ucp_Osmanya },
|
||||
{ 2678, PT_SC, ucp_Osmanya },
|
||||
{ 2686, PT_SCX, ucp_Old_Uyghur },
|
||||
{ 2691, PT_GC, ucp_P },
|
||||
{ 2693, PT_SC, ucp_Pahawh_Hmong },
|
||||
{ 2705, PT_SC, ucp_Palmyrene },
|
||||
{ 2710, PT_SC, ucp_Palmyrene },
|
||||
{ 2720, PT_BOOL, ucp_Pattern_Syntax },
|
||||
{ 2727, PT_BOOL, ucp_Pattern_Syntax },
|
||||
{ 2741, PT_BOOL, ucp_Pattern_White_Space },
|
||||
{ 2759, PT_BOOL, ucp_Pattern_White_Space },
|
||||
{ 2765, PT_SC, ucp_Pau_Cin_Hau },
|
||||
{ 2770, PT_SC, ucp_Pau_Cin_Hau },
|
||||
{ 2780, PT_PC, ucp_Pc },
|
||||
{ 2783, PT_BOOL, ucp_Prepended_Concatenation_Mark },
|
||||
{ 2787, PT_PC, ucp_Pd },
|
||||
{ 2790, PT_PC, ucp_Pe },
|
||||
{ 2793, PT_SCX, ucp_Old_Permic },
|
||||
{ 2798, PT_PC, ucp_Pf },
|
||||
{ 2801, PT_SCX, ucp_Phags_Pa },
|
||||
{ 2806, PT_SCX, ucp_Phags_Pa },
|
||||
{ 2814, PT_SC, ucp_Inscriptional_Pahlavi },
|
||||
{ 2819, PT_SCX, ucp_Psalter_Pahlavi },
|
||||
{ 2824, PT_SC, ucp_Phoenician },
|
||||
{ 2829, PT_SC, ucp_Phoenician },
|
||||
{ 2840, PT_PC, ucp_Pi },
|
||||
{ 2843, PT_SC, ucp_Miao },
|
||||
{ 2848, PT_PC, ucp_Po },
|
||||
{ 2851, PT_BOOL, ucp_Prepended_Concatenation_Mark },
|
||||
{ 2878, PT_SC, ucp_Inscriptional_Parthian },
|
||||
{ 2883, PT_PC, ucp_Ps },
|
||||
{ 2886, PT_SCX, ucp_Psalter_Pahlavi },
|
||||
{ 2901, PT_SCX, ucp_Coptic },
|
||||
{ 2906, PT_SC, ucp_Inherited },
|
||||
{ 2911, PT_BOOL, ucp_Quotation_Mark },
|
||||
{ 2917, PT_BOOL, ucp_Quotation_Mark },
|
||||
{ 2931, PT_BOOL, ucp_Radical },
|
||||
{ 2939, PT_BOOL, ucp_Regional_Indicator },
|
||||
{ 2957, PT_SC, ucp_Rejang },
|
||||
{ 2964, PT_BOOL, ucp_Regional_Indicator },
|
||||
{ 2967, PT_SC, ucp_Rejang },
|
||||
{ 2972, PT_SCX, ucp_Hanifi_Rohingya },
|
||||
{ 2977, PT_SCX, ucp_Runic },
|
||||
{ 2983, PT_SCX, ucp_Runic },
|
||||
{ 2988, PT_GC, ucp_S },
|
||||
{ 2990, PT_SCX, ucp_Samaritan },
|
||||
{ 3000, PT_SCX, ucp_Samaritan },
|
||||
{ 3005, PT_SC, ucp_Old_South_Arabian },
|
||||
{ 3010, PT_SC, ucp_Saurashtra },
|
||||
{ 3015, PT_SC, ucp_Saurashtra },
|
||||
{ 3026, PT_PC, ucp_Sc },
|
||||
{ 3029, PT_BOOL, ucp_Soft_Dotted },
|
||||
{ 3032, PT_BOOL, ucp_Sentence_Terminal },
|
||||
{ 3049, PT_SC, ucp_SignWriting },
|
||||
{ 3054, PT_SCX, ucp_Sharada },
|
||||
{ 3062, PT_SCX, ucp_Shavian },
|
||||
{ 3070, PT_SCX, ucp_Shavian },
|
||||
{ 3075, PT_SCX, ucp_Sharada },
|
||||
{ 3080, PT_SC, ucp_Siddham },
|
||||
{ 3085, PT_SC, ucp_Siddham },
|
||||
{ 3093, PT_SC, ucp_SignWriting },
|
||||
{ 3105, PT_SCX, ucp_Khudawadi },
|
||||
{ 3110, PT_SCX, ucp_Sinhala },
|
||||
{ 3115, PT_SCX, ucp_Sinhala },
|
||||
{ 3123, PT_PC, ucp_Sk },
|
||||
{ 3126, PT_PC, ucp_Sm },
|
||||
{ 3129, PT_PC, ucp_So },
|
||||
{ 3132, PT_BOOL, ucp_Soft_Dotted },
|
||||
{ 3143, PT_SCX, ucp_Sogdian },
|
||||
{ 3148, PT_SCX, ucp_Sogdian },
|
||||
{ 3156, PT_SC, ucp_Old_Sogdian },
|
||||
{ 3161, PT_SC, ucp_Sora_Sompeng },
|
||||
{ 3166, PT_SC, ucp_Sora_Sompeng },
|
||||
{ 3178, PT_SC, ucp_Soyombo },
|
||||
{ 3183, PT_SC, ucp_Soyombo },
|
||||
{ 3191, PT_BOOL, ucp_White_Space },
|
||||
{ 3197, PT_BOOL, ucp_Sentence_Terminal },
|
||||
{ 3203, PT_SC, ucp_Sundanese },
|
||||
{ 3208, PT_SC, ucp_Sundanese },
|
||||
{ 3218, PT_SCX, ucp_Sunuwar },
|
||||
{ 3223, PT_SCX, ucp_Sunuwar },
|
||||
{ 3231, PT_SCX, ucp_Syloti_Nagri },
|
||||
{ 3236, PT_SCX, ucp_Syloti_Nagri },
|
||||
{ 3248, PT_SCX, ucp_Syriac },
|
||||
{ 3253, PT_SCX, ucp_Syriac },
|
||||
{ 3260, PT_SCX, ucp_Tagalog },
|
||||
{ 3268, PT_SCX, ucp_Tagbanwa },
|
||||
{ 3273, PT_SCX, ucp_Tagbanwa },
|
||||
{ 3282, PT_SCX, ucp_Tai_Le },
|
||||
{ 3288, PT_SC, ucp_Tai_Tham },
|
||||
{ 3296, PT_SC, ucp_Tai_Viet },
|
||||
{ 3304, PT_SCX, ucp_Takri },
|
||||
{ 3309, PT_SCX, ucp_Takri },
|
||||
{ 3315, PT_SCX, ucp_Tai_Le },
|
||||
{ 3320, PT_SC, ucp_New_Tai_Lue },
|
||||
{ 3325, PT_SCX, ucp_Tamil },
|
||||
{ 3331, PT_SCX, ucp_Tamil },
|
||||
{ 3336, PT_SCX, ucp_Tangut },
|
||||
{ 3341, PT_SC, ucp_Tangsa },
|
||||
{ 3348, PT_SCX, ucp_Tangut },
|
||||
{ 3355, PT_SC, ucp_Tai_Viet },
|
||||
{ 3360, PT_SCX, ucp_Telugu },
|
||||
{ 3365, PT_SCX, ucp_Telugu },
|
||||
{ 3372, PT_BOOL, ucp_Terminal_Punctuation },
|
||||
{ 3377, PT_BOOL, ucp_Terminal_Punctuation },
|
||||
{ 3397, PT_SCX, ucp_Tifinagh },
|
||||
{ 3402, PT_SCX, ucp_Tagalog },
|
||||
{ 3407, PT_SCX, ucp_Thaana },
|
||||
{ 3412, PT_SCX, ucp_Thaana },
|
||||
{ 3419, PT_SCX, ucp_Thai },
|
||||
{ 3424, PT_SCX, ucp_Tibetan },
|
||||
{ 3432, PT_SCX, ucp_Tibetan },
|
||||
{ 3437, PT_SCX, ucp_Tifinagh },
|
||||
{ 3446, PT_SCX, ucp_Tirhuta },
|
||||
{ 3451, PT_SCX, ucp_Tirhuta },
|
||||
{ 3459, PT_SC, ucp_Tangsa },
|
||||
{ 3464, PT_SCX, ucp_Todhri },
|
||||
{ 3471, PT_SCX, ucp_Todhri },
|
||||
{ 3476, PT_SCX, ucp_Toto },
|
||||
{ 3481, PT_SCX, ucp_Tulu_Tigalari },
|
||||
{ 3494, PT_SCX, ucp_Tulu_Tigalari },
|
||||
{ 3499, PT_SC, ucp_Ugaritic },
|
||||
{ 3504, PT_SC, ucp_Ugaritic },
|
||||
{ 3513, PT_BOOL, ucp_Unified_Ideograph },
|
||||
{ 3519, PT_BOOL, ucp_Unified_Ideograph },
|
||||
{ 3536, PT_SC, ucp_Unknown },
|
||||
{ 3544, PT_BOOL, ucp_Uppercase },
|
||||
{ 3550, PT_BOOL, ucp_Uppercase },
|
||||
{ 3560, PT_SC, ucp_Vai },
|
||||
{ 3564, PT_SC, ucp_Vai },
|
||||
{ 3569, PT_BOOL, ucp_Variation_Selector },
|
||||
{ 3587, PT_SC, ucp_Vithkuqi },
|
||||
{ 3592, PT_SC, ucp_Vithkuqi },
|
||||
{ 3601, PT_BOOL, ucp_Variation_Selector },
|
||||
{ 3604, PT_SC, ucp_Wancho },
|
||||
{ 3611, PT_SC, ucp_Warang_Citi },
|
||||
{ 3616, PT_SC, ucp_Warang_Citi },
|
||||
{ 3627, PT_SC, ucp_Wancho },
|
||||
{ 3632, PT_BOOL, ucp_White_Space },
|
||||
{ 3643, PT_BOOL, ucp_White_Space },
|
||||
{ 3650, PT_ALNUM, 0 },
|
||||
{ 3654, PT_BOOL, ucp_XID_Continue },
|
||||
{ 3659, PT_BOOL, ucp_XID_Continue },
|
||||
{ 3671, PT_BOOL, ucp_XID_Start },
|
||||
{ 3676, PT_BOOL, ucp_XID_Start },
|
||||
{ 3685, PT_SC, ucp_Old_Persian },
|
||||
{ 3690, PT_PXSPACE, 0 },
|
||||
{ 3694, PT_SPACE, 0 },
|
||||
{ 3698, PT_SC, ucp_Cuneiform },
|
||||
{ 3703, PT_UCNC, 0 },
|
||||
{ 3707, PT_WORD, 0 },
|
||||
{ 3711, PT_SCX, ucp_Yezidi },
|
||||
{ 3716, PT_SCX, ucp_Yezidi },
|
||||
{ 3723, PT_SCX, ucp_Yi },
|
||||
{ 3726, PT_SCX, ucp_Yi },
|
||||
{ 3731, PT_GC, ucp_Z },
|
||||
{ 3733, PT_SC, ucp_Zanabazar_Square },
|
||||
{ 3749, PT_SC, ucp_Zanabazar_Square },
|
||||
{ 3754, PT_SC, ucp_Inherited },
|
||||
{ 3759, PT_PC, ucp_Zl },
|
||||
{ 3762, PT_PC, ucp_Zp },
|
||||
{ 3765, PT_PC, ucp_Zs },
|
||||
{ 3768, PT_SC, ucp_Common },
|
||||
{ 3773, PT_SC, ucp_Unknown }
|
||||
};
|
||||
|
||||
const size_t PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table);
|
||||
|
||||
132
libpcre/src/pcre2_util.h
Normal file
132
libpcre/src/pcre2_util.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/*************************************************
|
||||
* Perl-Compatible Regular Expressions *
|
||||
*************************************************/
|
||||
|
||||
/* PCRE2 is a library of functions to support regular expressions whose syntax
|
||||
and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the University of Cambridge nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef PCRE2_UTIL_H_IDEMPOTENT_GUARD
|
||||
#define PCRE2_UTIL_H_IDEMPOTENT_GUARD
|
||||
|
||||
/* Assertion macros */
|
||||
|
||||
#ifdef PCRE2_DEBUG
|
||||
|
||||
#if defined(HAVE_ASSERT_H) && !defined(NDEBUG)
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
/* PCRE2_ASSERT(x) can be used to inject an assert() for conditions
|
||||
that the code below doesn't support. It is a NOP for non debug builds
|
||||
but in debug builds will print information about the location of the
|
||||
code where it triggered and crash.
|
||||
|
||||
It is meant to work like assert(), and therefore the expression used
|
||||
should indicate what the expected state is, and shouldn't have any
|
||||
side-effects. */
|
||||
|
||||
#if defined(HAVE_ASSERT_H) && !defined(NDEBUG)
|
||||
#define PCRE2_ASSERT(x) assert(x)
|
||||
#else
|
||||
#define PCRE2_ASSERT(x) do \
|
||||
{ \
|
||||
if (!(x)) \
|
||||
{ \
|
||||
fprintf(stderr, "Assertion failed at " __FILE__ ":%d\n", __LINE__); \
|
||||
abort(); \
|
||||
} \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
/* PCRE2_UNREACHABLE() can be used to mark locations on the code that
|
||||
shouldn't be reached. In non debug builds is defined as a hint for
|
||||
the compiler to eliminate any code after it, so it is useful also for
|
||||
performance reasons, but should be used with care because if it is
|
||||
ever reached will trigger Undefined Behaviour and if you are lucky a
|
||||
crash. In debug builds it will report the location where it was triggered
|
||||
and crash. One important point to consider when using this macro, is
|
||||
that it is only implemented for a few compilers, and therefore can't
|
||||
be relied on to always be active either, so if it is followed by some
|
||||
code it is important to make sure that the whole thing is safe to
|
||||
use even if the macro is not there (ex: make sure there is a `break`
|
||||
after it if used at the end of a `case`) and to test your code also
|
||||
with a configuration where the macro will be a NOP. */
|
||||
|
||||
#if defined(HAVE_ASSERT_H) && !defined(NDEBUG)
|
||||
#define PCRE2_UNREACHABLE() \
|
||||
assert(((void)"Execution reached unexpected point", 0))
|
||||
#else
|
||||
#define PCRE2_UNREACHABLE() do \
|
||||
{ \
|
||||
fprintf(stderr, "Execution reached unexpected point at " __FILE__ \
|
||||
":%d\n", __LINE__); \
|
||||
abort(); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
/* PCRE2_DEBUG_UNREACHABLE() is a debug only version of the previous
|
||||
macro. It is meant to be used in places where the code is handling
|
||||
an error situation in code that shouldn't be reached, but that has
|
||||
some sort of fallback code to normally handle the error. When in
|
||||
doubt you should use this instead of the previous macro. Like in
|
||||
the previous case, it is a good idea to document as much as possible
|
||||
the reason and the actions that should be taken if it ever triggers. */
|
||||
|
||||
#define PCRE2_DEBUG_UNREACHABLE() PCRE2_UNREACHABLE()
|
||||
|
||||
#endif /* PCRE2_DEBUG */
|
||||
|
||||
#ifndef PCRE2_DEBUG_UNREACHABLE
|
||||
#define PCRE2_DEBUG_UNREACHABLE() do {} while(0)
|
||||
#endif
|
||||
|
||||
#ifndef PCRE2_UNREACHABLE
|
||||
#ifdef HAVE_BUILTIN_UNREACHABLE
|
||||
#define PCRE2_UNREACHABLE() __builtin_unreachable()
|
||||
#elif defined(HAVE_BUILTIN_ASSUME)
|
||||
#define PCRE2_UNREACHABLE() __assume(0)
|
||||
#else
|
||||
#define PCRE2_UNREACHABLE() do {} while(0)
|
||||
#endif
|
||||
#endif /* !PCRE2_UNREACHABLE */
|
||||
|
||||
#ifndef PCRE2_ASSERT
|
||||
#define PCRE2_ASSERT(x) do {} while(0)
|
||||
#endif
|
||||
|
||||
#endif /* PCRE2_UTIL_H_IDEMPOTENT_GUARD */
|
||||
|
||||
/* End of pcre2_util.h */
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2023 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -38,9 +38,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* This module contains an internal function that is used to match an extended
|
||||
class. It is used by pcre2_auto_possessify() and by both pcre2_match() and
|
||||
pcre2_def_match(). */
|
||||
/* This module contains two internal functions that are used to match
|
||||
OP_XCLASS and OP_ECLASS. It is used by pcre2_auto_possessify() and by both
|
||||
pcre2_match() and pcre2_dfa_match(). */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -66,114 +66,75 @@ Returns: TRUE if character matches, else FALSE
|
||||
*/
|
||||
|
||||
BOOL
|
||||
PRIV(xclass)(uint32_t c, PCRE2_SPTR data, BOOL utf)
|
||||
PRIV(xclass)(uint32_t c, PCRE2_SPTR data, const uint8_t *char_lists_end, BOOL utf)
|
||||
{
|
||||
/* Update PRIV(update_classbits) when this function is changed. */
|
||||
PCRE2_UCHAR t;
|
||||
BOOL negated = (*data & XCL_NOT) != 0;
|
||||
BOOL not_negated = (*data & XCL_NOT) == 0;
|
||||
uint32_t type, max_index, min_index, value;
|
||||
const uint8_t *next_char;
|
||||
|
||||
#if PCRE2_CODE_UNIT_WIDTH == 8
|
||||
/* In 8 bit mode, this must always be TRUE. Help the compiler to know that. */
|
||||
utf = TRUE;
|
||||
#endif
|
||||
|
||||
/* Code points < 256 are matched against a bitmap, if one is present. If not,
|
||||
we still carry on, because there may be ranges that start below 256 in the
|
||||
additional data. */
|
||||
/* Code points < 256 are matched against a bitmap, if one is present. */
|
||||
|
||||
if (c < 256)
|
||||
if ((*data++ & XCL_MAP) != 0)
|
||||
{
|
||||
if ((*data & XCL_HASPROP) == 0)
|
||||
{
|
||||
if ((*data & XCL_MAP) == 0) return negated;
|
||||
return (((uint8_t *)(data + 1))[c/8] & (1u << (c&7))) != 0;
|
||||
}
|
||||
if ((*data & XCL_MAP) != 0 &&
|
||||
(((uint8_t *)(data + 1))[c/8] & (1u << (c&7))) != 0)
|
||||
return !negated; /* char found */
|
||||
if (c < 256)
|
||||
return (((const uint8_t *)data)[c/8] & (1u << (c&7))) != 0;
|
||||
/* Skip bitmap. */
|
||||
data += 32 / sizeof(PCRE2_UCHAR);
|
||||
}
|
||||
|
||||
/* First skip the bit map if present. Then match against the list of Unicode
|
||||
properties or large chars or ranges that end with a large char. We won't ever
|
||||
/* Match against the list of Unicode properties. We won't ever
|
||||
encounter XCL_PROP or XCL_NOTPROP when UTF support is not compiled. */
|
||||
|
||||
if ((*data++ & XCL_MAP) != 0) data += 32 / sizeof(PCRE2_UCHAR);
|
||||
|
||||
while ((t = *data++) != XCL_END)
|
||||
#ifdef SUPPORT_UNICODE
|
||||
if (*data == XCL_PROP || *data == XCL_NOTPROP)
|
||||
{
|
||||
uint32_t x, y;
|
||||
if (t == XCL_SINGLE)
|
||||
{
|
||||
#ifdef SUPPORT_UNICODE
|
||||
if (utf)
|
||||
{
|
||||
GETCHARINC(x, data); /* macro generates multiple statements */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
x = *data++;
|
||||
if (c == x) return !negated;
|
||||
}
|
||||
else if (t == XCL_RANGE)
|
||||
{
|
||||
#ifdef SUPPORT_UNICODE
|
||||
if (utf)
|
||||
{
|
||||
GETCHARINC(x, data); /* macro generates multiple statements */
|
||||
GETCHARINC(y, data); /* macro generates multiple statements */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
x = *data++;
|
||||
y = *data++;
|
||||
}
|
||||
if (c >= x && c <= y) return !negated;
|
||||
}
|
||||
/* The UCD record is the same for all properties. */
|
||||
const ucd_record *prop = GET_UCD(c);
|
||||
|
||||
#ifdef SUPPORT_UNICODE
|
||||
else /* XCL_PROP & XCL_NOTPROP */
|
||||
do
|
||||
{
|
||||
int chartype;
|
||||
const ucd_record *prop = GET_UCD(c);
|
||||
BOOL isprop = t == XCL_PROP;
|
||||
BOOL isprop = (*data++) == XCL_PROP;
|
||||
BOOL ok;
|
||||
|
||||
switch(*data)
|
||||
{
|
||||
case PT_ANY:
|
||||
if (isprop) return !negated;
|
||||
break;
|
||||
|
||||
case PT_LAMP:
|
||||
chartype = prop->chartype;
|
||||
if ((chartype == ucp_Lu || chartype == ucp_Ll ||
|
||||
chartype == ucp_Lt) == isprop) return !negated;
|
||||
chartype == ucp_Lt) == isprop) return not_negated;
|
||||
break;
|
||||
|
||||
case PT_GC:
|
||||
if ((data[1] == PRIV(ucp_gentype)[prop->chartype]) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
break;
|
||||
|
||||
case PT_PC:
|
||||
if ((data[1] == prop->chartype) == isprop) return !negated;
|
||||
if ((data[1] == prop->chartype) == isprop) return not_negated;
|
||||
break;
|
||||
|
||||
case PT_SC:
|
||||
if ((data[1] == prop->script) == isprop) return !negated;
|
||||
if ((data[1] == prop->script) == isprop) return not_negated;
|
||||
break;
|
||||
|
||||
case PT_SCX:
|
||||
ok = (data[1] == prop->script ||
|
||||
MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), data[1]) != 0);
|
||||
if (ok == isprop) return !negated;
|
||||
if (ok == isprop) return not_negated;
|
||||
break;
|
||||
|
||||
case PT_ALNUM:
|
||||
chartype = prop->chartype;
|
||||
if ((PRIV(ucp_gentype)[chartype] == ucp_L ||
|
||||
PRIV(ucp_gentype)[chartype] == ucp_N) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
break;
|
||||
|
||||
/* Perl space used to exclude VT, but from Perl 5.18 it is included,
|
||||
@@ -186,12 +147,12 @@ while ((t = *data++) != XCL_END)
|
||||
{
|
||||
HSPACE_CASES:
|
||||
VSPACE_CASES:
|
||||
if (isprop) return !negated;
|
||||
if (isprop) return not_negated;
|
||||
break;
|
||||
|
||||
default:
|
||||
if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -201,7 +162,7 @@ while ((t = *data++) != XCL_END)
|
||||
if ((PRIV(ucp_gentype)[chartype] == ucp_L ||
|
||||
PRIV(ucp_gentype)[chartype] == ucp_N ||
|
||||
chartype == ucp_Mn || chartype == ucp_Pc) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
break;
|
||||
|
||||
case PT_UCNC:
|
||||
@@ -209,24 +170,24 @@ while ((t = *data++) != XCL_END)
|
||||
{
|
||||
if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
|
||||
c == CHAR_GRAVE_ACCENT) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((c < 0xd800 || c > 0xdfff) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
}
|
||||
break;
|
||||
|
||||
case PT_BIDICL:
|
||||
if ((UCD_BIDICLASS_PROP(prop) == data[1]) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
break;
|
||||
|
||||
case PT_BOOL:
|
||||
ok = MAPBIT(PRIV(ucd_boolprop_sets) +
|
||||
UCD_BPROPS_PROP(prop), data[1]) != 0;
|
||||
if (ok == isprop) return !negated;
|
||||
if (ok == isprop) return not_negated;
|
||||
break;
|
||||
|
||||
/* The following three properties can occur only in an XCLASS, as there
|
||||
@@ -248,7 +209,7 @@ while ((t = *data++) != XCL_END)
|
||||
(chartype == ucp_Cf &&
|
||||
c != 0x061c && c != 0x180e && (c < 0x2066 || c > 0x2069))
|
||||
)) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
break;
|
||||
|
||||
/* Printable character: same as graphic, with the addition of Zs, i.e.
|
||||
@@ -262,7 +223,7 @@ while ((t = *data++) != XCL_END)
|
||||
(chartype == ucp_Cf &&
|
||||
c != 0x061c && (c < 0x2066 || c > 0x2069))
|
||||
)) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
break;
|
||||
|
||||
/* Punctuation: all Unicode punctuation, plus ASCII characters that
|
||||
@@ -273,7 +234,7 @@ while ((t = *data++) != XCL_END)
|
||||
chartype = prop->chartype;
|
||||
if ((PRIV(ucp_gentype)[chartype] == ucp_P ||
|
||||
(c < 128 && PRIV(ucp_gentype)[chartype] == ucp_S)) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
break;
|
||||
|
||||
/* Perl has two sets of hex digits */
|
||||
@@ -285,24 +246,300 @@ while ((t = *data++) != XCL_END)
|
||||
(c >= 0xff10 && c <= 0xff19) || /* Fullwidth digits */
|
||||
(c >= 0xff21 && c <= 0xff26) || /* Fullwidth letters */
|
||||
(c >= 0xff41 && c <= 0xff46)) == isprop)
|
||||
return !negated;
|
||||
return not_negated;
|
||||
break;
|
||||
|
||||
/* This should never occur, but compilers may mutter if there is no
|
||||
default. */
|
||||
|
||||
default:
|
||||
PCRE2_DEBUG_UNREACHABLE();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
data += 2;
|
||||
}
|
||||
while (*data == XCL_PROP || *data == XCL_NOTPROP);
|
||||
}
|
||||
#else
|
||||
(void)utf; /* Avoid compiler warning */
|
||||
#endif /* SUPPORT_UNICODE */
|
||||
|
||||
/* Match against large chars or ranges that end with a large char. */
|
||||
if (*data < XCL_LIST)
|
||||
{
|
||||
while ((t = *data++) != XCL_END)
|
||||
{
|
||||
uint32_t x, y;
|
||||
|
||||
#ifdef SUPPORT_UNICODE
|
||||
if (utf)
|
||||
{
|
||||
GETCHARINC(x, data); /* macro generates multiple statements */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
x = *data++;
|
||||
|
||||
if (t == XCL_SINGLE)
|
||||
{
|
||||
/* Since character ranges follow the properties, and they are
|
||||
sorted, early return is possible for all characters <= x. */
|
||||
if (c <= x) return (c == x) ? not_negated : !not_negated;
|
||||
continue;
|
||||
}
|
||||
|
||||
PCRE2_ASSERT(t == XCL_RANGE);
|
||||
#ifdef SUPPORT_UNICODE
|
||||
if (utf)
|
||||
{
|
||||
GETCHARINC(y, data); /* macro generates multiple statements */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
y = *data++;
|
||||
|
||||
/* Since character ranges follow the properties, and they are
|
||||
sorted, early return is possible for all characters <= y. */
|
||||
if (c <= y) return (c >= x) ? not_negated : !not_negated;
|
||||
}
|
||||
|
||||
return !not_negated; /* char did not match */
|
||||
}
|
||||
|
||||
return negated; /* char did not match */
|
||||
#if PCRE2_CODE_UNIT_WIDTH == 8
|
||||
type = (uint32_t)(data[0] << 8) | data[1];
|
||||
data += 2;
|
||||
#else
|
||||
type = data[0];
|
||||
data++;
|
||||
#endif /* CODE_UNIT_WIDTH */
|
||||
|
||||
/* Align characters. */
|
||||
next_char = char_lists_end - (GET(data, 0) << 1);
|
||||
type &= XCL_TYPE_MASK;
|
||||
|
||||
/* Alignment check. */
|
||||
PCRE2_ASSERT(((uintptr_t)next_char & 0x1) == 0);
|
||||
|
||||
if (c >= XCL_CHAR_LIST_HIGH_16_START)
|
||||
{
|
||||
max_index = type & XCL_ITEM_COUNT_MASK;
|
||||
if (max_index == XCL_ITEM_COUNT_MASK)
|
||||
{
|
||||
max_index = *(const uint16_t*)next_char;
|
||||
PCRE2_ASSERT(max_index >= XCL_ITEM_COUNT_MASK);
|
||||
next_char += 2;
|
||||
}
|
||||
|
||||
next_char += max_index << 1;
|
||||
type >>= XCL_TYPE_BIT_LEN;
|
||||
}
|
||||
|
||||
if (c < XCL_CHAR_LIST_LOW_32_START)
|
||||
{
|
||||
max_index = type & XCL_ITEM_COUNT_MASK;
|
||||
|
||||
c = (uint16_t)((c << XCL_CHAR_SHIFT) | XCL_CHAR_END);
|
||||
|
||||
if (max_index == XCL_ITEM_COUNT_MASK)
|
||||
{
|
||||
max_index = *(const uint16_t*)next_char;
|
||||
PCRE2_ASSERT(max_index >= XCL_ITEM_COUNT_MASK);
|
||||
next_char += 2;
|
||||
}
|
||||
|
||||
if (max_index == 0 || c < *(const uint16_t*)next_char)
|
||||
return ((type & XCL_BEGIN_WITH_RANGE) != 0) == not_negated;
|
||||
|
||||
min_index = 0;
|
||||
value = ((const uint16_t*)next_char)[--max_index];
|
||||
if (c >= value)
|
||||
return (value == c || (value & XCL_CHAR_END) == 0) == not_negated;
|
||||
|
||||
max_index--;
|
||||
|
||||
/* Binary search of a range. */
|
||||
while (TRUE)
|
||||
{
|
||||
uint32_t mid_index = (min_index + max_index) >> 1;
|
||||
value = ((const uint16_t*)next_char)[mid_index];
|
||||
|
||||
if (c < value)
|
||||
max_index = mid_index - 1;
|
||||
else if (((const uint16_t*)next_char)[mid_index + 1] <= c)
|
||||
min_index = mid_index + 1;
|
||||
else
|
||||
return (value == c || (value & XCL_CHAR_END) == 0) == not_negated;
|
||||
}
|
||||
}
|
||||
|
||||
/* Skip the 16 bit ranges. */
|
||||
max_index = type & XCL_ITEM_COUNT_MASK;
|
||||
if (max_index == XCL_ITEM_COUNT_MASK)
|
||||
{
|
||||
max_index = *(const uint16_t*)next_char;
|
||||
PCRE2_ASSERT(max_index >= XCL_ITEM_COUNT_MASK);
|
||||
next_char += 2;
|
||||
}
|
||||
|
||||
next_char += (max_index << 1);
|
||||
type >>= XCL_TYPE_BIT_LEN;
|
||||
|
||||
/* Alignment check. */
|
||||
PCRE2_ASSERT(((uintptr_t)next_char & 0x3) == 0);
|
||||
|
||||
max_index = type & XCL_ITEM_COUNT_MASK;
|
||||
|
||||
#if PCRE2_CODE_UNIT_WIDTH == 32
|
||||
if (c >= XCL_CHAR_LIST_HIGH_32_START)
|
||||
{
|
||||
if (max_index == XCL_ITEM_COUNT_MASK)
|
||||
{
|
||||
max_index = *(const uint32_t*)next_char;
|
||||
PCRE2_ASSERT(max_index >= XCL_ITEM_COUNT_MASK);
|
||||
next_char += 4;
|
||||
}
|
||||
|
||||
next_char += max_index << 2;
|
||||
type >>= XCL_TYPE_BIT_LEN;
|
||||
max_index = type & XCL_ITEM_COUNT_MASK;
|
||||
}
|
||||
#endif
|
||||
|
||||
c = (uint32_t)((c << XCL_CHAR_SHIFT) | XCL_CHAR_END);
|
||||
|
||||
if (max_index == XCL_ITEM_COUNT_MASK)
|
||||
{
|
||||
max_index = *(const uint32_t*)next_char;
|
||||
next_char += 4;
|
||||
}
|
||||
|
||||
if (max_index == 0 || c < *(const uint32_t*)next_char)
|
||||
return ((type & XCL_BEGIN_WITH_RANGE) != 0) == not_negated;
|
||||
|
||||
min_index = 0;
|
||||
value = ((const uint32_t*)next_char)[--max_index];
|
||||
if (c >= value)
|
||||
return (value == c || (value & XCL_CHAR_END) == 0) == not_negated;
|
||||
|
||||
max_index--;
|
||||
|
||||
/* Binary search of a range. */
|
||||
while (TRUE)
|
||||
{
|
||||
uint32_t mid_index = (min_index + max_index) >> 1;
|
||||
value = ((const uint32_t*)next_char)[mid_index];
|
||||
|
||||
if (c < value)
|
||||
max_index = mid_index - 1;
|
||||
else if (((const uint32_t*)next_char)[mid_index + 1] <= c)
|
||||
min_index = mid_index + 1;
|
||||
else
|
||||
return (value == c || (value & XCL_CHAR_END) == 0) == not_negated;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************************
|
||||
* Match character against an ECLASS *
|
||||
*************************************************/
|
||||
|
||||
/* This function is called to match a character against an extended class
|
||||
used for describing characters using boolean operations on sets.
|
||||
|
||||
Arguments:
|
||||
c the character
|
||||
data_start points to the start of the ECLASS data
|
||||
data_end points one-past-the-last of the ECLASS data
|
||||
utf TRUE if in UTF mode
|
||||
|
||||
Returns: TRUE if character matches, else FALSE
|
||||
*/
|
||||
|
||||
BOOL
|
||||
PRIV(eclass)(uint32_t c, PCRE2_SPTR data_start, PCRE2_SPTR data_end,
|
||||
const uint8_t *char_lists_end, BOOL utf)
|
||||
{
|
||||
PCRE2_SPTR ptr = data_start;
|
||||
PCRE2_UCHAR flags;
|
||||
uint32_t stack = 0;
|
||||
int stack_depth = 0;
|
||||
|
||||
PCRE2_ASSERT(data_start < data_end);
|
||||
flags = *ptr++;
|
||||
PCRE2_ASSERT((flags & ECL_MAP) == 0 ||
|
||||
(data_end - ptr) >= 32 / (int)sizeof(PCRE2_UCHAR));
|
||||
|
||||
/* Code points < 256 are matched against a bitmap, if one is present.
|
||||
Otherwise all codepoints are checked later. */
|
||||
|
||||
if ((flags & ECL_MAP) != 0)
|
||||
{
|
||||
if (c < 256)
|
||||
return (((const uint8_t *)ptr)[c/8] & (1u << (c&7))) != 0;
|
||||
|
||||
/* Skip the bitmap. */
|
||||
ptr += 32 / sizeof(PCRE2_UCHAR);
|
||||
}
|
||||
|
||||
/* Do a little loop, until we reach the end of the ECLASS. */
|
||||
while (ptr < data_end)
|
||||
{
|
||||
switch (*ptr)
|
||||
{
|
||||
case ECL_AND:
|
||||
++ptr;
|
||||
stack = (stack >> 1) & (stack | ~(uint32_t)1u);
|
||||
PCRE2_ASSERT(stack_depth >= 2);
|
||||
--stack_depth;
|
||||
break;
|
||||
|
||||
case ECL_OR:
|
||||
++ptr;
|
||||
stack = (stack >> 1) | (stack & (uint32_t)1u);
|
||||
PCRE2_ASSERT(stack_depth >= 2);
|
||||
--stack_depth;
|
||||
break;
|
||||
|
||||
case ECL_XOR:
|
||||
++ptr;
|
||||
stack = (stack >> 1) ^ (stack & (uint32_t)1u);
|
||||
PCRE2_ASSERT(stack_depth >= 2);
|
||||
--stack_depth;
|
||||
break;
|
||||
|
||||
case ECL_NOT:
|
||||
++ptr;
|
||||
stack ^= (uint32_t)1u;
|
||||
PCRE2_ASSERT(stack_depth >= 1);
|
||||
break;
|
||||
|
||||
case ECL_XCLASS:
|
||||
{
|
||||
uint32_t matched = PRIV(xclass)(c, ptr + 1 + LINK_SIZE, char_lists_end, utf);
|
||||
|
||||
ptr += GET(ptr, 1);
|
||||
stack = (stack << 1) | matched;
|
||||
++stack_depth;
|
||||
break;
|
||||
}
|
||||
|
||||
/* This should never occur, but compilers may mutter if there is no
|
||||
default. */
|
||||
|
||||
default:
|
||||
PCRE2_DEBUG_UNREACHABLE();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
PCRE2_ASSERT(stack_depth == 1);
|
||||
(void)stack_depth; /* Ignore unused variable, if assertions are disabled. */
|
||||
|
||||
/* The final bit left on the stack now holds the match result. */
|
||||
return (stack & 1u) != 0;
|
||||
}
|
||||
|
||||
/* End of pcre2_xclass.c */
|
||||
|
||||
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
|
||||
|
||||
Written by Philip Hazel
|
||||
Original API code Copyright (c) 1997-2012 University of Cambridge
|
||||
New API code Copyright (c) 2016-2022 University of Cambridge
|
||||
New API code Copyright (c) 2016-2024 University of Cambridge
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -94,11 +94,13 @@ changed. This #define is a copy of the one in pcre2_internal.h. */
|
||||
|
||||
#include "pcre2.h"
|
||||
#include "pcre2posix.h"
|
||||
#include "pcre2_util.h"
|
||||
|
||||
/* Table to translate PCRE2 compile time error codes into POSIX error codes.
|
||||
Only a few PCRE2 errors with a value greater than 23 turn into special POSIX
|
||||
codes: most go to REG_BADPAT. The second table lists, in pairs, those that
|
||||
don't. */
|
||||
don't, even though some of them cannot currently be provoked from within the
|
||||
POSIX wrapper. */
|
||||
|
||||
static const int eint1[] = {
|
||||
0, /* No error */
|
||||
@@ -137,7 +139,9 @@ static const int eint2[] = {
|
||||
37, REG_EESCAPE, /* PCRE2 does not support \L, \l, \N{name}, \U, or \u */
|
||||
56, REG_INVARG, /* internal error: unknown newline setting */
|
||||
92, REG_INVARG, /* invalid option bits with PCRE2_LITERAL */
|
||||
99, REG_EESCAPE /* \K in lookaround */
|
||||
98, REG_EESCAPE, /* missing digit after \0 in NO_BS0 mode */
|
||||
99, REG_EESCAPE, /* \K in lookaround */
|
||||
102, REG_EESCAPE /* \ddd octal > \377 in PYTHON_OCTAL mode */
|
||||
};
|
||||
|
||||
/* Table of texts corresponding to POSIX error codes */
|
||||
@@ -191,7 +195,7 @@ if (preg != NULL && (int)preg->re_erroffset != -1)
|
||||
/* no need to deal with UB in snprintf */
|
||||
if (errbuf_size > INT_MAX) errbuf_size = INT_MAX;
|
||||
|
||||
/* there are 11 charactes between message and offset,
|
||||
/* there are 11 characters between message and offset;
|
||||
update message_len() if changed */
|
||||
ret = snprintf(errbuf, errbuf_size, "%s at offset %d", message,
|
||||
(int)preg->re_erroffset);
|
||||
@@ -207,6 +211,8 @@ else
|
||||
ret = (int)len;
|
||||
}
|
||||
|
||||
PCRE2_ASSERT(len > 0 || preg != NULL);
|
||||
|
||||
do {
|
||||
if (ret < 0)
|
||||
{
|
||||
|
||||
@@ -1,209 +0,0 @@
|
||||
/*************************************************
|
||||
* PCRE2 POSIX interface test program *
|
||||
*************************************************/
|
||||
|
||||
/*
|
||||
Written by Philip Hazel, December 2022
|
||||
Copyright (c) 2022
|
||||
File last edited: December 2022
|
||||
|
||||
This program tests the POSIX wrapper to the PCRE2 regular expression library.
|
||||
The main PCRE2 test program is pcre2test, which also tests these function
|
||||
calls. This little program is needed to test the case where the client includes
|
||||
pcre2posix.h but not pcre2.h, mainly to make sure that it builds successfully.
|
||||
However, the code is written as a flexible test program to which extra tests
|
||||
can be added.
|
||||
|
||||
Compile with -lpcre2-posix -lpcre2-8
|
||||
|
||||
If run with no options, there is no output on success, and the return code is
|
||||
zero. If any test fails there is output to stderr, and the return code is 1.
|
||||
|
||||
For testing purposes, the "-v" option causes verification output to be written
|
||||
to stdout. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <pcre2posix.h>
|
||||
|
||||
#define CAPCOUNT 5 /* Number of captures supported */
|
||||
#define PRINTF if (v) printf /* Shorthand for testing output */
|
||||
|
||||
/* This vector contains compiler flags for each pattern that is tested. */
|
||||
|
||||
static int cflags[] = {
|
||||
0, /* Test 0 */
|
||||
REG_ICASE, /* Test 1 */
|
||||
0, /* Test 2 */
|
||||
REG_NEWLINE, /* Test 3 */
|
||||
0 /* Test 4 */
|
||||
};
|
||||
|
||||
/* This vector contains match flags for each pattern that is tested. */
|
||||
|
||||
static int mflags[] = {
|
||||
0, /* Test 0 */
|
||||
0, /* Test 1 */
|
||||
0, /* Test 2 */
|
||||
REG_NOTBOL, /* Test 3 */
|
||||
0 /* Test 4 */
|
||||
};
|
||||
|
||||
/* Automate the number of patterns */
|
||||
|
||||
#define count (int)(sizeof(cflags)/sizeof(int))
|
||||
|
||||
/* The data for each pattern consists of a pattern string, followed by any
|
||||
number of subject strings, terminated by NULL. Some tests share data, but use
|
||||
different flags. */
|
||||
|
||||
static const char *data0_1[] = { "posix", "lower posix", "upper POSIX", NULL };
|
||||
static const char *data2_3[] = { "(*LF)^(cat|dog)", "catastrophic\ncataclysm",
|
||||
"dogfight", "no animals", NULL };
|
||||
static const char *data4[] = { "*badpattern", NULL };
|
||||
|
||||
/* Index the data strings */
|
||||
|
||||
static char **data[] = {
|
||||
(char **)(&data0_1),
|
||||
(char **)(&data0_1),
|
||||
(char **)(&data2_3),
|
||||
(char **)(&data2_3),
|
||||
(char **)(&data4)
|
||||
};
|
||||
|
||||
/* The expected results for each pattern consist of a compiler return code,
|
||||
optionally followed, for each subject string, by a match return code and, for a
|
||||
successful match, up to CAPCOUNT pairs of returned match data. */
|
||||
|
||||
static int results0[] = {
|
||||
0, /* Compiler rc */
|
||||
0, 6, 11, /* 1st match */
|
||||
REG_NOMATCH /* 2nd match */
|
||||
};
|
||||
|
||||
static int results1[] = {
|
||||
0, /* Compiler rc */
|
||||
0, 6, 11, /* 1st match */
|
||||
0, 6, 11 /* 2nd match */
|
||||
};
|
||||
|
||||
static int results2[] = {
|
||||
0, /* Compiler rc */
|
||||
0, 0, 3, 0, 3, /* 1st match */
|
||||
0, 0, 3, 0, 3, /* 2nd match */
|
||||
REG_NOMATCH /* 3rd match */
|
||||
};
|
||||
|
||||
static int results3[] = {
|
||||
0, /* Compiler rc */
|
||||
0, 13, 16, 13, 16, /* 1st match */
|
||||
REG_NOMATCH, /* 2nd match */
|
||||
REG_NOMATCH /* 3rd match */
|
||||
};
|
||||
|
||||
static int results4[] = {
|
||||
REG_BADRPT /* Compiler rc */
|
||||
};
|
||||
|
||||
/* Index the result vectors */
|
||||
|
||||
static int *results[] = {
|
||||
(int *)(&results0),
|
||||
(int *)(&results1),
|
||||
(int *)(&results2),
|
||||
(int *)(&results3),
|
||||
(int *)(&results4)
|
||||
};
|
||||
|
||||
/* And here is the program */
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
regex_t re;
|
||||
regmatch_t match[CAPCOUNT];
|
||||
int v = argc > 1 && strcmp(argv[1], "-v") == 0;
|
||||
|
||||
PRINTF("Test of pcre2posix.h without pcre2.h\n");
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
char *pattern = data[i][0];
|
||||
char **subjects = data[i] + 1;
|
||||
int *rd = results[i];
|
||||
int rc = regcomp(&re, pattern, cflags[i]);
|
||||
|
||||
PRINTF("Pattern: %s flags=0x%02x\n", pattern, cflags[i]);
|
||||
|
||||
if (rc != *rd)
|
||||
{
|
||||
fprintf(stderr, "Unexpected compile error %d (expected %d)\n", rc, *rd);
|
||||
fprintf(stderr, "Pattern is: %s\n", pattern);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (rc != 0)
|
||||
{
|
||||
if (v)
|
||||
{
|
||||
char buffer[256];
|
||||
(void)regerror(rc, &re, buffer, sizeof(buffer));
|
||||
PRINTF("Compile error %d: %s (expected)\n", rc, buffer);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
for (; *subjects != NULL; subjects++)
|
||||
{
|
||||
rc = regexec(&re, *subjects, CAPCOUNT, match, mflags[i]);
|
||||
|
||||
PRINTF("Subject: %s\n", *subjects);
|
||||
PRINTF("Return: %d", rc);
|
||||
|
||||
if (rc != *(++rd))
|
||||
{
|
||||
PRINTF("\n");
|
||||
fprintf(stderr, "Unexpected match error %d (expected %d)\n", rc, *rd);
|
||||
fprintf(stderr, "Pattern is: %s\n", pattern);
|
||||
fprintf(stderr, "Subject is: %s\n", *subjects);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (rc == 0)
|
||||
{
|
||||
for (int j = 0; j < CAPCOUNT; j++)
|
||||
{
|
||||
regmatch_t *m = match + j;
|
||||
if (m->rm_so < 0) continue;
|
||||
if (m->rm_so != *(++rd) || m->rm_eo != *(++rd))
|
||||
{
|
||||
PRINTF("\n");
|
||||
fprintf(stderr, "Mismatched results for successful match\n");
|
||||
fprintf(stderr, "Pattern is: %s\n", pattern);
|
||||
fprintf(stderr, "Subject is: %s\n", *subjects);
|
||||
fprintf(stderr, "Result %d: expected %d %d received %d %d\n",
|
||||
j, rd[-1], rd[0], m->rm_so, m->rm_eo);
|
||||
return 1;
|
||||
}
|
||||
PRINTF(" (%d %d %d)", j, m->rm_so, m->rm_eo);
|
||||
}
|
||||
}
|
||||
|
||||
else if (v)
|
||||
{
|
||||
char buffer[256];
|
||||
(void)regerror(rc, &re, buffer, sizeof(buffer));
|
||||
PRINTF(": %s (expected)", buffer);
|
||||
}
|
||||
|
||||
PRINTF("\n");
|
||||
}
|
||||
|
||||
regfree(&re);
|
||||
}
|
||||
|
||||
PRINTF("End of test\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* End of pcre2posix_test.c */
|
||||
1152
libpcre/vms/configure.com
Normal file
1152
libpcre/vms/configure.com
Normal file
File diff suppressed because it is too large
Load Diff
20
libpcre/vms/openvms_readme.txt
Normal file
20
libpcre/vms/openvms_readme.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
This is directory for OpenVMS support,
|
||||
provided shared and static library,
|
||||
pcre2grep utility also.
|
||||
|
||||
Requires:
|
||||
bzip2 library : http://vaxvms.org/clamav/
|
||||
zlib library : http://vaxvms.org/libsdl/required.html
|
||||
|
||||
|
||||
To build the library please:
|
||||
|
||||
@[.VMS]CONFIGURE.COM
|
||||
@BUILD
|
||||
|
||||
After build, PCRE2$STARTUP.COM has been created
|
||||
it should be started before use (good place from LOGIN.COM)
|
||||
|
||||
Feel free to contact:
|
||||
alexey@vaxman.de
|
||||
Alexey Chupahin
|
||||
12
libpcre/vms/pcre2.h_patch
Normal file
12
libpcre/vms/pcre2.h_patch
Normal file
@@ -0,0 +1,12 @@
|
||||
#define _pcre2_default_compile_context_ vms_pcre2_def_cmpl_cntxt_
|
||||
#define _pcre2_default_convert_context_ vms_pcre2_def_cnvrt_cntxt_
|
||||
#define pcre2_set_compile_extra_options_8 vms_pcre2_set_cmpl_ext_opt_8
|
||||
#define pcre2_set_compile_recursion_guard_8 vms_pcre2_set_cmpl_rcrs_grd_8
|
||||
#define pcre2_set_recursion_memory_management_8 vms_pcre2_set_rcrs_mem_mng_8
|
||||
#define pcre2_match_data_create_from_pattern_8 vms_pcre2_m_d_crt_fr_patt_8
|
||||
#define pcre2_get_match_data_heapframes_size_8 vms_pcre2_get_m_d_hpfram_s_8
|
||||
#define pcre2_serialize_get_number_of_codes_8 vms_pcre2_ser_get_n_of_cod_8
|
||||
#define pcre2_substring_nametable_scan_8 vms_pcre2_substr_nmtab_scan_8
|
||||
#define pcre2_substring_length_bynumber_8 vms_pcre2_substr_len_bynum_8
|
||||
#define pcre2_substring_number_from_name_8 vms_pcre2_substr_num_f_nam_8
|
||||
#define pcre2_set_max_pattern_compiled_length vms_pcre2_set_max_pat_cmpl_len
|
||||
9
libpcre/vms/stdint.h
Normal file
9
libpcre/vms/stdint.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef MY_VMS_STDINT
|
||||
#define MY_VMS_STDINT
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#define SIZE_MAX UINT_MAX
|
||||
#define UINT32_MAX 4294967295u
|
||||
#define UINT16_MAX (65535)
|
||||
#endif
|
||||
Reference in New Issue
Block a user