]> arthur.barton.de Git - netatalk.git/blobdiff - bin/pap/pap.c
Update NEWS
[netatalk.git] / bin / pap / pap.c
index de707217a2f8ac78eeb2fe85fd46f64be3d9a250..a8c97adc501455e0479aba564575d4c572011416 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pap.c,v 1.12 2009-10-14 01:38:28 didg Exp $
+ * $Id: pap.c,v 1.14 2009-10-16 01:10:59 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -30,7 +30,6 @@
 #define FUCKED
 
 #define _PATH_PAPRC    ".paprc"
-static char    *nbpfailure = "AppleTalk printer offline";
 
 /* Forward Declarations */
 static void updatestatus(char *s, int len);
@@ -321,7 +320,7 @@ int main( int ac, char      **av)
     cbuf[ 2 ] = cbuf[ 3 ] = 0;
     cbuf[ 4 ] = atp_sockaddr( atp )->sat_port;
     cbuf[ 5 ] = oquantum;      /* flow quantum */
-    if ( gettimeofday( &stv, 0 ) < 0 ) {
+    if ( gettimeofday( &stv, NULL ) < 0 ) {
        perror( "gettimeofday" );
        exit( 2 );
     }
@@ -329,7 +328,7 @@ int main( int ac, char      **av)
        if ( cuts ) {
            waiting = 0xffff;
        } else {
-           if ( gettimeofday( &tv, 0 ) < 0 ) {
+           if ( gettimeofday( &tv, NULL ) < 0 ) {
                perror( "gettimeofday" );
                exit( 2 );
            }
@@ -465,7 +464,7 @@ int main( int ac, char      **av)
 
 static int             data = 0;
 static unsigned char   port;
-static u_int16_t       seq = 0, rseq = 1;
+static u_int16_t       seq = 0;
 
 static int send_file( int fd, ATP atp, int lastfile)
 {
@@ -477,7 +476,7 @@ static int send_file( int fd, ATP atp, int lastfile)
     int                        cc, i;
     unsigned short     netseq;
 
-    if ( gettimeofday( &stv, 0 ) < 0 ) {
+    if ( gettimeofday( &stv, NULL ) < 0 ) {
        perror( "gettimeofday" );
        exit( 2 );
     }
@@ -503,7 +502,7 @@ static int send_file( int fd, ATP atp, int lastfile)
        if(debug){ printf( "READ %d >\n", seq ), fflush( stdout );}
 
     for (;;) {
-       if ( gettimeofday( &tv, 0 ) < 0 ) {
+       if ( gettimeofday( &tv, NULL ) < 0 ) {
            perror( "gettimeofday" );
            exit( 2 );
        }
@@ -539,7 +538,7 @@ static int send_file( int fd, ATP atp, int lastfile)
        }
        FD_SET( atp_fileno( atp ), &fds );
 
-       if (( cc = select( FD_SETSIZE, &fds, 0, 0, &tv )) < 0 ) {
+       if (( cc = select( FD_SETSIZE, &fds, NULL, NULL, &tv )) < 0 ) {
            perror( "select" );
            exit( 2 );
        }