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 - download
Index: ┃ B T

⟦b01a19fd4⟧ TextFile

    Length: 2528 (0x9e0)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Mac_Types;
with Mac_Text;
use Mac_Types;
package body Mac_Path is

    procedure Get_Mac_Root_Directory
                 (T : Mac_Text.Text; S : out Str255; Exists : out Boolean) is
        First, Second : Mac_Text.Index;  
        Str : Str255;
    begin
        Exists := False;
        S (0) := Nul;
        for Index_Char in 1 .. Mac_Text.Length (T) loop  
            Str (Index_Char) := Mac_Text.Value (Index_Char, T);
            if Str (Index_Char) = ':' then
                if Index_Char > 1 then
                    Str (0) := Mac_Types.Char'Val (Index_Char);
                    S := Str;
                    Exists := True;
                end if;
                return;
            end if;
        end loop;
    end Get_Mac_Root_Directory;

    procedure Get_Mac_Sub_Directory (T : Mac_Text.Text;
                                     Which : Index;
                                     S : out Str255;
                                     Exists : out Boolean) is
        First, Second : Mac_Text.Index := 0;
        Remaining : Natural := Natural (Which);  
        Str : constant Str255 := Mac_Text.Value (T);
    begin
        Exists := False;
        S (0) := Nul;
        for Index_Char in 1 .. Mac_Text.Length (T) loop
            if Mac_Text.Value (Index_Char, T) = ':' then
                Second := First;
                First := Index_Char;
                if Remaining = 0 then
                    S (0) := Mac_Types.Char'Val (First - Second + 1);
                    S (1 .. First - Second + 1) := Str (Second .. First);
                    Exists := True;
                    return;
                else
                    Remaining := Remaining - 1;
                end if;
            end if;
        end loop;
    end Get_Mac_Sub_Directory;

    procedure Get_Mac_Name
                 (T : Mac_Text.Text; S : out Str255; Exists : out Boolean) is
        First : Mac_Text.Index := 0;  
        Str : constant Str255 := Mac_Text.Value (T);
    begin
        Exists := False;
        S (0) := Nul;
        for Index_Char in 1 .. Mac_Text.Length (T) loop
            if Mac_Text.Value (Index_Char, T) = ':' then
                First := Index_Char;
            end if;
        end loop;  
        if First /= Mac_Text.Length (T) then
            S (0) := Mac_Types.Char'Val (Mac_Text.Length (T) - First);
            S (1 .. Mac_Text.Length (T) - First) :=
               Str (First + 1 .. Mac_Text.Length (T));
            Exists := True;
        end if;
    end Get_Mac_Name;

end Mac_Path;