Debian Codegraph @

src/shared/dns_type-to-name.awk

raw
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 BEGIN{
4 print "const char *dns_type_to_string(int type) {"
5 print " switch (type) {"
6 }
7 {
8 printf " case DNS_TYPE_%s: return ", $1;
9 sub(/_/, "-");
10 printf "\"%s\";\n", $1
11 }
12 END{
13 print " default: return NULL;"
14 print " }"
15 print "}"
16 }