11590Srgrimes------------------------------------------------------------------------------
21590Srgrimes--                                                                          --
31590Srgrimes--                         GNAT RUN-TIME COMPONENTS                         --
41590Srgrimes--                                                                          --
51590Srgrimes--                       S Y S T E M . P A C K _ 0 3                        --
61590Srgrimes--                                                                          --
71590Srgrimes--                                 S p e c                                  --
81590Srgrimes--                                                                          --
91590Srgrimes--          Copyright (C) 1992-2014, Free Software Foundation, Inc.         --
101590Srgrimes--                                                                          --
111590Srgrimes-- GNAT is free software;  you can  redistribute it  and/or modify it under --
121590Srgrimes-- terms of the  GNU General Public License as published  by the Free Soft- --
131590Srgrimes-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
141590Srgrimes-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
151590Srgrimes-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
161590Srgrimes-- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
171590Srgrimes--                                                                          --
181590Srgrimes-- As a special exception under Section 7 of GPL version 3, you are granted --
191590Srgrimes-- additional permissions described in the GCC Runtime Library Exception,   --
201590Srgrimes-- version 3.1, as published by the Free Software Foundation.               --
211590Srgrimes--                                                                          --
221590Srgrimes-- You should have received a copy of the GNU General Public License and    --
231590Srgrimes-- a copy of the GCC Runtime Library Exception along with this program;     --
241590Srgrimes-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
251590Srgrimes-- <http://www.gnu.org/licenses/>.                                          --
261590Srgrimes--                                                                          --
271590Srgrimes-- GNAT was originally developed  by the GNAT team at  New York University. --
281590Srgrimes-- Extensive contributions were provided by Ada Core Technologies Inc.      --
291590Srgrimes--                                                                          --
301590Srgrimes------------------------------------------------------------------------------
311590Srgrimes
321590Srgrimes--  Handling of packed arrays with Component_Size = 3
331590Srgrimes
341590Srgrimespackage System.Pack_03 is
351590Srgrimes   pragma Preelaborate;
361590Srgrimes
371590Srgrimes   Bits : constant := 3;
381590Srgrimes
391590Srgrimes   type Bits_03 is mod 2 ** Bits;
401590Srgrimes   for Bits_03'Size use Bits;
411590Srgrimes
421590Srgrimes   --  In all subprograms below, Rev_SSO is set True if the array has the
431590Srgrimes   --  non-default scalar storage order.
441590Srgrimes
451590Srgrimes   function Get_03
461590Srgrimes     (Arr     : System.Address;
471590Srgrimes      N       : Natural;
481590Srgrimes      Rev_SSO : Boolean) return Bits_03 with Inline;
491590Srgrimes   --  Arr is the address of the packed array, N is the zero-based
501590Srgrimes   --  subscript. This element is extracted and returned.
511590Srgrimes
521590Srgrimes   procedure Set_03
531590Srgrimes     (Arr     : System.Address;
541590Srgrimes      N       : Natural;
551590Srgrimes      E       : Bits_03;
561590Srgrimes      Rev_SSO : Boolean) with Inline;
571590Srgrimes   --  Arr is the address of the packed array, N is the zero-based
581590Srgrimes   --  subscript. This element is set to the given value.
591590Srgrimes
601590Srgrimesend System.Pack_03;
611590Srgrimes