Remove Revision lines in ada/ subdirectory
Geoffrey Keating
geoffk@redhat.com
Thu Mar 14 02:53:00 GMT 2002
The consensus seems to be that the Revision lines shall go.
So, I ran the following shell command in gcc/ada/:
perl -n -i~ -e 'print unless /\$Revision:/;' `grep -l Revision *`
and am about to commit the results plus the attached patch (the patch
includes a few sample deleted lines).
I tested that the resulting ada compiler could still be built; it
built successfully. There doesn't seem to be an ada testsuite.
The bootstrap failed building stage2 before I applied this patch.
--
Geoff Keating <geoffk@redhat.com>
===File ~/patches/ada-revision.patch========================
2002-03-14 Geoffrey Keating <geoffk@redhat.com>
Delete all lines containing "$Revision:".
* xeinfo.adb: Don't look for revision numbers.
* xnmake.adb: Likewise.
* xsinfo.adb: Likewise.
* xsnames.adb: Likewise.
* xtreeprs.adb: Likewise.
Index: xeinfo.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/xeinfo.adb,v
retrieving revision 1.3
diff -p -u -p -r1.3 xeinfo.adb
--- xeinfo.adb 2001/12/16 01:13:56 1.3
+++ xeinfo.adb 2002/03/14 10:16:53
@@ -6,7 +6,6 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.3 $
-- --
-- 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,11 +86,7 @@ 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.3 $", "$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;
Index: xnmake.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/xnmake.adb,v
retrieving revision 1.3
diff -p -u -p -r1.3 xnmake.adb
--- xnmake.adb 2002/03/08 20:11:04 1.3
+++ xnmake.adb 2002/03/14 10:16:53
@@ -6,7 +6,6 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.3 $
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
@@ -75,11 +74,8 @@ procedure XNmake is
Node : VString := Nul;
Op_Name : VString := Nul;
Prevl : VString := Nul;
- Sinfo_Rev : VString := Nul;
Synonym : VString := Nul;
- Temp_Rev : VString := Nul;
X : VString := Nul;
- XNmake_Rev : VString := Nul;
Lineno : Natural;
NWidth : Natural;
@@ -99,12 +95,6 @@ procedure XNmake is
-- Note: in following patterns, we break up the word revision to
-- avoid RCS getting enthusiastic about updating the reference!
- Get_SRev : Pattern := BreakX ('$') & "$Rev" & "ision: " &
- Break (' ') * Sinfo_Rev;
-
- GetT_Rev : Pattern := BreakX ('$') & "$Rev" & "ision: " &
- Break (' ') * Temp_Rev;
-
Body_Only : Pattern := BreakX (' ') * X & Span (' ') & "-- body only";
Spec_Only : Pattern := BreakX (' ') * X & Span (' ') & "-- spec only";
@@ -207,8 +197,6 @@ procedure XNmake is
begin
-- Capture our revision (following line updated by RCS)
- Match ("$Revision: 1.3 $", "$Rev" & "ision: " & Break (' ') * XNmake_Rev);
-
Lineno := 0;
NWidth := 28;
Anchored_Mode := True;
@@ -271,67 +259,42 @@ begin
Anchored_Mode := True;
- -- Get Sinfo revision number
-
- loop
- Line := Get_Line (InS);
- exit when Match (Line, Get_SRev);
- end loop;
-
-- Copy initial part of template to spec and body
loop
Line := Get_Line (InT);
-
- if Match (Line, GetT_Rev) then
- WriteBS
- ("-- Generated by xnmake revision " &
- XNmake_Rev & " using" &
- " --");
-
- WriteBS
- ("-- sinfo.ads revision " &
- Sinfo_Rev &
- " --");
-
- WriteBS
- ("-- nmake.adt revision " &
- Temp_Rev &
- " --");
-
- else
- -- Skip lines describing the template
- if Match (Line, "-- This file is a template") then
- loop
- Line := Get_Line (InT);
- exit when Line = "";
- end loop;
- end if;
+ -- Skip lines describing the template
- exit when Match (Line, "package");
+ if Match (Line, "-- This file is a template") then
+ loop
+ Line := Get_Line (InT);
+ exit when Line = "";
+ end loop;
+ end if;
- if Match (Line, Body_Only, M) then
- Replace (M, X);
- WriteB (Line);
-
- elsif Match (Line, Spec_Only, M) then
- Replace (M, X);
- WriteS (Line);
+ exit when Match (Line, "package");
- else
- if Match (Line, Templ, M) then
- Replace (M, A & " S p e c ");
- end if;
+ if Match (Line, Body_Only, M) then
+ Replace (M, X);
+ WriteB (Line);
+
+ elsif Match (Line, Spec_Only, M) then
+ Replace (M, X);
+ WriteS (Line);
- WriteS (Line);
+ else
+ if Match (Line, Templ, M) then
+ Replace (M, A & " S p e c ");
+ end if;
- if Match (Line, Spec, M) then
- Replace (M, A & "B o d y");
- end if;
+ WriteS (Line);
- WriteB (Line);
+ if Match (Line, Spec, M) then
+ Replace (M, A & "B o d y");
end if;
+
+ WriteB (Line);
end if;
end loop;
Index: xsinfo.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/xsinfo.adb,v
retrieving revision 1.1
diff -p -u -p -r1.1 xsinfo.adb
--- xsinfo.adb 2001/10/02 14:57:59 1.1
+++ xsinfo.adb 2002/03/14 10:16:53
@@ -6,7 +6,6 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.1 $
-- --
-- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
-- --
@@ -66,16 +65,12 @@ procedure XSinfo is
N1, N2 : VString := Nul;
Nam : VString := Nul;
Rtn : VString := Nul;
- Sinforev : VString := Nul;
Term : VString := Nul;
- XSinforev : VString := Nul;
InS : File_Type;
Ofile : File_Type;
wsp : Pattern := Span (' ' & ASCII.HT);
- Get_Vsn : Pattern := BreakX ('$') & "$Rev" & "ision: "
- & Break (' ') * Sinforev;
Wsp_For : Pattern := wsp & "for";
Is_Cmnt : Pattern := wsp & "--";
Typ_Nod : Pattern := wsp * A & "type Node_Kind is";
@@ -120,7 +115,6 @@ procedure XSinfo is
begin
Set_Exit_Status (1);
Anchored_Mode := True;
- Match ("$Revision: 1.1 $", "$Rev" & "ision: " & Break (' ') * XSinforev);
if Argument_Count > 0 then
Create (Ofile, Out_File, Argument (1));
@@ -130,31 +124,21 @@ begin
Open (InS, In_File, "sinfo.ads");
- -- Get Sinfo rev and write header to output file
+ -- Write header to output file
loop
Line := Get_Line (InS);
exit when Line = "";
- if Match (Line, Get_Vsn) then
- Put_Line
- (Ofile, "/* Generated by xsinfo revision "
- & XSinforev & " using */");
- Put_Line
- (Ofile, "/* sinfo.ads revision "
- & Sinforev & " */");
-
- 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;
-- Skip to package line
Index: xsnames.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/xsnames.adb,v
retrieving revision 1.1
diff -p -u -p -r1.1 xsnames.adb
--- xsnames.adb 2001/10/08 23:39:37 1.1
+++ xsnames.adb 2002/03/14 10:16:53
@@ -6,7 +6,6 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.1 $
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
@@ -51,23 +50,14 @@ procedure XSnames is
Line : VString := Nul;
Name : VString := Nul;
Name1 : VString := Nul;
- Oldrev : VString := Nul;
Oname : VString := Nul;
Oval : VString := Nul;
Restl : VString := Nul;
- Specrev : VString := Nul;
Tdigs : Pattern := Any (Decimal_Digit_Set) &
Any (Decimal_Digit_Set) &
Any (Decimal_Digit_Set);
- Get_Srev : Pattern := BreakX ('$') & "$Rev" & "ision: "
- & Break (' ') * Specrev;
-
- Get_Orev : Pattern := (BreakX ('$') & "$Rev" & "ision: "
- & Break ('.') & '.') * A
- & Break (' ') * Oldrev & ' ';
-
Name_Ref : Pattern := Span (' ') * A & Break (' ') * Name
& Span (' ') * B
& ": constant Name_Id := N + " & Tdigs
@@ -95,18 +85,6 @@ begin
Anchored_Mode := True;
Oname := Nul;
Val := 0;
-
- loop
- Line := Get_Line (InS);
- Put_Line (OutS, Line);
- exit when not Match (Line, Get_Srev);
- end loop;
-
- loop
- Line := Get_Line (InB);
- exit when Match (Line, Get_Orev);
- Put_Line (OutB, Line);
- end loop;
Line := A & (Natural'Value (S (Oldrev)) + 1) & " $";
Line := Rpad (Line, 76) & "--";
Index: xtreeprs.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/xtreeprs.adb,v
retrieving revision 1.1
diff -p -u -p -r1.1 xtreeprs.adb
--- xtreeprs.adb 2001/10/02 14:57:59 1.1
+++ xtreeprs.adb 2002/03/14 10:16:53
@@ -6,7 +6,6 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.1 $
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc.
-- --
@@ -73,12 +72,9 @@ procedure XTreeprs is
Prefix : VString := Nul;
S : VString := Nul;
S1 : VString := Nul;
- Sinforev : VString := Nul;
Syn : VString := Nul;
Synonym : VString := Nul;
- Temprev : VString := Nul;
Term : VString := Nul;
- Treeprsrev : VString := Nul;
OutS : File_Type;
-- Output file
@@ -128,10 +124,6 @@ procedure XTreeprs is
wsp : Pattern := Span (' ' & ASCII.HT);
- Get_SRev : Pattern := BreakX ('$') & "$Rev" & "ision: "
- & Break (' ') * Sinforev;
- Get_TRev : Pattern := BreakX ('$') & "$Rev" & "ision: "
- & Break (' ') * Temprev;
Is_Temp : Pattern := BreakX ('T') * A & "T e m p l a t e";
Get_Node : Pattern := wsp & "-- N_" & Rest * Node;
Tst_Punc : Pattern := Break (" ,.");
@@ -149,8 +141,6 @@ procedure XTreeprs is
begin
Anchored_Mode := True;
- Match ("$Revision: 1.1 $", "$Rev" & "ision: " & Break (' ') * Treeprsrev);
-
if Argument_Count > 0 then
Create (OutS, Out_File, Argument (1));
else
@@ -179,58 +169,27 @@ begin
Set (Special, "Raises_Constraint_Error", True);
Set (Special, "Right_Opnd", True);
- -- Get sinfo revs and write header to output file
-
- loop
- Line := Get_Line (InS);
- Lineno := Lineno + 1;
-
- if Line = "" then
- raise Err;
- end if;
-
- exit when Match (Line, Get_SRev);
- end loop;
-
-- Read template header and generate new header
loop
Line := Get_Line (InT);
- if Match (Line, Get_TRev) then
- Put_Line
- (OutS,
- "-- Generated by xtreeprs revision " &
- Treeprsrev & " using --");
-
- Put_Line
- (OutS,
- "-- sinfo.ads revision " &
- Sinforev & " --");
-
- Put_Line
- (OutS,
- "-- treeprs.adt revision "
- & Temprev & " --");
-
- else
- -- Skip lines describing the template
-
- if Match (Line, "-- This file is a template") then
- loop
- Line := Get_Line (InT);
- exit when Line = "";
- end loop;
- end if;
-
- exit when Match (Line, "package");
-
- if Match (Line, Is_Temp, M) then
- Replace (M, A & " S p e c ");
- end if;
+ -- Skip lines describing the template
- Put_Line (OutS, Line);
+ if Match (Line, "-- This file is a template") then
+ loop
+ Line := Get_Line (InT);
+ exit when Line = "";
+ end loop;
end if;
+
+ exit when Match (Line, "package");
+
+ if Match (Line, Is_Temp, M) then
+ Replace (M, A & " S p e c ");
+ end if;
+
+ Put_Line (OutS, Line);
end loop;
Put_Line (OutS, Line);
============================================================
More information about the Gcc-patches
mailing list