fixes
This commit is contained in:
parent
0320d8b49b
commit
a21dce7801
@ -10,6 +10,15 @@
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
/**
|
||||
* @file real.pl
|
||||
* @brief Prolog component of r_interface
|
||||
* @defgroup realpl Prolog component of r_interface
|
||||
* @ingroup real
|
||||
* @{
|
||||
* Initialization code and key predicares for R-Prolog interface.
|
||||
*
|
||||
*/
|
||||
|
||||
:- module(real, [
|
||||
start_r/0,
|
||||
@ -51,7 +60,6 @@
|
||||
]).
|
||||
|
||||
|
||||
:- use_module(library(shlib)).
|
||||
:- use_module(library(lists)).
|
||||
:- use_module(library(apply_macros)).
|
||||
:- use_module(library(charsio)).
|
||||
@ -125,8 +133,8 @@ init_r_env :-
|
||||
install_in_osx.
|
||||
init_r_env :-
|
||||
absolute_file_name( path('R'), This,
|
||||
[ extensions(['',exe]),
|
||||
access(execute)
|
||||
[ extensions(['',so,dll,dylib]),
|
||||
access(read)
|
||||
] ),
|
||||
dirpath_to_r_home( This, Rhome ),
|
||||
exists_directory( Rhome ), !,
|
||||
@ -134,7 +142,8 @@ init_r_env :-
|
||||
setenv('R_HOME',Rhome).
|
||||
|
||||
init_r_env :-
|
||||
throw( real_error(r_root) ).
|
||||
throw(
|
||||
error(r_root) ).
|
||||
|
||||
% track down binarythrough symbolic links...
|
||||
dirpath_to_r_home( This0, Rhome ) :-
|
||||
@ -212,7 +221,8 @@ start_r :-
|
||||
!,
|
||||
swipl_wins_warn,
|
||||
init_r_env,
|
||||
load_foreign_files([libreal], [], init_R),
|
||||
load_foreign_files([libreal], [], install_real),
|
||||
init_R,
|
||||
set_prolog_flag(double_quotes, string ),
|
||||
set_prolog_flag( real, started ).
|
||||
start_r.
|
||||
|
Reference in New Issue
Block a user