|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T X
Length: 2187 (0x88b)
Types: TextFile
Names: »XlibInternal.h«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
└─⟦526ad3590⟧ »EUUGD11/gnu-31mar87/X.V10.R4.tar.Z«
└─⟦2109abc41⟧
└─⟦this⟧ »./X.V10R4/Toolkit/Sx/code/XlibInternal.h«
/*
* $Source: /u1/Sx.new/code/RCS/XlibInternal.h,v $
* $Header: XlibInternal.h,v 1.1 86/12/03 16:11:28 swick Exp $
*/
#include <X/mit-copyright.h>
/* $Header: XlibInternal.h,v 1.1 86/12/03 16:11:28 swick Exp $ */
/* Copyright 1984, 1985 Massachusetts Institute of Technology */
/*
* XlibInternal.h - Header definition and support file for the internal
* support routines (XlibInternal) used by the C subroutine interface
* library (Xlib) to the X Window System.
*
*/
#include <sys/types.h>
#include <X/Xlib.h>
#include <X/Xproto.h>
#include <stdio.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <netdb.h>
#include <errno.h>
extern int errno; /* Internal system error number. */
extern char *malloc(); /* commonly used in the library. */
extern char *realloc(); /* used with some frequency. */
extern Display *_XlibCurrentDisplay; /* Currently active Display. */
extern (*_XIOErrorFunction)(); /* X system error reporting routine. */
extern (*_XErrorFunction)(); /* X_Error event reporting routine. */
/*
* Boolean datatype.
*/
typedef enum _bool {FALSE, TRUE} Bool;
/* Pointers to the above routines. */
#define _XIOError (*_XIOErrorFunction)
#define _XError (*_XErrorFunction)
#define BUFSIZE 2048 /* X output buffer size. */
/*
* X Protocol packetizing macros.
*/
/*
* GetReq - Get the next avilable X request packet in the buffer and
* return it.
*
* "cd" is the X protocol code.
* "id" is the window id of the requesting window.
*/
#define GetReq(cd, id) \
dpy = _XlibCurrentDisplay;\
if ((dpy->bufptr + sizeof(XReq)) > dpy->bufmax) {\
_XFlush(dpy);\
} \
req = (XReq *)dpy->bufptr;\
req->code = cd;\
req->windowId = id;\
dpy->bufptr += sizeof(XReq);\
dpy->request++;\
dpy->lastdraw = NULL
/*
* Data - Place data in the buffer and pad the end to provide
* 32 bit word alignment. Transmit if the buffer fills.
*
* "dpy" is a pointer to a Display.
* "data" is a pinter to a data buffer.
* "len" is the lenght of the data buffer.
*/
#define Data(dpy, data, len) \
if (dpy->bufptr + len < dpy->bufmax) {\
bcopy(data, dpy->bufptr, len);\
dpy->bufptr += (len + 3) & ~3;\
} else\
_XSend(dpy, data, len)