~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/tools/src/xref_utils.erl

  • Committer: Bazaar Package Importer
  • Author(s): Erlang Packagers, Sergei Golovan
  • Date: 2006-12-03 17:07:44 UTC
  • mfrom: (2.1.11 feisty)
  • Revision ID: james.westby@ubuntu.com-20061203170744-rghjwupacqlzs6kv
Tags: 1:11.b.2-4
[ Sergei Golovan ]
Fixed erlang-base and erlang-base-hipe prerm scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
-export([predefined_functions/0, is_funfun/3, is_builtin/3]).
33
33
 
 
34
-export([is_static_function/2]).
 
35
 
34
36
-export([closure/1, components/1, condensation/1, path/2, use/2, call/2]).
35
37
 
36
38
-export([regexpr/2]).
345
347
is_builtin(M, F, A) ->
346
348
    erlang:is_builtin(M, F, A).
347
349
 
 
350
%% A "static function" is a function in an abstract module that may be
 
351
%% called directly.
 
352
is_static_function(module_info, 0) ->
 
353
    true;
 
354
is_static_function(module_info, 1) ->
 
355
    true;
 
356
is_static_function(new, _) ->
 
357
    true;
 
358
is_static_function(_F, _A) ->
 
359
    false.
 
360
 
348
361
%%% The following functions implement some of the operators recognized
349
362
%%% in xref_compiler.erl.
350
363
 
430
443
        preloaded ->
431
444
            {_M, _Bin, File} = code:get_object_code(Module),
432
445
            {ok, File};
433
 
        interpreted ->
434
 
            error({interpreted, Module});
435
446
        cover_compiled ->
436
447
            error({cover_compiled, Module});
437
448
        File ->
541
552
    true = string:len(V) > 0,
542
553
    VsnT = string:tokens(V, "."),
543
554
    ApplName = string:sub_string(File, 1, Pos-1),
544
 
    Vsn = map({erlang,list_to_integer}, VsnT),
 
555
    Vsn = map(fun erlang:list_to_integer/1, VsnT),
545
556
    {list_to_atom(ApplName),Vsn}.
546
557
 
547
558
find_files_dir(Dir, Recurse, Collect, Watch, L) ->