Loading...
Searching...
No Matches
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.

{
void* handle = slInitDBMHandle();
if (handle == NULL) return NULL;
s->Open=(slOpenProc)dynl_sym_warn(handle, "dbOpen");
s->Close=(slCloseProc)dynl_sym_warn(handle, "dbClose");
s->Kill=NULL;
s->Read=(slReadProc)dynl_sym_warn(handle, "dbRead1");
s->Read2=(slRead2Proc)dynl_sym_warn(handle, "dbRead2");
s->Write=(slWriteProc)dynl_sym_warn(handle, "dbWrite");
if (s->Open == NULL || s->Close == NULL ||
s->Read == NULL || s->Read2 == NULL)
return NULL;
s->Status=slStatusAscii;
s->type="DBM";
return s;
}
slStatusAscii
const char * slStatusAscii(si_link l, const char *request)
Definition asciiLink.cc:211
s
const CanonicalForm int s
Definition facAbsFact.cc:51
dynl_sym_warn
void * dynl_sym_warn(void *handle, const char *proc, const char *msg)
Definition mod_raw.cc:89
NULL
#define NULL
Definition omList.c:12
slRead2Proc
leftv(* slRead2Proc)(si_link l, leftv a)
Definition silink.h:30
slWriteProc
BOOLEAN(* slWriteProc)(si_link l, leftv lv)
Definition silink.h:25
slReadProc
leftv(* slReadProc)(si_link l)
Definition silink.h:29
slOpenProc
BOOLEAN(* slOpenProc)(si_link l, short flag, leftv h)
Definition silink.h:24
slCloseProc
BOOLEAN(* slCloseProc)(si_link l)
Definition silink.h:26
slInitDBMHandle
static void * slInitDBMHandle()
Definition slInit_Dynamic.cc:25

## slInitDBMHandle()

void * slInitDBMHandle | ( |  | ) |

static

Definition at line 25 of file slInit_Dynamic.cc.

{
if (dbm_so_handle == NULL)
dbm_so_handle = dynl_open_binary_warn("dbmsr");
return dbm_so_handle;
}
dynl_open_binary_warn
void * dynl_open_binary_warn(const char *binary_name, const char *msg)
Definition mod_raw.cc:45
dbm_so_handle
STATIC_VAR void * dbm_so_handle
Definition slInit_Dynamic.cc:24

## Variable Documentation

## dbm_so_handle

STATIC_VAR void* dbm_so_handle = NULL

Definition at line 24 of file slInit_Dynamic.cc.