OSDN Git Service

2007-04-20 Arnaud Charlet <charlet@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / xeinfo.adb
index 172127d..a24dff4 100644 (file)
@@ -6,9 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                            $Revision$
---                                                                          --
---          Copyright (C) 1992-2001 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
 --                                                                          --
 -- GNAT was originally developed  by the GNAT team at  New York University. --
--- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
 --                                                                          --
 ------------------------------------------------------------------------------
 
 --  Program to construct C header file a-einfo.h (C version of einfo.ads spec)
---  for use by Gigi. This header file contaInF all definitions and access
+--  for use by Gigi. This header file contains all definitions and access
 --  functions, but does not contain set procedures, since Gigi is not allowed
 --  to modify the GNAT tree)
 
@@ -69,8 +67,6 @@ procedure XEinfo is
    A         : VString := Nul;
    B         : VString := Nul;
    C         : VString := Nul;
-   Einfobrev : VString := Nul;
-   Einfosrev : VString := Nul;
    Expr      : VString := Nul;
    Filler    : VString := Nul;
    Fline     : VString := Nul;
@@ -89,7 +85,6 @@ procedure XEinfo is
    OldS      : VString := Nul;
    Rtn       : VString := Nul;
    Term      : VString := Nul;
-   XEinforev : VString := Nul;
 
    InB : File_Type;
    --  Used to read initial header from body
@@ -101,10 +96,6 @@ procedure XEinfo is
    --  Used to write output file
 
    wsp      : Pattern := NSpan (' ' & ASCII.HT);
-   Get_BRev : Pattern := BreakX ('$') & "$Rev" & "ision: "
-                           & Break (' ') * Einfobrev;
-   Get_SRev : Pattern := BreakX ('$') & "$Rev" & "ision: "
-                           & Break (' ') * Einfosrev;
    Comment  : Pattern := wsp & "--";
    For_Rep  : Pattern := wsp & "for";
    Get_Func : Pattern := wsp * A & "function" & wsp & Break (' ') * Name;
@@ -249,8 +240,6 @@ procedure XEinfo is
 begin
    Anchored_Mode := True;
 
-   Match ("$Revision$", "$Rev" & "ision: " & Break (' ') * XEinforev);
-
    if Argument_Count > 0 then
       Create (Ofile, Out_File, Argument (1));
    else
@@ -261,47 +250,18 @@ begin
    Open (InF, In_File, "einfo.ads");
 
    Lineno := 0;
-
-   --  Get einfo revs and write header to output file
-
-   loop
-      Line := Get_Line (InB);
-
-      if Line = "" then
-         raise Err;
-      end if;
-
-      exit when Match (Line, Get_BRev);
-   end loop;
-
    loop
       Line := Get_Line (InF);
       Lineno := Lineno + 1;
       exit when Line = "";
 
-      if Match (Line, Get_SRev) then
-         Put_Line
-           (Ofile,
-            "/*                 Generated by xeinfo revision " & XEinforev &
-            " using                  */");
-         Put_Line
-           (Ofile,
-            "/*                         einfo.ads revision " & Einfosrev &
-            "                         */");
-         Put_Line
-           (Ofile,
-            "/*                         einfo.adb revision " & Einfobrev &
-            "                         */");
-      else
-         Match (Line,
-                "--                                 S p e c       ",
-                "--                              C Header File    ");
-
-         Match (Line, "--", "/*");
-         Match (Line, Rtab (2) * A & "--", M);
-         Replace (M, A & "*/");
-         Put_Line (Ofile, Line);
-      end if;
+      Match (Line,
+             "--                                 S p e c       ",
+             "--                              C Header File    ");
+      Match (Line, "--", "/*");
+      Match (Line, Rtab (2) * A & "--", M);
+      Replace (M, A & "*/");
+      Put_Line (Ofile, Line);
    end loop;
 
    Put_Line (Ofile, "");