source: git/Singular/ipshell.h @ a3bc95e

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