File: vmglob.cpp

package info (click to toggle)
qtads 2.1.6-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,156 kB
  • ctags: 18,767
  • sloc: cpp: 133,078; ansic: 26,048; xml: 18; makefile: 11
file content (70 lines) | stat: -rw-r--r-- 1,792 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifdef RCSID
static char RCSid[] =
"$Header: d:/cvsroot/tads/tads3/vmglob.cpp,v 1.2 1999/05/17 02:52:29 MJRoberts Exp $";
#endif

/* 
 *   Copyright (c) 1998, 2002 Michael J. Roberts.  All Rights Reserved.
 *   
 *   Please see the accompanying license file, LICENSE.TXT, for information
 *   on using and copying this software.  
 */
/*
Name
  vmglob.cpp - global definitions
Function
  Defines the global variables.
Notes
  
Modified
  11/28/98 MJRoberts  - Creation
*/

/* actually define the variables (i.e., don't make them 'extern') */
#define VMGLOB_DECLARE

/* include the globals header */
#include "t3std.h"
#include "vmglob.h"

/* and some other headers that have special global definitions */
#include "vmerr.h"
#include "vmstack.h"
#include "vmrun.h"


/* ------------------------------------------------------------------------ */
/*
 *   In the VARS configuration, we need to provide storage for all of the
 *   variables.  
 */
#ifdef VMGLOB_VARS

/* we need to include headers for objects we define in-line */
#include "vmrun.h"
#include "vmstack.h"
#include "vmpool.h"
#include "vmparam.h"
#include "vmpredef.h"
#include "vminit.h"
#include "vmtobj.h"

/* remove the declaring macros for the globals */
#undef VM_GLOBAL_OBJDEF
#undef VM_GLOBAL_PREOBJDEF
#undef VM_GLOBAL_PRECOBJDEF
#undef VM_GLOBAL_VARDEF
#undef VM_GLOBAL_ARRAYDEF

/* provide new defining macros for the globals */
#define VM_GLOBAL_OBJDEF(typ, var) typ *G_##var##_X;
#define VM_GLOBAL_PREOBJDEF(typ, var) typ G_##var##_X;
#define VM_GLOBAL_PRECOBJDEF(typ, var, ctor_args) typ G_##var##_X ctor_args;
#define VM_GLOBAL_VARDEF(typ, var) typ G_##var##_X;
#define VM_GLOBAL_ARRAYDEF(typ, var, eles) typ G_##var##_X[eles];

/* include the variable definitions */
#include "vmglobv.h"


#endif /* VMGLOB_VARS */