File: mod_main.cc

package info (click to toggle)
singular 1%3A4.1.1-p2%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 35,856 kB
  • sloc: cpp: 288,280; ansic: 17,387; lisp: 4,242; yacc: 1,654; python: 1,608; makefile: 1,424; lex: 1,387; perl: 632; sh: 567; xml: 182
file content (48 lines) | stat: -rw-r--r-- 972 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#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;
}