From b645858c6c2c7597d2ae19cfefbcce6892fecf83 Mon Sep 17 00:00:00 2001 From: reed Date: Tue, 8 Nov 2005 18:05:23 +0000 Subject: Use patch from Thomas Dickey for this "tty-input". (Not bumping PKGREVISION, since it was bumped today for similar patch.) --- misc/dialog/patches/patch-aa | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'misc/dialog/patches') diff --git a/misc/dialog/patches/patch-aa b/misc/dialog/patches/patch-aa index a981132d511..7becff8e6bf 100644 --- a/misc/dialog/patches/patch-aa +++ b/misc/dialog/patches/patch-aa @@ -1,13 +1,14 @@ -$NetBSD: patch-aa,v 1.12 2005/11/08 14:42:10 joerg Exp $ +$NetBSD: patch-aa,v 1.13 2005/11/08 18:05:23 reed Exp $ ---- util.c.orig 2005-11-08 13:00:19.000000000 +0000 -+++ util.c -@@ -262,7 +262,7 @@ init_dialog(FILE *input, FILE *output) +--- util.c.orig 2005-10-30 12:15:17.000000000 -0800 ++++ util.c 2005-10-31 15:55:28.000000000 -0800 +@@ -264,7 +264,8 @@ if ((fd1 = open_terminal(&device, O_RDONLY)) >= 0 && (fd2 = dup(fileno(stdin))) >= 0) { dialog_state.pipe_input = fdopen(fd2, "r"); - *stdin = *freopen(device, "r", stdin); -+ freopen(device, "r", stdin); ++ if (freopen(device, "r", stdin) == 0) ++ dlg_exiterr("cannot open tty-input"); if (fileno(stdin) != 0) /* some functions may read fd #0 */ (void) dup2(fileno(stdin), 0); } -- cgit v1.2.3