[comp.windows.x] Xatom.h

pds@quintus (Peter Schachte) (03/08/89)

The file Xatom.h begins with the admonition

/* THIS IS A GENERATED FILE
 *
 * Do not edit it directly or put it under source control.
 */

but I can't figure out what it is generated from.  If I need to
construct a similar file for a different language, should I try to
generate it from whatever Xatom.h is generated from, or should I just
generate it from Xatom.h directly?  Will the format of Xatom.h remain
	#define atom ((Atom) number)?
Can I count on it being defined by #define, and the body of the
definition being parenthesized and containing a cast?  Will all the
predefined atoms begin with XA_ and be all upper-case?

What's the right way to do this?  (Though I maintain that the "right"
thing would be for the server to recognize the predefined atoms when I
try to intern them).
-Peter Schachte
pds@quintus.uucp
..!sun!quintus!pds

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (03/08/89)

    I can't figure out what it is generated from.

From server/dix/buildatoms.

    should I try to
    generate it from whatever Xatom.h is generated from, or should I just
    generate it from Xatom.h directly?

Whatever works for you.

    Will the format of Xatom.h remain #define atom ((Atom) number)?

No particular guarantees, but I see no reason for it to change.

    Will all the
    predefined atoms begin with XA_ and be all upper-case?

If you think about it hard enough, adding new predefined atoms would be
an incompatible change to the protocol.  Perhaps that answers your question.

    Though I maintain that the "right"
    thing would be for the server to recognize the predefined atoms when I
    try to intern them

It will.