source: git/Singular/ipshell.h @ 416465

spielwiese
Last change on this file since 416465 was 416465, checked in by Olaf Bachmann <obachman@…>, 24 years ago
* bug-fixes from work with Thomas git-svn-id: file:///usr/local/Singular/svn/trunk@3826 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.8 KB
Line 
1#ifndef IPSHELL_H
2#define IPSHELL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: ipshell.h,v 1.23 1999-11-15 17:20:12 obachman 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 BOOLEAN yyInRingConstruction; /* 1: during ring construction */
34
35int     IsCmd(char *n, int & tok);
36BOOLEAN iiPStart(idhdl pn, sleftv * sl);
37BOOLEAN iiEStart(char* example, procinfo *pi);
38void    type_cmd(idhdl h);
39void    test_cmd(int i);
40void    list_cmd(int typ, const char* what, char * prefix, BOOLEAN iterate,
41                 BOOLEAN fullname=FALSE);
42void    iiWriteMatrix(matrix im, const char *n, int dim, int spaces=0);
43char *  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_NAMESPACES
53BOOLEAN iiExport(leftv v, int toLev, idhdl roothdl);
54BOOLEAN iiInternalExport (leftv v, int toLev, idhdl roothdl);
55#endif /* HAVE_NAMESPACES */
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);
60#ifdef HAVE_NAMESPACES
61BOOLEAN iiLibCmd( char *newlib, BOOLEAN autoexport=TRUE, BOOLEAN tellerror=TRUE );
62#else /* HAVE_NAMESPACES */
63BOOLEAN iiLibCmd( char *newlib, BOOLEAN tellerror=TRUE );
64#endif /* HAVE_NAMESPACES */
65/* sees wheter library lib has already been loaded
66   if yes, writes filename of lib into where and returns TRUE,
67   if  no, returns FALSE
68*/
69BOOLEAN iiLocateLib(const char* lib, char* where);
70leftv   iiMap(map theMap, char * what);
71void    iiMakeResolv(resolvente r, int length, int rlen, char * name, int typ0,
72           intvec ** weights=NULL);
73BOOLEAN jjMINRES(leftv res, leftv v);
74BOOLEAN jjBETTI(leftv res, leftv v);
75int     iiRegularity(lists L);
76leftv   singular_system(sleftv h);
77BOOLEAN jjSYSTEM(leftv res, leftv v);
78void    iiDebug();
79BOOLEAN iiCheckRing(int i);
80poly    iiHighCorner(ideal i, int ak);
81/* ================================================================== */
82/* Expressions : */
83BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
84BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
85                     BOOLEAN proccall=FALSE);
86BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
87BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
88
89typedef BOOLEAN (*proc1)(leftv,leftv);
90
91#ifdef INIT_BUG
92void    jjInitTab1();
93#endif
94#ifdef GENTABLE
95typedef char * (*Proc1)(char *);
96struct sValCmd1
97{
98  proc1 p;
99  short cmd;
100  short res;
101  short arg;
102};
103
104typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
105struct sValCmd2
106{
107  proc2 p;
108  short cmd;
109  short res;
110  short arg1;
111  short arg2;
112#ifdef PROFILING
113  short cnt;
114  int   t;
115#endif
116};
117
118typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
119struct sValCmd3
120{
121  proc3 p;
122  short cmd;
123  short res;
124  short arg1;
125  short arg2;
126  short arg3;
127};
128struct sValCmdM
129{
130  proc1 p;
131  short cmd;
132  short res;
133  short number_of_args; /* -1: any, -2: any >0, .. */
134};
135extern struct sValCmd2 dArith2[];
136extern struct sValCmd1 dArith1[];
137extern struct sValCmd3 dArith3[];
138extern struct sValCmdM dArithM[];
139#endif
140
141/* ================================================================== */
142/* Assigments : */
143BOOLEAN iiAssign(leftv left, leftv right);
144
145typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
146struct sValAssign_sys
147{
148  proc1 p;
149  short res;
150  short arg;
151};
152
153struct sValAssign
154{
155  proci p;
156  short res;
157  short arg;
158};
159
160BOOLEAN iiParameter(leftv p);
161/* ================================================================== */
162int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
163  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
164#ifdef HAVE_NAMESPACES
165sleftv * iiMake_proc(idhdl pn, sleftv* slpn, sleftv* sl);
166#else /* HAVE_NAMESPACES */
167sleftv * iiMake_proc(idhdl pn, sleftv* sl);
168#endif /* HAVE_NAMESPACES */
169// from misc.cc:
170char *  showOption();
171BOOLEAN setOption(leftv res, leftv v);
172/* ================================================================== */
173char * versionString();
174/* ================================================================== */
175void  singular_example(char *str);
176#endif
177
Note: See TracBrowser for help on using the repository browser.