Changeset 68e012 in git


Ignore:
Timestamp:
May 7, 2014, 5:31:21 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
83ce221ff06900901bec39d172e89083a2a00b8f
Parents:
db307034db2dde8aab44eb52538a2043154907c5
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2014-05-07 17:31:21+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2014-05-07 19:22:55+02:00
Message:
cleanup: bigintm
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/bigintm/bigintm.cc

    rdb3070 r68e012  
    1515#include <Singular/ipshell.h>
    1616
    17 #include <Singular/ipid.h> 
     17#include <Singular/ipid.h>
    1818// extern coeffs coeffs_BIGINT
    1919
     
    4747{
    4848  assume( l->Typ() == bigintm_type_id );
    49  
     49
    5050  // blackbox *ll=getBlackboxStuff(l->Typ());
    51  
     51
    5252  if (r->Typ()>MAX_TOK)
    5353  {
     
    5555    {
    5656      // blackbox *rr=getBlackboxStuff(r->Typ());
    57      
     57
    5858      if (l->Data()!=NULL) { number n1=(number)l->Data(); n_Delete(&n1,coeffs_BIGINT); }
    5959      number n2=(number)r->CopyD();
     
    9292  else
    9393    Werror("assign %d = %d",l->Typ(),r->Typ());
    94  
     94
    9595  return TRUE;
    9696}
     
    109109  }
    110110*/
    111  
     111
    112112  if( op=='(' ) // <bigintm>  VAR();
    113113  {
    114114    Werror("bigintm_Op1: What do you mean by '<bigintm>()'?!");
    115     return TRUE; 
     115    return TRUE;
    116116  }
    117117
     
    127127  // interpreter: a1 is ist bigintm
    128128  assume( a1->Typ() == bigintm_type_id );
    129  
     129
    130130  // blackbox *a=getBlackboxStuff(a1->Typ());
    131   number n1=(number)a1->Data(); 
     131  number n1=(number)a1->Data();
    132132  switch(op)
    133133  {
     
    144144      else if (a2->Typ()==a1->Typ())
    145145      {
    146         number n2=(number)a2->Data(); 
     146        number n2=(number)a2->Data();
    147147        number n=n_Add(n1,n2, coeffs_BIGINT);
    148148        res->data=(void *)n;
     
    152152
    153153      Werror("bigintm_Op2: Op: '+': Sorry unsupported 2nd argument-type: %s in", Tok2Cmdname(a2->Typ()));
    154       return WrongOp("bigintm_Op2", op, a1);
     154      return TRUE;
    155155    }
    156156
     
    167167      else if (a2->Typ()==a1->Typ())
    168168      {
    169         number n2=(number)a2->Data(); 
     169        number n2=(number)a2->Data();
    170170        number n=n_Sub(n1,n2, coeffs_BIGINT);
    171171        res->data=(void *)n;
     
    173173        return FALSE;
    174174      }
    175      
     175
    176176      Werror("bigintm_Op2: Op: '-': Sorry unsupported 2nd argument-type: %s in", Tok2Cmdname(a2->Typ()));
    177       WrongOp("bigintm_Op2", op, a1);
    178177      return TRUE;
    179178    }
     
    192191      else if (a2->Typ()==a1->Typ())
    193192      {
    194         number n2=(number)a2->Data(); 
     193        number n2=(number)a2->Data();
    195194        number n=n_Mult(n1,n2, coeffs_BIGINT);
    196195        res->data=(void *)n;
     
    199198      }
    200199      Werror("bigintm_Op2: Op: '*': Sorry unsupported 2nd argument-type: '%s' in", Tok2Cmdname(a2->Typ()));
    201       WrongOp("bigintm_Op2", op, a1);
    202200      return TRUE;
    203201    }
     
    207205    {
    208206      Werror("bigintm_Op2: What du you mean by '<bigintm>(...%s...)'?!", Tok2Cmdname(a2->Typ()));
    209       return TRUE; 
     207      return TRUE;
    210208    }
    211209*/
     
    227225      else if (a2->Typ()==a1->Typ())
    228226      {
    229         number n2=(number)a2->Data(); 
     227        number n2=(number)a2->Data();
    230228        res->data=(void *) (long) n_Equal(n1,n2, coeffs_BIGINT);
    231229        res->rtyp= INT_CMD;
     
    234232
    235233      Werror("bigintm_Op2: Op: '==': Sorry unsupported 2nd argument-type: '%s' in", Tok2Cmdname(a2->Typ()));
    236       WrongOp("bigintm_Op2", op, a1);
    237234      return TRUE;
    238235    }
     
    243240      if (a2->name==NULL)
    244241      {
    245         Werror("bigintm_Op2: Op: '.': 2nd argument-type: '%s'(%d) should be a NAME", Tok2Cmdname(a2->Typ()), a2->Typ());     
     242        Werror("bigintm_Op2: Op: '.': 2nd argument-type: '%s'(%d) should be a NAME", Tok2Cmdname(a2->Typ()), a2->Typ());
    246243        return TRUE;
    247244      }
    248      
    249       Werror("bigintm_Op2: Op: '.': 2nd argument-type: '%s'(%d) is called '%s' in ", Tok2Cmdname(a2->Typ()), a2->Typ(), a2->name);     
     245
     246      Werror("bigintm_Op2: Op: '.': 2nd argument-type: '%s'(%d) is called '%s' in ", Tok2Cmdname(a2->Typ()), a2->Typ(), a2->name);
    250247      return blackboxDefaultOp2(op,res,a1,a2);
    251       return TRUE;
    252248    }
    253249
    254250    default:
    255     {
    256       WrongOp("bigintm_Op2", op, a1);
    257251      return blackboxDefaultOp2(op,res,a1,a2);
    258       break;
    259     }
    260252  }
    261253}
     
    279271    {
    280272      Werror("bigintm_OpM: What do you mean by '<bigintm>(...)'?!");
    281       return TRUE; 
    282     }
    283    
     273      return TRUE;
     274    }
     275
    284276    default:
    285       WrongOp("bigintm_OpM", op, args);
    286       break;
    287   }
    288   return blackbox_default_OpM(op, res, args);
     277      return blackbox_default_OpM(op, res, args);
     278  }
     279  return TRUE;
    289280}
    290281
     
    333324
    334325    return FALSE; // ok, TRUE = error!
    335   } else
     326  }
     327  else
    336328  {
    337329    Werror("bigintm_setup: Sorry should NOT be run twice!");
Note: See TracChangeset for help on using the changeset viewer.