anchor.diff:  %%% vim: set ts=4 sts=4 sw=4 et:
   
   -define('TMP_FILENAME', "/tmp/get_implicit_deps.tmp").
  +-define('ATOM_PATTERN', "[a-z]+\\w+").
   
   main([Help]) when Help =:= "?"; Help =:= "-h"; Help =:= "--help"; Help =:= "help" ->
       io:format("Usage:~n$0 <dirname>~n");
  
positive.code: mf2str({M, F}) ->
      atom_to_list(M) ++ ":" ++ atom_to_list(F).
  
  can_apply('MODULE', _) -> true;
  can_apply(application, _) -> true;
  can_apply(erlang, _) -> true;
  can_apply(gen_server, _) -> true;
  can_apply(io, _) -> true;
  can_apply(lists, _) -> true;
  can_apply(proplists, _) -> true;
  can_apply(supervisor, _) -> true;
  can_apply(timer, _) -> true;
  can_apply(M, F) ->
      case can_apply(M, F, [], 10) of
          true ->
              io:format("WARNING: ~s:~s~n function exists.", [M, F]),
              true;
          false -> false
      end.
  
  can_apply(_M, _F, _Args, 0) -> false;
  can_apply(M, F, Args, N) ->
      try
          apply(M, F, Args),
          true
      catch
          error:undef ->
              can_apply(M, F, [undefined | Args], N - 1);
          _:_ ->
              true
      end.
  
negative.code:             [];
          true ->
              {ok, Data} = file:consult(Filename),
              case proplists:get_value(deps, Data) of
                  undefined ->
                      [];
                  Deps ->
                      lists:map(fun({Module, _V, _O}) ->
                          Module
                      end, Deps)
              end
      end.
  
  functions(Data) ->
      Functions = lists:foldl(fun({{Filename, _Fileline} = File, Code}, R) ->
          case re:run(Filename, "\\.erl$", [{capture, all, list}]) of
              {match, _} -> 
                  R ++ case re:run(Code, "(" ++ ?ATOM_PATTERN ++ "):(" ++ ?ATOM_PATTERN ++ ")",
                                              [global, {capture, all, list}]) of
                      {match, Match1} ->
                          [{{M1, F1}, File} || [_, M1, F1] <- Match1];
                      nomatch ->
                          []
                  end     
                  ++ case re:run(Code, "apply\\s*\\(\\s*(" ++ ?ATOM_PATTERN ++ ")\\s*,\\s*(" ++ ?ATOM_PATTERN ++ ")\\s*,",
                                          [global, {capture, all, list}]) of
                      {match, Match2} ->
                          [{{M2, F2}, File} || [_, M2, F2] <- Match2];
                      nomatch ->
  