source:
git/Singular/febase.cc
@
cbf866
Last change on this file since cbf866 was c5bae4, checked in by , 4 years ago | |
---|---|
|
|
File size: 1.5 KB |
Rev | Line | |
---|---|---|
[35aab3] | 1 | /**************************************** |
2 | * Computer Algebra System SINGULAR * | |
3 | ****************************************/ | |
4 | /* | |
5 | * ABSTRACT: i/o system | |
6 | */ | |
[fb1675] | 7 | #include "kernel/mod2.h" |
[35aab3] | 8 | |
9 | /* I need myfread in standalone_parser */ | |
10 | #ifndef STANDALONE_PARSER | |
[9f7665] | 11 | |
[fb1675] | 12 | #include "omalloc/omalloc.h" |
13 | #include "reporter/reporter.h" | |
14 | #include "misc/options.h" | |
[35aab3] | 15 | |
[fb1675] | 16 | //#include "Singular/febase.h" |
[4676d5] | 17 | |
[fb1675] | 18 | #include "misc/mylimits.h" |
[35aab3] | 19 | |
20 | #ifdef HAVE_PWD_H | |
[599326] | 21 | #include <pwd.h> |
[35aab3] | 22 | #endif |
23 | ||
[b07ba77] | 24 | #define fePutChar(c) fputc((unsigned char)(c),stdout) |
[35aab3] | 25 | /*0 implementation */ |
26 | ||
[d7c1c8] | 27 | // char fe_promptstr[] =" "; |
[35aab3] | 28 | |
[1d77df] | 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 | |
[35aab3] | 34 | |
[a3f0fea] | 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; | |
[c5bae4] | 43 | VAR int traceit_stop = 0; |
[a3f0fea] | 44 | VAR char my_yylinebuf[80]; |
[35aab3] | 45 | |
46 | ||
[9539de6] | 47 | #if 0 |
[35aab3] | 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 | |
[73a932e] | 64 | feProt = mode; |
[35aab3] | 65 | } |
66 | } | |
[9539de6] | 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 | |
[35aab3] | 82 | |
83 | #endif | |
84 |
Note: See TracBrowser
for help on using the repository browser.