DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦2a44d5069⟧ Ada Source

    Length: 12288 (0x3000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Move_F, package body Move_R, seg_0251a9

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Communications;
with Errors;
with Files;
with Files;
with Interchange;
with Mac_Files;  
with Mac_Path;
with Mac_Types;
with Mac_Text;
with Memory;
with Osutils;
with Rational_Error;
with System;
with Talk_Utils;
with Text_Io;
use Text_Io;
with Unchecked_Conversion;
package body Move_R is

    package Move_F is

        procedure From_Remote_File_In (Name : Mac_Text.Text);  
        procedure To_Remote_File_In (Name : Mac_Text.Text);
        procedure Options_In (Options : Mac_Text.Text);
        procedure End_Move;

    end Move_F;

    package body Move_F is  
        Err : Mac_Types.Oserr := Mac_Types.Noerr;
        From_File_Name : Mac_Types.Str255;

        function As_Varinteger is new Unchecked_Conversion
                                         (Source => System.Address,
                                          Target => Mac_Types.Varinteger);

        function As_Varlongint is new Unchecked_Conversion
                                         (Source => System.Address,
                                          Target => Mac_Types.Varlongint);


        procedure From_Remote_File_In (Name : Mac_Text.Text) is
        begin
            Err := Mac_Types.Noerr;
            From_File_Name := Mac_Text.Value (Name);
        end From_Remote_File_In;

        procedure To_Remote_File_In (Name : Mac_Text.Text) is
            To_File_Name : Mac_Types.Str255 := Mac_Text.Value (Name);
        begin  
            Err := Files.Rename (Oldname => From_File_Name,
                                 Vrefnum => 0,
                                 Newname => To_File_Name);
        end To_Remote_File_In;

        procedure Options_In (Options : Mac_Text.Text) is
        begin
            null;
        end Options_In;

        procedure End_Move is
        begin  
            if Err /= Mac_Types.Noerr then
                Rational_Error.Raise_Mac_Error (Err);
            end if;
        end End_Move;

    end Move_F;

    procedure Read (A_Connection : in out Communications.Connection) is
        I : Mac_Types.Longint;
        B : Boolean;
        T : Mac_Text.Text (256);  
    begin
        Put_Line ("move_r:read begin");
        Interchange.Get_Int (A_Connection, I);
        if I /= Talk_Utils.F_From_Remote_File then
            Rational_Error.Raise_Error (Rational_Error.Internal_Error);
        end if;  
        Interchange.Get_Text (A_Connection, T);
        Move_F.From_Remote_File_In (T);
        Put ("move_r:from file '");
        for I in 1 .. Mac_Text.Length (T) loop
            Put (Character'Val (Mac_Types.Char'Pos (Mac_Text.Value (I, T))));
        end loop;
        Put_Line ("'");
        Interchange.Get_Int (A_Connection, I);
        if I /= Talk_Utils.F_To_Remote_File then
            Rational_Error.Raise_Error (Rational_Error.Internal_Error);
        end if;  
        Interchange.Get_Text (A_Connection, T);
        Move_F.To_Remote_File_In (T);
        Put ("move_r:to file '");
        for I in 1 .. Mac_Text.Length (T) loop
            Put (Character'Val (Mac_Types.Char'Pos (Mac_Text.Value (I, T))));
        end loop;
        Put_Line ("'");
        Interchange.Get_Int (A_Connection, I);
        if I /= Talk_Utils.F_Options then
            Rational_Error.Raise_Error (Rational_Error.Internal_Error);
        end if;
        Interchange.Get_Text (A_Connection, T);
        Move_F.Options_In (T);
        Interchange.Get_Int (A_Connection, I);
        if I /= Talk_Utils.F_Delimitor then
            Rational_Error.Raise_Error (Rational_Error.Internal_Error);
        end if;
        Interchange.Get_Int (A_Connection, I);
        if I /= Talk_Utils.R_Move then
            Rational_Error.Raise_Error (Rational_Error.Internal_Error);
        end if;
        Put_Line ("move_r:read end");
    end Read;

    procedure Write (A_Connection : in out Communications.Connection) is
    begin
        Put_Line ("move_r:write begin");
        begin  
            Move_F.End_Move;
        exception
            when others =>
                Rational_Error.Report
                   (A_Connection, Talk_Utils.R_Move, Rational_Error.Get);
        end;
        Interchange.Put_Int (A_Connection, Talk_Utils.F_Delimitor);
        Interchange.Put_Int (A_Connection, Talk_Utils.R_Move);  
        Put_Line ("move_r:write end");
    end Write;

end Move_R;

E3 Meta Data

    nblk1=b
    nid=9
    hdr6=c
        [0x00] rec0=27 rec1=00 rec2=01 rec3=014
        [0x01] rec0=00 rec1=00 rec2=05 rec3=03e
        [0x02] rec0=1e rec1=00 rec2=0a rec3=00a
        [0x03] rec0=18 rec1=00 rec2=04 rec3=046
        [0x04] rec0=19 rec1=00 rec2=03 rec3=024
        [0x05] rec0=0e rec1=00 rec2=06 rec3=000
        [0x06] rec0=09 rec1=00 rec2=03 rec3=000
        [0x07] rec0=0b rec1=00 rec2=02 rec3=000
        [0x08] rec0=1a rec1=00 rec2=02 rec3=018
        [0x09] rec0=06 rec1=00 rec2=08 rec3=000
        [0x0a] rec0=da rec1=ea rec2=e0 rec3=000
    tail 0x217200fb4839f59c507b6 0x42a00088462060003
Free Block Chain:
  0x9: 0000  00 02 00 2d 80 05 6e 64 22 29 3b 05 00 0e 20 20  ┆   -  nd");     ┆
  0x2: 0000  00 08 00 04 80 01 52 01 6f 70 79 5f 46 2e 45 6e  ┆      R opy_F.En┆
  0x8: 0000  00 0b 00 06 80 03 20 20 20 03 67 69 6e 74 20 69  ┆          gint i┆
  0xb: 0000  00 07 00 0f 00 0c 20 20 20 20 20 20 20 20 20 20  ┆                ┆
  0x7: 0000  00 00 03 f9 80 03 65 29 3b 03 00 35 20 20 20 20  ┆      e);  5    ┆