X-Git-Url: https://git.hcoop.net/hcoop/debian/courier-authlib.git/blobdiff_plain/6b9221b9fe5c2b44c301ca08a987d99b4add7a06..5459351437f2b7b2a08457e5397f8a8381986ffe:/libs/unicode/mkwordbreak.pl diff --git a/libs/unicode/mkwordbreak.pl b/libs/unicode/mkwordbreak.pl deleted file mode 100644 index 859050f..0000000 --- a/libs/unicode/mkwordbreak.pl +++ /dev/null @@ -1,52 +0,0 @@ -#! /usr/bin/perl -# -# Compile WordBreak.txt into C array declarations. -# -# The array's structure is [firstchar, lastchar, class], giving the -# linebreaking "class" for unicode character range firstchar-lastchar. -# -# The ranges are sorted in numerical order. -# -# An array gets generated for each block of 4096 unicode characters. -# -# Finally, two arrays get declared: a pointer to an array for each 4096 -# unicode character block, and the number of elements in the array. -# -# The pointer is NULL for each block of 4096 unicode characters that is not -# defined in WordBreak.txt - -use strict; -use warnings; -use mkcommon; - -my $obj=mkcommon->new; - -open(F, ")) -{ - chomp; - - next unless /^([0-9A-F]+)(\.\.([0-9A-F]+))?\s*\;\s*([^\s]+)\s*/; - - my $f=$1; - my $l=$3; - my $t=$4; - - $l=$f unless $l; - - eval "\$f=0x$f"; - eval "\$l=0x$l"; - - push @table, [$f, $l, $t]; -} - -grep { - - $obj->range($$_[0], $$_[1], "UNICODE_WB_$$_[2]"); - -} sort { $$a[0] <=> $$b[0] } @table; - -$obj->output;