home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / atlinuta.adb < prev    next >
Encoding:
Text File  |  1996-09-19  |  1.8 KB  |  54 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 Attribute.Line_Number_Table is
  20.  
  21.    use Byte_Utilities;
  22.      
  23.    procedure Decode (This      : access Line_Number_Table_Attribute;
  24.                      From_File : in Byte_Utilities.File_Type;
  25.                      Context   : in CP.Acc_CP_Infos) is
  26.    begin
  27.       -- reads the line number table length
  28.       Read (From_File, This.Line_Number_Table_Length);
  29.  
  30.       if This.Line_Number_Table_Length > 0 then
  31.          -- table allocation
  32.          This.Line_Number_Table := new Table_Infos (1..This.Line_Number_Table_Length);
  33.          
  34.          -- fills the table with Start_Pc and Line_Number values
  35.          for I in 1..This.Line_Number_Table_Length loop
  36.             Read (From_File, This.Line_Number_Table (I).Start_Pc);
  37.             Read (From_File, This.Line_Number_Table (I).Line_Number);
  38.          end loop;
  39.       else
  40.          This.Line_Number_Table := null;
  41.       end if;
  42.  
  43.    end Decode;
  44.  
  45.    procedure Display (This    : access Line_Number_Table_Attribute;
  46.                       Context : in CP.Acc_CP_Infos) is
  47.    begin
  48.       -- this procedure is not yet implemented (uncalled)
  49.       Ada.Text_Io.Put_Line
  50.          ("Line Number Table available");
  51.    end Display;
  52.  
  53. end Attribute.Line_Number_Table;
  54.