]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/backchannel.c
Load cups into easysw/current.
[thirdparty/cups.git] / cups / backchannel.c
index 98d660698b01fc0f800149ab8e7226c22cafe2fd..9b702172f34c1caebae45f61892d2352a9931848 100644 (file)
@@ -1,25 +1,16 @@
 /*
- * "$Id: backchannel.c 177 2006-06-21 00:20:03Z jlovell $"
+ * "$Id: backchannel.c 6649 2007-07-11 21:46:42Z mike $"
  *
  *   Backchannel functions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products.
+ *   Copyright 2007 by Apple Inc.
+ *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  *
  *   This file is subject to the Apple OS-Developed Software exception.
  *
@@ -95,7 +86,11 @@ cupsBackChannelRead(char   *buffer,  /* I - Buffer to read */
   * Read bytes from the pipe...
   */
 
+#ifdef WIN32
+  return ((ssize_t)read(3, buffer, (unsigned)bytes));
+#else
   return (read(3, buffer, bytes));
+#endif /* WIN32 */
 }
 
 
@@ -153,7 +148,11 @@ cupsBackChannelWrite(
     * Write bytes to the pipe...
     */
 
+#ifdef WIN32
+    count = (ssize_t)write(3, buffer, (unsigned)(bytes - total));
+#else
     count = write(3, buffer, bytes - total);
+#endif /* WIN32 */
 
     if (count < 0)
     {
@@ -175,7 +174,7 @@ cupsBackChannelWrite(
     }
   }
 
-  return (bytes);
+  return ((ssize_t)bytes);
 }
 
 
@@ -197,5 +196,5 @@ cups_setup(fd_set         *set,             /* I - Set for select() */
 
 
 /*
- * End of "$Id: backchannel.c 177 2006-06-21 00:20:03Z jlovell $".
+ * End of "$Id: backchannel.c 6649 2007-07-11 21:46:42Z mike $".
  */