Debian Codegraph @

Unicode/gen-7b

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