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

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