inform that we started from restore

This commit is contained in:
vscosta 2017-09-02 23:43:08 +01:00
parent d91b06bb6c
commit d49a7387ef
3 changed files with 7 additions and 2 deletions

View File

@ -1430,6 +1430,7 @@ OpenRestore(const char *inpf, const char *YapLibDir, CELL *Astate, CELL *ATrail,
return FAIL_RESTORE;
if (fname[0] &&
(mode = try_open(fname,Astate,ATrail,AStack,AHeap,streamp)) != FAIL_RESTORE) {
setAtomicGlobalPrologFlag( RESOURCE_DATABASE_FLAG, MkAtomTerm(Yap_LookupAtom(fname)) );
return mode;
}
/* try to open from current directory */

View File

@ -300,7 +300,7 @@ static inline bool trueLocalPrologFlag(int id) {
return LOCAL_Flags[id].at == TermTrue;
}
static inline bool falsePrologFlag(int id) {
static inline bool falseLocalPrologFlag(int id) {
CACHE_REGS
return LOCAL_Flags[id].at == TermFalse;
}
@ -317,6 +317,10 @@ static inline bool silentMode(void) {
return GLOBAL_Flags[VERBOSE_FLAG].at == TermSilent;
}
static inline bool verboseMode(void) {
return GLOBAL_Flags[VERBOSE_FLAG].at != TermSilent;
}
static inline void setVerbosity(Term val) {
GLOBAL_Flags[VERBOSE_FLAG].at = val;
}

View File

@ -358,7 +358,7 @@ call_count_data/3 built-in.
YAP_FLAG(REPORT_ERROR_FLAG, "report_error", true, booleanFlag, "true",
NULL),
YAP_FLAG(RESOURCE_DATABASE_FLAG, "resource_database", false, isatom,
"boot.yap", NULL),
"pl/boot.yap", NULL),
/**<`resource_database`
Name of the resource file (saved-state or Prolog file) used to construct
the YAP