=================================================================== RCS file: /home/cvs/OpenXM/src/ox_math/sm_ext.c,v retrieving revision 1.3 retrieving revision 1.6 diff -u -p -r1.3 -r1.6 --- OpenXM/src/ox_math/sm_ext.c 2003/01/11 12:38:57 1.3 +++ OpenXM/src/ox_math/sm_ext.c 2003/01/15 10:16:10 1.6 @@ -1,5 +1,5 @@ /* -*- mode: C; coding: euc-japan -*- */ -/* $OpenXM: OpenXM/src/ox_math/sm_ext.c,v 1.2 2000/12/03 22:09:34 ohara Exp $ */ +/* $OpenXM: OpenXM/src/ox_math/sm_ext.c,v 1.5 2003/01/15 05:08:10 ohara Exp $ */ /* Copyright (C) Katsuyoshi OHARA, 2000. @@ -14,7 +14,6 @@ #include #include #include -#include #include #include "sm.h" @@ -51,10 +50,7 @@ void sm_popString() cmo *err; cmo *m; -#ifdef DEBUG - fprintf(ox_stderr, "ox_math:: opecode = SM_popString.\n"); -#endif - + ox_printf("ox_math:: opecode = SM_popString.\n"); m = pop(); if (m->tag == CMO_STRING) { send_ox_cmo(stack_oxfp, m); @@ -90,10 +86,8 @@ void sm_executeStringByLocalParser() symbol_t symp; cmo* m = pop(); char *s = NULL; -#ifdef DEBUG - fprintf(ox_stderr, "ox_math:: opecode = SM_executeStringByLocalParser.\n"); -#endif + ox_printf("ox_math:: opecode = SM_executeStringByLocalParser.\n"); if (m->tag == CMO_STRING && strlen(s = ((cmo_string *)m)->s) != 0) { if (s[0] == ':') { @@ -102,13 +96,12 @@ void sm_executeStringByLocalParser() /* for mathematica */ /* Sending the string `s' to mathematica for its evaluation. */ ml_evaluateStringByLocalParser(s); - ml_select(); - push(receive_mlo()); + push(ml_return()); } }else { #ifdef DEBUG symp = lookup_by_tag(m->tag); - fprintf(ox_stderr, "ox_math:: error. the top of stack is %s.\n", symbol_get_key(symp)); + ox_printf("ox_math:: error. the top of stack is %s.\n", symbol_get_key(symp)); #endif push_error(SM_executeStringByLocalParser, m); } @@ -136,8 +129,7 @@ void sm_executeFunction() argv[i] = pop(); } ml_executeFunction(func, argc, argv); - ml_select(); - push(receive_mlo()); + push(ml_return()); } void sm_mathcap()