10#ifndef STANDALONE_PARSER
27#define fePutChar(c) fputc((unsigned char)(c),stdout)
39#define MAX_FILE_BUFFER 4*4096
85 PrintS(
"-- called from ? --\n");
87 Print(
"-- called from %s --\n",
s);
136 if (strcmp(fname,
"STDIN") == 0)
173 long l=strlen(
pi->procname);
174 if (
pi->libname!=
NULL)
l+=strlen(
pi->libname);
269 if (
p->prev==
NULL)
break;
293 if (
p->prev==
NULL)
break;
329 if (
p->prev==
NULL)
break;
420 char *ss=strrchr(anf,
'\n');
431 int mrc=
si_min(len_s,79)-1;
442 && (strncmp(anf,
";return();",10)!=0)
455 fwrite(anf,1,len_s,stdout);
523 else if (c==
'}')
break;
547 const char *ss=strchr(anf,
'\n');
548 if (ss==
NULL) len=strlen(anf);
556 const char *ss=strchr(anf,
'\n');
557 if (ss==
NULL) len=strlen(anf);
565 strncpy(
s,anf,len+2);
630 rc-=3;
if (rc<0) rc=0;
635 if (offset<currentVoice->buff_size)
goto NewRead;
666 Werror(
"premature end of file while reading %s",err);
675#define STDIN_FILENO 0
684 p->files=freopen(
"/dev/tty",
"r",stdin);
static int si_min(const int a, const int b)
const CanonicalForm int s
FILE * feFopen(const char *path, const char *mode, char *where, short useWerror, short path_only)
VAR char my_yylinebuf[80]
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
EXTERN_VAR char prompt_char
VAR FILE * File_Profiling
BOOLEAN exitBuffer(feBufferTypes typ)
void newBuffer(char *s, feBufferTypes t, procinfo *pi, int lineno)
BOOLEAN contBuffer(feBufferTypes typ)
int feReadLine(char *b, int l)
VAR BOOLEAN File_Log_written
static int fePrintEcho(char *anf, char *)
BOOLEAN newFile(char *fname)
Voice * feInitStdin(Voice *pp)
static void feShowPrompt(void)
EXTERN_VAR Voice * currentVoice
void myyoldbuffer(void *oldb)
void PrintS(const char *s)
void Werror(const char *fmt,...)
#define TRACE_SHOW_LINENO
EXTERN_VAR int traceit_stop
void sdb(Voice *currentVoice, const char *currLine, int len)
#define omMarkAsStaticAddr(A)