|
From: Martin R. <ru...@us...> - 2004-08-07 08:56:35
|
Update of /cvsroot/foo/fooelk/lib/readline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17521 Modified Files: completion.c readline.c readline.h Log Message: include scheme functions in header file. #ifdefs for (limited) BSD libedit support Index: readline.c =================================================================== RCS file: /cvsroot/foo/fooelk/lib/readline/readline.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** readline.c 6 Aug 2004 20:56:43 -0000 1.1.1.1 --- readline.c 7 Aug 2004 08:56:26 -0000 1.2 *************** *** 79,83 **** ! static Object P_Readline_Read (void) { --- 79,83 ---- ! Object P_Readline_Read (void) { *************** *** 142,146 **** ! static Object P_Readline_Add_History (Object add) { --- 142,146 ---- ! Object P_Readline_Add_History (Object add) { *************** *** 151,155 **** ! static Object P_Readline_Set_Prompt (Object prompt) { --- 151,155 ---- ! Object P_Readline_Set_Prompt (Object prompt) { Index: readline.h =================================================================== RCS file: /cvsroot/foo/fooelk/lib/readline/readline.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** readline.h 6 Aug 2004 20:56:43 -0000 1.1.1.1 --- readline.h 7 Aug 2004 08:56:26 -0000 1.2 *************** *** 52,55 **** --- 52,56 ---- extern Object P_Readline_Add_History (Object add); extern Object P_Readline_Set_Prompt (Object prompt); + extern Object P_Readline_Completion (Object enable); #define Def_Prim Define_Primitive Index: completion.c =================================================================== RCS file: /cvsroot/foo/fooelk/lib/readline/completion.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** completion.c 7 Aug 2004 08:07:25 -0000 1.3 --- completion.c 7 Aug 2004 08:56:26 -0000 1.4 *************** *** 75,78 **** --- 75,85 ---- erl_symbol_complete (char *text, int state) { + #ifdef HAVE_EDITLINE_READLINE_H + if (! _do_completion) + { + return NULL; + } + #endif + if (! state) { *************** *** 84,87 **** --- 91,95 ---- + #ifdef HAVE_READLINE_READLINE_H static char ** erl_guess_completion (const char *text, int start, int end) *************** *** 105,111 **** return matches; } ! static Object P_Readline_Completion (Object enable) { --- 113,120 ---- return matches; } + #endif /* #ifdef HAVE_READLINE_READLINE_H */ ! Object P_Readline_Completion (Object enable) { *************** *** 141,145 **** --- 150,161 ---- _erl_completions = (char **)malloc(_erl_maxcompl * sizeof(char *)); rl_readline_name = "fooelk"; + + #ifdef HAVE_READLINE_READLINE_H rl_attempted_completion_function = erl_guess_completion; + #elif HAVE_EDITLINE_READLINE_H + rl_completion_entry_function = (void *)erl_symbol_complete; + #else + #error *** NO EDITLINE/READLINE SUPPORT FOUND *** + #endif Def_Prim(P_Readline_Completion, "readline-completion", 1, 1, EVAL); |