if(n_opt + n >= argc) {
fprintf(stderr, "Selector: Missing argument for %s, expecting %s.\n",
argv[n_opt], help);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
fprintf(stderr,
"Selector: Value `%s' is not a positive integer.\n",
string);
- exit(1);
+ exit(EXIT_FAILURE);
}
return result;
if(!file) {
fprintf(stderr, "Selector: Can not open `%s'.\n", input_filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
start = 0;
BUFFER_SIZE);
fprintf(stderr, raw_line);
fprintf(stderr, "\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
/* If we got a line, we replace the carriage return by a \0 to
if(!isatty(STDIN_FILENO)) {
fprintf(stderr, "Selector: The standard input is not a tty.\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
color_fg_modeline = COLOR_WHITE;
endwin();
fprintf(stderr, "Selector: Color numbers have to be between 0 and %d.\n",
COLORS - 1);
- exit(1);
+ exit(EXIT_FAILURE);
}
init_pair(1, color_fg_modeline, color_bg_modeline);
fprintf(stderr,
"Selector: Can not open %s for writing.\n",
output_filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
fclose(out);
}
free(lines);
free(title);
- exit(0);
+ exit(EXIT_SUCCESS);
}