source: git/Singular/ipshell.h @ f99917f

spielwiese
Last change on this file since f99917f was f99917f, checked in by Hans Schönemann <hannes@…>, 25 years ago
* hannes: added "highcorner" for modules (iparith, ipshell) fixed rWrite (ring.cc) fixed mpCoef (matpol.cc) git-svn-id: file:///usr/local/Singular/svn/trunk@2904 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.4 KB
Line 
1#ifndef IPSHELL_H
2#define IPSHELL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: ipshell.h,v 1.16 1999-03-11 15:58: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
20extern leftv iiCurrArgs;
21extern int iiOp; /* the current operation*/
22extern int  myynest;
23extern char *  currid;
24extern char * thisfile;
25extern int     iiRETURNEXPR_len;
26extern sleftv *iiRETURNEXPR;
27#ifdef USE_IILOCALRING
28extern ring   *iiLocalRing;
29#endif
30extern cmdnames cmds[];
31extern char *lastreserved;
32
33int     IsCmd(char *n, int & tok);
34BOOLEAN iiPStart(idhdl pn, sleftv * sl);
35BOOLEAN iiEStart(char* example, procinfo *pi);
36void    type_cmd(idhdl h);
37void    test_cmd(int i);
38void    list_cmd(int typ, const char* what, char * prefix, BOOLEAN iterate,
39                 BOOLEAN fullname=FALSE);
40void    iiWriteMatrix(matrix im, const char *n, int dim, int spaces=0);
41char *  iiStringMatrix(matrix im, int dim, char ch=',');
42void    killlocals(int v);
43int     exprlist_length(leftv v);
44char *  Tok2Cmdname(int i);
45char *  iiTwoOps(int t);
46int     IsPrime(int i);
47
48BOOLEAN iiWRITE(leftv res,leftv exprlist);
49BOOLEAN iiExport(leftv v, int toLev);
50#ifdef HAVE_NAMESPACES
51BOOLEAN iiExport(leftv v, int toLev, idhdl roothdl);
52BOOLEAN iiInternalExport (leftv v, int toLev, idhdl roothdl);
53#endif /* HAVE_NAMESPACES */
54char *  iiGetLibName(procinfov v);
55char *  iiGetLibProcBuffer( procinfov pi, int part=1 );
56char *  iiProcName(char *buf, char & ct, char* &e);
57char *  iiProcArgs(char *e,BOOLEAN withParenth);
58#ifdef HAVE_NAMESPACES
59BOOLEAN iiLibCmd( char *newlib, BOOLEAN autoexport=TRUE, BOOLEAN tellerror=TRUE );
60#else /* HAVE_NAMESPACES */
61BOOLEAN iiLibCmd( char *newlib, BOOLEAN tellerror=TRUE );
62#endif /* HAVE_NAMESPACES */
63leftv   iiMap(map theMap, char * what);
64void    iiMakeResolv(resolvente r, int length, int rlen, char * name, int typ0,
65           intvec ** weights=NULL);
66BOOLEAN jjMINRES(leftv res, leftv v);
67BOOLEAN jjBETTI(leftv res, leftv v);
68int     iiRegularity(lists L);
69leftv   singular_system(sleftv h);
70BOOLEAN jjSYSTEM(leftv res, leftv v);
71void    iiDebug();
72BOOLEAN iiCheckRing(int i);
73poly    iiHighCorner(ideal i, int ak);
74/* ================================================================== */
75/* Expressions : */
76BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
77BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
78                     BOOLEAN proccall=FALSE);
79BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
80BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
81
82typedef BOOLEAN (*proc1)(leftv,leftv);
83
84#ifdef INIT_BUG
85void    jjInitTab1();
86#endif
87#ifdef GENTABLE
88typedef char * (*Proc1)(char *);
89struct sValCmd1
90{
91  proc1 p;
92  short cmd;
93  short res;
94  short arg;
95};
96
97typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
98struct sValCmd2
99{
100  proc2 p;
101  short cmd;
102  short res;
103  short arg1;
104  short arg2;
105#ifdef PROFILING
106  short cnt;
107  int   t;
108#endif
109};
110
111typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
112struct sValCmd3
113{
114  proc3 p;
115  short cmd;
116  short res;
117  short arg1;
118  short arg2;
119  short arg3;
120};
121struct sValCmdM
122{
123  proc1 p;
124  short cmd;
125  short res;
126  short number_of_args; /* -1: any, -2: any >0, .. */
127};
128extern struct sValCmd2 dArith2[];
129extern struct sValCmd1 dArith1[];
130extern struct sValCmd3 dArith3[];
131extern struct sValCmdM dArithM[];
132#endif
133
134/* ================================================================== */
135/* Assigments : */
136BOOLEAN iiAssign(leftv left, leftv right);
137
138typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
139struct sValAssign_sys
140{
141  proc1 p;
142  short res;
143  short arg;
144};
145
146struct sValAssign
147{
148  proci p;
149  short res;
150  short arg;
151};
152
153BOOLEAN iiParameter(leftv p);
154/* ================================================================== */
155int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
156  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
157#ifdef HAVE_NAMESPACES
158sleftv * iiMake_proc(idhdl pn, sleftv* slpn, sleftv* sl);
159#else /* HAVE_NAMESPACES */
160sleftv * iiMake_proc(idhdl pn, sleftv* sl);
161#endif /* HAVE_NAMESPACES */
162// from misc.cc:
163char *  showOption();
164BOOLEAN setOption(leftv res, leftv v);
165/* ================================================================== */
166char * versionString();
167#endif
168
Note: See TracBrowser for help on using the repository browser.