My Project
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 271 of file bigintm.cc.

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