Commit | Line | Data |
---|---|---|
2117e02e MW |
1 | #include "substdio.h" |
2 | #include "subfd.h" | |
3 | #include "stralloc.h" | |
4 | #include "dns.h" | |
5 | #include "dnsdoe.h" | |
6 | #include "readwrite.h" | |
7 | #include "exit.h" | |
8 | ||
9 | stralloc sa = {0}; | |
10 | ||
11 | void main(argc,argv) | |
12 | int argc; | |
13 | char **argv; | |
14 | { | |
15 | if (!argv[1]) _exit(100); | |
16 | ||
17 | if (!stralloc_copys(&sa,argv[1])) | |
18 | { substdio_putsflush(subfderr,"out of memory\n"); _exit(111); } | |
19 | ||
20 | dns_init(0); | |
21 | dnsdoe(dns_cname(&sa)); | |
22 | substdio_putflush(subfdout,sa.s,sa.len); | |
23 | substdio_putsflush(subfdout,"\n"); | |
24 | _exit(0); | |
25 | } |