shlib is now in YAP.

This commit is contained in:
Vítor Santos Costa 2010-06-18 00:28:42 +01:00
parent 32cbd34ff1
commit e81960a96d
2 changed files with 10 additions and 24 deletions

View File

@ -17,9 +17,6 @@
'$set_source_module'/2,
'$declare_module'/5,
'$set_predicate_attribute'/3,
load_foreign_library/1,
load_foreign_library/2,
use_foreign_library/1,
time_file/2,
flag/3,
current_flag/1
@ -241,24 +238,6 @@ user:file_search_path(foreign, swi(ArchLib)) :-
user:file_search_path(foreign, swi(lib)).
%
% maybe a good idea to eventually support this in YAP.
% but for now just ignore it.
%
load_foreign_library(P,Command) :-
absolute_file_name(P,[file_type(executable),solutions(first),file_errors(fail)],Lib),
load_foreign_files([Lib],[],Command).
load_foreign_library(P) :-
prolog:load_foreign_library(P,install).
:- dynamic loaded/1.
use_foreign_library(A) :-
loaded(foreign_library(A)), !.
use_foreign_library(A) :-
load_foreign_library(A),
assert(loaded(foreign_library(A))).
concat_atom([A|List], Separator, New) :- var(List), !,
atom_codes(Separator,[C]),
atom_codes(New, NewChars),
@ -332,6 +311,16 @@ compile_aux_clauses([Cl|Cls]) :-
'$set_source_module'(Source0, SourceF) :-
current_module(Source0, SourceF).
/** '$declare_module'(+Module, +Super, +File, +Line, +Redefine) is det.
Start a new (source-)module
@param Module is the name of the module to declare
@param File is the canonical name of the file from which the module
is loaded
@param Line is the line-number of the :- module/2 directive.
@param Redefine If =true=, allow associating the module to a new file
*/
'$declare_module'(Name, Context, _, _, _) :-
add_import_module(Name, Context, start).

View File

@ -38,7 +38,6 @@ index(term_hash,2,system,library(dialect/swi)).
index(unifiable,3,system,library(dialect/swi)).
index(cyclic_term,1,system,library(dialect/swi)).
index(variant,2,system,library(dialect/swi)).
index(term_to_atom,2,system,library(dialect/swi)).
index(concat_atom,2,system,library(dialect/swi)).
index(concat_atom,3,system,library(dialect/swi)).
index(setenv,2,system,library(dialect/swi)).
@ -53,8 +52,6 @@ index(convert_time,2,system,library(dialect/swi)).
index('$set_source_module',2,system,library(dialect/swi)).
index('$declare_module',5,system,library(dialect/swi)).
index('$set_predicate_attribute',3,system,library(dialect/swi)).
index(load_foreign_library,1,system,library(dialect/swi)).
index(load_foreign_library,2,system,library(dialect/swi)).
index(time_file,2,system,library(dialect/swi)).
index(flag,3,system,library(dialect/swi)).
index(current_flag,1,system,library(dialect/swi)).