94 |
the word to complete. We can use the entire contents of rl_line_buffer |
the word to complete. We can use the entire contents of rl_line_buffer |
95 |
in case we want to do some simple parsing. Return the array of matches, |
in case we want to do some simple parsing. Return the array of matches, |
96 |
or NULL if there aren't any. */ |
or NULL if there aren't any. */ |
97 |
|
extern char **completion_matches(char *,char *(*)(char *,int)); |
98 |
static char **rl_completion(char *text, int start, int end) { |
static char **rl_completion(char *text, int start, int end) { |
99 |
return completion_matches(text, rl_completion_words); |
return completion_matches(text, rl_completion_words); |
100 |
} |
} |
225 |
readline_on = 1; |
readline_on = 1; |
226 |
|
|
227 |
if (type_of(program_name)==t_string) { |
if (type_of(program_name)==t_string) { |
228 |
if (rl_readline_name) |
|
229 |
free(rl_readline_name); |
static char *mrln; |
230 |
rl_readline_name = malloc(program_name->st.st_fillp+1); |
|
231 |
if (rl_readline_name==NULL) FEerror("Out of memory.", 0); |
if (mrln) |
232 |
|
free(mrln); |
233 |
|
mrln = malloc(program_name->st.st_fillp+1); |
234 |
|
if (!mrln) FEerror("Out of memory.", 0); |
235 |
for (i=0; i<program_name->st.st_fillp; i++) |
for (i=0; i<program_name->st.st_fillp; i++) |
236 |
rl_readline_name[i] = program_name->ust.ust_self[i]; |
mrln[i] = program_name->ust.ust_self[i]; |
237 |
rl_readline_name[i] = 0; |
mrln[i] = 0; |
238 |
|
rl_readline_name=mrln; |
239 |
rl_initialize(); |
rl_initialize(); |
240 |
} else { |
} else { |
241 |
FEerror("~S is not a string.", 1, program_name); |
FEerror("~S is not a string.", 1, program_name); |