46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
--- newlisp.c.orig 2014-02-27 16:58:59.139505509 +0100
|
|
+++ newlisp.c 2014-02-27 17:03:18.657517089 +0100
|
|
@@ -129,7 +129,7 @@ char preLoad[] =
|
|
"(set (global 'module) (fn ($x) (load (append (env {NEWLISPDIR}) {/modules/} $x))))";
|
|
void printHelpText(void);
|
|
#ifdef READLINE
|
|
-char ** newlisp_completion (char * text, int start, int end);
|
|
+char ** newlisp_completion (const char * text, int start, int end);
|
|
#endif
|
|
/* --------------------- globals -------------------------------------- */
|
|
|
|
@@ -885,7 +885,7 @@ if(errorReg && !isNil((CELL*)errorEvent-
|
|
|
|
#ifdef READLINE
|
|
rl_readline_name = "newlisp";
|
|
-rl_attempted_completion_function = (CPPFunction *)newlisp_completion;
|
|
+rl_attempted_completion_function = newlisp_completion;
|
|
#if defined(LINUX) || defined(_BSD)
|
|
/* in Bash .inputrc put 'set blink-matching-paren on' */
|
|
rl_set_paren_blink_timeout(300000); /* 300 ms */
|
|
@@ -940,7 +940,7 @@ return 0;
|
|
#endif
|
|
|
|
#ifdef READLINE
|
|
-char * command_generator(char * text, int state)
|
|
+char * command_generator(const char * text, int state)
|
|
{
|
|
static int list_index, len, clen;
|
|
char * name;
|
|
@@ -968,12 +968,12 @@ return ((char *)NULL);
|
|
#ifdef _BSD
|
|
extern char **completion_matches PARAMS((char *, rl_compentry_func_t *));
|
|
#else
|
|
-char ** completion_matches(const char * text, CPFunction commands);
|
|
+char ** completion_matches(const char * text, rl_compentry_func_t commands);
|
|
#endif
|
|
|
|
-char ** newlisp_completion (char * text, int start, int end)
|
|
+char ** newlisp_completion (const char * text, int start, int end)
|
|
{
|
|
-return(completion_matches(text, (CPFunction *)command_generator));
|
|
+return(completion_matches(text, command_generator));
|
|
}
|
|
#endif /* READLINE */
|
|
|