[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.69 and 1.70

version 1.69, 2006/08/21 12:45:30 version 1.70, 2006/11/24 00:01:17
Line 49  __RCSID("$NetBSD$");
Line 49  __RCSID("$NetBSD$");
 #include <limits.h>  #include <limits.h>
 #include <errno.h>  #include <errno.h>
 #include <fcntl.h>  #include <fcntl.h>
   #include <setjmp.h>
 #ifdef HAVE_VIS_H  #ifdef HAVE_VIS_H
 #include <vis.h>  #include <vis.h>
 #else  #else
Line 88  char *rl_line_buffer = NULL;
Line 89  char *rl_line_buffer = NULL;
 VCPFunction *rl_linefunc = NULL;  VCPFunction *rl_linefunc = NULL;
 int rl_done = 0;  int rl_done = 0;
 VFunction *rl_event_hook = NULL;  VFunction *rl_event_hook = NULL;
   KEYMAP_ENTRY_ARRAY emacs_standard_keymap,
       emacs_meta_keymap,
       emacs_ctlx_keymap;
   
 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 113  int rl_already_prompted = 0;
Line 117  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 rl_catch_signals = 1;
   int readline_echoing_p = 1;
   int _rl_print_completions_horizontally = 0;
 VFunction *rl_redisplay_function = NULL;  VFunction *rl_redisplay_function = NULL;
 Function *rl_startup_hook = NULL;  Function *rl_startup_hook = NULL;
 VFunction *rl_completion_display_matches_hook = NULL;  VFunction *rl_completion_display_matches_hook = NULL;
Line 154  int rl_completion_append_character = ' '
Line 160  int rl_completion_append_character = ' '
 static History *h = NULL;  static History *h = NULL;
 static EditLine *e = NULL;  static EditLine *e = NULL;
 static Function *map[256];  static Function *map[256];
   static jmp_buf topbuf;
   
 /* internal functions */  /* internal functions */
 static unsigned char     _el_rl_complete(EditLine *, int);  static unsigned char     _el_rl_complete(EditLine *, int);
Line 322  rl_initialize(void)
Line 329  rl_initialize(void)
  * trailing newline (if there is any)   * trailing newline (if there is any)
  */   */
 char *  char *
 readline(const char *prompt)  readline(const char *p)
 {  {
         HistEvent ev;          HistEvent ev;
           const char * volatile prompt = p;
         int count;          int count;
         const char *ret;          const char *ret;
         char *buf;          char *buf;
Line 335  readline(const char *prompt)
Line 343  readline(const char *prompt)
   
         rl_done = 0;          rl_done = 0;
   
           (void)setjmp(topbuf);
   
         /* update prompt accordingly to what has been passed */          /* update prompt accordingly to what has been passed */
         if (!prompt)          if (!prompt)
                 prompt = "";                  prompt = "";
Line 1805  _rl_update_pos(void)
Line 1815  _rl_update_pos(void)
         rl_point = li->cursor - li->buffer;          rl_point = li->cursor - li->buffer;
         rl_end = li->lastchar - li->buffer;          rl_end = li->lastchar - li->buffer;
 }  }
   
   void
   rl_get_screen_size(int *rows, int *cols)
   {
           if (rows)
                   el_get(e, EL_GETTC, "li", rows);
           if (cols)
                   el_get(e, EL_GETTC, "co", cols);
   }
   
   void
   rl_set_screen_size(int rows, int cols)
   {
           char buf[64];
           (void)snprintf(buf, sizeof(buf), "%d", rows);
           el_set(e, EL_SETTC, "li", buf);
           (void)snprintf(buf, sizeof(buf), "%d", cols);
           el_set(e, EL_SETTC, "co", buf);
   }
   
   char *
   rl_filename_completion_function (const char *text, int state)
   {
           return fn_filename_completion_function(text, state);
   }
   
   int
   _rl_abort_internal(void)
   {
           el_beep(e);
           longjmp(topbuf, 1);
           /*NOTREACHED*/
   }
   
   int
   _rl_qsort_string_compare(char **s1, char **s2)
   {
           return strcoll(*s1, *s2);
   }
   
   int
   /*ARGSUSED*/
   rl_kill_text(int from, int to)
   {
           return 0;
   }
   
   Keymap
   rl_make_bare_keymap(void)
   {
           return NULL;
   }
   
   Keymap
   rl_get_keymap(void)
   {
           return NULL;
   }
   
   void
   /*ARGSUSED*/
   rl_set_keymap(Keymap k)
   {
   }
   
   int
   /*ARGSUSED*/
   rl_generic_bind(int type, const char * keyseq, const char * data, Keymap k)
   {
           return 0;
   }
   
   int
   /*ARGSUSED*/
   rl_bind_key_in_map(int key, Function *fun, Keymap k)
   {
           return 0;
   }
   

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.70

CVSweb <webmaster@jp.NetBSD.org>