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