#define _GNU_SOURCE #include #include #include #include #include #include "cgen.h" #include "nat.h" #include "config/debug.h" int main() { openlog("nat", LOG_PERROR, LOG_LOCAL0); unsigned long data; char buf[] = "12345"; CHK(parse_nat(&data, buf, strlen(buf)) == 1, "Death", out_death); printf("%ld\n", data); return 0; out_death: printf("Death."); return -1; }