BEGIN {
	if (out == "header") {
		print "#ifndef KIplatform_syscalls"
		print "#define KIplatform_syscalls"
		print "enum /* syscall numbers */ {"
	}
}

out == "header" { print "\tk_platform_syscall_"$1" = "$2"," }
out == "asm"    { print "%define sys."$1" "$2 }

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