BEGIN {
	if (out == "h") {
		print "#ifndef KIplatform_syscalls"
		print "#define KIplatform_syscalls"
		print "enum k_platform_syscall {"
	}
}

out == "h" { print "\tk_platform_syscall_"$1" = "$2"," } # c header
out == "s" { print "%define sys."$1" "$2 } # assembly

END {
	if (out == "h") {
		print "};"
		print "#endif"
	}
}
