|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3072 (0xc00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Unix_Status_Buffer, seg_04b97b
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Unchecked_Conversion;
with V_I_Bits;
package body Unix_Status_Buffer is
function To_Short_Int is new Unchecked_Conversion
(Source => Unix_Status_Buffer.Mode_Rec,
Target => Short_Integer);
function To_Int is new Unchecked_Conversion
(Source => Unix_Status_Buffer.Mode_Rec,
Target => Integer);
function To_Permission (M : Mode_Rec) return File_Names.Permission is
Int : Integer;
Mask : Integer := 1;
Perm : File_Names.Permission := (others => File_Names.Deny_Right);
begin
if Mode_Rec'Size = 2 * System.Storage_Unit then
Int := Integer (To_Short_Int (M));
else
Int := To_Int (M);
end if;
for Right in File_Names.World_Execute_R ..
File_Names.Execute_As_User_R loop
if V_I_Bits.Bit_And (Int, Mask) /= 0 then
Perm (Right) := File_Names.Allow_Right;
end if;
Mask := 2 * Mask;
end loop;
return Perm;
end To_Permission;
function To_Permission_Int (P : File_Names.Permission)
return Permission_Integer is
Int_P, Mask : Permission_Integer;
begin
Int_P := 0;
Mask := 1;
for Right in File_Names.World_Execute_R ..
File_Names.Execute_As_User_R loop
if P (Right) = File_Names.Allow_Right then
Int_P := V_I_Bits.Bit_Or (Int_P, Mask);
end if;
Mask := 2 * Mask;
end loop;
return Int_P;
end To_Permission_Int;
function Is_Directory (Stat_Buf : Status_Buffer) return Boolean is
begin
return Stat_Buf.Mode.S_Ifmt = S_Ifdir;
end Is_Directory;
end Unix_Status_Buffer;
nblk1=2
nid=0
hdr6=4
[0x00] rec0=1c rec1=00 rec2=01 rec3=046
[0x01] rec0=20 rec1=00 rec2=02 rec3=000
tail 0x21548c934868436796188 0x42a00088462060003