summaryrefslogtreecommitdiff
path: root/src/fe-text/term-terminfo.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-10-28 23:47:47 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-10-28 23:47:47 +0000
commit801e593718fe5494d3b9b357307242bc11873c48 (patch)
tree1b1bfa7581a037641f41f5f48855b60997b998d9 /src/fe-text/term-terminfo.c
parent09ca58961bc0f9c5a713f4ac20192b73d25c33a6 (diff)
downloadirssi-801e593718fe5494d3b9b357307242bc11873c48.zip
term_getch() -> term_gets() which can be used to read multiple keypresses at
once. Also fixes keyboard not working with netbsd. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1935 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/term-terminfo.c')
-rw-r--r--src/fe-text/term-terminfo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c
index 9beccbf0..f17e354f 100644
--- a/src/fe-text/term-terminfo.c
+++ b/src/fe-text/term-terminfo.c
@@ -312,7 +312,8 @@ void term_stop(void)
irssi_redraw();
}
-int term_getch(void)
+int term_gets(unsigned char *buffer, int size)
{
- return fgetc(current_term->in);
+ /* fread() doesn't work */
+ return read(fileno(current_term->in), buffer, size);
}