#include <kernel/mod2.h>
#include <omalloc/omalloc.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
#include <string.h>
#include <kernel/mod_raw.h>
Go to the source code of this file.
|
void | fe_reset_fe (void) |
|
void | fe_temp_reset (void) |
|
void | fe_temp_set (void) |
|
static int | fe_out_char (int c) |
|
void | fe_init (void) |
|
static void | fe_ctrl_k (char *s, int i) |
|
static void | fe_ctrl_u (char *s, int *i) |
|
static void | fe_add_hist (char *s) |
|
static void | fe_get_hist (char *s, int size, int *pos, int change, int incr) |
|
static int | fe_getchar () |
|
static void | fe_set_cursor (char *s, int i) |
|
char * | fe_fgets_stdin_fe (char *pr, char *s, int size) |
|
char * | command_generator (char *text, int state) |
|
char ** | singular_completion (char *text, int start, int end) |
|
int | fe_init_dyn_rl () |
|
void | fe_reset_input_mode () |
|
#define feCTRL |
( |
|
C | ) |
((C) & 0x1F) /* <ctrl> character */ |
typedef char** CPPFunction() |
char* command_generator |
( |
char * |
text, |
|
|
int |
state |
|
) |
| |
Definition at line 53 of file feread.cc.
55 static int list_index, len;
74 if (strncmp (name, text, len) == 0)
83 if (strncmp (name, text, len) == 0)
88 return ((
char *)
NULL);
char * iiArithGetCmd(int)
char name(const Variable &v)
static void fe_add_hist |
( |
char * |
s | ) |
|
|
static |
Definition at line 270 of file fereadl.c.
const CanonicalForm int s
void omMarkAsStaticAddr(void *addr)
static void fe_ctrl_k |
( |
char * |
s, |
|
|
int |
i |
|
) |
| |
|
static |
Definition at line 238 of file fereadl.c.
const CanonicalForm int s
static void fe_ctrl_u |
( |
char * |
s, |
|
|
int * |
i |
|
) |
| |
|
static |
Definition at line 254 of file fereadl.c.
const CanonicalForm int s
static void fe_ctrl_k(char *s, int i)
char* fe_fgets_stdin_fe |
( |
char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
Definition at line 375 of file fereadl.c.
422 (
int *)fdset.fds_bits,
427 }
while( (sel == -1) && (errno == EINTR) );
453 if ((i==0) &&(
s[0]==
'\0'))
return NULL;
485 while (i>=
colmax-strlen(pr))
583 memset(&(
s[i]),
'\0',
size-i);
629 if ((c>=
' ')&&(c<=126))
644 while ((
s[j]!=
'\0')&&(j<
size-2)) j++;
646 while (j>i) {
s[
j]=
s[j-1]; j--; }
680 return fgets(
s,
size,stdin);
const CanonicalForm int s
static void fe_ctrl_k(char *s, int i)
static void fe_add_hist(char *s)
static void fe_ctrl_u(char *s, int *i)
static int fe_out_char(int c)
static BOOLEAN fe_stdin_is_tty
static void fe_get_hist(char *s, int size, int *pos, int change, int incr)
static BOOLEAN fe_is_initialized
void select(const ListCFList &ppi, int length, ListCFList &ppi1, ListCFList &ppi2)
void PrintS(const char *s)
static void fe_set_cursor(char *s, int i)
static void fe_get_hist |
( |
char * |
s, |
|
|
int |
size, |
|
|
int * |
pos, |
|
|
int |
change, |
|
|
int |
incr |
|
) |
| |
|
static |
Definition at line 302 of file fereadl.c.
const CanonicalForm int s
static void fe_add_hist(char *s)
static int fe_getchar |
( |
| ) |
|
|
static |
Definition at line 143 of file fereadl.c.
160 fe_echo = fopen( ttyname(fileno(stdin)),
"w" );
164 struct termios tattr;
176 tattr.c_lflag &= ~(ICANON|
ECHO);
177 tattr.c_cc[VMIN] = 1;
178 tattr.c_cc[VTIME] = 0;
184 printf(
"need TERM\n");
188 printf(
"could not access termcap data base\n");
198 char *t_buf=(
char *)
omAlloc(128);
201 char** t_buf_ptr= &t_buf;
203 temp = tgetstr (
"pc", t_buf_ptr);
204 PC = (temp!=
NULL) ? *temp :
'\0';
205 BC=tgetstr(
"le",t_buf_ptr);
206 UP=tgetstr(
"up",t_buf_ptr);
214 temp = tgetstr (
"ti", t_buf_ptr);
static int fe_out_char(int c)
static BOOLEAN fe_stdin_is_tty
static BOOLEAN fe_stdout_is_tty
static BOOLEAN fe_is_initialized
static char termcap_buff[2048]
struct termios fe_saved_attributes
void omMarkAsStaticAddr(void *addr)
Definition at line 756 of file fereadl.c.
804 (*fe_rl_readline_name) =
"Singular";
808 (*fe_using_history)();
809 p =
getenv(
"SINGULARHIST");
812 (*fe_read_history) (
p);
char *(* fe_filename_completion_function)()
char ** singular_completion(char *text, int start, int end)
char ** fe_rl_line_buffer
void * dynl_sym(void *handle, const char *symbol)
char **(* fe_completion_matches)()
void * dynl_open(char *filename)
void(* fe_using_history)()
char ** fe_rl_readline_name
int(* fe_history_total_bytes)()
int dynl_close(void *handle)
int(* fe_write_history)()
CPPFunction ** fe_rl_attempted_completion_function
static int fe_out_char |
( |
int |
c | ) |
|
|
static |
void fe_reset_fe |
( |
void |
| ) |
|
Definition at line 86 of file fereadl.c.
static BOOLEAN fe_stdin_is_tty
#define omFreeSize(addr, size)
static BOOLEAN fe_stdout_is_tty
struct termios fe_saved_attributes
void fe_reset_input_mode |
( |
| ) |
|
Definition at line 826 of file fereadl.c.
828 #if defined(HAVE_DYN_RL)
829 char *
p =
getenv(
"SINGULARHIST");
833 (*fe_write_history) (
p);
836 #if defined(HAVE_READLINE) && !defined(HAVE_FEREAD) && !defined(HAVE_DYN_RL)
837 char *p =
getenv(
"SINGULARHIST");
844 #if defined(HAVE_FEREAD)
int history_total_bytes()
int(* fe_history_total_bytes)()
static void fe_set_cursor |
( |
char * |
s, |
|
|
int |
i |
|
) |
| |
|
static |
Definition at line 354 of file fereadl.c.
const CanonicalForm int s
static int fe_out_char(int c)
void fe_temp_reset |
( |
void |
| ) |
|
Definition at line 113 of file fereadl.c.
struct termios fe_saved_attributes
void fe_temp_set |
( |
void |
| ) |
|
Definition at line 121 of file fereadl.c.
125 struct termios tattr;
129 tattr.c_lflag &= ~(ICANON|
ECHO);
130 tattr.c_cc[VMIN] = 1;
131 tattr.c_cc[VTIME] = 0;
char** singular_completion |
( |
char * |
text, |
|
|
int |
start, |
|
|
int |
end |
|
) |
| |
Definition at line 736 of file fereadl.c.
747 m=(
char **)
malloc(2*
sizeof(
char*));
748 m[0]=(
char *)
malloc(end-start+2);
749 strncpy(m[0],text,end-start+1);
char *(* fe_filename_completion_function)()
char ** fe_rl_line_buffer
char **(* fe_completion_matches)()
void * malloc(size_t size)
char * command_generator(char *text, int state)
void(* fe_add_history) () |
char**(* fe_completion_matches) () |
char*(* fe_filename_completion_function) () |
int(* fe_history_total_bytes) () |
int(* fe_read_history) () |
char** fe_rl_readline_name |
struct termios fe_saved_attributes |
void(* fe_using_history) () |
int(* fe_write_history) () |