|
|
1.1 ! root 1: #include <X/mit-copyright.h> ! 2: ! 3: /* $Header: XQueryWidth.c,v 10.6 86/04/22 15:26:52 jg Rel $ */ ! 4: /* Copyright Massachusetts Institute of Technology 1985 */ ! 5: ! 6: #include "XlibInternal.h" ! 7: ! 8: int XQueryWidth (str, font) ! 9: char *str; ! 10: Font font; ! 11: { ! 12: register Display *dpy; ! 13: register XReq *req; ! 14: XRep rep; ! 15: int len; ! 16: ! 17: if (str == NULL) return(0); ! 18: len = strlen (str); ! 19: ! 20: GetReq(X_StringWidth, 0); ! 21: req->param.l[0] = font; ! 22: req->params2 = len; ! 23: Data (dpy, str, len); ! 24: if (!_XReply(dpy, &rep)) ! 25: return(0); ! 26: return(rep.params0); ! 27: } ! 28:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.