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; |
} |
} |