Go to the source code of this file.
|
char * | fe_fgets_stdin_drl (const char *pr, char *s, int size) |
|
void | fe_reset_input_mode () |
|
void | fe_reset_fe (void) |
|
char * | fe_fgets_stdin_rl (const char *pr, char *s, int size) |
|
char * | fe_fgets_stdin_emu (const char *pr, char *s, int size) |
|
char * | fe_fgets (const char *pr, char *s, int size) |
|
char * | fe_fgets_dummy (const char *pr, char *s, int size) |
|
const char * | eati (const char *s, int *i) |
|
◆ SINGULARHIST_FILE
#define SINGULARHIST_FILE (char*)".singularhistory" |
◆ eati()
Definition at line 373 of file reporter.cc.
374{
376
377 if (*
s >=
'0' && *
s <=
'9')
378 {
380 while (*
s >=
'0' && *
s <=
'9')
381 {
386 {
388 Werror(
"`%s` greater than %d(max. integer representation)",
391 }
392 }
393 }
396}
const CanonicalForm int s
void Werror(const char *fmt,...)
◆ fe_fgets()
char * fe_fgets |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
Definition at line 309 of file feread.cc.
310{
312 {
313 fputs(pr,stdout);
314 }
316 errno=0;
317 char *line=fgets(
s,
size,stdin);
319 {
320 for (
int i=strlen(line)-1;
i>=0;
i--) line[
i]=line[
i]&127;
321 }
322 else
323 {
324
325 switch(errno)
326 {
328 case EBADF:
return NULL;
329 case EINTR:
return strcpy(
s,
"\n");
330 default:
331 {
332 int errsv = errno;
333 fprintf(stderr,"fgets() failed with errno %d\n%s\n",errsv,strerror(errsv));
335 }
336 }
337 }
338 return line;
339}
◆ fe_fgets_dummy()
char * fe_fgets_dummy |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
◆ fe_fgets_stdin_drl()
char * fe_fgets_stdin_drl |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
Definition at line 269 of file feread.cc.
270{
272 {
273 pr="";
274 }
276
277 char *line;
278 line = (*fe_readline) ((char*)pr);
279
282
284 for (
int i=
l-1;
i>=0;
i--) line[
i]=line[
i]&127;
285
286 if (*line!='\0')
287 {
288 (*fe_add_history) (line);
289 }
291 {
292 strncpy(
s,line,
size);
293 }
294 else
295 {
299 }
301
303}
◆ fe_fgets_stdin_emu()
char * fe_fgets_stdin_emu |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
Definition at line 253 of file feread.cc.
254{
256 {
257 pr="";
258 }
261}
char * fe_fgets_stdin_fe(const char *pr, char *s, int size)
◆ fe_fgets_stdin_rl()
char * fe_fgets_stdin_rl |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
◆ fe_reset_fe()
void fe_reset_fe |
( |
void |
| ) |
|
Definition at line 83 of file fereadl.c.
86{
88 {
91 {
94 }
96 {
98 {
100 }
103 }
105 {
107 }
108 }
109}
VAR struct termios fe_saved_attributes
VAR BOOLEAN fe_is_raw_tty
STATIC_VAR BOOLEAN fe_stdin_is_tty
STATIC_VAR BOOLEAN fe_stdout_is_tty
#define omFreeSize(addr, size)
◆ fe_reset_input_mode()
void fe_reset_input_mode |
( |
| ) |
|
Definition at line 831 of file fereadl.c.
832{
833#if defined(HAVE_DYN_RL)
834 char *
p =
getenv(
"SINGULARHIST");
837 {
839 (*fe_write_history) (
p);
840 }
841#elif defined(HAVE_READLINE) && !defined(HAVE_FEREAD) && !defined(HAVE_DYN_RL)
842 char *
p =
getenv(
"SINGULARHIST");
845 {
848 }
849#elif defined(HAVE_FEREAD)
850 #ifndef HAVE_ATEXIT
852 #else
854 #endif
855#endif
856}
VAR BOOLEAN using_history_called
int history_total_bytes()
#define SINGULARHIST_FILE
VAR int(* fe_history_total_bytes)()
◆ fe_fgets_stdin
char *(* fe_fgets_stdin) (const char *pr, char *s, int size) |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
◆ prompt_char
◆ using_history_called