diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-09-05 22:07:01 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-09-05 22:07:01 +0200 |
commit | bff9867dafed1bf5aa196614ec6cf2c83022c482 (patch) | |
tree | 13260e2b0cd22ff5327f9a56be748739ae5754ca /src/make_unicode_property.sh | |
parent | a38d6e8f8417b777925660269969ce2d353808ef (diff) | |
parent | c9b3c26db59d89e320a6eb86d9558051ecba0900 (diff) |
Update upstream source from tag 'upstream/6.9.0'
Update to upstream version '6.9.0'
with Debian dir 3b2adce63a2dab0d7e0e9124b922c348d239c1ec
Diffstat (limited to 'src/make_unicode_property.sh')
-rwxr-xr-x | src/make_unicode_property.sh | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/make_unicode_property.sh b/src/make_unicode_property.sh index 1e57674..2aab41b 100755 --- a/src/make_unicode_property.sh +++ b/src/make_unicode_property.sh @@ -1,19 +1,25 @@ #!/bin/sh NAME=unicode_property_data -TMP=gperf.tmp -#GPERF_OPT='-P -Q prop_name_pool -C -c -t -j1 -L ANSI-C --ignore-case' +TMP1=gperf1.tmp +TMP2=gperf2.tmp +TMP= +GPERF=/usr/bin/gperf + 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' +POOL_CAST='s/\(int *\)\(size_t *\)&\(\(struct +unicode_prop_name_pool_t *\* *\) *0\)->unicode_prop_name_pool_str([^,]+)/pool_offset(\1)/g' +ADD_STATIC='s/(const +struct +PoolPropertyNameCtype +\*)/static \1/' +ADD_CAST='s/unsigned +int +hval *= *len/unsigned int hval = (unsigned int )len/' ./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} | 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} | sed -r "${POOL_CAST}" > ${NAME}_posix.c +${GPERF} ${GPERF_OPT} -N unicode_lookup_property_name --output-file ${TMP1} ${NAME}.gperf +cat ${TMP1} | sed -e 's/^#line.*$//g' | sed -r "${POOL_CAST}" | sed -r "${ADD_STATIC}" | sed -r "${ADD_CAST}" > ${NAME}.c + +${GPERF} ${GPERF_OPT} -N unicode_lookup_property_name --output-file ${TMP2} ${NAME}_posix.gperf +cat ${TMP2} | sed -e 's/^#line.*$//g' | sed -r "${POOL_CAST}" | sed -r "${ADD_STATIC}" > ${NAME}_posix.c -rm -f ${NAME}.gperf ${NAME}_posix.gperf ${TMP} +rm -f ${NAME}.gperf ${NAME}_posix.gperf ${TMP1} ${TMP2} exit 0 |