Functions
locals.h File Reference
#include <Singular/tok.h>
#include <Singular/ipid.h>
#include <Singular/subexpr.h>
#include <kernel/structs.h>
#include <Singular/ipconv.h>

Go to the source code of this file.

Functions

BOOLEAN jjANY2LIST (leftv res, leftv v, int cnt)
 
const char * Tok2Cmdname (int tok)
 

Function Documentation

§ jjANY2LIST()

BOOLEAN jjANY2LIST ( leftv  res,
leftv  v,
int  cnt 
)

§ Tok2Cmdname()

const char* Tok2Cmdname ( int  tok)

Definition at line 130 of file gentable.cc.

131 {
132  if (tok < 0)
133  {
134  return cmds[0].name;
135  }
136  if (tok==COMMAND) return "command";
137  if (tok==ANY_TYPE) return "any_type";
138  if (tok==NONE) return "nothing";
139  //if (tok==IFBREAK) return "if_break";
140  //if (tok==VECTOR_FROM_POLYS) return "vector_from_polys";
141  //if (tok==ORDER_VECTOR) return "ordering";
142  //if (tok==REF_VAR) return "ref";
143  //if (tok==OBJECT) return "object";
144  //if (tok==PRINT_EXPR) return "print_expr";
145  if (tok==IDHDL) return "identifier";
146  #ifdef SINGULAR_4_1
147  //if (tok==CRING_CMD) return "Ring";
148  #endif
149  // we do not blackbox objects during table generation:
150  //if (tok>MAX_TOK) return getBlackboxName(tok);
151  int i = 0;
152  while (cmds[i].tokval!=0)
153  {
154  if ((cmds[i].tokval == tok)&&(cmds[i].alias==0))
155  {
156  return cmds[i].name;
157  }
158  i++;
159  }
160  i=0;// try again for old/alias names:
161  while (cmds[i].tokval!=0)
162  {
163  if (cmds[i].tokval == tok)
164  {
165  return cmds[i].name;
166  }
167  i++;
168  }
169  #if 0
170  char *s=(char*)malloc(10);
171  sprintf(s,"(%d)",tok);
172  return s;
173  #else
174  return cmds[0].name;
175  #endif
176 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
#define ANY_TYPE
Definition: tok.h:30
#define IDHDL
Definition: tok.h:31
void * malloc(size_t size)
Definition: omalloc.c:92
int i
Definition: cfEzgcd.cc:123
cmdnames cmds[]
Definition: table.h:901
#define NONE
Definition: tok.h:218
#define COMMAND
Definition: tok.h:29