/*
+ * $Id: pap.c,v 1.6 2001-06-29 14:14:46 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <sys/types.h>
#include <sys/time.h>
#include <atalk/pap.h>
#include <atalk/nbp.h>
#include <atalk/util.h>
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif /* HAVE_FCNTL_H */
#include <stdio.h>
#include <string.h>
#include <string.h>
/* if there is a less hacky way to do this, please do it... */
#ifdef DEBUG
#define EBUG
-#endif
+#endif /* DEBUG */
#undef DEBUG
case 'W' :
waitforidle = 1;
break;
-#endif /*FUCKED*/
+#endif /* FUCKED */
case 'c' :
cuts++;
fprintf( stderr, "Bad status response!\n" );
exit( 1 );
}
-#endif /*NONZEROSTATUS*/
+#endif /* NONZEROSTATUS */
if ( ((char *)rniov[ 0 ].iov_base)[ 1 ] != PAP_STATUS ||
atpb.atp_rresiovcnt != 1 ) {
fprintf( stderr, "Bad connid in close!\n" );
exit( 1 );
}
-#endif /*ZEROCONNID*/
+#endif /* ZEROCONNID */
DEBUG( printf( "< CLOSEREPLY\n" ), fflush( stdout ));
}
if ( rseq++ == 0xffff ) rseq = 1;
}
-#endif /*notdef*/
+#endif /* notdef */
data = 1;
port = ssat.sat_port;
fprintf( stderr, "Bad data response!\n" );
exit( 1 );
}
-#endif /*ZEROCONNID*/
+#endif /* ZEROCONNID */
if ( ((char *)rniov[ 0 ].iov_base)[ 1 ] != PAP_DATA ) {
fprintf( stderr, "Bad data response!\n" );
exit( 1 );
fprintf( stderr, "Bad status response!\n" );
exit( 1 );
}
-#endif /*NONZEROSTATUS*/
+#endif /* NONZEROSTATUS */
if ( ((char *)rniov[ 0 ].iov_base)[ 1 ] != PAP_STATUS ||
atpb.atp_rresiovcnt != 1 ) {
waitforprinter = 0;
}
}
-#endif /*FUCKED*/
+#endif /* FUCKED */
updatestatus( (char *) rniov[ 0 ].iov_base + 9,
((char *)rniov[ 0 ].iov_base)[ 8 ] );