From bc3a8ec174f84cd8f1b13304a9b2d4f3a7bcfdf0 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 25 Jan 2023 08:14:39 +0100 Subject: errorout: add int64 arguments --- src/errorout.adb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/errorout.adb') diff --git a/src/errorout.adb b/src/errorout.adb index 39d4af782..3c3a1947f 100644 --- a/src/errorout.adb +++ b/src/errorout.adb @@ -140,6 +140,11 @@ package body Errorout is return (Kind => Earg_Int32, Val_Int32 => V); end "+"; + function "+" (V : Int64) return Earg_Type is + begin + return (Kind => Earg_Int64, Val_Int64 => V); + end "+"; + function "+" (V : String8_Len_Type) return Earg_Type is begin return (Kind => Earg_String8, Val_Str8 => V); @@ -226,6 +231,18 @@ package body Errorout is Report_Handler.Message (S (F .. S'Last)); end Output_Int32; + procedure Output_Int64 (V : Int64) + is + S : constant String := Int64'Image (V); + F : Positive; + begin + F := 1; + if S (F) = ' ' then + F := 2; + end if; + Report_Handler.Message (S (F .. S'Last)); + end Output_Int64; + procedure Output_String8 (Str : String8_Len_Type) is begin Report_Handler.Message (""""); @@ -365,6 +382,12 @@ package body Errorout is else raise Internal_Error; end if; + when Earg_Int64 => + if Format = 'v' then + Output_Int64 (Arg.Val_Int64); + else + raise Internal_Error; + end if; when Earg_Lang_Kind => if Lang_Handlers (Arg.Kind) = null then raise Internal_Error; -- cgit v1.2.3