]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/parallel.c
Load cups into easysw/current.
[thirdparty/cups.git] / backend / parallel.c
index d1a85a0bb43c885225996e2a94db150a27717499..6acb8134fdc1a256f1df2d2b817c7233a4a31bad 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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
@@ -197,6 +202,8 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
   * Open the parallel port device...
   */
 
+  fputs("STATE: +connecting-to-device\n", stderr);
+
   do
   {
     if ((fd = open(resource, O_WRONLY | O_EXCL)) == -1)
@@ -242,6 +249,8 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
   }
   while (fd < 0);
 
+  fputs("STATE: -connecting-to-device\n", stderr);
+
  /*
   * Set any options provided...
   */
@@ -361,7 +370,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
          {
            fprintf(stderr, "DEBUG: Received %d bytes of back-channel data!\n",
                    rbytes);
-            cupsBackchannelWrite(resource, rbytes, 1.0);
+            cupsBackChannelWrite(resource, rbytes, 1.0);
           }
        }
 
@@ -686,7 +695,7 @@ list_devices(void)
       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 */
@@ -728,5 +737,5 @@ list_devices(void)
 
 
 /*
- * 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 $".
  */