[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.167 and 1.168

version 1.167, 2021/09/10 13:29:06 version 1.168, 2021/09/10 18:51:36
Line 596  get_history_event(const char *cmd, int *
Line 596  get_history_event(const char *cmd, int *
                 if (sub && cmd[idx] == '?')                  if (sub && cmd[idx] == '?')
                         break;                          break;
                 if (!sub && (cmd[idx] == ':' || cmd[idx] == ' '                  if (!sub && (cmd[idx] == ':' || cmd[idx] == ' '
                                     || cmd[idx] == '\t' || cmd[idx] == qchar))                      || cmd[idx] == '\t' || cmd[idx] == qchar))
                         break;                          break;
                 idx++;                  idx++;
         }          }
Line 824  _history_expand_command(const char *comm
Line 824  _history_expand_command(const char *comm
                 } else {                  } else {
                         int     qchar;                          int     qchar;
   
                         qchar = (offs > 0 && command[offs - 1] == '"')? '"':0;                          qchar = (offs > 0 && command[offs - 1] == '"')
                               ? '"' : '\0';
                         ptr = get_history_event(command + offs, &idx, qchar);                          ptr = get_history_event(command + offs, &idx, qchar);
                 }                  }
                 has_mods = command[offs + (size_t)idx] == ':';                  has_mods = command[offs + (size_t)idx] == ':';
Line 902  _history_expand_command(const char *comm
Line 903  _history_expand_command(const char *comm
                 switch (*cmd) {                  switch (*cmd) {
                 case ':':                  case ':':
                         continue;                          continue;
                 case 'h':       /* remove trailing path */                  case 'h':       /* remove trailing path */
                         if ((aptr = strrchr(tmp, '/')) != NULL)                          if ((aptr = strrchr(tmp, '/')) != NULL)
                                 *aptr = '\0';                                  *aptr = '\0';
                         continue;                          continue;
Line 1402  read_history(const char *filename)
Line 1403  read_history(const char *filename)
                 return errno;                  return errno;
         errno = 0;          errno = 0;
         if (history(h, &ev, H_LOAD, filename) == -1)          if (history(h, &ev, H_LOAD, filename) == -1)
             return errno ? errno : EINVAL;                  return errno ? errno : EINVAL;
         if (history(h, &ev, H_GETSIZE) == 0)          if (history(h, &ev, H_GETSIZE) == 0)
                 history_length = ev.num;                  history_length = ev.num;
         if (history_length < 0)          if (history_length < 0)
Line 2080  static unsigned char
Line 2081  static unsigned char
 rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c)  rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c)
 {  {
         if (map[c] == NULL)          if (map[c] == NULL)
             return CC_ERROR;                  return CC_ERROR;
   
         _rl_update_pos();          _rl_update_pos();
   

Legend:
Removed from v.1.167  
changed lines
  Added in v.1.168

CVSweb <webmaster@jp.NetBSD.org>