+ if (list_chrms)
+ return ti_list_chromosomes(argv[optind]);
+ if (optind + 1 == argc) {
+ if (force == 0) {
+ struct stat buf;
+ char *fnidx = calloc(strlen(argv[optind]) + 5, 1);
+ strcat(strcpy(fnidx, argv[optind]), ".tbi");
+ if (stat(fnidx, &buf) == 0) {
+ fprintf(stderr, "[tabix] the index file exists. Please use '-f' to overwrite.\n");
+ free(fnidx);
+ return 1;
+ }
+ free(fnidx);
+ }