Changeset 4514 for trunk/compiler

Show
Ignore:
Timestamp:
10/18/08 10:17:22 (3 months ago)
Author:
pmoura
Message:

Replaced the file/1 entity property by a file/2 property that also includes the source file path.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r4513 r4514  
    260260:- dynamic('$lgt_pp_file_encoding_'/2).         % '$lgt_pp_file_encoding_'(LogtalkEncoding, PrologEncoding) 
    261261:- dynamic('$lgt_pp_file_bom_'/1).              % '$lgt_pp_file_bom_'(BOM) 
    262 :- dynamic('$lgt_pp_file_name_'/1).             % '$lgt_pp_file_name_'(File) 
     262:- dynamic('$lgt_pp_file_path_'/2).             % '$lgt_pp_file_path_'(File, Path) 
    263263 
    264264:- dynamic('$lgt_pp_file_rclause_'/1).          % '$lgt_pp_file_rclause_'(Clause) 
     
    45614561    '$lgt_save_global_op_table', 
    45624562    '$lgt_file_name'(logtalk, File, Source), 
    4563     asserta('$lgt_pp_file_name_'(Source)), 
     4563    '$lgt_current_directory'(Directory), 
     4564    asserta('$lgt_pp_file_path_'(Source, Directory)), 
    45644565    catch( 
    45654566        open(Source, read, Input), 
     
    45894590        '$lgt_compiler_error_handler'(Output, OutputError)),    % with non-ISO compliant Prolog compilers 
    45904591    close(Output), 
    4591     retractall('$lgt_pp_file_name_'(_)), 
     4592    retractall('$lgt_pp_file_path_'(_, _)), 
    45924593    '$lgt_restore_global_op_table'. 
    45934594 
     
    46654666%   ;   true 
    46664667%   ), 
    4667     '$lgt_pp_file_name_'(File) -> 
    4668     assertz('$lgt_pp_rclause_'('$lgt_entity_property_'(Entity, file(File)))). 
     4668    '$lgt_pp_file_path_'(File, Path) -> 
     4669    assertz('$lgt_pp_rclause_'('$lgt_entity_property_'(Entity, file(File, Path)))). 
    46694670 
    46704671 
     
    49124913    retractall('$lgt_pp_file_encoding_'(_, _)), 
    49134914    retractall('$lgt_pp_file_bom_'(_)), 
    4914     retractall('$lgt_pp_file_name_'(_)), 
     4915    retractall('$lgt_pp_file_path_'(_, _)), 
    49154916    retractall('$lgt_pp_file_rclause_'(_)). 
    49164917