version 1.3, 2003/01/11 12:38:57 |
version 1.5, 2003/01/15 05:08:10 |
|
|
/* -*- mode: C; coding: euc-japan -*- */ |
/* -*- 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.4 2003/01/13 12:04:53 ohara Exp $ */ |
|
|
/* |
/* |
Copyright (C) Katsuyoshi OHARA, 2000. |
Copyright (C) Katsuyoshi OHARA, 2000. |
Line 51 void sm_popString() |
|
Line 51 void sm_popString() |
|
cmo *err; |
cmo *err; |
cmo *m; |
cmo *m; |
|
|
#ifdef DEBUG |
ox_printf("ox_math:: opecode = SM_popString.\n"); |
fprintf(ox_stderr, "ox_math:: opecode = SM_popString.\n"); |
|
#endif |
|
|
|
m = pop(); |
m = pop(); |
if (m->tag == CMO_STRING) { |
if (m->tag == CMO_STRING) { |
send_ox_cmo(stack_oxfp, m); |
send_ox_cmo(stack_oxfp, m); |
Line 90 void sm_executeStringByLocalParser() |
|
Line 87 void sm_executeStringByLocalParser() |
|
symbol_t symp; |
symbol_t symp; |
cmo* m = pop(); |
cmo* m = pop(); |
char *s = NULL; |
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 |
if (m->tag == CMO_STRING |
&& strlen(s = ((cmo_string *)m)->s) != 0) { |
&& strlen(s = ((cmo_string *)m)->s) != 0) { |
if (s[0] == ':') { |
if (s[0] == ':') { |
Line 102 void sm_executeStringByLocalParser() |
|
Line 97 void sm_executeStringByLocalParser() |
|
/* for mathematica */ |
/* for mathematica */ |
/* Sending the string `s' to mathematica for its evaluation. */ |
/* Sending the string `s' to mathematica for its evaluation. */ |
ml_evaluateStringByLocalParser(s); |
ml_evaluateStringByLocalParser(s); |
ml_select(); |
push(ml_returnvalue()); |
push(receive_mlo()); |
|
} |
} |
}else { |
}else { |
#ifdef DEBUG |
#ifdef DEBUG |
symp = lookup_by_tag(m->tag); |
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 |
#endif |
push_error(SM_executeStringByLocalParser, m); |
push_error(SM_executeStringByLocalParser, m); |
} |
} |
Line 136 void sm_executeFunction() |
|
Line 130 void sm_executeFunction() |
|
argv[i] = pop(); |
argv[i] = pop(); |
} |
} |
ml_executeFunction(func, argc, argv); |
ml_executeFunction(func, argc, argv); |
ml_select(); |
push(ml_returnvalue()); |
push(receive_mlo()); |
|
} |
} |
|
|
void sm_mathcap() |
void sm_mathcap() |