source: git/Singular/ipshell.h @ f6b5f0

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