1: #include <X/mit-copyright.h> 2: 3: /* $Header: XFontWidths.c,v 10.5 86/02/01 15:33:55 tony Rel $ */ 4: /* Copyright Massachusetts Institute of Technology 1985 */ 5: 6: #include "XlibInternal.h" 7: 8: short *XFontWidths (font) 9: Font font; 10: { 11: register Display *dpy; 12: register XReq *req; 13: XRep rep; 14: char *buf; 15: 16: GetReq(X_FontWidths, 0); 17: req->param.l[0] = font; 18: if (!_XReply(dpy, &rep)) 19: return(NULL); 20: if ((buf = (char *) malloc(rep.param.l[0])) == NULL) { 21: errno = ENOMEM; 22: _XIOError(dpy); 23: } 24: _XReadPad (dpy, buf, rep.param.l[0]); 25: return ((short *) buf); 26: }