My Project  debian-1:4.1.1-p2+ds-4build2
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 138 of file gentable.cc.

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