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:
		| @@ -371,6 +371,7 @@ Yap_Error(yap_error_number type, Term where, char *format,...) | ||||
|   char *tp = tmpbuf; | ||||
|   int psize = YAP_BUF_SIZE; | ||||
|  | ||||
|   Yap_Error_TYPE = YAP_NO_ERROR; | ||||
| #if DEBUG_STRICT | ||||
|   if (Yap_heap_regs && !(Yap_PrologMode & BootMode))  | ||||
|     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"); | ||||
|     return FALSE; | ||||
|   } | ||||
|   Yap_Error_TYPE = YAP_NO_ERROR; | ||||
|   while (TRUE) { | ||||
|     CELL *old_H; | ||||
|     UInt cpos = 0; | ||||
| @@ -3901,6 +3902,7 @@ format(volatile Term otail, volatile Term oargs, int sno) | ||||
|   format_info finfo; | ||||
|   Term fmod = CurrentModule; | ||||
|  | ||||
|  | ||||
|   FormatInfo = &finfo; | ||||
|   finfo.pad_max = finfo.pad_entries; | ||||
|   finfo.format_error = FALSE; | ||||
|   | ||||
| @@ -101,7 +101,7 @@ load_files(Files,Opts) :- | ||||
| 	  '$do_error'(type_error(atom,M),Call) | ||||
| 	). | ||||
| '$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'(X, Mod, Call,InfLevel,_,Changed,CompilationMode,Imports,Stream,_,Reconsult,UseModule) :- | ||||
|         nonvar(Stream), !, | ||||
|   | ||||
| @@ -429,6 +429,7 @@ unknown(V0,V) :- | ||||
| '$valid_unknown_handler'(S,_) :- | ||||
| 	'$do_error'(domain_error(flag_value,unknown+S),yap_flag(unknown,S)). | ||||
|  | ||||
|  | ||||
| '$ask_unknown_flag'(Old) :- | ||||
| 	recorded('$unknown','$unkonwn'(_,MyOld),_), !, | ||||
| 	'$cleanup_unknwon_handler'(MyOld,Old). | ||||
| @@ -452,10 +453,10 @@ unknown(V0,V) :- | ||||
| 	'$program_continuation'(PMod,PName,PAr), | ||||
| 	'$do_error'(existence_error(procedure,Name/Arity),context(Mod:Goal,PMod:PName/PAr)). | ||||
|  | ||||
| '$unknown_warning'(P) :- | ||||
| 	P=M:F, | ||||
| 	functor(F,Na,Ar), | ||||
| 	'$print_message'(error,error(existence_error(procedure,M:Na/Ar), [P])), | ||||
| '$unknown_warning'(Mod:Goal) :- | ||||
| 	functor(Goal,Name,Arity), | ||||
| 	'$program_continuation'(PMod,PName,PAr), | ||||
| 	'$print_message'(error,error(existence_error(procedure,Name/Ar), context(Mod:Goal,PMod:PName/PAr))), | ||||
| 	fail. | ||||
|  | ||||
| %%% Some "dirty" predicates | ||||
|   | ||||
		Reference in New Issue
	
	Block a user