Synopsis
Create a repl with eval/print/error hooks with given stdin, stdout, and stderr streams
- Version
- 0.0.1
- Source
- jwerle/repl.h
- License
- MIT
API
buffer_append
buffer_clear
buffer_compact
buffer_equals
buffer_fill
buffer_free
buffer_indexof
buffer_length
buffer_new
buffer_new_with_copy
buffer_new_with_size
buffer_new_with_string
buffer_new_with_string_length
buffer_prepend
buffer_print
buffer_resize
buffer_size
buffer_slice
buffer_trim
buffer_trim_left
buffer_trim_right
default_error_cb
default_eval_cb
default_print_cb
handle_sigterm
repl_eval
repl_loop
repl_read
repl_session_destroy
repl_session_error
repl_session_new
repl_session_set_error
repl_session_start
term_background
term_color
term_color_from_name
term_erase
term_erase_from_name
term_move_by
term_move_to
term_size
buffer_clear
buffer_compact
buffer_equals
buffer_fill
buffer_free
buffer_indexof
buffer_length
buffer_new
buffer_new_with_copy
buffer_new_with_size
buffer_new_with_string
buffer_new_with_string_length
buffer_prepend
buffer_print
buffer_resize
buffer_size
buffer_slice
buffer_trim
buffer_trim_left
buffer_trim_right
default_error_cb
default_eval_cb
default_print_cb
handle_sigterm
repl_eval
repl_loop
repl_read
repl_session_destroy
repl_session_error
repl_session_new
repl_session_set_error
repl_session_start
term_background
term_color
term_color_from_name
term_erase
term_erase_from_name
term_move_by
term_move_to
term_size
Details
- buffer_t
- repl_read_data
- repl_session
- repl_session_opts
- buffer_append ()
-
int buffer_append (buffer_t self, char * str);
- buffer_clear ()
-
void buffer_clear (buffer_t self);
- buffer_compact ()
-
ssize_t buffer_compact (buffer_t self);
- buffer_fill ()
-
void buffer_fill (buffer_t self, int c);
- buffer_free ()
-
void buffer_free (buffer_t self);
- buffer_indexof ()
-
ssize_t buffer_indexof (buffer_t self, char * str);
- buffer_length ()
-
size_t buffer_length (buffer_t self);
- buffer_new ()
-
buffer_t buffer_new ();
- buffer_new_with_copy ()
-
buffer_t buffer_new_with_copy(char * str);
- buffer_new_with_size ()
-
buffer_t buffer_new_with_size(size_t n);
- buffer_new_with_string ()
-
buffer_t buffer_new_with_string(char * str);
- buffer_new_with_string_length ()
-
buffer_t buffer_new_with_string_length(char * str, size_t len);
- buffer_prepend ()
-
int buffer_prepend (buffer_t self, char * str);
- buffer_print ()
-
void buffer_print (buffer_t self);
- buffer_resize ()
-
int buffer_resize (buffer_t self, size_t n);
- buffer_size ()
-
size_t buffer_size (buffer_t self);
- buffer_trim ()
-
void buffer_trim (buffer_t self);
- buffer_trim_left ()
-
void buffer_trim_left (buffer_t self);
- buffer_trim_right ()
-
void buffer_trim_right (buffer_t self);
- default_error_cb ()
-
void default_error_cb (repl_session_t sess, char * error);
- default_eval_cb ()
-
char * default_eval_cb (repl_session_t sess, char * cmd);
- default_print_cb ()
-
void default_print_cb (repl_session_t sess, char * cmd);
- handle_sigterm ()
-
void handle_sigterm (int param);
- repl_eval ()
-
int repl_eval (struct sess);
- repl_loop ()
-
void repl_loop (struct sess);
- repl_read ()
-
int repl_read (struct sess);
- repl_session_destroy ()
-
void repl_session_destroy(repl_session_t session);
- repl_session_error ()
-
char * repl_session_error ();
- repl_session_new ()
-
repl_session_t repl_session_new (repl_session_opts opts);
- repl_session_set_error ()
-
char * repl_session_set_error(char * err);
- repl_session_start ()
-
int repl_session_start (repl_session_t session);
- term_background ()
-
int term_background (const char * name);
- term_color ()
-
int term_color (const char * name);
- term_color_from_name ()
-
int term_color_from_name(const char * name);
- term_erase ()
-
int term_erase (const char * name);
- term_erase_from_name ()
-
const char * term_erase_from_name(const char * name);
- term_move_by ()
-
void term_move_by (int x, int y);
- term_move_to ()
-
void term_move_to (int x, int y);
- term_size ()
-
int term_size (int * width, int * height);