| 626 | } |
| 627 | |
| 628 | bool textinputbuffer::say(const char *c) |
| 629 | { |
| 630 | string txt; |
| 631 | copystring(txt, c); |
| 632 | filterunrenderables(txt); |
| 633 | int buflen = (int)strlen(buf), txtlen = (int)strlen(txt); |
| 634 | if(txtlen && buflen < maxlen() && buflen + txtlen < (int)sizeof(buf)) |
| 635 | { |
| 636 | if(pos < 0) memcpy(buf + buflen, txt, txtlen); |
| 637 | else |
| 638 | { |
| 639 | memmove(&buf[pos + txtlen], &buf[pos], buflen - pos); |
| 640 | memcpy(&buf[pos], txt, txtlen); |
| 641 | pos += txtlen; |
| 642 | } |
| 643 | buf[buflen + txtlen] = '\0'; |
| 644 | return true; |
| 645 | } |
| 646 | return false; |
| 647 | } |
| 648 | |
| 649 | void textinputbuffer::pasteclipboard() |
| 650 | { |
no test coverage detected