]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.ada/enum_idx_packed/pck.adb
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.ada / enum_idx_packed / pck.adb
CommitLineData
213516ef 1-- Copyright 2012-2023 Free Software Foundation, Inc.
99b1c762
JB
2--
3-- This program is free software; you can redistribute it and/or modify
4-- it under the terms of the GNU General Public License as published by
5-- the Free Software Foundation; either version 3 of the License, or
6-- (at your option) any later version.
7--
8-- This program is distributed in the hope that it will be useful,
9-- but WITHOUT ANY WARRANTY; without even the implied warranty of
10-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11-- GNU General Public License for more details.
12--
13-- You should have received a copy of the GNU General Public License
14-- along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16package body Pck is
a7400e44
TT
17
18 function New_Small_Table (Low: Color; High: Color) return Small_Table is
19 Result : Small_Table (Low .. High);
20 begin
21 for J in Low .. High loop
22 Result (J) := (J = Black or J = Green or J = White);
23 end loop;
24 return Result;
25 end New_Small_Table;
26
27 function New_Multi_Table (Low, High: Color; LS, HS: Strength)
28 return Multi_Table is
29 Result : Multi_Table (Low .. High, LS .. HS);
30 Next : Boolean := True;
31 begin
32 for J in Low .. High loop
33 for K in LS .. HS loop
34 Result (J, K) := Next;
35 Next := not Next;
36 end loop;
37 end loop;
38 return Result;
39 end New_Multi_Table;
40
41 function New_Multi_Multi_Table (L1, H1, L2, H2, L3, H3: Positive)
42 return Multi_Multi_Table is
43 Result : Multi_Multi_Table (L1 .. H1, L2 .. H2, L3 .. H3);
44 Next : Boolean := True;
45 begin
46 for J in L1 .. H1 loop
47 for K in L2 .. H2 loop
48 for L in L3 .. H3 loop
49 Result (J, K, L) := Next;
50 Next := not Next;
51 end loop;
52 end loop;
53 end loop;
54 return Result;
55 end New_Multi_Multi_Table;
56
99b1c762
JB
57 procedure Do_Nothing (A : System.Address) is
58 begin
59 null;
60 end Do_Nothing;
61end Pck;