text stringlengths 0 234 |
|---|
(FS : in out Native_FS_Driver) |
return File_Handle_Access |
is |
Result : File_Handle_Access := FS.Free_File_Handles; |
begin |
if Result = null then |
Result := new File_Handle' |
(FS => FS'Unrestricted_Access, |
others => <>); |
else |
FS.Free_File_Handles := Result.Next; |
end if; |
return Result; |
end Get_Handle; |
---------------- |
-- Get_Handle -- |
---------------- |
function Get_Handle |
(FS : in out Native_FS_Driver) |
return Directory_Handle_Access |
is |
Result : Directory_Handle_Access := FS.Free_Dir_Handles; |
begin |
if Result = null then |
Result := new Directory_Handle' |
(FS => FS'Unrestricted_Access, |
others => <>); |
else |
FS.Free_Dir_Handles := Result.Next; |
end if; |
return Result; |
end Get_Handle; |
--------------------- |
-- Add_Free_Handle -- |
--------------------- |
procedure Add_Free_Handle |
(FS : in out Native_FS_Driver; |
Handle : in out File_Handle_Access) |
is |
begin |
Handle.Next := FS.Free_File_Handles; |
FS.Free_File_Handles := Handle; |
Handle := null; |
end Add_Free_Handle; |
--------------------- |
-- Add_Free_Handle -- |
--------------------- |
procedure Add_Free_Handle |
(FS : in out Native_FS_Driver; |
Handle : in out Directory_Handle_Access) |
is |
begin |
Handle.Next := FS.Free_Dir_Handles; |
FS.Free_Dir_Handles := Handle; |
Handle := null; |
end Add_Free_Handle; |
------------- |
-- Destroy -- |
------------- |
procedure Destroy (This : in out Native_FS_Driver_Access) is |
procedure Destroy is new Ada.Unchecked_Deallocation |
(Native_FS_Driver, Native_FS_Driver_Access); |
begin |
-- Free all handles |
while This.Free_File_Handles /= null loop |
declare |
H : constant File_Handle_Access := This.Free_File_Handles.Next; |
begin |
Destroy (This.Free_File_Handles); |
This.Free_File_Handles := H; |
Function Definition: procedure Draw_Glyph is new Hershey_Fonts.Draw_Glyph |
Function Body: (Internal_Draw_Line); |
Current : Point := Start; |
begin |
Buffer.Set_Source (Foreground); |
for C of Msg loop |
exit when Current.X > Buffer.Width; |
Draw_Glyph |
(Fnt => Font, |
C => C, |
X => Current.X, |
Y => Current.Y, |
Height => Height, |
Bold => Bold); |
end loop; |
end Draw_String; |
----------------- |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.