summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c1d9d29)
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
return cmdline_complete(cl, buf, state, dstbuf, dstsize);
}
return cmdline_complete(cl, buf, state, dstbuf, dstsize);
}
cmdline_write_char(struct rdline *rdl, char c)
{
cmdline_write_char(struct rdline *rdl, char c)
{
struct cmdline *cl = rdl->opaque;
struct cmdline *cl = rdl->opaque;
- if (cl->s_out >= 0) {
- write(cl->s_out, &c, 1);
- }
+
+ if (cl->s_out >= 0)
+ ret = write(cl->s_out, &c, 1);
+
+ return ret;
- read(cl->s_in, &c, 1);
- if (cmdline_in(cl, &c, 1) < 0) {
+ if (read(cl->s_in, &c, 1) < 0)
+ break;
+ if (cmdline_in(cl, &c, 1) < 0)
void cmdline_free(struct cmdline *cl);
void cmdline_printf(const struct cmdline *cl, const char *fmt, ...);
int cmdline_in(struct cmdline *cl, const char *buf, int size);
void cmdline_free(struct cmdline *cl);
void cmdline_printf(const struct cmdline *cl, const char *fmt, ...);
int cmdline_in(struct cmdline *cl, const char *buf, int size);
-void cmdline_write_char(struct rdline *rdl, char c);
+int cmdline_write_char(struct rdline *rdl, char c);
void cmdline_interact(struct cmdline *cl);
void cmdline_quit(struct cmdline *cl);
void cmdline_interact(struct cmdline *cl);
void cmdline_quit(struct cmdline *cl);