@@ -269,9 +269,9 @@ library. They are also documented in the pcre2build man page.
269269
270270 --enable-rebuild-chartables
271271
272- a program called dftables is compiled and run in the default C locale when
273- you obey "make". It builds a source file called pcre2_chartables.c. If you do
274- not specify this option, pcre2_chartables.c is created as a copy of
272+ a program called pcre2_dftables is compiled and run in the default C locale
273+ when you obey "make". It builds a source file called pcre2_chartables.c. If
274+ you do not specify this option, pcre2_chartables.c is created as a copy of
275275 pcre2_chartables.c.dist. See "Character tables" below for further
276276 information.
277277
@@ -548,21 +548,22 @@ Cross-compiling using autotools
548548
549549You can specify CC and CFLAGS in the normal way to the "configure" command, in
550550order to cross-compile PCRE2 for some other host. However, you should NOT
551- specify --enable-rebuild-chartables, because if you do, the dftables.c source
552- file is compiled and run on the local host, in order to generate the inbuilt
553- character tables (the pcre2_chartables.c file). This will probably not work,
554- because dftables .c needs to be compiled with the local compiler, not the cross
555- compiler.
551+ specify --enable-rebuild-chartables, because if you do, the pcre2_dftables.c
552+ source file is compiled and run on the local host, in order to generate the
553+ inbuilt character tables (the pcre2_chartables.c file). This will probably not
554+ work, because pcre2_dftables .c needs to be compiled with the local compiler,
555+ not the cross compiler.
556556
557557When --enable-rebuild-chartables is not specified, pcre2_chartables.c is
558558created by making a copy of pcre2_chartables.c.dist, which is a default set of
559559tables that assumes ASCII code. Cross-compiling with the default tables should
560560not be a problem.
561561
562562If you need to modify the character tables when cross-compiling, you should
563- move pcre2_chartables.c.dist out of the way, then compile dftables.c by hand
564- and run it on the local host to make a new version of pcre2_chartables.c.dist.
565- Then when you cross-compile PCRE2 this new version of the tables will be used.
563+ move pcre2_chartables.c.dist out of the way, then compile pcre2_dftables.c by
564+ hand and run it on the local host to make a new version of
565+ pcre2_chartables.c.dist. See the pcre2build section "Creating character tables
566+ at build time" for more details.
566567
567568
568569Making new tarballs
@@ -721,8 +722,8 @@ compile context.
721722The source file called pcre2_chartables.c contains the default set of tables.
722723By default, this is created as a copy of pcre2_chartables.c.dist, which
723724contains tables for ASCII coding. However, if --enable-rebuild-chartables is
724- specified for ./configure, a different version of pcre2_chartables.c is built
725- by the program dftables (compiled from dftables .c), which uses the ANSI C
725+ specified for ./configure, a new version of pcre2_chartables.c is built by the
726+ program pcre2_dftables (compiled from pcre2_dftables .c), which uses the ANSI C
726727character handling functions such as isalnum(), isalpha(), isupper(),
727728islower(), etc. to build the table sources. This means that the default C
728729locale that is set for your system will control the contents of these default
@@ -732,32 +733,31 @@ file does not get automatically re-generated. The best way to do this is to
732733move pcre2_chartables.c.dist out of the way and replace it with your customized
733734tables.
734735
735- When the dftables program is run as a result of --enable-rebuild-chartables,
736- it uses the default C locale that is set on your system. It does not pay
737- attention to the LC_xxx environment variables. In other words, it uses the
738- system's default locale rather than whatever the compiling user happens to have
739- set. If you really do want to build a source set of character tables in a
740- locale that is specified by the LC_xxx variables, you can run the dftables
741- program by hand with the -L option. For example:
736+ When the pcre2_dftables program is run as a result of specifying
737+ --enable-rebuild-chartables, it uses the default C locale that is set on your
738+ system. It does not pay attention to the LC_xxx environment variables. In other
739+ words, it uses the system's default locale rather than whatever the compiling
740+ user happens to have set. If you really do want to build a source set of
741+ character tables in a locale that is specified by the LC_xxx variables, you can
742+ run the pcre2_dftables program by hand with the -L option. For example:
742743
743- ./dftables -L pcre2_chartables.c.special
744+ ./pcre2_dftables -L pcre2_chartables.c.special
744745
745- The first two 256-byte tables provide lower casing and case flipping functions,
746- respectively. The next table consists of three 32-byte bit maps which identify
747- digits, "word" characters, and white space, respectively. These are used when
748- building 32-byte bit maps that represent character classes for code points less
749- than 256. The final 256-byte table has bits indicating various character types,
750- as follows:
746+ The second argument names the file where the source code for the tables is
747+ written. The first two 256-byte tables provide lower casing and case flipping
748+ functions, respectively. The next table consists of a number of 32-byte bit
749+ maps which identify certain character classes such as digits, "word"
750+ characters, white space, etc. These are used when building 32-byte bit maps
751+ that represent character classes for code points less than 256. The final
752+ 256-byte table has bits indicating various character types, as follows:
751753
752754 1 white space character
753755 2 letter
754- 4 decimal digit
755- 8 hexadecimal digit
756+ 4 lower case letter
757+ 8 decimal digit
756758 16 alphanumeric or '_'
757- 128 regular expression metacharacter or binary zero
758759
759- You should not alter the set of characters that contain the 128 bit, as that
760- will cause PCRE2 to malfunction.
760+ See also the pcre2build section "Creating character tables at build time".
761761
762762
763763File manifest
@@ -768,7 +768,7 @@ The distribution should contain the files listed below.
768768(A) Source files for the PCRE2 library functions and their headers are found in
769769 the src directory:
770770
771- src/dftables.c auxiliary program for building pcre2_chartables.c
771+ src/pcre2_dftables.c auxiliary program for building pcre2_chartables.c
772772 when --enable-rebuild-chartables is specified
773773
774774 src/pcre2_chartables.c.dist a default set of character tables that assume
@@ -894,4 +894,4 @@ The distribution should contain the files listed below.
894894Philip Hazel
895895Email local part: ph10
896896Email domain: cam.ac.uk
897- Last updated: 16 April 2019
897+ Last updated: 20 March 2020
0 commit comments