|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 5375 (0x14ff)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
separate (Database_Interface)
function Get_Record (File : File_Type) return Test_Information is
---------------------------------------------------------------------------
-- This function reads the next lines from the file, and
-- places the description, version, statistics type, architectural
-- category, associcated language features and associated e and v
-- criteria into TEST_RECORD.
---------------------------------------------------------------------------
Test_Record : Test_Information;
--------------------------------------------------------------------
-- 11111111112
-- 12345678901234567890 -- ( column numbers )
-- The input file consists of 80-character lines and looks like:
--
-- TEST ADDSA1 P 1 B 1-- test name & codes
-- 1_000_000 FLOATING PT. ADDITIONS (CONTROL)2-- description
-- E AND V CRITERIA 3-- Header
-- AVAIL01 4-- list of codes, 1+ lines
-- LANGUAGE FEATURES 5-- Header
-- IDENTIFIERS 6-- list of codes, 1+ lines
-- END TEST 7-- Sentinel
Max_Columns : constant := Schema.Description_Length; -- longest input
subtype Column_Type is Positive range 1 .. Max_Columns;
subtype Line_Type is String (Column_Type);
--
Temp_Criteria : Schema.E_And_V_Criteria_List;
Temp_Feature : Schema.Language_Features_List;
--
Start_Marker : constant String := "TEST"; -- line 1
Crit_Marker : constant String := "E AN"; -- line 3
Lang_Marker : constant String := "LANG"; -- line 5
End_Marker : constant String := "END "; -- line 7
Blank_Line : constant Line_Type := (others => ' ');
Line : Line_Type;
Size : Natural;
-- these functions convert the file entries into a record
--------------------------------------------------------------------
function A_Decode (Ch : Character)
return Architecture_Category_Type is separate;
function S_Decode (Ch : Character) return Statistics_Type is separate;
function V_Decode (Ch : Character) return Version_Type is separate;
function D_Decode (Line : Line_Type; Size : Natural)
return Description_Type is separate;
function E_Decode (Line : Line_Type; Size : Natural)
return E_And_V_Criteria_List is separate;
function L_Decode (Line : Line_Type; Size : Natural)
return Language_Features_List is separate;
function N_Decode (Line : Line_Type; Size : Natural)
return Name_Type is separate;
begin
-- GET_RECORD
Line := Blank_Line;
Get_Line (File, Line, Size); -- 1st line contains name & 3 codes
if Line (1 .. Start_Marker'Length) /= Start_Marker then
Put ("*** Error in line starting: ");
Put_Line (Line);
raise Consistency_Error;
else
-- decode first line: Name & 3 codes
Test_Record.Name := N_Decode (Line, Size);
Test_Record.Architecture_Category := A_Decode (Line (13));
Test_Record.Version := V_Decode (Line (15));
Test_Record.Statistics := S_Decode (Line (17));
-- 2nd line contains Description
Line := Blank_Line;
Get_Line (File, Line, Size);
Test_Record.Description := D_Decode (Line, Size);
-- next line contains marker (discard)
-- followed by 1 or more lines containing multiple entries
Line := Blank_Line;
Get_Line (File, Line, Size);
if Line (1 .. Crit_Marker'Length) /= Crit_Marker then
Put ("*** Error in E and V Criteria: ");
Put_Line (Line);
raise Consistency_Error;
else
First (Temp_Criteria); -- initialize the list
loop
Line := Blank_Line;
Get_Line (File, Line,
Size); -- get the data line, check for marker
exit when Line (1 .. Lang_Marker'Length) = Lang_Marker;
-- if another data line, add them to tail of list
Temp_Criteria := E_Concat
(Temp_Criteria, E_Decode (Line, Size));
end loop;
end if;
Test_Record.E_And_V_Criteria := E_Copy (Temp_Criteria);
-- next line contains marker (discard)
-- followed by 1 or more lines containing multiple entries
if Line (1 .. Lang_Marker'Length) /= Lang_Marker then
Put ("*** Error in Language Features: ");
Put_Line (Line);
raise Consistency_Error;
else
First (Temp_Feature);
loop
Line := Blank_Line;
Get_Line (File, Line, Size);
exit when Line (1 .. End_Marker'Length) = End_Marker;
Temp_Feature := Concat (Temp_Feature, L_Decode (Line, Size));
end loop;
end if;
Test_Record.Language_Features := Copy (Temp_Feature);
return Test_Record;
end if;
exception
when Constraint_Error =>
Put ("*** Error in Database, starting: ");
Put_Line (Line);
raise Consistency_Error;
end Get_Record;
--**********************************************************************