source: git/dyn_modules/bigintm/mod_main.cc @ e6d9a32

jengelh-datetimespielwiese
Last change on this file since e6d9a32 was e6d9a32, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
ADD: bigintm as a module sample ADD: public blackbox_default_OpM ADD: more commands/ops From: Oleksandr Motsak <motsak@mathematik.uni-kl.de> git-svn-id: file:///usr/local/Singular/svn/trunk@13940 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 898 bytes
Line 
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
17
18static inline void NoReturn(leftv& res)
19{
20  res->rtyp = NONE;
21  res->data = NULL;
22}
23
24
25/// listing all blackbox types (debug stuff)
26BOOLEAN printBlackboxTypes(leftv __res, leftv __v)
27{
28  NoReturn(__res);
29  printBlackboxTypes();
30  return FALSE;
31}
32
33/// init the bigintm (a sample blackbox) type
34BOOLEAN bigintm_setup(leftv __res, leftv __v)
35{
36  NoReturn(__res);
37  return bigintm_setup();
38}
39
40extern "C" 
41{
42  int mod_init(SModulFunctions* psModulFunctions) 
43  {
44    psModulFunctions->iiAddCproc(currPack->libname,(char*)"printBlackboxTypes",FALSE, printBlackboxTypes);
45    psModulFunctions->iiAddCproc(currPack->libname,(char*)"bigintm_setup",FALSE, bigintm_setup);
46    return 0;
47  }
48}
Note: See TracBrowser for help on using the repository browser.