Source-Changes-HG archive

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

[src/trunk]: src/games/wump Use STD*_FILENO.



details:   https://anonhg.NetBSD.org/src/rev/4eafc17ee7ed
branches:  trunk
changeset: 476241:4eafc17ee7ed
user:      kleink <kleink%NetBSD.org@localhost>
date:      Fri Sep 10 10:47:56 1999 +0000

description:
Use STD*_FILENO.

diffstat:

 games/wump/wump.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 60db36d650f6 -r 4eafc17ee7ed games/wump/wump.c
--- a/games/wump/wump.c Fri Sep 10 10:38:06 1999 +0000
+++ b/games/wump/wump.c Fri Sep 10 10:47:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wump.c,v 1.10 1999/09/09 17:30:20 jsm Exp $    */
+/*     $NetBSD: wump.c,v 1.11 1999/09/10 10:47:56 kleink Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -47,7 +47,7 @@
 #if 0
 static char sccsid[] = "@(#)wump.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: wump.c,v 1.10 1999/09/09 17:30:20 jsm Exp $");
+__RCSID("$NetBSD: wump.c,v 1.11 1999/09/10 10:47:56 kleink Exp $");
 #endif
 #endif /* not lint */
 
@@ -746,7 +746,7 @@
                return;
        }
 
-       if (!isatty(1))
+       if (!isatty(STDOUT_FILENO))
                pager = "cat";
        else {
                if (!(pager = getenv("PAGER")) || (*pager == 0))
@@ -756,7 +756,7 @@
        case 0: /* child */
                if ((fd = open(_PATH_WUMPINFO, O_RDONLY)) == -1)
                        err(1, "open %s", _PATH_WUMPINFO);
-               if (dup2(fd, 0) == -1)
+               if (dup2(fd, STDIN_FILENO) == -1)
                        err(1, "dup2");
                (void)execl("/bin/sh", "sh", "-c", pager, NULL);
                err(1, "exec sh -c %s", pager);



Home | Main Index | Thread Index | Old Index