MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / c_insert

Function c_insert

extern/editline/src/chared.c:95–111  ·  view source on GitHub ↗

c_insert(): * Insert num characters */

Source from the content-addressed store, hash-verified

93 * Insert num characters
94 */
95protected void
96c_insert(EditLine *el, int num)
97{
98 Char *cp;
99
100 if (el->el_line.lastchar + num >= el->el_line.limit) {
101 if (!ch_enlargebufs(el, (size_t)num))
102 return; /* can't go past end of buffer */
103 }
104
105 if (el->el_line.cursor < el->el_line.lastchar) {
106 /* if I must move chars */
107 for (cp = el->el_line.lastchar; cp >= el->el_line.cursor; cp--)
108 cp[num] = *cp;
109 }
110 el->el_line.lastchar += num;
111}
112
113
114/* c_delafter():

Callers 7

cv_pasteFunction · 0.85
vi_comment_outFunction · 0.85
vi_history_wordFunction · 0.85
ed_insertFunction · 0.85
em_yankFunction · 0.85
em_copy_prev_wordFunction · 0.85
FUN(el,insertstr)Function · 0.85

Calls 1

ch_enlargebufsFunction · 0.85

Tested by

no test coverage detected