My Project
Loading...
Searching...
No Matches
asciiLink.cc
Go to the documentation of this file.
1/****************************************
2 * * Computer Algebra System SINGULAR *
3 * ****************************************/
4
5/*
6 * ABSTRACT: ascii links (standard)
7 */
8
9#include "kernel/mod2.h"
10#include "misc/options.h"
11
12#include "Singular/tok.h"
13#include "Singular/subexpr.h"
14#include "Singular/ipshell.h"
15#include "Singular/ipid.h"
16#include "Singular/fevoices.h"
18#include "Singular/ipshell.h"
20
21/* declarations */
22static BOOLEAN DumpAscii(FILE *fd, idhdl h,char ***list_of_libs);
23static BOOLEAN DumpAsciiIdhdl(FILE *fd, idhdl h,char ***list_of_libs);
24static const char* GetIdString(idhdl h);
25static int DumpRhs(FILE *fd, idhdl h);
26static BOOLEAN DumpQring(FILE *fd, idhdl h);
27static BOOLEAN DumpNCring(FILE *fd, idhdl h);
28static BOOLEAN DumpAsciiMaps(FILE *fd, idhdl h, idhdl rhdl);
29static BOOLEAN CollectLibs(char *name, char ***list_of_libs);
30//static BOOLEAN DumpLibs(FILE *fd, char ***list_of_libs);
31
32EXTERN_VAR si_link_extension si_link_root;
34
35/* =============== ASCII ============================================= */
36static BOOLEAN slOpenAscii(si_link l, short flag, leftv /*h*/)
37{
38 if (FE_OPT_NO_SHELL_FLAG) {WerrorS("no links allowed");return TRUE;}
39 const char *mode;
40 if (flag & SI_LINK_OPEN)
41 {
42 if (l->mode[0] != '\0' && (strcmp(l->mode, "r") == 0))
43 flag = SI_LINK_READ;
44 else flag = SI_LINK_WRITE;
45 }
46
47 if (flag == SI_LINK_READ) mode = "r";
48 else if (strcmp(l->mode, "w") == 0) mode = "w";
49 else mode = "a";
50
51
52 if (l->name[0] == '\0')
53 {
54 // stdin or stdout
55 if (flag == SI_LINK_READ)
56 {
57 l->data = (void *) stdin;
58 mode = "r";
59 }
60 else
61 {
62 l->data = (void *) stdout;
63 mode = "a";
64 }
65 }
66 else
67 {
68 // normal ascii link to a file
69 FILE *outfile;
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 }
85 outfile=myfopen(filename,mode);
86 if (outfile!=NULL)
87 l->data = (void *) outfile;
88 else
89 return TRUE;
90 }
91
92 omFree(l->mode);
93 l->mode = omStrDup(mode);
94 SI_LINK_SET_OPEN_P(l, flag);
95 return FALSE;
96}
97
99{
101 if (l->name[0] != '\0')
102 {
103 return (fclose((FILE *)l->data)!=0);
104 }
105 return FALSE;
106}
107
109{
110 FILE * fp=(FILE *)l->data;
111 char * buf=NULL;
112 if (fp!=NULL && l->name[0] != '\0')
113 {
114 fseek(fp,0L,SEEK_END);
115 long len=ftell(fp);
116 if (len<0) len=0;
117 fseek(fp,0L,SEEK_SET);
118 buf=(char *)omAlloc((int)len+1);
119 if (BVERBOSE(V_READING))
120 Print("//Reading %ld chars\n",len);
121 if (len>0) myfread( buf, len, 1, fp);
122 buf[len]='\0';
123 }
124 else
125 {
126 if (pr->Typ()==STRING_CMD)
127 {
128 buf=(char *)omAlloc(80);
129 fe_fgets_stdin((char *)pr->Data(),buf,80);
130 }
131 else
132 {
133 WerrorS("read(<link>,<string>) expected");
134 buf=omStrDup("");
135 }
136 }
138 v->rtyp=STRING_CMD;
139 v->data=buf;
140 return v;
141}
142
144{
145 sleftv tmp;
146 memset(&tmp,0,sizeof(sleftv));
147 tmp.rtyp=STRING_CMD;
148 tmp.data=(void*) "? ";
149 return slReadAscii2(l,&tmp);
150}
151
153{
154 FILE *outfile=(FILE *)l->data;
155 BOOLEAN err=FALSE;
156 char *s;
157 while (v!=NULL)
158 {
159 switch(v->Typ())
160 {
161 case IDEAL_CMD:
162 case MODUL_CMD:
163 case MATRIX_CMD:
164 {
165 ideal I=(ideal)v->Data();
166 for(int i=0;i<IDELEMS(I);i++)
167 {
168 char *s=pString(I->m[i]);
169 fwrite(s,strlen(s),1,outfile);
170 omFree(s);
171 if (i<IDELEMS(I)-1) fwrite(",",1,1,outfile);
172 }
173 break;
174 }
175 #if 1
176 case LIST_CMD:
177 {
178 lists l=(lists)v->Data();
179 for(int i=0;i<l->nr;i++)
180 {
181 char *s=l->m[i].String();
182 fwrite(s,strlen(s),1,outfile);
183 omFree(s);
184 if (i!=l->nr-1) fputc(',',outfile);
185 fputc('\n',outfile);
186 }
187 break;
188 }
189 #endif
190 default:
191 s = v->String();
192 // free v ??
193 if (s!=NULL)
194 {
195 fputs(s,outfile);
196 fputc('\n',outfile);
197 omFree((ADDRESS)s);
198 }
199 else
200 {
201 WerrorS("cannot convert to string");
202 err=TRUE;
203 }
204 }
205 v = v->next;
206 }
207 fflush(outfile);
208 return err;
209}
210
211const char* slStatusAscii(si_link l, const char* request)
212{
213 if (strcmp(request, "read") == 0)
214 {
215 if (SI_LINK_R_OPEN_P(l)) return "ready";
216 else return "not ready";
217 }
218 else if (strcmp(request, "write") == 0)
219 {
220 if (SI_LINK_W_OPEN_P(l)) return "ready";
221 else return "not ready";
222 }
223 else return "unknown status request";
224}
225
226/*------------------ Dumping in Ascii format -----------------------*/
227
229{
230 FILE *fd = (FILE *) l->data;
231 idhdl h = IDROOT, rh = currRingHdl;
232 char **list_of_libs=NULL;
233 BOOLEAN status = DumpAscii(fd, h, &list_of_libs);
234
235 if (! status ) status = DumpAsciiMaps(fd, h, NULL);
236
237 if (currRingHdl != rh) rSetHdl(rh);
238 fprintf(fd, "option(set, intvec(%d, %d));\n", si_opt_1, si_opt_2);
239 char **p=list_of_libs;
240 if (p!=NULL)
241 {
242 while((*p!=NULL) && (*p!=(char*)1))
243 {
244 fprintf(fd,"load(\"%s\",\"try\");\n",*p);
245 p++;
246 }
247 omFree(list_of_libs);
248 }
249 fputs("RETURN();\n",fd);
250 fflush(fd);
251
252 return status;
253}
254
255// we do that recursively, to dump ids in the the order in which they
256// were actually defined
257static BOOLEAN DumpAscii(FILE *fd, idhdl h, char ***list_of_libs)
258{
259 if (h == NULL) return FALSE;
260
261 if (DumpAscii(fd, IDNEXT(h),list_of_libs)) return TRUE;
262
263 // need to set the ring before writing it, otherwise we get in
264 // trouble with minpoly
265 if (IDTYP(h) == RING_CMD)
266 rSetHdl(h);
267
268 if (DumpAsciiIdhdl(fd, h,list_of_libs)) return TRUE;
269
270 if (IDTYP(h) == RING_CMD)
271 return DumpAscii(fd, IDRING(h)->idroot,list_of_libs);
272 else
273 return FALSE;
274}
275
276static BOOLEAN DumpAsciiMaps(FILE *fd, idhdl h, idhdl rhdl)
277{
278 if (h == NULL) return FALSE;
279 if (DumpAsciiMaps(fd, IDNEXT(h), rhdl)) return TRUE;
280
281 if (IDTYP(h) == RING_CMD)
282 return DumpAsciiMaps(fd, IDRING(h)->idroot, h);
283 else if (IDTYP(h) == MAP_CMD)
284 {
285 char *rhs;
286 rSetHdl(rhdl);
287 rhs = h->String();
288
289 if (fprintf(fd, "setring %s;\n", IDID(rhdl)) == EOF) return TRUE;
290 if (fprintf(fd, "%s %s = %s, %s;\n", Tok2Cmdname(MAP_CMD), IDID(h),
291 IDMAP(h)->preimage, rhs) == EOF)
292 {
293 omFree(rhs);
294 return TRUE;
295 }
296 else
297 {
298 omFree(rhs);
299 return FALSE;
300 }
301 }
302 else return FALSE;
303}
304
305static BOOLEAN DumpAsciiIdhdl(FILE *fd, idhdl h, char ***list_of_libs)
306{
307 const char *type_str = GetIdString(h);
308 int type_id = IDTYP(h);
309
310 if (type_id == PACKAGE_CMD)
311 {
312 if (strcmp(IDID(h),"Top")==0) return FALSE; // do not dump "Top"
313 if (IDPACKAGE(h)->language==LANG_SINGULAR) return FALSE;
314 if (IDPACKAGE(h)->language==LANG_MIX) return FALSE;
315 }
316 if (type_id == CRING_CMD)
317 {
318 // do not dump the default CRINGs:
319 if (strcmp(IDID(h),"QQ")==0) return FALSE;
320 if (strcmp(IDID(h),"ZZ")==0) return FALSE;
321 #ifdef SINGULAR_4_2
322 if (strcmp(IDID(h),"AE")==0) return FALSE;
323 if (strcmp(IDID(h),"QAE")==0) return FALSE;
324 #endif
325 }
326
327 // we do not throw an error if a wrong type was attempted to be dumped
328 if (type_str == NULL)
329 return FALSE;
330
331 // handle nc-rings separately
332 if ((type_id == RING_CMD)&&(rIsNCRing(IDRING(h))))
333 return DumpNCring(fd,h);
334
335 // handle qrings separately
336 if ((type_id == RING_CMD)&&(IDRING(h)->qideal!=NULL))
337 return DumpQring(fd, h);
338
339 // C-proc not to be dumped
340 if ((type_id == PROC_CMD) && (IDPROC(h)->language == LANG_C))
341 return FALSE;
342
343 // handle libraries
344 if ((type_id == PROC_CMD)
345 && (IDPROC(h)->language == LANG_SINGULAR)
346 && (IDPROC(h)->libname!=NULL))
347 return CollectLibs(IDPROC(h)->libname,list_of_libs);
348
349 // put type and name
350 if (fprintf(fd, "%s %s", type_str, IDID(h)) == EOF)
351 return TRUE;
352 // for matricies, append the dimension
353 if (type_id == MATRIX_CMD)
354 {
355 ideal id = IDIDEAL(h);
356 if (fprintf(fd, "[%d][%d]", id->nrows, id->ncols)== EOF) return TRUE;
357 }
358 else if (type_id == INTMAT_CMD)
359 {
360 if (fprintf(fd, "[%d][%d]", IDINTVEC(h)->rows(), IDINTVEC(h)->cols())
361 == EOF) return TRUE;
362 }
363 else if (type_id == SMATRIX_CMD)
364 {
365 ideal id = IDIDEAL(h);
366 if (fprintf(fd, "[%d][%d]", (int)id->rank, IDELEMS(id))== EOF) return TRUE;
367 }
368
369 if (type_id == PACKAGE_CMD)
370 {
371 return (fputs(";\n",fd) == EOF);
372 }
373
374 // write the equal sign
375 if (fputs(" = ",fd) == EOF) return TRUE;
376
377 // and the right hand side
378 if (DumpRhs(fd, h) == EOF) return TRUE;
379
380 // semicolon und tschuess
381 if (fputs(";\n",fd) == EOF) return TRUE;
382
383 return FALSE;
384}
385
386static const char* GetIdString(idhdl h)
387{
388 int type = IDTYP(h);
389
390 switch(type)
391 {
392 case LIST_CMD:
393 //{
394 //
395 //
396 // lists l = IDLIST(h);
397 // int i, nl = l->nr + 1;
398//
399 // for (i=0; i<nl; i++)
400 // if (GetIdString((idhdl) &(l->m[i])) == NULL) return NULL;
401 // break;
402 //}
403 case CRING_CMD:
404 #ifdef SINGULAR_4_2
405 case CNUMBER_CMD:
406 case CMATRIX_CMD:
407 #endif
408 case BIGINT_CMD:
409 case PACKAGE_CMD:
410 case INT_CMD:
411 case INTVEC_CMD:
412 case INTMAT_CMD:
413 case STRING_CMD:
414 case RING_CMD:
415 case QRING_CMD:
416 case PROC_CMD:
417 case NUMBER_CMD:
418 case POLY_CMD:
419 case IDEAL_CMD:
420 case VECTOR_CMD:
421 case MODUL_CMD:
422 case MATRIX_CMD:
423 case SMATRIX_CMD:
424 return Tok2Cmdname(type);
425
426 case MAP_CMD:
427 case LINK_CMD:
428 return NULL;
429
430 default:
431 Warn("Error dump data of type %s", Tok2Cmdname(IDTYP(h)));
432 return NULL;
433 }
434}
435
437{
438 char *ring_str = h->String();
439 ring r=IDRING(h);
440
441 if (rIsPluralRing(r))
442 {
443 if (fprintf(fd, "ring temp_ring = %s;\n", ring_str)
444 == EOF) return TRUE;
445 if (fprintf(fd, "ideal temp_C = %s;\n",
446 iiStringMatrix((matrix) r->GetNC()->C, 2, r, n_GetChar(r->cf)))
447 == EOF) return TRUE;
448 if (fprintf(fd, "ideal temp_D = %s;\n",
449 iiStringMatrix((matrix) r->GetNC()->D, 2, r, n_GetChar(r->cf)))
450 == EOF) return TRUE;
451 if (fprintf(fd, "def %s = nc_algebra(temp_C,temp_D);\n",IDID(h)) == EOF)
452 return TRUE;
453 if (fputs("kill temp_ring;\n",fd) == EOF) return TRUE;
454 }
455 if (rIsLPRing(r))
456 {
457 //if (fprintf(fd, "ring %s = %s;\n", IDID(h), ring_str) == EOF) return TRUE;
458 //if (fprintf(fd, "attrib(%s,\"isLetterplaceRing\",%d);\n",IDID(h),r->isLPring) ==EOF) return TRUE;
459 Warn("cannot write LP ring %s",IDID(h));
460 return TRUE;
461 }
462 omFree(ring_str);
463 return FALSE;
464}
465
466static BOOLEAN DumpQring(FILE *fd, idhdl h)
467{
468 char *ring_str = h->String();
469 ring r=IDRING(h);
470 if (fprintf(fd, "ring temp_ring = %s;\n", ring_str) == EOF) return TRUE;
471 if (fprintf(fd, "ideal temp_ideal = %s;\n",
472 iiStringMatrix((matrix) r->qideal, 1, currRing, n_GetChar(r->cf)))
473 == EOF) return TRUE;
474 if (fputs("attrib(temp_ideal, \"isSB\", 1);\n",fd) == EOF) return TRUE;
475 if (fprintf(fd, "qring %s = temp_ideal;\n",IDID(h)) == EOF)
476 return TRUE;
477 if (fputs("kill temp_ring;\n",fd) == EOF) return TRUE;
478 else
479 {
480 omFree(ring_str);
481 return FALSE;
482 }
483}
484
485static BOOLEAN CollectLibs(char *name, char *** list_of_libs)
486{
487 if (*list_of_libs==NULL)
488 {
489 #define MAX_LIBS 256
490 (*list_of_libs)=(char**)omAlloc0(MAX_LIBS*sizeof(char**));
491 (*list_of_libs)[0]=name;
492 (*list_of_libs)[MAX_LIBS-1]=(char*)1;
493 return FALSE;
494 }
495 else
496 {
497 char **p=*list_of_libs;
498 while (((*p)!=NULL)&&((*p!=(char*)1)))
499 {
500 if (strcmp((*p),name)==0) return FALSE;
501 p++;
502 }
503 if (*p==(char*)1)
504 {
505 WerrorS("too many libs");
506 return TRUE;
507 }
508 else
509 {
510 *p=name;
511 }
512 }
513 return FALSE;
514}
515
516
517static int DumpRhs(FILE *fd, idhdl h)
518{
519 int type_id = IDTYP(h);
520
521 if (type_id == LIST_CMD)
522 {
523 lists l = IDLIST(h);
524 int i, nl = l->nr;
525
526 fputs("list(",fd);
527
528 for (i=0; i<nl; i++)
529 {
530 if (DumpRhs(fd, (idhdl) &(l->m[i])) == EOF) return EOF;
531 fputs(",",fd);
532 }
533 if (nl > 0)
534 {
535 if (DumpRhs(fd, (idhdl) &(l->m[nl])) == EOF) return EOF;
536 }
537 fputs(")",fd);
538 }
539 else if (type_id == STRING_CMD)
540 {
541 char *pstr = IDSTRING(h);
542 fputc('"', fd);
543 while (*pstr != '\0')
544 {
545 if (*pstr == '"' || *pstr == '\\') fputc('\\', fd);
546 fputc(*pstr, fd);
547 pstr++;
548 }
549 fputc('"', fd);
550 }
551 else if (type_id == PROC_CMD)
552 {
553 procinfov pi = IDPROC(h);
554 if (pi->language == LANG_SINGULAR)
555 {
556 /* pi-Libname==NULL */
557 char *pstr = pi->data.s.body;
558 fputc('"', fd);
559 while (*pstr != '\0')
560 {
561 if (*pstr == '"' || *pstr == '\\') fputc('\\', fd);
562 fputc(*pstr, fd);
563 pstr++;
564 }
565 fputc('"', fd);
566 }
567 else fputs("(null)", fd);
568 }
569 else
570 {
571 char *rhs = h->String();
572
573 if (rhs == NULL) return EOF;
574
575 BOOLEAN need_klammer=FALSE;
576 if (type_id == INTVEC_CMD) { fputs("intvec(",fd);need_klammer=TRUE; }
577 else if (type_id == IDEAL_CMD) { fputs("ideal(",fd);need_klammer=TRUE; }
578 else if ((type_id == MODUL_CMD)||(type_id == SMATRIX_CMD))
579 { fputs("module(",fd);need_klammer=TRUE; }
580 else if (type_id == BIGINT_CMD) { fputs("bigint(",fd);need_klammer=TRUE; }
581
582 if (fputs(rhs,fd) == EOF) return EOF;
583 omFree(rhs);
584
585 if ((type_id == RING_CMD) &&
586 IDRING(h)->cf->type==n_algExt)
587 {
588 StringSetS("");
589 p_Write(IDRING(h)->cf->extRing->qideal->m[0],IDRING(h)->cf->extRing);
590 rhs = StringEndS();
591 if (fprintf(fd, "; minpoly = %s", rhs) == EOF) { omFree(rhs); return EOF;}
592 omFree(rhs);
593 }
594 else if (need_klammer) fputc(')',fd);
595 }
596 return 1;
597}
598
600{
601 if (l->name[0] == '\0')
602 {
603 WerrorS("getdump: Can not get dump from stdin");
604 return TRUE;
605 }
606 else
607 {
608 BOOLEAN status = newFile(l->name);
609 if (status)
610 return TRUE;
611
612 int old_echo=si_echo;
613 si_echo=0;
614
615 status=yyparse();
616
617 si_echo=old_echo;
618
619 if (status)
620 return TRUE;
621 else
622 {
623 // lets reset the file pointer to the end to reflect that
624 // we are finished with reading
625 FILE *f = (FILE *) l->data;
626 fseek(f, 0L, SEEK_END);
627 return FALSE;
628 }
629 }
630}
631
632
634{
635 si_link_extension s;
639 si_link_root->Kill=NULL;
646 si_link_root->type="ASCII";
647 s = si_link_root;
648 s->next = NULL;
649}
int BOOLEAN
Definition auxiliary.h:88
#define TRUE
Definition auxiliary.h:101
#define FALSE
Definition auxiliary.h:97
void * ADDRESS
Definition auxiliary.h:120
int l
Definition cfEzgcd.cc:100
int i
Definition cfEzgcd.cc:132
int p
Definition cfModGcd.cc:4086
CanonicalForm fp
Definition cfModGcd.cc:4110
CanonicalForm cf
Definition cfModGcd.cc:4091
FILE * f
Definition checklibs.c:9
Class used for (list of) interpreter objects.
Definition subexpr.h:83
int Typ()
Definition subexpr.cc:1048
int rtyp
Definition subexpr.h:91
void * Data()
Definition subexpr.cc:1192
void * data
Definition subexpr.h:88
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
Definition coeffs.h:35
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Definition coeffs.h:448
#define Print
Definition emacs.cc:80
#define Warn
Definition emacs.cc:77
EXTERN_VAR BOOLEAN FE_OPT_NO_SHELL_FLAG
Definition extra.cc:170
const CanonicalForm int s
Definition facAbsFact.cc:51
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
void WerrorS(const char *s)
Definition feFopen.cc:24
FILE * myfopen(const char *path, const char *mode)
Definition feFopen.cc:167
size_t myfread(void *ptr, size_t size, size_t nmemb, FILE *stream)
Definition feFopen.cc:195
VAR int si_echo
Definition febase.cc:35
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
Definition feread.cc:32
BOOLEAN newFile(char *fname)
Definition fevoices.cc:129
const char * Tok2Cmdname(int tok)
Definition gentable.cc:137
#define EXTERN_VAR
Definition globaldefs.h:6
@ IDEAL_CMD
Definition grammar.cc:285
@ MATRIX_CMD
Definition grammar.cc:287
@ MAP_CMD
Definition grammar.cc:286
@ PROC_CMD
Definition grammar.cc:281
@ INTMAT_CMD
Definition grammar.cc:280
@ MODUL_CMD
Definition grammar.cc:288
@ SMATRIX_CMD
Definition grammar.cc:292
@ VECTOR_CMD
Definition grammar.cc:293
@ NUMBER_CMD
Definition grammar.cc:289
@ POLY_CMD
Definition grammar.cc:290
@ RING_CMD
Definition grammar.cc:282
int yyparse(void)
Definition grammar.cc:2149
VAR idhdl currRingHdl
Definition ipid.cc:57
#define IDMAP(a)
Definition ipid.h:135
#define IDSTRING(a)
Definition ipid.h:136
#define IDNEXT(a)
Definition ipid.h:118
EXTERN_VAR omBin sleftv_bin
Definition ipid.h:145
#define IDPROC(a)
Definition ipid.h:140
#define IDINTVEC(a)
Definition ipid.h:128
#define IDIDEAL(a)
Definition ipid.h:133
#define IDID(a)
Definition ipid.h:122
#define IDROOT
Definition ipid.h:19
#define IDPACKAGE(a)
Definition ipid.h:139
#define IDRING(a)
Definition ipid.h:127
#define IDTYP(a)
Definition ipid.h:119
#define IDLIST(a)
Definition ipid.h:137
void rSetHdl(idhdl h)
Definition ipshell.cc:5122
STATIC_VAR Poly * h
Definition janet.cc:971
#define pstr
Definition libparse.cc:1246
#define pi
Definition libparse.cc:1145
char * iiStringMatrix(matrix im, int dim, const ring r, char ch)
Definition matpol.cc:849
ip_smatrix * matrix
Definition matpol.h:43
#define SEEK_SET
Definition mod2.h:115
#define SEEK_END
Definition mod2.h:111
slists * lists
#define omStrDup(s)
#define omAlloc(size)
#define omAlloc0Bin(bin)
#define omFree(addr)
#define omAlloc0(size)
#define NULL
Definition omList.c:12
VAR unsigned si_opt_2
Definition options.c:6
VAR unsigned si_opt_1
Definition options.c:5
#define BVERBOSE(a)
Definition options.h:35
#define V_READING
Definition options.h:46
void p_Write(poly p, ring lmRing, ring tailRing)
Definition polys0.cc:342
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
char * pString(poly p)
Definition polys.h:307
void StringSetS(const char *st)
Definition reporter.cc:128
char * StringEndS()
Definition reporter.cc:151
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition ring.h:406
static BOOLEAN rIsLPRing(const ring r)
Definition ring.h:417
static BOOLEAN rIsNCRing(const ring r)
Definition ring.h:427
idrec * idhdl
Definition ring.h:22
int * status
Definition si_signals.h:61
int status int fd
Definition si_signals.h:69
int status int void * buf
Definition si_signals.h:69
#define IDELEMS(i)
sleftv * leftv
Definition structs.h:53
procinfo * procinfov
Definition structs.h:56
@ LANG_SINGULAR
Definition subexpr.h:22
@ LANG_MIX
Definition subexpr.h:22
@ LANG_C
Definition subexpr.h:22
int name
New type name for int.
@ BIGINT_CMD
Definition tok.h:38
@ CRING_CMD
Definition tok.h:56
@ LIST_CMD
Definition tok.h:118
@ INTVEC_CMD
Definition tok.h:101
@ PACKAGE_CMD
Definition tok.h:150
@ CMATRIX_CMD
Definition tok.h:46
@ CNUMBER_CMD
Definition tok.h:47
@ LINK_CMD
Definition tok.h:117
@ QRING_CMD
Definition tok.h:160
@ STRING_CMD
Definition tok.h:187
@ INT_CMD
Definition tok.h:96