ios
This commit is contained in:
parent
72a703393f
commit
1201357017
@ -525,7 +525,7 @@ bool YAPEngine::mgoal(Term t, Term tmod, bool release) {
|
||||
q.CurSlot = Yap_StartSlots();
|
||||
q.p = P;
|
||||
q.cp = CP;
|
||||
PredEntry *ap;
|
||||
PredEntry *ap = nullptr;
|
||||
if (IsStringTerm(tmod))
|
||||
tmod = MkAtomTerm(Yap_LookupAtom(StringOfTerm(tmod)));
|
||||
YAPPredicate *p = new YAPPredicate(t, tmod, ts, "C++");
|
||||
|
@ -126,8 +126,7 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
|
||||
`true`. */
|
||||
YAP_FLAG(CHARACTER_ESCAPES_FLAG, "character_escapes", true, booleanFlag,
|
||||
"true", NULL),
|
||||
YAP_FLAG(COLON_SETS_CALLING_CONTEXT_FLAG, "colon_sets_calling_context",
|
||||
true, booleanFlag, "true", NULL),
|
||||
YAP_FLAG(COLON_SETS_CALLING_CONTEXT_FLAG, "colon_sets_calling_context", true, booleanFlag, "true", NULL),
|
||||
/**< `compiled_at `
|
||||
|
||||
Read-only flag that gives the time when the main YAP binary was compiled. It
|
||||
@ -145,8 +144,7 @@ opportunity. Initial value is 10,000. May be changed. A value of 0
|
||||
YAP_FLAG(DEBUG_INFO_FLAG, "debug_info", true, booleanFlag, "true", NULL),
|
||||
YAP_FLAG(DEBUG_ON_ERROR_FLAG, "debug_on_error", true, booleanFlag, "true",
|
||||
NULL),
|
||||
/**< `debugger_print_options `
|
||||
|
||||
/**<
|
||||
If bound, set the argument to the `write_term/3` options the
|
||||
debugger uses to write terms. If unbound, show the current options.
|
||||
*/
|
||||
|
@ -171,6 +171,7 @@ open_mem_read_stream(USES_REGS1) /* $open_mem_read_stream(+List,-Stream) */
|
||||
int l = push_text_stack();
|
||||
buf = Yap_TextTermToText(ti);
|
||||
if (!buf) {
|
||||
pop_text_stack(l);
|
||||
return false;
|
||||
}
|
||||
buf = pop_output_text_stack(l, buf);
|
||||
|
@ -1127,10 +1127,7 @@ static Int format(Term tf, Term tas, Term tout USES_REGS) {
|
||||
f == FunctorCodes || f == FunctorChars1 || f == FunctorChars) ){
|
||||
output_stream = Yap_OpenBufWriteStream(PASS_REGS1);
|
||||
mem_stream = true;
|
||||
}
|
||||
if (output_stream <0 ||!mem_stream) {
|
||||
UNLOCK(GLOBAL_Stream[output_stream].streamlock);
|
||||
/* needs to change LOCAL_c_output_stream for write */
|
||||
} else {
|
||||
output_stream = Yap_CheckStream(tout, Output_Stream_f, "format/3");
|
||||
}
|
||||
if (output_stream == -1) {
|
||||
|
@ -1557,7 +1557,7 @@ int Yap_OpenStream(Term tin, const char *io_mode, Term user_name,
|
||||
CACHE_REGS
|
||||
int sno;
|
||||
StreamDesc *st;
|
||||
struct vfs *vfsp;
|
||||
struct vfs *vfsp = NULL;
|
||||
int flags;
|
||||
const char *fname;
|
||||
|
||||
@ -1627,7 +1627,7 @@ int Yap_OpenStream(Term tin, const char *io_mode, Term user_name,
|
||||
const char *buf;
|
||||
int i = push_text_stack();
|
||||
buf = Yap_TextTermToText(ArgOfTerm(1, tin) PASS_REGS);
|
||||
if (!buf) {
|
||||
if (buf == NULL) {
|
||||
pop_text_stack(i);
|
||||
return -1;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,13 +1,12 @@
|
||||
/**
|
||||
|
||||
/*!
|
||||
* @file complete.yap
|
||||
*
|
||||
* @brief Prolog completer.
|
||||
*/
|
||||
|
||||
:- module( completer,
|
||||
[
|
||||
completions/2.
|
||||
]).
|
||||
[completions/2 ]).
|
||||
|
||||
:- use_module(library(lists)).
|
||||
:- use_module(library(maplist)).
|
||||
@ -116,8 +115,3 @@ cont(0, F, P, P0) :-
|
||||
atom_concat( F, P, P0 ).
|
||||
cont( _, F, P, PB ):-
|
||||
atom_concat( [F, P, '( )'], PB ).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -52,11 +52,13 @@ jupyter_consult(Text) :-
|
||||
blank( Text ),
|
||||
!.
|
||||
jupyter_consult(Cell) :-
|
||||
open_mem_read_stream( Cell, Stream),
|
||||
% Name = 'Inp',
|
||||
% stream_property(Stream, file_name(Name) ),
|
||||
load_files(user:'jupyter cell',[stream(Stream)]), !.
|
||||
%should load_files close?
|
||||
setup_call_cleanup(
|
||||
open_mem_read_stream( Cell, Stream),
|
||||
load_files(user:'jupyter cell',[stream(Stream)]),
|
||||
close(Stream)
|
||||
).
|
||||
|
||||
blank(Text) :-
|
||||
atom_codes(Text, L),
|
||||
|
@ -804,5 +804,4 @@ class YAPRun:
|
||||
if query[-1] == '.':
|
||||
return s,'',False,0
|
||||
(query, _,loop, sols) = self.clean_end(query)
|
||||
print(program, query, loop, sols)
|
||||
return (program, query, loop, sols)
|
||||
|
Reference in New Issue
Block a user