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

⟦130d9a592⟧ TextFile

    Length: 3920 (0xf50)
    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 (Tracker.Subsystem_Pkg)



procedure Ss_Delete is
    ------------------------------------------------------------------------------
    --|
    --|  NAME:  SS_DELETE
    --|
    --|  OVERVIEW:
    --|  OVERVIEW:
    --|    This procedure is used to delete a subsystem from the list by calling
    --|    the List_Pkg procedure DELETE.  When a subsystem is deleted from the
    --|    subsystem list, the subsystem number must also be changed in every
    --|    element to which it belonged by calling the procedure
    --|    CHANGE_SS_IN_EL.
    --|
    --|  EXCEPTIONS HANDLED:
    --|    none
    --|
    --|  HISTORY:
    --|    written by   May Lee   March 1985
    --|
    --|  NOTES:
    --|    The number of subsystems is decremented after the record is deleted.
    --|
    --|    A check is made to insure that the last subsystem is not deleted.
    --|    There must be at least one subsystem at all times.
    --|
    --|
    ------------------------------------------------------------------------------

    Abort_Proc : Boolean;           -- abort getting an existing ss
    Deleted_Ss : Boolean;
    End_List : Boolean;
    Ele_Ptr : Element_Pointer;
    New_Name : Ss_Name_Type := (others => ' ');
    Ss_Record : Subsystem_Pointer;
    New_Ss_Record : Subsystem_Pointer;
    Successful : Boolean := False;   -- if record was found in the list
    Key : Ss_Name_Type;       -- name of subsystem looking for

begin
    if Num_Of_Subsystems > 1 then
        -- have to have at least one subsystem
        Put_Line ("Which subsystem would you like to delete? ");

        -- get the subsystem name
        Prompt_Pkg.Existing_Subsys_Name (Abort_Proc, Key);

        if not Abort_Proc then
            --point to that record in the list
            Find (Ss_List, Key, Ss_Record, Successful);

            -- delete the subsystem from the list
            Delete (Ss_List, Key, Successful);

            Start_Walk (Ss_Record.Element_List);
            Walk (Ss_Record.Element_List, Ele_Ptr, End_List);

            if not End_List then
                -- change subsystem name in element data
                Put (" When subsystem ");
                Put (Ss_Record.Name);
                Put (" is deleted, ");
                New_Line;
                Put_Line
                   (" what subsystem would you like to use in its place in the element data? ");
                -- prompt for subsystem name

                loop
                    Prompt_Pkg.Existing_Subsys_Name (Abort_Proc, New_Name);
                    exit when not Abort_Proc;
                    Put_Line (" You cannot abort the procedure at this time. ");
                    Put_Line (" You must enter a valid subsystem name!");
                    New_Line;
                end loop;

                Find (Ss_List, New_Name, New_Ss_Record, Successful);

                -- change the subsystem name in the element data
                Change_Ss_In_El (Ss_Record, New_Name);

                -- append this subsystem's elements to the new subsystem's element list
                Start_Walk (Ss_Record.Element_List);

                loop
                    Walk (Ss_Record.Element_List, Ele_Ptr, End_List);
                    exit when End_List;
                    Add (New_Ss_Record.Element_List, Ele_Ptr.Desc_Key, Ele_Ptr);
                end loop;
            end if;

            -- decrement the subsystem counter
            Num_Of_Subsystems := Num_Of_Subsystems - 1;

            New_Line;
            Put (" The number of subsystems = ");
            Put (Num_Of_Subsystems, 1);
            New_Line (2);
            delay 1.0;
        end if; -- not abort

    else
        Put_Line (" You must have at least one subsystem at all times. ");
        Put_Line (" Since you only have one subsystem at this time, you ");
        Put_Line (" cannot delete it. ");
        delay 1.5;
    end if;
end Ss_Delete;