LOL ONLY SORTA WORKS :SHRUG:
This commit is contained in:
parent
87a70d203e
commit
6cc84675b5
@ -253,12 +253,17 @@ main(int argc, char *argv[])
|
||||
|
||||
setup();
|
||||
|
||||
do{
|
||||
/* might seem elementary but i made this mistake:
|
||||
* you can't just let it exit 0 when you hit EOF because then
|
||||
* stuff like `printf "hello\n" | dmenubar` won't have time to
|
||||
* be shown. */
|
||||
for(;;){
|
||||
fgets(text, text_s, stdin);
|
||||
/* fgets adds a newline which will be printable in some fonts */
|
||||
if(strlen(text) > 0)
|
||||
text[strlen(text)-1] = '\0';
|
||||
drawmenu(text);
|
||||
}while(fgets(text, text_s, stdin) != NULL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 1; /* unreachable */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user