blob: a879fc907583fbe68cf3c801e9880b9de2876017 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
LC_ALL=C
export LC_ALL
echo
echo Generating Unicode2ascii translation table.
(
cat 7bitrepl.lnx | awk -f tr7bit.awk >tmp
N=`cat tmp | wc -l`
echo '/* Automatically generated by gen-7b */'
echo
echo 'static struct { int x; unsigned char *s; } unicode_7b ['`expr $N + 1`'] = {'
sort tmp | sed 's/"/\\"/g' | sed 's/^/ { /' | sed 's/:/, "/' | sed 's/$/" },/'
echo ' { -1, NULL }'
echo '};'
echo
echo '#define N_UNICODE_7B' $N
)>../uni_7b.inc
rm -f tmp
echo Done.
echo
|