00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _H_globldef
00025 #define _H_globldef
00026
00027 #ifndef _H_conscomp
00028 #include "conscomp.h"
00029 #endif
00030 #ifndef _H_symbol
00031 #include "symbol.h"
00032 #endif
00033 #ifndef _H_expressn
00034 #include "expressn.h"
00035 #endif
00036 #ifndef _H_evaluatn
00037 #include "evaluatn.h"
00038 #endif
00039 #ifndef _H_constrct
00040 #include "constrct.h"
00041 #endif
00042 #ifndef _H_moduldef
00043 #include "moduldef.h"
00044 #endif
00045 #ifndef _H_cstrccom
00046 #include "cstrccom.h"
00047 #endif
00048
00049 #define DEFGLOBAL_DATA 1
00050
00051 struct defglobalData
00052 {
00053 struct construct *DefglobalConstruct;
00054 int DefglobalModuleIndex;
00055 int ChangeToGlobals;
00056 intBool ResetGlobals;
00057 struct entityRecord GlobalInfo;
00058 struct entityRecord DefglobalPtrRecord;
00059 long LastModuleIndex;
00060 struct defmodule *TheDefmodule;
00061 #if CONSTRUCT_COMPILER && (! RUN_TIME)
00062 struct CodeGeneratorItem *DefglobalCodeItem;
00063 #endif
00064 };
00065
00066 struct defglobal
00067 {
00068 struct constructHeader header;
00069 unsigned int watch : 1;
00070 unsigned int inScope : 1;
00071 long busyCount;
00072 DATA_OBJECT current;
00073 struct expr *initial;
00074 };
00075
00076 struct defglobalModule
00077 {
00078 struct defmoduleItemHeader header;
00079 };
00080
00081 #define EnvGetDefglobalName(theEnv,x) GetConstructNameString((struct constructHeader *) x)
00082 #define EnvGetDefglobalPPForm(theEnv,x) GetConstructPPForm(theEnv,(struct constructHeader *) x)
00083 #define EnvDefglobalModule(theEnv,x) GetConstructModuleName((struct constructHeader *) x)
00084
00085 #define DefglobalData(theEnv) ((struct defglobalData *) GetEnvironmentData(theEnv,DEFGLOBAL_DATA))
00086
00087 #ifdef LOCALE
00088 #undef LOCALE
00089 #endif
00090
00091 #ifdef _GLOBLDEF_SOURCE_
00092 #define LOCALE
00093 #else
00094 #define LOCALE extern
00095 #endif
00096
00097 #define DefglobalModule(x) GetConstructModuleName((struct constructHeader *) x)
00098 #define FindDefglobal(a) EnvFindDefglobal(GetCurrentEnvironment(),a)
00099 #define GetDefglobalName(x) GetConstructNameString((struct constructHeader *) x)
00100 #define GetDefglobalPPForm(x) GetConstructPPForm(GetCurrentEnvironment(),(struct constructHeader *) x)
00101 #define GetDefglobalValue(a,b) EnvGetDefglobalValue(GetCurrentEnvironment(),a,b)
00102 #define GetDefglobalValueForm(a,b,c) EnvGetDefglobalValueForm(GetCurrentEnvironment(),a,b,c)
00103 #define GetGlobalsChanged() EnvGetGlobalsChanged(GetCurrentEnvironment())
00104 #define GetNextDefglobal(a) EnvGetNextDefglobal(GetCurrentEnvironment(),a)
00105 #define IsDefglobalDeletable(a) EnvIsDefglobalDeletable(GetCurrentEnvironment(),a)
00106 #define SetDefglobalValue(a,b) EnvSetDefglobalValue(GetCurrentEnvironment(),a,b)
00107 #define SetGlobalsChanged(a) EnvSetGlobalsChanged(GetCurrentEnvironment(),a)
00108
00109 LOCALE void InitializeDefglobals(void *);
00110 LOCALE void *EnvFindDefglobal(void *,char *);
00111 LOCALE void *EnvGetNextDefglobal(void *,void *);
00112 LOCALE void CreateInitialFactDefglobal(void);
00113 LOCALE intBool EnvIsDefglobalDeletable(void *,void *);
00114 LOCALE struct defglobalModule *GetDefglobalModuleItem(void *,struct defmodule *);
00115 LOCALE void QSetDefglobalValue(void *,struct defglobal *,DATA_OBJECT_PTR,int);
00116 LOCALE struct defglobal *QFindDefglobal(void *,struct symbolHashNode *);
00117 LOCALE void EnvGetDefglobalValueForm(void *,char *,unsigned,void *);
00118 LOCALE int EnvGetGlobalsChanged(void *);
00119 LOCALE void EnvSetGlobalsChanged(void *,int);
00120 LOCALE intBool EnvGetDefglobalValue(void *,char *,DATA_OBJECT_PTR);
00121 LOCALE intBool EnvSetDefglobalValue(void *,char *,DATA_OBJECT_PTR);
00122 LOCALE void UpdateDefglobalScope(void *);
00123 LOCALE void *GetNextDefglobalInScope(void *,void *);
00124 LOCALE int QGetDefglobalValue(void *,void *,DATA_OBJECT_PTR);
00125
00126 #ifndef _GLOBLDEF_SOURCE_
00127 #endif
00128
00129 #endif
00130
00131