Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Read input from the correct FILE.
details: https://anonhg.NetBSD.org/src/rev/51bce7a25cc2
branches: trunk
changeset: 748766:51bce7a25cc2
user: dsl <dsl%NetBSD.org@localhost>
date: Wed Nov 04 21:51:11 2009 +0000
description:
Read input from the correct FILE.
diffstat:
lib/libcurses/get_wch.c | 10 +++++-----
lib/libcurses/getch.c | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diffs (90 lines):
diff -r 1e5c49ed6d8b -r 51bce7a25cc2 lib/libcurses/get_wch.c
--- a/lib/libcurses/get_wch.c Wed Nov 04 21:46:24 2009 +0000
+++ b/lib/libcurses/get_wch.c Wed Nov 04 21:51:11 2009 +0000
@@ -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;
diff -r 1e5c49ed6d8b -r 51bce7a25cc2 lib/libcurses/getch.c
--- a/lib/libcurses/getch.c Wed Nov 04 21:46:24 2009 +0000
+++ b/lib/libcurses/getch.c Wed Nov 04 21:51:11 2009 +0000
@@ -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();
Home |
Main Index |
Thread Index |
Old Index