X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=selector.c;h=e9807c91920205279b4cb5a488c904e252b50eb0;hb=3852f552e20357d13fe51c40c0ca093c003c1e21;hp=f6c7b120f60c7d3ce902bd6ce7b0048d03c38a10;hpb=9cdf573cce60552fd79e2cf2f77c35387991a71f;p=selector.git diff --git a/selector.c b/selector.c index f6c7b12..e9807c9 100644 --- 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, "");