summaryrefslogtreecommitdiff
path: root/genhash.pl
diff options
context:
space:
mode:
authorhpa <hpa>2003-02-25 00:52:20 +0000
committerhpa <hpa>2003-02-25 00:52:20 +0000
commitaf428784d8226d967809736eb2e2fd9099f1b2d5 (patch)
tree1d346ab2b49d7279e81d8d7abf5b7d407e6a2192 /genhash.pl
parent7c2884271d2c536f78d7a447eafd544b3378bf25 (diff)
downloadsyslinux-af428784d8226d967809736eb2e2fd9099f1b2d5.tar.gz
Actually support comment lines.
Diffstat (limited to 'genhash.pl')
-rwxr-xr-xgenhash.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/genhash.pl b/genhash.pl
index a0d9bc21..6fab579c 100755
--- a/genhash.pl
+++ b/genhash.pl
@@ -5,6 +5,9 @@
while ( defined($keywd = <STDIN>) ) {
chomp $keywd;
+
+ ($keywd,$keywdname) = split(/\s+/, $keywd);
+ $keywdname = $keywd unless ( $keywdname );
$l = length($keywd);
$h = 0;
@@ -17,5 +20,5 @@ while ( defined($keywd = <STDIN>) ) {
$h, $keywd, $seenhash{$h};
}
$seenhash{$h} = $keywd;
- printf("%-23s equ 0x%08x\n", "hash_\L${keywd}\E", $h);
+ printf("%-23s equ 0x%08x\n", "hash_${keywdname}", $h);
}