mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-20 20:12:26 +08:00
new files
This commit is contained in:
47
c/src/ada-tests/support/address_io.adb
Normal file
47
c/src/ada-tests/support/address_io.adb
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
--
|
||||||
|
-- Address_IO / Specification
|
||||||
|
--
|
||||||
|
-- DESCRIPTION:
|
||||||
|
--
|
||||||
|
-- This package instantiates the IO routines necessary to
|
||||||
|
-- perform IO on data of the type System.Address.
|
||||||
|
--
|
||||||
|
-- DEPENDENCIES:
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- COPYRIGHT (c) 1989-1997.
|
||||||
|
-- On-Line Applications Research Corporation (OAR).
|
||||||
|
-- Copyright assigned to U.S. Government, 1994.
|
||||||
|
--
|
||||||
|
-- The license and distribution terms for this file may in
|
||||||
|
-- the file LICENSE in this distribution or at
|
||||||
|
-- http://www.OARcorp.com/rtems/license.html.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
--
|
||||||
|
|
||||||
|
with System;
|
||||||
|
with System.Storage_Elements;
|
||||||
|
with Text_IO;
|
||||||
|
|
||||||
|
package body Address_IO is
|
||||||
|
|
||||||
|
procedure Put (
|
||||||
|
Item : in System.Address;
|
||||||
|
Width : in Natural := 8;
|
||||||
|
Base : in Natural := 16
|
||||||
|
) is
|
||||||
|
package Integer_IO is new TEXT_IO.Integer_IO( Integer );
|
||||||
|
begin
|
||||||
|
|
||||||
|
Integer_IO.Put(
|
||||||
|
Integer( System.Storage_Elements.To_Integer( Item ) ),
|
||||||
|
Width,
|
||||||
|
Base
|
||||||
|
);
|
||||||
|
|
||||||
|
end Put;
|
||||||
|
|
||||||
|
end Address_IO;
|
||||||
|
|
||||||
35
c/src/ada-tests/support/address_io.ads
Normal file
35
c/src/ada-tests/support/address_io.ads
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
--
|
||||||
|
-- ADDRESS_IO / SPECIFICATION
|
||||||
|
--
|
||||||
|
-- DESCRIPTION:
|
||||||
|
--
|
||||||
|
-- This package instantiates the IO routines necessary to
|
||||||
|
-- perform IO on data of the type System.Address.
|
||||||
|
--
|
||||||
|
-- DEPENDENCIES:
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- COPYRIGHT (c) 1989-1997.
|
||||||
|
-- On-Line Applications Research Corporation (OAR).
|
||||||
|
-- Copyright assigned to U.S. Government, 1994.
|
||||||
|
--
|
||||||
|
-- The license and distribution terms for this file may in
|
||||||
|
-- the file LICENSE in this distribution or at
|
||||||
|
-- http://www.OARcorp.com/rtems/license.html.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
--
|
||||||
|
|
||||||
|
with System;
|
||||||
|
|
||||||
|
package Address_IO is
|
||||||
|
|
||||||
|
procedure Put (
|
||||||
|
Item : in System.Address;
|
||||||
|
Width : in Natural := 8;
|
||||||
|
Base : in Natural := 16
|
||||||
|
);
|
||||||
|
|
||||||
|
end Address_IO;
|
||||||
|
|
||||||
Reference in New Issue
Block a user