Loading...
Searching...
No Matches
bigintm.cc File Reference
`#include "kernel/mod2.h"`
`#include "omalloc/omalloc.h"`
`#include "coeffs/coeffs.h"`
`#include "Singular/ipid.h"`
`#include "Singular/subexpr.h"`
`#include "Singular/tok.h"`
`#include "Singular/blackbox.h"`
`#include "Singular/ipshell.h"`
`#include "bigintm.h"`

Go to the source code of this file.

## Macros

#define | HAVE_BIGINTM 1

## Functions

BOOLEAN | bigintm_setup ()

## Macro Definition Documentation

## HAVE_BIGINTM

#define HAVE_BIGINTM 1

Definition at line 18 of file bigintm.cc.

## Function Documentation

## bigintm_setup()

BOOLEAN bigintm_setup | ( |  | ) |

Definition at line 271 of file bigintm.cc.

{
#ifndef HAVE_BIGINTM
Werror("bigintm_setup: Sorry BIGINTM was not compiled in!");
return TRUE; // ok, TRUE = error!
#else
if( bigintm_type_id == -1 )
{
blackbox *b=(blackbox*)omAlloc0(sizeof(blackbox));
// all undefined entries will be set to default in setBlackboxStuff
// the default Print is quite usefule,
// all other are simply error messages
b->blackbox_destroy=bigintm_destroy;
b->blackbox_String=bigintm_String;
//b->blackbox_Print=blackbox_default_Print;
//b->blackbox_Init=blackbox_default_Init;
b->blackbox_Copy=bigintm_Copy;
b->blackbox_Assign=bigintm_Assign;
b->blackbox_Op1=bigintm_Op1;
b->blackbox_Op2=bigintm_Op2;
//b->blackbox_Op3=blackboxDefaultOp3;
b->blackbox_OpM=bigintm_OpM;
bigintm_type_id = setBlackboxStuff(b,"bigintm");
Print("bigintm_setup: created a blackbox type [%d] '%s'",bigintm_type_id, getBlackboxName(bigintm_type_id));
PrintLn();
return FALSE; // ok, TRUE = error!
}
else
{
Werror("bigintm_setup: Sorry should NOT be run twice!");
return TRUE; // ok, TRUE = error!
}
#endif
}
TRUE
#define TRUE
Definition auxiliary.h:101
FALSE
#define FALSE
Definition auxiliary.h:97
setBlackboxStuff
int setBlackboxStuff(blackbox *bb, const char *n)
define a new type
Definition blackbox.cc:143
getBlackboxName
const char * getBlackboxName(const int t)
return the name to the type given by t (r/o)
Definition blackbox.cc:213
b
CanonicalForm b
Definition cfModGcd.cc:4111
Print
#define Print
Definition emacs.cc:80
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211
PrintLn
void PrintLn()
Definition reporter.cc:314
Werror
void Werror(const char *fmt,...)
Definition reporter.cc:189