Update.
[glibc.git] / iconvdata / gen-8bit-gap.sh
blobfd05a6b935f5c4b37d8a50328e6ece8f7af5e226
1 #! /bin/sh
2 echo "static const uint32_t to_ucs4[256] = {"
3 sed -e '/^[^[:space:]]*[[:space:]]*.x00/d' \
4 -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/ [0x\1] = 0x\2,/p' \
5 -e d "$@" | \
6 sort -u
7 echo "};"
8 echo "static const struct gap from_idx[] = {"
9 sed -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/0x\2 0x\1/p' \
10 -e d "$@" | \
11 sort -u | $PERL gap.pl
12 echo " { start: 0xffff, end: 0xffff, idx: 0 }"
13 echo "};"
14 echo "static const char from_ucs4[] = {"
15 sed -e 's/^[^[:space:]]*[[:space:]]*.x\(..\)[[:space:]]*<U\(....\)>.*/0x\2 0x\1/p' \
16 -e d "$@" | \
17 sort -u | $PERL gaptab.pl
18 echo "};"