source: git/Singular/ipshell.h @ c06a32

fieker-DuValspielwiese
Last change on this file since c06a32 was c06a32, checked in by Olaf Bachmann <obachman@…>, 25 years ago
* New Handling of Command-line options git-svn-id: file:///usr/local/Singular/svn/trunk@3623 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.6 KB
Line 
1#ifndef IPSHELL_H
2#define IPSHELL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: ipshell.h,v 1.20 1999-09-20 18:03:49 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 char * feArgv0;
27extern int     iiRETURNEXPR_len;
28extern sleftv *iiRETURNEXPR;
29#ifdef USE_IILOCALRING
30extern ring   *iiLocalRing;
31#endif
32extern cmdnames cmds[];
33extern char *lastreserved;
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);
43void    iiWriteMatrix(matrix im, const char *n, int dim, int spaces=0);
44char *  iiStringMatrix(matrix im, int dim, char ch=',');
45void    killlocals(int v);
46int     exprlist_length(leftv v);
47char *  Tok2Cmdname(int i);
48char *  iiTwoOps(int t);
49int     IsPrime(int i);
50
51BOOLEAN iiWRITE(leftv res,leftv exprlist);
52BOOLEAN iiExport(leftv v, int toLev);
53#ifdef HAVE_NAMESPACES
54BOOLEAN iiExport(leftv v, int toLev, idhdl roothdl);
55BOOLEAN iiInternalExport (leftv v, int toLev, idhdl roothdl);
56#endif /* HAVE_NAMESPACES */
57char *  iiGetLibName(procinfov v);
58char *  iiGetLibProcBuffer( procinfov pi, int part=1 );
59char *  iiProcName(char *buf, char & ct, char* &e);
60char *  iiProcArgs(char *e,BOOLEAN withParenth);
61#ifdef HAVE_NAMESPACES
62BOOLEAN iiLibCmd( char *newlib, BOOLEAN autoexport=TRUE, BOOLEAN tellerror=TRUE );
63#else /* HAVE_NAMESPACES */
64BOOLEAN iiLibCmd( char *newlib, BOOLEAN tellerror=TRUE );
65#endif /* HAVE_NAMESPACES */
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);
71int     iiRegularity(lists L);
72leftv   singular_system(sleftv h);
73BOOLEAN jjSYSTEM(leftv res, leftv v);
74void    iiDebug();
75BOOLEAN iiCheckRing(int i);
76poly    iiHighCorner(ideal i, int ak);
77/* ================================================================== */
78/* Expressions : */
79BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
80BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
81                     BOOLEAN proccall=FALSE);
82BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
83BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
84
85typedef BOOLEAN (*proc1)(leftv,leftv);
86
87#ifdef INIT_BUG
88void    jjInitTab1();
89#endif
90#ifdef GENTABLE
91typedef char * (*Proc1)(char *);
92struct sValCmd1
93{
94  proc1 p;
95  short cmd;
96  short res;
97  short arg;
98};
99
100typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
101struct sValCmd2
102{
103  proc2 p;
104  short cmd;
105  short res;
106  short arg1;
107  short arg2;
108#ifdef PROFILING
109  short cnt;
110  int   t;
111#endif
112};
113
114typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
115struct sValCmd3
116{
117  proc3 p;
118  short cmd;
119  short res;
120  short arg1;
121  short arg2;
122  short arg3;
123};
124struct sValCmdM
125{
126  proc1 p;
127  short cmd;
128  short res;
129  short number_of_args; /* -1: any, -2: any >0, .. */
130};
131extern struct sValCmd2 dArith2[];
132extern struct sValCmd1 dArith1[];
133extern struct sValCmd3 dArith3[];
134extern struct sValCmdM dArithM[];
135#endif
136
137/* ================================================================== */
138/* Assigments : */
139BOOLEAN iiAssign(leftv left, leftv right);
140
141typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
142struct sValAssign_sys
143{
144  proc1 p;
145  short res;
146  short arg;
147};
148
149struct sValAssign
150{
151  proci p;
152  short res;
153  short arg;
154};
155
156BOOLEAN iiParameter(leftv p);
157/* ================================================================== */
158int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
159  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
160#ifdef HAVE_NAMESPACES
161sleftv * iiMake_proc(idhdl pn, sleftv* slpn, sleftv* sl);
162#else /* HAVE_NAMESPACES */
163sleftv * iiMake_proc(idhdl pn, sleftv* sl);
164#endif /* HAVE_NAMESPACES */
165// from misc.cc:
166char *  showOption();
167BOOLEAN setOption(leftv res, leftv v);
168/* ================================================================== */
169char * versionString();
170/* ================================================================== */
171void  singular_example(char *str);
172#endif
173
Note: See TracBrowser for help on using the repository browser.