source: git/dyn_modules/bigintm/mod_main.cc @ 83192d

spielwiese
Last change on this file since 83192d was 83192d, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
Fixing the including of "config.h"-files before any other headers + include reordering... fix: also syzextra
  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 * Developer's BB tests
3 */
4
5#ifdef HAVE_CONFIG_H
6#include "config.h"
7#endif /* HAVE_CONFIG_H */
8
9#include <kernel/mod2.h>
10
11#include <Singular/blackbox.h>
12
13#include <Singular/tok.h>
14#include <Singular/ipid.h>
15#include <Singular/lists.h>
16
17#include <dlfcn.h>
18
19#include "bigintm.h"
20
21namespace
22{
23
24static inline void NoReturn(leftv& res)
25{
26  res->rtyp = NONE;
27  res->data = NULL;
28}
29
30
31/// listing all blackbox types (debug stuff)
32static BOOLEAN printBlackboxTypes0(leftv __res, leftv /*__v*/)
33{
34  NoReturn(__res);
35  printBlackboxTypes();
36  return FALSE;
37}
38
39/// init the bigintm (a sample blackbox) type
40static BOOLEAN bigintm_setup0(leftv __res, leftv /*__v*/)
41{
42  NoReturn(__res);
43  return bigintm_setup();
44}
45
46}
47
48
49extern "C" 
50{
51  int mod_init(SModulFunctions* psModulFunctions) 
52  {
53    psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0);
54    psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0);
55
56    // Q: should we call 'bigintm_setup' here??!?!?
57    return 0;
58  }
59}
Note: See TracBrowser for help on using the repository browser.