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["E"]=5
c2n["F"]=6
c2n["G"]=7
c2n["H"]=8
c2n["I"]=9
c2n["J"]=10
c2n["K"]=11
c2n["L"]=12
c2n["M"]=13
c2n["N"]=14
c2n["O"]=15
c2n["P"]=16
c2n["Q"]=17
c2n["R"]=18
c2n["S"]=19
c2n["T"]=20
c2n["U"]=21
c2n["V"]=22
c2n["W"]=23
c2n["X"]=24
c2n["Y"]=25
c2n["Z"]=26
c2n["a"]=27
c2n["b"]=28
c2n["c"]=29
c2n["d"]=30
c2n["e"]=31
c2n["f"]=32
c2n["g"]=33
c2n["h"]=34
c2n["i"]=35
c2n["j"]=36
c2n["k"]=37
c2n["l"]=38
c2n["m"]=39
c2n["n"]=40
c2n["o"]=41
c2n["p"]=42
c2n["q"]=43
c2n["r"]=44
c2n["s"]=45
c2n["t"]=46
c2n["u"]=47
c2n["v"]=48
c2n["w"]=49
c2n["x"]=50
c2n["y"]=51
c2n["z"]=52
c2n["0"]=53
c2n["1"]=54
c2n["2"]=55
c2n["3"]=56
c2n["4"]=57
c2n["5"]=58
c2n["6"]=59
c2n["7"]=60
c2n["8"]=61
c2n["9"]=62
c2n["_"]=63
}
/^#/ { next }
/^[ \t]*(error_table|et)[ \t]+[a-zA-Z][a-zA-Z0-9_]+/ {
	table_number = 0
	mod_base = 1000000
	if (NF > 2) {
	    table_name = $3
	    base_name = $2
	} else {
	    table_name = $2
	    base_name = table_name
	}
	for(i=1; i<=length(base_name); i++) {
	    table_number=(table_number*char_shift)+c2n[substr(base_name,i,1)]
	}
	# We start playing *_high, *low games here because the some
	# awk programs do not have the necessary precision (sigh)
	tab_base_low = table_number % mod_base
	if (tab_base_low < 0) {
		# Work around stupid bug in the ARM libm
		tab_base_low = tab_base_low + mod_base
	}
	tab_base_high = int(table_number / mod_base)
	tab_base_sign = 1;

	# figure out: table_number_base=table_number*256
	tab_base_low = tab_base_low * 256
	tab_base_high = (tab_base_high * 256) + \
			int(tab_base_low / mod_base)
	tab_base_low = tab_base_low % mod_base
	if (tab_base_low < 0) {
		# Work around stupid bug in the ARM libm
		tab_base_low = tab_base_low + mod_base
	}

	if (table_number > 128*256*256) {
		# figure out:  table_number_base -= 256*256*256*256
		# sub_high, sub_low is 256*256*256*256
		sub_low = 256*256*256 % mod_base
		sub_high = int(256*256*256 / mod_base)

		sub_low = sub_low * 256
		sub_high = (sub_high * 256) + int(sub_low / mod_base)
		sub_low = sub_low % mod_base

		tab_base_low = sub_low - tab_base_low;
		tab_base_high = sub_high - tab_base_high;
		tab_base_sign = -1;
		if (tab_base_low < 0) {
			tab_base_low = tab_base_low + mod_base
			tab_base_high--
		}
	}
	prefix_str = ""
	curr_idx = 0
	curr_low = tab_base_low
	curr_high = tab_base_high
	curr_sign = tab_base_sign
	print "/*" > outfile
	print " * " outfn ":" > outfile
	print " * This file is automatically generated; please do not edit it." > outfile
	print " */" > outfile
	print "" > outfile
	print "#include <et/com_err.h>" > outfile
	print "" > outfile
}

/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,/ {
	# Be tolerant to missing whitespace after `,' ...
	sub(/,/, ", ")

	tag=prefix_str substr($2,1,length($2)-1)
	if (curr_high == 0) {
		printf "#define %-40s (%dL)\n", tag, \
			curr_sign*curr_low > outfile
	} else {
		printf "#define %-40s (%d%06dL)\n", tag, curr_high*curr_sign, \
			curr_low > outfile
	}
	curr_low += curr_sign;
	curr_idx++;
	if (curr_low >= mod_base) {
		curr_low -= mod_base;
		curr_high++
	}
	if (curr_low < 0) {
		cur_low += mod_base
		cur_high--
	}
}

/^[ \t]*(prefix)$/ {
	prefix_str = ""
}

/^[ \t]*(prefix)[ \t]+[A-Z_0-9]+/ {
	prefix_str = $2 "_"
}

/^[ \t]*(index)[ \t]+[A-Z_0-9]+/ {
	new_idx = $2
	curr_low += curr_sign * (new_idx - curr_idx)
	curr_idx = new_idx
	if (curr_low >= mod_base) {
		curr_low -= mod_base;
		curr_high++
	}
	if (curr_low < 0) {
		cur_low += mod_base
		cur_high--
	}
}


END {
	print "extern const struct error_table et_" table_name "_error_table;" > outfile
	print "extern void initialize_" table_name "_error_table(void);" > outfile
	print "" > outfile
	print "/* For compatibility with Heimdal */" > outfile
	print "extern void initialize_" table_name "_error_table_r(struct et_list **list);" > outfile
	print "" > outfile
	if (tab_base_high == 0) {
		print "#define ERROR_TABLE_BASE_" table_name " (" \
			sprintf("%d", tab_base_sign*tab_base_low) \
			"L)" > outfile
	} else {
		print "#define ERROR_TABLE_BASE_" table_name " (" \
			sprintf("%d%06d", tab_base_sign*tab_base_high, \
			tab_base_low) "L)" > outfile
	}
	print "" > outfile
	print "/* for compatibility with older versions... */" > outfile
	print "#define init_" table_name "_err_tbl initialize_" table_name "_error_table" > outfile
	print "#define " table_name "_err_base ERROR_TABLE_BASE_" table_name > outfile
}

Directory Contents

Dirs: 0 × Files: 2

Name Size Perms Modified Actions
6.33 KB lrw-r--r-- 2020-03-21 04:24:04
Edit Download
4.43 KB lrw-r--r-- 2020-03-21 04:24:04
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI