projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce a sane interface function, from_backend(), for backends to
[u/mdw/putty]
/
terminal.c
diff --git
a/terminal.c
b/terminal.c
index
7d3c60c
..
4cd003a
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-215,6
+215,7
@@
void term_update(void) {
(seen_disp_event && (!cfg.scroll_on_key)) ) {
disptop = scrtop;
seen_disp_event = seen_key_event = 0;
(seen_disp_event && (!cfg.scroll_on_key)) ) {
disptop = scrtop;
seen_disp_event = seen_key_event = 0;
+ update_sbar();
}
do_paint (ctx, TRUE);
sys_cursor(curs_x, curs_y + (scrtop - disptop) / (cols+1));
}
do_paint (ctx, TRUE);
sys_cursor(curs_x, curs_y + (scrtop - disptop) / (cols+1));
@@
-2187,3
+2188,14
@@
void term_deselect (void) {
deselect();
term_update();
}
deselect();
term_update();
}
+
+/*
+ * from_backend(), to get data from the backend for the terminal.
+ */
+void from_backend(int is_stderr, char *data, int len) {
+ while (len--) {
+ if (inbuf_head >= INBUF_SIZE)
+ term_out();
+ inbuf[inbuf_head++] = *data++;
+ }
+}