diff --git a/library/dialect/swi/fli/swi.c b/library/dialect/swi/fli/swi.c index 41a8d9ad3..7425aa3cd 100755 --- a/library/dialect/swi/fli/swi.c +++ b/library/dialect/swi/fli/swi.c @@ -2234,7 +2234,7 @@ X_API qid_t PL_open_query(module_t ctx, int flags, predicate_t p, term_t t0) t = Yap_AddressFromSlot(t0 PASS_REGS); /* ignore flags and module for now */ - qid_t new = (qid_t)Yap_AllocCodeSpace(sizeof(*qid_t)); + qid_t new = (qid_t)Yap_AllocCodeSpace(sizeof(struct open_query_struct)); LOCAL_execution = new; new->q_open=1; new->q_state=0; diff --git a/os/pl-rl.c b/os/pl-rl.c index f4dc7218f..735400d56 100755 --- a/os/pl-rl.c +++ b/os/pl-rl.c @@ -591,6 +591,9 @@ PL_install_readline(void) #ifndef __WINDOWS__ if ( !truePrologFlag(PLFLAG_TTY_CONTROL) || !isatty(0) ) return; + // don't allow YAP to run readline under an Eclipse Console + if (getenv("EclipseVersion")) + return; #endif alevel = setAccessLevel(ACCESS_LEVEL_SYSTEM); diff --git a/packages/prism/src/c/up/util.c b/packages/prism/src/c/up/util.c index 93103afff..4306b8077 100644 --- a/packages/prism/src/c/up/util.c +++ b/packages/prism/src/c/up/util.c @@ -60,7 +60,7 @@ int get_term_depth(TERM t) XDEREF(t); - SWITCH_OP(t, l_term_depth, { return 0; }, { return 0; }, { + SWITCH_OP(t, l_term_depth, { return 0; }, { return (0); }, { if (IsNumberedVar(t)) return 0; d = 0;