=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2018/io/ox.c,v retrieving revision 1.1 retrieving revision 1.4 diff -u -p -r1.1 -r1.4 --- OpenXM_contrib2/asir2018/io/ox.c 2018/09/19 05:45:08 1.1 +++ OpenXM_contrib2/asir2018/io/ox.c 2020/02/02 05:13:30 1.4 @@ -44,7 +44,7 @@ * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. - * $OpenXM$ + * $OpenXM: OpenXM_contrib2/asir2018/io/ox.c,v 1.3 2019/12/13 14:40:50 fujimoto Exp $ */ #include "ca.h" #include "parse.h" @@ -408,6 +408,13 @@ int check_by_mc(int s,unsigned int oxtag,unsigned int return 1; } +#if !defined(VISUAL_CONSOLE) +extern int Im_ox_plot; +#if defined(ANDROID) +int Im_ox_plot = 0; +#endif +#endif + void begin_critical() { critical_when_signal = 1; } @@ -437,6 +444,13 @@ void ox_usr1_handler(int sig) #if !defined(VISUAL) && !defined(__MINGW32__) set_signal_for_restart(SIGUSR1,ox_usr1_handler); #endif +#if !defined(VISUAL_CONSOLE) + if ( Im_ox_plot ) { + ox_flushing = 1; + ox_send_sync(0); + return; + } +#endif if ( critical_when_signal ) { fprintf(stderr,"usr1 : critical\n"); ox_usr1_sent = 1; @@ -459,7 +473,9 @@ void ox_usr1_handler(int sig) void clear_readbuffer() { -#if defined(linux) +#if defined(ANDROID) + fpurge(iofp[0].in); +#elif defined(linux) iofp[0].in->_IO_read_ptr = iofp[0].in->_IO_read_end; #elif defined(__FreeBSD__) fpurge(iofp[0].in);