File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / usr.lib / libM / expd.awk
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (6 years, 11 months ago) by root
Branches: bsd, MAIN
CVS tags: v12b, HEAD
Power 6/32 Unix version 1.2b

cat $* | sed -e "s/\(.*\)\(........\)/0x\1, 0x\2/" | awk '
	BEGIN {
		printf "struct doubleword {\n"
		printf "\tunsigned lw0,\n"
		printf "\t         lw1;\n"
		printf "};\n\n"
	}
	{
	if (NR == 1) {
		printf "struct doublewrod ep0[12] = {\n"
		printf "\t0x40800000, 0x00000000,\n"
		printf "\t%s,\n", $0
	} else if (NR == 11) {
		printf "\t%s\n", $0
		printf "};\n\n"
		printf "struct doublewrod ep1[128] = {\n"
		printf "\t0x40800000, 0x00000000,\n"
	} else if (NR == 138) {
		printf "\t%s\n", $0
		printf "};\n\n"
		printf "struct doublewrod ep2[256] = {\n"
		printf "\t0x40800000, 0x00000000,\n"
	} else if (NR == 393) {
		printf "\t%s\n", $0
		printf "};\n\n"
		printf "struct doublewrod ep3[256] = {\n"
		printf "\t0x40800000, 0x00000000,\n"
	} else if (NR == 648) {
		printf "\t%s\n", $0
		printf "};\n\n"
		printf "struct doublewrod ep4[256] = {\n"
		printf "\t0x40800000, 0x00000000,\n"
	} else if (NR == 903) {
		printf "\t%s\n", $0
		printf "};\n\n"
		printf "struct doublewrod en0[12] = {\n"
		printf "\t0x40800000, 0x00000000,\n"
	} else if (NR == 914) {
		printf "\t%s\n", $0
		printf "};\n\n"
		printf "struct doublewrod en1[128] = {\n"
		printf "\t0x40800000, 0x00000000,\n"
	} else if (NR == 1041) {
		printf "\t%s\n", $0
		printf "};\n\n"
		printf "struct doublewrod en2[256] = {\n"
		printf "\t0x40800000, 0x00000000,\n"
	} else if (NR == 1296) {
		printf "\t%s\n", $0
		printf "};\n\n"
		printf "struct doublewrod en3[256] = {\n"
		printf "\t0x40800000, 0x00000000,\n"
	} else if (NR == 1551) {
		printf "\t%s\n", $0
		printf "};\n\n"
		printf "struct doublewrod en4[256] = {\n"
		printf "\t0x40800000, 0x00000000,\n"
	} else if (NR == 1806) {
		printf "\t%s\n", $0
		printf "};\n"
	} else
		printf "\t%s,\n", $0
}'

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.