Changeset 73f3ca7 in git


Ignore:
Timestamp:
Sep 19, 2014, 5:36:59 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
0e8dab27bf2f0f78deb06b2627bb3f13ab41e7c5768faf941b632918f43fb7b4b3300abff92ddd97
Parents:
1c5671bf0ac80d11a9c67730f239e645e50482de
Message:
chg: table interface for iiAddCproc: 1 arg
Location:
Singular
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/gentable.cc

    r1c5671 r73f3ca7  
    284284* try to convert 'inputType' in 'outputType'
    285285* return 0 on failure, an index (<>0) on success
     286* GENTABLE variant!
    286287*/
    287288int iiTestConvert (int inputType, int outputType)
  • Singular/iparith.cc

    r1c5671 r73f3ca7  
    79317931 * then alphabetically */
    79327932
    7933 BOOLEAN iiExprArith1Tab(leftv res, leftv a, int op, struct sValCmd1* dArith1, int i)
     7933BOOLEAN iiExprArith1Tab(leftv res, leftv a, int op, struct sValCmd1* dArith1, int i, int at, struct sConvertTypes *dConvertTypes)
    79347934{
    79357935  memset(res,0,sizeof(sleftv));
     
    79397939  {
    79407940    BOOLEAN failed=FALSE;
    7941     int at=a->Typ();
    79427941    iiOp=op;
    79437942    int ti = i;
     
    79777976        int ai;
    79787977        //Print("test %s\n",Tok2Cmdname(dArith1[i].arg));
    7979         if ((ai=iiTestConvert(at,dArith1[i].arg))!=0)
     7978        if ((ai=iiTestConvert(at,dArith1[i].arg,dConvertTypes))!=0)
    79807979        {
    79817980          if (currRing!=NULL)
     
    79867985            Print("call %s(%s)\n",iiTwoOps(op),Tok2Cmdname(dArith1[i].arg));
    79877986          res->rtyp=dArith1[i].res;
    7988           failed= ((iiConvert(at,dArith1[i].arg,ai,a,an))
     7987          failed= ((iiConvert(at,dArith1[i].arg,ai,a,an,dConvertTypes))
    79897988          || (call_failed=dArith1[i].p(res,an)));
    79907989          // everything done, clean up temp. variables
     
    80828081    iiOp=op;
    80838082    int i=iiTabIndex(dArithTab1,JJTAB1LEN,op);
    8084     return iiExprArith1Tab(res,a,op, dArith1, i);
     8083    return iiExprArith1Tab(res,a,op, dArith1, i,at,dConvertTypes);
    80858084  }
    80868085  a->CleanUp();
  • Singular/ipconv.cc

    r1c5671 r73f3ca7  
    298298* return FALSE on success
    299299*/
    300 BOOLEAN iiConvert (int inputType, int outputType, int index, leftv input, leftv output)
     300BOOLEAN iiConvert (int inputType, int outputType, int index, leftv input, leftv output,struct sConvertTypes *dConvertTypes)
    301301{
    302302  memset(output,0,sizeof(sleftv));
     
    421421* return 0 on failure, an index (<>0) on success
    422422*/
    423 int iiTestConvert (int inputType, int outputType)
     423int iiTestConvert (int inputType, int outputType,struct sConvertTypes *dConvertTypes)
    424424{
    425425  if ((inputType==outputType)
  • Singular/ipconv.h

    r1c5671 r73f3ca7  
    88*/
    99#include <kernel/structs.h>
     10#include <Singular/table.h>
    1011
    11 int iiTestConvert (int inputType, int outputType);
     12int iiTestConvert (int inputType, int outputType, struct sConvertTypes *dCT=dConvertTypes);
    1213BOOLEAN iiConvert (int inputType, int outputType, int index,
    13                    leftv input, leftv output);
     14                   leftv input, leftv output, struct sConvertTypes *dCT=dConvertTypes);
    1415#endif
    1516
  • Singular/ipshell.h

    r1c5671 r73f3ca7  
    252252
    253253/* table inteface for iiAddCproc */
    254 BOOLEAN iiExprArith1Tab(leftv res, leftv a, int op, struct sValCmd1* dArith1, int i);
    255 #endif
    256 
     254BOOLEAN iiExprArith1Tab(leftv res, leftv a, int op,
     255            struct sValCmd1* dArith1, int i, int at,
     256            struct sConvertTypes *dConvertTypes);
     257#endif
     258
  • Singular/table.h

    r1c5671 r73f3ca7  
    11931193   { 0,               0,              NULL_VAL , NULL_VAL }
    11941194};
     1195#else
     1196extern struct sConvertTypes dConvertTypes[];
    11951197#endif
    11961198#ifdef IPASSIGN
Note: See TracChangeset for help on using the changeset viewer.