source: git/dyn_modules/bigintm/mod_main.cc @ 636c28

spielwiese
Last change on this file since 636c28 was 636c28, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: "scons debug=1" for debug version UPD: updated bigintm to support correct (debug/release) version FIX: some minor warnings (thanks to debug version) From: Oleksandr Motsak <motsak@mathematik.uni-kl.de> git-svn-id: file:///usr/local/Singular/svn/trunk@14066 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 993 bytes
RevLine 
[e6d9a32]1/*
2 * Developer's BB tests
3 */
4
5#include <Singular/mod2.h>
6
7#include <Singular/blackbox.h>
8
9#include <Singular/tok.h>
10#include <Singular/ipid.h>
11#include <Singular/lists.h>
12
13#include <dlfcn.h>
14
15#include "bigintm.h"
16
[f24733]17namespace
18{
[e6d9a32]19
20static inline void NoReturn(leftv& res)
21{
22  res->rtyp = NONE;
23  res->data = NULL;
24}
25
26
27/// listing all blackbox types (debug stuff)
[636c28]28static BOOLEAN printBlackboxTypes0(leftv __res, leftv /*__v*/)
[e6d9a32]29{
30  NoReturn(__res);
31  printBlackboxTypes();
32  return FALSE;
33}
34
35/// init the bigintm (a sample blackbox) type
[636c28]36static BOOLEAN bigintm_setup0(leftv __res, leftv /*__v*/)
[e6d9a32]37{
38  NoReturn(__res);
39  return bigintm_setup();
40}
41
[5cdbfe]42}
43
44
[e6d9a32]45extern "C" 
46{
47  int mod_init(SModulFunctions* psModulFunctions) 
48  {
[636c28]49    psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes0);
50    psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup0);
[5cdbfe]51
[636c28]52    // Q: should we call 'bigintm_setup' here??!?!?
53    return 0;
[e6d9a32]54  }
55}
Note: See TracBrowser for help on using the repository browser.