Blame src/globals.c

Packit 5bd3a9
/*
Packit 5bd3a9
Packit 5bd3a9
Copyright 1989, 1998  The Open Group
Packit 5bd3a9
Packit 5bd3a9
Permission to use, copy, modify, distribute, and sell this software and its
Packit 5bd3a9
documentation for any purpose is hereby granted without fee, provided that
Packit 5bd3a9
the above copyright notice appear in all copies and that both that
Packit 5bd3a9
copyright notice and this permission notice appear in supporting
Packit 5bd3a9
documentation.
Packit 5bd3a9
Packit 5bd3a9
The above copyright notice and this permission notice shall be included
Packit 5bd3a9
in all copies or substantial portions of the Software.
Packit 5bd3a9
Packit 5bd3a9
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Packit 5bd3a9
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit 5bd3a9
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Packit 5bd3a9
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
Packit 5bd3a9
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Packit 5bd3a9
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Packit 5bd3a9
OTHER DEALINGS IN THE SOFTWARE.
Packit 5bd3a9
Packit 5bd3a9
Except as contained in this notice, the name of The Open Group shall
Packit 5bd3a9
not be used in advertising or otherwise to promote the sale, use or
Packit 5bd3a9
other dealings in this Software without prior written authorization
Packit 5bd3a9
from The Open Group.
Packit 5bd3a9
Packit 5bd3a9
*/
Packit 5bd3a9
Packit 5bd3a9
/*
Packit 5bd3a9
 *
Packit 5bd3a9
 *                                 Global data
Packit 5bd3a9
 *
Packit 5bd3a9
 * This file should contain only those objects which must be predefined.
Packit 5bd3a9
 */
Packit 5bd3a9
#ifdef HAVE_CONFIG_H
Packit 5bd3a9
#include <config.h>
Packit 5bd3a9
#endif
Packit 5bd3a9
#include <X11/Xlibint.h>
Packit 5bd3a9
Packit 5bd3a9
Packit 5bd3a9
/*
Packit 5bd3a9
 * If possible, it is useful to have the global data default to a null value.
Packit 5bd3a9
 * Some shared library implementations are *much* happier if there isn't any
Packit 5bd3a9
 * global initialized data.
Packit 5bd3a9
 */
Packit 5bd3a9
#ifdef NULL_NOT_ZERO			/* then need to initialize */
Packit 5bd3a9
#define SetZero(t,var,z) t var = z
Packit 5bd3a9
#else
Packit 5bd3a9
#define SetZero(t,var,z) t var
Packit 5bd3a9
#endif
Packit 5bd3a9
Packit 5bd3a9
#ifdef USL_SHAREDLIB			/* then need extra variables */
Packit 5bd3a9
/*
Packit 5bd3a9
 * If we need to define extra variables for each global
Packit 5bd3a9
 */
Packit 5bd3a9
#define ZEROINIT(t,var,val) SetZero(t,var,val); \
Packit 5bd3a9
  SetZero (long, _libX_##var##Flag, 0); \
Packit 5bd3a9
  SetZero (void *, _libX_##var##Ptr, NULL)
Packit 5bd3a9
Packit 5bd3a9
#else /* else not USL_SHAREDLIB */
Packit 5bd3a9
/*
Packit 5bd3a9
 * no extra crud
Packit 5bd3a9
 */
Packit 5bd3a9
#define ZEROINIT(t,var,val) SetZero (t, var, val)
Packit 5bd3a9
Packit 5bd3a9
#endif /* USL_SHAREDLIB */
Packit 5bd3a9
Packit 5bd3a9
Packit 5bd3a9
/*
Packit 5bd3a9
 * Error handlers; used to be in XlibInt.c
Packit 5bd3a9
 */
Packit 5bd3a9
ZEROINIT (XErrorHandler, _XErrorFunction, NULL);
Packit 5bd3a9
ZEROINIT (XIOErrorHandler, _XIOErrorFunction, NULL);
Packit 5bd3a9
ZEROINIT (_XQEvent *, _qfree, NULL);
Packit 5bd3a9
Packit 5bd3a9
Packit 5bd3a9
/*
Packit 5bd3a9
 * Debugging information and display list; used to be in XOpenDis.c
Packit 5bd3a9
 */
Packit 5bd3a9
ZEROINIT (int, _Xdebug, 0);
Packit 5bd3a9
ZEROINIT (Display *, _XHeadOfDisplayList, NULL);
Packit 5bd3a9
Packit 5bd3a9
Packit 5bd3a9
#ifdef XTEST1
Packit 5bd3a9
/*
Packit 5bd3a9
 * Stuff for input synthesis extension:
Packit 5bd3a9
 */
Packit 5bd3a9
/*
Packit 5bd3a9
 * Holds the two event type codes for this extension.  The event type codes
Packit 5bd3a9
 * for this extension may vary depending on how many extensions are installed
Packit 5bd3a9
 * already, so the initial values given below will be added to the base event
Packit 5bd3a9
 * code that is aquired when this extension is installed.
Packit 5bd3a9
 *
Packit 5bd3a9
 * These two variables must be available to programs that use this extension.
Packit 5bd3a9
 */
Packit 5bd3a9
int			XTestInputActionType = 0;
Packit 5bd3a9
int			XTestFakeAckType   = 1;
Packit 5bd3a9
#endif
Packit 5bd3a9
Packit 5bd3a9
/*
Packit 5bd3a9
 * NOTE: any additional external definition NEED
Packit 5bd3a9
 * to be inserted BELOW this point!!!
Packit 5bd3a9
 */
Packit 5bd3a9
Packit 5bd3a9
/*
Packit 5bd3a9
 * NOTE: any additional external definition NEED
Packit 5bd3a9
 * to be inserted ABOVE this point!!!
Packit 5bd3a9
 */