home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / cpstring.adb < prev    next >
Encoding:
Text File  |  1996-09-19  |  1.2 KB  |  42 lines

  1. --
  2. -- Copyright (C) 1996 Ada Resource Association (ARA), Columbus, Ohio.
  3. -- Author: Gilles Demailly
  4. --
  5. --
  6. -- Permission to use, copy, modify, and distribute this software and its
  7. -- documentation for any purpose and without fee is hereby granted,
  8. -- provided that the above copyright and authorship notice appear in all
  9. -- copies and that both that copyright notice and this permission notice
  10. -- appear in supporting documentation.
  11. -- 
  12. -- The ARA makes no representations about the suitability of this software
  13. -- for any purpose.  It is provided "as is" without express
  14. -- or implied warranty.
  15. -- 
  16.  
  17. with Ada.Text_Io;
  18.  
  19. package body CP.Strings is
  20.  
  21.    use Byte_Utilities;
  22.  
  23.    procedure Decode (From_File : Byte_Utilities.File_Type;
  24.                      Some_Info : access Strings) is
  25.    begin
  26.       Some_Info.Tag := C_Class_Tag;
  27.       -- Reads the index of the string in the Constant Pool
  28.       Read (From_File, Some_Info.String_Index);
  29.    end Decode;
  30.  
  31.    procedure Display (Some_Info : access Strings;
  32.                       Context   : in Acc_CP_Infos) is
  33.    begin
  34.       Ada.Text_Io.Put
  35.          (" String constant :  """);
  36.       -- Displays the string 
  37.       Display (Context (Some_Info.String_Index), Context);
  38.       Ada.Text_Io.Put ("""");
  39.    end Display;
  40.    
  41. end CP.Strings;
  42.