anchor.diff:           code_change/4]).
   
   -define(SERVER, ?MODULE).
  +-define(EMPTYORDSET, ordsets:new()).
   
   -record(state, {timeout :: pos_integer(),
                   reply_pid :: pid(),
  
positive.code:                 remainder_data :: binary(),
                  free_writers :: ordsets:new(),
                  unacked_writes=ordsets:new(),
                  all_writer_pids :: list(pid())}).
  
  %%%===================================================================
  
negative.code: handle_accept_chunk(NewData, State=#state{buffer_queue=BufferQueue,
                                            remainder_data=RemainderData,
                                            num_bytes_received=PreviousBytesReceived,
                                            content_length=ContentLength}) ->
  
      NewRemainderData = combine_new_and_remainder_data(NewData, RemainderData),
      UpdatedBytesReceived = PreviousBytesReceived + size(NewData),
  
      {NewBufferQueue, NewRemainderData2} =
      data_blocks(NewRemainderData, ContentLength, UpdatedBytesReceived, BufferQueue),
  
      NewStateData = maybe_write_blocks(State#state{buffer_queue=NewBufferQueue,
                                                    remainder_data=NewRemainderData2,
                                                    num_bytes_received=UpdatedBytesReceived}),
      Reply = ok,
      {reply, Reply, not_full, NewStateData}.
  
  %% pattern match on reply_pid=undefined as a sort of
  %% assert
  