home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adav313.zip / gnat-3_13p-os2-bin-20010916.zip / emx / gnatlib / a-storio.ads < prev    next >
Text File  |  2000-07-19  |  2KB  |  50 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUN-TIME COMPONENTS                         --
  4. --                                                                          --
  5. --                       A D A . S T O R A G E _ I O                        --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.11 $                             --
  10. --                                                                          --
  11. -- This specification is adapted from the Ada Reference Manual for use with --
  12. -- GNAT.  In accordance with the copyright of that document, you can freely --
  13. -- copy and modify this specification,  provided that if you redistribute a --
  14. -- modified version,  any changes that you have made are clearly indicated. --
  15. --                                                                          --
  16. ------------------------------------------------------------------------------
  17.  
  18. with Ada.IO_Exceptions;
  19. with System.Storage_Elements;
  20.  
  21. generic
  22.    type Element_Type is private;
  23.  
  24. package Ada.Storage_IO is
  25. pragma Preelaborate (Storage_IO);
  26.  
  27.    Buffer_Size : constant System.Storage_Elements.Storage_Count :=
  28.                    System.Storage_Elements.Storage_Count
  29.                      ((Element_Type'Size + System.Storage_Unit - 1) /
  30.                                                       System.Storage_Unit);
  31.  
  32.    subtype Buffer_Type is
  33.      System.Storage_Elements.Storage_Array (1 .. Buffer_Size);
  34.  
  35.    ---------------------------------
  36.    -- Input and Output Operations --
  37.    ---------------------------------
  38.  
  39.    procedure Read  (Buffer : in  Buffer_Type; Item : out Element_Type);
  40.  
  41.    procedure Write (Buffer : out Buffer_Type; Item : in  Element_Type);
  42.  
  43.    ----------------
  44.    -- Exceptions --
  45.    ----------------
  46.  
  47.    Data_Error : exception renames IO_Exceptions.Data_Error;
  48.  
  49. end Ada.Storage_IO;
  50.