anchor.diff:  to_pkts(Buf = #lpdb{},
           Bytes, Fun) when is_integer(Bytes),
                            is_function(Fun, 1) ->
  -    to_pkts(Buf, Bytes, Bytes, Fun);
  -to_pkts(Buf = ?OLDBUF, Bytes, Fun) ->
  -    to_pkts(convert(Buf), Bytes, Fun).
  +    to_pkts(Buf, Bytes, Bytes, Fun).
   
   to_pkts(Buf, BytesTotal, BytesRemaining, Fun)
     when BytesRemaining > 0 ->
  
positive.code:     ].
  
  -endif.
  
  convert({lpdb, Msgs, Max, LossStart, LossCount}) ->
      #lpdb{messages=Msgs,
            max_size=Max,
            size=queue:len(Msgs),
            loss_start=LossStart,
            loss_count=LossCount}.
  
negative.code:                             Size < N -> % Trying to drop all (or more) items in queue
                                  {queue:new(),0}
                           end,
      Buf#lpdb{messages = NewQueue, size=NewSize}.
  
  -ifdef(TEST).
  
  