aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/string/mkwidthA
blob: 343ab4016dbed80758498ac49995deb977b48095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/sh

# generate WIDTH-A file, listing Unicode characters with width property
# Ambiguous, from EastAsianWidth.txt

if [ ! -r EastAsianWidth.txt ]
then	ln -s /usr/share/unicode/ucd/EastAsianWidth.txt . || exit 1
fi
if [ ! -r UnicodeData.txt ]
then	ln -s /usr/share/unicode/ucd/UnicodeData.txt . || exit 1
fi
if [ ! -r Blocks.txt ]
then	ln -s /usr/share/unicode/ucd/Blocks.txt . || exit 1
fi

sed -e "s,^\([^;]*\);A,\1," -e t -e d EastAsianWidth.txt > width-a-new
rm -f WIDTH-A
echo "# UAX #11: East Asian Ambiguous" > WIDTH-A
PATH="$PATH:." uniset +width-a-new compact >> WIDTH-A
rm -f width-a-new