DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T X

⟦ead70fcc0⟧ TextFile

    Length: 962 (0x3c2)
    Types: TextFile
    Names: »XCloseDisplay.c«

Derivation

└─⟦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« 

TextFile

#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);
}