| | 1 | #ifdef RCSID |
| | 2 | static char RCSid[] = |
| | 3 | "$Header: d:/cvsroot/tads/tads3/vmglob.cpp,v 1.2 1999/05/17 02:52:29 MJRoberts Exp $"; |
| | 4 | #endif |
| | 5 | |
| | 6 | /* |
| | 7 | * Copyright (c) 1998, 2002 Michael J. Roberts. All Rights Reserved. |
| | 8 | * |
| | 9 | * Please see the accompanying license file, LICENSE.TXT, for information |
| | 10 | * on using and copying this software. |
| | 11 | */ |
| | 12 | /* |
| | 13 | Name |
| | 14 | vmglob.cpp - global definitions |
| | 15 | Function |
| | 16 | Defines the global variables. |
| | 17 | Notes |
| | 18 | |
| | 19 | Modified |
| | 20 | 11/28/98 MJRoberts - Creation |
| | 21 | */ |
| | 22 | |
| | 23 | /* actually define the variables (i.e., don't make them 'extern') */ |
| | 24 | #define VMGLOB_DECLARE |
| | 25 | |
| | 26 | /* include the globals header */ |
| | 27 | #include "vmglob.h" |
| | 28 | |
| | 29 | /* |
| | 30 | * In the VARS configuration, we need to provide storage for all of the |
| | 31 | * variables. |
| | 32 | */ |
| | 33 | #ifdef VMGLOB_VARS |
| | 34 | |
| | 35 | /* we need to include headers for objects we define in-line */ |
| | 36 | #include "vmrun.h" |
| | 37 | #include "vmstack.h" |
| | 38 | #include "vmpool.h" |
| | 39 | #include "vmparam.h" |
| | 40 | #include "vmpredef.h" |
| | 41 | #include "vminit.h" |
| | 42 | |
| | 43 | /* remove the declaring macros for the globals */ |
| | 44 | #undef VM_GLOBAL_OBJDEF |
| | 45 | #undef VM_GLOBAL_PREOBJDEF |
| | 46 | #undef VM_GLOBAL_PRECOBJDEF |
| | 47 | #undef VM_GLOBAL_VARDEF |
| | 48 | |
| | 49 | /* provide new defining macros for the globals */ |
| | 50 | #define VM_GLOBAL_OBJDEF(typ, var) typ *G_##var##_X; |
| | 51 | #define VM_GLOBAL_PREOBJDEF(typ, var) typ G_##var##_X; |
| | 52 | #define VM_GLOBAL_PRECOBJDEF(typ, var, ctor_args) typ G_##var##_X ctor_args; |
| | 53 | #define VM_GLOBAL_VARDEF(typ, var) typ G_##var##_X; |
| | 54 | |
| | 55 | /* include the variable definitions */ |
| | 56 | #include "vmglobv.h" |
| | 57 | |
| | 58 | #endif /* VMGLOB_VARS */ |
| | 59 | |
| | 60 | |