My Project  UNKNOWN_GIT_VERSION
Macros | Functions
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 23 of file bigintm.cc.

Function Documentation

◆ bigintm_setup()

BOOLEAN bigintm_setup ( )

Definition at line 276 of file bigintm.cc.

277 {
278 #ifndef HAVE_BIGINTM
279  Werror("bigintm_setup: Sorry BIGINTM was not compiled in!");
280  return TRUE; // ok, TRUE = error!
281 #else
282 
283  if( bigintm_type_id == -1 )
284  {
285  blackbox *b=(blackbox*)omAlloc0(sizeof(blackbox));
286  // all undefined entries will be set to default in setBlackboxStuff
287  // the default Print is quite usefule,
288  // all other are simply error messages
289  b->blackbox_destroy=bigintm_destroy;
290  b->blackbox_String=bigintm_String;
291  //b->blackbox_Print=blackbox_default_Print;
292  //b->blackbox_Init=blackbox_default_Init;
293  b->blackbox_Copy=bigintm_Copy;
294  b->blackbox_Assign=bigintm_Assign; // TO ASK: no default?!
295  b->blackbox_Op1=bigintm_Op1;
296  b->blackbox_Op2=bigintm_Op2;
297  //b->blackbox_Op3=blackboxDefaultOp3;
298  b->blackbox_OpM=bigintm_OpM;
299 
300  bigintm_type_id = setBlackboxStuff(b,"bigintm");
301 
302  Print("bigintm_setup: created a blackbox type [%d] '%s'",bigintm_type_id, getBlackboxName(bigintm_type_id));
303  PrintLn();
304 
305  return FALSE; // ok, TRUE = error!
306  }
307  else
308  {
309  Werror("bigintm_setup: Sorry should NOT be run twice!");
310  return TRUE; // ok, TRUE = error!
311  }
312 
313 #endif
314 }
FALSE
#define FALSE
Definition: auxiliary.h:94
b
CanonicalForm b
Definition: cfModGcd.cc:4044
TRUE
#define TRUE
Definition: auxiliary.h:98
Print
#define Print
Definition: emacs.cc:80
Werror
void Werror(const char *fmt,...)
Definition: reporter.cc:189
PrintLn
void PrintLn()
Definition: reporter.cc:310
getBlackboxName
const char * getBlackboxName(const int t)
return the name to the type given by t (r/o)
Definition: blackbox.cc:186
omAlloc0
#define omAlloc0(size)
Definition: omAllocDecl.h:211
setBlackboxStuff
int setBlackboxStuff(blackbox *bb, const char *n)
define a new type
Definition: blackbox.cc:126