spielwiese
Last change
on this file since 854405 was
854405,
checked in by Hans Schoenemann <hannes@…>, 11 years ago
|
chg: move feFopen to findexec dir.
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Line | |
---|
1 | /**************************************** |
---|
2 | * Computer Algebra System SINGULAR * |
---|
3 | ****************************************/ |
---|
4 | /* $Id$ */ |
---|
5 | /* |
---|
6 | * ABSTRACT: i/o system |
---|
7 | */ |
---|
8 | |
---|
9 | /* I need myfread in standalone_parser */ |
---|
10 | #ifndef STANDALONE_PARSER |
---|
11 | #include "config.h" |
---|
12 | #include <kernel/mod2.h> |
---|
13 | |
---|
14 | #include <stdlib.h> |
---|
15 | #include <stdio.h> |
---|
16 | #include <misc/mylimits.h> |
---|
17 | #include <stdarg.h> |
---|
18 | #include <sys/stat.h> |
---|
19 | #include <ctype.h> |
---|
20 | #include <unistd.h> |
---|
21 | |
---|
22 | #ifdef HAVE_PWD_H |
---|
23 | #include <pwd.h> |
---|
24 | #endif |
---|
25 | |
---|
26 | #include <kernel/febase.h> |
---|
27 | #include <omalloc/omalloc.h> |
---|
28 | #include <reporter/reporter.h> |
---|
29 | #include <misc/options.h> |
---|
30 | |
---|
31 | #define fePutChar(c) fputc((unsigned char)(c),stdout) |
---|
32 | /*0 implementation */ |
---|
33 | |
---|
34 | // char fe_promptstr[] =" "; |
---|
35 | |
---|
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 |
---|
41 | |
---|
42 | int si_echo = 0; |
---|
43 | int printlevel = 0; |
---|
44 | int colmax = 80; |
---|
45 | char prompt_char = '>'; /*1 either '>' or '.'*/ |
---|
46 | int yylineno = 0; |
---|
47 | int myynest = -1; |
---|
48 | int traceit = 0; |
---|
49 | char my_yylinebuf[80]; |
---|
50 | |
---|
51 | |
---|
52 | #if 0 |
---|
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 |
---|
69 | feProt = mode; |
---|
70 | } |
---|
71 | } |
---|
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 |
---|
87 | |
---|
88 | |
---|
89 | #else /* ! STANDALONE_PARSER */ |
---|
90 | #include <stdio.h> |
---|
91 | |
---|
92 | #endif |
---|
93 | |
---|
Note: See
TracBrowser
for help on using the repository browser.