summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-03 10:18:32 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-03 10:18:32 +0000
commit9bb907f2a72721f7da4e67365d0ed6765f945006 (patch)
treecae5422b90725e9c7004801998284b96a3067baf /window.c
parent7ccdbf392d87fc7ad9e79dc5a642c415386a72aa (diff)
Move command handling into the server and tidy up some bits.
Diffstat (limited to 'window.c')
-rw-r--r--window.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/window.c b/window.c
index e29fd766..67a37be2 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.15 2007-10-01 14:15:48 nicm Exp $ */
+/* $Id: window.c,v 1.16 2007-10-03 10:18:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -288,25 +288,11 @@ window_poll(struct window *w, struct pollfd *pfd)
return (0);
}
-/* Process window input. */
+/* Process window key. */
void
-window_input(struct window *w, struct buffer *b, size_t size)
+window_key(struct window *w, int key)
{
- int key;
-
- while (size != 0) {
- if (size < 1)
- break;
- size--;
- key = input_extract8(b);
- if (key == '\e') {
- if (size < 2)
- fatalx("underflow");
- size -= 2;
- key = (int16_t) input_extract16(b);
- }
- input_translate_key(w->out, key);
- }
+ input_translate_key(w->out, key);
}
/*
@@ -314,7 +300,7 @@ window_input(struct window *w, struct buffer *b, size_t size)
* sequences and strings and returned.
*/
void
-window_output(struct window *w, struct buffer *b)
+window_data(struct window *w, struct buffer *b)
{
FILE *f;