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 132 of file gentable.cc.

133 {
134  if (tok < 0)
135  {
136  return cmds[0].name;
137  }
138  if (tok==COMMAND) return "command";
139  if (tok==ANY_TYPE) return "any_type";
140  if (tok==NONE) return "nothing";
141  //if (tok==IFBREAK) return "if_break";
142  //if (tok==VECTOR_FROM_POLYS) return "vector_from_polys";
143  //if (tok==ORDER_VECTOR) return "ordering";
144  //if (tok==REF_VAR) return "ref";
145  //if (tok==OBJECT) return "object";
146  //if (tok==PRINT_EXPR) return "print_expr";
147  if (tok==IDHDL) return "identifier";
148  // we do not blackbox objects during table generation:
149  //if (tok>MAX_TOK) return getBlackboxName(tok);
150  int i = 0;
151  while (cmds[i].tokval!=0)
152  {
153  if ((cmds[i].tokval == tok)&&(cmds[i].alias==0))
154  {
155  return cmds[i].name;
156  }
157  i++;
158  }
159  i=0;// try again for old/alias names:
160  while (cmds[i].tokval!=0)
161  {
162  if (cmds[i].tokval == tok)
163  {
164  return cmds[i].name;
165  }
166  i++;
167  }
168  #if 0
169  char *s=(char*)malloc(10);
170  sprintf(s,"(%d)",tok);
171  return s;
172  #else
173  return cmds[0].name;
174  #endif
175 }
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:904
#define NONE
Definition: tok.h:216
#define COMMAND
Definition: tok.h:29