]> arthur.barton.de Git - netatalk.git/commitdiff
Check STDOUT to see if it's a terminal rather than STDIN.
authorjmarcus <jmarcus>
Mon, 25 Nov 2002 01:33:02 +0000 (01:33 +0000)
committerjmarcus <jmarcus>
Mon, 25 Nov 2002 01:33:02 +0000 (01:33 +0000)
Submitted by: Tom Kacvinsky

bin/pap/pap.c

index 456eff37b398a8f18baf051f34b71acc8261f9e7..c0df79662c972472025729ff0a7c65a09ac77775 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pap.c,v 1.8 2002-05-07 04:55:26 morgana Exp $
+ * $Id: pap.c,v 1.9 2002-11-25 01:33:02 jmarcus Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -245,7 +245,7 @@ int main( ac, av )
        exit( 1 );
     }
 
-    if ( isatty( 0 )) {
+    if ( isatty( 1 )) {
        printf( "Trying %u.%d:%d ...\n", ntohs( nn.nn_sat.sat_addr.s_net ),
                nn.nn_sat.sat_addr.s_node, nn.nn_sat.sat_port );
     }