|
|
researchv9-SUN3(old)
#include "copyright.h"
/* $Header: /var/lib/cvsd/repos/research/researchv9/X11/src/X.V11R1/lib/X/XIntAtom.c,v 1.1.1.1 2018/04/24 17:22:00 root Exp $ */
/* Copyright Massachusetts Institute of Technology 1986 */
#define NEED_REPLIES
#include "Xlibint.h"
Atom XInternAtom (dpy, name, onlyIfExists)
register Display *dpy;
char *name;
Bool onlyIfExists;
{
register long nbytes;
xInternAtomReply rep;
register xInternAtomReq *req;
LockDisplay(dpy);
GetReq(InternAtom, req);
nbytes = req->nbytes = strlen(name);
req->onlyIfExists = onlyIfExists;
req->length += (nbytes+3)>>2;
_XSend (dpy, name, nbytes);
/* use _XSend instead of Data, since the following _XReply
will always flush the buffer anyway */
if(_XReply (dpy, (xReply *)&rep, 0, xTrue) == 0) rep.atom = None;
UnlockDisplay(dpy);
SyncHandle();
return (rep.atom);
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.