source: git/Singular/ipid.h @ 634dab0

spielwiese
Last change on this file since 634dab0 was f22093e, checked in by Hans Schönemann <hannes@…>, 20 years ago
* hannes: ring-functions git-svn-id: file:///usr/local/Singular/svn/trunk@6964 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.4 KB
Line 
1#ifndef IPID_H
2#define IPID_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: ipid.h,v 1.41 2003-12-10 16:57:14 Singular Exp $ */
7/*
8* ABSTRACT: identfier handling
9*/
10#include <string.h>
11#include "structs.h"
12#ifdef TOK_H
13#include "subexpr.h"
14#endif
15
16struct sip_command
17{
18  sleftv arg1; /*arg1 to build_in, proc to proc_call*/
19  sleftv arg2; /*NULL or arg2 to build_in, args to proc_call*/
20  sleftv arg3; /*NULL or arg3*/
21  short argc; /*0,1,2,3 to build_in, -1 otherwise*/
22  short op;   /* build_in or PROC_CMD*/
23};
24
25struct sip_package
26{
27  idhdl         idroot; /* local objects */
28  char          *libname;
29  short         ref;
30  language_defs language;
31  BOOLEAN       loaded;
32  void          *handle;
33};
34
35inline package paCopy(package pack)
36{
37  pack->ref++;
38  return pack;
39}
40
41inline void paKill(package pack)
42{
43  pack->ref--;
44}
45
46class proclevel {
47  public:
48  proclevel * next;
49  idhdl      cRingHdl;
50  ring       cRing;
51  #ifdef HAVE_NS
52  idhdl      cPackHdl;
53  package    cPack;
54  #endif
55  char      * name;
56  proclevel()  { memset(this,0,sizeof(*this)); }
57  void    push(char *);
58  void    pop();
59};
60extern proclevel *procstack;
61
62/*extern idhdl      currRingHdl; in structs.h */
63/*extern ring     currRing;  in structs.h */
64/*extern ideal      currQuotient; in structs.h */
65
66char *idhdl2id(idhdl pck, idhdl h);
67void  iiname2hdl(const char *name, idhdl *pck, idhdl *id);
68idhdl enterid(char * a, int lev, idtyp t, idhdl* root, BOOLEAN init=TRUE);
69idhdl ggetid(const char *n, BOOLEAN local = FALSE);
70idhdl ggetid(const char *n, BOOLEAN local, idhdl *packhdl);
71void  killid(char * a, idhdl * i);
72#ifdef HAVE_NS
73void killhdl(idhdl h, package prooti=currPack);
74#else
75void  killhdl(idhdl h);
76#endif
77void  killhdl2(idhdl h, idhdl * ih, ring r);
78lists ipNameList(idhdl root);
79void  ipMoveId(idhdl h);
80BOOLEAN checkPackage(package pack);
81#ifdef HAVE_NS
82idhdl packFindHdl(package r);
83#endif
84
85#define FLAG_STD   0
86#define FLAG_TWOSTD  3
87#define hasFlag(A,F) Sy_inset((F),(A)->flag)
88#define setFlag(A,F) (A)->flag|=Sy_bit(F)
89#define resetFlag(A,F) (A)->flag&=~Sy_bit(F)
90void ipListFlag(idhdl h);
91
92#ifndef OM_ALLOC_H
93struct omBin_s;
94#endif
95
96extern omBin_s* sip_command_bin;
97extern omBin_s* ip_command_bin;
98extern omBin_s* sip_package_bin;
99extern omBin_s* ip_package_bin;
100extern omBin_s* idrec_bin;
101extern omBin_s* namerec_bin;
102#endif
103
104
Note: See TracBrowser for help on using the repository browser.