diff --git a/packages/PLStream/pl-prologflag.c b/packages/PLStream/pl-prologflag.c index 6460f5000..4d0b17616 100644 --- a/packages/PLStream/pl-prologflag.c +++ b/packages/PLStream/pl-prologflag.c @@ -1079,7 +1079,6 @@ initPrologFlags(void) ALLOW_VARNAME_FUNCTOR); setPrologFlag("toplevel_var_size", FT_INTEGER, 1000); setPrologFlag("toplevel_print_anon", FT_BOOL, TRUE, 0); - setPrologFlag("file_name_variables", FT_BOOL, FALSE, PLFLAG_FILEVARS); #ifdef __unix__ setPrologFlag("unix", FT_BOOL|FF_READONLY, TRUE, 0); #endif @@ -1105,6 +1104,7 @@ initPrologFlags(void) setPrologFlag("tty_control", FT_BOOL|FF_READONLY, truePrologFlag(PLFLAG_TTY_CONTROL), PLFLAG_TTY_CONTROL); setPrologFlag("encoding", FT_ATOM, stringAtom(encoding_to_atom(LD->encoding))); + setPrologFlag("file_name_variables", FT_BOOL, FALSE, PLFLAG_FILEVARS); setPrologFlag("fileerrors", FT_BOOL, TRUE, PLFLAG_FILEERRORS); setPrologFlag("readline", FT_BOOL/*|FF_READONLY*/, FALSE, 0); diff --git a/pl/flags.yap b/pl/flags.yap index ccef0bb31..f75b47339 100644 --- a/pl/flags.yap +++ b/pl/flags.yap @@ -60,7 +60,14 @@ yap_flag(encoding,X) :- yap_flag(encoding,X) :- '$swi_set_prolog_flag'(encoding, X). -% character encoding... +% file_name_variables... +yap_flag(file_name_variables,X) :- + var(X), !, + '$swi_current_prolog_flag'(file_name_variables, X). +yap_flag(file_name_variables,X) :- + '$swi_set_prolog_flag'(file_name_variables, X). + +% fileerrors... yap_flag(fileerrors,X) :- var(X), !, '$swi_current_prolog_flag'(fileerrors, X). @@ -813,6 +820,7 @@ yap_flag(dialect,yap). '$yap_system_flag'(encoding). '$yap_system_flag'(executable). % V = fast ; +'$yap_system_flag'(file_name_variables). '$yap_system_flag'(fileerrors ). '$yap_system_flag'(float_format). % V = float_mantissa_digits ;