Fix signedness problem for get_wch().
authorDavid Griffith <dave@661.org>
Sun, 5 May 2019 00:42:17 +0000 (17:42 -0700)
committerDavid Griffith <dave@661.org>
Sun, 5 May 2019 00:42:17 +0000 (17:42 -0700)
src/curses/ux_input.c

index 1d76f9163884bd2cfce4cd12cb54abf8b2330547..272ee6f63b750b53cf0d51ddae89f4f5963c9768 100644 (file)
@@ -66,6 +66,10 @@ extern bool is_terminator (zchar);
 extern void read_string (int, zchar *);
 extern int completion (const zchar *, zchar *);
 
+#ifndef wint_t
+typedef unsigned int wint_t;
+#endif
+
 /*
  * unix_set_global_timeout
  *
@@ -158,7 +162,8 @@ void os_tick()
  */
 static int unix_read_char(int extkeys)
 {
-    int c, sel, fd = fileno(stdin);
+    wint_t c;
+    int sel, fd = fileno(stdin);
     fd_set rsel;
     struct timeval tval, *t_left;