Minor, header cleanup, whitespace fixes, comments

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2017-11-30 18:20:29 +01:00
parent a1f0a81a31
commit a9d4247c09
2 changed files with 20 additions and 20 deletions

View File

@ -84,26 +84,26 @@ extern void rl_initialize(void);
extern void rl_reset_terminal (const char *terminal_name); extern void rl_reset_terminal (const char *terminal_name);
extern void rl_uninitialize (void); extern void rl_uninitialize (void);
void rl_save_prompt(void); extern void rl_save_prompt (void);
void rl_restore_prompt(void); extern void rl_restore_prompt (void);
void rl_set_prompt(const char *prompt); extern void rl_set_prompt (const char *prompt);
void rl_clear_message(void); extern void rl_clear_message (void);
void rl_forced_update_display(void); extern void rl_forced_update_display(void);
extern void rl_prep_terminal (int meta_flag);
extern void rl_deprep_terminal (void);
extern int rl_getc(void);
extern char *readline (const char *prompt); extern char *readline (const char *prompt);
extern void add_history(const char *line);
extern void add_history (const char *line);
extern int read_history (const char *filename); extern int read_history (const char *filename);
extern int write_history (const char *filename); extern int write_history (const char *filename);
rl_complete_func_t *rl_set_complete_func(rl_complete_func_t *func); extern rl_complete_func_t *rl_set_complete_func (rl_complete_func_t *func);
rl_list_possib_func_t *rl_set_list_possib_func(rl_list_possib_func_t *func); extern rl_list_possib_func_t *rl_set_list_possib_func (rl_list_possib_func_t *func);
void rl_prep_terminal(int meta_flag);
void rl_deprep_terminal(void);
int rl_getc(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -61,11 +61,14 @@ typedef struct {
char **Lines; char **Lines;
} el_hist_t; } el_hist_t;
/* User definable callbacks. */
rl_getc_func_t *rl_getc_function = rl_getc; rl_getc_func_t *rl_getc_function = rl_getc;
rl_hook_func_t *rl_event_hook; rl_hook_func_t *rl_event_hook;
rl_vintfunc_t *rl_prep_term_function = rl_prep_terminal; rl_vintfunc_t *rl_prep_term_function = rl_prep_terminal;
rl_voidfunc_t *rl_deprep_term_function = rl_deprep_terminal; rl_voidfunc_t *rl_deprep_term_function = rl_deprep_terminal;
char **(*rl_attempted_completion_function)(const char *token, int start, int end);
/* /*
** Globals. ** Globals.
*/ */
@ -121,9 +124,6 @@ const char *rl_readline_name = NULL; /* Set by calling program, for condit
FILE *rl_instream = NULL; /* The stdio stream from which input is read. Defaults to stdin if NULL */ FILE *rl_instream = NULL; /* The stdio stream from which input is read. Defaults to stdin if NULL */
FILE *rl_outstream = NULL; /* The stdio stream to which output is flushed. Defaults to stdout if NULL */ FILE *rl_outstream = NULL; /* The stdio stream to which output is flushed. Defaults to stdout if NULL */
/* User definable callbacks. */
char **(*rl_attempted_completion_function)(const char *token, int start, int end);
/* Declarations. */ /* Declarations. */
static char *editinput(void); static char *editinput(void);
#ifdef CONFIG_USE_TERMCAP #ifdef CONFIG_USE_TERMCAP