source: git/Singular/ipshell.h @ ce9c2d

fieker-DuValspielwiese
Last change on this file since ce9c2d was daeb6d, checked in by Kai Krüger <krueger@…>, 26 years ago
tesths.cc subexpr.h subexpr.cc ipshell.h ipshell.cc iplib.cc ipid.h ipid.cc ipassign.cc iparith.cc ChangeLog - Added assignment <package>=<package> via ref-counter rewriten killhdl for packages - Added libname,language to packages - exportto(Up,...) 'Up' defined in syMake - listvar() shows toplevel-packages too. git-svn-id: file:///usr/local/Singular/svn/trunk@2589 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.3 KB
Line 
1#ifndef IPSHELL_H
2#define IPSHELL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: ipshell.h,v 1.15 1998-10-22 12:26:11 krueger 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);
73/* ================================================================== */
74/* Expressions : */
75BOOLEAN iiExprArith1(leftv res, sleftv* a, int op);
76BOOLEAN iiExprArith2(leftv res, sleftv* a, int op, sleftv* b,
77                     BOOLEAN proccall=FALSE);
78BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c);
79BOOLEAN iiExprArithM(leftv res, sleftv* a, int op);
80
81typedef BOOLEAN (*proc1)(leftv,leftv);
82
83#ifdef INIT_BUG
84void    jjInitTab1();
85#endif
86#ifdef GENTABLE
87typedef char * (*Proc1)(char *);
88struct sValCmd1
89{
90  proc1 p;
91  short cmd;
92  short res;
93  short arg;
94};
95
96typedef BOOLEAN (*proc2)(leftv,leftv,leftv);
97struct sValCmd2
98{
99  proc2 p;
100  short cmd;
101  short res;
102  short arg1;
103  short arg2;
104#ifdef PROFILING
105  short cnt;
106  int   t;
107#endif
108};
109
110typedef BOOLEAN (*proc3)(leftv,leftv,leftv,leftv);
111struct sValCmd3
112{
113  proc3 p;
114  short cmd;
115  short res;
116  short arg1;
117  short arg2;
118  short arg3;
119};
120struct sValCmdM
121{
122  proc1 p;
123  short cmd;
124  short res;
125  short number_of_args; /* -1: any, -2: any >0, .. */
126};
127extern struct sValCmd2 dArith2[];
128extern struct sValCmd1 dArith1[];
129extern struct sValCmd3 dArith3[];
130extern struct sValCmdM dArithM[];
131#endif
132
133/* ================================================================== */
134/* Assigments : */
135BOOLEAN iiAssign(leftv left, leftv right);
136
137typedef BOOLEAN (*proci)(leftv,leftv,Subexpr);
138struct sValAssign_sys
139{
140  proc1 p;
141  short res;
142  short arg;
143};
144
145struct sValAssign
146{
147  proci p;
148  short res;
149  short arg;
150};
151
152BOOLEAN iiParameter(leftv p);
153/* ================================================================== */
154int     iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl* root,
155  BOOLEAN isring = FALSE, BOOLEAN init_b=TRUE);
156#ifdef HAVE_NAMESPACES
157sleftv * iiMake_proc(idhdl pn, sleftv* slpn, sleftv* sl);
158#else /* HAVE_NAMESPACES */
159sleftv * iiMake_proc(idhdl pn, sleftv* sl);
160#endif /* HAVE_NAMESPACES */
161// from misc.cc:
162char *  showOption();
163BOOLEAN setOption(leftv res, leftv v);
164/* ================================================================== */
165char * versionString();
166#endif
167
Note: See TracBrowser for help on using the repository browser.