source: git/Singular/slInit_Static.cc @ 4e654a2

spielwiese
Last change on this file since 4e654a2 was 762407, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
config.h is for sources files only FIX: config.h should only be used by source (not from inside kernel/mod2.h!) NOTE: each source file should better include mod2.h right after config.h, while headers should better not include mod2.h.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/***************************************************************
5 *  File:    slInit_Static.cc
6 *  Purpose: link initialization for static linking
7 *  Author:  obachman (Olaf Bachmann)
8 *  Created: 12/00
9 *  Version: $Id$
10 *******************************************************************/
11
12/***************************************************************
13 *
14 * MP link Extension inits
15 *
16 ***************************************************************/
17#include "config.h"
18#include <kernel/mod2.h>
19
20#include <Singular/silink.h>
21#include <Singular/slInit.h>
22
23#ifdef HAVE_MPSR
24
25#include <MP.h>
26#include <Singular/mpsr_sl.h>
27
28extern void mpsr_Init();
29
30si_link_extension slInitMPFileExtension(si_link_extension s)
31{
32  mpsr_Init();
33  s->Open=slOpenMPFile;
34  s->Close=slCloseMP;
35  s->Kill=slCloseMP;
36  s->Read=slReadMP;
37  s->Dump=slDumpMP;
38  s->GetDump=slGetDumpMP;
39  s->Write=slWriteMP;
40  s->Status=slStatusMP;
41  s->type="MPfile";
42  return s;
43}
44
45si_link_extension slInitMPTcpExtension(si_link_extension s)
46{
47  mpsr_Init();
48  s->Open=slOpenMPTcp;
49  s->Close=slCloseMP;
50  s->Kill=slKillMP;
51  s->Read=slReadMP;
52  s->Dump=slDumpMP;
53  s->GetDump=slGetDumpMP;
54  s->Write=slWriteMP;
55  s->Status=slStatusMP;
56  s->type="MPtcp";
57  return s;
58}
59
60BatchDoProc slInitMPBatchDo()
61{
62  mpsr_Init();
63  return Batch_do;
64}
65#endif
66
67#ifdef HAVE_DBM
68
69# ifndef USE_GDBM
70#   include <Singular/dbm_sl.h>
71# else
72#   include <Singular/sing_dbm.h>
73#endif
74
75si_link_extension slInitDBMExtension(si_link_extension s)
76{
77  s->Open=dbOpen;
78  s->Close=dbClose;
79  s->Kill=dbClose;
80  s->Read=dbRead1;
81  s->Read2=dbRead2;
82  s->Write=dbWrite;
83  s->Status=slStatusAscii;
84  s->type="DBM";
85  return s;
86}
87#endif /* #ifdef HAVE_DBM */
Note: See TracBrowser for help on using the repository browser.