static void cmdline_insert_bytes(struct cmdline *c, const char *buf, int size) { int i; gbuf_make_space(&c->buf, c->pos, size); for (i = 0; i < size; i++) c->buf.buffer[c->pos++] = buf[i]; }
static void cmdline_insert(struct cmdline *c, unsigned int u) { unsigned int len = 1; if (term_utf8) len = u_char_size(u); gbuf_make_space(&c->buf, c->pos, len); if (len > 1) { u_set_char_raw(c->buf.buffer, &c->pos, u); } else { c->buf.buffer[c->pos++] = u; } }