jupyter
This commit is contained in:
@@ -2122,7 +2122,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)));
|
||||
sno = Yap_OpenStream(fl, "r", MkAtomTerm(Yap_LookupAtom(fl)), LOCAL_encoding);
|
||||
if (sno < 0)
|
||||
return sno;
|
||||
if (!Yap_ChDir(dirname((char *)fl))) return -1;
|
||||
|
@@ -4913,11 +4913,15 @@ static Int cont_current_key_integer(USES_REGS1) {
|
||||
|
||||
Term Yap_FetchTermFromDB(void *ref) {
|
||||
CACHE_REGS
|
||||
if (ref == NULL)
|
||||
return 0;
|
||||
return GetDBTerm(ref, FALSE PASS_REGS);
|
||||
}
|
||||
|
||||
Term Yap_FetchClauseTermFromDB(void *ref) {
|
||||
CACHE_REGS
|
||||
if (ref == NULL)
|
||||
return 0;
|
||||
return GetDBTerm(ref, TRUE PASS_REGS);
|
||||
}
|
||||
|
||||
|
@@ -149,7 +149,10 @@ const char *Yap_BINDIR, *Yap_ROOTDIR, *Yap_SHAREDIR, *Yap_LIBDIR, *Yap_DLLDIR,
|
||||
*Yap_PLDIR, *Yap_BOOTSTRAP, *Yap_COMMONSDIR, *Yap_STARTUP,
|
||||
*Yap_INPUT_STARTUP, *Yap_OUTPUT_STARTUP, *Yap_BOOTFILE, *Yap_INCLUDEDIR;
|
||||
|
||||
/* do initial boot by consulting the file boot.yap */
|
||||
/**
|
||||
* consult loop in C: used to boot the system, butt supports goal execution and recursive consulting.
|
||||
*
|
||||
* */
|
||||
static void consult(const char *b_file USES_REGS) {
|
||||
Term t;
|
||||
int c_stream, osno, oactive;
|
||||
@@ -157,7 +160,7 @@ static void consult(const char *b_file USES_REGS) {
|
||||
Functor functor_command1 = Yap_MkFunctor(Yap_LookupAtom(":-"), 1);
|
||||
Functor functor_compile2 = Yap_MkFunctor(Yap_LookupAtom("c_compile"), 1);
|
||||
|
||||
/* consult boot.pl */
|
||||
/* consult in C */
|
||||
int lvl = push_text_stack();
|
||||
char *full = Malloc(YAP_FILENAME_MAX + 1);
|
||||
full[0] = '\0';
|
||||
|
Reference in New Issue
Block a user