Macros | Functions | Variables
fevoices.cc File Reference
#include <kernel/mod2.h>
#include <omalloc/omalloc.h>
#include <misc/options.h>
#include <reporter/reporter.h>
#include <kernel/oswrapper/feread.h>
#include <Singular/fevoices.h>
#include <Singular/subexpr.h>
#include <Singular/ipshell.h>
#include <Singular/sdb.h>
#include <stdlib.h>
#include <stdio.h>
#include <misc/mylimits.h>
#include <stdarg.h>
#include <sys/stat.h>
#include <ctype.h>
#include <unistd.h>

Go to the source code of this file.

Macros

#define fePutChar(c)   fputc((unsigned char)(c),stdout)
 
#define INITIAL_PRINT_BUFFER   24*1024L
 
#define MAX_FILE_BUFFER   4*4096
 
#define STDIN_FILENO   0
 

Functions

const char * VoiceName ()
 
void VoiceBackTrack ()
 
BOOLEAN newFile (char *fname, FILE *f)
 
void newBuffer (char *s, feBufferTypes t, procinfo *pi, int lineno)
 
BOOLEAN exitBuffer (feBufferTypes typ)
 
BOOLEAN contBuffer (feBufferTypes typ)
 
BOOLEAN exitVoice ()
 
static void feShowPrompt (void)
 
static int fePrintEcho (char *anf, char *)
 
int feReadLine (char *b, int l)
 
VoicefeInitStdin (Voice *pp)
 

Variables

char fe_promptstr [] =" "
 
FILE * File_Profiling =NULL
 
int blocknest
 
int yy_noeof =0
 
int yy_blocklineno
 
VoicecurrentVoice = NULL
 
const char sNoName_fe [] ="_"
 

Macro Definition Documentation

◆ fePutChar

#define fePutChar (   c)    fputc((unsigned char)(c),stdout)

Definition at line 33 of file fevoices.cc.

◆ INITIAL_PRINT_BUFFER

#define INITIAL_PRINT_BUFFER   24*1024L

Definition at line 41 of file fevoices.cc.

◆ MAX_FILE_BUFFER

#define MAX_FILE_BUFFER   4*4096

Definition at line 45 of file fevoices.cc.

◆ STDIN_FILENO

#define STDIN_FILENO   0

Definition at line 667 of file fevoices.cc.

Function Documentation

◆ contBuffer()

BOOLEAN contBuffer ( feBufferTypes  typ)

Definition at line 309 of file fevoices.cc.

310 {
311  //printf("contBuffer: %d(%s),(%x)\n",
312  // typ,BT_name[typ], currentVoice);
313  if (typ == BT_break) // valid inside for, while. may skip if, else
314  {
315  // first check for valid buffer type
317  loop
318  {
319  if ((p->typ != BT_if)
320  &&(p->typ != BT_else))
321  {
322  if (p->typ == BT_break /*typ*/)
323  {
324  while (p != currentVoice)
325  {
326  exitVoice();
327  }
329  currentVoice->fptr=0;
330  return FALSE;
331  }
332  else return TRUE;
333  }
334  if (p->prev==NULL) break;
335  p=p->prev;
336  }
337  }
338  return TRUE;
339 }
long fptr
Definition: fevoices.h:70
int yylineno
Definition: febase.cc:45
loop
Definition: myNF.cc:98
#define FALSE
Definition: auxiliary.h:94
return P p
Definition: myNF.cc:203
#define TRUE
Definition: auxiliary.h:98
Definition: fevoices.h:58
int start_lineno
Definition: fevoices.h:74
Definition: fevoices.h:24
BOOLEAN exitVoice()
Definition: fevoices.cc:346
feBufferTypes typ
Definition: fevoices.h:84
Voice * prev
Definition: fevoices.h:62
#define NULL
Definition: omList.c:10
Voice * currentVoice
Definition: fevoices.cc:57

◆ exitBuffer()

BOOLEAN exitBuffer ( feBufferTypes  typ)

Definition at line 241 of file fevoices.cc.

242 {
243  //printf("exitBuffer: %d(%s),(%x)\n",
244  // typ,BT_name[typ], currentVoice);
245  //Voice *p=currentVoice;
246  //PrintS("-----------------\ncurr:");
247  //do
248  //{
249  //Print("voice fn:%s\n",p->filename);
250  //p=p->prev;
251  //}
252  //while (p!=NULL);
253  //PrintS("----------------\n");
254  if (typ == BT_break) // valid inside for, while. may skip if, else
255  {
256  /*4 first check for valid buffer type, skip if/else*/
258  loop
259  {
260  if ((p->typ != BT_if)
261  &&(p->typ != BT_else))
262  {
263  if (p->typ == BT_break /*typ*/)
264  {
265  while (p != currentVoice)
266  {
267  exitVoice();
268  }
269  exitVoice();
270  return FALSE;
271  }
272  else return TRUE;
273  }
274  if (p->prev==NULL) break;
275  p=p->prev;
276  }
277  /*4 break not inside a for/while: return an error*/
278  if (/*typ*/ BT_break != currentVoice->typ) return 1;
279  return exitVoice();
280  }
281 
282  if ((typ == BT_proc)
283  || (typ == BT_example))
284  {
285  Voice *p=currentVoice;
286  loop
287  {
288  if ((p->typ == BT_proc)
289  || (p->typ == BT_example))
290  {
291  while (p != currentVoice)
292  {
293  exitVoice();
294  }
295  exitVoice();
296  return FALSE;
297  }
298  if (p->prev==NULL) break;
299  p=p->prev;
300  }
301  }
302  /*4 return not inside a proc: return an error*/
303  return TRUE;
304 }
loop
Definition: myNF.cc:98
#define FALSE
Definition: auxiliary.h:94
return P p
Definition: myNF.cc:203
#define TRUE
Definition: auxiliary.h:98
Definition: fevoices.h:58
Definition: fevoices.h:24
BOOLEAN exitVoice()
Definition: fevoices.cc:346
feBufferTypes typ
Definition: fevoices.h:84
Voice * prev
Definition: fevoices.h:62
#define NULL
Definition: omList.c:10
Voice * currentVoice
Definition: fevoices.cc:57

◆ exitVoice()

BOOLEAN exitVoice ( )

Definition at line 346 of file fevoices.cc.

347 {
348  //printf("exitVoice: %d(%s),(%x)\n",
349  // currentVoice->typ,BT_name[currentVoice->typ], currentVoice);
350  //{
351  //Voice *p=currentVoice;
352  //PrintS("-----------------\ncurr:");
353  //do
354  //{
355  //Print("voice fn:%s\n",p->filename);
356  //p=p->prev;
357  //}
358  //while (p!=NULL);
359  //PrintS("----------------\n");
360  //}
361  if (currentVoice!=NULL)
362  {
363  if (currentVoice->oldb!=NULL)
364  {
367  }
368  if (currentVoice->filename!=NULL)
369  {
372  }
373  if (currentVoice->buffer!=NULL)
374  {
377  }
378  if ((currentVoice->prev==NULL)
379  &&(currentVoice->sw==BI_file)
380  &&(currentVoice->files!=stdin))
381  {
383  }
384  if (currentVoice->prev!=NULL)
385  {
386  //printf("exitVoice typ %d(%s)\n",
387  // currentVoice->typ,BT_name[currentVoice->typ]);
388  if (currentVoice->typ==BT_if)
389  {
390  currentVoice->prev->ifsw=2;
391  }
392  else
393  {
394  currentVoice->prev->ifsw=0;
395  }
396  if ((currentVoice->sw == BI_file)
397  && (currentVoice->files!=NULL))
398  {
399  fclose(currentVoice->files);
400  }
403  }
405  delete currentVoice;
406  currentVoice=p;
407  }
408  return currentVoice==NULL;
409 }
int yylineno
Definition: febase.cc:45
char * buffer
Definition: fevoices.h:69
return P p
Definition: myNF.cc:203
char * filename
Definition: fevoices.h:63
void * ADDRESS
Definition: auxiliary.h:115
Definition: fevoices.h:58
Voice * next
Definition: fevoices.h:61
int curr_lineno
Definition: fevoices.h:75
char ifsw
Definition: fevoices.h:79
Definition: fevoices.h:24
Voice * feInitStdin(Voice *pp)
Definition: fevoices.cc:669
#define omFree(addr)
Definition: omAllocDecl.h:261
feBufferTypes typ
Definition: fevoices.h:84
Voice * prev
Definition: fevoices.h:62
void * oldb
Definition: fevoices.h:65
void myyoldbuffer(void *oldb)
Definition: scanner.cc:2326
#define NULL
Definition: omList.c:10
Voice * currentVoice
Definition: fevoices.cc:57
FILE * files
Definition: fevoices.h:67
feBufferInputs sw
Definition: fevoices.h:76

◆ feInitStdin()

Voice* feInitStdin ( Voice pp)

Definition at line 669 of file fevoices.cc.

670 {
671  Voice *p = new Voice;
672  p->files = stdin;
673  p->sw = (isatty(STDIN_FILENO)) ? BI_stdin : BI_file;
674  if ((pp!=NULL) && (pp->sw==BI_stdin) && (pp->files==stdin))
675  {
676  p->files=freopen("/dev/tty","r",stdin);
677  //stdin=p->files;
678  if (p->files==NULL)
679  {
680  p->files = stdin;
681  p->sw = BI_file;
682  }
683  else
684  p->sw = BI_stdin;
685  }
686  p->filename = omStrDup("STDIN");
687  p->start_lineno = 1;
690  return p;
691 }
return P p
Definition: myNF.cc:203
char * filename
Definition: fevoices.h:63
Definition: fevoices.h:58
int start_lineno
Definition: fevoices.h:74
#define STDIN_FILENO
Definition: fevoices.cc:667
#define NULL
Definition: omList.c:10
FILE * files
Definition: fevoices.h:67
void omMarkAsStaticAddr(void *addr)
feBufferInputs sw
Definition: fevoices.h:76
#define omStrDup(s)
Definition: omAllocDecl.h:263

◆ fePrintEcho()

static int fePrintEcho ( char *  anf,
char *   
)
static

Definition at line 423 of file fevoices.cc.

424 {
425  char *ss=strrchr(anf,'\n');
426  int len_s;
427  if (ss==NULL)
428  {
429  len_s=strlen(anf);
430  }
431  else
432  {
433  len_s=ss-anf+1;
434  }
435  // my_yylinebuf:
436  int mrc=si_min(len_s,79)-1;
437  strcpy(my_yylinebuf,anf+(len_s-1)-mrc);
438  if (my_yylinebuf[mrc] == '\n') my_yylinebuf[mrc] = '\0';
439  mrc--;
440  // handle echo:
441  if (((si_echo>myynest)
442  && ((currentVoice->typ==BT_proc)
444  || (currentVoice->typ==BT_file)
445  || (currentVoice->typ==BT_none)
446  )
447  && (strncmp(anf,";return();",10)!=0)
448  )
451  {
453  {
454  if (currentVoice->filename==NULL)
455  Print("(none) %3d%c ",yylineno,prompt_char);
456  else
458  }
459  {
460  fwrite(anf,1,len_s,stdout);
461  mflush();
462  }
463  if (traceit&TRACE_SHOW_LINE)
464  {
465  while(fgetc(stdin)!='\n');
466  }
467  }
468  else if (traceit&TRACE_SHOW_LINENO)
469  {
470  Print("{%d}",yylineno);
471  mflush();
472  }
473  else if (traceit&TRACE_PROFILING)
474  {
475  if (File_Profiling==NULL)
476  File_Profiling=fopen("smon.out","a");
477  if (File_Profiling==NULL)
478  traceit &= (~TRACE_PROFILING);
479  else
480  {
481  if (currentVoice->filename==NULL)
482  fprintf(File_Profiling,"(none) %d\n",yylineno);
483  else
484  fprintf(File_Profiling,"%s %d\n",currentVoice->filename,yylineno);
485  }
486  }
487 #ifdef HAVE_SDB
488  if ((blocknest==0)
489  && (currentVoice->pi!=NULL)
490  && (currentVoice->pi->trace_flag!=0))
491  {
492  sdb(currentVoice, anf, len_s);
493  }
494 #endif
495  prompt_char = '.';
496  return len_s;
497 }
#define TRACE_SHOW_LINENO
Definition: reporter.h:30
int yylineno
Definition: febase.cc:45
#define Print
Definition: emacs.cc:83
static int si_min(const int a, const int b)
Definition: auxiliary.h:121
char * filename
Definition: fevoices.h:63
char prompt_char
Definition: febase.cc:44
int blocknest
Definition: scanner.cc:581
FILE * File_Profiling
Definition: fevoices.cc:38
int traceit
Definition: febase.cc:47
void sdb(Voice *currentVoice, const char *currLine, int len)
Definition: sdb.cc:201
#define mflush()
Definition: reporter.h:57
int myynest
Definition: febase.cc:46
char my_yylinebuf[80]
Definition: febase.cc:48
#define TRACE_SHOW_LINE
Definition: reporter.h:32
procinfo * pi
Definition: fevoices.h:64
feBufferTypes typ
Definition: fevoices.h:84
#define TRACE_SHOW_LINE1
Definition: reporter.h:37
#define NULL
Definition: omList.c:10
Voice * currentVoice
Definition: fevoices.cc:57
#define TRACE_PROFILING
Definition: reporter.h:49
char trace_flag
Definition: subexpr.h:62
int si_echo
Definition: febase.cc:41

◆ feReadLine()

int feReadLine ( char *  b,
int  l 
)

Definition at line 499 of file fevoices.cc.

500 {
501  char *s=NULL;
502  int offset = 0; /* will not be used if s==NULL*/
503  // try to read from the buffer into b, max l chars
504  if (currentVoice!=NULL)
505  {
506  if((currentVoice->buffer!=NULL)
507  && (currentVoice->buffer[currentVoice->fptr]!='\0'))
508  {
509  NewBuff:
510  register int i=0;
511  long startfptr=currentVoice->fptr;
512  long tmp_ptr=currentVoice->fptr;
513  l--;
514  loop
515  {
516  register char c=
517  b[i]=currentVoice->buffer[tmp_ptr/*currentVoice->fptr*/];
518  i++;
519  if (yy_noeof==noeof_block)
520  {
521  if (c<' ') yylineno++;
522  else if (c=='}') break;
523  }
524  else
525  {
526  if ((c<' ') ||
527  (c==';') ||
528  (c==')')
529  )
530  break;
531  }
532  if (i>=l) break;
533  tmp_ptr++;/*currentVoice->fptr++;*/
534  if(currentVoice->buffer[tmp_ptr/*currentVoice->fptr*/]=='\0') break;
535  }
536  currentVoice->fptr=tmp_ptr;
537  b[i]='\0';
538  if (currentVoice->sw==BI_buffer)
539  {
540  if (startfptr==0)
541  {
542  char *anf=currentVoice->buffer;
543  const char *ss=strchr(anf,'\n');
544  long len;
545  if (ss==NULL) len=strlen(anf);
546  else len=ss-anf;
547  char *s=(char *)omAlloc(len+2);
548  strncpy(s,anf,len+2);
549  s[len+1]='\0';
550  fePrintEcho(s,b);
551  omFree((ADDRESS)s);
552  }
553  else if (/*(startfptr>0) &&*/
554  (currentVoice->buffer[startfptr-1]=='\n'))
555  {
556  char *anf=currentVoice->buffer+startfptr;
557  const char *ss=strchr(anf,'\n');
558  long len;
559  if (ss==NULL) len=strlen(anf);
560  else len=ss-anf;
561  char *s=(char *)omAlloc(len+2);
562  strncpy(s,anf,len+2);
563  s[len+1]='\0';
564  yylineno++;
565  fePrintEcho(s,b);
566  omFree((ADDRESS)s);
567  }
568  }
569  currentVoice->fptr++;
570  return i;
571  }
572  // no buffer there or e-o-buffer or eoln:
573  if (currentVoice->sw!=BI_buffer)
574  {
575  currentVoice->fptr=0;
576  if (currentVoice->buffer==NULL)
577  {
580  }
581  }
582  offset=0;
583  NewRead:
584  yylineno++;
585  if (currentVoice->sw==BI_stdin)
586  {
587  feShowPrompt();
589  &(currentVoice->buffer[offset]),
590  omSizeOfAddr(currentVoice->buffer)-1-offset);
591  //int i=0;
592  //if (s!=NULL)
593  // while((s[i]!='\0') /*&& (i<MAX_FILE_BUFFER)*/) {s[i] &= (char)127;i++;}
594  }
595  else if (currentVoice->sw==BI_file)
596  {
598  s=fgets(currentVoice->buffer+offset,(MAX_FILE_BUFFER-1-sizeof(ADDRESS))-offset,
600  if (s!=NULL)
601  {
603  // ftell returns -1 for non-seekable streams, such as pipes
604  if (currentVoice->ftellptr<0)
606  }
607  }
608  //else /* BI_buffer */ s==NULL => return 0
609  // done by the default return
610  }
611  if (s!=NULL)
612  {
613  // handle prot:
614  if (feProt&SI_PROT_I)
615  {
616  fputs(s,feProtFile);
617  }
618  int rc=fePrintEcho(s,b)+1;
619  //s[strlen(s)+1]='\0'; add an second \0 at the end of the string
620  s[rc]='\0';
621  // handel \\ :
622  rc-=3;
623  if ((s[rc]=='\\')&&(currentVoice->sw!=BI_buffer))
624  {
625  s[rc]='\0';
626  offset+=rc;
627  if (offset<(int)omSizeOfAddr(currentVoice->buffer)) goto NewRead;
628  }
629  goto NewBuff;
630  }
631  /* else if (s==NULL) */
632  {
633  const char *err;
634  switch(yy_noeof)
635  {
636  case noeof_brace:
637  case noeof_block:
638  err="{...}";
639  break;
640  case noeof_asstring:
641  err="till `.`";
642  break;
643  case noeof_string:
644  err="string";
645  break;
646  case noeof_bracket:
647  err="(...)";
648  break;
649  case noeof_procname:
650  err="proc";
651  break;
652  case noeof_comment:
653  err="/*...*/";
654  break;
655  default:
656  return 0;
657  }
658  Werror("premature end of file while reading %s",err);
659  return 0;
660  }
661 }
char fe_promptstr[]
Definition: fevoices.cc:37
long fptr
Definition: fevoices.h:70
FILE * feProtFile
Definition: reporter.cc:57
int yy_noeof
Definition: fevoices.cc:55
const CanonicalForm int s
Definition: facAbsFact.cc:55
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
Definition: feread.cc:34
int yylineno
Definition: febase.cc:45
char * buffer
Definition: fevoices.h:69
static void feShowPrompt(void)
Definition: fevoices.cc:415
loop
Definition: myNF.cc:98
size_t omSizeOfAddr(const void *addr)
void * ADDRESS
Definition: auxiliary.h:115
#define omAlloc(size)
Definition: omAllocDecl.h:210
int feProt
Definition: reporter.cc:56
#define SI_PROT_I
Definition: reporter.h:52
#define omFree(addr)
Definition: omAllocDecl.h:261
static int fePrintEcho(char *anf, char *)
Definition: fevoices.cc:423
int i
Definition: cfEzgcd.cc:123
#define NULL
Definition: omList.c:10
#define MAX_FILE_BUFFER
Definition: fevoices.cc:45
Voice * currentVoice
Definition: fevoices.cc:57
FILE * files
Definition: fevoices.h:67
void omMarkAsStaticAddr(void *addr)
#define SEEK_SET
Definition: mod2.h:114
feBufferInputs sw
Definition: fevoices.h:76
long ftellptr
Definition: fevoices.h:71
int offset
Definition: libparse.cc:1091
const poly b
Definition: syzextra.cc:213
void Werror(const char *fmt,...)
Definition: reporter.cc:189
int l
Definition: cfEzgcd.cc:94

◆ feShowPrompt()

static void feShowPrompt ( void  )
static

Definition at line 415 of file fevoices.cc.

416 {
418 }
char fe_promptstr[]
Definition: fevoices.cc:37
char prompt_char
Definition: febase.cc:44

◆ newBuffer()

void newBuffer ( char *  s,
feBufferTypes  t,
procinfo pi,
int  lineno 
)

Definition at line 171 of file fevoices.cc.

172 {
173  currentVoice->Next();
174  //Print(":Buffer%d(%s):%s(%x)\n",
175  // t,BT_name[t],pname,currentVoice);
176  if (pi!=NULL)
177  {
178  long l=strlen(pi->procname);
179  if (pi->libname!=NULL) l+=strlen(pi->libname);
180  currentVoice->filename = (char *)omAlloc(l+3);
181  *currentVoice->filename='\0';
182  if (pi->libname!=NULL) strcat(currentVoice->filename,pi->libname);
183  strcat(currentVoice->filename,"::");
184  strcat(currentVoice->filename,pi->procname);
185  currentVoice->pi = pi;
186  }
187  else
188  {
189  if(currentVoice->prev!=NULL)
190  {
193  }
194  else
195  {
197  currentVoice->pi = pi;
198  }
199  }
200  currentVoice->buffer = s;
202  currentVoice->typ = t;
203  switch (t)
204  {
205  case BT_execute:
206  yylineno-=2;
207  break;
208  case BT_proc:
209  case BT_example:
211  yylineno = lineno+1;
212  break;
213  case BT_if:
214  case BT_else:
215  case BT_break:
217  break;
218  //case BT_file:
219  default:
220  yylineno = 1;
221  break;
222  }
223  //Print("start body (%s) at line %d\n",BT_name[t],yylineno);
225  //printf("start buffer typ %d\n",t);
226  //Voice *p=currentVoice;
227  //PrintS("-----------------\ncurr:");
228  //do
229  //{
230  //Print("voice fn:%s\n",p->filename);
231  //p=p->prev;
232  //}
233  //while (p!=NULL);
234  //PrintS("----------------\n");
235 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
int yylineno
Definition: febase.cc:45
char * buffer
Definition: fevoices.h:69
void Next()
Definition: fevoices.cc:94
char * filename
Definition: fevoices.h:63
void * myynewbuffer()
Definition: scanner.cc:2319
#define omAlloc(size)
Definition: omAllocDecl.h:210
int start_lineno
Definition: fevoices.h:74
char * procname
Definition: subexpr.h:57
Definition: fevoices.h:24
char * libname
Definition: subexpr.h:56
procinfo * pi
Definition: fevoices.h:64
feBufferTypes typ
Definition: fevoices.h:84
Voice * prev
Definition: fevoices.h:62
#define pi
Definition: libparse.cc:1143
void * oldb
Definition: fevoices.h:65
int yy_blocklineno
Definition: fevoices.cc:56
#define NULL
Definition: omList.c:10
Voice * currentVoice
Definition: fevoices.cc:57
feBufferInputs sw
Definition: fevoices.h:76
int l
Definition: cfEzgcd.cc:94
#define omStrDup(s)
Definition: omAllocDecl.h:263

◆ newFile()

BOOLEAN newFile ( char *  fname,
FILE *  f 
)

Definition at line 129 of file fevoices.cc.

130 {
131  currentVoice->Next();
132  //Print(":File%d(%s):%s(%x)\n",
133  // currentVoice->typ,BT_name[currentVoice->typ],fname,currentVoice);
134  currentVoice->filename = omStrDup(fname);
136  if (strcmp(fname,"STDIN") == 0)
137  {
138  currentVoice->files = stdin;
141  }
142  else
143  {
144  currentVoice->sw = BI_file; /* needed by exitVoice below */
145  if (f!=NULL)
146  currentVoice->files = f;
147  else
148  {
149  currentVoice->files = feFopen(fname,"r",NULL,TRUE);
150  if (currentVoice->files==NULL)
151  {
152  exitVoice();
153  return TRUE;
154  }
155  }
157  }
159  //Voice *p=currentVoice;
160  //PrintS("-----------------\ncurr:");
161  //do
162  //{
163  //Print("voice fn:%s\n",p->filename);
164  //p=p->prev;
165  //}
166  //while (p!=NULL);
167  //PrintS("----------------\n");
168  return FALSE;
169 }
int yylineno
Definition: febase.cc:45
void Next()
Definition: fevoices.cc:94
#define FALSE
Definition: auxiliary.h:94
char * filename
Definition: fevoices.h:63
#define TRUE
Definition: auxiliary.h:98
int start_lineno
Definition: fevoices.h:74
BOOLEAN exitVoice()
Definition: fevoices.cc:346
FILE * feFopen(const char *path, const char *mode, char *where, short useWerror, short path_only)
Definition: feFopen.cc:47
FILE * f
Definition: checklibs.c:9
#define NULL
Definition: omList.c:10
Voice * currentVoice
Definition: fevoices.cc:57
FILE * files
Definition: fevoices.h:67
void omMarkAsStaticAddr(void *addr)
feBufferInputs sw
Definition: fevoices.h:76
#define omStrDup(s)
Definition: omAllocDecl.h:263

◆ VoiceBackTrack()

void VoiceBackTrack ( )

Definition at line 77 of file fevoices.cc.

78 {
80  while (p->prev!=NULL)
81  {
82  p=p->prev;
83  char *s=p->filename;
84  if (s==NULL)
85  PrintS("-- called from ? --\n");
86  else
87  Print("-- called from %s --\n",s);
88  }
89 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
#define Print
Definition: emacs.cc:83
return P p
Definition: myNF.cc:203
char * filename
Definition: fevoices.h:63
Definition: fevoices.h:58
void PrintS(const char *s)
Definition: reporter.cc:284
Voice * prev
Definition: fevoices.h:62
#define NULL
Definition: omList.c:10
Voice * currentVoice
Definition: fevoices.cc:57

◆ VoiceName()

const char* VoiceName ( )

Definition at line 66 of file fevoices.cc.

67 {
68  if ((currentVoice!=NULL)
69  && (currentVoice->filename!=NULL))
70  return currentVoice->filename;
71  return sNoName_fe;
72 }
const char sNoName_fe[]
Definition: fevoices.cc:65
char * filename
Definition: fevoices.h:63
#define NULL
Definition: omList.c:10
Voice * currentVoice
Definition: fevoices.cc:57

Variable Documentation

◆ blocknest

int blocknest

Definition at line 581 of file scanner.cc.

◆ currentVoice

Voice* currentVoice = NULL

Definition at line 57 of file fevoices.cc.

◆ fe_promptstr

char fe_promptstr[] =" "

Definition at line 37 of file fevoices.cc.

◆ File_Profiling

FILE* File_Profiling =NULL

Definition at line 38 of file fevoices.cc.

◆ sNoName_fe

const char sNoName_fe[] ="_"

Definition at line 65 of file fevoices.cc.

◆ yy_blocklineno

int yy_blocklineno

Definition at line 56 of file fevoices.cc.

◆ yy_noeof

int yy_noeof =0

Definition at line 55 of file fevoices.cc.