From owner-freebsd-arch Wed Jul 24 7:47:14 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A51F637B400 for ; Wed, 24 Jul 2002 07:47:09 -0700 (PDT) Received: from smtp.noos.fr (claudel.noos.net [212.198.2.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 575B843E42 for ; Wed, 24 Jul 2002 07:47:08 -0700 (PDT) (envelope-from root@gits.dyndns.org) Received: (qmail 33742708 invoked by uid 0); 24 Jul 2002 14:47:07 -0000 Received: from unknown (HELO gits.gits.dyndns.org) ([212.198.229.153]) (envelope-sender ) by 212.198.2.83 (qmail-ldap-1.03) with SMTP for ; 24 Jul 2002 14:47:07 -0000 Received: from gits.gits.dyndns.org (dj9ue95h6z6d1o5c@localhost [127.0.0.1]) by gits.gits.dyndns.org (8.12.5/8.12.5) with ESMTP id g6OEl6q4014033; Wed, 24 Jul 2002 16:47:06 +0200 (CEST) (envelope-from root@gits.dyndns.org) Received: (from root@localhost) by gits.gits.dyndns.org (8.12.5/8.12.5/Submit) id g6OEl6NS014032; Wed, 24 Jul 2002 16:47:06 +0200 (CEST) (envelope-from root) Date: Wed, 24 Jul 2002 16:47:06 +0200 From: Cyrille Lefevre To: freebsd-gnats-submit@FreeBSD.org, howardjp@wam.umd.edu Cc: freebsd arch Subject: Re: bin/13072: Extensions to biff(1) Message-ID: <20020724144705.GA13971@gits.dyndns.org> Mail-Followup-To: Cyrille Lefevre , freebsd-gnats-submit@FreeBSD.org, howardjp@wam.umd.edu, freebsd arch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.99i Organization: ACME X-Face: V|+c;4!|B?E%BE^{E6);aI.[< List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG see PR #13073 for comments. * errno.h and string.h not needed. * other headers sorted (see style(9)). Index: /usr/src/usr.bin/biff/biff.c =================================================================== RCS file: /home/ncvs/src/usr.bin/biff/biff.c,v retrieving revision 1.6.2.3 diff -u -r1.6.2.3 biff.c --- /usr/src/usr.bin/biff/biff.c 2 Aug 2001 01:06:37 -0000 1.6.2.3 +++ /usr/src/usr.bin/biff/biff.c 24 Jul 2002 14:36:05 -0000 @@ -45,12 +45,11 @@ #include #include -#include -#include + +#include #include #include -#include -#include +#include int main __P((int, char *[])); static void usage __P((void)); @@ -66,7 +65,7 @@ while ((ch = getopt(argc, argv, "")) != -1) - switch(ch) { + switch (ch) { case '?': default: usage(); @@ -74,7 +73,9 @@ argc -= optind; argv += optind; - if ((name = ttyname(STDERR_FILENO)) == NULL) + if ((name = ttyname(STDIN_FILENO)) == NULL && + (name = ttyname(STDOUT_FILENO)) == NULL && + (name = ttyname(STDERR_FILENO)) == NULL) err(2, "unknown tty"); if (stat(name, &sb)) Cyrille. -- Cyrille Lefevre mailto:cyrille.lefevre@laposte.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message