From 9b08a567c1d6bdc82429bde3fafebf9effe09bba Mon Sep 17 00:00:00 2001 From: sheldonh Date: Fri, 2 Jul 1999 12:31:31 +0000 Subject: Back out previous commit. Allowing `-' as a pseudonym for /dev/stdin is legacy behaviour inherited from systems that don't have /dev/stdin. Requested by: bde --- usr.sbin/ac/ac.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'usr.sbin/ac/ac.c') diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c index 1d73bd0..f9f90eb 100644 --- a/usr.sbin/ac/ac.c +++ b/usr.sbin/ac/ac.c @@ -15,7 +15,7 @@ #ifndef lint static const char rcsid[] = - "$Id: ac.c,v 1.10 1998/07/02 05:34:08 phk Exp $"; + "$Id: ac.c,v 1.11 1999/06/30 21:46:03 sheldonh Exp $"; #endif /* not lint */ #include @@ -106,20 +106,12 @@ file(name) { FILE *fp; - /* - * Added by GAW... - */ - if (strcmp("-", name) == 0) { + if ((fp = fopen(name, "r")) == NULL) + err(1, "%s", name); + /* in case we want to discriminate */ + if (strcmp(_PATH_WTMP, name)) Flags |= AC_W; - return (stdin); - } else { - if ((fp = fopen(name, "r")) == NULL) - err(1, "%s", name); - /* in case we want to discriminate */ - if (strcmp(_PATH_WTMP, name)) - Flags |= AC_W; - return fp; - } + return fp; } struct tty_list * -- cgit v1.1