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

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

Definition at line 8598 of file iparith.cc.

8599 {
8600  // cnt = 0: all
8601  // cnt = 1: only first one
8602  leftv next;
8603  BOOLEAN failed = TRUE;
8604  if(v==NULL) return failed;
8605  res->rtyp = LIST_CMD;
8606  if(cnt) v->next = NULL;
8607  next = v->next; // saving next-pointer
8608  failed = jjLIST_PL(res, v);
8609  v->next = next; // writeback next-pointer
8610  return failed;
8611 }
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
#define TRUE
Definition: auxiliary.h:144
leftv next
Definition: subexpr.h:87
BOOLEAN jjLIST_PL(leftv res, leftv v)
Definition: iparith.cc:7394
#define NULL
Definition: omList.c:10
int rtyp
Definition: subexpr.h:92
Definition: tok.h:96
int BOOLEAN
Definition: auxiliary.h:131
ListNode * next
Definition: janet.h:31
const char* Tok2Cmdname ( int  tok)

Definition at line 128 of file gentable.cc.

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