From: Francois Fleuret Date: Sun, 5 Jul 2009 13:43:44 +0000 (+0200) Subject: Cosmectics. Added "Selector: " in the error messages. X-Git-Url: https://ant.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=e7d64e4b607e8e4ca95c789df4244c583943c7d7;p=selector.git Cosmectics. Added "Selector: " in the error messages. --- diff --git a/REVISION_NUMBER b/REVISION_NUMBER index bb79365..91b629b 100644 --- a/REVISION_NUMBER +++ b/REVISION_NUMBER @@ -1 +1 @@ -155 +156 diff --git a/selector.c b/selector.c index 41f29e0..30f3f19 100644 --- a/selector.c +++ b/selector.c @@ -91,7 +91,7 @@ void inject_into_tty_buffer(char *string) { 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); } @@ -111,7 +111,7 @@ int string_to_positive_integer(char *string) { } 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); } @@ -643,7 +643,7 @@ void read_file(hash_table_t *hash_table, 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); } @@ -667,7 +667,7 @@ void read_file(hash_table_t *hash_table, 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); @@ -705,7 +705,7 @@ int main(int argc, char **argv) { 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); } @@ -830,7 +830,7 @@ int main(int argc, char **argv) { } else { - fprintf(stderr, "Unknown option %s.\n", argv[i]); + fprintf(stderr, "Selector: Unknown option %s.\n", argv[i]); error = 1; } } @@ -968,7 +968,7 @@ int main(int argc, char **argv) { 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); } @@ -1117,7 +1117,7 @@ int main(int argc, char **argv) { } 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);