Blob Blame History Raw
#!/bin/sh

printf '#define __NTAPI_HASH_TABLE %s\n' '\'

N=0; for f in $(cat NTHASH); do
	HASH="0x$(printf "%s\n" $f | mdso -c32 - | cut -d' ' -f1)";
	printf "\t{0x%08x,\t(%d)},\t/* %s */ %s\n" $HASH $N $f '\';
	N=$((N + 1));
done | sort -k2 -g

printf '\n#define __NT_IMPORTED_SYMBOLS_ARRAY_SIZE\t%d\n' "$(cat NTHASH | wc -l)"