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

⟦ea5c87dca⟧ Ada Source

    Length: 11264 (0x2c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Make_Path_Postprocess, seg_03be5f, separate Library_Extensions

Derivation

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

E3 Source Code



with Sparc_Strings;
separate (Library_Extensions)
procedure Make_Path_Postprocess  
             (Host_Path_Name         :        String;
              Remote_Machine         :        String;
              Remote_Directory       :        String;
              Remote_Program_Library :        String;
              Status                 : in out Simple_Status.Condition) is

    -- Stripped_Machine : CONSTANT String :=
    --    Su.Strip (From => Remote_Machine, Filler => ' ');
    --
    -- Stripped_Directory : CONSTANT String :=
    --    Su.Strip (From => Remote_Directory, Filler => ' ');
    --
    -- Remote_Program_Lib : CONSTANT String :=
    --    Stripped_Directory & Sparc_Strings.Directory_Separator & "ada.lib";
    --
    The_File_Exists   : Boolean := False;
    The_Dir_Exists    : Boolean := False;
    Remote_Connection : Rci.Context;

begin

    declare
        Stripped_Machine : constant String :=
           Su.Strip (From => Remote_Machine, Filler => ' ');

        Stripped_Directory : constant String :=
           Su.Strip (From => Remote_Directory, Filler => ' ');

        Remote_Program_Lib : constant String :=
           Stripped_Directory & Sparc_Strings.Directory_Separator & "ada.lib";

    begin
        -- this routine IGNORES the Remote_Program_Library parameter as it has no
        -- meaning in the VADS context.

        Log.Put_Line
           (  
            Message =>
            "Make_Path_Postprocess ( host_path_name =>" &
               Naming.Get_Simple_Name (Host_Path_Name) & ",remote_machine => " &
               Remote_Machine & ",remote_directory => " & Remote_Directory &
               ",remote_Program_Library => " & Remote_Program_Library & ")",
            Kind    => Profile.Sharp_Msg);

        Log.Put_Line
           (  
            Message =>
            "Make_Path_Postprocess ( Stripped_Machine  =>" & Stripped_Machine &
               ",stripped_directory => " & Stripped_Directory &
               ",remote_program_lib => " & Remote_Program_Lib,
            Kind    => Profile.Sharp_Msg);

        Simple_Status.Initialize (Status);

        if Stripped_Machine = "" or else Stripped_Directory = "" then

            Display_Information  
               (Remote_Machine_Name   => Stripped_Machine,
                Remote_Directory_Name => Stripped_Directory);

            Set_Status
               (Status   => Status,
                Message  => "Insufficient remote program library information.",
                Severity => Simple_Status.Problem);

        end if;

        if not Simple_Status.Error (Status) then
            Acquire_Connection  
               (Remote_Connection => Remote_Connection,
                Remote_Machine    => Stripped_Machine,
                Status            => Status);
        end if;

        if not Simple_Status.Error (Status) then


            --
            -- Check for existence of remote directory. If it does not
            -- exist, then create a new remote directory.
            --

            Directory_Exists  
               (Remote_Directory  => Stripped_Directory,
                Remote_Machine    => Remote_Machine,  
                Remote_Connection => Remote_Connection,
                Status            => Status,
                Exists            => The_Dir_Exists);

            if The_Dir_Exists then
                Log.Put_Line  
                   (Message => "Using existing directory " & Stripped_Directory,
                    Kind    => Profile.Note_Msg);
            else
                Log.Put_Line  
                   (Message => "Creating a new remote directory." &
                                  Stripped_Directory,
                    Kind    => Profile.Note_Msg);

                Create_Remote_Directory  
                   (Remote_Machine    => Stripped_Machine,
                    Remote_Directory  => Stripped_Directory,
                    Remote_Connection => Remote_Connection,
                    Status            => Status);
            end if;

            if not Simple_Status.Error (Status) then
                --
                -- Check for existence of remote library. If it does not
                -- exist, then create a new remote library.  If it does, use it.
                --

                File_Exists  
                   (Remote_Filename   => Remote_Program_Lib,
                    Remote_Machine    => Stripped_Machine,
                    Remote_Connection => Remote_Connection,
                    Status            => Status,
                    Exists            => The_File_Exists);

                if not Simple_Status.Error (Status) then
                    if The_File_Exists then
                        Log.Put_Line  
                           (Message =>  
                               "An Ada library already exists in " &
                                  Stripped_Directory &  
                                  ".  " &  
                                  "This library will be used in its existing state.",
                            Kind    => Profile.Warning_Msg);
                    else
                        Create_Program_Library  
                           (Host_View              => Host_Path_Name,
                            Remote_Machine         => Stripped_Machine,
                            Remote_Program_Library => Remote_Program_Lib,
                            Remote_Directory       => Stripped_Directory,
                            Status                 => Status);

                        if Simple_Status.Error (Status) then
                            Log.Put_Line  
                               (Message  => Simple_Status.Message (Status),
                                Kind     => Profile.Error_Msg,
                                Response => Profile.Get);

                            Set_Status  
                               (Status     => Status,
                                Error_Type => "Remote_Operation_Error",
                                Message    => "Make_Path_Postprocess failed.",
                                Severity   => Simple_Status.Problem);
                        end if;
                    end if;
                else
                    Log.Put_Line  
                       (Message  => Simple_Status.Message (Status),
                        Kind     => Profile.Error_Msg,
                        Response => Profile.Get);

                    Set_Status  
                       (Status     => Status,
                        Error_Type => "Remote_Operation_Error",
                        Message    => "Make_Path_Postprocess failed.",
                        Severity   => Simple_Status.Problem);
                end if;
            else
                Log.Put_Line  
                   (Message  => Simple_Status.Message (Status),
                    Kind     => Profile.Error_Msg,
                    Response => Profile.Get);

                Set_Status  
                   (Status     => Status,
                    Error_Type => "Remote_Operation_Error",
                    Message    => "Make_Path_Postprocess failed.",
                    Severity   => Simple_Status.Problem);
            end if;

            Rci.Release (Remote_Connection => Remote_Connection,
                         Status            => Status,
                         Trace_Command     => Trace_Rci_Commands);

            if Simple_Status.Error (Status) then
                Log.Put_Line  
                   (Message => Simple_Status.Message (Status),  
                    Kind    => Profile.Error_Msg);
                Log.Put_Line  
                   (Message => "Release of remote connection failed.",  
                    Kind    => Profile.Error_Msg);
            end if;
        end if;

    exception

        when others =>
            Unhandled_Exception (Status, "Make_Path_PostProcess");
            begin
                Rci.Release (Remote_Connection => Remote_Connection,
                             Status            => Status,
                             Trace_Command     => Trace_Rci_Commands);
            exception
                when others =>
                    null;
            end;
    end;
end Make_Path_Postprocess;

E3 Meta Data

    nblk1=a
    nid=0
    hdr6=14
        [0x00] rec0=1c rec1=00 rec2=01 rec3=050
        [0x01] rec0=00 rec1=00 rec2=0a rec3=00a
        [0x02] rec0=19 rec1=00 rec2=02 rec3=054
        [0x03] rec0=1e rec1=00 rec2=03 rec3=034
        [0x04] rec0=17 rec1=00 rec2=04 rec3=044
        [0x05] rec0=16 rec1=00 rec2=05 rec3=088
        [0x06] rec0=13 rec1=00 rec2=06 rec3=006
        [0x07] rec0=15 rec1=00 rec2=07 rec3=030
        [0x08] rec0=16 rec1=00 rec2=08 rec3=026
        [0x09] rec0=12 rec1=00 rec2=09 rec3=000
    tail 0x21534823e8565751c2a2c 0x42a00088462062803