anchor.diff:  -define(tail_eof(Bin,Offset), {Bin,Offset,eof}).
   -define(state(Acc,Tail),      {Acc,Tail}).
   
  --define(log(T),error_logger:info_report(
  -                 [process_info(self(),current_function),{line,?LINE},T])).
  +-define(log(T),
  +        error_logger:info_report(
  +          [process_info(self(),current_function),{line,?LINE}]++T)).
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %%% the API
  
positive.code: sax_f(Fun) ->
    fun(RawXML,O) -> 
        try [erlsom:sax(encoding(RawXML),[],sax_if(Fun))|O]
        catch error:R -> ?log([{erlang:get_stacktrace(),RawXML}]),exit(R)
        end
    end.
  
  
negative.code: %%% implementation
  fold(eof,_,Fun,Chunker,State) ->
    ?state(Acc,Tail) = folder(Chunker,Fun,state_eof(State)),
    [?log([{trailing,Tail}]) || not is_empty(Tail)],
    Acc;
  fold({ok,Chunk},FD,Fun,Chunker,State) -> 
    fold(read(FD),FD,Fun,Chunker,folder(Chunker,Fun,add_chunk(Chunk,State))).
  