simplify listfile
This commit is contained in:
parent
a2ab37dbc3
commit
5c36c25f99
|
@ -8,6 +8,11 @@ void readstdin(void) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (listfile) {
|
||||||
|
readfile();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int o = 0;
|
int o = 0;
|
||||||
|
|
||||||
// read each line from stdin and add it to the item list
|
// read each line from stdin and add it to the item list
|
||||||
|
|
8
spmenu.c
8
spmenu.c
|
@ -751,17 +751,9 @@ int main(int argc, char *argv[]) {
|
||||||
// fast (-f) means we grab keyboard before reading standard input
|
// fast (-f) means we grab keyboard before reading standard input
|
||||||
if (fast && !isatty(0)) {
|
if (fast && !isatty(0)) {
|
||||||
grabkeyboard();
|
grabkeyboard();
|
||||||
|
|
||||||
if (!listfile)
|
|
||||||
readstdin();
|
readstdin();
|
||||||
else
|
|
||||||
readfile();
|
|
||||||
} else {
|
} else {
|
||||||
if (listfile)
|
|
||||||
readfile();
|
|
||||||
else
|
|
||||||
readstdin();
|
readstdin();
|
||||||
|
|
||||||
grabkeyboard();
|
grabkeyboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue