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

⟦85612c6b4⟧ TextFile

    Length: 2932 (0xb74)
    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

WITH Link_Tools;
WITH Directory_Tools;
PROCEDURE Check_Portability
            (This_Object : IN String;
             Model_World : IN String;
             Has_Bad : OUT Boolean;
             Object_With_Bad_Link : OUT Directory_Tools.Object.Handle;
             Bad_Link : OUT Link_Tools.Link_Iterator) IS
  --
  -- This procedure checks that an object and all of its sub-objects
  -- have allowable links. All internal links are allowable. An external
  -- link is allowable if it is found in the link pack for the model
  -- world, or if it is to one of the specified object's sub-objects.
  -- If the object is found to have only allowable links, then it should
  -- be portable to any machine which has the same links available as the
  -- specified model world.
  --
  All_Objects : Directory_Tools.Object.Iterator :=
    Directory_Tools.Naming.Resolution (This_Object & "??");
  --
  All_Worlds : Directory_Tools.Object.Iterator :=
    Directory_Tools.Naming.Resolution (This_Object & "??'C(World)");
  --
BEGIN  
  Has_Bad := False;
  Directory_Tools.Object.Reset (All_Worlds);
  WHILE (NOT Directory_Tools.Object.Done (All_Worlds)) LOOP
    -- For all worlds.
    DECLARE
      --
      FUNCTION "=" (This_Kind : IN Link_Tools.Link_Kind;  
                    That_Kind : IN Link_Tools.Link_Kind)  
                   RETURN Boolean RENAMES Link_Tools."=";
      --
      Current_Links : Link_Tools.Link_Iterator;
      --
    BEGIN
      Link_Tools.Init
        (Current_Links,
         World => Directory_Tools.Naming.Unique_Full_Name
                    (Directory_Tools.Object.Value (All_Worlds)));
      WHILE (NOT Link_Tools.Done (Current_Links)) LOOP
        -- For all links in current world.
        IF (Link_Tools.Kind (Current_Links) = Link_Tools.External) THEN
          -- If link is external.
          IF (Link_Tools.Has (Link => "@",  
                              Source => Link_Tools.Source (Current_Links),  
                              Kind => Link_Tools.Any,  
                              World => Model_World)) THEN
            -- Link is allowable because it is in link pack for allowable
            -- links world.
            NULL;
          ELSIF (Directory_Tools.Object.Has
                   (All_Objects, Directory_Tools.Naming.Resolution
                                   (Link_Tools.Source
                                      (Current_Links)))) THEN
            -- Link is allowable because it is to a sub-object of the
            -- main object.
            NULL;
          ELSE
            -- Found non-allowable link.
            Has_Bad := True;
            Object_With_Bad_Link :=
              Directory_Tools.Object.Value (All_Worlds);
            Bad_Link := Current_Links;
            EXIT;
          END IF;
        END IF;
        Link_Tools.Next (Current_Links);
      END LOOP;
    END;  
    Directory_Tools.Object.Next (All_Worlds);
  END LOOP;
END Check_Portability;