[BACK]Return to chared.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/chared.c between version 1.50 and 1.51

version 1.50, 2016/04/09 18:43:17 version 1.51, 2016/04/11 00:22:48
Line 205  c_delbefore1(EditLine *el)
Line 205  c_delbefore1(EditLine *el)
 protected int  protected int
 ce__isword(wint_t p)  ce__isword(wint_t p)
 {  {
         return iswalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL;          return iswalnum(p) || wcschr(L"*?_-.[]~=", p) != NULL;
 }  }
   
   
Line 614  ch_end(EditLine *el)
Line 614  ch_end(EditLine *el)
  *      Insert string at cursorI   *      Insert string at cursorI
  */   */
 public int  public int
 FUN(el,insertstr)(EditLine *el, const Char *s)  el_winsertstr(EditLine *el, const Char *s)
 {  {
         size_t len;          size_t len;
   
         if (s == NULL || (len = Strlen(s)) == 0)          if (s == NULL || (len = wcslen(s)) == 0)
                 return -1;                  return -1;
         if (el->el_line.lastchar + len >= el->el_line.limit) {          if (el->el_line.lastchar + len >= el->el_line.limit) {
                 if (!ch_enlargebufs(el, len))                  if (!ch_enlargebufs(el, len))
Line 680  c_gets(EditLine *el, Char *buf, const Ch
Line 680  c_gets(EditLine *el, Char *buf, const Ch
         Char *cp = el->el_line.buffer, ch;          Char *cp = el->el_line.buffer, ch;
   
         if (prompt) {          if (prompt) {
                 len = (ssize_t)Strlen(prompt);                  len = (ssize_t)wcslen(prompt);
                 (void)memcpy(cp, prompt, (size_t)len * sizeof(*cp));                  (void)memcpy(cp, prompt, (size_t)len * sizeof(*cp));
                 cp += len;                  cp += len;
         }          }

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

CVSweb <webmaster@jp.NetBSD.org>