|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 6144 (0x1800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Zone, seg_04ccc8, seg_04cd9b
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Text_Io;
package body Zone is
Zone_Taille_Error : exception;
procedure Vide_List (La_Zone : in out Zone.Object) is
begin
Liste_Portes.Free (La_Zone.Liste_De_Portes);
end Vide_List;
function Image (La_Zone : Zone.Object) return String is
begin
return String'(La_Zone.Nom_De_Zone (1 .. La_Zone.Dernier_Char));
end Image;
procedure Parcours (La_Zone : Zone.Object) is
Iterateur : Liste_Portes.Iterator;
begin
Liste_Portes.Init (Iterateur, La_Zone.Liste_De_Portes);
Text_Io.Put_Line ("--- Nom de la Zone ---");
Text_Io.Put_Line (Image (La_Zone));
Text_Io.Put_Line ("--- Parcours de la Liste de Portes ---");
loop
exit when Liste_Portes.Done (Iterateur);
Text_Io.Put_Line (Porte.Image (Liste_Portes.Value (Iterateur)));
Liste_Portes.Next (Iterateur);
end loop;
end Parcours;
procedure Insert_Element (Element : Porte.Object;
La_Zone : in out Zone.Object) is
begin
La_Zone.Liste_De_Portes := Liste_Portes.Make
(Element, La_Zone.Liste_De_Portes);
end Insert_Element;
procedure Set_Name (La_Zone : out Zone.Object; Nom_De_Zone : String) is
Dernier_Char : Natural;
begin
Dernier_Char := Nom_De_Zone'Last;
if (Dernier_Char > 30) then
raise Zone_Taille_Error;
end if;
La_Zone.Nom_De_Zone (1 .. Dernier_Char) :=
Nom_De_Zone (1 .. Dernier_Char);
La_Zone.Dernier_Char := Dernier_Char;
exception
when Zone_Taille_Error =>
Text_Io.Put_Line
("Taille du nom de la Zone : 30 Caracteres maximum !");
end Set_Name;
function Longueur_Name (La_Zone : in Object) return Natural is
begin
return La_Zone.Dernier_Char;
end Longueur_Name;
function Longueur (La_Zone : in Zone.Object) return Natural is
begin
return Natural'(Liste_Portes.Length (La_Zone.Liste_De_Portes));
end Longueur;
procedure Search (La_Zone : in Zone.Object;
Numero_De_Lecteur : Natural;
La_Porte : out Porte.Object) is
Number : Natural;
Iterateur : Liste_Portes.Iterator;
begin
Liste_Portes.Init (Iterateur, La_Zone.Liste_De_Portes);
Porte.Set (La_Porte, "", 0);
loop
exit when Liste_Portes.Done (Iterateur);
Number := Porte.Get (Liste_Portes.Value (Iterateur));
if (Number = Numero_De_Lecteur) then
La_Porte := Liste_Portes.Value (Iterateur);
exit;
end if;
Liste_Portes.Next (Iterateur);
end loop;
end Search;
procedure Search (La_Zone : in Zone.Object;
Nom_Porte : String;
La_Porte : out Porte.Object) is
Dernier_Char_Cherche : Natural;
Dernier_Char_Trouve : Natural;
Iterateur : Liste_Portes.Iterator;
begin
Dernier_Char_Cherche := Nom_Porte'Length;
Liste_Portes.Init (Iterateur, La_Zone.Liste_De_Portes);
Porte.Set (La_Porte, "", 0);
loop
exit when Liste_Portes.Done (Iterateur);
Dernier_Char_Trouve := Porte.Longueur_Name
(Liste_Portes.Value (Iterateur));
if (Dernier_Char_Trouve = Dernier_Char_Cherche) then
if (Nom_Porte (1 .. Dernier_Char_Cherche) =
Porte.Get (Liste_Portes.Value (Iterateur))) then
La_Porte := Liste_Portes.Value (Iterateur);
exit;
end if;
end if;
Liste_Portes.Next (Iterateur);
end loop;
end Search;
function Liste (La_Zone : in Zone.Object) return Liste_Portes.List is
begin
return La_Zone.Liste_De_Portes;
end Liste;
end Zone;
nblk1=5
nid=0
hdr6=a
[0x00] rec0=1f rec1=00 rec2=01 rec3=034
[0x01] rec0=1c rec1=00 rec2=02 rec3=01a
[0x02] rec0=1a rec1=00 rec2=03 rec3=034
[0x03] rec0=17 rec1=00 rec2=04 rec3=07a
[0x04] rec0=06 rec1=00 rec2=05 rec3=000
tail 0x217540d54874f6ec8bbf9 0x42a00088462060003