Loading...
Searching...
No Matches
slInit.h File Reference
`#include "Singular/links/silink.h"`

Go to the source code of this file.

## Functions

si_link_extension | slInitDBMExtension (si_link_extension s)
const char * | slStatusAscii (si_link l, const char *request)

## 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

## slStatusAscii()

const char * slStatusAscii | ( | si_link | l,
|  | const char * | request )

Definition at line 211 of file asciiLink.cc.

{
if (strcmp(request, "read") == 0)
{
if (SI_LINK_R_OPEN_P(l)) return "ready";
else return "not ready";
}
else if (strcmp(request, "write") == 0)
{
if (SI_LINK_W_OPEN_P(l)) return "ready";
else return "not ready";
}
else return "unknown status request";
}
l
int l
Definition cfEzgcd.cc:100
SI_LINK_W_OPEN_P
#define SI_LINK_W_OPEN_P(l)
Definition silink.h:72
SI_LINK_R_OPEN_P
#define SI_LINK_R_OPEN_P(l)
Definition silink.h:73