#include <kernel/mod2.h>
#include <omalloc/omalloc.h>
#include <misc/options.h>
#include <kernel/oswrapper/feread.h>
#include <unistd.h>
#include <Singular/ipid.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/errno.h>
Go to the source code of this file.
|
static char * | fe_fgets_stdin_init (const char *pr, char *s, int size) |
|
char * | iiArithGetCmd (int) |
|
char * | command_generator (char *text, int state) |
|
char * | rl_filename_completion_function (const char *, int) |
|
char ** | rl_completion_matches (const char *, RL_PROC) |
|
char * | readline (const char *) |
|
void | add_history (char *) |
|
int | write_history () |
|
void | using_history () |
|
int | read_history (char *) |
|
int | history_total_bytes () |
|
char * | fe_fgets_stdin_rl (const char *pr, char *s, int size) |
|
int | fe_init_dyn_rl () |
|
char ** | singular_completion (char *text, int start, int end) |
|
char * | fe_fgets_stdin_fe (const char *pr, char *s, int size) |
|
char * | fe_fgets_stdin_emu (const char *pr, char *s, int size) |
|
char * | fe_fgets_stdin_drl (const char *pr, char *s, int size) |
|
char * | fe_fgets (const char *pr, char *s, int size) |
|
char * | fe_fgets_dummy (const char *, char *, int) |
|
#define rl_completion_matches completion_matches |
#define rl_filename_completion_function filename_completion_function |
typedef char** CPPFunction() |
typedef char** RL_CPPFunction(const char *, int, int) |
typedef char*(* RL_PROC) (const char *, int) |
void add_history |
( |
char * |
| ) |
|
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)
char* fe_fgets |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
Definition at line 310 of file feread.cc.
314 fprintf(stdout,
"%s",pr);
317 char *line=fgets(
s,
size,stdin);
319 for (
int i=strlen(line)-1;
i>=0;
i--) line[
i]=line[
i]&127;
const CanonicalForm int s
char* fe_fgets_dummy |
( |
const char * |
, |
|
|
char * |
, |
|
|
int |
|
|
) |
| |
char* fe_fgets_stdin_drl |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
Definition at line 270 of file feread.cc.
279 line = (*fe_readline) ((
char*)pr);
285 for (
int i=l-1;
i>=0;
i--) line[
i]=line[
i]&127;
289 (*fe_add_history) (line);
293 strncpy(
s,line,
size);
const CanonicalForm int s
char* fe_fgets_stdin_emu |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
Definition at line 254 of file feread.cc.
const CanonicalForm int s
char * fe_fgets_stdin_fe(const char *pr, char *s, int size)
char* fe_fgets_stdin_fe |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
static char * fe_fgets_stdin_init |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
|
static |
Definition at line 326 of file feread.cc.
328 #if (defined(HAVE_READLINE) || defined(HAVE_LIBREADLINE)) && !defined(HAVE_DYN_RL) && !defined(HAVE_FEREAD)
350 char *
p =
getenv(
"SINGULARHIST");
368 Warn(
"dynamic loading failed: %d\n",res);
383 (*fe_using_history)();
384 char *p =
getenv(
"SINGULARHIST");
387 (*fe_read_history) (
p);
404 #if !defined(HAVE_READLINE) && defined(HAVE_FEREAD)
const CanonicalForm int s
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
CPPFunction * rl_attempted_completion_function
char * fe_fgets(const char *pr, char *s, int size)
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 ** singular_completion(char *text, int start, int end)
CPPFunction ** fe_rl_attempted_completion_function
char * fe_fgets_stdin_drl(const char *pr, char *s, int size)
char ** fe_rl_readline_name
char* fe_fgets_stdin_rl |
( |
const char * |
pr, |
|
|
char * |
s, |
|
|
int |
size |
|
) |
| |
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
int history_total_bytes |
( |
| ) |
|
char* iiArithGetCmd |
( |
int |
| ) |
|
Definition at line 9027 of file iparith.cc.
9029 if(nPos<0)
return NULL;
int nCmdUsed
number of commands used
static SArithBase sArithBase
Base entry for arithmetic.
cmdnames * sCmds
array of existing commands
int read_history |
( |
char * |
| ) |
|
char* readline |
( |
const char * |
| ) |
|
char* rl_filename_completion_function |
( |
const char * |
, |
|
|
int |
|
|
) |
| |
char** singular_completion |
( |
char * |
text, |
|
|
int |
start, |
|
|
int |
end |
|
) |
| |
Definition at line 179 of file feread.cc.
185 #define x_rl_line_buffer (*fe_rl_line_buffer)
186 #define x_rl_completion_matches (*fe_completion_matches)
187 #define x_rl_filename_completion_function (*fe_filename_completion_function)
189 #define x_rl_line_buffer rl_line_buffer
190 #define x_rl_completion_matches rl_completion_matches
191 #define x_rl_filename_completion_function rl_filename_completion_function
196 #undef x_rl_line_buffer
197 #undef x_rl_completion_matches
200 m=(
char **)
malloc(2*
sizeof(
char*));
201 m[0]=(
char *)
malloc(end-start+2);
202 strncpy(m[0],text,end-start+1);
char * command_generator(char *text, int state)
#define x_rl_filename_completion_function
void * malloc(size_t size)
char *(* RL_PROC)(const char *, int)
#define x_rl_completion_matches
void(* fe_add_history) (char *) |
char**(* fe_completion_matches) (...) |
char*(* fe_filename_completion_function) () |
int(* fe_history_total_bytes) () |
int(* fe_read_history) (char *) |
char*(* fe_readline) (char *) |
char** fe_rl_readline_name |
void(* fe_using_history) () |
int(* fe_write_history) () |