Пример #1
0
static void RestoreExecutionInformation()
  {
   HKEY hKey;
   DWORD lpdwDisposition;
   struct ExecutionInformation executionInfo;
   DWORD type = REG_BINARY;
   DWORD size = sizeof(struct ExecutionInformation);
   
   if (RegCreateKeyEx(HKEY_CURRENT_USER,TEXT("Software\\CLIPS\\CLIPSWin"),0,"",0,
                      KEY_READ | KEY_WRITE,NULL,&hKey,&lpdwDisposition) != ERROR_SUCCESS)
     { return; }

   if (RegQueryValueEx(hKey,"Execution",0,&type,(BYTE *) &executionInfo,
                       &size) != ERROR_SUCCESS)
     {
      RegCloseKey(hKey);
      return;
     }

   EnvSetSalienceEvaluation(GlobalEnv,executionInfo.salienceEvaluation);
   EnvSetStrategy(GlobalEnv,executionInfo.strategy);
   EnvSetStaticConstraintChecking(GlobalEnv,executionInfo.staticConstraintChecking);
   EnvSetDynamicConstraintChecking(GlobalEnv,executionInfo.dynamicConstraintChecking);
   EnvSetAutoFloatDividend(GlobalEnv,executionInfo.autoFloatDividend);
   EnvSetResetGlobals(GlobalEnv,executionInfo.resetGlobals);
   EnvSetFactDuplication(GlobalEnv,executionInfo.factDuplication);
   EnvSetIncrementalReset(GlobalEnv,executionInfo.incrementalReset);
   EnvSetSequenceOperatorRecognition(GlobalEnv,executionInfo.sequenceOperatorRecognition);

   RegCloseKey(hKey);
  }
Пример #2
0
/****************************************************************
  NAME         : SetSORCommand
  DESCRIPTION  : Toggles SequenceOpMode - if TRUE, multifield
                   references are replaced with sequence
                   expansion operators
  INPUTS       : None
  RETURNS      : The old value of SequenceOpMode
  SIDE EFFECTS : SequenceOpMode toggled
  NOTES        : None
 ****************************************************************/
globle BOOLEAN SetSORCommand(
    void *theEnv)
{
#if (! RUN_TIME) && (! BLOAD_ONLY)
    DATA_OBJECT arg;

    if (EnvArgTypeCheck(theEnv,"set-sequence-operator-recognition",1,SYMBOL,&arg) == FALSE)
        return(ExpressionData(theEnv)->SequenceOpMode);
    return(EnvSetSequenceOperatorRecognition(theEnv,(arg.value == EnvFalseSymbol(theEnv)) ?
            FALSE : TRUE));
#else
    return(ExpressionData(theEnv)->SequenceOpMode);
#endif
}