linux backport

file exists system predicate
$source_file -> $user source
hide and make system preds
fix check_head_and_body
user_expansion never fails
goal expansion is controlled b dynamic procedure
add must_be_of_type predicate_indicator
fix neat_call, debug flag is user controlled
use simplecudd, not ptoblogbdd
compile all of myddas
fx junk in file_name
fix warnings
use common file opening struct and funds
avoid pairs module
fix db queues
This commit is contained in:
Vítor Santos Costa
2016-01-04 14:11:09 +00:00
parent c0f00e7a0f
commit 50c8724322
51 changed files with 1576 additions and 948 deletions

View File

@@ -255,18 +255,7 @@ static Int representation_error(int sno, Term t2 USES_REGS) {
}
static Int file_name(int sno, Term t2 USES_REGS) {
char s[MAXPATHLEN + 1];
int f = Yap_GetStreamFd(sno);
Term rc;
char *name = Yap_guessFileName(f, sno, s, MAXPATHLEN);
if (name)
rc = MkAtomTerm(Yap_LookupAtom(name));
else
return false;
if (!IsVarTerm(t2) && !isatom(t2)) {
return FALSE;
}
return Yap_unify_constant(t2, rc);
return Yap_unify_constant(t2, MkAtomTerm(GLOBAL_Stream[sno].name) );
}
static Int file_no(int sno, Term t2 USES_REGS) {
@@ -788,7 +777,7 @@ static Int set_stream(USES_REGS1) { /* Init current_stream */
Yap_CheckStream(ARG1, Input_Stream_f | Output_Stream_f | Append_Stream_f,
"set_stream_position/2");
if (sno < 0) {
return (FALSE);
return false;
}
return do_set_stream(sno, Deref(ARG2) PASS_REGS);
}