frontend: line-ed: move platform-specific code to separate directory

This commit is contained in:
2024-11-18 15:15:04 +00:00
parent 29447bf5ec
commit 96172eac84
8 changed files with 871 additions and 10 deletions

View File

@@ -54,6 +54,7 @@ struct line_ed *line_ed_create(void)
return NULL;
}
out->l_tty = s_get_tty();
out->l_buf_end = out->l_buf + LINE_MAX;
out->l_buf_ptr = out->l_buf;
out->l_line_end = out->l_buf;
@@ -178,7 +179,7 @@ long line_ed_readline(struct line_ed *ed, char *out, size_t max)
append_to_index = ed->l_history_pos;
}
struct s_tty *tty = s_get_tty();
struct s_tty *tty = ed->l_tty;
s_tty_set_raw(tty);
show_prompt(ed);