[BACK]Return to ox_asir.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / io

Diff for /OpenXM_contrib2/asir2000/io/ox_asir.c between version 1.4 and 1.5

version 1.4, 2000/01/19 09:31:00 version 1.5, 2000/01/31 03:18:05
Line 1 
Line 1 
 /* $OpenXM: OpenXM_contrib2/asir2000/io/ox_asir.c,v 1.3 2000/01/18 05:55:07 noro Exp $ */  /* $OpenXM: OpenXM_contrib2/asir2000/io/ox_asir.c,v 1.4 2000/01/19 09:31:00 noro Exp $ */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
 #include "ox.h"  #include "ox.h"
Line 456  static void asir_executeFunction(int serial)
Line 456  static void asir_executeFunction(int serial)
         char *path;          char *path;
         USINT ui;          USINT ui;
         ERR err;          ERR err;
           Obj arg;
         static char buf[BUFSIZ];          static char buf[BUFSIZ];
   
         func = ((STRING)asir_pop_one())->body;          arg = asir_pop_one();
         argc = (int)(((USINT)asir_pop_one())->body);          if ( !arg || OID(arg) != O_STR ) {
                   sprintf(buf,"executeFunction : invalid function name");
                   goto error;
           } else
                   func = ((STRING)arg)->body;
   
           arg = asir_pop_one();
           if ( !arg || OID(arg) != O_USINT ) {
                   sprintf(buf,"executeFunction : invalid argc");
                   goto error;
           } else
                   argc = (int)(((USINT)arg)->body);
   
         for ( n = 0; argc; argc-- ) {          for ( n = 0; argc; argc-- ) {
                 NEXTNODE(n,n1);                  NEXTNODE(n,n1);
                 BDY(n1) = (pointer)asir_pop_one();                  BDY(n1) = (pointer)asir_pop_one();
Line 491  static void asir_executeFunction(int serial)
Line 503  static void asir_executeFunction(int serial)
                         searchf(usrf,func,&f);                          searchf(usrf,func,&f);
                 if ( !f ) {                  if ( !f ) {
                         sprintf(buf,"executeFunction : the function %s not found",func);                          sprintf(buf,"executeFunction : the function %s not found",func);
                         create_error(&err,serial,buf);                          goto error;
                         result = (Obj)err;  
                 } else {                  } else {
                         result = (Obj)bevalf(f,n);                          result = (Obj)bevalf(f,n);
                 }                  }
         }          }
           asir_push_one(result);
           return;
   
   error:
           create_error(&err,serial,buf);
           result = (Obj)err;
         asir_push_one(result);          asir_push_one(result);
 }  }
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>