NEWS for ELinks 0.11.5
[elinks/elinks-j605.git] / Unicode / gen-7b
blob41a746d53fecfcfedf17c8c92e70c692a1a5e2b2
1 #!/bin/sh
3 echo
4 echo Generating Unicode2ascii translation table.
6 cat 7bitrepl.lnx | awk -f tr7bit.awk >tmp
7 N=`cat tmp | wc -l`
8 echo '/* Automatically generated by gen-7b */'
9 echo '/* DO NOT EDIT THIS FILE! EDIT Unicode/7bitrepl.lnx INSTEAD! */'
10 echo
11 echo 'struct { unicode_val_T x; unsigned char *s; } unicode_7b ['`expr $N + 1`'] = {'
12 sort tmp | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed 's/^/ {/' | sed 's/:/, "/' | sed 's/$/"},/'
13 echo ' {-1, NULL}'
14 echo '};'
15 echo
16 echo '#define N_UNICODE_7B' $N
17 )>../src/intl/uni_7b.inc
18 rm -f tmp
19 echo Done.
20 echo