Skip to content

Commit adb6158

Browse files
committed
Rename files which are #included
1 parent 0d0ac3a commit adb6158

21 files changed

+53
-69
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 = [
@@ -38,12 +35,15 @@ cc_library(
3835
"src/pcre2_extuni.c",
3936
"src/pcre2_find_bracket.c",
4037
"src/pcre2_jit_compile.c",
38+
"src/pcre2_jit_match.h",
39+
"src/pcre2_jit_misc.h",
4140
"src/pcre2_maketables.c",
4241
"src/pcre2_match.c",
4342
"src/pcre2_match_data.c",
4443
"src/pcre2_newline.c",
4544
"src/pcre2_ord2utf.c",
4645
"src/pcre2_pattern_info.c",
46+
"src/pcre2_printint.h",
4747
"src/pcre2_script_run.c",
4848
"src/pcre2_serialize.c",
4949
"src/pcre2_string_utils.c",
@@ -59,13 +59,11 @@ cc_library(
5959
"src/pcre2_internal.h",
6060
"src/pcre2_intmodedep.h",
6161
"src/pcre2_ucp.h",
62+
"src/pcre2_ucptables.h",
6263
"src/pcre2_util.h",
6364
":config_h_generic",
6465
],
6566
textual_hdrs = [
66-
"src/pcre2_jit_match.c",
67-
"src/pcre2_jit_misc.c",
68-
"src/pcre2_ucptables.c",
6967
],
7068
hdrs = [
7169
":pcre2_h_generic",
@@ -118,7 +116,6 @@ cc_library(
118116
name = "pcre2test_dotc_headers",
119117
hdrs = [
120118
"src/pcre2_chkdint.c",
121-
"src/pcre2_printint.c",
122119
"src/pcre2_tables.c",
123120
"src/pcre2_ucd.c",
124121
"src/pcre2_valid_utf.c",

Makefile.am

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,8 @@ COMMON_SOURCES = \
402402
src/pcre2_intmodedep.h \
403403
src/pcre2_jit_char_inc.h \
404404
src/pcre2_jit_compile.c \
405+
src/pcre2_jit_match.h \
406+
src/pcre2_jit_misc.h \
405407
src/pcre2_jit_neon_inc.h \
406408
src/pcre2_jit_simd_inc.h \
407409
src/pcre2_maketables.c \
@@ -410,6 +412,7 @@ COMMON_SOURCES = \
410412
src/pcre2_newline.c \
411413
src/pcre2_ord2utf.c \
412414
src/pcre2_pattern_info.c \
415+
src/pcre2_printint.h \
413416
src/pcre2_script_run.c \
414417
src/pcre2_serialize.c \
415418
src/pcre2_string_utils.c \
@@ -419,14 +422,11 @@ COMMON_SOURCES = \
419422
src/pcre2_tables.c \
420423
src/pcre2_ucd.c \
421424
src/pcre2_ucp.h \
425+
src/pcre2_ucptables.h \
422426
src/pcre2_util.h \
423427
src/pcre2_valid_utf.c \
424428
src/pcre2_xclass.c
425429

426-
# The pcre2_ucptables.c file is #included by pcre2_tables.c
427-
428-
EXTRA_DIST += src/pcre2_ucptables.c
429-
430430
if WITH_PCRE2_8
431431
lib_LTLIBRARIES += libpcre2-8.la
432432
libpcre2_8_la_SOURCES = \
@@ -518,12 +518,6 @@ EXTRA_DIST += \
518518
deps/sljit/sljit_src/allocator_src/sljitWXExecAllocatorPosix.c \
519519
deps/sljit/sljit_src/allocator_src/sljitWXExecAllocatorWindows.c
520520

521-
# Some of the JIT sources are also in separate files that are #included.
522-
523-
EXTRA_DIST += \
524-
src/pcre2_jit_match.c \
525-
src/pcre2_jit_misc.c
526-
527521
if WITH_PCRE2_8
528522
libpcre2_8_la_LDFLAGS = $(EXTRA_LIBPCRE2_8_LDFLAGS)
529523
endif # WITH_PCRE2_8
@@ -679,12 +673,9 @@ pcre2_jit_test_LDADD += $(GCOV_LIBS)
679673
endif # WITH_GCOV
680674
endif # WITH_JIT
681675

682-
# Build the general pcre2test program. The file src/pcre2_printint.c is
683-
# #included by pcre2test as many times as needed, at different code unit
684-
# widths.
676+
# Build the general pcre2test program.
685677

686678
bin_PROGRAMS += pcre2test
687-
EXTRA_DIST += src/pcre2_printint.c
688679
pcre2test_SOURCES = src/pcre2test.c
689680
pcre2test_CFLAGS = $(AM_CFLAGS)
690681
pcre2test_LDADD = $(LIBREADLINE)

NON-AUTOTOOLS-BUILD

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

149147
Note also that the pcre2_fuzzsupport.c file contains special code that is
150148
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
@@ -859,10 +859,8 @@ The distribution should contain the files listed below.
859859
src/pcre2_extuni.c )
860860
src/pcre2_find_bracket.c )
861861
src/pcre2_jit_compile.c )
862-
src/pcre2_jit_match.c ) sources for the functions in the library,
863-
src/pcre2_jit_misc.c ) and some internal functions that they use
864-
src/pcre2_maketables.c )
865-
src/pcre2_match.c )
862+
src/pcre2_maketables.c ) sources for the functions in the library,
863+
src/pcre2_match.c ) and some internal functions that they use
866864
src/pcre2_match_data.c )
867865
src/pcre2_newline.c )
868866
src/pcre2_ord2utf.c )
@@ -875,11 +873,9 @@ The distribution should contain the files listed below.
875873
src/pcre2_substring.c )
876874
src/pcre2_tables.c )
877875
src/pcre2_ucd.c )
878-
src/pcre2_ucptables.c )
879876
src/pcre2_valid_utf.c )
880877
src/pcre2_xclass.c )
881878

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

885881
src/config.h.in template for config.h, when built by "configure"
@@ -889,9 +885,13 @@ The distribution should contain the files listed below.
889885
src/pcre2_internal.h header for internal use
890886
src/pcre2_intmodedep.h a mode-specific internal header
891887
src/pcre2_jit_char_inc.h header used by JIT
888+
src/pcre2_jit_match.h header used by JIT
889+
src/pcre2_jit_misc.h header used by JIT
892890
src/pcre2_jit_neon_inc.h header used by JIT
893891
src/pcre2_jit_simd_inc.h header used by JIT
892+
src/pcre2_printint.h debugging function that is used by pcre2test
894893
src/pcre2_ucp.h header for Unicode property handling
894+
src/pcre2_ucptables.h header with Unicode data tables
895895
src/pcre2_util.h header for internal utils
896896

897897
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
@@ -142,9 +142,7 @@ example.
142142
defined SUPPORT_JIT in src/config.h, because when JIT support is not
143143
configured, dummy functions are compiled. When JIT support IS configured,
144144
pcre2_jit_compile.c #includes other files from the sljit dependency,
145-
all of whose names begin with "sljit". It also #includes
146-
src/pcre2_jit_match.c and src/pcre2_jit_misc.c, so you should not compile
147-
those yourself.
145+
all of whose names begin with "sljit".
148146

149147
Note also that the pcre2_fuzzsupport.c file contains special code that is
150148
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
@@ -859,10 +859,8 @@ The distribution should contain the files listed below.
859859
src/pcre2_extuni.c )
860860
src/pcre2_find_bracket.c )
861861
src/pcre2_jit_compile.c )
862-
src/pcre2_jit_match.c ) sources for the functions in the library,
863-
src/pcre2_jit_misc.c ) and some internal functions that they use
864-
src/pcre2_maketables.c )
865-
src/pcre2_match.c )
862+
src/pcre2_maketables.c ) sources for the functions in the library,
863+
src/pcre2_match.c ) and some internal functions that they use
866864
src/pcre2_match_data.c )
867865
src/pcre2_newline.c )
868866
src/pcre2_ord2utf.c )
@@ -875,11 +873,9 @@ The distribution should contain the files listed below.
875873
src/pcre2_substring.c )
876874
src/pcre2_tables.c )
877875
src/pcre2_ucd.c )
878-
src/pcre2_ucptables.c )
879876
src/pcre2_valid_utf.c )
880877
src/pcre2_xclass.c )
881878

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

885881
src/config.h.in template for config.h, when built by "configure"
@@ -889,9 +885,13 @@ The distribution should contain the files listed below.
889885
src/pcre2_internal.h header for internal use
890886
src/pcre2_intmodedep.h a mode-specific internal header
891887
src/pcre2_jit_char_inc.h header used by JIT
888+
src/pcre2_jit_match.h header used by JIT
889+
src/pcre2_jit_misc.h header used by JIT
892890
src/pcre2_jit_neon_inc.h header used by JIT
893891
src/pcre2_jit_simd_inc.h header used by JIT
892+
src/pcre2_printint.h debugging function that is used by pcre2test
894893
src/pcre2_ucp.h header for Unicode property handling
894+
src/pcre2_ucptables.h header with Unicode data tables
895895
src/pcre2_util.h header for internal utils
896896

897897
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.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.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.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.h */
199199
""")
200200

201201
f.close

maint/README

Lines changed: 4 additions & 4 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.h from
6060
GenerateCommon.py and Unicode data files. The generated file contains tables
6161
for looking up Unicode property names.
6262

@@ -147,15 +147,15 @@ by default:
147147

148148
GenerateUcd.py creates pcre2_ucd.c )
149149
GenerateUcpHeader.py creates pcre2_ucp.h ) in the current directory
150-
GenerateUcpTables.py creates pcre2_ucptables.c )
150+
GenerateUcpTables.py creates pcre2_ucptables.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.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.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
@@ -281,8 +281,8 @@ c_files=(
281281
src/pcre2_intmodedep.h
282282
src/pcre2_jit_char_inc.h
283283
src/pcre2_jit_compile.c
284-
src/pcre2_jit_match.c
285-
src/pcre2_jit_misc.c
284+
src/pcre2_jit_match.h
285+
src/pcre2_jit_misc.h
286286
src/pcre2_jit_neon_inc.h
287287
src/pcre2_jit_simd_inc.h
288288
src/pcre2_jit_test.c
@@ -292,7 +292,7 @@ c_files=(
292292
src/pcre2_newline.c
293293
src/pcre2_ord2utf.c
294294
src/pcre2_pattern_info.c
295-
src/pcre2_printint.c
295+
src/pcre2_printint.h
296296
src/pcre2_script_run.c
297297
src/pcre2_serialize.c
298298
src/pcre2_string_utils.c
@@ -302,7 +302,7 @@ c_files=(
302302
src/pcre2_tables.c
303303
src/pcre2_ucd.c
304304
src/pcre2_ucp.h
305-
src/pcre2_ucptables.c
305+
src/pcre2_ucptables.h
306306
src/pcre2_util.h
307307
src/pcre2_valid_utf.c
308308
src/pcre2_xclass.c

0 commit comments

Comments
 (0)