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

⟦172e1cf58⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Unix_Definitions, seg_010781

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 Unique;
package body Unix_Definitions is

    function Enclosing_Directory (Name : in String) return String is
    begin
        for I in reverse Name'Range loop
            if Name (I) = Context_Separator then
                return Name (Name'First .. I - 1);
            end if;
        end loop;  
        return "";
    end Enclosing_Directory;

    function Local_Name (Name : in String) return String is
    begin
        for I in reverse Name'Range loop
            if Name (I) = Context_Separator then
                return Name (I + 1 .. Name'Last);
            end if;
        end loop;
        return Name;
    end Local_Name;

    function Simple_Name (Name : in String) return String is
    begin
        for I in reverse Name'Range loop
            if Name (I) = Context_Separator then
                for J in I + 1 .. Name'Last loop
                    if Name (J) = Extension_Separator then
                        return Name (I + 1 .. J - 1);
                    end if;
                end loop;
                return Name (I + 1 .. Name'Last);
            end if;
        end loop;  
        return Name;
    end Simple_Name;

    function Temporary_Filename (Extension : in String) return String is
        Unique_Name : constant String := Unique & Extension;

        pragma Assert (Unique_Name'Length <= Minimal_Filename_Length);

    begin
        return Context_Separator & "tmp" & Context_Separator & Unique_Name;
    end Temporary_Filename;

end Unix_Definitions;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=1f rec1=00 rec2=01 rec3=052
        [0x01] rec0=13 rec1=00 rec2=02 rec3=000
    tail 0x2150c07f082307739bff8 0x42a00088462060003