Commit | Line | Data |
---|---|---|
8d138742 CE |
1 | # Copyright 2000-2003 Double Precision, Inc. |
2 | # See COPYING for distribution information. | |
3 | # | |
4 | # $Id: charsetlist.pl,v 1.2 2003/03/07 00:47:31 mrsam Exp $ | |
5 | ||
6 | my @chset; | |
7 | my @structname; | |
8 | ||
9 | print "#include \"unicode_config.h\"\n"; | |
10 | print "#include \"unicode.h\"\n"; | |
11 | while (<>) | |
12 | { | |
13 | chomp; | |
14 | ||
15 | my ($chset, $structname)=split(/[ \t]+/); | |
16 | ||
17 | push @chset, $chset; | |
18 | push @structname, $structname; | |
19 | } | |
20 | ||
21 | for ($i=0; $i <= $#structname; $i++) | |
22 | { | |
23 | printf("extern const struct unicode_info $structname[$i];\n"); | |
24 | } | |
25 | ||
26 | print "const struct unicode_chsetlist unicode_chsetlist[] = {\n"; | |
27 | ||
28 | for ($i=0; $i <= $#structname; $i++) | |
29 | { | |
30 | printf("{\"$chset[$i]\", &$structname[$i]},\n"); | |
31 | } | |
32 | ||
33 | printf("{0,0}};\n"); |