|
From: Allin C. <cot...@wf...> - 2015-08-28 12:06:18
|
On Fri, 28 Aug 2015, Tatsuro MATSUOKA wrote:
>> Patch 2 prevents loss of a character from the input stream after
>> waiting for a mouse click.
>> I am not sure if this is needed or even safe on Windows.
>>
>> --- a/src/wxterminal/wxt_gui.cpp 2015-07-13 10:54:44.000000000 -0700
>> +++ b/src/wxterminal/wxt_gui.cpp 2015-08-27 12:26:12.000000000 -0700
>> @@ -3716,7 +3716,8 @@ bool wxt_exec_event(int type, int mx, in
>> event.winid = id;
>> #if defined(WXT_MONOTHREADED) || defined(_Windows)
>> - wxt_process_one_event(&event);
>> + if (wxt_process_one_event(&event))
>> + ungetc('\n',stdin); /* FIXME: OK on Windows? */
>> return true;
>> #else
>> if (!wxt_handling_persist)
>
> I have complied patch 2 attached wxt_gui.cpp.
> Compile itself have passed on gnuplot.exe and wgnuplot.exe.
>
> However
>
> ungetc('\n',stdin);
>
> perhaps only works on console mode (gnuplot.exe) (untested.)
>
> The function ungetc is not redefined in wtext.h.
It's defined in stdio.h.
--
Allin Cottrell
Department of Economics
Wake Forest University, NC
|