-enum {
- OPT_NONE = 0,
- OPT_HELP,
- OPT_LIST,
- OPT_VERBOSE,
- OPT_DEBUG,
- OPT_NAMES,
- OPT_FIELDS,
- OPT_NO_DELTA,
- OPT_CLOCK_OFFSET,
- OPT_CLOCK_CYCLES,
- OPT_CLOCK_SECONDS,
- OPT_CLOCK_DATE,
- OPT_CLOCK_GMT,
- OPT_CLOCK_FORCE_CORRELATE,
-};
-
-static struct poptOption long_options[] = {
- /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
- { "output", 'w', POPT_ARG_STRING, &opt_output_path, OPT_NONE, NULL, NULL },
- { "input-format", 'i', POPT_ARG_STRING, &opt_input_format_arg, OPT_NONE, NULL, NULL },
- { "output-format", 'o', POPT_ARG_STRING, &opt_output_format_arg, OPT_NONE, NULL, NULL },
- { "help", 'h', POPT_ARG_NONE, NULL, OPT_HELP, NULL, NULL },
- { "list", 'l', POPT_ARG_NONE, NULL, OPT_LIST, NULL, NULL },
- { "verbose", 'v', POPT_ARG_NONE, NULL, OPT_VERBOSE, NULL, NULL },
- { "debug", 'd', POPT_ARG_NONE, NULL, OPT_DEBUG, NULL, NULL },
- { "names", 'n', POPT_ARG_STRING, NULL, OPT_NAMES, NULL, NULL },
- { "fields", 'f', POPT_ARG_STRING, NULL, OPT_FIELDS, NULL, NULL },
- { "no-delta", 0, POPT_ARG_NONE, NULL, OPT_NO_DELTA, NULL, NULL },
- { "clock-offset", 0, POPT_ARG_STRING, NULL, OPT_CLOCK_OFFSET, NULL, NULL },
- { "clock-cycles", 0, POPT_ARG_NONE, NULL, OPT_CLOCK_CYCLES, NULL, NULL },
- { "clock-seconds", 0, POPT_ARG_NONE, NULL, OPT_CLOCK_SECONDS, NULL, NULL },
- { "clock-date", 0, POPT_ARG_NONE, NULL, OPT_CLOCK_DATE, NULL, NULL },
- { "clock-gmt", 0, POPT_ARG_NONE, NULL, OPT_CLOCK_GMT, NULL, NULL },
- { "clock-force-correlate", 0, POPT_ARG_NONE, NULL, OPT_CLOCK_FORCE_CORRELATE, NULL, NULL },
- { NULL, 0, 0, NULL, 0, NULL, NULL },
-};
-
-static void list_formats(FILE *fp)