[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.45 and 1.47

version 1.45, 2004/01/17 17:57:40 version 1.47, 2004/09/08 18:15:57
Line 161  static int el_rl_complete_cmdnum = 0;
Line 161  static int el_rl_complete_cmdnum = 0;
   
 /* internal functions */  /* internal functions */
 static unsigned char     _el_rl_complete(EditLine *, int);  static unsigned char     _el_rl_complete(EditLine *, int);
   static unsigned char     _el_rl_tstp(EditLine *, int);
 static char             *_get_prompt(EditLine *);  static char             *_get_prompt(EditLine *);
 static HIST_ENTRY       *_move_history(int);  static HIST_ENTRY       *_move_history(int);
 static int               _history_expand_command(const char *, size_t, size_t,  static int               _history_expand_command(const char *, size_t, size_t,
Line 272  rl_initialize(void)
Line 273  rl_initialize(void)
             "ReadLine compatible completion function",              "ReadLine compatible completion function",
             _el_rl_complete);              _el_rl_complete);
         el_set(e, EL_BIND, "^I", "rl_complete", NULL);          el_set(e, EL_BIND, "^I", "rl_complete", NULL);
   
           /*
            * Send TSTP when ^Z is pressed.
            */
           el_set(e, EL_ADDFN, "rl_tstp",
               "ReadLine compatible suspend function",
               _el_rl_tstp);
           el_set(e, EL_BIND, "^Z", "rl_tstp", NULL);
   
         /*          /*
          * Find out where the rl_complete function was added; this is           * Find out where the rl_complete function was added; this is
          * used later to detect that lastcmd was also rl_complete.           * used later to detect that lastcmd was also rl_complete.
Line 1571  _el_rl_complete(EditLine *el __attribute
Line 1581  _el_rl_complete(EditLine *el __attribute
         return (unsigned char) rl_complete(0, ch);          return (unsigned char) rl_complete(0, ch);
 }  }
   
   /*
    * el-compatible wrapper to send TSTP on ^Z
    */
   /* ARGSUSED */
   static unsigned char
   _el_rl_tstp(EditLine *el __attribute__((__unused__)), int ch __attribute__((__unused__)))
   {
           (void)kill(0, SIGTSTP);
           return CC_NORM;
   }
   
 /*  /*
  * returns list of completions for text given   * returns list of completions for text given
Line 1845  rl_complete(int ignore, int invoking_key
Line 1865  rl_complete(int ignore, int invoking_key
                 rl_initialize();                  rl_initialize();
   
         if (rl_inhibit_completion) {          if (rl_inhibit_completion) {
                 rl_insert(ignore, invoking_key);                  char arr[2];
                   arr[0] = (char)invoking_key;
                   arr[1] = '\0';
                   el_insertstr(e, arr);
                 return (CC_REFRESH);                  return (CC_REFRESH);
         } else if (e->el_state.lastcmd == el_rl_complete_cmdnum)          } else if (e->el_state.lastcmd == el_rl_complete_cmdnum)
                 return rl_complete_internal('?');                  return rl_complete_internal('?');

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.47

CVSweb <webmaster@jp.NetBSD.org>