summaryrefslogtreecommitdiff
path: root/gcc/ada/a-calend-vms.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-05-15 11:26:48 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-05-15 11:26:48 +0200
commitdb664118be5bc2ea3e04784d45da659b13af1ef8 (patch)
treef379d457c02670132f951efa9f8c06c306d1a80b /gcc/ada/a-calend-vms.ads
parenta02f0c5dfa9246a57970aeefe5c7196a17bf7b1c (diff)
downloadgcc-db664118be5bc2ea3e04784d45da659b13af1ef8.tar.gz
[multiple changes]
2012-05-15 Hristian Kirtchev <kirtchev@adacore.com> * a-calend.adb (Day_Of_Week): The routine once again treats all dates as historic. (Formatting_Operations.Split): All calls to UTC_Time_Offset are now controlled through formal parameter Is_Historic. (Formatting_Operations.Time_Of): All calls to UTC_Time_Offset are now handled through formal parameter Is_Historic. (Split): Update the call to Formatting_Operations.Split. (Time_Of): Update the call to Formatting_Operations.Time_Of. (To_Ada_Time): Update the call to Formatting_Operations.Time_Of. (To_Strict_Tm): Update the call to Formatting_Operations.Split. * a-calend.ads (Split): Add new formal Is_Historic along with comment on usage. This routine is now exported for the purposes of GNAT.Calendar.Locale. (Time_Of): Remove defaults. Add new formal Is_Historic along with comment on usage. This routine is now exported for the purposes of GNAT.Calendar.Locale. * a-calend-vms.adb (Split): Update the call to Formatting_Operations.Split. (Time_Of): Update the call to Formatting_Operations.Time_Of. * a-calend-vms.ads (Split): Add new formal Is_Historic along with comment on usage. (Time_Of): Remove defaults. Add new formal Is_Historic along with comment on usage. * a-calfor.adb (Split): Update the call to Formatting_Operations.Split. (Time_Of): Update the call to Formatting_Operations.Time_Of. * impunit.adb: Include g-calloc to the list of non-RM defined units. 2012-05-15 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Add_Source): Always add the source if it is excluded, to avoid incorrect duplicate checks. 2012-05-15 Yannick Moy <moy@adacore.com> * sem_aux.ads: Correct typo. * sem_eval.adb (Compile_Time_Known_Value): Return False in Alfa mode for a deferred constant when outside of the scope of its full view. 2012-05-15 Emmanuel Briot <briot@adacore.com> * g-comlin.adb, g-comlin.ads (Define_Switch): Allow specifying the name of the argument, for the automatic help message. (Getopt): do not systematically initialize switches with string values to the empty string, when the user has already specified a default. From-SVN: r187504
Diffstat (limited to 'gcc/ada/a-calend-vms.ads')
-rw-r--r--gcc/ada/a-calend-vms.ads50
1 files changed, 28 insertions, 22 deletions
diff --git a/gcc/ada/a-calend-vms.ads b/gcc/ada/a-calend-vms.ads
index 83534c2c916..d0fdc4a6b91 100644
--- a/gcc/ada/a-calend-vms.ads
+++ b/gcc/ada/a-calend-vms.ads
@@ -218,21 +218,24 @@ private
-- within the range of 0 .. 6 (Monday .. Sunday).
procedure Split
- (Date : Time;
- Year : out Year_Number;
- Month : out Month_Number;
- Day : out Day_Number;
- Day_Secs : out Day_Duration;
- Hour : out Integer;
- Minute : out Integer;
- Second : out Integer;
- Sub_Sec : out Duration;
- Leap_Sec : out Boolean;
- Use_TZ : Boolean;
- Time_Zone : Long_Integer);
- -- Split a time value into its components. Set Use_TZ to use the local
- -- time zone (the value in Time_Zone is ignored) when splitting a time
- -- value.
+ (Date : Time;
+ Year : out Year_Number;
+ Month : out Month_Number;
+ Day : out Day_Number;
+ Day_Secs : out Day_Duration;
+ Hour : out Integer;
+ Minute : out Integer;
+ Second : out Integer;
+ Sub_Sec : out Duration;
+ Leap_Sec : out Boolean;
+ Use_TZ : Boolean;
+ Is_Historic : Boolean;
+ Time_Zone : Long_Integer);
+ -- Split a time value into its components. If flag Is_Historic is set,
+ -- this routine would try to use to the best of the OS's abilities the
+ -- time zone offset that was or will be in effect on Date. Set Use_TZ
+ -- to use the local time zone (the value in Time_Zone is ignored) when
+ -- splitting a time value.
function Time_Of
(Year : Year_Number;
@@ -243,16 +246,19 @@ private
Minute : Integer;
Second : Integer;
Sub_Sec : Duration;
- Leap_Sec : Boolean := False;
- Use_Day_Secs : Boolean := False;
- Use_TZ : Boolean := False;
- Time_Zone : Long_Integer := 0) return Time;
+ Leap_Sec : Boolean;
+ Use_Day_Secs : Boolean;
+ Use_TZ : Boolean;
+ Is_Historic : Boolean;
+ Time_Zone : Long_Integer) return Time;
-- Given all the components of a date, return the corresponding time
-- value. Set Use_Day_Secs to use the value in Day_Secs, otherwise the
-- day duration will be calculated from Hour, Minute, Second and Sub_
- -- Sec. Set Use_TZ to use the local time zone (the value in formal
- -- Time_Zone is ignored) when building a time value and to verify the
- -- validity of a requested leap second.
+ -- Sec. If flag Is_Historic is set, this routine would try to use to the
+ -- best of the OS's abilities the time zone offset that was or will be
+ -- in effect on the input date. Set Use_TZ to use the local time zone
+ -- (the value in formal Time_Zone is ignored) when building a time value
+ -- and to verify the validity of a requested leap second.
end Formatting_Operations;