5 echo " * compiling C source generator..."
7 cc mk_ctable.c
-o mk_ctable
9 echo " * writing copyright info..."
14 * This file is #included by encconv.cpp
18 * *** *** CAUTION! *** ***
19 * Do not modify this file by hand! It is generated by shell
20 * script \$(WXWIN)/misc/unictabl/regenerate
22 * Parts of this file are based on tables published by Unicode, Inc.
23 * Original tables are freely available at
24 * ftp://ftp.unicode.org/Public/MAPPINGS
26 * Original copyright info as present in mapping tables follows:
29 * Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved.
31 * This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
32 * No claims are made as to fitness for any particular purpose. No
33 * warranties of any kind are expressed or implied. The recipient
34 * agrees to determine applicability of information provided. If this
35 * file has been provided on optical media by Unicode, Inc., the sole
36 * remedy for any claim will be exchange of defective media within 90
39 * Unicode, Inc. hereby grants the right to freely use the information
40 * supplied in this file in the creation of products supporting the
41 * Unicode Standard, and to make copies of this file in any form for
42 * internal or external distribution as long as this notice remains
49 echo " * creating C tables..."
53 for i
in mappings
/*.TXT
; do
55 enc
=`echo $i | cut -c10- | tr - _ | sed 's/\.TXT//g' |\
56 sed 's/8859_\(.*\)/ISO8859_\1/g
58 cat $i | sed -n '/^0x...0x..../p' | cut
-f1,2 | \
59 .
/mk_ctable
$i $enc >> unictabl.inc
60 all_encodings
="$all_encodings $enc"
67 echo " * adding fallback..."
76 * Unicode to 7bit ASCII fallback
77 * (for use with wxRECODE_SUBSTITUTE recoding mode)
83 wxUint8 s /*inaccurate substitution*/;
84 } encoding_unicode_fallback[] = {
87 cat Fallbacks
| while read i
; do
88 code
=`echo "$i" | cut -f1`
89 subs
=`echo "$i" | cut -f2 | cut -c1-2,5-6`
90 echo " {$code, $subs}," >> unictabl.inc
92 echo " {0, 0}" >> unictabl.inc
93 echo " };" >> unictabl.inc
95 static const unsigned encoding_unicode_fallback_count = "`cat Fallbacks | wc -l`";" >> unictabl.inc
98 echo " * adding reference table..."
107 * Table of all supported encodings:
111 static const struct {
112 wxFontEncoding encoding; // encoding identifier
113 const wxUint16 *table; // 8bit to unicode table
114 } encodings_list[] = {
117 for i
in $all_encodings ; do
118 echo " { wxFONTENCODING_$i, encoding_table__$i}," >> unictabl.inc
121 echo " {wxFONTENCODING_MAX /*anything*/, NULL}" >> unictabl.inc
122 echo " };" >> unictabl.inc