source: git/Singular/febase.cc

spielwiese
Last change on this file was c5bae4, checked in by Hans Schoenemann <hannes@…>, 4 years ago
chg: TRACE, traceit: add traceit_stop ('n')
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/*
5* ABSTRACT: i/o system
6*/
7#include "kernel/mod2.h"
8
9/* I need myfread in standalone_parser */
10#ifndef STANDALONE_PARSER
11
12#include "omalloc/omalloc.h"
13#include "reporter/reporter.h"
14#include "misc/options.h"
15
16//#include "Singular/febase.h"
17
18#include "misc/mylimits.h"
19
20#ifdef HAVE_PWD_H
21#include <pwd.h>
22#endif
23
24#define fePutChar(c) fputc((unsigned char)(c),stdout)
25/*0 implementation */
26
27// char fe_promptstr[] ="  ";
28
29// output/print buffer:
30// line buffer for reading:
31// minimal value for MAX_FILE_BUFFER: 4*4096 - see Tst/Long/gcd0_l.tst
32// this is an upper limit for the size of monomials/numbers read via the interpreter
33#define MAX_FILE_BUFFER 4*4096
34
35VAR int     si_echo = 0;
36VAR int     printlevel = 0;
37VAR int     colmax = 80;
38VAR int     pagelength = 24;
39VAR char    prompt_char = '>'; /*1 either '>' or '.'*/
40VAR int     yylineno  = 0;
41VAR int  myynest = -1;
42VAR int  traceit = 0;
43VAR int  traceit_stop = 0;
44VAR char       my_yylinebuf[80];
45
46
47#if 0
48void monitor(char* s, int mode)
49{
50  if (feProt)
51  {
52    fclose(feProtFile);
53    feProt = 0;
54  }
55  if ((s!=NULL) && (*s!='\0'))
56  {
57    feProtFile = myfopen(s,"w");
58    if (feProtFile==NULL)
59    {
60      Werror("cannot open %s",s);
61      feProt=0;
62    }
63    else
64      feProt = mode;
65  }
66}
67#else
68void monitor(void *F, int mode)
69{
70  if (feProt)
71  {
72    fclose(feProtFile);
73    feProt = 0;
74  }
75  if (F!=NULL)
76  {
77    feProtFile = (FILE *)F;
78    feProt = mode;
79  }
80}
81#endif
82
83#endif
84
Note: See TracBrowser for help on using the repository browser.