aboutsummaryrefslogtreecommitdiffstats
path: root/terms.c
diff options
context:
space:
mode:
Diffstat (limited to 'terms.c')
-rw-r--r--terms.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/terms.c b/terms.c
index fbe9815..a6e3fa9 100644
--- a/terms.c
+++ b/terms.c
@@ -1,4 +1,4 @@
-/* $Id: terms.c,v 1.27 2001/12/25 16:54:45 ukai Exp $ */
+/* $Id: terms.c,v 1.28 2002/01/31 17:54:56 ukai Exp $ */
/*
* An original curses library for EUC-kanji by Akinori ITO, December 1989
* revised by Akinori ITO, January 1995
@@ -1865,7 +1865,14 @@ wgetch(void)
{
char c;
- read(tty, &c, 1);
+ /* read(tty, &c, 1); */
+ while (read(tty, &c, 1) < (ssize_t) 1) {
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
+ /* error happend on read(2) */
+ quitfm();
+ break; /* unreachable */
+ }
return c;
}
@@ -2159,3 +2166,20 @@ flush_tty()
{
fflush(ttyf);
}
+
+#ifdef USE_IMAGE
+void
+touch_cursor()
+{
+ touch_line();
+ touch_column(CurColumn);
+#ifdef JP_CHARSET
+ if (CurColumn > 0 &&
+ CHMODE(ScreenImage[CurLine]->lineprop[CurColumn]) == C_WCHAR2)
+ touch_column(CurColumn - 1);
+ else if (CurColumn < COLS - 1 &&
+ CHMODE(ScreenImage[CurLine]->lineprop[CurColumn]) == C_WCHAR1)
+ touch_column(CurColumn + 1);
+#endif
+}
+#endif