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) |
|
◆ 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 306 of file feread.cc.
307{
309 {
310 fputs(pr,stdout);
311 }
313 errno=0;
314 char *line=fgets(
s,
size,stdin);
316 {
317 for (
int i=strlen(line)-1;
i>=0;
i--) line[
i]=line[
i]&127;
318 }
319 else
320 {
321
322 switch(errno)
323 {
325 case EBADF:
return NULL;
326 case EINTR:
return strcpy(
s,
"\n");
327 default:
328 {
329 int errsv = errno;
330 fprintf(stderr,"fgets() failed with errno %d\n%s\n",errsv,strerror(errsv));
332 }
333 }
334 }
335 return line;
336}
◆ 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 266 of file feread.cc.
267{
269 {
270 pr="";
271 }
273
274 char *line;
275 line = (*fe_readline) ((char*)pr);
276
279
281 for (
int i=
l-1;
i>=0;
i--) line[
i]=line[
i]&127;
282
283 if (*line!='\0')
284 {
285 (*fe_add_history) (line);
286 }
288 {
289 strncpy(
s,line,
size);
290 }
291 else
292 {
296 }
298
300}
◆ fe_fgets_stdin_emu()
char * fe_fgets_stdin_emu |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
Definition at line 250 of file feread.cc.
251{
253 {
254 pr="";
255 }
258}
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 82 of file fereadl.c.
85{
87 {
90 {
93 }
95 {
97 {
99 }
102 }
104 {
106 }
107 }
108}
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 827 of file fereadl.c.
828{
829#if defined(HAVE_DYN_RL)
830 char *
p =
getenv(
"SINGULARHIST");
832 {
834 (*fe_write_history) (
p);
835 }
836#endif
837#if defined(HAVE_READLINE) && !defined(HAVE_FEREAD) && !defined(HAVE_DYN_RL)
838 char *
p =
getenv(
"SINGULARHIST");
840 {
843 }
844#endif
845#if defined(HAVE_FEREAD)
846 #ifndef HAVE_ATEXIT
848 #else
850 #endif
851#endif
852}
int history_total_bytes()
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