From e81960a96d630b578abdf1c615441c76920bb7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Fri, 18 Jun 2010 00:28:42 +0100 Subject: [PATCH] shlib is now in YAP. --- library/dialect/swi.yap | 31 ++++++++++--------------------- library/dialect/swi/INDEX.pl | 3 --- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/library/dialect/swi.yap b/library/dialect/swi.yap index 61d663424..df0bf2ad4 100755 --- a/library/dialect/swi.yap +++ b/library/dialect/swi.yap @@ -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). diff --git a/library/dialect/swi/INDEX.pl b/library/dialect/swi/INDEX.pl index 89c52b0f7..9be2670c5 100644 --- a/library/dialect/swi/INDEX.pl +++ b/library/dialect/swi/INDEX.pl @@ -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)).