]> git.saurik.com Git - wxWidgets.git/blame - misc/unictabl/mk_fallbacks.sh
Applied patch [ 1331340 ] faster Drawing of Polygons and Polylines
[wxWidgets.git] / misc / unictabl / mk_fallbacks.sh
CommitLineData
045c4fab
VS
1#!/bin/sh
2# CVS-ID: $Id$
3
4
5add_fallback()
6{
7 echo " - for $3..."
8 cat _tmp3 | grep "$1" | while read i ; do
9 code=`echo $i | cut -c1-6`
10 echo "$code $2" >> _tmp5
11 done
12}
13
14
15echo " * getting list of needed unicode characters..."
16
17cat mappings/*.TXT | sed -n '/^0x../p' | \
18 cut -f2,4 | sort | uniq | sed -n '/^0x/p' > _tmp1
19cat _tmp1 | cut -f1 | sort | uniq > _tmp2
20
21
22echo " * making unique list of unicode characters meanings..."
23
24rm -f _tmp3
25cat _tmp2 | while read i ; do
26 sed -n "/^$i/p" _tmp1 | (read t ; echo "$t" >> _tmp3)
27done
28
29cp _tmp3 UnicodeChars
30
31echo " * creating one-byte fallback tables..."
32
33rm -f Fallbacks _tmp5
34
35echo " - for latin capital letters..."
36
37cat _tmp3 | grep 'LATIN CAPITAL LETTER [A-Z]$' > _tmp6
38cat _tmp3 | grep 'LATIN CAPITAL LETTER [A-Z] WITH' >> _tmp6
39cat _tmp6 | sort +2 > _tmp4
40
41cat _tmp4 | while read i ; do
42 code=`echo $i | cut -c1-6`
43 fallb=`echo $i | cut -c8-29`
44 cat _tmp4 | fgrep "$fallb" | cut -c1-6 | (read i ;
45 echo "$code $i" >> _tmp5)
46done
47
48
49echo " - for latin small letters..."
50
51cat _tmp3 | grep 'LATIN SMALL LETTER [A-Z]$' > _tmp6
52cat _tmp3 | grep 'LATIN SMALL LETTER [A-Z] WITH' >> _tmp6
53cat _tmp6 | sort +2 > _tmp4
54
55cat _tmp4 | while read i ; do
56 code=`echo $i | cut -c1-6`
57 fallb=`echo $i | cut -c8-27`
58 cat _tmp4 | fgrep "$fallb" | cut -c1-6 | (read i ;
59 echo "$code $i" >> _tmp5)
60done
61
62
63add_fallback "DOUBLE .*QUOTATION MARK" "0x0022" "double quotations"
64add_fallback "SINGLE .*QUOTATION MARK" "0x0027" "single quotations"
65add_fallback "DASH" "0x002D" "dashes"
66
67
68
69echo " * removing infinite loops from fallback tables..."
70
71cat _tmp5 | grep -v '\(0x....\) \1' | sort > Fallbacks
72
73rm -f _tmp1 _tmp2 _tmp3 _tmp4 _tmp5 _tmp6
74