Index: src/natools-s_expressions-atom_buffers.adb ================================================================== --- src/natools-s_expressions-atom_buffers.adb +++ src/natools-s_expressions-atom_buffers.adb @@ -120,10 +120,16 @@ function Length (Buffer : Atom_Buffer) return Count is begin return Buffer.Used; end Length; + + function Capacity (Buffer : Atom_Buffer) return Count is + begin + return Buffer.Available; + end Capacity; + function Data (Buffer : Atom_Buffer) return Atom is begin if Buffer.Ref.Is_Empty then pragma Assert (Buffer.Available = 0 and Buffer.Used = 0); Index: src/natools-s_expressions-atom_buffers.ads ================================================================== --- src/natools-s_expressions-atom_buffers.ads +++ src/natools-s_expressions-atom_buffers.ads @@ -43,10 +43,11 @@ procedure Invert (Buffer : in out Atom_Buffer); -- Invert the order of bytes (first becomes last, etc) function Length (Buffer : Atom_Buffer) return Count; + function Capacity (Buffer : Atom_Buffer) return Count; function Data (Buffer : Atom_Buffer) return Atom; procedure Query (Buffer : in Atom_Buffer; Process : not null access procedure (Data : in Atom)); procedure Read