Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/lib/libcurses pullup 1.29 -> 1.30 (approved by releng-1-5)



details:   https://anonhg.NetBSD.org/src/rev/5faa0cf8e741
branches:  netbsd-1-5
changeset: 488858:5faa0cf8e741
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Aug 03 11:38:26 2000 +0000

description:
pullup 1.29 -> 1.30 (approved by releng-1-5)

 > fix 8bit cleanness of getch() and wgetch().  never use char variable against
 > stdio functions which return "int" (including getchar()).
 > the bug was introduced in 1.9 -> 1.10.  fixes PR10723.

diffstat:

 lib/libcurses/getch.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 85394f865c8a -r 5faa0cf8e741 lib/libcurses/getch.c
--- a/lib/libcurses/getch.c     Thu Aug 03 09:57:17 2000 +0000
+++ b/lib/libcurses/getch.c     Thu Aug 03 11:38:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getch.c,v 1.29 2000/05/25 06:46:26 jdc Exp $   */
+/*     $NetBSD: getch.c,v 1.29.4.1 2000/08/03 11:38:26 itojun Exp $    */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)getch.c    8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: getch.c,v 1.29 2000/05/25 06:46:26 jdc Exp $");
+__RCSID("$NetBSD: getch.c,v 1.29.4.1 2000/08/03 11:38:26 itojun Exp $");
 #endif
 #endif                                 /* not lint */
 
@@ -674,8 +674,8 @@
 int
 wgetch(WINDOW *win)
 {
-       int     inp, weset;
-       char    c;
+       int inp, weset;
+       int c;
 
        if (!(win->flags & __SCROLLOK) && (win->flags & __FULLWIN)
            && win->curx == win->maxx - 1 && win->cury == win->maxy - 1
@@ -742,7 +742,7 @@
                        clearerr(stdin);
                        inp = ERR;
                } else {
-                       inp = (unsigned int) c;
+                       inp = c;
                }
        }
 #ifdef DEBUG



Home | Main Index | Thread Index | Old Index