diff --git a/src/torrent2json.c b/src/torrent2json.c index 7d16828..9280d07 100644 --- a/src/torrent2json.c +++ b/src/torrent2json.c @@ -15,6 +15,19 @@ struct yajl_gen_t *gen = NULL; void (*select_handler(int))(int); +void +usage(int exitcode) +{ + fprintf(stderr, "\ +Usage: torrent2json []\n\ +Where options are:\n\ + -h This help.\n\ + -i Input file. (Default: read from stdin)\n\ + -o Output file. (Default: write to stdout)\n\ + -c Compact json. (Default: no)\n"); + exit(exitcode); +} + /* handlers */ void get_integer(int chr)