libk  gen-ident.awk at [e42b590b45]

File global/gen-ident.awk artifact 730afca5a3 part of check-in e42b590b45


BEGIN {
	defs = ""
	FS = ":"
	ORS = ""
	print "#include <k/internal.egroup.h>\n"
	print "extern const char"
}

{
	if (NR != 1) sep = ","
	print sep"\n\t*"$1"_error_strings[]"
	defs = defs "\t{ \""$1"\", \"k "$4"\", "$1"_error_strings },\n"
}

END {
	print ";\n"
	print "struct kglobal_module_record kglobal_module_ident[] = {\n"
		print defs
	print "};"
}