[BACK]Return to readline.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libedit

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libedit/readline.c between version 1.124 and 1.125

version 1.124, 2016/02/16 19:08:41 version 1.125, 2016/02/17 19:47:49
Line 36  __RCSID("$NetBSD$");
Line 36  __RCSID("$NetBSD$");
   
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/stat.h>  #include <sys/stat.h>
 #include <stdio.h>  
 #include <stdint.h>  
 #include <dirent.h>  
 #include <string.h>  
 #include <pwd.h>  
 #include <ctype.h>  #include <ctype.h>
 #include <stdlib.h>  #include <dirent.h>
 #include <unistd.h>  
 #include <limits.h>  
 #include <errno.h>  #include <errno.h>
 #include <fcntl.h>  #include <fcntl.h>
   #include <limits.h>
   #include <pwd.h>
 #include <setjmp.h>  #include <setjmp.h>
   #include <stdint.h>
   #include <stdio.h>
   #include <stdlib.h>
   #include <string.h>
   #include <unistd.h>
 #include <vis.h>  #include <vis.h>
   
 #include "readline/readline.h"  #include "readline/readline.h"
Line 266  rl_set_prompt(const char *prompt)
Line 266  rl_set_prompt(const char *prompt)
   
         if (!prompt)          if (!prompt)
                 prompt = "";                  prompt = "";
         if (rl_prompt != NULL && strcmp(rl_prompt, prompt) == 0)          if (rl_prompt != NULL && strcmp(rl_prompt, prompt) == 0)
                 return 0;                  return 0;
         if (rl_prompt)          if (rl_prompt)
                 el_free(rl_prompt);                  el_free(rl_prompt);
Line 360  rl_initialize(void)
Line 360  rl_initialize(void)
             "ReadLine compatible suspend function",              "ReadLine compatible suspend function",
             _el_rl_tstp);              _el_rl_tstp);
         el_set(e, EL_BIND, "^Z", "rl_tstp", NULL);          el_set(e, EL_BIND, "^Z", "rl_tstp", NULL);
   
         /*          /*
          * Set some readline compatible key-bindings.           * Set some readline compatible key-bindings.
          */           */
Line 2007  rl_callback_read_char(void)
Line 2007  rl_callback_read_char(void)
         }          }
 }  }
   
 void  void
 rl_callback_handler_install(const char *prompt, rl_vcpfunc_t *linefunc)  rl_callback_handler_install(const char *prompt, rl_vcpfunc_t *linefunc)
 {  {
         if (e == NULL) {          if (e == NULL) {
Line 2016  rl_callback_handler_install(const char *
Line 2016  rl_callback_handler_install(const char *
         (void)rl_set_prompt(prompt);          (void)rl_set_prompt(prompt);
         rl_linefunc = linefunc;          rl_linefunc = linefunc;
         el_set(e, EL_UNBUFFERED, 1);          el_set(e, EL_UNBUFFERED, 1);
 }  }
   
 void  void
 rl_callback_handler_remove(void)  rl_callback_handler_remove(void)
 {  {
         el_set(e, EL_UNBUFFERED, 0);          el_set(e, EL_UNBUFFERED, 0);
Line 2218  rl_completion_matches(const char *str, r
Line 2218  rl_completion_matches(const char *str, r
                 list[0][min] = '\0';                  list[0][min] = '\0';
         }          }
         return list;          return list;
   
 out:  out:
         el_free(list);          el_free(list);
         return NULL;          return NULL;

Legend:
Removed from v.1.124  
changed lines
  Added in v.1.125

CVSweb <webmaster@jp.NetBSD.org>