|
|
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: 2670 (0xa6e)
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⟧
with Tftp_Utilities, Io, Transport_Defs, Transport_Name, Transport;
procedure Put (To_Host : in String;
Local_Pathname : in String;
Remote_Pathname : in String := "";
Mode : in String := "TEXT") is
Remote_Host : Transport_Defs.Host_Id (1 .. 4) :=
Transport_Name.Host_To_Host_Id (To_Host);
Remote_Socket : Transport_Defs.Socket_Id (1 .. 2) := (0, 69);
Connection : Transport.Connection_Id;
Status : Transport_Defs.Status_Code;
Lmode : String (1 .. Mode'Length) := Mode;
Cmode : Tftp_Utilities.Transfer_Mode;
Moderr : Boolean := False;
begin
for I in Lmode'First .. Lmode'Last loop
if Lmode (I) in 'a' .. 'z' then
Lmode (I) := Character'Val
(Character'Pos (Lmode (I)) - Character'Pos (' '));
end if;
end loop;
if Lmode = "TEXT" then
Cmode := Tftp_Utilities.Text;
elsif Lmode = "MAIL" then
Cmode := Tftp_Utilities.Mail;
elsif Lmode = "BINARY" then
Cmode := Tftp_Utilities.Binary;
else
Moderr := True;
end if;
if not Moderr then
Transport.Open (Connection, Status, "UDP/IP");
if Transport_Defs."=" (Transport_Defs.Ok, Status) then
Transport.Connect (Connection, Status, Remote_Host,
Remote_Socket, 5.0);
if Transport_Defs."=" (Transport_Defs.Ok, Status) then
if Remote_Pathname = "" then
Tftp_Utilities.Send_A_File
(Local_Pathname, Local_Pathname, Tftp_Utilities.Text,
Tftp_Utilities.Client, Connection);
else
Tftp_Utilities.Send_A_File
(Local_Pathname, Remote_Pathname, Tftp_Utilities.Text,
Tftp_Utilities.Client, Connection);
end if;
Transport.Disconnect (Connection);
Transport.Close (Connection);
end if;
end if;
Io.Put ("Transfer of " & Local_Pathname & " to !!" & To_Host);
if Remote_Pathname = "" then
Io.Put (Local_Pathname);
else
Io.Put (Remote_Pathname);
end if;
Io.Put_Line (" is complete.");
else
Io.Put_Line ("Illegal transfer mode => " & Mode);
end if;
exception
when Transport_Name.Undefined =>
Io.Put_Line ("Host " & To_Host & " is unknown to the system.");
when Tftp_Utilities.Timeout =>
Io.Put_Line ("Transfer timed out.");
Transport.Disconnect (Connection);
Transport.Close (Connection);
when others =>
raise;
end Put;