add timezone flag
This commit is contained in:
parent
2ab46f753d
commit
2256c3bf8b
@ -74,7 +74,9 @@ too much.
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
#ifndef __YAP_PROLOG__
|
||||
static void setArgvPrologFlag(void);
|
||||
#endif
|
||||
static void setTZPrologFlag(void);
|
||||
#ifndef __YAP_PROLOG__
|
||||
static void setVersionPrologFlag(void);
|
||||
#endif
|
||||
static atom_t lookupAtomFlag(atom_t key);
|
||||
@ -1111,7 +1113,9 @@ initPrologFlags(void)
|
||||
|
||||
#ifndef __YAP_PROLOG__
|
||||
setArgvPrologFlag();
|
||||
#endif /* YAP_PROLOG */
|
||||
setTZPrologFlag();
|
||||
#ifndef __YAP_PROLOG__
|
||||
setOSPrologFlags();
|
||||
setVersionPrologFlag();
|
||||
#endif /* YAP_PROLOG */
|
||||
@ -1141,6 +1145,8 @@ setArgvPrologFlag()
|
||||
PL_discard_foreign_frame(fid);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
setTZPrologFlag()
|
||||
{ tzset();
|
||||
@ -1148,6 +1154,7 @@ setTZPrologFlag()
|
||||
setPrologFlag("timezone", FT_INTEGER|FF_READONLY, timezone);
|
||||
}
|
||||
|
||||
#ifndef __YAP_PROLOG__
|
||||
|
||||
static void
|
||||
setVersionPrologFlag(void)
|
||||
|
@ -288,6 +288,12 @@ yap_flag(informational_messages,off) :- !,
|
||||
yap_flag(informational_messages,X) :-
|
||||
'$do_error'(domain_error(flag_value,informational_messages+X),yap_flag(informational_messages,X)).
|
||||
|
||||
yap_flag(timezone,X) :-
|
||||
var(X), !,
|
||||
'$swi_current_prolog_flag'(timezone, X).
|
||||
yap_flag(timezone,X) :-
|
||||
'$swi_set_prolog_flag'(timezone, X).
|
||||
|
||||
yap_flag(verbose,X) :- var(X), !,
|
||||
get_value('$verbose',X0),
|
||||
(X0 == on -> X = normal ; X = silent).
|
||||
@ -885,6 +891,7 @@ yap_flag(dialect,yap).
|
||||
'$yap_system_flag'(strict_iso).
|
||||
'$yap_system_flag'(syntax_errors).
|
||||
'$yap_system_flag'(system_options).
|
||||
'$yap_system_flag'(timezone).
|
||||
'$yap_system_flag'(to_chars_mode).
|
||||
'$yap_system_flag'(toplevel_hook).
|
||||
'$yap_system_flag'(toplevel_print_options).
|
||||
|
Reference in New Issue
Block a user