Go to the source code of this file.
|
static BOOLEAN | DumpAscii (FILE *fd, idhdl h, char ***list_of_libs) |
|
static BOOLEAN | DumpAsciiIdhdl (FILE *fd, idhdl h, char ***list_of_libs) |
|
static const char * | GetIdString (idhdl h) |
|
static int | DumpRhs (FILE *fd, idhdl h) |
|
static BOOLEAN | DumpQring (FILE *fd, idhdl h) |
|
static BOOLEAN | DumpNCring (FILE *fd, idhdl h) |
|
static BOOLEAN | DumpAsciiMaps (FILE *fd, idhdl h, idhdl rhdl) |
|
static BOOLEAN | CollectLibs (char *name, char ***list_of_libs) |
|
static BOOLEAN | slOpenAscii (si_link l, short flag, leftv) |
|
static BOOLEAN | slCloseAscii (si_link l) |
|
static leftv | slReadAscii2 (si_link l, leftv pr) |
|
static leftv | slReadAscii (si_link l) |
|
static BOOLEAN | slWriteAscii (si_link l, leftv v) |
|
const char * | slStatusAscii (si_link l, const char *request) |
|
static BOOLEAN | slDumpAscii (si_link l) |
|
static BOOLEAN | slGetDumpAscii (si_link l) |
|
void | slStandardInit () |
|
◆ MAX_LIBS
◆ CollectLibs()
Definition at line 485 of file asciiLink.cc.
486{
488 {
489 #define MAX_LIBS 256
491 (*list_of_libs)[0]=
name;
492 (*list_of_libs)[
MAX_LIBS-1]=(
char*)1;
494 }
495 else
496 {
498 while (((*
p)!=
NULL)&&((*
p!=(
char*)1)))
499 {
502 }
504 {
507 }
508 else
509 {
511 }
512 }
514}
char name(const Variable &v)
void WerrorS(const char *s)
◆ DumpAscii()
Definition at line 257 of file asciiLink.cc.
258{
260
262
263
264
267
269
272 else
274}
static BOOLEAN DumpAscii(FILE *fd, idhdl h, char ***list_of_libs)
static BOOLEAN DumpAsciiIdhdl(FILE *fd, idhdl h, char ***list_of_libs)
◆ DumpAsciiIdhdl()
Definition at line 305 of file asciiLink.cc.
306{
309
311 {
315 }
317 {
318
321 #ifdef SINGULAR_4_2
324 #endif
325 }
326
327
330
331
334
335
338
339
342
343
348
349
352
354 {
357 }
359 {
362 }
364 {
367 }
368
370 {
372 }
373
374
376
377
379
380
382
384}
static const char * GetIdString(idhdl h)
static BOOLEAN CollectLibs(char *name, char ***list_of_libs)
static BOOLEAN DumpNCring(FILE *fd, idhdl h)
static int DumpRhs(FILE *fd, idhdl h)
static BOOLEAN DumpQring(FILE *fd, idhdl h)
static BOOLEAN rIsNCRing(const ring r)
◆ DumpAsciiMaps()
Definition at line 276 of file asciiLink.cc.
277{
280
284 {
288
292 {
295 }
296 else
297 {
300 }
301 }
303}
static BOOLEAN DumpAsciiMaps(FILE *fd, idhdl h, idhdl rhdl)
const char * Tok2Cmdname(int tok)
◆ DumpNCring()
Definition at line 436 of file asciiLink.cc.
437{
440
442 {
454 }
456 {
457
458
461 }
464}
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
char * iiStringMatrix(matrix im, int dim, const ring r, char ch)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static BOOLEAN rIsLPRing(const ring r)
◆ DumpQring()
Definition at line 466 of file asciiLink.cc.
467{
471 if (
fprintf(
fd,
"ideal temp_ideal = %s;\n",
474 if (
fputs(
"attrib(temp_ideal, \"isSB\", 1);\n",
fd) ==
EOF)
return TRUE;
478 else
479 {
482 }
483}
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
◆ DumpRhs()
Definition at line 517 of file asciiLink.cc.
518{
520
522 {
525
527
529 {
532 }
534 {
536 }
538 }
540 {
543 while (*
pstr !=
'\0')
544 {
548 }
550 }
552 {
555 {
556
557 char *
pstr =
pi->data.s.body;
559 while (*
pstr !=
'\0')
560 {
564 }
566 }
568 }
569 else
570 {
571 char *
rhs =
h->String();
572
574
581
584
587 {
593 }
595 }
596 return 1;
597}
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
void p_Write(poly p, ring lmRing, ring tailRing)
void StringSetS(const char *st)
◆ GetIdString()
Definition at line 386 of file asciiLink.cc.
387{
389
390 switch(type)
391 {
393
394
395
396
397
398
399
400
401
402
404 #ifdef SINGULAR_4_2
407 #endif
425
429
430 default:
433 }
434}
◆ slCloseAscii()
Definition at line 98 of file asciiLink.cc.
99{
101 if (
l->name[0] !=
'\0')
102 {
104 }
106}
#define SI_LINK_SET_CLOSE_P(l)
◆ slDumpAscii()
Definition at line 228 of file asciiLink.cc.
229{
234
236
241 {
242 while((*
p!=
NULL) && (*
p!=(
char*)1))
243 {
246 }
248 }
251
253}
◆ slGetDumpAscii()
Definition at line 599 of file asciiLink.cc.
600{
601 if (
l->name[0] ==
'\0')
602 {
603 WerrorS(
"getdump: Can not get dump from stdin");
605 }
606 else
607 {
611
614
616
618
621 else
622 {
623
624
628 }
629 }
630}
BOOLEAN newFile(char *fname)
◆ slOpenAscii()
Definition at line 36 of file asciiLink.cc.
37{
39 const char *mode;
41 {
42 if (
l->mode[0] !=
'\0' && (
strcmp(
l->mode,
"r") == 0))
45 }
46
48 else if (
strcmp(
l->mode,
"w") == 0) mode =
"w";
49 else mode = "a";
50
51
52 if (
l->name[0] ==
'\0')
53 {
54
56 {
58 mode = "r";
59 }
60 else
61 {
63 mode = "a";
64 }
65 }
66 else
67 {
68
70 char *filename=
l->name;
71
72 if(filename[0]=='>')
73 {
74 if (filename[1]=='>')
75 {
76 filename+=2;
77 mode = "a";
78 }
79 else
80 {
81 filename++;
82 mode="w";
83 }
84 }
88 else
90 }
91
96}
EXTERN_VAR BOOLEAN FE_OPT_NO_SHELL_FLAG
FILE * myfopen(const char *path, const char *mode)
#define SI_LINK_SET_OPEN_P(l, flag)
◆ slReadAscii()
Definition at line 143 of file asciiLink.cc.
144{
148 tmp.data=(
void*)
"? ";
150}
static leftv slReadAscii2(si_link l, leftv pr)
Class used for (list of) interpreter objects.
◆ slReadAscii2()
Definition at line 108 of file asciiLink.cc.
109{
112 if (
fp!=
NULL &&
l->name[0] !=
'\0')
113 {
116 if (len<0) len=0;
120 Print(
"//Reading %ld chars\n",len);
123 }
124 else
125 {
127 {
130 }
131 else
132 {
133 WerrorS(
"read(<link>,<string>) expected");
135 }
136 }
141}
const Variable & v
< [in] a sqrfree bivariate poly
size_t myfread(void *ptr, size_t size, size_t nmemb, FILE *stream)
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
EXTERN_VAR omBin sleftv_bin
int status int void * buf
◆ slStandardInit()
Definition at line 633 of file asciiLink.cc.
634{
649}
static BOOLEAN slGetDumpAscii(si_link l)
static BOOLEAN slCloseAscii(si_link l)
EXTERN_VAR si_link_extension si_link_root
static BOOLEAN slDumpAscii(si_link l)
const char * slStatusAscii(si_link l, const char *request)
static BOOLEAN slWriteAscii(si_link l, leftv v)
static leftv slReadAscii(si_link l)
static BOOLEAN slOpenAscii(si_link l, short flag, leftv)
const CanonicalForm int s
VAR omBin s_si_link_extension_bin
◆ slStatusAscii()
Definition at line 211 of file asciiLink.cc.
212{
214 {
216 else return "not ready";
217 }
219 {
221 else return "not ready";
222 }
223 else return "unknown status request";
224}
#define SI_LINK_W_OPEN_P(l)
#define SI_LINK_R_OPEN_P(l)
◆ slWriteAscii()
Definition at line 152 of file asciiLink.cc.
153{
158 {
160 {
164 {
167 {
172 }
173 break;
174 }
175 #if 1
177 {
179 for(
int i=0;
i<
l->nr;
i++)
180 {
181 char *
s=
l->m[
i].String();
186 }
187 break;
188 }
189 #endif
190 default:
192
194 {
198 }
199 else
200 {
201 WerrorS(
"cannot convert to string");
203 }
204 }
206 }
208 return err;
209}
◆ FE_OPT_NO_SHELL_FLAG
◆ si_link_root