Changeset e25346 in git


Ignore:
Timestamp:
Sep 18, 2014, 3:02:40 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
6444d6389c28adc3ffe071f6db085827f420f358
Parents:
5b53cb58091cb3a67624dc9a430ac91504effa28
Message:
add: table interface for iiAddCproc: 1 arg.
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r5b53cb re25346  
    79317931 * then alphabetically */
    79327932
    7933 BOOLEAN iiExprArith1(leftv res, leftv a, int op)
     7933BOOLEAN iiExprArith1Tab(leftv res, leftv a, int op, struct sValCmd1* dArith1, int i)
    79347934{
    79357935  memset(res,0,sizeof(sleftv));
     
    79387938  if (!errorreported)
    79397939  {
    7940 #ifdef SIQ
    7941     if (siq>0)
    7942     {
    7943       //Print("siq:%d\n",siq);
    7944       command d=(command)omAlloc0Bin(sip_command_bin);
    7945       memcpy(&d->arg1,a,sizeof(sleftv));
    7946       //a->Init();
    7947       d->op=op;
    7948       d->argc=1;
    7949       res->data=(char *)d;
    7950       res->rtyp=COMMAND;
    7951       return FALSE;
    7952     }
    7953 #endif
     7940    BOOLEAN failed=FALSE;
    79547941    int at=a->Typ();
    7955     // handling bb-objects ----------------------------------------------------
    7956     if (at>MAX_TOK)
    7957     {
    7958       blackbox *bb=getBlackboxStuff(at);
    7959       if (bb!=NULL)
    7960       {
    7961         if(!bb->blackbox_Op1(op,res,a)) return FALSE;
    7962         if (errorreported) return TRUE;
    7963         // else: no op defined
    7964       }
    7965       else          return TRUE;
    7966     }
    7967 
    7968     BOOLEAN failed=FALSE;
    79697942    iiOp=op;
    7970     int i=iiTabIndex(dArithTab1,JJTAB1LEN,op);
    79717943    int ti = i;
    79727944    while (dArith1[i].cmd==op)
     
    80688040    }
    80698041    res->rtyp = UNKNOWN;
     8042  }
     8043  a->CleanUp();
     8044  return TRUE;
     8045}
     8046BOOLEAN iiExprArith1(leftv res, leftv a, int op)
     8047{
     8048  memset(res,0,sizeof(sleftv));
     8049  BOOLEAN call_failed=FALSE;
     8050
     8051  if (!errorreported)
     8052  {
     8053#ifdef SIQ
     8054    if (siq>0)
     8055    {
     8056      //Print("siq:%d\n",siq);
     8057      command d=(command)omAlloc0Bin(sip_command_bin);
     8058      memcpy(&d->arg1,a,sizeof(sleftv));
     8059      //a->Init();
     8060      d->op=op;
     8061      d->argc=1;
     8062      res->data=(char *)d;
     8063      res->rtyp=COMMAND;
     8064      return FALSE;
     8065    }
     8066#endif
     8067    int at=a->Typ();
     8068    // handling bb-objects ----------------------------------------------------
     8069    if (at>MAX_TOK)
     8070    {
     8071      blackbox *bb=getBlackboxStuff(at);
     8072      if (bb!=NULL)
     8073      {
     8074        if(!bb->blackbox_Op1(op,res,a)) return FALSE;
     8075        if (errorreported) return TRUE;
     8076        // else: no op defined
     8077      }
     8078      else          return TRUE;
     8079    }
     8080
     8081    BOOLEAN failed=FALSE;
     8082    iiOp=op;
     8083    int i=iiTabIndex(dArithTab1,JJTAB1LEN,op);
     8084    return iiExprArith1Tab(res,a,op, dArith1, i);
    80708085  }
    80718086  a->CleanUp();
  • Singular/ipshell.h

    r5b53cb re25346  
    250250
    251251BOOLEAN iiTestAssume(leftv a, leftv b);
    252 #endif
    253 
     252
     253/* table inteface for iiAddCproc */
     254BOOLEAN iiExprArith1Tab(leftv res, leftv a, int op, struct sValCmd1* dArith1, int i);
     255#endif
     256
Note: See TracChangeset for help on using the changeset viewer.