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

⟦2bbb72c86⟧ TextFile

    Length: 2648 (0xa58)
    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

separate (Tftp_Server)
task body Transfer_Worker is
    Connection : Transport.Connection_Id;
    Status : Transport_Defs.Status_Code;
    Current_File : String (1 .. 1000);
    Current_File_Last : Natural;
    Current_Direction : Transfer_Direction;
    Current_Mode : Tftp_Utilities.Transfer_Mode;
    My_Slot : Positive;
    Quit : Boolean := False;
begin
    while not Quit loop
        accept Transfer (File : String;
                         Direction : Transfer_Direction;
                         Mode : Tftp_Utilities.Transfer_Mode;
                         Host : Transport_Defs.Host_Id;
                         Socket : Transport_Defs.Socket_Id;
                         Slot : Positive) do
            Transport.Open (Connection, Status, "UDP/IP");
            if Transport_Defs."=" (Status, Transport_Defs.Ok) then
                Transport.Connect (Connection, Status, Host, Socket);
                if Transport_Defs."=" (Status, Transport_Defs.Ok) then
                    Current_Direction := Direction;
                    Current_Mode := Mode;
                    Current_File_Last := Current_File'First - 1;
                    for I in File'Range loop
                        exit when Current_File_Last = Current_File'Last;
                        Current_File_Last := Current_File_Last + 1;
                        Current_File (Current_File_Last) := File (I);
                    end loop;
                    My_Slot := Slot;
                else
                    Transport.Close (Connection);
                end if;
            end if;
        end Transfer;
        if Transport.Is_Open (Connection) then
            begin
                case Current_Direction is
                    when Receive =>
                        Tftp_Utilities.Receive_A_File
                           ("", Current_File (1 .. Current_File_Last),
                            Current_Mode, Tftp_Utilities.Server, Connection);
                    when Send =>
                        Tftp_Utilities.Send_A_File
                           (Current_File (1 .. Current_File_Last), "",
                            Current_Mode, Tftp_Utilities.Server, Connection);
                end case;
                Worker_Array (My_Slot).Is_Active := False;
            exception
                when Tftp_Utilities.Fatal_Error =>
                    Worker_Array (My_Slot).Is_Active := False;
                when others =>
                    Fatal_Error_Seen := True;
                    Quit := True;
            end;
        end if;
        Transport.Disconnect (Connection);
        Transport.Close (Connection);
    end loop;
end Transfer_Worker;