summaryrefslogtreecommitdiff
path: root/src/make_property.sh
blob: 1c5e0f58e21a690482e5e82de8aec28f2d992ba9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

GPERF=gperf
SED=sed

TMP1=gperf1.tmp
TMP2=gperf2.tmp

GPERF_OPT='-pt -T -L ANSI-C'

ADD_CAST='s/return +len +\+ +asso_values/return (unsigned int )len + asso_values/'

${GPERF} ${GPERF_OPT} -N onigenc_euc_jp_lookup_property_name --output-file ${TMP1} euc_jp_prop.gperf
cat ${TMP1} | ${SED} -r "${ADD_CAST}" > euc_jp_prop.c

${GPERF} ${GPERF_OPT} -N onigenc_sjis_lookup_property_name --output-file ${TMP2} sjis_prop.gperf
cat ${TMP2} | ${SED} -r "${ADD_CAST}" > sjis_prop.c

rm -f ${TMP1} ${TMP2}

exit 0