fixes
This commit is contained in:
parent
4de58e0fe4
commit
4fff363436
6
C/text.c
6
C/text.c
@ -532,8 +532,10 @@ unsigned char *Yap_readText(seq_tv_t *inp USES_REGS) {
|
||||
}
|
||||
#endif
|
||||
if (inp->type & YAP_STRING_TERM) {
|
||||
// Yap_DebugPlWriteln(inp->val.t);
|
||||
char *s = (char *)Yap_TermToBuffer(inp->val.t, 0);
|
||||
// Yap_DebugPlWriteln(inp->val.t
|
||||
return inp->val.c = (char *)Yap_TermToBuffer(inp->val.t, 0);
|
||||
pop_text_stack(lvl);
|
||||
return inp->val.c;
|
||||
}
|
||||
if (inp->type & YAP_STRING_CHARS) {
|
||||
pop_text_stack(lvl);
|
||||
|
@ -203,13 +203,13 @@ static bool consult(const char *b_file USES_REGS) {
|
||||
} else {
|
||||
YAP_CompileClause(t);
|
||||
}
|
||||
} while (true);
|
||||
yap_error_descriptor_t *errd;
|
||||
if ((errd =
|
||||
Yap_GetException(LOCAL_ActiveError))) {
|
||||
fprintf(stderr, "%s:%ld:0: Error %s %s Found\n", errd->errorFile, (long int) errd->errorLine, errd->classAsText,
|
||||
errd->errorAsText);
|
||||
}
|
||||
} while (true);
|
||||
BACKUP_MACHINE_REGS();
|
||||
YAP_EndConsult(c_stream, &osno, full);
|
||||
if (!Yap_AddAlias(AtomLoopStream, osno)) {
|
||||
|
@ -519,7 +519,7 @@ bool YAPEngine::mgoal(Term t, Term tmod, bool release) {
|
||||
#if YAP_PYTHON
|
||||
// PyThreadState *_save;
|
||||
|
||||
std::cerr << "mgoal " << YAPTerm(t).text() << "\n";
|
||||
//std::cerr << "mgoal " << YAPTerm(t).text() << "\n";
|
||||
// _save = PyEval_SaveThread();
|
||||
#endif
|
||||
CACHE_REGS
|
||||
@ -553,7 +553,7 @@ bool YAPEngine::mgoal(Term t, Term tmod, bool release) {
|
||||
//__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "exec ");
|
||||
|
||||
result = (bool)YAP_EnterGoal(ap, nullptr, &q);
|
||||
std::cerr << "mgoal " << YAPTerm(t).text() << "\n";
|
||||
//std::cerr << "mgoal " << YAPTerm(t).text() << "\n";
|
||||
|
||||
YAP_LeaveGoal(result && !release, &q);
|
||||
// PyEval_RestoreThread(_save);
|
||||
|
@ -41,7 +41,6 @@ jupyter_cell( Caller, _, Line ) :-
|
||||
E=error(A,B),
|
||||
system_error(A,B)
|
||||
).
|
||||
jupyter_cell(_,_,_).
|
||||
|
||||
restreams(call) :-
|
||||
streams(true).
|
||||
@ -207,4 +206,4 @@ plot_inline :-
|
||||
|
||||
:- endif.
|
||||
|
||||
:- ( start_low_level_trace ).
|
||||
%:- ( start_low_level_trace ).
|
||||
|
@ -121,9 +121,11 @@ print_message(L,E) :-
|
||||
).
|
||||
|
||||
'$undefp0'([M|G], _Action) :-
|
||||
stream_property( loop_stream, file_name(F)),
|
||||
stream_property( loop_stream, line_number(L)),
|
||||
format(user_error,'~a:~d error undefined: call to ~w~n',[F,L,M:G]),
|
||||
stream_property( loop_stream, [file_name(F), line_number(L)]),
|
||||
format(user_error,'~a:~d error undefined:',[F,L]),
|
||||
fail
|
||||
;
|
||||
format(user_error,' call to ~w~n',[M:G]),
|
||||
fail.
|
||||
|
||||
:- '$undefp_handler'('$undefp0'(_,_),prolog).
|
||||
|
Reference in New Issue
Block a user