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 - downloadIndex: ┃ B T ┃
Length: 9669 (0x25c5) Types: TextFile Names: »B«
└─⟦407de186f⟧ Bits:30000749 8mm tape, Rational 1000, RCFSUN └─ ⟦e5cd75ab4⟧ »DATA« └─⟦this⟧
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 => ' '); Stripped_Program_Library : constant String := Su.Strip (From => Remote_Program_Library, Filler => ' '); View_Simple_Name : constant String := Naming.Get_Simple_Name (Host_Path_Name); Subsystem_Simple_Name : constant String := Naming.Get_Simple_Name (Naming.Get_Prefix (Host_Path_Name)); Remote_Subsystem_Directory : constant String := Su.Lower_Case (Stripped_Directory & "/" & Subsystem_Simple_Name); Remote_View_Directory : constant String := Su.Lower_Case (Remote_Subsystem_Directory & "/" & View_Simple_Name); Remote_Program_Lib : constant String := Remote_View_Directory & "/adalib"; Remote_Connection : Remote_Command_Interface.Context; Dir_Exists : Boolean := False; Old_Context : Directory.Naming.Context; procedure Display_Information is begin if Stripped_Machine = "" then Log.Put_Line (Message => "A null remote machine name was provided.", Kind => Profile.Warning_Msg); end if; if Stripped_Directory = "" then Log.Put_Line (Message => "A null remote directory name was provided.", Kind => Profile.Warning_Msg); end if; end Display_Information; begin Log.Put_Line (Message => "Executing Make_Path_Postprocess", Kind => Profile.Note_Msg); -- set context Simple_Status.Initialize (Status); -- reset context if Stripped_Machine = "" or else Stripped_Directory = "" then Display_Information; Set_Status (Status => Status, Message => "Insufficient remote program library information.", Severity => Simple_Status.Problem); return; end if; Set_Context (Old_Context => Old_Context, View => Host_Path_Name, Status => Status); if Simple_Status.Error (Status) then Log.Put_Line (Message => Simple_Status.Message (Status), Kind => Profile.Negative_Msg); Set_Status (Status => Status, Message => "Make_Path_Postprocess Failed"); return; end if; Remote_Command_Interface.Acquire (Remote_Connection => Remote_Connection, Status => Status, Target_Key => Target_Key_Id, Remote_Machine => Remote_Machine); if Simple_Status.Error (Status) then Log.Put_Line (Message => Simple_Status.Message (Status), Kind => Profile.Negative_Msg); Set_Status (Status => Status, Message => "Unable to acquire connection to " & Remote_Machine); return; end if; -- -- Check for existence of remote directory. If it does not -- exist, then create a new remote directory. -- Directory_Exists (Remote_Directory => Stripped_Directory, Remote_Connection => Remote_Connection, Status => Status, Exists => Dir_Exists); if Dir_Exists then Log.Put_Line (Message => "Directory, " & Stripped_Directory & " , already exists.", Kind => Profile.Warning_Msg); Log.Put_Line (Message => "Using an existing 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_Directory => Stripped_Directory, Remote_Connection => Remote_Connection, Status => Status); if Simple_Status.Error (Status) then return; end if; end if; -- -- Check for existence of remote subsystem directory. If it does not -- exist, then create a new remote subsystem directory. -- Directory_Exists (Remote_Directory => Remote_Subsystem_Directory, Remote_Connection => Remote_Connection, Status => Status, Exists => Dir_Exists); if Dir_Exists then Log.Put_Line (Message => "Directory, " & Remote_Subsystem_Directory & " , already exists.", Kind => Profile.Warning_Msg); Log.Put_Line (Message => "Using an existing directory.", Kind => Profile.Note_Msg); else Log.Put_Line (Message => "Creating a new remote subsystem directory." & Remote_Subsystem_Directory, Kind => Profile.Note_Msg); Create_Remote_Directory (Remote_Directory => Remote_Subsystem_Directory, Remote_Connection => Remote_Connection, Status => Status); if Simple_Status.Error (Status) then return; end if; end if; -- -- Check for existence of remote view directory. If it does not -- exist, then create a new remote view directory and a -- remote_imports_directory. -- Directory_Exists (Remote_Directory => Remote_View_Directory, Remote_Connection => Remote_Connection, Status => Status, Exists => Dir_Exists); if Dir_Exists then Log.Put_Line (Message => "Directory, " & Remote_View_Directory & " , already exists.", Kind => Profile.Warning_Msg); Log.Put_Line (Message => "Using an existing directory.", Kind => Profile.Note_Msg); else Log.Put_Line (Message => "Creating a new remote view directory." & Remote_View_Directory, Kind => Profile.Note_Msg); Create_Remote_Directory (Remote_Directory => Remote_View_Directory, Remote_Connection => Remote_Connection, Status => Status); if Simple_Status.Error (Status) then return; end if; Library_Interface.Set_Remote_Directory (View => Host_Path_Name, Value => Remote_View_Directory, Condition => Status, Response => Profile.Get); if Simple_Status.Error (Status) then return; end if; end if; -- -- Check for existence of program library; if it doesn't exist then -- create an ada library for this view. -- Directory_Exists (Remote_Directory => Remote_Program_Lib, Remote_Connection => Remote_Connection, Status => Status, Exists => Dir_Exists); if Dir_Exists then Log.Put_Line (Message => "A program library already exists in " & Remote_View_Directory & ".", Kind => Profile.Warning_Msg); Log.Put_Line (Message => "The existing program library will be used.", Kind => Profile.Warning_Msg); return; else Log.Put_Line (Message => "Creating a new remote program library, " & Remote_View_Directory & "/" & Stripped_Program_Library & ".", Kind => Profile.Note_Msg); Library_Interface.Set_Remote_Directory (View => Host_Path_Name, Value => Remote_View_Directory, Condition => Status, Response => Profile.Get); if Simple_Status.Error (Status) then return; end if; Create_Program_Library (Remote_Program_Library => Remote_Program_Lib, Remote_Directory => Remote_View_Directory, Remote_Connection => Remote_Connection, Status => Status); if Simple_Status.Error (Status) then Set_Status (Status => Status, Message => "Unable to build remote program library" & Remote_Program_Lib & "."); end if; end if; Remote_Command_Interface.Release (Remote_Connection => Remote_Connection, Status => Status); Reset_Context (Old_Context); exception when others => Unhandled_Exception (Status, "Make_Path_PostProcess"); begin Remote_Command_Interface.Release (Remote_Connection => Remote_Connection, Status => Status); exception when others => null; end; Reset_Context (Old_Context); end Make_Path_Postprocess;