2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: bufioI.h /main/5 1995/10/26 12:36:33 rswiston $ */
24 #ifndef _DtHelpbufioI_h
25 #define _DtHelpbufioI_h
27 #include <stdio.h> /* for FILE */
33 #define BUFFILESIZE 4096
36 typedef unsigned char BufChar;
38 typedef struct _buffile {
41 BufChar buffer[BUFFILESIZE];
42 int (*io)(/* BufFilePtr f */);
43 int (*skip)(/* BufFilePtr f, int count */);
44 int (*close)(/* BufFilePtr f */);
46 } BufFileRec, *BufFilePtr;
48 typedef struct _compressInfo{
51 } CECompressInfo, *CECompressInfoPtr;
53 extern BufFilePtr __DtBufFileCreate ();
54 extern BufFilePtr _DtHelpCeBufFilePushZ ();
55 extern BufFilePtr _DtHelpCeBufFileOpenWr ();
56 extern int _DtHelpCeBufFileFlush ();
57 #define BufFileGet(f) ((f)->left-- ? *(f)->bufp++ : (*(f)->io) (f))
58 #define BufFilePut(c,f) (--(f)->left ? *(f)->bufp++ = (c) : (*(f)->io) (c,f))
59 #define BufFilePutBack(c,f) { (f)->left++; *(--(f)->bufp) = (c); }
60 #define BufFileSkip(f,c) ((*(f)->skip) (f, c))
62 #define FileStream(f) ((FILE *)(f)->hidden)
64 extern void _DtHelpCeBufFileClose (
67 extern BufFilePtr _DtHelpCeBufFileCreate (
72 extern int _DtHelpCeBufFileRd (
76 extern BufFilePtr _DtHelpCeBufFileRdWithFd (
78 extern BufFilePtr _DtHelpCeBufFileRdRawZ (
79 CECompressInfoPtr file_info);
80 extern BufFilePtr _DtHelpCeCreatePipeBufFile (
82 extern int _DtHelpCeUncompressFile (
93 #endif /* _DtHelpbufioI_h */