This commit is contained in:
Vitor Santos Costa 2016-05-15 08:08:42 +01:00
parent d375d0ffbb
commit 9f664c9e36
5 changed files with 18 additions and 4 deletions

View File

@ -137,6 +137,7 @@ A ExecuteInMod F "$execute_in_mod"
A ExecuteWithin F "$execute_within"
A ExecuteWoMod F "$execute_wo_mod"
A Exist N "exist"
A Exists N "exists"
A Exit N "exit"
A ExistenceError N "existence_error"
A ExoClause F "$exo_clause"

View File

@ -132,6 +132,7 @@
AtomExecuteWithin = Yap_FullLookupAtom("$execute_within"); TermExecuteWithin = MkAtomTerm(AtomExecuteWithin);
AtomExecuteWoMod = Yap_FullLookupAtom("$execute_wo_mod"); TermExecuteWoMod = MkAtomTerm(AtomExecuteWoMod);
AtomExist = Yap_LookupAtom("exist"); TermExist = MkAtomTerm(AtomExist);
AtomExists = Yap_LookupAtom("exists"); TermExists = MkAtomTerm(AtomExists);
AtomExit = Yap_LookupAtom("exit"); TermExit = MkAtomTerm(AtomExit);
AtomExistenceError = Yap_LookupAtom("existence_error"); TermExistenceError = MkAtomTerm(AtomExistenceError);
AtomExoClause = Yap_FullLookupAtom("$exo_clause"); TermExoClause = MkAtomTerm(AtomExoClause);
@ -377,6 +378,7 @@
AtomSystem = Yap_LookupAtom("system"); TermSystem = MkAtomTerm(AtomSystem);
AtomSystemError = Yap_LookupAtom("SYSTEM_ERROR_INTERNAL"); TermSystemError = MkAtomTerm(AtomSystemError);
AtomSystemLibraryDir = Yap_LookupAtom("system_library_directory"); TermSystemLibraryDir = MkAtomTerm(AtomSystemLibraryDir);
AtomT = Yap_LookupAtom("t"); TermT = MkAtomTerm(AtomT);
AtomTerm = Yap_LookupAtom("term"); TermTerm = MkAtomTerm(AtomTerm);
AtomTermExpansion = Yap_LookupAtom("term_expansion"); TermTermExpansion = MkAtomTerm(AtomTermExpansion);
AtomTerms = Yap_LookupAtom("terms"); TermTerms = MkAtomTerm(AtomTerms);
@ -394,6 +396,7 @@
AtomTrue = Yap_LookupAtom("true"); TermTrue = MkAtomTerm(AtomTrue);
AtomTty = Yap_LookupAtom("tty"); TermTty = MkAtomTerm(AtomTty);
AtomTtys = Yap_LookupAtom("ttys"); TermTtys = MkAtomTerm(AtomTtys);
AtomTuple = Yap_LookupAtom("tuple"); TermTuple = MkAtomTerm(AtomTuple);
AtomTxt = Yap_LookupAtom("txt"); TermTxt = MkAtomTerm(AtomTxt);
AtomTypeError = Yap_LookupAtom("type_error"); TermTypeError = MkAtomTerm(AtomTypeError);
AtomUndefined = Yap_LookupAtom("undefined"); TermUndefined = MkAtomTerm(AtomUndefined);

View File

@ -132,6 +132,7 @@
AtomExecuteWithin = AtomAdjust(AtomExecuteWithin); TermExecuteWithin = MkAtomTerm(AtomExecuteWithin);
AtomExecuteWoMod = AtomAdjust(AtomExecuteWoMod); TermExecuteWoMod = MkAtomTerm(AtomExecuteWoMod);
AtomExist = AtomAdjust(AtomExist); TermExist = MkAtomTerm(AtomExist);
AtomExists = AtomAdjust(AtomExists); TermExists = MkAtomTerm(AtomExists);
AtomExit = AtomAdjust(AtomExit); TermExit = MkAtomTerm(AtomExit);
AtomExistenceError = AtomAdjust(AtomExistenceError); TermExistenceError = MkAtomTerm(AtomExistenceError);
AtomExoClause = AtomAdjust(AtomExoClause); TermExoClause = MkAtomTerm(AtomExoClause);
@ -377,6 +378,7 @@
AtomSystem = AtomAdjust(AtomSystem); TermSystem = MkAtomTerm(AtomSystem);
AtomSystemError = AtomAdjust(AtomSystemError); TermSystemError = MkAtomTerm(AtomSystemError);
AtomSystemLibraryDir = AtomAdjust(AtomSystemLibraryDir); TermSystemLibraryDir = MkAtomTerm(AtomSystemLibraryDir);
AtomT = AtomAdjust(AtomT); TermT = MkAtomTerm(AtomT);
AtomTerm = AtomAdjust(AtomTerm); TermTerm = MkAtomTerm(AtomTerm);
AtomTermExpansion = AtomAdjust(AtomTermExpansion); TermTermExpansion = MkAtomTerm(AtomTermExpansion);
AtomTerms = AtomAdjust(AtomTerms); TermTerms = MkAtomTerm(AtomTerms);
@ -394,6 +396,7 @@
AtomTrue = AtomAdjust(AtomTrue); TermTrue = MkAtomTerm(AtomTrue);
AtomTty = AtomAdjust(AtomTty); TermTty = MkAtomTerm(AtomTty);
AtomTtys = AtomAdjust(AtomTtys); TermTtys = MkAtomTerm(AtomTtys);
AtomTuple = AtomAdjust(AtomTuple); TermTuple = MkAtomTerm(AtomTuple);
AtomTxt = AtomAdjust(AtomTxt); TermTxt = MkAtomTerm(AtomTxt);
AtomTypeError = AtomAdjust(AtomTypeError); TermTypeError = MkAtomTerm(AtomTypeError);
AtomUndefined = AtomAdjust(AtomUndefined); TermUndefined = MkAtomTerm(AtomUndefined);

View File

@ -132,6 +132,7 @@ Atom AtomExecuteInMod; Term TermExecuteInMod;
Atom AtomExecuteWithin; Term TermExecuteWithin;
Atom AtomExecuteWoMod; Term TermExecuteWoMod;
Atom AtomExist; Term TermExist;
Atom AtomExists; Term TermExists;
Atom AtomExit; Term TermExit;
Atom AtomExistenceError; Term TermExistenceError;
Atom AtomExoClause; Term TermExoClause;
@ -377,6 +378,7 @@ Atom AtomSyntaxErrorHandler; Term TermSyntaxErrorHandler;
Atom AtomSystem; Term TermSystem;
Atom AtomSystemError; Term TermSystemError;
Atom AtomSystemLibraryDir; Term TermSystemLibraryDir;
Atom AtomT; Term TermT;
Atom AtomTerm; Term TermTerm;
Atom AtomTermExpansion; Term TermTermExpansion;
Atom AtomTerms; Term TermTerms;
@ -394,6 +396,7 @@ Atom AtomTrail;
Atom AtomTrue; Term TermTrue;
Atom AtomTty; Term TermTty;
Atom AtomTtys; Term TermTtys;
Atom AtomTuple; Term TermTuple;
Atom AtomTxt; Term TermTxt;
Atom AtomTypeError; Term TermTypeError;
Atom AtomUndefined; Term TermUndefined;

View File

@ -374,8 +374,10 @@ static Int access_file(USES_REGS1) {
{
int mode;
if (atmode == AtomExist)
mode = 00;
if (atmode == AtomExist)
mode = 00;
else if (atmode == AtomExists)
mode = 00;
else if (atmode == AtomWrite)
mode = 02;
else if (atmode == AtomRead)
@ -400,8 +402,10 @@ static Int access_file(USES_REGS1) {
{
int mode;
if (atmode == AtomExist)
mode = F_OK;
if (atmode == AtomExist)
mode = F_OK;
else if (atmode == AtomExists)
mode = F_OK;
else if (atmode == AtomWrite)
mode = W_OK;
else if (atmode == AtomRead)