diff options
Diffstat (limited to 'filter/gziptoany.c')
-rw-r--r-- | filter/gziptoany.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/filter/gziptoany.c b/filter/gziptoany.c index 81a3f17d8..e8e1340d4 100644 --- a/filter/gziptoany.c +++ b/filter/gziptoany.c @@ -1,22 +1,18 @@ /* - * "$Id: gziptoany.c 10996 2013-05-29 11:51:34Z msweet $" + * "$Id: gziptoany.c 11558 2014-02-06 18:33:34Z msweet $" * - * GZIP/raw pre-filter for CUPS. + * GZIP/raw pre-filter for CUPS. * - * Copyright 2007-2012 by Apple Inc. - * Copyright 1993-2007 by Easy Software Products. + * Copyright 2007-2014 by Apple Inc. + * Copyright 1993-2007 by Easy Software Products. * - * These coded instructions, statements, and computer programs are the - * 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/". + * These coded instructions, statements, and computer programs are the + * 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. - * - * Contents: - * - * main() - Copy (and uncompress) files to stdout. + * This file is subject to the Apple OS-Developed Software exception. */ /* @@ -36,7 +32,7 @@ main(int argc, /* I - Number of command-line arguments */ { cups_file_t *fp; /* File */ char buffer[8192]; /* Data buffer */ - int bytes; /* Number of bytes read/written */ + ssize_t bytes; /* Number of bytes read/written */ int copies; /* Number of copies */ @@ -84,7 +80,7 @@ main(int argc, /* I - Number of command-line arguments */ cupsFileRewind(fp); while ((bytes = cupsFileRead(fp, buffer, sizeof(buffer))) > 0) - if (write(1, buffer, bytes) < bytes) + if (write(1, buffer, (size_t)bytes) < bytes) { _cupsLangPrintFilter(stderr, "ERROR", _("Unable to write uncompressed print data: %s"), @@ -108,5 +104,5 @@ main(int argc, /* I - Number of command-line arguments */ /* - * End of "$Id: gziptoany.c 10996 2013-05-29 11:51:34Z msweet $". + * End of "$Id: gziptoany.c 11558 2014-02-06 18:33:34Z msweet $". */ |