package body FILO.FS is

   C_Part_Length : unsigned_long
   with
      Import         => True,
      Convention     => C,
      External_Name  => "part_length";

   C_File_Max : int
   with
      Import         => True,
      Convention     => C,
      External_Name  => "filemax";

   C_File_Pos : int
   with
      Import         => True,
      Convention     => C,
      External_Name  => "filepos";

   function Part_Len return Partition_Length is (Partition_Length (C_Part_Length));

   function File_Max return File_Length is
   begin
      if C_File_Max < 0 then
         return 0;
      end if;

      return File_Length (C_File_Max);
   end File_Max;

   procedure Set_File_Max (Len : File_Length) is
   begin
      C_File_Max := int (Len);
   end Set_File_Max;

   function File_Pos return File_Offset is
   begin
      if C_File_Pos < 0 then
         return 0;
      end if;

      return File_Offset (C_File_Pos);
   end File_Pos;

   procedure Set_File_Pos (Off : File_Offset) is
   begin
      C_File_Pos := int (Off);
   end Set_File_Pos;

end FILO.FS;
