My Project
Loading...
Searching...
No Matches
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 137 of file gentable.cc.

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