]>
git.ipfire.org Git - thirdparty/cups.git/blob - cups/file-private.h
4 * Private file definitions for CUPS.
6 * Since stdio files max out at 256 files on many systems, we have to
7 * write similar functions without this limit. At the same time, using
8 * our own file functions allows us to provide transparent support of
9 * gzip'd print files, PPD files, etc.
11 * Copyright 2007-2010 by Apple Inc.
12 * Copyright 1997-2007 by Easy Software Products, all rights reserved.
14 * These coded instructions, statements, and computer programs are the
15 * property of Apple Inc. and are protected by Federal copyright
16 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
17 * which should have been included with this file. If this file is
18 * file is missing or damaged, see the license at "http://www.cups.org/".
21 #ifndef _CUPS_FILE_PRIVATE_H_
22 # define _CUPS_FILE_PRIVATE_H_
25 * Include necessary headers...
28 # include "cups-private.h"
36 # endif /* HAVE_LIBZ */
39 # include <sys/locking.h>
44 * Some operating systems support large files via open flag O_LARGEFILE...
48 # define O_LARGEFILE 0
49 # endif /* !O_LARGEFILE */
53 * Some operating systems don't define O_BINARY, which is used by Microsoft
54 * and IBM to flag binary files...
59 # endif /* !O_BINARY */
63 * Types and structures...
66 struct _cups_file_s
/**** CUPS file structure... ****/
69 int fd
; /* File descriptor */
70 char mode
, /* Mode ('r' or 'w') */
71 compressed
, /* Compression used? */
72 is_stdio
, /* stdin/out/err? */
73 eof
, /* End of file? */
74 buf
[4096], /* Buffer */
75 *ptr
, /* Pointer into buffer */
76 *end
; /* End of buffer data */
77 off_t pos
, /* Position in file */
78 bufpos
; /* File position for start of buffer */
81 z_stream stream
; /* (De)compression stream */
82 Bytef cbuf
[4096]; /* (De)compression buffer */
83 uLong crc
; /* (De)compression CRC */
84 #endif /* HAVE_LIBZ */
86 char *printf_buffer
; /* cupsFilePrintf buffer */
87 size_t printf_size
; /* Size of cupsFilePrintf buffer */
91 #endif /* !_CUPS_FILE_PRIVATE_H_ */