My Project  debian-1:4.1.1-p2+ds-4build2
febase.cc
Go to the documentation of this file.
1 /****************************************
2 * Computer Algebra System SINGULAR *
3 ****************************************/
4 /*
5 * ABSTRACT: i/o system
6 */
7 #include "kernel/mod2.h"
8 
9 /* I need myfread in standalone_parser */
10 #ifndef STANDALONE_PARSER
11 
12 #include "omalloc/omalloc.h"
13 #include "reporter/reporter.h"
14 #include "misc/options.h"
15 
16 //#include "Singular/febase.h"
17 
18 #include "misc/mylimits.h"
19 
20 #ifdef HAVE_PWD_H
21 #include <pwd.h>
22 #endif
23 
24 #define fePutChar(c) fputc((unsigned char)(c),stdout)
25 /*0 implementation */
26 
27 // char fe_promptstr[] =" ";
28 
29 // output/print buffer:
30 // line buffer for reading:
31 // minimal value for MAX_FILE_BUFFER: 4*4096 - see Tst/Long/gcd0_l.tst
32 // this is an upper limit for the size of monomials/numbers read via the interpreter
33 #define MAX_FILE_BUFFER 4*4096
34 
35 int si_echo = 0;
36 int printlevel = 0;
37 int colmax = 80;
38 int pagelength = 24;
39 char prompt_char = '>'; /*1 either '>' or '.'*/
40 int yylineno = 0;
41 int myynest = -1;
42 int traceit = 0;
43 char my_yylinebuf[80];
44 
45 
46 #if 0
47 void monitor(char* s, int mode)
48 {
49  if (feProt)
50  {
51  fclose(feProtFile);
52  feProt = 0;
53  }
54  if ((s!=NULL) && (*s!='\0'))
55  {
56  feProtFile = myfopen(s,"w");
57  if (feProtFile==NULL)
58  {
59  Werror("cannot open %s",s);
60  feProt=0;
61  }
62  else
63  feProt = mode;
64  }
65 }
66 #else
67 void monitor(void *F, int mode)
68 {
69  if (feProt)
70  {
71  fclose(feProtFile);
72  feProt = 0;
73  }
74  if (F!=NULL)
75  {
76  feProtFile = (FILE *)F;
77  feProt = mode;
78  }
79 }
80 #endif
81 
82 #endif
83 
feProtFile
FILE * feProtFile
Definition: reporter.cc:57
omalloc.h
si_echo
int si_echo
Definition: febase.cc:35
yylineno
int yylineno
Definition: febase.cc:40
options.h
reporter.h
prompt_char
char prompt_char
Definition: febase.cc:39
monitor
void monitor(void *F, int mode)
Definition: febase.cc:67
mod2.h
colmax
int colmax
Definition: febase.cc:37
myynest
int myynest
Definition: febase.cc:41
my_yylinebuf
char my_yylinebuf[80]
Definition: febase.cc:43
traceit
int traceit
Definition: febase.cc:42
myfopen
FILE * myfopen(const char *path, const char *mode)
Definition: feFopen.cc:167
mylimits.h
Werror
void Werror(const char *fmt,...)
Definition: reporter.cc:189
NULL
#define NULL
Definition: omList.c:10
pagelength
int pagelength
Definition: febase.cc:38
s
const CanonicalForm int s
Definition: facAbsFact.cc:55
feProt
int feProt
Definition: reporter.cc:56
printlevel
int printlevel
Definition: febase.cc:36