void check_opt(int argc, char **argv, int n_opt, int n, const char *help) {
if(n_opt + n >= argc) {
- fprintf(stderr, "Missing argument for %s, expecting %s.\n",
+ fprintf(stderr, "Selector: Missing argument for %s, expecting %s.\n",
argv[n_opt], help);
exit(1);
}
} else error = 1;
if(error) {
- fprintf(stderr, "Value `%s' is not a positive integer.\n", string);
+ fprintf(stderr, "Selector: Value `%s' is not a positive integer.\n", string);
exit(1);
}
file = fopen(input_filename, "r");
if(!file) {
- fprintf(stderr, "Can not open `%s'.\n", input_filename);
+ fprintf(stderr, "Selector: Can not open `%s'.\n", input_filename);
exit(1);
}
if(eol == BUFFER_SIZE) {
raw_line[BUFFER_SIZE - 1] = '\0';
- fprintf(stderr, "Line too long (max is %d characters):\n", BUFFER_SIZE);
+ fprintf(stderr, "Selector: Line too long (max is %d characters):\n", BUFFER_SIZE);
fprintf(stderr, raw_line);
fprintf(stderr, "\n");
exit(1);
hash_table_t *hash_table;
if(!ttyname(STDIN_FILENO)) {
- fprintf(stderr, "The standard input is not a tty.\n");
+ fprintf(stderr, "Selector: The standard input is not a tty.\n");
exit(1);
}
}
else {
- fprintf(stderr, "Unknown option %s.\n", argv[i]);
+ fprintf(stderr, "Selector: Unknown option %s.\n", argv[i]);
error = 1;
}
}
color_bg_highlight < 0 || color_bg_highlight >= COLORS) {
echo();
endwin();
- fprintf(stderr, "Color numbers have to be between 0 and %d.\n", COLORS - 1);
+ fprintf(stderr, "Selector: Color numbers have to be between 0 and %d.\n", COLORS - 1);
exit(1);
}
}
fprintf(out, "\n");
} else {
- fprintf(stderr, "Can not open %s for writing.\n", output_filename);
+ fprintf(stderr, "Selector: Can not open %s for writing.\n", output_filename);
exit(1);
}
fclose(out);