Loading...
Searching...
No Matches
febase.cc
Go to the documentation of this file.
/****************************************
* Computer Algebra System SINGULAR *
****************************************/
/*
* ABSTRACT: i/o system
*/
#include "kernel/mod2.h"
/* I need myfread in standalone_parser */
#ifndef STANDALONE_PARSER
#include "omalloc/omalloc.h"
#include "reporter/reporter.h"
#include "misc/options.h"
//#include "Singular/febase.h"
#include "misc/mylimits.h"
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#define fePutChar(c) fputc((unsigned char)(c),stdout)
/*0 implementation */
// char fe_promptstr[] =" ";
// output/print buffer:
// line buffer for reading:
// minimal value for MAX_FILE_BUFFER: 4*4096 - see Tst/Long/gcd0_l.tst
// this is an upper limit for the size of monomials/numbers read via the interpreter
#define MAX_FILE_BUFFER 4*4096
VAR int si_echo = 0;
VAR int printlevel = 0;
VAR int colmax = 80;
VAR int pagelength = 24;
VAR char prompt_char = '>'; /*1 either '>' or '.'*/
VAR int yylineno = 0;
VAR int myynest = -1;
VAR int traceit = 0;
VAR int traceit_stop = 0;
VAR char my_yylinebuf[80];
#if 0
void monitor(char* s, int mode)
{
if (feProt)
{
fclose(feProtFile);
feProt = 0;
}
if ((s!=NULL) && (*s!='\0'))
{
feProtFile = myfopen(s,"w");
if (feProtFile==NULL)
{
Werror("cannot open %s",s);
feProt=0;
}
else
feProt = mode;
}
}
#else
void monitor(void *F, int mode)
{
if (feProt)
{
fclose(feProtFile);
feProt = 0;
}
if (F!=NULL)
{
feProtFile = (FILE *)F;
feProt = mode;
}
}
#endif
#endif
s
const CanonicalForm int s
Definition facAbsFact.cc:51
myfopen
FILE * myfopen(const char *path, const char *mode)
Definition feFopen.cc:167
printlevel
VAR int printlevel
Definition febase.cc:36
yylineno
VAR int yylineno
Definition febase.cc:40
my_yylinebuf
VAR char my_yylinebuf[80]
Definition febase.cc:44
si_echo
VAR int si_echo
Definition febase.cc:35
myynest
VAR int myynest
Definition febase.cc:41
monitor
void monitor(void *F, int mode)
Definition febase.cc:68
prompt_char
EXTERN_VAR char prompt_char
Definition feread.h:10
VAR
#define VAR
Definition globaldefs.h:5
mod2.h
mylimits.h
NULL
#define NULL
Definition omList.c:12
omalloc.h
options.h
feProt
VAR int feProt
Definition reporter.cc:56
feProtFile
VAR FILE * feProtFile
Definition reporter.cc:57
Werror
void Werror(const char *fmt,...)
Definition reporter.cc:189
reporter.h
pagelength
EXTERN_VAR int pagelength
Definition reporter.h:17
traceit
EXTERN_VAR int traceit
Definition reporter.h:24
traceit_stop
EXTERN_VAR int traceit_stop
Definition reporter.h:25
colmax
EXTERN_VAR int colmax
Definition reporter.h:17