Ncurses/C how to clear (stdin?) buffer?
hey I have wgetch() in a loop and it works great accept when there is
five inputs. My loop will execute five times to receive all the input.
I was wondering if there is a way to clear the linux input buffer
right before my call to wgetch(); so that all the previous commands
while scrolling text to the screen are disregarded.
Like during a loop, if the user enters a key, When there prompted to enter a key it will act as though they entered one because if I am not mistaken the input was queued so i want to stop that temperarly and then restart that later.
Last edited by errigour; 01-25-2013 at 05:43 AM.
|