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