1 |
#! /usr/bin/perl -w |
#! /usr/bin/perl -w |
2 |
|
|
3 |
# This is a Perl script to create the table of character properties. For |
# This is a Perl script to create the table of character properties. For |
4 |
# information on the format, see ucpinternal.h. The Unicode files are |
# information on the format, see ucpinternal.h. The Unicode files are expected |
5 |
# expected to be in maintain/Unicode.tables/{Scripts,UnicodeData}.txt. The |
# to be in Unicode.tables/{Scripts,UnicodeData}.txt. The ../ucp.h file is also |
6 |
# ucp.h file is also required. The table is written to the standard output. |
# required. The table is written to the standard output. |
7 |
|
|
8 |
# The script is rather slow because it just searches linearly through the |
# The script is rather slow because it just searches linearly through the |
9 |
# Scripts data in order to find the script for each character or character |
# Scripts data in order to find the script for each character or character |
98 |
# Now read the ucp.h file to get the values for the general categories |
# Now read the ucp.h file to get the values for the general categories |
99 |
# and for the scripts. |
# and for the scripts. |
100 |
|
|
101 |
open(IN, "ucp.h") || die "Can't open ucp.h: $!\n"; |
open(IN, "../ucp.h") || die "Can't open ../ucp.h: $!\n"; |
102 |
|
|
103 |
while (<IN>) { last if /^enum/; } |
while (<IN>) { last if /^enum/; } |
104 |
while (<IN>) { last if /^enum/; } |
while (<IN>) { last if /^enum/; } |