- infiles = calloc(argc-2, sizeof(FILE*));
- for (uint16_t i = 0; i < argc-2; i++) {
- infiles[i] = fopen(argv[i+1], "rb");
+ bool hardnested_mode = false;
+ int num_input_files = 0;
+ if (!strcmp(argv[1], "-t")) { // hardnested table
+ if (argc != 4) {
+ usage();
+ return(EXIT_FAILURE);
+ }
+ hardnested_mode = true;
+ num_input_files = 1;
+ } else {
+ num_input_files = argc-2;
+ }
+ infiles = calloc(num_input_files, sizeof(FILE*));
+ for (uint16_t i = 0; i < num_input_files; i++) {
+ infiles[i] = fopen(argv[i+hardnested_mode?2:1], "rb");