/* $Id: defs.h,v 1.2 90/11/30 16:22:11 spanachi Exp $ */

/*
 * Copyright (C) 1990 by Digital Equipment Corporation.
 * 
 * Author: Michael P. Altenhofen, CEC Karlsruhe e-mail:
 * Altenhofen@kampus.enet.dec.com
 * 
 * This file ist part of Shared X
 * 
 * Permission to use, copy, modify, and distribute this software and its
 * documentation without fee is hereby granted, but only for non-profit  use
 * and distribution,  and provided  that the copyright notice and this notice
 * is preserved on all copies.
 * 
 * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
 * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 * SOFTWARE.
 */

#ifndef _DEFS_H_
#define _DEFS_H_

#ifndef _OSDEP_H_
#include "osdep.h"
#endif

#include <sys/types.h>

#define ALLSERVERS 1
#define READYSERVERS 2
#define NullClient ( ( ClientPtr ) 0 )
#define MAXSERVERS MAXSOCKS
#define CLIENTOFFSET 20
#define defaultClientID  ( -1 )
#define FromServer 0
#define FromClient 1
#define InvalidID ( ~0L )

/* some marco definitions that hide information about data structures */

#define BITS(fds) ((fds).fds_bits)
#define XDisplay( client )   ( client->xdpy )

#define ClientConnection(client) (((OsCommRec *)client->osPrivate)->fd)

#endif	/* _DEFS_H_ */
