anchor.diff:      %% Return the top directory containing examples/code.
       Top.
   
  -find_files(Dir, RE) ->
  -    filelib:fold_files(Dir, RE, false, fun cons/2, []).
  -
  -cons(H,T) ->
  -    [H|T].
  +find_files(Dirs, RE) ->
  +    lists:foldl(fun(D,A) -> fold_files(D, RE, A) end,
  +                orddict:new(),
  +                Dirs).
  +
  +fold_files(Dir, RE, Acc) ->
  +    filelib:fold_files(Dir, RE, false, fun store/2, Acc).
  +
  +store(Path, Dict) ->
  +    orddict:store(filename:basename(Path), Path, Dict).
   
   %% ===========================================================================
   
  
positive.code: %%
  %% Compile example dictionaries in examples/dict.
  
  -define(EXAMPLES, [rfc4004_mip,
                     rfc4005_nas,
                     rfc4006_cc,
                     rfc4072_eap,
                     rfc4590_digest,
                     rfc4740_sip]).
  
  dict() ->
      [{timetrap, {minutes, length(?EXAMPLES)}}].
  
  dict(_Config) ->
      Dir = filename:join([code:lib_dir(diameter, examples), "dict"]),
      [] = [RC || D <- ?EXAMPLES,
                  RC <- [dict(atom_to_list(D), Dir)],
                  RC /= ok].
  
  dict(Dict, Dir) ->
      {Name, Pre} = make_name(Dict),
      try
          ok = make(filename:join([Dir, Dict ++ ".dia"]),
                    [{name, Name},
                     {prefix, Pre},
                     inherits("rfc3588_base")
                     | opts(Dict)]),
          ok = compile(Name)
      catch
          throw: {_,_} = E ->
  
negative.code:     true = code:del_path(Ebin),
      Top = top(Dir, code:lib_dir(diameter)),
  
      %% Create a new diameter/include in priv_dir. Copy all includes
      %% there, from below ../include and ../src/gen if they exist (in
      %% the repo).
      Tmp = filename:join([PrivDir, "diameter"]),
      TmpInc = filename:join([PrivDir, "diameter", "include"]),
      TmpEbin = filename:join([PrivDir, "diameter", "ebin"]),
  