source: git/kernel/febase.cc @ 0de0509

fieker-DuValspielwiese
Last change on this file since 0de0509 was a9c298, checked in by Hans Schoenemann <hannes@…>, 11 years ago
format stuff
  • Property mode set to 100644
File size: 1.7 KB
Line 
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
10#ifdef HAVE_CONFIG_H
11#include "singularconfig.h"
12#endif /* HAVE_CONFIG_H */
13#include <kernel/mod2.h>
14
15#include <stdlib.h>
16#include <stdio.h>
17#include <misc/mylimits.h>
18#include <stdarg.h>
19#include <sys/stat.h>
20#include <ctype.h>
21#include <unistd.h>
22
23#ifdef HAVE_PWD_H
24#include <pwd.h>
25#endif
26
27#include <kernel/febase.h>
28#include <omalloc/omalloc.h>
29#include <reporter/reporter.h>
30#include <misc/options.h>
31
32#define fePutChar(c) fputc((unsigned char)(c),stdout)
33/*0 implementation */
34
35// char fe_promptstr[] ="  ";
36
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
42
43int     si_echo = 0;
44int     printlevel = 0;
45int     colmax = 80;
46char    prompt_char = '>'; /*1 either '>' or '.'*/
47int     yylineno  = 0;
48int  myynest = -1;
49int  traceit = 0;
50char       my_yylinebuf[80];
51
52
53#if 0
54void 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
70      feProt = mode;
71  }
72}
73#else
74void 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
88
89
90#else /* ! STANDALONE_PARSER */
91#include <stdio.h>
92
93#endif
94
Note: See TracBrowser for help on using the repository browser.