rdl->validate = validate;
rdl->complete = complete;
rdl->help = help;
- rdl->status = RDLINE_INIT;
+ rdl->status = RDLINE_STOPPED;
#ifndef NO_RDLINE_HISTORY
cirbuf_init(&rdl->history, rdl->history_buf, 0, RDLINE_HISTORY_BUF_SIZE);
#endif /* !NO_RDLINE_HISTORY */
void
rdline_stop(struct rdline *rdl)
{
- rdl->status = RDLINE_INIT;
+ rdl->status = RDLINE_STOPPED;
}
void
cirbuf_add_tail(&rdl->left, tmp);
}
cirbuf_align_left(&rdl->left);
- rdl->left_buf[CIRBUF_GET_LEN(&rdl->left)] = '\n';
- rdl->left_buf[CIRBUF_GET_LEN(&rdl->left) + 1] = '\0';
+ rdl->left_buf[CIRBUF_GET_LEN(&rdl->left)] = '\0';
rdline_printf(rdl, "\r\n");
#ifndef NO_RDLINE_HISTORY
if (rdl->history_cur_line != -1)
}
rdline_asyncpager_reset(rdl);
- rdl->status = RDLINE_INIT;
#else
if (rdl->status == RDLINE_EXITED)
return RDLINE_RES_EXITED;