source: git/kernel/febase.cc @ e4e36c

spielwiese
Last change on this file since e4e36c was 6ce030f, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
removal of the $Id$ svn tag from everywhere NOTE: the git SHA1 may be used instead (only on special places) NOTE: the libraries Singular/LIB/*.lib still contain the marker due to our current use of svn
  • Property mode set to 100644
File size: 1.6 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#include "config.h"
11#include <kernel/mod2.h>
12
13#include <stdlib.h>
14#include <stdio.h>
15#include <misc/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 <misc/options.h>
29
30#define fePutChar(c) fputc((unsigned char)(c),stdout)
31/*0 implementation */
32
33// char fe_promptstr[] ="  ";
34
35// output/print buffer:
36// line buffer for reading:
37// minimal value for MAX_FILE_BUFFER: 4*4096 - see Tst/Long/gcd0_l.tst
38// this is an upper limit for the size of monomials/numbers read via the interpreter
39#define MAX_FILE_BUFFER 4*4096
40
41int     si_echo = 0;
42int     printlevel = 0;
43int     colmax = 80;
44char    prompt_char = '>'; /*1 either '>' or '.'*/
45int     yylineno  = 0;
46int  myynest = -1; 
47int  traceit = 0;
48char       my_yylinebuf[80];
49
50
51#if 0
52void monitor(char* s, int mode)
53{
54  if (feProt)
55  {
56    fclose(feProtFile);
57    feProt = 0;
58  }
59  if ((s!=NULL) && (*s!='\0'))
60  {
61    feProtFile = myfopen(s,"w");
62    if (feProtFile==NULL)
63    {
64      Werror("cannot open %s",s);
65      feProt=0;
66    }
67    else
68      feProt = mode;
69  }
70}
71#else
72void monitor(void *F, int mode)
73{
74  if (feProt)
75  {
76    fclose(feProtFile);
77    feProt = 0;
78  }
79  if (F!=NULL)
80  {
81    feProtFile = (FILE *)F;
82    feProt = mode;
83  }
84}
85#endif
86
87
88#else /* ! STANDALONE_PARSER */
89#include <stdio.h>
90
91#endif
92
Note: See TracBrowser for help on using the repository browser.