projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cdf573
)
Changed ttyname() to isatty() + cosmetics.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 19 Jan 2010 21:12:21 +0000
(22:12 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 19 Jan 2010 21:12:21 +0000
(22:12 +0100)
selector.c
patch
|
blob
|
history
diff --git
a/selector.c
b/selector.c
index
f6c7b12
..
e9807c9
100644
(file)
--- a/
selector.c
+++ b/
selector.c
@@
-745,7
+745,7
@@
int main(int argc, char **argv) {
int nb_lines;
struct hash_table_t *hash_table;
- if(!
ttyname
(STDIN_FILENO)) {
+ if(!
isatty
(STDIN_FILENO)) {
fprintf(stderr, "Selector: The standard input is not a tty.\n");
exit(1);
}
@@
-763,8
+763,8
@@
int main(int argc, char **argv) {
i = 1;
while(!error && !show_help &&
- i < argc &&
argv[i][0] == '-' &&
- !rest_are_files) {
+ i < argc &&
+
argv[i][0] == '-' &&
!rest_are_files) {
if(strcmp(argv[i], "-o") == 0) {
check_opt(argc, argv, i, 1, "<output filename>");