Rename Pos_Type --> Position_Type
Yet after few months, it's already too confusing to me. Let's reserve
`Pos` for `Positive` and spell out `Position`.
Change-Id: I3445d20665ae6a993cb0e46d08e8f3148abef40e
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/26696
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/gfxtest/hw-gfx-gma-gfx_test.adb b/gfxtest/hw-gfx-gma-gfx_test.adb
index 94ee312..bf6e917 100644
--- a/gfxtest/hw-gfx-gma-gfx_test.adb
+++ b/gfxtest/hw-gfx-gma-gfx_test.adb
@@ -19,9 +19,9 @@
Secondary_Delay_MS : constant := 4_000;
Seed : constant := 12345;
- package Rand_P is new Ada.Numerics.Discrete_Random (Pos_Type);
+ package Rand_P is new Ada.Numerics.Discrete_Random (Position_Type);
Gen : Rand_P.Generator;
- function Rand return Pos_Type is (Rand_P.Random (Gen));
+ function Rand return Position_Type is (Rand_P.Random (Gen));
Start_X : constant := 0;
Start_Y : constant := 0;
@@ -384,7 +384,7 @@
declare
New_Pipes : GMA.Pipe_Configs := Pipes;
- function Rand_Div (Num : Pos_Type) return Pos_Type is
+ function Rand_Div (Num : Position_Type) return Position_Type is
(case Rand mod 4 is
when 3 => Rand mod Num / 3,
when 2 => Rand mod Num / 2,
@@ -404,9 +404,9 @@
Height : constant Height_Type :=
Pipes (Pipe).Framebuffer.Height;
begin
- New_FB.Start_X := Pos_Type'Min
+ New_FB.Start_X := Position_Type'Min
(Width - 320, Rand_Div (Width));
- New_FB.Start_Y := Pos_Type'Min
+ New_FB.Start_Y := Position_Type'Min
(Height - 320, Rand_Div (Height));
New_FB.Width := Width_Type'Max
(320, Width - New_FB.Start_X - Rand_Div (Width));