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 |);
8 my ($code, undef, $category, undef, undef, $decompose, undef) = split /;/;
10 push @cat_z, $code if $category =~ /^Z/;
13 $type = $decompose =~ s/^<(.*)>\s*// ? $1 : "none";
15 next unless $docom{$type};
16 next unless $decompose =~ /^([0-9a-f]+) ([0-9a-f]+)$/i;
17 my $pfx = sprintf "%08d %08d %08d", hex $1, hex $2, hex $code;
18 push @compose, [$pfx, hex $1, hex $2, hex $code];
22 open TABLE, ">", "table/compose.h"
23 or die "table/compose.h: $!";
27 // AUTOMATICALLLY GENERATED by gencompose
30 struct rxvt_compose_entry {
32 } rxvt_compose_table[] = {
33 #ifdef ENCODING_COMPOSE
36 for (sort { $a->[0] cmp $b->[0] } @compose) {
37 next if $seen{$_->[1],$_->[2]}++;
38 printf TABLE " { 0x%05x, 0x%05x, 0x%05x },\n", $_->[1], $_->[2], $_->[3];
47 open TABLE_Z, ">", "table/category.h";
51 // AUTOMATICALLLY GENERATED by gencompose
54 #define IS_SPACE(c) \\
58 print TABLE_Z " (c) == 0x$_ || \\\n";