source: git/Singular/ipshell.h @ 8cfee1c

spielwiese
Last change on this file since 8cfee1c was 923c27, checked in by Hans Schönemann <hannes@…>, 24 years ago
* hannes: fixed -v output (it's now the real date of linking) git-svn-id: file:///usr/local/Singular/svn/trunk@4262 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.24 2000-04-11 15:18:07 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_NAMESPACES
55BOOLEAN iiExport(leftv v, int toLev, idhdl roothdl);
56BOOLEAN iiInternalExport (leftv v, int toLev, idhdl roothdl);
57#endif /* HAVE_NAMESPACES */
58char *  iiGetLibName(procinfov v);
59char *  iiGetLibProcBuffer( procinfov pi, int part=1 );
60char *  iiProcName(char *buf, char & ct, char* &e);
61char *  iiProcArgs(char *e,BOOLEAN withParenth);
62#ifdef HAVE_NAMESPACES
63BOOLEAN iiLibCmd( char *newlib, BOOLEAN autoexport=TRUE, BOOLEAN tellerror=TRUE );
64#else /* HAVE_NAMESPACES */
65BOOLEAN iiLibCmd( char *newlib, BOOLEAN tellerror=TRUE );
66#endif /* HAVE_NAMESPACES */
67/* sees wheter library lib has already been loaded
68   if yes, writes filename of lib into where and returns TRUE,
69   if  no, returns FALSE
70*/
71BOOLEAN iiLocateLib(const char* lib, char* where);
72leftv   iiMap(map theMap, char * what);
73void    iiMakeResolv(resolvente r, int length, int rlen, char * name, int typ0,
74           intvec ** weights=NULL);
75BOOLEAN jjMINRES(leftv res, leftv v);
76BOOLEAN jjBETTI(leftv res, leftv v);
77int     iiRegularity(lists L);
78leftv   singular_system(sleftv h);
79BOOLEAN jjSYSTEM(leftv res, leftv v);
80void    iiDebug();
81BOOLEAN iiCheckRing(int i);
82poly    iiHighCorner(ideal i, int ak);
83/* ================================================================== */
84/* Expressions : */
85BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
86BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
87                     BOOLEAN proccall=FALSE);
88BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
89BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
90
91typedef BOOLEAN (*proc1)(leftv,leftv);
92
93#ifdef INIT_BUG
94void    jjInitTab1();
95#endif
96#ifdef GENTABLE
97typedef char * (*Proc1)(char *);
98struct sValCmd1
99{
100  proc1 p;
101  short cmd;
102  short res;
103  short arg;
104};
105
106typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
107struct sValCmd2
108{
109  proc2 p;
110  short cmd;
111  short res;
112  short arg1;
113  short arg2;
114#ifdef PROFILING
115  short cnt;
116  int   t;
117#endif
118};
119
120typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
121struct sValCmd3
122{
123  proc3 p;
124  short cmd;
125  short res;
126  short arg1;
127  short arg2;
128  short arg3;
129};
130struct sValCmdM
131{
132  proc1 p;
133  short cmd;
134  short res;
135  short number_of_args; /* -1: any, -2: any >0, .. */
136};
137extern struct sValCmd2 dArith2[];
138extern struct sValCmd1 dArith1[];
139extern struct sValCmd3 dArith3[];
140extern struct sValCmdM dArithM[];
141#endif
142
143/* ================================================================== */
144/* Assigments : */
145BOOLEAN iiAssign(leftv left, leftv right);
146
147typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
148struct sValAssign_sys
149{
150  proc1 p;
151  short res;
152  short arg;
153};
154
155struct sValAssign
156{
157  proci p;
158  short res;
159  short arg;
160};
161
162BOOLEAN iiParameter(leftv p);
163/* ================================================================== */
164int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
165  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
166#ifdef HAVE_NAMESPACES
167sleftv * iiMake_proc(idhdl pn, sleftv* slpn, sleftv* sl);
168#else /* HAVE_NAMESPACES */
169sleftv * iiMake_proc(idhdl pn, sleftv* sl);
170#endif /* HAVE_NAMESPACES */
171// from misc.cc:
172char *  showOption();
173BOOLEAN setOption(leftv res, leftv v);
174/* ================================================================== */
175char * versionString();
176/* ================================================================== */
177void  singular_example(char *str);
178#endif
179
Note: See TracBrowser for help on using the repository browser.