Allow specifying table-base.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3660 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-10-25 05:24:52 +00:00
parent 3367bfadcd
commit 714be60e59
2 changed files with 12 additions and 4 deletions

View File

@@ -8,8 +8,12 @@
$1 == "error_table" || $1 == "et" { $1 == "error_table" || $1 == "et" {
name = $2 name = $2
base = 0 base = 0
for(i = 1; i <= length(name); i++){ if(NF < 3)
base = base * 64 + index("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_", substr(name, i, 1)) base_str = name
else
base_str = $3
for(i = 1; i <= length(base_str); i++){
base = base * 64 + index("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_", substr(base_str, i, 1))
} }
base *= 256 base *= 256
if(base >= 2147483648){ # 0x80000000 if(base >= 2147483648){ # 0x80000000

View File

@@ -8,8 +8,12 @@
$1 == "error_table" || $1 == "et" { $1 == "error_table" || $1 == "et" {
name = $2 name = $2
base = 0 base = 0
for(i = 1; i <= length(name); i++){ if(NF < 3)
base = base * 64 + index("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_", substr(name, i, 1)) base_str = name
else
base_str = $3
for(i = 1; i <= length(base_str); i++){
base = base * 64 + index("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_", substr(base_str, i, 1))
} }
base *= 256 base *= 256
if(base >= 2147483648){ # 0x80000000 if(base >= 2147483648){ # 0x80000000