]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/file.c
Merge changes from CUPS 1.4svn-r8394.
[thirdparty/cups.git] / cups / file.c
index 722a8323b66a41bf656455b3d84ac76c32bde386..ed54f22fc8ca560011bb1065d183edea81f85cf8 100644 (file)
@@ -8,7 +8,7 @@
  *   our own file functions allows us to provide transparent support of
  *   gzip'd print files, PPD files, etc.
  *
- *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 2007-2009 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
  * Include necessary headers...
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include "http-private.h"
-#include "globals.h"
-#include "debug.h"
-
-#ifdef HAVE_LIBZ
-#  include <zlib.h>
-#endif /* HAVE_LIBZ */
-#ifdef WIN32
-#  include <io.h>
-#  include <sys/locking.h>
-#endif /* WIN32 */
-
-
-/*
- * Some operating systems support large files via open flag O_LARGEFILE...
- */
-
-#ifndef O_LARGEFILE
-#  define O_LARGEFILE 0
-#endif /* !O_LARGEFILE */
-
-
-/*
- * Some operating systems don't define O_BINARY, which is used by Microsoft
- * and IBM to flag binary files...
- */
-
-#ifndef O_BINARY
-#  define O_BINARY 0
-#endif /* !O_BINARY */
-
-
-/*
- * Types and structures...
- */
-
-struct _cups_file_s                    /**** CUPS file structure... ****/
-
-{
-  int          fd;                     /* File descriptor */
-  char         mode,                   /* Mode ('r' or 'w') */
-               compressed,             /* Compression used? */
-               is_stdio,               /* stdin/out/err? */
-               eof,                    /* End of file? */
-               buf[4096],              /* Buffer */
-               *ptr,                   /* Pointer into buffer */
-               *end;                   /* End of buffer data */
-  off_t                pos,                    /* Position in file */
-               bufpos;                 /* File position for start of buffer */
-
-#ifdef HAVE_LIBZ
-  z_stream     stream;                 /* (De)compression stream */
-  Bytef                cbuf[4096];             /* (De)compression buffer */
-  uLong                crc;                    /* (De)compression CRC */
-#endif /* HAVE_LIBZ */
-
-  char         *printf_buffer;         /* cupsFilePrintf buffer */
-  size_t       printf_size;            /* Size of cupsFilePrintf buffer */
-};
+#include "file-private.h"
 
 
 /*