Debian Codegraph @

terps/tads/tads3/vmglob.cpp

raw
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 "t3std.h"
28 #include "vmglob.h"
29
30 /* and some other headers that have special global definitions */
31 #include "vmerr.h"
32 #include "vmstack.h"
33 #include "vmrun.h"
34
35
36 /* ------------------------------------------------------------------------ */
37 /*
38 * In the VARS configuration, we need to provide storage for all of the
39 * variables.
40 */
41 #ifdef VMGLOB_VARS
42
43 /* we need to include headers for objects we define in-line */
44 #include "vmrun.h"
45 #include "vmstack.h"
46 #include "vmpool.h"
47 #include "vmparam.h"
48 #include "vmpredef.h"
49 #include "vminit.h"
50 #include "vmtobj.h"
51
52 /* remove the declaring macros for the globals */
53 #undef VM_GLOBAL_OBJDEF
54 #undef VM_GLOBAL_PREOBJDEF
55 #undef VM_GLOBAL_PRECOBJDEF
56 #undef VM_GLOBAL_VARDEF
57 #undef VM_GLOBAL_ARRAYDEF
58
59 /* provide new defining macros for the globals */
60 #define VM_GLOBAL_OBJDEF(typ, var) typ *G_##var##_X;
61 #define VM_GLOBAL_PREOBJDEF(typ, var) typ G_##var##_X;
62 #define VM_GLOBAL_PRECOBJDEF(typ, var, ctor_args) typ G_##var##_X ctor_args;
63 #define VM_GLOBAL_VARDEF(typ, var) typ G_##var##_X;
64 #define VM_GLOBAL_ARRAYDEF(typ, var, eles) typ G_##var##_X[eles];
65
66 /* include the variable definitions */
67 #include "vmglobv.h"
68
69
70 #endif /* VMGLOB_VARS */