3 open UNIDATA, "<", "www.unicode.org/Public/UNIDATA/UnicodeData.txt"
4 or die "www.unicode.org/Public/UNIDATA/UnicodeData.txt: $!";
5 #my %docom = qw(initial | medial | final | isolated | compat | none |); #+ arabic
6 my %docom = qw(compat | none |);
9 my ($code, undef, $category, undef, undef, $decompose, undef) = split /;/;
11 push @cat_z, $code if $category =~ /^Z/;
14 $type = $decompose =~ s/^<(.*)>\s*// ? $1 : "none";
16 next unless $docom{$type};
17 next unless $decompose =~ /^([0-9a-f]+) ([0-9a-f]+)$/i;
18 my $pfx = sprintf "%08d %08d %08d", hex $1, hex $2, hex $code;
19 push @compose, [$pfx, hex $1, hex $2, hex $code];
23 open TABLE, ">", "table/compose.h"
24 or die "table/compose.h: $!";
28 // AUTOMATICALLLY GENERATED by gencompose
31 struct rxvt_compose_entry {
33 } rxvt_compose_table[] = {
34 #ifdef ENCODING_COMPOSE
37 for (sort { $a->[0] cmp $b->[0] } @compose) {
38 next if $seen{$_->[1],$_->[2]}++;
39 printf TABLE " { 0x%05x, 0x%05x, 0x%05x },\n", $_->[1], $_->[2], $_->[3];
48 open TABLE_Z, ">", "table/category.h";
52 // AUTOMATICALLLY GENERATED by gencompose
55 #define IS_SPACE(c) \\
59 print TABLE_Z " (c) == 0x$_ || \\\n";