globle void DeftemplateBasicCommands( void *theEnv) { #if ! DEFFACTS_CONSTRUCT EnvAddResetFunction(theEnv,(char*)"deftemplate",ResetDeftemplates,0); #endif EnvAddClearFunction(theEnv,(char*)"deftemplate",ClearDeftemplates,0); AddSaveFunction(theEnv,(char*)"deftemplate",SaveDeftemplates,10); #if ! RUN_TIME EnvDefineFunction2(theEnv,(char*)"get-deftemplate-list",'m',PTIEF GetDeftemplateListFunction,(char*)"GetDeftemplateListFunction",(char*)"01w"); EnvDefineFunction2(theEnv,(char*)"undeftemplate",'v',PTIEF UndeftemplateCommand,(char*)"UndeftemplateCommand",(char*)"11w"); EnvDefineFunction2(theEnv,(char*)"deftemplate-module",'w',PTIEF DeftemplateModuleFunction,(char*)"DeftemplateModuleFunction",(char*)"11w"); #if DEBUGGING_FUNCTIONS EnvDefineFunction2(theEnv,(char*)"list-deftemplates",'v', PTIEF ListDeftemplatesCommand,(char*)"ListDeftemplatesCommand",(char*)"01w"); EnvDefineFunction2(theEnv,(char*)"ppdeftemplate",'v',PTIEF PPDeftemplateCommand,(char*)"PPDeftemplateCommand",(char*)"11w"); #endif #if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) DeftemplateBinarySetup(theEnv); #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DeftemplateCompilerSetup(theEnv); #endif #endif }
globle void DefmoduleBasicCommands( void *theEnv) { EnvAddClearFunction(theEnv,"defmodule",ClearDefmodules,2000); #if DEFMODULE_CONSTRUCT AddSaveFunction(theEnv,"defmodule",SaveDefmodules,1100); #if ! RUN_TIME EnvDefineFunction2(theEnv,"get-defmodule-list",'m',PTIEF EnvGetDefmoduleList,"EnvGetDefmoduleList","00"); #if DEBUGGING_FUNCTIONS EnvDefineFunction2(theEnv,"list-defmodules",'v', PTIEF ListDefmodulesCommand,"ListDefmodulesCommand","00"); EnvDefineFunction2(theEnv,"ppdefmodule",'v',PTIEF PPDefmoduleCommand,"PPDefmoduleCommand","11w"); #endif #endif #endif #if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) DefmoduleBinarySetup(theEnv); #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DefmoduleCompilerSetup(theEnv); #endif }
globle void DefruleBasicCommands( void *theEnv) { EnvAddResetFunction(theEnv,"defrule",ResetDefrules,70); AddSaveFunction(theEnv,"defrule",SaveDefrules,0); #if (! RUN_TIME) AddClearReadyFunction(theEnv,"defrule",ClearDefrulesReady,0); EnvAddClearFunction(theEnv,"defrule",ClearDefrules,0); #endif #if DEBUGGING_FUNCTIONS AddWatchItem(theEnv,"rules",0,&DefruleData(theEnv)->WatchRules,70,DefruleWatchAccess,DefruleWatchPrint); #endif #if ! RUN_TIME EnvDefineFunction2(theEnv,"get-defrule-list",'m',PTIEF GetDefruleListFunction,"GetDefruleListFunction","01w"); EnvDefineFunction2(theEnv,"undefrule",'v',PTIEF UndefruleCommand,"UndefruleCommand","11w"); EnvDefineFunction2(theEnv,"defrule-module",'w',PTIEF DefruleModuleFunction,"DefruleModuleFunction","11w"); #if DEBUGGING_FUNCTIONS EnvDefineFunction2(theEnv,"rules",'v', PTIEF ListDefrulesCommand,"ListDefrulesCommand","01w"); EnvDefineFunction2(theEnv,"list-defrules",'v', PTIEF ListDefrulesCommand,"ListDefrulesCommand","01w"); EnvDefineFunction2(theEnv,"ppdefrule",'v',PTIEF PPDefruleCommand,"PPDefruleCommand","11w"); #endif #if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) DefruleBinarySetup(theEnv); #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DefruleCompilerSetup(theEnv); #endif #endif }
globle void DefglobalBasicCommands() { AddSaveFunction("defglobal",SaveDefglobals,40); AddResetFunction("defglobal",ResetDefglobals,50); #if ! RUN_TIME DefineFunction2("get-defglobal-list",'m',PTIF GetDefglobalListFunction,"GetDefglobalListFunction","01w"); DefineFunction2("undefglobal",'v',PTIF UndefglobalCommand,"UndefglobalCommand","11w"); DefineFunction2("defglobal-module",'w',PTIF DefglobalModuleFunction,"DefglobalModuleFunction","11w"); #if DEBUGGING_FUNCTIONS DefineFunction2("list-defglobals",'v', PTIF ListDefglobalsCommand,"ListDefglobalsCommand","01w"); DefineFunction2("ppdefglobal",'v',PTIF PPDefglobalCommand,"PPDefglobalCommand","11w"); AddWatchItem("globals",0,&WatchGlobals,0,DefglobalWatchAccess,DefglobalWatchPrint); #endif #if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) DefglobalBinarySetup(); #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DefglobalCompilerSetup(); #endif #endif }
void DefmoduleBasicCommands( void *theEnv) { EnvAddClearFunction(theEnv,"defmodule",ClearDefmodules,2000); #if DEFMODULE_CONSTRUCT AddSaveFunction(theEnv,"defmodule",SaveDefmodules,1100); #if ! RUN_TIME EnvAddUDF(theEnv,"get-defmodule-list","m", EnvGetDefmoduleListFunction,"EnvGetDefmoduleListFunction",0,0,NULL,NULL); #if DEBUGGING_FUNCTIONS EnvAddUDF(theEnv,"list-defmodules","v", ListDefmodulesCommand,"ListDefmodulesCommand",0,0,NULL,NULL); EnvAddUDF(theEnv,"ppdefmodule","v",PPDefmoduleCommand,"PPDefmoduleCommand",1,1,"y",NULL); #endif #endif #endif #if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) DefmoduleBinarySetup(theEnv); #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DefmoduleCompilerSetup(theEnv); #endif }
globle void DefglobalBasicCommands( void *theEnv) { AddSaveFunction(theEnv,(char*)"defglobal",SaveDefglobals,40); EnvAddResetFunction(theEnv,(char*)"defglobal",ResetDefglobals,50); #if ! RUN_TIME EnvDefineFunction2(theEnv,(char*)"get-defglobal-list",'m',PTIEF GetDefglobalListFunction,(char*)"GetDefglobalListFunction",(char*)"01w"); EnvDefineFunction2(theEnv,(char*)"undefglobal",'v',PTIEF UndefglobalCommand,(char*)"UndefglobalCommand",(char*)"11w"); EnvDefineFunction2(theEnv,(char*)"defglobal-module",'w',PTIEF DefglobalModuleFunction,(char*)"DefglobalModuleFunction",(char*)"11w"); #if DEBUGGING_FUNCTIONS EnvDefineFunction2(theEnv,(char*)"list-defglobals",'v', PTIEF ListDefglobalsCommand,(char*)"ListDefglobalsCommand",(char*)"01w"); EnvDefineFunction2(theEnv,(char*)"ppdefglobal",'v',PTIEF PPDefglobalCommand,(char*)"PPDefglobalCommand",(char*)"11w"); AddWatchItem(theEnv,(char*)"globals",0,&WatchGlobals,0,DefglobalWatchAccess,DefglobalWatchPrint); #endif #if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) DefglobalBinarySetup(theEnv); #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DefglobalCompilerSetup(theEnv); #endif #endif }
globle void DeftemplateBasicCommands() { AddResetFunction("deftemplate",ResetDeftemplates,0); AddClearFunction("deftemplate",ClearDeftemplates,0); AddSaveFunction("deftemplate",SaveDeftemplates,10); #if ! RUN_TIME DefineFunction2("get-deftemplate-list",'m',PTIF GetDeftemplateListFunction,"GetDeftemplateListFunction","01w"); DefineFunction2("undeftemplate",'v',PTIF UndeftemplateCommand,"UndeftemplateCommand","11w"); DefineFunction2("deftemplate-module",'w',PTIF DeftemplateModuleFunction,"DeftemplateModuleFunction","11w"); #if DEBUGGING_FUNCTIONS DefineFunction2("list-deftemplates",'v', PTIF ListDeftemplatesCommand,"ListDeftemplatesCommand","01w"); DefineFunction2("ppdeftemplate",'v',PTIF PPDeftemplateCommand,"PPDeftemplateCommand","11w"); #endif #if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) DeftemplateBinarySetup(); #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DeftemplateCompilerSetup(); #endif #endif }
globle void DeffactsBasicCommands( void *theEnv) { EnvAddResetFunction(theEnv,"deffacts",ResetDeffacts,0); EnvAddClearFunction(theEnv,"deffacts",ClearDeffacts,0); AddSaveFunction(theEnv,"deffacts",SaveDeffacts,10); #if ! RUN_TIME EnvDefineFunction2(theEnv,"get-deffacts-list",'m',PTIEF GetDeffactsListFunction,"GetDeffactsListFunction","01w"); EnvDefineFunction2(theEnv,"undeffacts",'v',PTIEF UndeffactsCommand,"UndeffactsCommand","11w"); EnvDefineFunction2(theEnv,"deffacts-module",'w',PTIEF DeffactsModuleFunction,"DeffactsModuleFunction","11w"); #if DEBUGGING_FUNCTIONS EnvDefineFunction2(theEnv,"list-deffacts",'v', PTIEF ListDeffactsCommand,"ListDeffactsCommand","01w"); EnvDefineFunction2(theEnv,"ppdeffacts",'v',PTIEF PPDeffactsCommand,"PPDeffactsCommand","11w"); #endif #if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) DeffactsBinarySetup(theEnv); #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DeffactsCompilerSetup(theEnv); #endif #endif }
void DefruleBasicCommands( void *theEnv) { EnvAddResetFunction(theEnv,"defrule",ResetDefrules,70); EnvAddResetFunction(theEnv,"defrule",ResetDefrulesPrime,10); AddSaveFunction(theEnv,"defrule",SaveDefrules,0); #if (! RUN_TIME) AddClearReadyFunction(theEnv,"defrule",ClearDefrulesReady,0); EnvAddClearFunction(theEnv,"defrule",ClearDefrules,0); #endif #if DEBUGGING_FUNCTIONS AddWatchItem(theEnv,"rules",0,&DefruleData(theEnv)->WatchRules,70,DefruleWatchAccess,DefruleWatchPrint); #endif #if ! RUN_TIME EnvAddUDF(theEnv,"get-defrule-list","m", GetDefruleListFunction,"GetDefruleListFunction",0,1,"y",NULL); EnvAddUDF(theEnv,"undefrule","v", UndefruleCommand,"UndefruleCommand",1,1,"y",NULL); EnvAddUDF(theEnv,"defrule-module","y", DefruleModuleFunction,"DefruleModuleFunction",1,1,"y",NULL); #if DEBUGGING_FUNCTIONS EnvAddUDF(theEnv,"rules","v", ListDefrulesCommand,"ListDefrulesCommand",0,1,"y",NULL); EnvAddUDF(theEnv,"list-defrules","v", ListDefrulesCommand,"ListDefrulesCommand",0,1,"y",NULL); EnvAddUDF(theEnv,"ppdefrule","v", PPDefruleCommand,"PPDefruleCommand",1,1,"y",NULL); #endif #if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) DefruleBinarySetup(theEnv); #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DefruleCompilerSetup(theEnv); #endif #endif }
/*************************************************** NAME : SetupDeffunctions DESCRIPTION : Initializes parsers and access functions for deffunctions INPUTS : None RETURNS : Nothing useful SIDE EFFECTS : Deffunction environment initialized NOTES : None ***************************************************/ globle void SetupDeffunctions( void *theEnv) { ENTITY_RECORD deffunctionEntityRecord = { (char*)"PCALL", PCALL,0,0,1, PrintDeffunctionCall,PrintDeffunctionCall, NULL,EvaluateDeffunctionCall,NULL, DecrementDeffunctionBusyCount,IncrementDeffunctionBusyCount, NULL,NULL,NULL,NULL,NULL }; AllocateEnvironmentData(theEnv,DEFFUNCTION_DATA,sizeof(struct deffunctionData),DeallocateDeffunctionData); memcpy(&DeffunctionData(theEnv)->DeffunctionEntityRecord,&deffunctionEntityRecord,sizeof(struct entityRecord)); InstallPrimitive(theEnv,&DeffunctionData(theEnv)->DeffunctionEntityRecord,PCALL); DeffunctionData(theEnv)->DeffunctionModuleIndex = RegisterModuleItem(theEnv,(char*)"deffunction", #if (! RUN_TIME) AllocateModule,ReturnModule, #else NULL,NULL, #endif #if BLOAD_AND_BSAVE || BLOAD || BLOAD_ONLY BloadDeffunctionModuleReference, #else NULL, #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DeffunctionCModuleReference, #else NULL, #endif EnvFindDeffunction); DeffunctionData(theEnv)->DeffunctionConstruct = AddConstruct(theEnv,(char*)"deffunction",(char*)"deffunctions", #if (! BLOAD_ONLY) && (! RUN_TIME) ParseDeffunction, #else NULL, #endif EnvFindDeffunction, GetConstructNamePointer,GetConstructPPForm, GetConstructModuleItem,EnvGetNextDeffunction, SetNextConstruct,EnvIsDeffunctionDeletable, EnvUndeffunction, #if (! BLOAD_ONLY) && (! RUN_TIME) RemoveDeffunction #else NULL #endif ); #if ! RUN_TIME AddClearReadyFunction(theEnv,(char*)"deffunction",ClearDeffunctionsReady,0); #if ! BLOAD_ONLY #if DEFMODULE_CONSTRUCT AddPortConstructItem(theEnv,(char*)"deffunction",SYMBOL); #endif AddSaveFunction(theEnv,(char*)"deffunction-headers",SaveDeffunctionHeaders,1000); AddSaveFunction(theEnv,(char*)"deffunctions",SaveDeffunctions,0); EnvDefineFunction2(theEnv,(char*)"undeffunction",'v',PTIEF UndeffunctionCommand,(char*)"UndeffunctionCommand",(char*)"11w"); #endif #if DEBUGGING_FUNCTIONS EnvDefineFunction2(theEnv,(char*)"list-deffunctions",'v',PTIEF ListDeffunctionsCommand,(char*)"ListDeffunctionsCommand",(char*)"01"); EnvDefineFunction2(theEnv,(char*)"ppdeffunction",'v',PTIEF PPDeffunctionCommand,(char*)"PPDeffunctionCommand",(char*)"11w"); #endif EnvDefineFunction2(theEnv,(char*)"get-deffunction-list",'m',PTIEF GetDeffunctionListFunction, (char*)"GetDeffunctionListFunction",(char*)"01"); EnvDefineFunction2(theEnv,(char*)"deffunction-module",'w',PTIEF GetDeffunctionModuleCommand, (char*)"GetDeffunctionModuleCommand",(char*)"11w"); #if BLOAD_AND_BSAVE || BLOAD || BLOAD_ONLY SetupDeffunctionsBload(theEnv); #endif #if CONSTRUCT_COMPILER SetupDeffunctionCompiler(theEnv); #endif #endif #if DEBUGGING_FUNCTIONS AddWatchItem(theEnv,(char*)"deffunctions",0,&DeffunctionData(theEnv)->WatchDeffunctions,32, DeffunctionWatchAccess,DeffunctionWatchPrint); #endif }
/********************************************************* NAME : SetupDefclasses DESCRIPTION : Initializes Class Hash Table, Function Parsers, and Data Structures INPUTS : None RETURNS : Nothing useful SIDE EFFECTS : NOTES : None *********************************************************/ static void SetupDefclasses( void *theEnv) { InstallPrimitive(theEnv,&DefclassData(theEnv)->DefclassEntityRecord,DEFCLASS_PTR); DefclassData(theEnv)->DefclassModuleIndex = RegisterModuleItem(theEnv,(char*)"defclass", #if (! RUN_TIME) AllocateModule,ReturnModule, #else NULL,NULL, #endif #if BLOAD_AND_BSAVE || BLOAD || BLOAD_ONLY BloadDefclassModuleReference, #else NULL, #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DefclassCModuleReference, #else NULL, #endif EnvFindDefclass); DefclassData(theEnv)->DefclassConstruct = AddConstruct(theEnv,(char*)"defclass",(char*)"defclasses", #if (! BLOAD_ONLY) && (! RUN_TIME) ParseDefclass, #else NULL, #endif EnvFindDefclass, GetConstructNamePointer,GetConstructPPForm, GetConstructModuleItem,EnvGetNextDefclass, SetNextConstruct,EnvIsDefclassDeletable, EnvUndefclass, #if (! RUN_TIME) RemoveDefclass #else NULL #endif ); AddClearReadyFunction(theEnv,(char*)"defclass",InstancesPurge,0); #if ! RUN_TIME EnvAddClearFunction(theEnv,(char*)"defclass",CreateSystemClasses,0); InitializeClasses(theEnv); #if ! BLOAD_ONLY #if DEFMODULE_CONSTRUCT AddPortConstructItem(theEnv,(char*)"defclass",SYMBOL); AddAfterModuleDefinedFunction(theEnv,(char*)"defclass",UpdateDefclassesScope,0); #endif EnvDefineFunction2(theEnv,(char*)"undefclass",'v',PTIEF UndefclassCommand,(char*)"UndefclassCommand",(char*)"11w"); AddSaveFunction(theEnv,(char*)"defclass",SaveDefclasses,10); #endif #if DEBUGGING_FUNCTIONS EnvDefineFunction2(theEnv,(char*)"list-defclasses",'v',PTIEF ListDefclassesCommand,(char*)"ListDefclassesCommand",(char*)"01"); EnvDefineFunction2(theEnv,(char*)"ppdefclass",'v',PTIEF PPDefclassCommand,(char*)"PPDefclassCommand",(char*)"11w"); EnvDefineFunction2(theEnv,(char*)"describe-class",'v',PTIEF DescribeClassCommand,(char*)"DescribeClassCommand",(char*)"11w"); EnvDefineFunction2(theEnv,(char*)"browse-classes",'v',PTIEF BrowseClassesCommand,(char*)"BrowseClassesCommand",(char*)"01w"); #endif EnvDefineFunction2(theEnv,(char*)"get-defclass-list",'m',PTIEF GetDefclassListFunction, (char*)"GetDefclassListFunction",(char*)"01"); EnvDefineFunction2(theEnv,(char*)"superclassp",'b',PTIEF SuperclassPCommand,(char*)"SuperclassPCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"subclassp",'b',PTIEF SubclassPCommand,(char*)"SubclassPCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"class-existp",'b',PTIEF ClassExistPCommand,(char*)"ClassExistPCommand",(char*)"11w"); EnvDefineFunction2(theEnv,(char*)"message-handler-existp",'b', PTIEF MessageHandlerExistPCommand,(char*)"MessageHandlerExistPCommand",(char*)"23w"); EnvDefineFunction2(theEnv,(char*)"class-abstractp",'b',PTIEF ClassAbstractPCommand,(char*)"ClassAbstractPCommand",(char*)"11w"); #if DEFRULE_CONSTRUCT EnvDefineFunction2(theEnv,(char*)"class-reactivep",'b',PTIEF ClassReactivePCommand,(char*)"ClassReactivePCommand",(char*)"11w"); #endif EnvDefineFunction2(theEnv,(char*)"class-slots",'m',PTIEF ClassSlotsCommand,(char*)"ClassSlotsCommand",(char*)"12w"); EnvDefineFunction2(theEnv,(char*)"class-superclasses",'m', PTIEF ClassSuperclassesCommand,(char*)"ClassSuperclassesCommand",(char*)"12w"); EnvDefineFunction2(theEnv,(char*)"class-subclasses",'m', PTIEF ClassSubclassesCommand,(char*)"ClassSubclassesCommand",(char*)"12w"); EnvDefineFunction2(theEnv,(char*)"get-defmessage-handler-list",'m', PTIEF GetDefmessageHandlersListCmd,(char*)"GetDefmessageHandlersListCmd",(char*)"02w"); EnvDefineFunction2(theEnv,(char*)"slot-existp",'b',PTIEF SlotExistPCommand,(char*)"SlotExistPCommand",(char*)"23w"); EnvDefineFunction2(theEnv,(char*)"slot-facets",'m',PTIEF SlotFacetsCommand,(char*)"SlotFacetsCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-sources",'m',PTIEF SlotSourcesCommand,(char*)"SlotSourcesCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-types",'m',PTIEF SlotTypesCommand,(char*)"SlotTypesCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-allowed-values",'m',PTIEF SlotAllowedValuesCommand,(char*)"SlotAllowedValuesCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-allowed-classes",'m',PTIEF SlotAllowedClassesCommand,(char*)"SlotAllowedClassesCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-range",'m',PTIEF SlotRangeCommand,(char*)"SlotRangeCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-cardinality",'m',PTIEF SlotCardinalityCommand,(char*)"SlotCardinalityCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-writablep",'b',PTIEF SlotWritablePCommand,(char*)"SlotWritablePCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-initablep",'b',PTIEF SlotInitablePCommand,(char*)"SlotInitablePCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-publicp",'b',PTIEF SlotPublicPCommand,(char*)"SlotPublicPCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-direct-accessp",'b',PTIEF SlotDirectAccessPCommand, (char*)"SlotDirectAccessPCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"slot-default-value",'u',PTIEF SlotDefaultValueCommand, (char*)"SlotDefaultValueCommand",(char*)"22w"); EnvDefineFunction2(theEnv,(char*)"defclass-module",'w',PTIEF GetDefclassModuleCommand, (char*)"GetDefclassModuleCommand",(char*)"11w"); EnvDefineFunction2(theEnv,(char*)"get-class-defaults-mode", 'w', PTIEF GetClassDefaultsModeCommand, (char*)"GetClassDefaultsModeCommand", (char*)"00"); EnvDefineFunction2(theEnv,(char*)"set-class-defaults-mode", 'w', PTIEF SetClassDefaultsModeCommand, (char*)"SetClassDefaultsModeCommand", (char*)"11w"); #endif #if DEBUGGING_FUNCTIONS AddWatchItem(theEnv,(char*)"instances",0,&DefclassData(theEnv)->WatchInstances,75,DefclassWatchAccess,DefclassWatchPrint); AddWatchItem(theEnv,(char*)"slots",1,&DefclassData(theEnv)->WatchSlots,74,DefclassWatchAccess,DefclassWatchPrint); #endif }
/*************************************************** NAME : SetupDefinstances DESCRIPTION : Adds the definstance support routines to the Kernel INPUTS : None RETURNS : Nothing useful SIDE EFFECTS : Appropriate function lists modified NOTES : None ***************************************************/ globle void SetupDefinstances( void *theEnv) { AllocateEnvironmentData(theEnv,DEFINSTANCES_DATA,sizeof(struct definstancesData),DeallocateDefinstancesData); DefinstancesData(theEnv)->DefinstancesModuleIndex = RegisterModuleItem(theEnv,(char*)"definstances", #if (! RUN_TIME) AllocateModule,ReturnModule, #else NULL,NULL, #endif #if BLOAD_AND_BSAVE || BLOAD || BLOAD_ONLY BloadDefinstancesModuleRef, #else NULL, #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) DefinstancesCModuleReference, #else NULL, #endif EnvFindDefinstances); DefinstancesData(theEnv)->DefinstancesConstruct = AddConstruct(theEnv,(char*)"definstances",(char*)"definstances", #if (! BLOAD_ONLY) && (! RUN_TIME) ParseDefinstances, #else NULL, #endif EnvFindDefinstances, GetConstructNamePointer,GetConstructPPForm, GetConstructModuleItem,EnvGetNextDefinstances,SetNextConstruct, EnvIsDefinstancesDeletable,EnvUndefinstances, #if (! BLOAD_ONLY) && (! RUN_TIME) RemoveDefinstances #else NULL #endif ); #if ! RUN_TIME AddClearReadyFunction(theEnv,(char*)"definstances",ClearDefinstancesReady,0); #if ! BLOAD_ONLY EnvDefineFunction2(theEnv,(char*)"undefinstances",'v',PTIEF UndefinstancesCommand,(char*)"UndefinstancesCommand",(char*)"11w"); AddSaveFunction(theEnv,(char*)"definstances",SaveDefinstances,0); #if DEFRULE_CONSTRUCT EnvAddClearFunction(theEnv,(char*)"definstances",CreateInitialDefinstances,-1000); #endif #endif #if DEBUGGING_FUNCTIONS EnvDefineFunction2(theEnv,(char*)"ppdefinstances",'v',PTIEF PPDefinstancesCommand ,(char*)"PPDefinstancesCommand",(char*)"11w"); EnvDefineFunction2(theEnv,(char*)"list-definstances",'v',PTIEF ListDefinstancesCommand,(char*)"ListDefinstancesCommand",(char*)"01"); #endif EnvDefineFunction2(theEnv,(char*)"get-definstances-list",'m',PTIEF GetDefinstancesListFunction, (char*)"GetDefinstancesListFunction",(char*)"01"); EnvDefineFunction2(theEnv,(char*)"definstances-module",'w',PTIEF GetDefinstancesModuleCommand, (char*)"GetDefinstancesModuleCommand",(char*)"11w"); #endif EnvAddResetFunction(theEnv,(char*)"definstances",(void (*)(void *)) ResetDefinstances,0); #if BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE SetupDefinstancesBload(theEnv); #endif #if CONSTRUCT_COMPILER && (! RUN_TIME) SetupDefinstancesCompiler(theEnv); #endif }