|
|
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: 962 (0x3c2)
Types: TextFile
Names: »XCloseDisplay.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
└─⟦526ad3590⟧ »EUUGD11/gnu-31mar87/X.V10.R4.tar.Z«
└─⟦2109abc41⟧
└─⟦this⟧ »./X.V10R4/Xlib/XCloseDisplay.c«
#include <X/mit-copyright.h>
/* $Header: XCloseDisplay.c,v 10.5 86/04/22 15:19:04 jg Rel $ */
/* Copyright Massachusetts Institute of Technology 1985 */
#include "XlibInternal.h"
/*
* XCloseDisplay - XSync the connection to the X Server, close the connection,
* and free all associated storage. Signals must be masked out during this
* operation to guarantee atomicity.
*/
XCloseDisplay (dpy)
register Display *dpy;
{
register int sig_mask;
/*
* Mask out all signals so that the library internal state can
* be sync'ed with the rest of the world. We don't want to be
* interupted while we are flushing and freeing buffers.
*/
sig_mask = sigsetmask(-1);
XSync(TRUE);
if (close(dpy->fd) == -1) {
/* Argh! someone already closed the descriptor! */
_XIOError(_XlibCurrentDisplay);
}
sigsetmask(sig_mask); /* Return signals to normal. */
if (dpy->displayname) free(dpy->displayname);
free(dpy->buffer);
free((char *)dpy);
}