source: git/kernel/febase.cc @ e585b6

spielwiese
Last change on this file since e585b6 was 88ece17, checked in by Hans Schoenemann <hannes@…>, 13 years ago
kernel: make check works (moved febase stuff to Singular/fevoices.cc, to reporter.cc etc.
  • Property mode set to 100644
File size: 1.7 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 <kernel/mod2.h>
12
13#include <stdlib.h>
14#include <stdio.h>
15#include <omalloc/mylimits.h>
16#include <stdarg.h>
17#include <sys/stat.h>
18#include <ctype.h>
19#include <unistd.h>
20
21#ifdef HAVE_PWD_H
22#include <pwd.h>
23#endif
24
25#include <kernel/febase.h>
26#include <omalloc/omalloc.h>
27#include <reporter/reporter.h>
28#include <resources/feFopen.h>
29#include <misc/options.h>
30
31#define fePutChar(c) fputc((unsigned char)(c),stdout)
32/*0 implementation */
33
34char 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
42int     si_echo = 0;
43int     printlevel = 0;
44int     colmax = 80;
45char    prompt_char = '>'; /*1 either '>' or '.'*/
46int     yylineno  = 0;
47int  myynest = -1; 
48int  traceit = 0;
49char       my_yylinebuf[80];
50
51
52#if 0
53void 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
73void 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.