add interface to SWI's prolog_to_os_filename/2

This commit is contained in:
Vitor Santos Costa 2010-11-24 08:41:21 +00:00
parent f9cd010242
commit 35100fe515
1 changed files with 18 additions and 0 deletions

View File

@ -1209,3 +1209,21 @@ with_output_to(Output, Command) :-
atom_codes(Char, [Code]),
'$codes_to_chars'(String0, String, Chars).
prolog_to_os_filename(Prolog, OS) :-
'$undefined'(swi_prolog_to_os_filename(Prolog, OS), system),
'$current_module'(Old, system),
load_foreign_files([libplstream], [], initIO),
'$current_module'(system, Old),
fail.
prolog_to_os_filename(Prolog, OS) :-
system:swi_prolog_to_os_filename(Prolog, OS).