source: git/Singular/febase.cc @ a9f049

fieker-DuValspielwiese
Last change on this file since a9f049 was a9f049, checked in by Hans Schoenemann <hannes@…>, 7 years ago
chg: non-intr. output of help browser "builtin" for pagelength<0
  • 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#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 <stdlib.h>
19#include <stdio.h>
20#include "misc/mylimits.h"
21#include <stdarg.h>
22#include <sys/stat.h>
23#include <ctype.h>
24#include <unistd.h>
25
26#ifdef HAVE_PWD_H
27#include <pwd.h>
28#endif
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;
44int     pagelength = 24;
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.