diff options
| author | Sam Varshavchik | 2015-07-26 21:34:21 -0400 |
|---|---|---|
| committer | Sam Varshavchik | 2015-07-26 21:34:21 -0400 |
| commit | f1bd3147e4df1bda680a7ecbfeca5699eed7788f (patch) | |
| tree | f70a304d7f34ee14277ebe93ac0460d720751a37 /unicode/mkscripts.pl | |
| parent | 19309085193effe5d231fa3c99e8f9c33fdc2b4f (diff) | |
| download | courier-libs-f1bd3147e4df1bda680a7ecbfeca5699eed7788f.tar.bz2 | |
courier-unicode: implement tn36 (unicode_category_lookup).
Diffstat (limited to 'unicode/mkscripts.pl')
| -rwxr-xr-x | unicode/mkscripts.pl | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/unicode/mkscripts.pl b/unicode/mkscripts.pl index 2d0d8ec..3e936a1 100755 --- a/unicode/mkscripts.pl +++ b/unicode/mkscripts.pl @@ -63,15 +63,6 @@ while (defined($_=<F>)) push @table, [$f, $l, "unicode_script_" . lc($s)]; } -open(F, "<courier-unicode.h") or die; - -my @unicode_h=<F>; -close(F); - -my ($f, $l) = grep { $unicode_h[$_] =~ /UNICODE_SCRIPT_T/ } (0..$#unicode_h); - -die unless $f && $l; - my @repl = map { "\tunicode_script_" . lc($_) . ",\n"; } sort { @@ -82,12 +73,10 @@ unshift @repl, "\tunicode_script_unknown,\n"; $repl[$#repl] =~ s/,//; -splice @unicode_h, $f+1, $l-$f-2, @repl; - -open(F, ">courier-unicode.h.tmp") or die; -print F join("", @unicode_h); +open(F, ">courier-unicode-script-tab.h.tmp") or die; +print F join("", @repl); close(F) or die; -rename("courier-unicode.h.tmp", "courier-unicode.h") or die; +rename("courier-unicode-script-tab.h.tmp", "courier-unicode-script-tab.h") or die; grep { |
