[Bf-committers] /usr/include/X11/SGIFastAtom.h
John K. Walton
bf-committers@blender.org
Wed, 29 Jan 2003 22:31:42 -0500 (EST)
gcc trips over the ' in SGI's in the sgi supplied code fragment below.
for now i butchered the .h file (on the gcc machine only) to get past it,
something must be done, don't know what, this is a system file.
#if 0 /* COMMENT */
To portably use fast atoms in X your code, put this in your #include
section:
#include <X11/Xatom.h> /* This defines _SGI_EXTRA_PREDEFINES if fast
atoms are supported. */
#ifdef _SGI_EXTRA_PREDEFINES
#include <X11/SGIFastAtom.h>
#else
#define
XSGIFastInternAtom(dpy,string,fast_name,how) XInternAtom(dpy,string,how)
#endif
Then, where you would normally use XInternAtom or XmInternAtom, use:
atom = XSGIFastInternAtom(dpy, "WM_DELETE_WINDOW",
SGI_XA_WM_DELETE_WINDOW, False);
This lets your X source code using fast atoms work when compiled on X
implementations that lack SGI's fast atoms optimizations.
#endif /* END COMMENT */