anchor.diff:  
   handle_call(_Query, State) -> {ok, {error, bad_query}, State}.
   
  -% unfortunately, we can't unlink from User - links are not counted!
  -%    if pid(User) -> unlink(User); true -> ok end,
   terminate(install_prev, _State) ->
       [];
  -terminate(_Reason, {_User, PrevHandler}) ->
  +terminate(_Reason, #st{prev_handler=PrevHandler}) ->
       {error_logger_tty_h, PrevHandler}.
   
   code_change(_OldVsn, State, _Extra) ->
       {ok, State}.
  +
  +%% Exported (but unoffical) API.
  +write_event(Event, IoMod) ->
  +    do_write_event(#st{io_mod=IoMod}, Event).
  +
   
   %%% ------------------------------------------------------
   %%% Misc. functions.
  
positive.code: 
  -export([write_event/2]).
  
  %% This one is used when we takeover from the simple error_logger.
  init({[], {error_logger, Buf}}) ->
      User = set_group_leader(),
      write_events(Buf,io),
      {ok, {User, error_logger}};
  %% This one is used if someone took over from us, and now wants to
  %% go back.
  init({[], {error_logger_tty_h, PrevHandler}}) ->
      User = set_group_leader(),
      {ok, {User, PrevHandler}};
  %% This one is used when we are started directly.
  init([]) ->
      User = set_group_leader(),
      {ok, {User, []}}.
      
  handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
      {ok, State};
  handle_event(Event, State) ->
      ok = write_event(tag_event(Event),io),
      {ok, State}.
  
  handle_info({'EXIT', User, _Reason}, {User, PrevHandler}) ->
      case PrevHandler of
  	[] ->
  	    remove_handler;
  	_ -> 
  	    {swap_handler, install_prev, {User, PrevHandler}, 
  	     PrevHandler, go_back}
      end;
  handle_info(_, State) ->
  
negative.code: maybe_utc(Time, true) -> {utc, Time};
  maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}.
  
  format_term(Term) when is_list(Term) ->
      case string_p(Term) of
  	true ->
  	    [{"~s\n",[Term]}];
  	false ->
  	    format_term_list(Term)
      end;
  format_term(Term) ->
      [{"~p\n",[Term]}].
  
  format_term_list([{Tag,Data}|T]) ->
      [{"    ~p: ~p\n",[Tag,Data]}|format_term_list(T)];
  format_term_list([Data|T]) ->
      [{"    ~p\n",[Data]}|format_term_list(T)];
  format_term_list([]) ->
      [];
  format_term_list(_) ->
      %% Continue to allow non-proper lists for now.
      %% FIXME: Remove this clause in OTP 19.
      [].
  
  string_p([]) ->
      false;
  