74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $Xorg: lbxbufstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Permission to use, copy, modify, distribute, and sell this software and
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * its documentation for any purpose is hereby granted without fee, provided
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * that the above copyright notice appear in all copies and that both that
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * copyright notice and this permission notice appear in supporting
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * documentation, and that the name Network Computing Devices, Inc. not be
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * used in advertising or publicity pertaining to distribution of this
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * software without specific, written prior permission.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * SOFTWARE.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $XFree86: xc/include/extensions/lbxbufstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#ifndef _BUFFERSTR_H_
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _BUFFERSTR_H_
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#include <X11/extensions/lbxbuf.h>
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * ZLIB Input/Output buffer
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _zlibbuffer {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char *bufbase;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char *bufend;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char *bufptr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int bufcnt;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} ZlibBuffer;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define BYTES_AVAIL(inbuf, len) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync (((inbuf)->bufcnt >= (len)) ? (inbuf)->bufptr : NULL)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* _BUFFERSTR_H_ */