Loading...
Searching...
No Matches
mod_main.cc
Go to the documentation of this file.
#include "kernel/mod2.h"
#include "Singular/mod_lib.h"
#include "Singular/blackbox.h"
#include "Singular/tok.h"
#include "Singular/ipid.h"
#include "Singular/lists.h"
#include "bigintm.h"
namespace
{
static inline void NoReturn(leftv& res)
{
res->rtyp = NONE;
res->data = NULL;
}
/// listing all blackbox types (debug stuff)
static BOOLEAN printBlackboxTypes0(leftv __res, leftv /*__v*/)
{
NoReturn(__res);
printBlackboxTypes();
return FALSE;
}
/// init the bigintm (a sample blackbox) type
static BOOLEAN bigintm_setup0(leftv __res, leftv /*__v*/)
{
NoReturn(__res);
return bigintm_setup();
}
}
extern "C" int SI_MOD_INIT(bigintm)(SModulFunctions* psModulFunctions)
{
psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0);
psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0);
// Q: should we call 'bigintm_setup' here??!?!?
return MAX_TOK;
}
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
FALSE
#define FALSE
Definition auxiliary.h:97
bigintm
int SI_MOD_INIT bigintm(SModulFunctions *psModulFunctions)
Definition mod_main.cc:41
bigintm_setup
BOOLEAN bigintm_setup()
Definition bigintm.cc:271
bigintm.h
printBlackboxTypes
void printBlackboxTypes()
list all defined type (for debugging)
Definition blackbox.cc:236
blackbox.h
res
CanonicalForm res
Definition facAbsFact.cc:60
currPack
VAR package currPack
Definition ipid.cc:55
ipid.h
SModulFunctions
Definition ipid.h:69
lists.h
mod2.h
mod_lib.h
NULL
#define NULL
Definition omList.c:12
leftv
sleftv * leftv
Definition structs.h:53
NoReturn
static void NoReturn(leftv &res)
Definition mod_main.cc:42
tok.h
MAX_TOK
@ MAX_TOK
Definition tok.h:220
NONE
#define NONE
Definition tok.h:223