plan9port/src/libndb/testdns.c
Dan Cross fa325e9b42 Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines.
Remove blank lines from the ends of files.
Change modes on source files so that they
are not executable.

Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-10 14:54:30 +00:00

35 lines
493 B
C

#include <u.h>
#include <libc.h>
#include <bio.h>
#include <ndb.h>
void
main(int argc, char **argv)
{
Ndbtuple *t, *t0;
ARGBEGIN{
default:
goto usage;
}ARGEND
if(argc != 2){
usage:
fprint(2, "usage: testdns name val\n");
exits("usage");
}
quotefmtinstall();
if((t = dnsquery(nil, argv[0], argv[1])) == nil)
sysfatal("dnsquery: %r");
for(t0=t; t; t=t->entry){
print("%s=%q ", t->attr, t->val);
if(t->line == t0){
print("\n");
t0 = t->entry;
}
}
exits(0);
}