blob: d1a21bc03dcb816e48416c35fc6442470d719593 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#! /bin/sh
2echo "static const uint32_t to_ucs4[256] = {"
3sed -ne '/^[^[:space:]]*[[:space:]]*.x00/d;/^END/q' \
4 -e 's/^<U\(....\)>[[:space:]]*.x\(..\).*/ [0x\2] = 0x\1,/p' \
5 "$@" | sort -u
6echo "};"
7echo "static const char from_ucs4[] = {"
8sed -ne '/^[^[:space:]]*[[:space:]]*.x00/d;/^END/q' \
9 -e 's/^<U\(....\)>[[:space:]]*.x\(..\).*/ [0x\1] = 0x\2,/p' \
10 "$@" | sort -u
11echo "};"