version 1.37, 2016/06/29 05:10:14 |
version 1.40, 2017/08/30 09:40:30 |
|
|
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* $OpenXM: OpenXM_contrib2/asir2000/io/ox.c,v 1.36 2015/08/18 02:26:05 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/io/ox.c,v 1.39 2016/08/24 05:33:58 ohara Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
|
|
unsigned int *smcap; |
unsigned int *smcap; |
int noxcap; |
int noxcap; |
struct oxcap *oxcap; |
struct oxcap *oxcap; |
|
int no_ox_reset; |
}; |
}; |
|
|
struct oxcap *my_oxcap; |
struct oxcap *my_oxcap; |
Line 108 void cleanup_events() |
|
Line 109 void cleanup_events() |
|
} |
} |
#endif |
#endif |
|
|
|
/* 1 if no_ox_reset, 0 if ox_reset OK, -1 if invalid */ |
|
int no_ox_reset(int s) |
|
{ |
|
if ( remote_mc && s >= 0 && s < remote_mc_len ) |
|
return remote_mc[s].no_ox_reset; |
|
else |
|
return -1; |
|
} |
|
|
void ox_resetenv(char *s) |
void ox_resetenv(char *s) |
{ |
{ |
#if defined(VISUAL) || defined(__MINGW32__) |
#if defined(VISUAL) || defined(__MINGW32__) |
Line 300 void mclist_to_mc(LIST mclist,struct mathcap *mc) |
|
Line 310 void mclist_to_mc(LIST mclist,struct mathcap *mc) |
|
[o2,[n21,n22,...]], |
[o2,[n21,n22,...]], |
... |
... |
] |
] |
|
(optional)[s1,s2,...] (no_ox_reset) |
] |
] |
*/ |
*/ |
n = BDY(mclist); |
n = BDY(mclist); |
Line 332 void mclist_to_mc(LIST mclist,struct mathcap *mc) |
|
Line 343 void mclist_to_mc(LIST mclist,struct mathcap *mc) |
|
for ( t = cap, ptr = mc->oxcap[j].cap, i = 0; i < l; t = NEXT(t), i++ ) |
for ( t = cap, ptr = mc->oxcap[j].cap, i = 0; i < l; t = NEXT(t), i++ ) |
ptr[i] = BDY((USINT)BDY(t)); |
ptr[i] = BDY((USINT)BDY(t)); |
} |
} |
|
/* check of no_ox_reset */ |
|
mc->no_ox_reset = 0; |
|
n = BDY(mclist); |
|
if ( length(n) >= 4 ) { |
|
t = BDY((LIST)ARG3(n)); |
|
for ( ; t; t = NEXT(t) ) |
|
if ( !strcmp(BDY((STRING)BDY(t)),"no_ox_reset") ) |
|
mc->no_ox_reset = 1; |
|
} |
} |
} |
|
|
int check_sm_by_mc(int s,unsigned int smtag) |
int check_sm_by_mc(int s,unsigned int smtag) |
Line 414 void ox_usr1_handler(int sig) |
|
Line 434 void ox_usr1_handler(int sig) |
|
NODE t; |
NODE t; |
|
|
#if !defined(VISUAL) && !defined(__MINGW32__) |
#if !defined(VISUAL) && !defined(__MINGW32__) |
signal(SIGUSR1,ox_usr1_handler); |
set_signal_for_restart(SIGUSR1,ox_usr1_handler); |
#endif |
#endif |
if ( critical_when_signal ) { |
if ( critical_when_signal ) { |
fprintf(stderr,"usr1 : critical\n"); |
fprintf(stderr,"usr1 : critical\n"); |
Line 428 void ox_usr1_handler(int sig) |
|
Line 448 void ox_usr1_handler(int sig) |
|
bevalf((FUNC)BDY(t),0); |
bevalf((FUNC)BDY(t),0); |
fprintf(stderr, "done.\n"); |
fprintf(stderr, "done.\n"); |
} |
} |
|
LEAVE_SIGNAL_CS_ALL; |
ox_resetenv("usr1 : return to toplevel by SIGUSR1"); |
ox_resetenv("usr1 : return to toplevel by SIGUSR1"); |
} |
} |
} |
} |