My Project
Loading...
Searching...
No Matches
Functions | Variables
slInit_Dynamic.cc File Reference
#include "kernel/mod2.h"
#include "Singular/links/silink.h"
#include "Singular/links/slInit.h"
#include "Singular/mod_lib.h"
#include "dbm_sl.h"

Go to the source code of this file.

Functions

static void * slInitDBMHandle ()
 
si_link_extension slInitDBMExtension (si_link_extension s)
 

Variables

STATIC_VAR void * dbm_so_handle = NULL
 

Function Documentation

◆ slInitDBMExtension()

si_link_extension slInitDBMExtension ( si_link_extension  s)

Definition at line 33 of file slInit_Dynamic.cc.

34{
35 void* handle = slInitDBMHandle();
36
37 if (handle == NULL) return NULL;
38
39 s->Open=(slOpenProc)dynl_sym_warn(handle, "dbOpen");
40 s->Close=(slCloseProc)dynl_sym_warn(handle, "dbClose");
41 s->Kill=NULL;
42 s->Read=(slReadProc)dynl_sym_warn(handle, "dbRead1");
43 s->Read2=(slRead2Proc)dynl_sym_warn(handle, "dbRead2");
44 s->Write=(slWriteProc)dynl_sym_warn(handle, "dbWrite");
45
46 if (s->Open == NULL || s->Close == NULL ||
47 s->Read == NULL || s->Read2 == NULL)
48 return NULL;
49
50 s->Status=slStatusAscii;
51 s->type="DBM";
52 return s;
53}
const CanonicalForm int s
Definition: facAbsFact.cc:51
void * dynl_sym_warn(void *handle, const char *proc, const char *msg)
Definition: mod_raw.cc:89
#define NULL
Definition: omList.c:12
static void * slInitDBMHandle()

◆ slInitDBMHandle()

static void * slInitDBMHandle ( )
static

Definition at line 25 of file slInit_Dynamic.cc.

26{
27 if (dbm_so_handle == NULL)
29
30 return dbm_so_handle;
31}
void * dynl_open_binary_warn(const char *binary_name, const char *msg)
Definition: mod_raw.cc:45
STATIC_VAR void * dbm_so_handle

Variable Documentation

◆ dbm_so_handle

STATIC_VAR void* dbm_so_handle = NULL

Definition at line 24 of file slInit_Dynamic.cc.