Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 lines
868 B

#
# dirclass_verify.pl
#
# [email protected]
# 31 Jul 1998
#
# Checks the validity of the directional classifications file generated by
# dirclass_extract.pl.
#
%dirlist = ();
$last = -1;
while (<>)
{
/^([0-9a-fA-F]{4}) (\w\w\w)/;
$char = hex($1);
$dir = $2;
if ($char != $last + 1)
{
$error = sprintf("List out of order at character %d\n", $char);
die($error);
}
if (!($dir =~ /^(UNK|LTR|RTL|ARA|WSP|NEU|SEG|BLK|ANM|ENM|ETM|ESP|CSP|FMT|CBN)$/))
{
$error = sprintf("Unknown classification '%s' for character %d\n", $dir, $char);
die($error);
}
$dirlist{$dir}++;
$last++;
}
$cchTotal = 0;
while (($dir, $cch) = each(%dirlist))
{
printf("%s\t%s\n", $dir, $cch);
$cchTotal += $cch;
}
printf("\n%d total characters\n", $cchTotal);