|
From: Petr M. <mi...@ph...> - 2010-02-02 08:46:02
|
> In gnuplot.exe on windows, we can break pause for key board like 'pause -1' by any key. > In the manual or the help of pause, it can be broken by only the return key. > > Is it desirable to correct code of pause command for keyboard only be broken by the return key? > > In current state, pause for keyboard on gnuplo.exe by calling term->waitforinput(). > In term->waitforinput(), ConsoleGetch() is used. > > Why I use term->waitforinput() but not fgets(buf, strlen(buf), stdin) is the way to get command > strings from the prompt gnuplot.exe for windows. It gets commant strings though ConsoleGetch() so > that using fgets(buf, strlen(buf), stdin) gave failure to get command string after pause for key > board. > > If it is desirable that pause command for keyboard only be broken by return key, I will fix it using > a loop when return code gotten from term->waitforinput(). I think the loop waiting for Enter is the most appropriate solution. --- PM |