/*
- * "$Id: ipp.c 5180 2006-02-26 01:31:45Z mike $"
+ * "$Id: ipp.c 5553 2006-05-20 12:22:27Z mike $"
*
* IPP backend for the Common UNIX Printing System (CUPS).
*
*ptr++ = *optptr++;
*ptr = '\0';
- if (*optptr == '+')
+ if (*optptr == '+' || *optptr == '&')
optptr ++;
}
else
* Try connecting to the remote server...
*/
+ fputs("STATE: +connecting-to-device\n", stderr);
+
do
{
fprintf(stderr, "INFO: Connecting to %s on port %d...\n", hostname, port);
}
while (http == NULL);
+ fputs("STATE: -connecting-to-device\n", stderr);
fprintf(stderr, "INFO: Connected to %s...\n", hostname);
/*
*out; /* Output file */
struct stat outinfo; /* Output file information */
char filename[1024], /* Temporary filename */
- buffer[65536]; /* Copy buffer */
+ buffer[32768]; /* Copy buffer */
fprintf(stderr, "DEBUG: Compressing %d job files...\n", num_files);
while ((bytes = cupsFileRead(in, buffer, sizeof(buffer))) > 0)
if (cupsFileWrite(out, buffer, bytes) < bytes)
{
- fprintf(stderr, "ERROR: Unable to write %d bytes to \"%s\": %s\n",
- bytes, filename, strerror(errno));
+ fprintf(stderr, "ERROR: Unable to write " CUPS_LLFMT " bytes to \"%s\": %s\n",
+ CUPS_LLCAST bytes, filename, strerror(errno));
cupsFileClose(in);
cupsFileClose(out);
exit(CUPS_BACKEND_FAILED);
fprintf(stderr,
"DEBUG: File %d compressed to %.1f%% of original size, "
CUPS_LLFMT " bytes...\n",
- i + 1, 100.0 * outinfo.st_size / total, outinfo.st_size);
+ i + 1, 100.0 * outinfo.st_size / total,
+ CUPS_LLCAST outinfo.st_size);
}
}
#endif /* HAVE_LIBZ */
/*
- * End of "$Id: ipp.c 5180 2006-02-26 01:31:45Z mike $".
+ * End of "$Id: ipp.c 5553 2006-05-20 12:22:27Z mike $".
*/