|
|
1.1 ! root 1: #include <X/mit-copyright.h> ! 2: ! 3: /* $Header: XCharWidths.c,v 10.4 86/02/01 15:29:46 tony Rel $ */ ! 4: /* Copyright Massachusetts Institute of Technology 1985 */ ! 5: ! 6: #include "XlibInternal.h" ! 7: /* returns number of widths on success, NULL on error */ ! 8: ! 9: int XCharWidths (chars, len, font, widths) ! 10: char *chars; /* not necessarily null-terminated */ ! 11: int len; ! 12: Font font; ! 13: short *widths; ! 14: { ! 15: register Display *dpy; ! 16: register XReq *req; ! 17: XRep rep; ! 18: ! 19: GetReq(X_CharWidths, 0); ! 20: req->param.l[0] = font; ! 21: req->param.s[2] = len; ! 22: Data (dpy, chars, len); ! 23: if (!_XReply(dpy, &rep)) ! 24: return(NULL); ! 25: ! 26: _XReadPad (dpy, (char *)widths, rep.param.l[0]); ! 27: return(rep.param.l[0] >> 1); ! 28: } ! 29:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.