/*
- * $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.
#define FUCKED
#define _PATH_PAPRC ".paprc"
-static char *nbpfailure = "AppleTalk printer offline";
/* Forward Declarations */
static void updatestatus(char *s, int len);
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 );
}
if ( cuts ) {
waiting = 0xffff;
} else {
- if ( gettimeofday( &tv, 0 ) < 0 ) {
+ if ( gettimeofday( &tv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
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)
{
int cc, i;
unsigned short netseq;
- if ( gettimeofday( &stv, 0 ) < 0 ) {
+ if ( gettimeofday( &stv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
if(debug){ printf( "READ %d >\n", seq ), fflush( stdout );}
for (;;) {
- if ( gettimeofday( &tv, 0 ) < 0 ) {
+ if ( gettimeofday( &tv, NULL ) < 0 ) {
perror( "gettimeofday" );
exit( 2 );
}
}
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 );
}