Module Name:    src
Committed By:   dsl
Date:           Wed Nov  4 21:51:12 UTC 2009

Modified Files:
        src/lib/libcurses: get_wch.c getch.c

Log Message:
Read input from the correct FILE.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libcurses/get_wch.c
cvs rdiff -u -r1.53 -r1.54 src/lib/libcurses/getch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/get_wch.c
diff -u src/lib/libcurses/get_wch.c:1.7 src/lib/libcurses/get_wch.c:1.8
--- src/lib/libcurses/get_wch.c:1.7	Sun Nov  1 22:11:27 2009
+++ src/lib/libcurses/get_wch.c	Wed Nov  4 21:51:11 2009
@@ -1,4 +1,4 @@
-/*   $NetBSD: get_wch.c,v 1.7 2009/11/01 22:11:27 dsl Exp $ */
+/*   $NetBSD: get_wch.c,v 1.8 2009/11/04 21:51:11 dsl Exp $ */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: get_wch.c,v 1.7 2009/11/01 22:11:27 dsl Exp $");
+__RCSID("$NetBSD: get_wch.c,v 1.8 2009/11/04 21:51:11 dsl Exp $");
 #endif						  /* not lint */
 
 #include <string.h>
@@ -99,7 +99,7 @@
 		if (wstate == INKEY_NORM) {
 			if (delay && __timeout(delay) == ERR)
 				return ERR;
-			c = getchar();
+			c = fgetc(infd);
 			if (c == WEOF) {
 				clearerr(infd);
 				return ERR;
@@ -147,7 +147,7 @@
 					return ERR;
 			}
 
-			c = getchar();
+			c = fgetc(infd);
 			if (ferror(infd)) {
 				clearerr(infd);
 				return ERR;
@@ -197,7 +197,7 @@
 					return ERR;
 			}
 
-			c = getchar();
+			c = fgetc(infd);
 			if (ferror(infd)) {
 				clearerr(infd);
 				return ERR;

Index: src/lib/libcurses/getch.c
diff -u src/lib/libcurses/getch.c:1.53 src/lib/libcurses/getch.c:1.54
--- src/lib/libcurses/getch.c:1.53	Sun Nov  1 22:11:27 2009
+++ src/lib/libcurses/getch.c	Wed Nov  4 21:51:11 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: getch.c,v 1.53 2009/11/01 22:11:27 dsl Exp $	*/
+/*	$NetBSD: getch.c,v 1.54 2009/11/04 21:51:11 dsl Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)getch.c	8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: getch.c,v 1.53 2009/11/01 22:11:27 dsl Exp $");
+__RCSID("$NetBSD: getch.c,v 1.54 2009/11/04 21:51:11 dsl Exp $");
 #endif
 #endif					/* not lint */
 
@@ -557,7 +557,7 @@
 		if (state == INKEY_NORM) {
 			if (delay && __timeout(delay) == ERR)
 				return ERR;
-			c = getchar();
+			c = fgetc(infd);
 			if (c == EOF) {
 				clearerr(infd);
 				return ERR;
@@ -599,7 +599,7 @@
 					return ERR;
 			}
 
-			c = getchar();
+			c = fgetc(infd);
 			if (ferror(infd)) {
 				clearerr(infd);
 				return ERR;
@@ -869,7 +869,7 @@
 			break;
 		}
 
-		c = getchar();
+		c = fgetc(infd);
 		if (feof(infd)) {
 			clearerr(infd);
 			__restore_termios();

Reply via email to