summaryrefslogtreecommitdiff
path: root/src/make_unicode_property.sh
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 16:55:14 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 16:55:14 +0100
commit7bd40e53626a0ec5621fc5b71cfaf5956b4e6ba9 (patch)
tree4c62db42cffb80511f26e1168a6f54aba5815422 /src/make_unicode_property.sh
parent4fdc47601d9e68343fa6818beda4c6a2012baccd (diff)
parent98ab313fe496ae7c792db29c80bf6b23347484ff (diff)
Update upstream source from tag 'upstream/6.7.0'
Update to upstream version '6.7.0' with Debian dir 14acc711c745d23b05fab9587ac8849fefa02c06
Diffstat (limited to 'src/make_unicode_property.sh')
-rwxr-xr-xsrc/make_unicode_property.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/make_unicode_property.sh b/src/make_unicode_property.sh
index 5ee2990..1e57674 100755
--- a/src/make_unicode_property.sh
+++ b/src/make_unicode_property.sh
@@ -3,15 +3,16 @@
NAME=unicode_property_data
TMP=gperf.tmp
#GPERF_OPT='-P -Q prop_name_pool -C -c -t -j1 -L ANSI-C --ignore-case'
-GPERF_OPT='-T -C -c -t -j1 -L ANSI-C --ignore-case'
+GPERF_OPT='-T -C -c -t -j1 -L ANSI-C --ignore-case --pic -Q unicode_prop_name_pool'
+POOL_CAST='s/\(int *\)\(long *\)&\(\(struct +unicode_prop_name_pool_t *\* *\) *0\)->unicode_prop_name_pool_str([^,]+)/pool_offset(\1)/g'
./make_unicode_property_data.py > ${NAME}.gperf
./make_unicode_property_data.py -posix > ${NAME}_posix.gperf
gperf ${GPERF_OPT} -N unicode_lookup_property_name --output-file ${TMP} ${NAME}.gperf
-sed -e 's/^#line.*$//g' ${TMP} > ${NAME}.c
+sed -e 's/^#line.*$//g' ${TMP} | sed -r "${POOL_CAST}" > ${NAME}.c
gperf ${GPERF_OPT} -N unicode_lookup_property_name --output-file ${TMP} ${NAME}_posix.gperf
-sed -e 's/^#line.*$//g' ${TMP} > ${NAME}_posix.c
+sed -e 's/^#line.*$//g' ${TMP} | sed -r "${POOL_CAST}" > ${NAME}_posix.c
rm -f ${NAME}.gperf ${NAME}_posix.gperf ${TMP}