+static struct option long_options[] = {
+ { "trajectory-file", 1, 0, 't' },
+ { "graph-file", 1, 0, 'g' },
+ { "help", no_argument, 0, 'h' },
+ { "verbose", no_argument, 0, 'v' },
+ { "help-formats", no_argument, 0, OPT_HELP_FORMATS },
+ { 0, 0, 0, 0 }
+};
+
+int main(int argc, char **argv) {
+ int c;
+ int error = 0, show_help = 0;
+
+ strncpy(trajectory_filename, "", FILENAME_SIZE);
+ strncpy(graph_filename, "", FILENAME_SIZE);
+ verbose = 0;
+
+ while ((c = getopt_long(argc, argv, "t:g:hv",
+ long_options, NULL)) != -1) {
+
+ switch(c) {
+
+ case 't':
+ strncpy(trajectory_filename, optarg, FILENAME_SIZE);
+ break;
+
+ case 'g':
+ strncpy(graph_filename, optarg, FILENAME_SIZE);
+ break;
+
+ case 'h':
+ show_help = 1;
+ break;
+
+ case OPT_HELP_FORMATS:
+ print_help_formats();
+ exit(EXIT_SUCCESS);
+ break;
+
+ case 'v':
+ verbose = 1;
+ break;
+
+ default:
+ error = 1;
+ break;
+ }
+ }
+
+ if(error) {
+ usage(&cerr);