Go to the source code of this file.
Definition at line 132 of file silink.cc.
140 if (
l->m->Close !=
NULL)
l->m->Close(
l);
142 if ((
l->data !=
NULL) && (
l->m->Kill !=
NULL))
l->m->Kill(
l);
145 memset((
void *)
l, 0,
sizeof(ip_link));
volatile BOOLEAN do_shutdown
volatile int defer_shutdown
#define SI_LINK_OPEN_P(l)
Definition at line 247 of file silink.cc.
255 if (
l->m->Close !=
NULL)
257 res =
l->m->Close(
l);
259 Werror(
"close: Error for link of type: %s, mode: %s, name: %s",
260 l->m->type,
l->mode,
l->name);
#define SI_LINK_SET_CLOSE_P(l)
volatile BOOLEAN do_shutdown
volatile int defer_shutdown
void Werror(const char *fmt,...)
#define SI_LINK_OPEN_P(l)
Definition at line 351 of file silink.cc.
362 if (
l->m->Dump !=
NULL)
368 Werror(
"dump: Error for link of type %s, mode: %s, name: %s",
369 l->m->type,
l->mode,
l->name);
375 Werror(
"dump: Error to open link of type %s, mode: %s, name: %s for writing",
376 l->m->type,
l->mode,
l->name);
#define SI_LINK_R_OPEN_P(l)
BOOLEAN slOpen(si_link l, short flag, leftv h)
#define SI_LINK_W_OPEN_P(l)
BOOLEAN slClose(si_link l)
void Werror(const char *fmt,...)
Definition at line 381 of file silink.cc.
392 if (
l->m->GetDump !=
NULL)
393 res =
l->m->GetDump(
l);
398 Werror(
"getdump: Error for link of type %s, mode: %s, name: %s",
399 l->m->type,
l->mode,
l->name);
405 Werror(
"dump: Error open link of type %s, mode: %s, name: %s for reading",
406 l->m->type,
l->mode,
l->name);
#define SI_LINK_R_OPEN_P(l)
BOOLEAN slOpen(si_link l, short flag, leftv h)
void Werror(const char *fmt,...)
Definition at line 53 of file silink.cc.
63 while (istr[i] !=
':' && istr[i] !=
'\0') i++;
75 while (istr[
j] !=
' ' && istr[
j] !=
'\0')
j++;
82 while (istr[
j] ==
' '&& istr[
j] !=
'\0')
j++;
83 if (istr[
j] !=
'\0') name =
omStrDup(&(istr[
j]));
88 while (istr[
j] ==
' '&& istr[
j] !=
'\0')
j++;
89 if (istr[
j] !=
'\0') name =
omStrDup(&(istr[
j]));
97 si_link_extension prev =
s;
99 while (strcmp(s->type, type) != 0)
const CanonicalForm int s
si_link_extension si_link_root
static si_link_extension slTypeInit(si_link_extension s, const char *type)
char name(const Variable &v)
Definition at line 151 of file silink.cc.
155 if ((
l!=
NULL) &&(
l->ref == 0))
volatile BOOLEAN do_shutdown
volatile int defer_shutdown
void slCleanUp(si_link l)
#define omFreeBin(addr, bin)
Definition at line 199 of file silink.cc.
214 Warn(
"open: link of type: %s, mode: %s, name: %s is already open",
215 l->m->type,
l->mode,
l->name);
218 else if (
l->m->Open !=
NULL)
220 res =
l->m->Open(
l, flag, h);
222 Werror(
"open: Error for link %s of type: %s, mode: %s, name: %s",
223 c,
l->m->type,
l->mode,
l->name);
static void * feOptValue(feOptIndex opt)
void WerrorS(const char *s)
BOOLEAN slInit(si_link l, char *istr)
void Werror(const char *fmt,...)
BOOLEAN slSetRingDummy(si_link, ring r, BOOLEAN send)
#define SI_LINK_OPEN_P(l)
Definition at line 230 of file silink.cc.
237 if (
l->m->PrepClose !=
NULL)
239 res =
l->m->PrepClose(
l);
241 Werror(
"close: Error for link of type: %s, mode: %s, name: %s",
242 l->m->type,
l->mode,
l->name);
void Werror(const char *fmt,...)
#define SI_LINK_OPEN_P(l)
Definition at line 268 of file silink.cc.
288 if (
l->m->Read !=
NULL) v =
l->m->Read(
l);
292 if (
l->m->Read2 !=
NULL) v =
l->m->Read2(
l,a);
297 Werror(
"read: Error to open link of type %s, mode: %s, name: %s for reading",
298 l->m->type,
l->mode,
l->name);
309 Werror(
"read: Error for link of type %s, mode: %s, name: %s",
310 l->m->type,
l->mode,
l->name);
Class used for (list of) interpreter objects.
#define SI_LINK_CLOSE_P(l)
#define SI_LINK_R_OPEN_P(l)
void WerrorS(const char *s)
BOOLEAN slOpen(si_link l, short flag, leftv h)
const Variable & v
< [in] a sqrfree bivariate poly
BOOLEAN slClose(si_link l)
void Werror(const char *fmt,...)
Definition at line 194 of file silink.cc.
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
void rChangeCurrRing(ring r)
Definition at line 161 of file silink.cc.
163 if (
l ==
NULL)
return "empty link";
164 else if (
l->m ==
NULL)
return "unknown link type";
165 else if (strcmp(request,
"type") == 0)
return l->m->type;
166 else if (strcmp(request,
"mode") == 0)
return l->mode;
167 else if (strcmp(request,
"name") == 0)
return l->name;
168 else if (strcmp(request,
"exists") ==0)
171 if (si_lstat(
l->name,&
buf)==0)
return "yes";
174 else if (strcmp(request,
"open") == 0)
179 else if (strcmp(request,
"openread") == 0)
184 else if (strcmp(request,
"openwrite") == 0)
189 else if (
l->m->Status ==
NULL)
return "unknown status request";
190 else return l->m->Status(
l, request);
#define SI_LINK_R_OPEN_P(l)
int status int void * buf
#define SI_LINK_W_OPEN_P(l)
#define SI_LINK_OPEN_P(l)
static si_link_extension slTypeInit |
( |
si_link_extension |
s, |
|
|
const char * |
type |
|
) |
| |
|
static |
Definition at line 415 of file silink.cc.
424 else if (strcmp(type,
"DBM") == 0)
428 else if (strcmp(type,
"ssi") == 0)
432 else if (strcmp(type,
"|") == 0)
437 Warn(
"Found unknown link type: %s", type);
445 Werror(
"Can not initialize link type %s", type);
const CanonicalForm int s
si_link_extension slInitSsiExtension(si_link_extension s)
si_link_extension si_link_root
omBin s_si_link_extension_bin
si_link_extension slInitDBMExtension(si_link_extension s)
#define omFreeBin(addr, bin)
void Werror(const char *fmt,...)
si_link_extension slInitPipeExtension(si_link_extension s)
Definition at line 314 of file silink.cc.
333 if (
l->m->Write !=
NULL)
334 res =
l->m->Write(
l,v);
339 Werror(
"write: Error for link of type %s, mode: %s, name: %s",
340 l->m->type,
l->mode,
l->name);
345 Werror(
"write: Error to open link of type %s, mode: %s, name: %s for writing",
346 l->m->type,
l->mode,
l->name);
#define SI_LINK_CLOSE_P(l)
BOOLEAN slOpen(si_link l, short flag, leftv h)
#define SI_LINK_W_OPEN_P(l)
BOOLEAN slClose(si_link l)
void Werror(const char *fmt,...)
si_link_extension si_link_root =NULL |