source: git/Singular/ipshell.h @ 6f2edc

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