more SWI style flags: associate and shared_object_extension.
This commit is contained in:
parent
dba2fd398f
commit
0b6b471359
10
docs/yap.tex
10
docs/yap.tex
@ -7891,6 +7891,12 @@ atom-garbage collection, perform atom garbage collection at the first
|
||||
opportunity. Initial value is 10,000. May be changed. A value of 0
|
||||
(zero) disables atom garbage collection.
|
||||
|
||||
@item associate
|
||||
@findex associate (yap_flag/2 option)
|
||||
@*
|
||||
Read-write flag telling a suffix for files associated to Prolog
|
||||
sources. It is @code{yap} by default.
|
||||
|
||||
@item bounded [ISO]
|
||||
@findex bounded (yap_flag/2 option)
|
||||
@*
|
||||
@ -8141,6 +8147,10 @@ and if it is bound to @code{off} disable them. The default for YAP is
|
||||
Name of the environment variable used by the system to search for shared
|
||||
objects.
|
||||
|
||||
@item shared_object_extension
|
||||
@findex shared_object_extension (yap_flag/2 option)
|
||||
Suffix associated with loadable code.
|
||||
|
||||
@item single_var_warnings
|
||||
@findex single_var_warnings (yap_flag/2 option)
|
||||
@*
|
||||
|
25
pl/flags.yap
25
pl/flags.yap
@ -192,6 +192,30 @@ yap_flag(open_shared_object,X) :-
|
||||
yap_flag(open_shared_object,X) :-
|
||||
'$do_error'(domain_error(flag_value,open_shared_object+X),yap_flag(open_shared_object,X)).
|
||||
|
||||
yap_flag(open_shared_object,X) :-
|
||||
var(X), !,
|
||||
('$open_shared_objects' -> X = true ; X = false).
|
||||
yap_flag(open_shared_object,X) :-
|
||||
(X = true ; X = false), !,
|
||||
'$do_error'(permission_error(modify,flag,open_shared_object),yap_flag(open_shared_object,X)).
|
||||
yap_flag(open_shared_object,X) :-
|
||||
'$do_error'(domain_error(flag_value,open_shared_object+X),yap_flag(open_shared_object,X)).
|
||||
|
||||
yap_flag(shared_object_extension,X) :-
|
||||
'$obj_suffix'([_|String]),
|
||||
atom_codes(X, String).
|
||||
|
||||
:- set_value('$associate',yap).
|
||||
|
||||
yap_flag(associate,X) :-
|
||||
var(X), !,
|
||||
get_value('$associate',X).
|
||||
yap_flag(associate,X) :-
|
||||
atom(X), !,
|
||||
set_value('$associate',X).
|
||||
yap_flag(bounded,X) :-
|
||||
'$do_error'(type_error(atom,X),associate(X)).
|
||||
|
||||
yap_flag(bounded,X) :-
|
||||
var(X), !,
|
||||
'$access_yap_flags'(0, X1),
|
||||
@ -855,6 +879,7 @@ yap_flag(dialect,yap).
|
||||
'$yap_system_flag'(readline).
|
||||
'$yap_system_flag'(redefine_warnings).
|
||||
'$yap_system_flag'(shared_object_search_path).
|
||||
'$yap_system_flag'(shared_object_extension).
|
||||
'$yap_system_flag'(single_var_warnings).
|
||||
'$yap_system_flag'(stack_dump_on_error).
|
||||
'$yap_system_flag'(strict_iso).
|
||||
|
Reference in New Issue
Block a user