This commit is contained in:
Vitor Santos Costa
2018-07-03 00:08:19 +01:00
parent fd492b5b16
commit e2a46cf423
12 changed files with 58 additions and 41 deletions

View File

@@ -1289,8 +1289,9 @@ static bool fill_stream(int sno, StreamDesc *st, Term tin, const char *io_mode,
return false;
}
buf = pop_output_text_stack(i, buf);
Atom nat = Yap_LookupAtom(Yap_StrPrefix(buf,32));
sno = Yap_open_buf_read_stream(buf, strlen(buf) + 1, &LOCAL_encoding,
MEM_BUF_MALLOC);
MEM_BUF_MALLOC, nat, MkAtomTerm(NameOfFunctor(f)));
return Yap_OpenBufWriteStream(PASS_REGS1);
}
} else if (!strcmp(RepAtom(NameOfFunctor(f))->StrOfAE, "popen")) {