shlib is now in YAP.
This commit is contained in:
parent
32cbd34ff1
commit
e81960a96d
@ -17,9 +17,6 @@
|
|||||||
'$set_source_module'/2,
|
'$set_source_module'/2,
|
||||||
'$declare_module'/5,
|
'$declare_module'/5,
|
||||||
'$set_predicate_attribute'/3,
|
'$set_predicate_attribute'/3,
|
||||||
load_foreign_library/1,
|
|
||||||
load_foreign_library/2,
|
|
||||||
use_foreign_library/1,
|
|
||||||
time_file/2,
|
time_file/2,
|
||||||
flag/3,
|
flag/3,
|
||||||
current_flag/1
|
current_flag/1
|
||||||
@ -241,24 +238,6 @@ user:file_search_path(foreign, swi(ArchLib)) :-
|
|||||||
user:file_search_path(foreign, swi(lib)).
|
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), !,
|
concat_atom([A|List], Separator, New) :- var(List), !,
|
||||||
atom_codes(Separator,[C]),
|
atom_codes(Separator,[C]),
|
||||||
atom_codes(New, NewChars),
|
atom_codes(New, NewChars),
|
||||||
@ -332,6 +311,16 @@ compile_aux_clauses([Cl|Cls]) :-
|
|||||||
'$set_source_module'(Source0, SourceF) :-
|
'$set_source_module'(Source0, SourceF) :-
|
||||||
current_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, _, _, _) :-
|
'$declare_module'(Name, Context, _, _, _) :-
|
||||||
add_import_module(Name, Context, start).
|
add_import_module(Name, Context, start).
|
||||||
|
|
||||||
|
@ -38,7 +38,6 @@ index(term_hash,2,system,library(dialect/swi)).
|
|||||||
index(unifiable,3,system,library(dialect/swi)).
|
index(unifiable,3,system,library(dialect/swi)).
|
||||||
index(cyclic_term,1,system,library(dialect/swi)).
|
index(cyclic_term,1,system,library(dialect/swi)).
|
||||||
index(variant,2,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,2,system,library(dialect/swi)).
|
||||||
index(concat_atom,3,system,library(dialect/swi)).
|
index(concat_atom,3,system,library(dialect/swi)).
|
||||||
index(setenv,2,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('$set_source_module',2,system,library(dialect/swi)).
|
||||||
index('$declare_module',5,system,library(dialect/swi)).
|
index('$declare_module',5,system,library(dialect/swi)).
|
||||||
index('$set_predicate_attribute',3,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(time_file,2,system,library(dialect/swi)).
|
||||||
index(flag,3,system,library(dialect/swi)).
|
index(flag,3,system,library(dialect/swi)).
|
||||||
index(current_flag,1,system,library(dialect/swi)).
|
index(current_flag,1,system,library(dialect/swi)).
|
||||||
|
Reference in New Issue
Block a user