anchor.diff:      ok;
   error_info(Reason, Name, Msg, State, Debug) ->
       Reason1 = 
  -	case Reason of
  -	    {undef,[{M,F,A,L}|MFAs]} ->
  -		case code:is_loaded(M) of
  -		    false ->
  -			{'module could not be loaded',[{M,F,A,L}|MFAs]};
  -		    _ ->
  -			case erlang:function_exported(M, F, length(A)) of
  -			    true ->
  -				Reason;
  -			    false ->
  -				{'function not exported',[{M,F,A,L}|MFAs]}
  -			end
  -		end;
  -	    _ ->
  -		Reason
  -	end,    
  +    case Reason of
  +        {undef,[{M,F,A,L}|MFAs]} ->
  +        case code:is_loaded(M) of
  +            false ->
  +            {'module could not be loaded',[{M,F,A,L}|MFAs]};
  +            _ ->
  +            case erlang:function_exported(M, F, length(A)) of
  +                true ->
  +                Reason;
  +                false ->
  +                {'function not exported',[{M,F,A,L}|MFAs]}
  +            end
  +        end;
  +        _ ->
  +        Reason
  +    end,    
       format("** Generic server ~p terminating \n"
              "** Last message in was ~p~n"
              "** When Server state == ~p~n"
              "** Reason for termination == ~n** ~p~n",
  -	   [Name, Msg, State, Reason1]),
  +        [Name, Msg, State, Reason1]),
       sys:print_log(Debug),
       ok.
   
  
positive.code: 
  debug_options(Name, Opts) ->
      case opt(debug, Opts) of
  	{ok, Options} -> dbg_options(Name, Options);
  	_ -> dbg_options(Name, [])
      end.
  
  dbg_options(Name, []) ->
      Opts = 
  	case init:get_argument(generic_debug) of
  	    error ->
  		[];
  	    _ ->
  		[log, statistics]
  	end,
      dbg_opts(Name, Opts);
  dbg_options(Name, Opts) ->
      dbg_opts(Name, Opts).
  
  dbg_opts(Name, Opts) ->
      case catch sys:debug_options(Opts) of
  	{'EXIT',_} ->
  	    format("~p: ignoring erroneous debug options - ~p~n",
  		   [Name, Opts]),
  	    [];
  	Dbg ->
  	    Dbg
      end.
  
  get_proc_name(Pid) when is_pid(Pid) ->
      Pid;
  get_proc_name({local, Name}) ->
      case process_info(self(), registered_name) of
  	{registered_name, Name} ->
  	    Name;
  	{registered_name, _Name} ->
  	    exit(process_not_registered);
  	[] ->
  	    exit(process_not_registered)
      end;    
  get_proc_name({global, Name}) ->
      case global:whereis_name(Name) of
  	undefined ->
  	    exit(process_not_registered_globally);
  	Pid when Pid =:= self() ->
  	    Name;
  	_Pid ->
  	    exit(process_not_registered_globally)
      end;
  get_proc_name({via, Mod, Name}) ->
      case Mod:whereis_name(Name) of
  	undefined ->
  	    exit({process_not_registered_via, Mod});
  	Pid when Pid =:= self() ->
  	    Name;
  	_Pid ->
  	    exit({process_not_registered_via, Mod})
      end.
  
  get_parent() ->
      case get('$ancestors') of
  	[Parent | _] when is_pid(Parent)->
              Parent;
          [Parent | _] when is_atom(Parent)->
              name_to_pid(Parent);
  	_ ->
  	    exit(process_was_not_started_by_proc_lib)
      end.
  
  name_to_pid(Name) ->
      case whereis(Name) of
  	undefined ->
  	    case global:whereis_name(Name) of
  		undefined ->
  		    exit(could_not_find_registered_name);
  		Pid ->
  		    Pid
  	    end;
  	Pid ->
  	    Pid
      end.
  
  %%-----------------------------------------------------------------
  
negative.code: 
  terminate(Reason, Name, Msg, Mod, State, Debug) ->
      case catch Mod:terminate(Reason, State) of
      {'EXIT', R} ->
          error_info(R, Name, Msg, State, Debug),
          exit(R);
      _ ->
          case Reason of
          normal ->
              exit(normal);
          shutdown ->
              exit(shutdown);
          {shutdown,_}=Shutdown ->
              exit(Shutdown);
          _ ->
              FmtState =
              case erlang:function_exported(Mod, format_status, 2) of
                  true ->
                  Args = [get(), State],
                  case catch Mod:format_status(terminate, Args) of
                      {'EXIT', _} -> State;
                      Else -> Else
                  end;
                  _ ->
                  State
              end,
              error_info(Reason, Name, Msg, FmtState, Debug),
              exit(Reason)
          end
      end.
  
  error_info(_Reason, application_controller, _Msg, _State, _Debug) ->
  