popen support

This commit is contained in:
Vitor Santos Costa
2018-04-24 17:51:00 +01:00
parent 2c1d6910de
commit af848f28aa
10 changed files with 788 additions and 750 deletions

View File

@@ -2119,7 +2119,7 @@ X_API int YAP_InitConsult(int mode, const char *fname, char **full, int *osnop)
}
}
bool consulted = (mode == YAP_CONSULT_MODE);
sno = Yap_OpenStream(fl, "r", MkAtomTerm(Yap_LookupAtom(fl)), LOCAL_encoding);
sno = Yap_OpenStream(MkStringTerm(fl), "r", MkAtomTerm(Yap_LookupAtom(fl)), LOCAL_encoding);
if (sno < 0 ||
!Yap_ChDir(dirname((char *)fl))) {
pop_text_stack(lvl);