Lines Matching refs:cmd_buf_index
66 if (rs->cmd_buf_index != rs->last_cmd_buf_index) { in readline_update()
67 delta = rs->cmd_buf_index - rs->last_cmd_buf_index; in readline_update()
78 rs->last_cmd_buf_index = rs->cmd_buf_index; in readline_update()
85 if (rs->cmd_buf_index < READLINE_CMD_BUF_SIZE) { in readline_insert_char()
86 memmove(rs->cmd_buf + rs->cmd_buf_index + 1, in readline_insert_char()
87 rs->cmd_buf + rs->cmd_buf_index, in readline_insert_char()
88 rs->cmd_buf_size - rs->cmd_buf_index); in readline_insert_char()
89 rs->cmd_buf[rs->cmd_buf_index] = ch; in readline_insert_char()
91 rs->cmd_buf_index++; in readline_insert_char()
97 if (rs->cmd_buf_index > 0) { in readline_backward_char()
98 rs->cmd_buf_index--; in readline_backward_char()
104 if (rs->cmd_buf_index < rs->cmd_buf_size) { in readline_forward_char()
105 rs->cmd_buf_index++; in readline_forward_char()
111 if (rs->cmd_buf_index < rs->cmd_buf_size) { in readline_delete_char()
112 memmove(rs->cmd_buf + rs->cmd_buf_index, in readline_delete_char()
113 rs->cmd_buf + rs->cmd_buf_index + 1, in readline_delete_char()
114 rs->cmd_buf_size - rs->cmd_buf_index - 1); in readline_delete_char()
121 if (rs->cmd_buf_index > 0) { in readline_backspace()
131 if (rs->cmd_buf_index == 0 || rs->cmd_buf_index > rs->cmd_buf_size) { in readline_backword()
135 start = rs->cmd_buf_index - 1; in readline_backword()
157 if (start < rs->cmd_buf_index) { in readline_backword()
159 rs->cmd_buf + rs->cmd_buf_index, in readline_backword()
160 rs->cmd_buf_size - rs->cmd_buf_index); in readline_backword()
161 rs->cmd_buf_size -= rs->cmd_buf_index - start; in readline_backword()
162 rs->cmd_buf_index = start; in readline_backword()
168 rs->cmd_buf_index = 0; in readline_bol()
173 rs->cmd_buf_index = rs->cmd_buf_size; in readline_eol()
194 rs->cmd_buf_index = rs->cmd_buf_size = strlen(rs->cmd_buf); in readline_up_char()
210 rs->cmd_buf_index = rs->cmd_buf_size = strlen(rs->cmd_buf); in readline_down_char()
284 cmdline = qemu_malloc(rs->cmd_buf_index + 1); in readline_completion()
285 memcpy(cmdline, rs->cmd_buf, rs->cmd_buf_index); in readline_completion()
286 cmdline[rs->cmd_buf_index] = '\0'; in readline_completion()
366 rs->cmd_buf_index = 0; in readline_handle_byte()
455 rs->cmd_buf_index = 0; in readline_restart()