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

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()

◆ slStatusAscii()

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

Definition at line 209 of file asciiLink.cc.

210{
211 if (strcmp(request, "read") == 0)
212 {
213 if (SI_LINK_R_OPEN_P(l)) return "ready";
214 else return "not ready";
215 }
216 else if (strcmp(request, "write") == 0)
217 {
218 if (SI_LINK_W_OPEN_P(l)) return "ready";
219 else return "not ready";
220 }
221 else return "unknown status request";
222}
int l
Definition: cfEzgcd.cc:100