My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
Singular
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
VAR
int
si_echo
= 0;
36
VAR
int
printlevel
= 0;
37
VAR
int
colmax
= 80;
38
VAR
int
pagelength
= 24;
39
VAR
char
prompt_char
=
'>'
;
/*1 either '>' or '.'*/
40
VAR
int
yylineno
= 0;
41
VAR
int
myynest
= -1;
42
VAR
int
traceit
= 0;
43
VAR
int
traceit_stop
= 0;
44
VAR
char
my_yylinebuf
[80];
45
46
47
#if 0
48
void
monitor
(
char
*
s
,
int
mode)
49
{
50
if
(
feProt
)
51
{
52
fclose(
feProtFile
);
53
feProt
= 0;
54
}
55
if
((
s
!=
NULL
) && (*
s
!=
'\0'
))
56
{
57
feProtFile
=
myfopen
(
s
,
"w"
);
58
if
(
feProtFile
==
NULL
)
59
{
60
Werror
(
"cannot open %s"
,
s
);
61
feProt
=0;
62
}
63
else
64
feProt
= mode;
65
}
66
}
67
#else
68
void
monitor
(
void
*F,
int
mode)
69
{
70
if
(
feProt
)
71
{
72
fclose(
feProtFile
);
73
feProt
= 0;
74
}
75
if
(F!=
NULL
)
76
{
77
feProtFile
= (FILE *)F;
78
feProt
= mode;
79
}
80
}
81
#endif
82
83
#endif
84
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
Generated on
for My Project by
doxygen 1.17.0
for
Singular