summaryrefslogtreecommitdiff
path: root/filter/gziptoany.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2011-02-25 01:40:44 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2011-02-25 01:40:44 +0000
commitc8fef167ba1e9d5d87fc77e4e99ca12ba9384cbb (patch)
treeb96b096d1eacae0e337b3ab3d16aa2652a5bf07f /filter/gziptoany.c
parente60ec91f3e2a38a90f17ee193db32f5c6bef27ed (diff)
downloadcups-c8fef167ba1e9d5d87fc77e4e99ca12ba9384cbb.tar.gz
Merge changes from CUPS 1.5svn-r9567
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3015 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'filter/gziptoany.c')
-rw-r--r--filter/gziptoany.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/filter/gziptoany.c b/filter/gziptoany.c
index 4114511f9..404ce6e3a 100644
--- a/filter/gziptoany.c
+++ b/filter/gziptoany.c
@@ -3,7 +3,7 @@
*
* GZIP/raw pre-filter for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1993-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -76,8 +76,6 @@ main(int argc, /* I - Number of command-line arguments */
* Copy the file to stdout...
*/
- setbuf(stdout, NULL);
-
while (copies > 0)
{
if (!getenv("FINAL_CONTENT_TYPE"))
@@ -86,11 +84,11 @@ main(int argc, /* I - Number of command-line arguments */
cupsFileRewind(fp);
while ((bytes = cupsFileRead(fp, buffer, sizeof(buffer))) > 0)
- if (fwrite(buffer, 1, bytes, stdout) < bytes)
+ if (write(1, buffer, bytes) < bytes)
{
_cupsLangPrintFilter(stderr, "ERROR",
_("Unable to write uncompressed print data: %s"),
- strerror(ferror(stdout)));
+ strerror(errno));
cupsFileClose(fp);
return (1);