summaryrefslogtreecommitdiff
path: root/gcc/ada/xeinfo.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/xeinfo.adb')
-rw-r--r--gcc/ada/xeinfo.adb58
1 files changed, 9 insertions, 49 deletions
diff --git a/gcc/ada/xeinfo.adb b/gcc/ada/xeinfo.adb
index bdf752d5869..6b71a9e2581 100644
--- a/gcc/ada/xeinfo.adb
+++ b/gcc/ada/xeinfo.adb
@@ -6,7 +6,6 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.2 $
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
@@ -69,8 +68,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,10 +86,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
InF : File_Type;
-- Used to read full text of both spec and body
@@ -101,10 +94,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,59 +238,31 @@ procedure XEinfo is
begin
Anchored_Mode := True;
- Match ("$Revision: 1.2 $", "$Rev" & "ision: " & Break (' ') * XEinforev);
-
if Argument_Count > 0 then
Create (Ofile, Out_File, Argument (1));
else
Create (Ofile, Out_File, "a-einfo.h");
end if;
- Open (InB, In_File, "einfo.adb");
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;
+ -- Write header to output file
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, "");
@@ -444,7 +405,6 @@ begin
-- Read body to find inlined functions
- Close (InB);
Close (InF);
Open (InF, In_File, "einfo.adb");
Lineno := 0;