From 3bc7ebe940f0b3affb3e8160ba60a18f27707e90 Mon Sep 17 00:00:00 2001 From: biouman Date: Wed, 2 May 2001 01:47:56 +0000 Subject: *** empty log message *** --- lib/pile.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/lib/pile.c b/lib/pile.c index 8242b71..e5abca9 100644 --- a/lib/pile.c +++ b/lib/pile.c @@ -233,8 +233,10 @@ int is_mute(char *st) void act_pile(int func) { pile_elem operande1, operande2; + pile_elem operande[3]; char buf[50]; char valid; + int i, err=0; sprintf(buf, _("Calling act_pile(%i)"), func); pushcontext(buf); @@ -389,11 +391,25 @@ void act_pile(int func) #ifdef DEBUG printf("----- OP_FUNC_CALL\n"); #endif + for (i=0;i<3;i++) + operande[i].polyn=NULL; operande1 = pop_pile(1); - if ((operande1.type == T_INT) && (operande1.val == 1)) { - operande1 = pop_pile(1); - operande2 = pop_pile(1); - if ((operande1.type == T_POLY) && (operande2.type == T_POLY)) { + if (operande1.type == T_INT) { + for(i=0;idegre == 0) { @@ -413,9 +429,12 @@ void act_pile(int func) } else { exception(1, _("act_pile: OP_FUNC_CALL arg2 is an empty polynom")); } - } else { - exception(1, _("act_pile: OP_FUNC_CALL invalid arguments")); - } + break; + case T_STRING: + appel_fonction(operande2.label,operande1.val,operande[0].polyn, operande[1].polyn, operande[2].polyn); + break; + } + } else { exception(1, _("act_pile: OP_FUNC_CALL incorrect argument number")); } -- cgit v1.2.3