Typedefs | |
typedef _tinyrl | tinyrl_t |
typedef char * | tinyrl_compentry_func_t (tinyrl_t *instance, const char *text, unsigned offset, unsigned state) |
typedef int | tinyrl_hook_func_t (tinyrl_t *instance) |
typedef char ** | tinyrl_completion_func_t (tinyrl_t *instance, const char *text, unsigned start, unsigned end) |
typedef bool_t | tinyrl_key_func_t (tinyrl_t *instance, int key) |
Enumerations | |
enum | tinyrl_match_e { TINYRL_NO_MATCH = 0, TINYRL_MATCH, TINYRL_AMBIGUOUS, TINYRL_COMPLETED_MATCH, TINYRL_COMPLETED_AMBIGUOUS, TINYRL_MATCH_WITH_EXTENSIONS } |
Functions | |
tinyrl_t * | tinyrl_new (FILE *instream, FILE *outstream, unsigned stifle, tinyrl_completion_func_t *complete_fn) |
int | tinyrl_printf (const tinyrl_t *instance, const char *fmt,...) |
void | tinyrl_delete (tinyrl_t *instance) |
tinyrl_history_t * | tinyrl__get_history (const tinyrl_t *instance) |
const char * | tinyrl__get_prompt (const tinyrl_t *instance) |
void | tinyrl_done (tinyrl_t *instance) |
void | tinyrl_completion_over (tinyrl_t *instance) |
void | tinyrl_completion_error_over (tinyrl_t *instance) |
bool_t | tinyrl_is_completion_error_over (const tinyrl_t *instance) |
void * | tinyrl__get_context (const tinyrl_t *instance) |
const char * | tinyrl__get_line (const tinyrl_t *instance) |
void | tinyrl__set_istream (tinyrl_t *instance, FILE *istream) |
bool_t | tinyrl__get_isatty (const tinyrl_t *instance) |
FILE * | tinyrl__get_istream (const tinyrl_t *instance) |
FILE * | tinyrl__get_ostream (const tinyrl_t *instance) |
char * | tinyrl_readline (tinyrl_t *instance, const char *prompt, void *context) |
bool_t | tinyrl_bind_key (tinyrl_t *instance, int key, tinyrl_key_func_t *fn) |
void | tinyrl_delete_matches (char **instance) |
char ** | tinyrl_completion (tinyrl_t *instance, const char *line, unsigned start, unsigned end, tinyrl_compentry_func_t *generator) |
void | tinyrl_crlf (const tinyrl_t *instance) |
void | tinyrl_ding (const tinyrl_t *instance) |
void | tinyrl_reset_line_state (tinyrl_t *instance) |
bool_t | tinyrl_insert_text (tinyrl_t *instance, const char *text) |
void | tinyrl_delete_text (tinyrl_t *instance, unsigned start, unsigned end) |
void | tinyrl_redisplay (tinyrl_t *instance) |
void | tinyrl_replace_line (tinyrl_t *instance, const char *text, int clear_undo) |
tinyrl_match_e | tinyrl_complete (tinyrl_t *instance) |
tinyrl_match_e | tinyrl_complete_with_extensions (tinyrl_t *instance) |
void | tinyrl_disable_echo (tinyrl_t *instance, char echo_char) |
void | tinyrl_enable_echo (tinyrl_t *instance) |
bool_t | tinyrl_is_quoting (const tinyrl_t *instance) |
void | tinyrl_limit_line_length (tinyrl_t *instance, unsigned length) |
typedef bool_t tinyrl_key_func_t(tinyrl_t *instance, int key) |
enum tinyrl_match_e |
const char* tinyrl__get_line | ( | const tinyrl_t * | instance | ) |
This operation returns the current line in use by the tinyrl instance NB. the pointer will become invalid after any further operation on the instance.
tinyrl_match_e tinyrl_complete | ( | tinyrl_t * | instance | ) |
Complete the current word in the input buffer, displaying a prompt to clarify any abiguity if necessary.
tinyrl_match_e tinyrl_complete_with_extensions | ( | tinyrl_t * | instance | ) |
Complete the current word in the input buffer, displaying a prompt to clarify any abiguity or extra extensions if necessary.
void tinyrl_disable_echo | ( | tinyrl_t * | instance, | |
char | echo_char | |||
) |
Disable echoing of input characters when a line in input.
instance | The instance on which to operate |
echo_char |
The character to display instead of a key press. If this has the special value '/0' then the insertion point will not be moved when keys are pressed. |
void tinyrl_enable_echo | ( | tinyrl_t * | instance | ) |
Enable key echoing for this instance. (This is the default behaviour)
instance | The instance on which to operate |
bool_t tinyrl_is_quoting | ( | const tinyrl_t * | instance | ) |
Indicate whether the current insertion point is quoting or not
instance | The instance on which to operate |
void tinyrl_limit_line_length | ( | tinyrl_t * | instance, | |
unsigned | length | |||
) |
Limit maximum line length
instance | The instance on which to operate |
length | The length to limit to (0) is unlimited |