=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/io/ox.c,v retrieving revision 1.12 retrieving revision 1.16 diff -u -p -r1.12 -r1.16 --- OpenXM_contrib2/asir2000/io/ox.c 2001/10/09 01:36:21 1.12 +++ OpenXM_contrib2/asir2000/io/ox.c 2002/08/02 02:41:03 1.16 @@ -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_contrib2/asir2000/io/ox.c,v 1.11 2001/08/03 08:50:19 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/io/ox.c,v 1.15 2002/08/02 02:28:27 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -57,13 +57,13 @@ extern Obj VOIDobj; extern int ox_need_conv; -extern int ox_usr1_sent, ox_int_received, critical_when_signal; +int ox_usr1_sent, ox_int_received, critical_when_signal; unsigned int ox_serial; int ox_flushing; int ox_batch; int ox_check=1; int ox_exchange_mathcap=1; -jmp_buf ox_env; +JMP_BUF ox_env; MATHCAP my_mathcap; @@ -110,7 +110,7 @@ void ox_resetenv(char *s) cleanup_events(); #endif fprintf(stderr,"%s\n",s); - longjmp(ox_env,1); + LONGJMP(ox_env,1); } static int available_cmo[] = { @@ -125,7 +125,7 @@ static int available_cmo[] = { 0 }; -static int available_sm[] = { +static int ox_asir_available_sm[] = { SM_dupErrors, SM_getsp, SM_popSerializedLocalObject, SM_popCMO, SM_popString, SM_pushCMOtag, SM_setName, SM_evalName, SM_executeStringByLocalParser, @@ -136,6 +136,15 @@ static int available_sm[] = { 0 }; +static int ox_plot_available_sm[] = { + SM_dupErrors, SM_getsp, SM_popSerializedLocalObject, + SM_popCMO, SM_popString, SM_setName, + SM_evalName, SM_executeStringByLocalParser, + SM_executeFunction, SM_shutdown, SM_pops, + SM_mathcap, SM_setMathcap, SM_nop, + 0 +}; + /* mathcap = [ @@ -164,11 +173,20 @@ void create_my_mathcap(char *system) MKUSINT(t,OX_VERSION); n0 = mknode(2,t,str); MKLIST(sname,n0); - /* cmo tag */ - for ( n0 = 0, i = 0; k = available_sm[i]; i++ ) { - NEXTNODE(n0,n); MKUSINT(t,k); BDY(n) = (pointer)t; + /* sm tag */ + n0 = 0; + if ( !strcmp(system,"ox_asir") ) { + for ( i = 0; k = ox_asir_available_sm[i]; i++ ) { + NEXTNODE(n0,n); MKUSINT(t,k); BDY(n) = (pointer)t; + } + NEXT(n) = 0; + } else if ( !strcmp(system,"ox_plot") ) { + for ( i = 0; k = ox_plot_available_sm[i]; i++ ) { + NEXTNODE(n0,n); MKUSINT(t,k); BDY(n) = (pointer)t; + } + NEXT(n) = 0; } - NEXT(n) = 0; MKLIST(smlist,n0); + MKLIST(smlist,n0); /* creation of [OX_DATA,CMO list] */ /* ox tag */ @@ -369,8 +387,6 @@ void end_critical() { void ox_usr1_handler(int sig) { - extern jmp_buf env; - #if !defined(VISUAL) signal(SIGUSR1,ox_usr1_handler); #endif @@ -656,6 +672,12 @@ void ox_get_serverinfo(int s, LIST *rp) MKLIST(*rp,0); } } + +char *ox_get_servername(int s) +{ + return (remote_mc && remote_mc[s].servername)?remote_mc[s].servername:0; +} + int ox_check_cmo_p(int s, P p) {