Skip to content

Commit 7b011c2

Browse files
committed
Rename files which are #included
1 parent 929b740 commit 7b011c2

22 files changed

+55
-83
lines changed

BUILD.bazel

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ copy_file(
2020
out = "src/pcre2_chartables.c",
2121
)
2222

23-
# Removed src/pcre2_ucptables.c below because it is #included in
24-
# src/pcre2_tables.c. Also fixed typo: ckdint should be chkdint.
25-
# PH, 22-March-2023.
2623
cc_library(
2724
name = "pcre2",
2825
srcs = [
@@ -39,12 +36,15 @@ cc_library(
3936
"src/pcre2_extuni.c",
4037
"src/pcre2_find_bracket.c",
4138
"src/pcre2_jit_compile.c",
39+
"src/pcre2_jit_match_inc.h",
40+
"src/pcre2_jit_misc_inc.h",
4241
"src/pcre2_maketables.c",
4342
"src/pcre2_match.c",
4443
"src/pcre2_match_data.c",
4544
"src/pcre2_newline.c",
4645
"src/pcre2_ord2utf.c",
4746
"src/pcre2_pattern_info.c",
47+
"src/pcre2_printint_inc.h",
4848
"src/pcre2_script_run.c",
4949
"src/pcre2_serialize.c",
5050
"src/pcre2_string_utils.c",
@@ -60,13 +60,11 @@ cc_library(
6060
"src/pcre2_internal.h",
6161
"src/pcre2_intmodedep.h",
6262
"src/pcre2_ucp.h",
63+
"src/pcre2_ucptables_inc.h",
6364
"src/pcre2_util.h",
6465
":config_h_generic",
6566
],
6667
textual_hdrs = [
67-
"src/pcre2_jit_match.c",
68-
"src/pcre2_jit_misc.c",
69-
"src/pcre2_ucptables.c",
7068
],
7169
hdrs = [
7270
":pcre2_h_generic",
@@ -119,7 +117,6 @@ cc_library(
119117
name = "pcre2test_dotc_headers",
120118
hdrs = [
121119
"src/pcre2_chkdint.c",
122-
"src/pcre2_printint.c",
123120
"src/pcre2_tables.c",
124121
"src/pcre2_ucd.c",
125122
"src/pcre2_valid_utf.c",

Makefile.am

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,8 @@ COMMON_SOURCES = \
404404
src/pcre2_intmodedep.h \
405405
src/pcre2_jit_char_inc.h \
406406
src/pcre2_jit_compile.c \
407+
src/pcre2_jit_match_inc.h \
408+
src/pcre2_jit_misc_inc.h \
407409
src/pcre2_jit_neon_inc.h \
408410
src/pcre2_jit_simd_inc.h \
409411
src/pcre2_maketables.c \
@@ -412,6 +414,7 @@ COMMON_SOURCES = \
412414
src/pcre2_newline.c \
413415
src/pcre2_ord2utf.c \
414416
src/pcre2_pattern_info.c \
417+
src/pcre2_printint_inc.h \
415418
src/pcre2_script_run.c \
416419
src/pcre2_serialize.c \
417420
src/pcre2_string_utils.c \
@@ -421,14 +424,11 @@ COMMON_SOURCES = \
421424
src/pcre2_tables.c \
422425
src/pcre2_ucd.c \
423426
src/pcre2_ucp.h \
427+
src/pcre2_ucptables_inc.h \
424428
src/pcre2_util.h \
425429
src/pcre2_valid_utf.c \
426430
src/pcre2_xclass.c
427431

428-
# The pcre2_ucptables.c file is #included by pcre2_tables.c
429-
430-
EXTRA_DIST += src/pcre2_ucptables.c
431-
432432
if WITH_PCRE2_8
433433
lib_LTLIBRARIES += libpcre2-8.la
434434
libpcre2_8_la_SOURCES = \
@@ -520,12 +520,6 @@ EXTRA_DIST += \
520520
deps/sljit/sljit_src/allocator_src/sljitWXExecAllocatorPosix.c \
521521
deps/sljit/sljit_src/allocator_src/sljitWXExecAllocatorWindows.c
522522

523-
# Some of the JIT sources are also in separate files that are #included.
524-
525-
EXTRA_DIST += \
526-
src/pcre2_jit_match.c \
527-
src/pcre2_jit_misc.c
528-
529523
if WITH_PCRE2_8
530524
libpcre2_8_la_LDFLAGS = $(EXTRA_LIBPCRE2_8_LDFLAGS)
531525
endif # WITH_PCRE2_8
@@ -681,12 +675,9 @@ pcre2_jit_test_LDADD += $(GCOV_LIBS)
681675
endif # WITH_GCOV
682676
endif # WITH_JIT
683677

684-
# Build the general pcre2test program. The file src/pcre2_printint.c is
685-
# #included by pcre2test as many times as needed, at different code unit
686-
# widths.
678+
# Build the general pcre2test program.
687679

688680
bin_PROGRAMS += pcre2test
689-
EXTRA_DIST += src/pcre2_printint.c
690681
pcre2test_SOURCES = src/pcre2test.c
691682
pcre2test_CFLAGS = $(AM_CFLAGS)
692683
pcre2test_LDADD = $(LIBREADLINE)

NON-AUTOTOOLS-BUILD

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ example.
143143
defined SUPPORT_JIT in src/config.h, because when JIT support is not
144144
configured, dummy functions are compiled. When JIT support IS configured,
145145
pcre2_jit_compile.c #includes other files from the sljit dependency,
146-
all of whose names begin with "sljit". It also #includes
147-
src/pcre2_jit_match.c and src/pcre2_jit_misc.c, so you should not compile
148-
those yourself.
146+
all of whose names begin with "sljit".
149147

150148
Note also that the pcre2_fuzzsupport.c file contains special code that is
151149
useful to those who want to run fuzzing tests on the PCRE2 library. Unless

README

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -860,10 +860,8 @@ The distribution should contain the files listed below.
860860
src/pcre2_extuni.c )
861861
src/pcre2_find_bracket.c )
862862
src/pcre2_jit_compile.c )
863-
src/pcre2_jit_match.c ) sources for the functions in the library,
864-
src/pcre2_jit_misc.c ) and some internal functions that they use
865-
src/pcre2_maketables.c )
866-
src/pcre2_match.c )
863+
src/pcre2_maketables.c ) sources for the functions in the library,
864+
src/pcre2_match.c ) and some internal functions that they use
867865
src/pcre2_match_data.c )
868866
src/pcre2_newline.c )
869867
src/pcre2_ord2utf.c )
@@ -876,11 +874,9 @@ The distribution should contain the files listed below.
876874
src/pcre2_substring.c )
877875
src/pcre2_tables.c )
878876
src/pcre2_ucd.c )
879-
src/pcre2_ucptables.c )
880877
src/pcre2_valid_utf.c )
881878
src/pcre2_xclass.c )
882879

883-
src/pcre2_printint.c debugging function that is used by pcre2test,
884880
src/pcre2_fuzzsupport.c function for (optional) fuzzing support
885881

886882
src/config.h.in template for config.h, when built by "configure"
@@ -890,9 +886,13 @@ The distribution should contain the files listed below.
890886
src/pcre2_internal.h header for internal use
891887
src/pcre2_intmodedep.h a mode-specific internal header
892888
src/pcre2_jit_char_inc.h header used by JIT
889+
src/pcre2_jit_match_inc.h header used by JIT
890+
src/pcre2_jit_misc_inc.h header used by JIT
893891
src/pcre2_jit_neon_inc.h header used by JIT
894892
src/pcre2_jit_simd_inc.h header used by JIT
893+
src/pcre2_printint_inc.h debugging function that is used by pcre2test
895894
src/pcre2_ucp.h header for Unicode property handling
895+
src/pcre2_ucptables_inc.h header with Unicode data tables
896896
src/pcre2_util.h header for internal utils
897897

898898
deps/sljit/sljit_src/* source files for the JIT compiler

doc/html/NON-AUTOTOOLS-BUILD.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ example.
143143
defined SUPPORT_JIT in src/config.h, because when JIT support is not
144144
configured, dummy functions are compiled. When JIT support IS configured,
145145
pcre2_jit_compile.c #includes other files from the sljit dependency,
146-
all of whose names begin with "sljit". It also #includes
147-
src/pcre2_jit_match.c and src/pcre2_jit_misc.c, so you should not compile
148-
those yourself.
146+
all of whose names begin with "sljit".
149147

150148
Note also that the pcre2_fuzzsupport.c file contains special code that is
151149
useful to those who want to run fuzzing tests on the PCRE2 library. Unless

doc/html/README.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -860,10 +860,8 @@ The distribution should contain the files listed below.
860860
src/pcre2_extuni.c )
861861
src/pcre2_find_bracket.c )
862862
src/pcre2_jit_compile.c )
863-
src/pcre2_jit_match.c ) sources for the functions in the library,
864-
src/pcre2_jit_misc.c ) and some internal functions that they use
865-
src/pcre2_maketables.c )
866-
src/pcre2_match.c )
863+
src/pcre2_maketables.c ) sources for the functions in the library,
864+
src/pcre2_match.c ) and some internal functions that they use
867865
src/pcre2_match_data.c )
868866
src/pcre2_newline.c )
869867
src/pcre2_ord2utf.c )
@@ -876,11 +874,9 @@ The distribution should contain the files listed below.
876874
src/pcre2_substring.c )
877875
src/pcre2_tables.c )
878876
src/pcre2_ucd.c )
879-
src/pcre2_ucptables.c )
880877
src/pcre2_valid_utf.c )
881878
src/pcre2_xclass.c )
882879

883-
src/pcre2_printint.c debugging function that is used by pcre2test,
884880
src/pcre2_fuzzsupport.c function for (optional) fuzzing support
885881

886882
src/config.h.in template for config.h, when built by "configure"
@@ -890,9 +886,13 @@ The distribution should contain the files listed below.
890886
src/pcre2_internal.h header for internal use
891887
src/pcre2_intmodedep.h a mode-specific internal header
892888
src/pcre2_jit_char_inc.h header used by JIT
889+
src/pcre2_jit_match_inc.h header used by JIT
890+
src/pcre2_jit_misc_inc.h header used by JIT
893891
src/pcre2_jit_neon_inc.h header used by JIT
894892
src/pcre2_jit_simd_inc.h header used by JIT
893+
src/pcre2_printint_inc.h debugging function that is used by pcre2test
895894
src/pcre2_ucp.h header for Unicode property handling
895+
src/pcre2_ucptables_inc.h header with Unicode data tables
896896
src/pcre2_util.h header for internal utils
897897

898898
deps/sljit/sljit_src/* source files for the JIT compiler

maint/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ucptest
22
utf8
33

44
pcre2_ucp.h
5-
pcre2_ucptables.c
5+
pcre2_ucptables_inc.h
66
pcre2_ucd.c
77

88
testinput

maint/GenerateUcpTables.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# PCRE2 UNICODE PROPERTY SUPPORT
44
# ------------------------------
55

6-
# This script generates the pcre2_ucptables.c file, which contains tables for
6+
# This script generates the pcre2_ucptables_inc.h file, which contains tables for
77
# recognizing Unicode property names. It is #included by pcre2_tables.c. In
88
# order to reduce the number of relocations when loading the PCRE2 library, the
99
# names are held as a single large string, with offsets in the table. This is
@@ -60,7 +60,7 @@
6060
# Open the output file (no return on failure). This call also writes standard
6161
# header boilerplate.
6262

63-
f = open_output("pcre2_ucptables.c")
63+
f = open_output("pcre2_ucptables_inc.h")
6464

6565
# The list in bidi_classes contains just the Unicode classes such as AN, LRE,
6666
# etc., along with comments. We need to add "bidi" in front of each value, in
@@ -195,7 +195,7 @@ def stdnames(x):
195195
196196
#endif /* SUPPORT_UNICODE */
197197
198-
/* End of pcre2_ucptables.c */
198+
/* End of pcre2_ucptables_inc.h */
199199
""")
200200

201201
f.close

maint/README

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ GenerateUcpHeader.py
5656
Unicode property values.
5757

5858
GenerateUcpTables.py
59-
A Python script that generates the file pcre2_ucptables.c from
59+
A Python script that generates the file pcre2_ucptables_inc.h from
6060
GenerateCommon.py and Unicode data files. The generated file contains tables
6161
for looking up Unicode property names.
6262

@@ -145,17 +145,17 @@ of supported scripts, and the command to do so is part of the documentation.
145145
You can give an output file name as an argument to the following scripts, but
146146
by default:
147147

148-
GenerateUcd.py creates pcre2_ucd.c )
149-
GenerateUcpHeader.py creates pcre2_ucp.h ) in the current directory
150-
GenerateUcpTables.py creates pcre2_ucptables.c )
148+
GenerateUcd.py creates pcre2_ucd.c )
149+
GenerateUcpHeader.py creates pcre2_ucp.h ) in the current directory
150+
GenerateUcpTables.py creates pcre2_ucptables_inc.h )
151151

152152
These files can be compared against the existing versions in the src directory
153153
to check on any changes before replacing the old files, but you can also
154154
generate directly into the final location by running:
155155

156156
./GenerateUcd.py ../src/pcre2_ucd.c
157157
./GenerateUcpHeader.py ../src/pcre2_ucp.h
158-
./GenerateUcpTables.py ../src/pcre2_ucptables.c
158+
./GenerateUcpTables.py ../src/pcre2_ucptables_inc.h
159159

160160
Once the .c and .h files are in the ../src directory, the ucptest program can
161161
be compiled and used to check that the new tables work properly. The data files
@@ -176,7 +176,7 @@ In summary:
176176
```
177177
./GenerateUcd.py ../src/pcre2_ucd.c
178178
./GenerateUcpHeader.py ../src/pcre2_ucp.h
179-
./GenerateUcpTables.py ../src/pcre2_ucptables.c
179+
./GenerateUcpTables.py ../src/pcre2_ucptables_inc.h
180180
./GenerateTest.py
181181
mv testinput ../testdata/testinput27
182182
mv testoutput ../testdata/testoutput27

maint/UpdateAlways

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ c_files=(
282282
src/pcre2_intmodedep.h
283283
src/pcre2_jit_char_inc.h
284284
src/pcre2_jit_compile.c
285-
src/pcre2_jit_match.c
286-
src/pcre2_jit_misc.c
285+
src/pcre2_jit_match_inc.h
286+
src/pcre2_jit_misc_inc.h
287287
src/pcre2_jit_neon_inc.h
288288
src/pcre2_jit_simd_inc.h
289289
src/pcre2_jit_test.c
@@ -293,7 +293,7 @@ c_files=(
293293
src/pcre2_newline.c
294294
src/pcre2_ord2utf.c
295295
src/pcre2_pattern_info.c
296-
src/pcre2_printint.c
296+
src/pcre2_printint_inc.h
297297
src/pcre2_script_run.c
298298
src/pcre2_serialize.c
299299
src/pcre2_string_utils.c
@@ -303,7 +303,7 @@ c_files=(
303303
src/pcre2_tables.c
304304
src/pcre2_ucd.c
305305
src/pcre2_ucp.h
306-
src/pcre2_ucptables.c
306+
src/pcre2_ucptables_inc.h
307307
src/pcre2_util.h
308308
src/pcre2_valid_utf.c
309309
src/pcre2_xclass.c

0 commit comments

Comments
 (0)