support new version of database in save/restore.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@773 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
9cde858f11
commit
5f92a9550e
28
H/rheap.h
28
H/rheap.h
@ -516,11 +516,29 @@ RestoreDB(DBEntry *pp)
|
||||
pp->FunctorOfDB = FuncAdjust(pp->FunctorOfDB);
|
||||
else
|
||||
pp->FunctorOfDB = (Functor) AtomAdjust((Atom)(pp->FunctorOfDB));
|
||||
dbr = pp->First;
|
||||
/* While we have something in the data base, restore it */
|
||||
while (dbr) {
|
||||
RestoreDBEntry(dbr);
|
||||
dbr = dbr->Next;
|
||||
if (pp->KindOfPE & LogUpdDBBit) {
|
||||
dbr = pp->First;
|
||||
/* While we have something in the data base, restore it */
|
||||
while (dbr) {
|
||||
RestoreDBEntry(dbr);
|
||||
dbr = dbr->Next;
|
||||
}
|
||||
} else {
|
||||
if (pp->F0 != NULL)
|
||||
pp->F0 = DBRefAdjust(pp->F0);
|
||||
if (pp->L0 != NULL)
|
||||
pp->L0 = DBRefAdjust(pp->L0);
|
||||
/* immediate update semantics */
|
||||
dbr = pp->F0;
|
||||
/* While we have something in the data base, even if erased, restore it */
|
||||
while (dbr) {
|
||||
RestoreDBEntry(dbr);
|
||||
if (dbr->n != NULL)
|
||||
dbr->n = DBRefAdjust(dbr->n);
|
||||
if (dbr->p != NULL)
|
||||
dbr->p = DBRefAdjust(dbr->p);
|
||||
dbr = dbr->n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user