1 #ifndef FEREAD_H
2 #define FEREAD_H
3 /****************************************
4  * *  Computer Algebra System SINGULAR     *
5  * ****************************************/
6 /*
7  * ABSTRACT: terminal input
8  */
9 
10 #include "kernel/structs.h"
11 
12 EXTERN_VAR char    prompt_char; /*1 either '>' or '.'*/
13 
14 #ifdef __cplusplus
15 
16 /* the interface for reading: */
17 extern "C"  char * (*fe_fgets_stdin)(const char *pr,char *s, int size);
18 
19 #ifdef HAVE_DYN_RL
20 char * fe_fgets_stdin_drl(const char *pr,char *s, int size);
21 #endif
22 
23 extern "C" void fe_reset_input_mode();
24 
25 extern "C" {
26 #ifndef HAVE_ATEXIT
27 void fe_reset_fe (int i, void *v);
28 #else
29 void fe_reset_fe (void);
30 #endif
31 }
32 
33 /* possible implementations: */
34 extern "C"
35 {
36   /* readline, linked in: */
37   char * fe_fgets_stdin_rl(const char *pr,char *s, int size);
38 
39   /* emulated readline: */
40   char * fe_fgets_stdin_emu(const char *pr,char *s, int size);
41 
42   /* fgets: */
43   char * fe_fgets(const char *pr,char *s, int size);
44 
45   /* dummy (for batch mode): */
46   char * fe_fgets_dummy(const char *pr,char *s, int size);
47 
48 }
49 const char *  eati(const char *s, int *i);
50 
51 #endif
52 #endif
53 
54