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

⟦7c6fc79f8⟧ Ada Source

    Length: 15360 (0x3c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Any_Object, package body Directory, package body Naming, package body Statistics, package body Traversal, seg_026fa3, seg_027c57, seg_027cf2

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 Set_Generic;
with String_Utilities;
with Directory_Implementation;
package body Directory is

    package Su renames String_Utilities;
    package Di renames Directory_Implementation;


    Set_Of_Objects : Object_Set.Set;

    Error_Message : Gs.Object;


    function Get_Error_Message return String is
    begin
        return Gs.Image (Error_Message);
    end Get_Error_Message;

    procedure Put_Error_Message (The_Message : in String := "") is
    begin
        if The_Message = "" then
            Gs.Create (Error_Message, Di.Get_Error_Message);
        else
            Gs.Create (Error_Message, The_Message);
        end if;
    end Put_Error_Message;


    function Nil return Object is
    begin
        return Object'(Name => Gs.Undefined_Object);
    end Nil;


    function Is_Nil (The_Object : Object) return Boolean is
    begin
        return Gs."=" (The_Object.Name, Gs.Undefined_Object);
    end Is_Nil;



    function Same_Object (Left, Right : Object) return Boolean is
    begin
        return Gs.Image (Left.Name) = Gs.Image (Right.Name);
    end Same_Object;

    function Class (The_Object : Object) return Class_Enumeration is
    begin
        if Di.Is_Directory (Path => Gs.Image (The_Object.Name)) then
            return Directory_Class;
        elsif Di.Is_File (Path => Gs.Image (The_Object.Name)) then
            return File_Class;
        elsif Di.Is_Symbolic_Link (Path => Gs.Image (The_Object.Name)) then
            return Link_Class;
        elsif Di.Is_Fifo (Path => Gs.Image (The_Object.Name)) then
            return Fifo_Class;
        elsif Di.Is_Socket (Path => Gs.Image (The_Object.Name)) then
            return Socket_Class;
        elsif Di.Is_Character_Special_File
                 (Path => Gs.Image (The_Object.Name)) then
            return Character_Special_Class;
        elsif Di.Is_Bloc_Special_File (Path => Gs.Image (The_Object.Name)) then
            return Bloc_Special_Class;
        elsif Di.Is_Multiplex_Character_Special_File
                 (Path => Gs.Image (The_Object.Name)) then
            return Multiplex_File_Class;
        end if;
    end Class;


    function Equal (Class1, Class2 : Class_Enumeration) return Boolean is
    begin
        return Class1 = Class2;
    end Equal;


    function Image (The_Class : Class_Enumeration) return String is
    begin
        case The_Class is
            when Unknown_Class =>
                return " ";
            when Directory_Class =>
                return "d";
            when File_Class =>
                return "-";
            when Fifo_Class =>
                return "f";
            when Socket_Class =>
                return "s";
            when Character_Special_Class =>
                return "c";
            when Bloc_Special_Class =>
                return "b";
            when Multiplex_File_Class =>
                return "m";
            when others =>
                return " ";
        end case;
    end Image;


    function Value (S : String) return Class_Enumeration is
    begin  
        if S = " " then
            return Unknown_Class;
        elsif S = "d" then
            return Directory_Class;
        elsif S = "-" then
            return File_Class;
        elsif S = "f" then
            return Fifo_Class;
        elsif S = "s" then
            return Socket_Class;
        elsif S = "c" then
            return Character_Special_Class;
        elsif S = "b" then
            return Bloc_Special_Class;
        elsif S = "m" then
            return Multiplex_File_Class;
        end if;
    end Value;


    procedure Next (Iter : in out Iterator) is
    begin  
        Object_Set.Next (Object_Set.Iterator (Iter));
    end Next;


    function Done (Iter : Iterator) return Boolean is
    begin  
        return Object_Set.Done (Object_Set.Iterator (Iter));
    end Done;


    function Value (Iter : Iterator) return Object is
    begin  
        return Object_Set.Value (Object_Set.Iterator (Iter));
    end Value;


    procedure Reset (Iter : in out Iterator) is
    begin  
        Object_Set.Init (Object_Set.Iterator (Iter), Set_Of_Objects);
    end Reset;



    package body Naming is separate;
    package body Traversal is separate;
    package body Any_Object is separate;
    package body Statistics is separate;

begin
    Naming.Set_Default_Context (The_Context => Di.Get_Home_Directory);
end Directory;

E3 Meta Data

    nblk1=e
    nid=6
    hdr6=c
        [0x00] rec0=27 rec1=00 rec2=01 rec3=040
        [0x01] rec0=19 rec1=00 rec2=0a rec3=030
        [0x02] rec0=0f rec1=00 rec2=0e rec3=02e
        [0x03] rec0=21 rec1=00 rec2=0d rec3=020
        [0x04] rec0=27 rec1=00 rec2=04 rec3=044
        [0x05] rec0=08 rec1=00 rec2=02 rec3=000
        [0x06] rec0=0e rec1=00 rec2=02 rec3=000
        [0x07] rec0=0f rec1=00 rec2=02 rec3=000
        [0x08] rec0=02 rec1=00 rec2=02 rec3=000
        [0x09] rec0=10 rec1=00 rec2=02 rec3=000
        [0x0a] rec0=0a rec1=00 rec2=07 rec3=000
        [0x0b] rec0=09 rec1=00 rec2=0b rec3=000
        [0x0c] rec0=1b rec1=00 rec2=0b rec3=078
        [0x0d] rec0=0f rec1=00 rec2=0d rec3=000
    tail 0x217215db083ab63b3e54d 0x42a00088462062803
Free Block Chain:
  0x6: 0000  00 09 01 ce 80 2f 5f 46 69 6c 65 20 28 50 61 74  ┆     /_File (Pat┆
  0x9: 0000  00 0b 00 07 00 00 00 00 01 20 01 6e 65 77 20 55  ┆           new U┆
  0xb: 0000  00 03 00 0b 80 08 65 74 75 72 6e 20 4c 65 08 52  ┆      eturn Le R┆
  0x3: 0000  00 07 03 fc 80 0b 20 20 20 20 20 20 20 20 20 20  ┆                ┆
  0x7: 0000  00 0c 00 b8 80 0f 61 72 69 61 62 6c 65 5f 53 74  ┆      ariable_St┆
  0xc: 0000  00 08 00 27 00 24 20 20 20 20 20 20 20 20 66 75  ┆   ' $        fu┆
  0x8: 0000  00 05 03 fc 80 04 6c 69 63 79 04 00 2a 20 20 20  ┆      licy  *   ┆
  0x5: 0000  00 00 01 7f 80 13 61 6c 6c 65 64 20 64 65 63 6c  ┆      alled decl┆