/*
- * "$Id: parallel.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: parallel.c 5241 2006-03-07 22:07:44Z mike $"
*
* Parallel port backend for the Common UNIX Printing System (CUPS).
*
#include <errno.h>
#include <cups/string.h>
#include <signal.h>
-#include <sys/select.h>
#include "ieee1284.c"
+#ifdef __hpux
+# include <sys/time.h>
+#else
+# include <sys/select.h>
+#endif /* __hpux */
+
#ifdef WIN32
# include <io.h>
#else
* Open the parallel port device...
*/
+ fputs("STATE: +connecting-to-device\n", stderr);
+
do
{
if ((fd = open(resource, O_WRONLY | O_EXCL)) == -1)
}
while (fd < 0);
+ fputs("STATE: -connecting-to-device\n", stderr);
+
/*
* Set any options provided...
*/
{
fprintf(stderr, "DEBUG: Received %d bytes of back-channel data!\n",
rbytes);
- cupsBackchannelWrite(resource, rbytes, 1.0);
+ cupsBackChannelWrite(resource, rbytes, 1.0);
}
}
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d\"\n", device, i + 1);
}
}
-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
int i; /* Looping var */
int fd; /* File descriptor */
char device[255]; /* Device filename */
/*
- * End of "$Id: parallel.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: parallel.c 5241 2006-03-07 22:07:44Z mike $".
*/