blob: 64d675b0a9b64910fa4954d75b3690751b08587f (
plain)
1
2
3
4
5
6
7
|
BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" }
{
printf " case DNS_TYPE_%s: return ", $1;
sub(/_/, "-");
printf "\"%s\";\n", $1
}
END{ print " default: return NULL;\n\t}\n}\n" }
|