19 lines
388 B
C
19 lines
388 B
C
#include "transform.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(int argc, char** argv) {
|
|
if(argc < 2) {
|
|
fprintf(stderr, "usage: %s <ip>\n", argv[0]);
|
|
return 1;
|
|
}
|
|
|
|
char* result = transform(argv[1]);
|
|
if(result == NULL) {
|
|
fprintf(stderr, "Failed to allocate buffer\n");
|
|
return 1;
|
|
}
|
|
|
|
printf("%s\n", result);
|
|
free(result);
|
|
}
|