| 1 |
/* |
| 2 |
|
| 3 |
Copyright 1989, 1998 The Open Group |
| 4 |
|
| 5 |
Permission to use, copy, modify, distribute, and sell this software and its |
| 6 |
documentation for any purpose is hereby granted without fee, provided that |
| 7 |
the above copyright notice appear in all copies and that both that |
| 8 |
copyright notice and this permission notice appear in supporting |
| 9 |
documentation. |
| 10 |
|
| 11 |
The above copyright notice and this permission notice shall be included |
| 12 |
in all copies or substantial portions of the Software. |
| 13 |
|
| 14 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 15 |
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 16 |
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 17 |
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 18 |
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 19 |
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 20 |
OTHER DEALINGS IN THE SOFTWARE. |
| 21 |
|
| 22 |
Except as contained in this notice, the name of The Open Group shall |
| 23 |
not be used in advertising or otherwise to promote the sale, use or |
| 24 |
other dealings in this Software without prior written authorization |
| 25 |
from The Open Group. |
| 26 |
|
| 27 |
*/ |
| 28 |
|
| 29 |
/* |
| 30 |
* |
| 31 |
* Global data |
| 32 |
* |
| 33 |
* This file should contain only those objects which must be predefined. |
| 34 |
*/ |
| 35 |
#ifdef HAVE_CONFIG_H |
| 36 |
#include <config.h> |
| 37 |
#endif |
| 38 |
#include <nx-X11/Xlibint.h> |
| 39 |
|
| 40 |
|
| 41 |
/* |
| 42 |
* If possible, it is useful to have the global data default to a null value. |
| 43 |
* Some shared library implementations are *much* happier if there isn't any |
| 44 |
* global initialized data. |
| 45 |
*/ |
| 46 |
#ifdef NULL_NOT_ZERO /* then need to initialize */ |
| 47 |
#define SetZero(t,var,z) t var = z |
| 48 |
#else |
| 49 |
#define SetZero(t,var,z) t var |
| 50 |
#endif |
| 51 |
|
| 52 |
#ifdef USL_SHAREDLIB /* then need extra variables */ |
| 53 |
/* |
| 54 |
* If we need to define extra variables for each global |
| 55 |
*/ |
| 56 |
#define ZEROINIT(t,var,val) SetZero(t,var,val); \ |
| 57 |
SetZero (long, _libX_##var##Flag, 0); \ |
| 58 |
SetZero (void *, _libX_##var##Ptr, NULL) |
| 59 |
|
| 60 |
#else /* else not USL_SHAREDLIB */ |
| 61 |
/* |
| 62 |
* no extra crud |
| 63 |
*/ |
| 64 |
#define ZEROINIT(t,var,val) SetZero (t, var, val) |
| 65 |
|
| 66 |
#endif /* USL_SHAREDLIB */ |
| 67 |
|
| 68 |
|
| 69 |
/* |
| 70 |
* Error handlers; used to be in XlibInt.c |
| 71 |
*/ |
| 72 |
ZEROINIT (XErrorHandler, _XErrorFunction, NULL); |
| 73 |
ZEROINIT (XIOErrorHandler, _XIOErrorFunction, NULL); |
| 74 |
ZEROINIT (_XQEvent *, _qfree, NULL); |
| 75 |
|
| 76 |
|
| 77 |
/* |
| 78 |
* Debugging information and display list; used to be in XOpenDis.c |
| 79 |
*/ |
| 80 |
ZEROINIT (int, _Xdebug, 0); |
| 81 |
ZEROINIT (Display *, _XHeadOfDisplayList, NULL); |
| 82 |
|
| 83 |
|
| 84 |
#ifdef XTEST1 |
| 85 |
/* |
| 86 |
* Stuff for input synthesis extension: |
| 87 |
*/ |
| 88 |
/* |
| 89 |
* Holds the two event type codes for this extension. The event type codes |
| 90 |
* for this extension may vary depending on how many extensions are installed |
| 91 |
* already, so the initial values given below will be added to the base event |
| 92 |
* code that is acquired when this extension is installed. |
| 93 |
* |
| 94 |
* These two variables must be available to programs that use this extension. |
| 95 |
*/ |
| 96 |
int XTestInputActionType = 0; |
| 97 |
int XTestFakeAckType = 1; |
| 98 |
#endif |
| 99 |
|
| 100 |
/* |
| 101 |
* NOTE: any additional external definition NEED |
| 102 |
* to be inserted BELOW this point!!! |
| 103 |
*/ |
| 104 |
|
| 105 |
/* |
| 106 |
* NOTE: any additional external definition NEED |
| 107 |
* to be inserted ABOVE this point!!! |
| 108 |
*/ |