source: git/Singular/ipshell.h @ 666c90

spielwiese
Last change on this file since 666c90 was 637428, checked in by Hans Schönemann <hannes@…>, 19 years ago
*hannes: INIT_BUG and gcc 3.4 git-svn-id: file:///usr/local/Singular/svn/trunk@7683 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.9 KB
Line 
1#ifndef IPSHELL_H
2#define IPSHELL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: ipshell.h,v 1.36 2005-01-24 14:59:13 Singular Exp $ */
7/*
8* ABSTRACT
9*/
10#include <stdio.h>
11#include "structs.h"
12
13extern int  traceit ;
14#define TRACE_SHOW_PROC   1
15#define TRACE_SHOW_LINENO 2
16#define TRACE_SHOW_LINE   4
17#define TRACE_SHOW_RINGS  8
18#define TRACE_SHOW_LINE1  16
19#define TRACE_BREAKPOINT  32
20#define TRACE_TMP_BREAKPOINT  64
21extern leftv iiCurrArgs;
22extern int iiOp; /* the current operation*/
23extern int  myynest;
24extern char *  currid;
25extern int     iiRETURNEXPR_len;
26extern sleftv *iiRETURNEXPR;
27#ifdef USE_IILOCALRING
28extern ring   *iiLocalRing;
29#endif
30extern cmdnames cmds[];
31extern char *lastreserved;
32extern char *singular_date;
33
34extern BOOLEAN yyInRingConstruction; /* 1: during ring construction */
35
36int     IsCmd(char *n, int & tok);
37BOOLEAN iiPStart(idhdl pn, sleftv * sl);
38BOOLEAN iiEStart(char* example, procinfo *pi);
39void    type_cmd(idhdl h);
40void    test_cmd(int i);
41void    list_cmd(int typ, const char* what, char * prefix, BOOLEAN iterate,
42                 BOOLEAN fullname=FALSE);
43//char *  iiStringMatrix(matrix im, int dim, char ch=',');
44void    killlocals(int v);
45int     exprlist_length(leftv v);
46char *  Tok2Cmdname(int i);
47char *  iiTwoOps(int t);
48int     IsPrime(int i);
49
50BOOLEAN iiWRITE(leftv res,leftv exprlist);
51BOOLEAN iiExport(leftv v, int toLev);
52#ifdef HAVE_NS
53BOOLEAN iiExport(leftv v, int toLev, idhdl roothdl);
54BOOLEAN iiInternalExport (leftv v, int toLev, idhdl roothdl);
55#endif /* HAVE_NS */
56char *  iiGetLibName(procinfov v);
57char *  iiGetLibProcBuffer( procinfov pi, int part=1 );
58char *  iiProcName(char *buf, char & ct, char* &e);
59char *  iiProcArgs(char *e,BOOLEAN withParenth);
60BOOLEAN iiLibCmd( char *newlib, BOOLEAN tellerror=TRUE );
61/* sees wheter library lib has already been loaded
62   if yes, writes filename of lib into where and returns TRUE,
63   if  no, returns FALSE
64*/
65BOOLEAN iiLocateLib(const char* lib, char* where);
66leftv   iiMap(map theMap, char * what);
67void    iiMakeResolv(resolvente r, int length, int rlen, char * name, int typ0,
68           intvec ** weights=NULL);
69BOOLEAN jjMINRES(leftv res, leftv v);
70BOOLEAN jjBETTI(leftv res, leftv v);
71BOOLEAN jjBETTI2(leftv res, leftv u, leftv v);
72BOOLEAN jjBETTI2_ID(leftv res, leftv u, leftv v);
73
74int     iiRegularity(lists L);
75leftv   singular_system(sleftv h);
76BOOLEAN jjSYSTEM(leftv res, leftv v);
77void    iiDebug();
78BOOLEAN iiCheckRing(int i);
79poly    iiHighCorner(ideal i, int ak);
80/* ================================================================== */
81/* Expressions : */
82BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
83BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
84                     BOOLEAN proccall=FALSE);
85BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
86BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
87
88typedef BOOLEAN (*proc1)(leftv,leftv);
89
90#ifdef __GNUC__
91#if (__GNUC__ < 3)
92#define INIT_BUG 1
93void    jjInitTab1();
94#endif
95#endif
96
97#ifdef GENTABLE
98typedef char * (*Proc1)(char *);
99struct sValCmd1
100{
101  proc1 p;
102  short cmd;
103  short res;
104  short arg;
105#ifdef HAVE_PLURAL 
106  short valid_for_plural;
107#endif 
108};
109
110typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
111struct sValCmd2
112{
113  proc2 p;
114  short cmd;
115  short res;
116  short arg1;
117  short arg2;
118#ifdef HAVE_PLURAL 
119  short valid_for_plural;
120#endif 
121};
122
123typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
124struct sValCmd3
125{
126  proc3 p;
127  short cmd;
128  short res;
129  short arg1;
130  short arg2;
131  short arg3;
132#ifdef HAVE_PLURAL 
133  short valid_for_plural;
134#endif 
135};
136struct sValCmdM
137{
138  proc1 p;
139  short cmd;
140  short res;
141  short number_of_args; /* -1: any, -2: any >0, .. */
142#ifdef HAVE_PLURAL 
143  short valid_for_plural;
144#endif 
145};
146extern struct sValCmd2 dArith2[];
147extern struct sValCmd1 dArith1[];
148extern struct sValCmd3 dArith3[];
149extern struct sValCmdM dArithM[];
150#endif
151
152/* ================================================================== */
153/* Assigments : */
154BOOLEAN iiAssign(leftv left, leftv right);
155
156typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
157struct sValAssign_sys
158{
159  proc1 p;
160  short res;
161  short arg;
162};
163
164struct sValAssign
165{
166  proci p;
167  short res;
168  short arg;
169};
170
171BOOLEAN iiParameter(leftv p);
172/* ================================================================== */
173int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
174  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
175#ifdef HAVE_NS
176sleftv * iiMake_proc(idhdl pn, package pack, sleftv* sl);
177#else /* HAVE_NS */
178sleftv * iiMake_proc(idhdl pn, sleftv* sl);
179#endif /* HAVE_NS */
180// from misc.cc:
181char *  showOption();
182BOOLEAN setOption(leftv res, leftv v);
183/* ================================================================== */
184char * versionString();
185/* ================================================================== */
186void  singular_example(char *str);
187
188#ifdef HAVE_NS
189void listall(int showproc=1);
190void checkall();
191void iiCheckPack(package &p);
192#endif
193#endif
194
Note: See TracBrowser for help on using the repository browser.