]>
git.ipfire.org Git - thirdparty/cups.git/blob - cups/file-private.h
4 * Private file definitions for the Common UNIX Printing System (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-2009 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...
33 # include "http-private.h"
39 # endif /* HAVE_LIBZ */
42 # include <sys/locking.h>
47 * Some operating systems support large files via open flag O_LARGEFILE...
51 # define O_LARGEFILE 0
52 # endif /* !O_LARGEFILE */
56 * Some operating systems don't define O_BINARY, which is used by Microsoft
57 * and IBM to flag binary files...
62 # endif /* !O_BINARY */
66 * Types and structures...
69 struct _cups_file_s
/**** CUPS file structure... ****/
72 int fd
; /* File descriptor */
73 char mode
, /* Mode ('r' or 'w') */
74 compressed
, /* Compression used? */
75 is_stdio
, /* stdin/out/err? */
76 eof
, /* End of file? */
77 buf
[4096], /* Buffer */
78 *ptr
, /* Pointer into buffer */
79 *end
; /* End of buffer data */
80 off_t pos
, /* Position in file */
81 bufpos
; /* File position for start of buffer */
84 z_stream stream
; /* (De)compression stream */
85 Bytef cbuf
[4096]; /* (De)compression buffer */
86 uLong crc
; /* (De)compression CRC */
87 #endif /* HAVE_LIBZ */
89 char *printf_buffer
; /* cupsFilePrintf buffer */
90 size_t printf_size
; /* Size of cupsFilePrintf buffer */
94 #endif /* !_CUPS_FILE_PRIVATE_H_ */