X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fgetline.c;h=0b7d4b6df1161a7047e249f430dcd1aab01f53e6;hb=3bd4593ef9a57f23062c61ec465389f749ba3089;hp=b5d87bc32d5c69b7ffbe25f88d50dec0947710c2;hpb=f62199cac6213ed1c03ffe48450a583da0fadc68;p=pspp-builds.git diff --git a/src/getline.c b/src/getline.c index b5d87bc3..0b7d4b6d 100644 --- a/src/getline.c +++ b/src/getline.c @@ -24,6 +24,7 @@ #include #include #include "alloc.h" +#include "command.h" #include "error.h" #include "filename.h" #include "lexer.h" @@ -43,6 +44,10 @@ int getl_welcomed; int getl_mode; int getl_prompt; +#if HAVE_LIBREADLINE +#include +#endif + #if HAVE_LIBHISTORY static char *history_file; @@ -57,6 +62,7 @@ extern int write_history (char *); #endif /* no readline/history.h */ #endif /* -lhistory */ + extern struct cmd_set cmd; static struct string getl_include_path; @@ -75,6 +81,9 @@ getl_initialize (void) ds_create (&getl_include_path, fn_getenv_default ("STAT_INCLUDE_PATH", include_path)); ds_init (&getl_buf, 256); +#if HAVE_LIBREADLINE + rl_completion_entry_function = pspp_completion_function; +#endif } /* Close getline. */