|
|
1.1 root 1: #include "copyright.h"
2:
3: /* $Header: XGetAtomNm.c,v 11.13 87/09/11 08:03:51 toddb Exp $ */
4: /* Copyright Massachusetts Institute of Technology 1986 */
5: #define NEED_REPLIES
6: #include "Xlibint.h"
7:
8: char *XGetAtomName(dpy, atom)
9: register Display *dpy;
10: Atom atom;
11: {
12: xGetAtomNameReply rep;
13: xResourceReq *req;
14: char *storage;
15:
16: LockDisplay(dpy);
17: GetResReq(GetAtomName, atom, req);
18:
19: if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) {
20: UnlockDisplay(dpy);
21: SyncHandle();
22: return(NULL);
23: }
24:
25: storage = (char *) Xmalloc(rep.nameLength+1);
26:
27: _XReadPad(dpy, storage, (long)rep.nameLength);
28: storage[rep.nameLength] = '\0';
29:
30: UnlockDisplay(dpy);
31: SyncHandle();
32: return(storage);
33: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.