 |
My Project
UNKNOWN_GIT_VERSION
|
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, const char *type_str) |
|
static BOOLEAN | DumpAsciiMaps (FILE *fd, idhdl h, idhdl rhdl) |
|
static BOOLEAN | CollectLibs (char *name, char ***list_of_libs) |
|
BOOLEAN | slOpenAscii (si_link l, short flag, leftv) |
|
BOOLEAN | slCloseAscii (si_link l) |
|
leftv | slReadAscii2 (si_link l, leftv pr) |
|
leftv | slReadAscii (si_link l) |
|
BOOLEAN | slWriteAscii (si_link l, leftv v) |
|
const char * | slStatusAscii (si_link l, const char *request) |
|
BOOLEAN | slDumpAscii (si_link l) |
|
BOOLEAN | slGetDumpAscii (si_link l) |
|
void | slStandardInit () |
|
◆ MAX_LIBS
◆ CollectLibs()
static BOOLEAN CollectLibs |
( |
char * |
name, |
|
|
char *** |
list_of_libs |
|
) |
| |
|
static |
Definition at line 430 of file asciiLink.cc.
432 if (*list_of_libs==
NULL)
436 (*list_of_libs)[0]=
name;
437 (*list_of_libs)[
MAX_LIBS-1]=(
char*)1;
442 char **
p=*list_of_libs;
443 while (((*
p)!=
NULL)&&((*
p!=(
char*)1)))
◆ DumpAscii()
static BOOLEAN DumpAscii |
( |
FILE * |
fd, |
|
|
idhdl |
h, |
|
|
char *** |
list_of_libs |
|
) |
| |
|
static |
◆ DumpAsciiIdhdl()
static BOOLEAN DumpAsciiIdhdl |
( |
FILE * |
fd, |
|
|
idhdl |
h, |
|
|
char *** |
list_of_libs |
|
) |
| |
|
static |
Definition at line 288 of file asciiLink.cc.
310 if (type_str ==
NULL)
328 if (fprintf(
fd,
"%s %s", type_str,
IDID(
h)) == EOF)
334 if (fprintf(
fd,
"[%d][%d]", id->nrows, id->ncols)== EOF)
return TRUE;
344 if (fprintf(
fd,
"[%d][%d]", (
int)id->rank,
IDELEMS(
id))== EOF)
return TRUE;
349 return (fputs(
";\n",
fd) == EOF);
353 if (fputs(
" = ",
fd) == EOF)
return TRUE;
359 if (fputs(
";\n",
fd) == EOF)
return TRUE;
◆ DumpAsciiMaps()
◆ DumpQring()
Definition at line 411 of file asciiLink.cc.
413 char *ring_str =
h->String();
419 if (fputs(
"attrib(temp_ideal, \"isSB\", 1);\n",
fd) == EOF)
return TRUE;
420 if (fprintf(
fd,
"%s %s = temp_ideal;\n", type_str,
IDID(
h)) == EOF)
422 if (fputs(
"kill temp_ring;\n",
fd) == EOF)
return TRUE;
◆ DumpRhs()
static int DumpRhs |
( |
FILE * |
fd, |
|
|
idhdl |
h |
|
) |
| |
|
static |
Definition at line 462 of file asciiLink.cc.
488 while (*
pstr !=
'\0')
490 if (*
pstr ==
'"' || *
pstr ==
'\\') fputc(
'\\',
fd);
502 char *
pstr =
pi->data.s.body;
504 while (*
pstr !=
'\0')
506 if (*
pstr ==
'"' || *
pstr ==
'\\') fputc(
'\\',
fd);
512 else fputs(
"(null)",
fd);
516 char *rhs =
h->String();
518 if (rhs ==
NULL)
return EOF;
522 else if (type_id ==
IDEAL_CMD) { fputs(
"ideal(",
fd);need_klammer=
TRUE; }
524 { fputs(
"module(",
fd);need_klammer=
TRUE; }
527 if (fputs(rhs,
fd) == EOF)
return EOF;
536 if (fprintf(
fd,
"; minpoly = %s", rhs) == EOF) {
omFree(rhs);
return EOF;}
539 else if (need_klammer) fputc(
')',
fd);
◆ GetIdString()
◆ slCloseAscii()
Definition at line 96 of file asciiLink.cc.
99 if (
l->name[0] !=
'\0')
101 return (fclose((FILE *)
l->data)!=0);
◆ slDumpAscii()
Definition at line 211 of file asciiLink.cc.
213 FILE *
fd = (FILE *)
l->data;
215 char **list_of_libs=
NULL;
222 char **
p=list_of_libs;
225 while((*
p!=
NULL) && (*
p!=(
char*)1))
227 fprintf(
fd,
"load(\"%s\",\"try\");\n",*
p);
232 fputs(
"RETURN();\n",
fd);
◆ slGetDumpAscii()
Definition at line 544 of file asciiLink.cc.
546 if (
l->name[0] ==
'\0')
548 WerrorS(
"getdump: Can not get dump from stdin");
570 FILE *
f = (FILE *)
l->data;
◆ slOpenAscii()
Definition at line 35 of file asciiLink.cc.
40 if (
l->mode[0] !=
'\0' && (strcmp(
l->mode,
"r") == 0))
46 else if (strcmp(
l->mode,
"w") == 0) mode =
"w";
50 if (
l->name[0] ==
'\0')
55 l->data = (
void *) stdin;
60 l->data = (
void *) stdout;
68 char *filename=
l->name;
85 l->data = (
void *) outfile;
◆ slReadAscii()
◆ slReadAscii2()
Definition at line 106 of file asciiLink.cc.
108 FILE *
fp=(FILE *)
l->data;
118 Print(
"//Reading %ld chars\n",len);
131 WerrorS(
"read(<link>,<string>) expected");
◆ slStandardInit()
◆ slStatusAscii()
Definition at line 194 of file asciiLink.cc.
196 if (strcmp(request,
"read") == 0)
199 else return "not ready";
201 else if (strcmp(request,
"write") == 0)
204 else return "not ready";
206 else return "unknown status request";
◆ slWriteAscii()
Definition at line 150 of file asciiLink.cc.
152 FILE *outfile=(FILE *)
l->data;
163 ideal I=(ideal)
v->Data();
167 fwrite(
s,strlen(
s),1,outfile);
169 if (
i<
IDELEMS(I)-1) fwrite(
",",1,1,outfile);
184 WerrorS(
"cannot convert to string");
◆ si_link_root
si_link_extension si_link_root |
static BOOLEAN DumpAsciiIdhdl(FILE *fd, idhdl h, char ***list_of_libs)
static BOOLEAN DumpAsciiMaps(FILE *fd, idhdl h, idhdl rhdl)
si_link_extension si_link_root
static const char * GetIdString(idhdl h)
#define SI_LINK_SET_CLOSE_P(l)
BOOLEAN slGetDumpAscii(si_link l)
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
Class used for (list of) interpreter objects.
const char * slStatusAscii(si_link l, const char *request)
static int DumpRhs(FILE *fd, idhdl h)
#define SI_LINK_W_OPEN_P(l)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
int status int void * buf
#define SI_LINK_R_OPEN_P(l)
leftv slReadAscii2(si_link l, leftv pr)
void p_Write(poly p, ring lmRing, ring tailRing)
BOOLEAN newFile(char *fname)
omBin s_si_link_extension_bin
static BOOLEAN DumpAscii(FILE *fd, idhdl h, char ***list_of_libs)
static BOOLEAN CollectLibs(char *name, char ***list_of_libs)
void StringSetS(const char *st)
FILE * myfopen(const char *path, const char *mode)
char name(const Variable &v)
void WerrorS(const char *s)
BOOLEAN slCloseAscii(si_link l)
const Variable & v
< [in] a sqrfree bivariate poly
const CanonicalForm int s
BOOLEAN slDumpAscii(si_link l)
const char * Tok2Cmdname(int tok)
leftv slReadAscii(si_link l)
BOOLEAN slWriteAscii(si_link l, leftv v)
static BOOLEAN DumpQring(FILE *fd, idhdl h, const char *type_str)
size_t myfread(void *ptr, size_t size, size_t nmemb, FILE *stream)
#define SI_LINK_SET_OPEN_P(l, flag)
BOOLEAN slOpenAscii(si_link l, short flag, leftv)
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
char * iiStringMatrix(matrix im, int dim, const ring r, char ch)