My Project  UNKNOWN_GIT_VERSION
Functions
bigintm.h File Reference

Go to the source code of this file.

Functions

BOOLEAN bigintm_setup ()
 

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:79
Werror
void Werror(const char *fmt,...)
Definition: reporter.cc:188
PrintLn
void PrintLn()
Definition: reporter.cc:309
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:209
setBlackboxStuff
int setBlackboxStuff(blackbox *bb, const char *n)
define a new type
Definition: blackbox.cc:126