My Project
Loading...
Searching...
No Matches
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 charTok2Cmdname (int tok)
 

Function Documentation

◆ jjANY2LIST()

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

◆ Tok2Cmdname()

const char * Tok2Cmdname ( int tok)

Definition at line 135 of file gentable.cc.

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