blob: f0a689821b11fd16e5c68b2cfa374eed8d721ef3 (
plain) (
tree)
|
|
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "domain2name.c"
int main (int argc, char * const argv[]) {
if (argc != 2) {
fprintf(stderr, "%s domain\n", argv[0]);
return 1;
}
int r, s = domain2name_len(argv[1], strlen(argv[1]));
char * b = alloca(s);
r = domain2name(b, argv[1], strlen(argv[1]));
printf("%4dB %4dB (-:\n", s, r); /* xxd has 16 bytes per row */
printf("%s", b);
fflush(stdout);
}
|