home *** CD-ROM | disk | FTP | other *** search
- %%%%%%%%%%%%%% newtrace.pro %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- /* Interp code used in processing trace messages , etc.
- */
-
- %%%%%%%%%%%%%% trace constants %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- % if means_reopen is true, this means that the file
- % referred to in its calling context should be closed and
- % reopened for appending instead of being recreated.
- means_reopen( reopen ).
- means_reopen( append ).
- means_reopen( ra ).
-
- %%%%%%%%%%%%%% log file %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- log_file_msg($log file:$).
- log_filename($log.log$).
-
- init_log_file :-
- init_log_file( create ) .
-
- init_log_file( STATUS ) :-
- call( incremental_flag ),
- log_filename(File ) ,
- trace_message( init_log_trace ,
- $ in incremental init log rule$,
- $$),
- (
- call( zzz_file_created( File )),
- getglobal( zzz_log_file,_ ),
- !
- ;
- log_filename(File ) ,
- create(Handle,File ),
- close(Handle),
- setglobal( zzz_log_file, File ),
- asserta( zzz_file_created( File ))
- ).
-
-
- init_log_file( STATUS ) :-
- % call(log_filename(File)),
- log_filename(File) ,
- % call(log_file_msg(Msg)),
- log_file_msg(Msg) ,
- trace_message( init_log_trace ,
- $ i r. 2 init log b init_file$,
- $$),
- init_file(File , log_file_handle, Msg, STATUS).
-
-
- close_log_file :-
- call( incremental_flag),
- !.
- close_log_file :- close_file( log_file_handle ).
-
- %%%%%%%%%%%%%%%%%%% eof %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%