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

Diff for /OpenXM_contrib2/asir2000/builtin/pf.c between version 1.13 and 1.15

version 1.13, 2008/09/01 07:53:59 version 1.15, 2008/11/18 20:52:47
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/builtin/pf.c,v 1.12 2005/10/05 07:38:08 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/builtin/pf.c,v 1.14 2008/09/02 17:23:33 ohara Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "math.h"  #include "math.h"
Line 564  void Pcall(NODE arg,Obj *rp)
Line 564  void Pcall(NODE arg,Obj *rp)
 {  {
         P p;          P p;
         V v;          V v;
       NODE n,n1;
       LIST list;
       VECT vect;
       pointer *a;
       int len,i;
   
         p = (P)ARG0(arg);          p = (P)ARG0(arg);
         if ( !p || OID(p) != 2 )          if ( !p || OID(p) != 2 )
Line 571  void Pcall(NODE arg,Obj *rp)
Line 576  void Pcall(NODE arg,Obj *rp)
         v = VR(p);          v = VR(p);
         if ( (int)v->attr != V_SR )          if ( (int)v->attr != V_SR )
                 error("call : no such function");                  error("call : no such function");
           else {
         else          list = (LIST) ARG1(arg);
                 *rp = (Obj)bevalf((FUNC)v->priv,BDY((LIST)ARG1(arg)));          if ( list ) {
               switch (OID(list)) {
               case O_VECT:
                   vect = (VECT)list; len = vect->len; a = BDY(vect);
                   for ( i = len - 1, n = 0; i >= 0; i-- ) {
                       MKNODE(n1,a[i],n); n = n1;
                   }
                   MKLIST(list,n);
                   /* falling next case */
               case O_LIST:
                   *rp = (Obj)bevalf_with_opts((FUNC)v->priv,BDY(list),current_option);
                   return;
               default:
                   break;
               }
           }
           error("call : invalid argument");
           }
 }  }
   
 /* at=position of arg to be used for iteration */  /* at=position of arg to be used for iteration */

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.15

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