[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.90 and 1.91

version 1.90, 2010/08/04 20:29:18 version 1.91, 2010/08/28 15:44:59
Line 220  _getc_function(EditLine *el, char *c)
Line 220  _getc_function(EditLine *el, char *c)
         return 1;          return 1;
 }  }
   
   static void
   _resize_fun(EditLine *el, void *a)
   {
           const LineInfo *li;
           char **ap = a;
   
           li = el_line(el);
           /* a cheesy way to get rid of const cast. */
           *ap = memchr(li->buffer, *li->buffer, 1);
   }
   
 static const char _dothistory[] = "/.history";  static const char _dothistory[] = "/.history";
   
 static const char *  static const char *
Line 272  int
Line 283  int
 rl_initialize(void)  rl_initialize(void)
 {  {
         TYPE(HistEvent) ev;          TYPE(HistEvent) ev;
         const LineInfo *li;  
         int editmode = 1;          int editmode = 1;
         struct termios t;          struct termios t;
   
Line 306  rl_initialize(void)
Line 316  rl_initialize(void)
         max_input_history = INT_MAX;          max_input_history = INT_MAX;
         el_set(e, EL_HIST, history, h);          el_set(e, EL_HIST, history, h);
   
           /* Setup resize function */
           el_set(e, EL_RESIZE, _resize_fun, &rl_line_buffer);
   
         /* setup getc function if valid */          /* setup getc function if valid */
         if (rl_getc_function)          if (rl_getc_function)
                 el_set(e, EL_GETCFN, _getc_function);                  el_set(e, EL_GETCFN, _getc_function);
Line 351  rl_initialize(void)
Line 364  rl_initialize(void)
          * Unfortunately, some applications really do use rl_point           * Unfortunately, some applications really do use rl_point
          * and rl_line_buffer directly.           * and rl_line_buffer directly.
          */           */
         li = el_line(e);          _resize_fun(e, &rl_line_buffer);
         /* a cheesy way to get rid of const cast. */  
         rl_line_buffer = memchr(li->buffer, *li->buffer, 1);  
         _rl_update_pos();          _rl_update_pos();
   
         if (rl_startup_hook)          if (rl_startup_hook)

Legend:
Removed from v.1.90  
changed lines
  Added in v.1.91

CVSweb <webmaster@jp.NetBSD.org>