DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦f196fc7db⟧ TextFile

    Length: 2685 (0xa7d)
    Types: TextFile
    Names: »B«

Derivation

└─⟦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⟧ 

TextFile

with Tftp_Utilities, Io, Transport_Defs, Transport_Name, Transport;
procedure Get (From_Host : in String;
               Remote_Pathname : in String;
               Local_Pathname : in String := "";
               Mode : in String := "TEXT") is
    Remote_Host : Transport_Defs.Host_Id (1 .. 4) :=
       Transport_Name.Host_To_Host_Id (From_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 Local_Pathname = "" then
                    Tftp_Utilities.Receive_A_File
                       (Remote_Pathname, Remote_Pathname, Tftp_Utilities.Text,
                        Tftp_Utilities.Client, Connection);
                else
                    Tftp_Utilities.Receive_A_File
                       (Remote_Pathname, Local_Pathname, Tftp_Utilities.Text,
                        Tftp_Utilities.Client, Connection);
                end if;
                Transport.Disconnect (Connection);
                Transport.Close (Connection);
            end if;
        end if;
        Io.Put ("Transfer of !!" & From_Host & Remote_Pathname & " to ");
        if Local_Pathname = "" then
            Io.Put (Remote_Pathname);
        else
            Io.Put (Local_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 " & From_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 Get;