MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / FUN(el,insertstr)

Function FUN(el,insertstr)

extern/editline/src/chared.c:612–628  ·  view source on GitHub ↗

el_insertstr(): * Insert string at cursorI */

Source from the content-addressed store, hash-verified

610 * Insert string at cursorI
611 */
612public int
613FUN(el,insertstr)(EditLine *el, const Char *s)
614{
615 size_t len;
616
617 if (s == NULL || (len = Strlen(s)) == 0)
618 return -1;
619 if (el->el_line.lastchar + len >= el->el_line.limit) {
620 if (!ch_enlargebufs(el, len))
621 return -1;
622 }
623
624 c_insert(el, (int)len);
625 while (*s)
626 *el->el_line.cursor++ = *s++;
627 return 0;
628}
629
630
631/* el_deletestr():

Callers

nothing calls this directly

Calls 2

ch_enlargebufsFunction · 0.85
c_insertFunction · 0.85

Tested by

no test coverage detected