mirror of
https://github.com/troglobit/editline.git
synced 2025-05-06 04:21:24 +08:00
Fix new GNU Readline compat function pointers.
This commit is contained in:
parent
0a75b182b1
commit
5de90af58f
@ -27,13 +27,13 @@ typedef enum {
|
|||||||
} el_status_t;
|
} el_status_t;
|
||||||
|
|
||||||
/* Editline specific types, despite rl_ prefix. From Heimdal project. */
|
/* Editline specific types, despite rl_ prefix. From Heimdal project. */
|
||||||
typedef char* (*rl_complete_func_t)(char*, int*);
|
typedef char* rl_complete_func_t(char*, int*);
|
||||||
typedef int (*rl_list_possib_func_t)(char*, char***);
|
typedef int rl_list_possib_func_t(char*, char***);
|
||||||
typedef el_status_t (*el_keymap_func_t)(void);
|
typedef el_status_t el_keymap_func_t(void);
|
||||||
typedef int (*rl_hook_func_t) (void);
|
typedef int rl_hook_func_t(void);
|
||||||
typedef int (*rl_getc_func_t)(void);
|
typedef int rl_getc_func_t(void);
|
||||||
typedef void (*rl_voidfunc_t)(void);
|
typedef void rl_voidfunc_t(void);
|
||||||
typedef void (*rl_vintfunc_t)(int);
|
typedef void rl_vintfunc_t(int);
|
||||||
|
|
||||||
/* Display 8-bit chars "as-is" or as `M-x'? Toggle with M-m. (Default:0 - "as-is") */
|
/* Display 8-bit chars "as-is" or as `M-x'? Toggle with M-m. (Default:0 - "as-is") */
|
||||||
extern int rl_meta_chars;
|
extern int rl_meta_chars;
|
||||||
@ -59,8 +59,8 @@ 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);
|
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);
|
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_prep_terminal(int meta_flag);
|
||||||
void rl_deprep_terminal(void);
|
void rl_deprep_terminal(void);
|
||||||
|
@ -140,12 +140,12 @@ static int SplitPath(char *path, char **dirpart, char **filepart)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static rl_complete_func_t el_complete_func = NULL;
|
static rl_complete_func_t *el_complete_func = NULL;
|
||||||
|
|
||||||
/* For compatibility with the Heimdal project. */
|
/* For compatibility with the Heimdal project. */
|
||||||
rl_complete_func_t rl_set_complete_func(rl_complete_func_t func)
|
rl_complete_func_t *rl_set_complete_func(rl_complete_func_t *func)
|
||||||
{
|
{
|
||||||
rl_complete_func_t old = el_complete_func;
|
rl_complete_func_t *old = el_complete_func;
|
||||||
el_complete_func = func;
|
el_complete_func = func;
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
@ -234,12 +234,12 @@ char *rl_complete(char *token, int *match)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static rl_list_possib_func_t el_list_possib_func = NULL;
|
static rl_list_possib_func_t *el_list_possib_func = NULL;
|
||||||
|
|
||||||
/* For compatibility with the Heimdal project. */
|
/* For compatibility with the Heimdal project. */
|
||||||
rl_list_possib_func_t rl_set_list_possib_func(rl_list_possib_func_t func)
|
rl_list_possib_func_t *rl_set_list_possib_func(rl_list_possib_func_t *func)
|
||||||
{
|
{
|
||||||
rl_list_possib_func_t old = el_list_possib_func;
|
rl_list_possib_func_t *old = el_list_possib_func;
|
||||||
el_list_possib_func = func;
|
el_list_possib_func = func;
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
|
@ -63,10 +63,10 @@ typedef struct {
|
|||||||
char **Lines;
|
char **Lines;
|
||||||
} el_hist_t;
|
} el_hist_t;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Globals.
|
** Globals.
|
||||||
|
Loading…
Reference in New Issue
Block a user