source:
git/kernel/febase.cc
@
fbc7cb
Last change on this file since fbc7cb was a9c298, checked in by , 9 years ago | |
---|---|
|
|
File size: 1.7 KB |
Rev | Line | |
---|---|---|
[35aab3] | 1 | /**************************************** |
2 | * Computer Algebra System SINGULAR * | |
3 | ****************************************/ | |
4 | /* | |
5 | * ABSTRACT: i/o system | |
6 | */ | |
7 | ||
8 | /* I need myfread in standalone_parser */ | |
9 | #ifndef STANDALONE_PARSER | |
[16f511] | 10 | #ifdef HAVE_CONFIG_H |
[ba5e9e] | 11 | #include "singularconfig.h" |
[16f511] | 12 | #endif /* HAVE_CONFIG_H */ |
[599326] | 13 | #include <kernel/mod2.h> |
[35aab3] | 14 | |
15 | #include <stdlib.h> | |
16 | #include <stdio.h> | |
[e7d5ef] | 17 | #include <misc/mylimits.h> |
[35aab3] | 18 | #include <stdarg.h> |
19 | #include <sys/stat.h> | |
20 | #include <ctype.h> | |
21 | #include <unistd.h> | |
22 | ||
23 | #ifdef HAVE_PWD_H | |
[599326] | 24 | #include <pwd.h> |
[35aab3] | 25 | #endif |
26 | ||
[599326] | 27 | #include <kernel/febase.h> |
[b1dfaf] | 28 | #include <omalloc/omalloc.h> |
[0f401f] | 29 | #include <reporter/reporter.h> |
30 | #include <misc/options.h> | |
[35aab3] | 31 | |
[b07ba77] | 32 | #define fePutChar(c) fputc((unsigned char)(c),stdout) |
[35aab3] | 33 | /*0 implementation */ |
34 | ||
[d7c1c8] | 35 | // char fe_promptstr[] =" "; |
[35aab3] | 36 | |
[1d77df] | 37 | // output/print buffer: |
38 | // line buffer for reading: | |
39 | // minimal value for MAX_FILE_BUFFER: 4*4096 - see Tst/Long/gcd0_l.tst | |
40 | // this is an upper limit for the size of monomials/numbers read via the interpreter | |
41 | #define MAX_FILE_BUFFER 4*4096 | |
[35aab3] | 42 | |
43 | int si_echo = 0; | |
44 | int printlevel = 0; | |
45 | int colmax = 80; | |
46 | char prompt_char = '>'; /*1 either '>' or '.'*/ | |
[88ece17] | 47 | int yylineno = 0; |
[a9c298] | 48 | int myynest = -1; |
[88ece17] | 49 | int traceit = 0; |
50 | char my_yylinebuf[80]; | |
[35aab3] | 51 | |
52 | ||
[9539de6] | 53 | #if 0 |
[35aab3] | 54 | void monitor(char* s, int mode) |
55 | { | |
56 | if (feProt) | |
57 | { | |
58 | fclose(feProtFile); | |
59 | feProt = 0; | |
60 | } | |
61 | if ((s!=NULL) && (*s!='\0')) | |
62 | { | |
63 | feProtFile = myfopen(s,"w"); | |
64 | if (feProtFile==NULL) | |
65 | { | |
66 | Werror("cannot open %s",s); | |
67 | feProt=0; | |
68 | } | |
69 | else | |
[73a932e] | 70 | feProt = mode; |
[35aab3] | 71 | } |
72 | } | |
[9539de6] | 73 | #else |
74 | void monitor(void *F, int mode) | |
75 | { | |
76 | if (feProt) | |
77 | { | |
78 | fclose(feProtFile); | |
79 | feProt = 0; | |
80 | } | |
81 | if (F!=NULL) | |
82 | { | |
83 | feProtFile = (FILE *)F; | |
84 | feProt = mode; | |
85 | } | |
86 | } | |
87 | #endif | |
[35aab3] | 88 | |
89 | ||
90 | #else /* ! STANDALONE_PARSER */ | |
91 | #include <stdio.h> | |
92 | ||
93 | #endif | |
94 |
Note: See TracBrowser
for help on using the repository browser.