projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3852f55
)
Replaced the exit values with EXIT_SUCCESS and EXIT_FAILURE.
author
Francois Fleuret
<francois@fleuret.org>
Fri, 26 Feb 2010 17:05:51 +0000
(18:05 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Fri, 26 Feb 2010 17:05:51 +0000
(18:05 +0100)
selector.c
patch
|
blob
|
history
diff --git
a/selector.c
b/selector.c
index
e9807c9
..
f2c40b9
100644
(file)
--- a/
selector.c
+++ b/
selector.c
@@
-93,7
+93,7
@@
void check_opt(int argc, char **argv, int n_opt, int n, const char *help) {
if(n_opt + n >= argc) {
fprintf(stderr, "Selector: Missing argument for %s, expecting %s.\n",
argv[n_opt], help);
if(n_opt + n >= argc) {
fprintf(stderr, "Selector: Missing argument for %s, expecting %s.\n",
argv[n_opt], help);
- exit(
1
);
+ exit(
EXIT_FAILURE
);
}
}
}
}
@@
-114,7
+114,7
@@
int string_to_positive_integer(char *string) {
fprintf(stderr,
"Selector: Value `%s' is not a positive integer.\n",
string);
fprintf(stderr,
"Selector: Value `%s' is not a positive integer.\n",
string);
- exit(
1
);
+ exit(
EXIT_FAILURE
);
}
return result;
}
return result;
@@
-672,7
+672,7
@@
void read_file(struct hash_table_t *hash_table,
if(!file) {
fprintf(stderr, "Selector: Can not open `%s'.\n", input_filename);
if(!file) {
fprintf(stderr, "Selector: Can not open `%s'.\n", input_filename);
- exit(
1
);
+ exit(
EXIT_FAILURE
);
}
start = 0;
}
start = 0;
@@
-708,7
+708,7
@@
void read_file(struct hash_table_t *hash_table,
BUFFER_SIZE);
fprintf(stderr, raw_line);
fprintf(stderr, "\n");
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 we got a line, we replace the carriage return by a \0 to
@@
-747,7
+747,7
@@
int main(int argc, char **argv) {
if(!isatty(STDIN_FILENO)) {
fprintf(stderr, "Selector: The standard input is not a tty.\n");
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;
}
color_fg_modeline = COLOR_WHITE;
@@
-1025,7
+1025,7
@@
int main(int argc, char **argv) {
endwin();
fprintf(stderr, "Selector: Color numbers have to be between 0 and %d.\n",
COLORS - 1);
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);
}
init_pair(1, color_fg_modeline, color_bg_modeline);
@@
-1177,7
+1177,7
@@
int main(int argc, char **argv) {
fprintf(stderr,
"Selector: Can not open %s for writing.\n",
output_filename);
fprintf(stderr,
"Selector: Can not open %s for writing.\n",
output_filename);
- exit(
1
);
+ exit(
EXIT_FAILURE
);
}
fclose(out);
}
}
fclose(out);
}
@@
-1195,5
+1195,5
@@
int main(int argc, char **argv) {
free(lines);
free(title);
free(lines);
free(title);
- exit(
0
);
+ exit(
EXIT_SUCCESS
);
}
}