[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.105.2.4 and 1.106

version 1.105.2.4, 2014/08/20 00:02:17 version 1.106, 2012/10/12 23:35:02
Line 84  VFunction *rl_event_hook = NULL;
Line 84  VFunction *rl_event_hook = NULL;
 KEYMAP_ENTRY_ARRAY emacs_standard_keymap,  KEYMAP_ENTRY_ARRAY emacs_standard_keymap,
     emacs_meta_keymap,      emacs_meta_keymap,
     emacs_ctlx_keymap;      emacs_ctlx_keymap;
 /*  
  * The following is not implemented; we always catch signals in the  
  * libedit fashion: set handlers on entry to el_gets() and clear them  
  * on the way out. This simplistic approach works for most cases; if  
  * it does not work for your application, please let us know.  
  */  
 int rl_catch_signals = 1;  
 int rl_catch_sigwinch = 1;  
   
 int history_base = 1;           /* probably never subject to change */  int history_base = 1;           /* probably never subject to change */
 int history_length = 0;  int history_length = 0;
Line 117  char *rl_terminal_name = NULL;
Line 109  char *rl_terminal_name = NULL;
 int rl_already_prompted = 0;  int rl_already_prompted = 0;
 int rl_filename_completion_desired = 0;  int rl_filename_completion_desired = 0;
 int rl_ignore_completion_duplicates = 0;  int rl_ignore_completion_duplicates = 0;
   int rl_catch_signals = 1;
 int readline_echoing_p = 1;  int readline_echoing_p = 1;
 int _rl_print_completions_horizontally = 0;  int _rl_print_completions_horizontally = 0;
 VFunction *rl_redisplay_function = NULL;  VFunction *rl_redisplay_function = NULL;
Line 236  static const char *
Line 229  static const char *
 _default_history_file(void)  _default_history_file(void)
 {  {
         struct passwd *p;          struct passwd *p;
         static char *path;          static char path[PATH_MAX];
         size_t len;  
   
         if (path)          if (*path)
                 return path;                  return path;
   
         if ((p = getpwuid(getuid())) == NULL)          if ((p = getpwuid(getuid())) == NULL)
                 return NULL;                  return NULL;
           (void)snprintf(path, sizeof(path), "%s/.history", p->pw_dir);
         len = strlen(p->pw_dir) + sizeof("/.history");  
         if ((path = malloc(len)) == NULL)  
                 return NULL;  
   
         (void)snprintf(path, len, "%s/.history", p->pw_dir);  
         return path;          return path;
 }  }
   
Line 1482  clear_history(void)
Line 1468  clear_history(void)
 {  {
         HistEvent ev;          HistEvent ev;
   
         if (h == NULL || e == NULL)  
                 rl_initialize();  
   
         (void)history(h, &ev, H_CLEAR);          (void)history(h, &ev, H_CLEAR);
         history_length = 0;          history_length = 0;
 }  }
Line 1970  rl_callback_read_char(void)
Line 1953  rl_callback_read_char(void)
                 } else                  } else
                         wbuf = NULL;                          wbuf = NULL;
                 (*(void (*)(const char *))rl_linefunc)(wbuf);                  (*(void (*)(const char *))rl_linefunc)(wbuf);
                 el_set(e, EL_UNBUFFERED, 1);                  //el_set(e, EL_UNBUFFERED, 1);
         }          }
 }  }
   
Line 2121  void
Line 2104  void
 rl_get_screen_size(int *rows, int *cols)  rl_get_screen_size(int *rows, int *cols)
 {  {
         if (rows)          if (rows)
                 el_get(e, EL_GETTC, "li", rows, (void *)0);                  el_get(e, EL_GETTC, "li", rows, NULL);
         if (cols)          if (cols)
                 el_get(e, EL_GETTC, "co", cols, (void *)0);                  el_get(e, EL_GETTC, "co", cols, NULL);
 }  }
   
 void  void

Legend:
Removed from v.1.105.2.4  
changed lines
  Added in v.1.106

CVSweb <webmaster@jp.NetBSD.org>