aboutsummaryrefslogtreecommitdiffstats
path: root/genhash.pl
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-05-29 15:11:38 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-05-29 15:11:38 -0700
commitb536209dfb7bd50c37061735fe10d2c19a97d26d (patch)
tree9d8ca6882fc5d9721fb0efea1abfd6dc09886814 /genhash.pl
parent3ec40a0119587f63411475c76c69f9db24c7598e (diff)
downloadsyslinux-elf-b536209dfb7bd50c37061735fe10d2c19a97d26d.tar.gz
syslinux-elf-b536209dfb7bd50c37061735fe10d2c19a97d26d.tar.xz
syslinux-elf-b536209dfb7bd50c37061735fe10d2c19a97d26d.zip
Move files out of root into core, dos, and utils
Move source files out of the root directory; the root is a mess and has become virtually unmaintainable. The Syslinux core now lives in core/; the Linux and generic utilities has moved into utils/, and copybs.com has moved into dos/; it had to go somewhere, and it seemed as good a place as any.
Diffstat (limited to 'genhash.pl')
-rwxr-xr-xgenhash.pl26
1 files changed, 0 insertions, 26 deletions
diff --git a/genhash.pl b/genhash.pl
deleted file mode 100755
index c79139fd..00000000
--- a/genhash.pl
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/perl
-#
-# Generate hash values for keywords
-#
-
-eval { use bytes; };
-
-while ( defined($keywd = <STDIN>) ) {
- chomp $keywd;
-
- ($keywd,$keywdname) = split(/\s+/, $keywd);
- $keywdname = $keywd unless ( $keywdname );
-
- $l = length($keywd);
- $h = 0;
- for ( $i = 0 ; $i < $l ; $i++ ) {
- $c = ord(substr($keywd,$i,1)) | 0x20;
- $h = ((($h << 5)|($h >> 27)) ^ $c) & 0xFFFFFFFF;
- }
- if ( $seenhash{$h} ) {
- printf STDERR "$0: hash collision (0x%08x) %s %s\n",
- $h, $keywd, $seenhash{$h};
- }
- $seenhash{$h} = $keywd;
- printf("%-23s equ 0x%08x\n", "hash_${keywdname}", $h);
-}