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

⟦a076a3a2e⟧ TextFile

    Length: 827 (0x33b)
    Types: TextFile
    Names: »XFontWidths.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/XFontWidths.c« 

TextFile

#include <X/mit-copyright.h>

/* $Header: XFontWidths.c,v 10.6 86/04/22 15:21:46 jg Rel $ */
/* Copyright    Massachusetts Institute of Technology    1985	*/

#include "XlibInternal.h"

short *XFontWidths (font)
	Font font;
{
	register Display *dpy;
	register XReq *req;
	XRep rep;
	short *buf;
	int nbytes;

	GetReq(X_FontWidths, 0);
	req->param.l[0] = font;
	if (!_XReply(dpy, &rep))
	    return(NULL);
	nbytes = rep.param.l[0];
	if ((buf = (short *) malloc(nbytes*sizeof(short)/psizeof(short))) == NULL) {
	    errno = ENOMEM;
	    _XIOError(dpy);
	}
#ifdef BIGSHORTS
	{
        ushort_p *proto_shorts = (ushort_p *) malloc (nbytes);
	_XReadPad (dpy, (char *)proto_shorts, nbytes);
	UnpackShorts(proto_shorts, buf, nbytes);
	free((char *)proto_shorts);
	}
#else
	_XReadPad(dpy, (char *)buf, nbytes);
#endif
	return (buf);
}