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