Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mkunidata « ctype « libc « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4adf667efcc1f26196167efdb5909f83d3163682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /bin/sh

echo Generating Unicode character properties data for newlib/libc/ctype

cd `dirname $0`

#############################################################################
# checks and (with option -u) download

case "$1" in
-h)	echo "Usage: $0 [-h|-u|-i]"
	echo "Generate case conversion table caseconv.t and character category table categories.t"
	echo "from local Unicode file UnicodeData.txt."
	echo ""
	echo "Options:"
	echo "  -u    download file from unicode.org first"
	echo "  -i    copy file from /usr/share/unicode/ucd first"
	echo "  -h    show this"
	exit
	;;
-u)
	wget () {
		ref=`basename $1`
		ref=`ls "$ref" 2> /dev/null || echo 01-Jan-1970`
		curl -R -O --connect-timeout 55 -z "$ref" "$1"
	}

	echo downloading data from unicode.org
	for data in UnicodeData.txt
	do	wget http://unicode.org/Public/UNIDATA/$data
	done
	;;
-i)
	echo copying data from /usr/share/unicode/ucd
	for data in UnicodeData.txt
	do	cp /usr/share/unicode/ucd/$data .
	done
	;;
esac

echo checking Unicode data file
for data in UnicodeData.txt
do	if [ -r $data ]
	then	true
	else	echo $data not available, skipping table generation
		exit
	fi
done

#############################################################################
# table generation

echo generating character category table for "isw*.c"
	sh ./mkcategories

echo generating case conversion table for "tow*.c"
	sh ./mkcaseconv

#############################################################################
# end