#include #include #include #include #include static void usage(void) { fprintf(stderr, "Usage: decodemsg \n"); exit(1); } int main(int argc, char *argv[]) { const u8 *m; setup_locale(); if (argc != 2) usage(); /* Last arg is hex string */ m = tal_hexdata(NULL, argv[1], strlen(argv[1])); if (!m) errx(1, "'%s' is not valid hex", argv[1]); print_message(m); return 0; }