/usr/include/singular/singular/Singular/fevoices.h is in libsingular4-dev-common 4.0.3+ds-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | #ifndef FEVOICES_H
#define FEVOICES_H
/****************************************
* * Computer Algebra System SINGULAR *
* ****************************************/
/*
* * ABSTRACT: class Voice
* */
#include <reporter/reporter.h>
#include <resources/feResource.h>
#include <kernel/structs.h>
enum feBufferTypes
{
BT_none = 0, // entry level
BT_break = 1, // while, for
BT_proc, // proc
BT_example, // example
BT_file, // <"file"
BT_execute, // execute
BT_if, // if
BT_else // else
};
enum feBufferInputs
{
BI_stdin = 1,
BI_buffer,
BI_file
};
enum noeof_t
{
noeof_brace = 1,
noeof_asstring,
noeof_block,
noeof_bracket,
noeof_comment,
noeof_procname,
noeof_string
}; /* for scanner.l */
extern int yylineno;
extern char my_yylinebuf[80];
#ifdef __cplusplus
/* the C++-part: */
// LANG_TOP : Toplevel package only
// LANG_SINGULAR:
// LANG_C :
//
class Voice
{
public:
Voice * next;
Voice * prev;
char * filename; // file name or proc name
procinfo * pi; // proc info
void * oldb; // internal scanner buffer
// for files only:
FILE * files; // file handle
// for buffers only:
char * buffer; // buffer pointer
long fptr; // current position in buffer
int start_lineno; // lineno, to restore in recursion
int curr_lineno; // current lineno
feBufferInputs sw; // BI_stdin: read from STDIN
// BI_buffer: buffer
// BI_file: files
char ifsw; // if-switch:
/*1 ifsw==0: no if statement, else is invalid
* ==1: if (0) processed, execute else
* ==2: if (1) processed, else allowed but not executed
*/
feBufferTypes typ; // buffer type: see BT_..
Voice() { memset(this,0,sizeof(*this));}
feBufferTypes Typ();
void Next();
} ;
extern Voice *currentVoice;
Voice * feInitStdin(Voice *pp);
const char * VoiceName();
void VoiceBackTrack();
BOOLEAN contBuffer(feBufferTypes typ);
BOOLEAN exitBuffer(feBufferTypes typ);
BOOLEAN exitVoice();
void monitor(void *F, int mode); /* FILE*, int */
BOOLEAN newFile(char* fname, FILE *f=NULL);
void newBuffer(char* s, feBufferTypes t, procinfo *pname = NULL, int start_lineno = 0);
void * myynewbuffer();
void myyoldbuffer(void * oldb);
#endif
#endif
|