mirror of
https://github.com/rkd77/elinks.git
synced 2024-10-14 05:53:36 -04:00
a6886634bc
The .data section of src/intl/charsets.o is only 40 bytes now. Inspired by bug 381.
21 lines
564 B
Bash
Executable File
21 lines
564 B
Bash
Executable File
#!/bin/sh
|
|
|
|
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 '/* DO NOT EDIT THIS FILE! EDIT Unicode/7bitrepl.lnx INSTEAD! */'
|
|
echo
|
|
echo 'static const struct { unicode_val_T x; unsigned char *s; } unicode_7b ['`expr $N + 1`'] = {'
|
|
sort tmp | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed 's/^/ {/' | sed 's/:/, "/' | sed 's/$/"},/'
|
|
echo ' {-1, NULL}'
|
|
echo '};'
|
|
echo
|
|
echo '#define N_UNICODE_7B' $N
|
|
)>../src/intl/uni_7b.inc
|
|
rm -f tmp
|
|
echo Done.
|
|
echo
|