Changeset f24733 in git for Singular/blackbox.cc


Ignore:
Timestamp:
Mar 15, 2011, 7:17:49 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
9e8da7ec659821d053dbf793a28c79fc2d851551
Parents:
5cdbfef15d0014847a35358d543945451f68ff41
Message:
MV: moved WrongOP to blackbox
FIX: dynamic modules must ONLY export 'mod_init'!

From: Oleksandr Motsak <motsak@mathematik.uni-kl.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@13981 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/blackbox.cc

    r5cdbfe rf24733  
    4242  return NULL;
    4343}
     44
     45// Tok2Cmdname -> iiTwoOps
     46BOOLEAN WrongOp(const char* cmd, int op, leftv bb)
     47{
     48  assume( bb->Typ() > MAX_TOK ); // it IS a blackbox type, right?!
     49 
     50  if( op > 127 )
     51    Werror("'%s' of type %s(%d) for op %s(%d) not implemented",
     52           cmd,
     53           getBlackboxName(bb->Typ()),bb->Typ(),
     54           iiTwoOps(op), op);
     55  else
     56    Werror("'%s' of type %s(%d) for op '%c' not implemented",
     57           cmd,
     58           getBlackboxName(bb->Typ()), bb->Typ(),
     59           op);
     60
     61  return TRUE;
     62}
     63
    4464BOOLEAN blackboxDefaultOp1(int op,leftv l, leftv r)
    4565{
     
    5070    return FALSE;
    5171  }
    52   if (op<127)
    53     Werror("blackbox_Op1 of type %s(%d) for op '%c' not implemented",
    54       getBlackboxName(r->Typ()),r->Typ(),op);
    55   else
    56     Werror("blackbox_Op1 of type %s(%d) for op %s(%d) not implemented",
    57       getBlackboxName(r->Typ()),r->Typ(),Tok2Cmdname(op),op);
    58   return TRUE;
     72
     73  return WrongOp("blackbox_Op1", op, r);
    5974}
     75
    6076BOOLEAN blackboxDefaultOp2(int op,leftv l, leftv r1, leftv r2)
    6177{
    62   if (op<127)
    63     Werror("blackbox_Op2 of type %s(%d) for op '%c' not implemented",
    64       getBlackboxName(r1->Typ()),r1->Typ(),op);
    65   else
    66     Werror("blackbox_Op2 of type %s(%d) for op %s(%d) not implemented",
    67       getBlackboxName(r1->Typ()),r1->Typ(),Tok2Cmdname(op),op);
    68   return TRUE;
     78  return WrongOp("blackbox_Op2", op, r1);
    6979}
     80
    7081BOOLEAN blackbox_default_Op3(int op,leftv l, leftv r1,leftv r2, leftv r3)
    7182{
    72   if (op<127)
    73     Werror("blackbox_Op3 of type %s(%d) for op '%c' not implemented",
    74       getBlackboxName(r1->Typ()),r1->Typ(),op);
    75   else
    76     Werror("blackbox_Op3 of type %s(%d) for op %s(%d) not implemented",
    77       getBlackboxName(r1->Typ()),r1->Typ(),Tok2Cmdname(op),op);
    78   return TRUE;
     83  return WrongOp("blackbox_Op3", op, r1);
    7984}
     85
    8086BOOLEAN blackbox_default_OpM(int op,leftv l, leftv r)
    8187{
    82   if (op<127)
    83     Werror("blackbox_OpM of type %s(%d) for op '%c' not implemented",
    84       getBlackboxName(r->Typ()),r->Typ(),op);
    85   else
    86     Werror("blackbox_OpM of type %s(%d) for op %s(%d) not implemented",
    87       getBlackboxName(r->Typ()),r->Typ(),Tok2Cmdname(op),op);
    88   return TRUE;
     88  return WrongOp("blackbox_OpM", op, r);
    8989}
    9090
Note: See TracChangeset for help on using the changeset viewer.