fix bad handling of undef warning
fix exporting module in use_module([_|_],_). git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1480 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
e0050ef3d7
commit
b52c6d333e
@ -371,6 +371,7 @@ Yap_Error(yap_error_number type, Term where, char *format,...)
|
|||||||
char *tp = tmpbuf;
|
char *tp = tmpbuf;
|
||||||
int psize = YAP_BUF_SIZE;
|
int psize = YAP_BUF_SIZE;
|
||||||
|
|
||||||
|
Yap_Error_TYPE = YAP_NO_ERROR;
|
||||||
#if DEBUG_STRICT
|
#if DEBUG_STRICT
|
||||||
if (Yap_heap_regs && !(Yap_PrologMode & BootMode))
|
if (Yap_heap_regs && !(Yap_PrologMode & BootMode))
|
||||||
fprintf(stderr,"***** Processing Error %d (%lx,%x) %s***\n", type, (unsigned long int)ActiveSignals,Yap_PrologMode,format);
|
fprintf(stderr,"***** Processing Error %d (%lx,%x) %s***\n", type, (unsigned long int)ActiveSignals,Yap_PrologMode,format);
|
||||||
|
@ -3024,6 +3024,7 @@ static Int
|
|||||||
Yap_Error(PERMISSION_ERROR_INPUT_BINARY_STREAM, MkAtomTerm(Stream[inp_stream].u.file.name), "read_term/2");
|
Yap_Error(PERMISSION_ERROR_INPUT_BINARY_STREAM, MkAtomTerm(Stream[inp_stream].u.file.name), "read_term/2");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Yap_Error_TYPE = YAP_NO_ERROR;
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
CELL *old_H;
|
CELL *old_H;
|
||||||
UInt cpos = 0;
|
UInt cpos = 0;
|
||||||
@ -3901,6 +3902,7 @@ format(volatile Term otail, volatile Term oargs, int sno)
|
|||||||
format_info finfo;
|
format_info finfo;
|
||||||
Term fmod = CurrentModule;
|
Term fmod = CurrentModule;
|
||||||
|
|
||||||
|
|
||||||
FormatInfo = &finfo;
|
FormatInfo = &finfo;
|
||||||
finfo.pad_max = finfo.pad_entries;
|
finfo.pad_max = finfo.pad_entries;
|
||||||
finfo.format_error = FALSE;
|
finfo.format_error = FALSE;
|
||||||
|
@ -101,7 +101,7 @@ load_files(Files,Opts) :-
|
|||||||
'$do_error'(type_error(atom,M),Call)
|
'$do_error'(type_error(atom,M),Call)
|
||||||
).
|
).
|
||||||
'$lf'([F|Fs], Mod,Call,InfLevel,Expand,Changed,CompilationMode,Imports,Stream,Encoding,Reconsult,UseModule) :- !,
|
'$lf'([F|Fs], Mod,Call,InfLevel,Expand,Changed,CompilationMode,Imports,Stream,Encoding,Reconsult,UseModule) :- !,
|
||||||
'$lf'(F, Mod,Call,InfLevel,Expand,Changed,CompilationMode,Imports,Stream,Encoding,Reconsult,UseModule),
|
'$lf'(F,Mod,Call,InfLevel,Expand,Changed,CompilationMode,Imports,Stream,Encoding,Reconsult,_),
|
||||||
'$lf'(Fs, Mod,Call,InfLevel,Expand,Changed,CompilationMode,Imports,Stream,Encoding,Reconsult,UseModule).
|
'$lf'(Fs, Mod,Call,InfLevel,Expand,Changed,CompilationMode,Imports,Stream,Encoding,Reconsult,UseModule).
|
||||||
'$lf'(X, Mod, Call,InfLevel,_,Changed,CompilationMode,Imports,Stream,_,Reconsult,UseModule) :-
|
'$lf'(X, Mod, Call,InfLevel,_,Changed,CompilationMode,Imports,Stream,_,Reconsult,UseModule) :-
|
||||||
nonvar(Stream), !,
|
nonvar(Stream), !,
|
||||||
|
@ -429,6 +429,7 @@ unknown(V0,V) :-
|
|||||||
'$valid_unknown_handler'(S,_) :-
|
'$valid_unknown_handler'(S,_) :-
|
||||||
'$do_error'(domain_error(flag_value,unknown+S),yap_flag(unknown,S)).
|
'$do_error'(domain_error(flag_value,unknown+S),yap_flag(unknown,S)).
|
||||||
|
|
||||||
|
|
||||||
'$ask_unknown_flag'(Old) :-
|
'$ask_unknown_flag'(Old) :-
|
||||||
recorded('$unknown','$unkonwn'(_,MyOld),_), !,
|
recorded('$unknown','$unkonwn'(_,MyOld),_), !,
|
||||||
'$cleanup_unknwon_handler'(MyOld,Old).
|
'$cleanup_unknwon_handler'(MyOld,Old).
|
||||||
@ -452,10 +453,10 @@ unknown(V0,V) :-
|
|||||||
'$program_continuation'(PMod,PName,PAr),
|
'$program_continuation'(PMod,PName,PAr),
|
||||||
'$do_error'(existence_error(procedure,Name/Arity),context(Mod:Goal,PMod:PName/PAr)).
|
'$do_error'(existence_error(procedure,Name/Arity),context(Mod:Goal,PMod:PName/PAr)).
|
||||||
|
|
||||||
'$unknown_warning'(P) :-
|
'$unknown_warning'(Mod:Goal) :-
|
||||||
P=M:F,
|
functor(Goal,Name,Arity),
|
||||||
functor(F,Na,Ar),
|
'$program_continuation'(PMod,PName,PAr),
|
||||||
'$print_message'(error,error(existence_error(procedure,M:Na/Ar), [P])),
|
'$print_message'(error,error(existence_error(procedure,Name/Ar), context(Mod:Goal,PMod:PName/PAr))),
|
||||||
fail.
|
fail.
|
||||||
|
|
||||||
%%% Some "dirty" predicates
|
%%% Some "dirty" predicates
|
||||||
|
Reference in New Issue
Block a user