/**************************************** * Computer Algebra System SINGULAR * ****************************************/ /* $Id: febase.cc,v 1.23 1997-11-18 16:30:52 Singular Exp $ */ /* * ABSTRACT: i/o system */ #include #include #include #include #include #ifndef macintosh #include #endif #ifdef NeXT #include #endif #include "mod2.h" #include "tok.h" #include "febase.h" #include "mmemory.h" #include "subexpr.h" #include "ipshell.h" #define fePutChar(c) fputc((uchar)(c),stdout) /*0 implementation */ char fe_promptstr[] #ifdef macintosh =" \n"; #else =" "; #endif #define INITIAL_PRINT_BUFFER 24*1024 static int feBufferLength=INITIAL_PRINT_BUFFER; static char * feBuffer=(char *)Alloc(INITIAL_PRINT_BUFFER); int si_echo = 0; int printlevel = 0; #ifndef macintosh int pagelength = 24; #else int pagelength = -1; #endif int colmax = 80; char prompt_char = '>'; /*1 either '>' or '.'*/ BITSET verbose = 1 | Sy_bit(V_REDEFINE) | Sy_bit(V_LOAD_LIB) | Sy_bit(V_SHOW_USE) | Sy_bit(V_PROMPT) // | Sy_bit(V_DEBUG_MEM) ; BOOLEAN errorreported = FALSE; BOOLEAN feBatch; char * feErrors=NULL; int feErrorsLen=0; BOOLEAN feProt = FALSE; FILE* feProtFile; BOOLEAN tclmode=FALSE; /* TCL-Protocoll (Singular -x): :: \n * E:l:s error - not implemented yet (use N) * W:l:s warning * N:l:s stdout * Q:0: quit * P:0: prompt > * P:1: prompt . * R:l: ring change * plan: * O:l: