~ubuntu-branches/ubuntu/karmic/erlang/karmic-security

« back to all changes in this revision

Viewing changes to lib/syntax_tools/src/erl_tidy.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-06-11 12:18:07 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090611121807-ks7eb4xrt7dsysgx
Tags: 1:13.b.1-dfsg-1
* New upstream release.
* Removed unnecessary dependency of erlang-os-mon on erlang-observer and
  erlang-tools and added missing dependency of erlang-nox on erlang-os-mon
  (closes: #529512).
* Removed a patch to eunit application because the bug was fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
675
675
 
676
676
-spec get_module_name([info_pair()], string()) -> atom().
677
677
get_module_name(List, File) ->
678
 
    case lists:keysearch(module, 1, List) of
679
 
        {value, {module, M}} ->
 
678
    case lists:keyfind(module, 1, List) of
 
679
        {module, M} ->
680
680
            M;
681
681
        _ ->
682
682
            report_error({File, 0,
685
685
    end.
686
686
 
687
687
get_module_attributes(List) ->
688
 
    case lists:keysearch(attributes, 1, List) of
689
 
        {value, {attributes, As}} ->
 
688
    case lists:keyfind(attributes, 1, List) of
 
689
        {attributes, As} ->
690
690
            As;
691
691
        _ ->
692
692
            []
694
694
 
695
695
-spec get_module_exports([info_pair()]) -> [{atom(), byte()}].
696
696
get_module_exports(List) ->
697
 
    case lists:keysearch(exports, 1, List) of
698
 
        {value, {exports, Es}} ->
 
697
    case lists:keyfind(exports, 1, List) of
 
698
        {exports, Es} ->
699
699
            Es;
700
700
        _ ->
701
701
            []
703
703
 
704
704
-spec get_module_imports([info_pair()]) -> [{atom(), atom()}].
705
705
get_module_imports(List) ->
706
 
    case lists:keysearch(imports, 1, List) of
707
 
        {value, {imports, Is}} ->
 
706
    case lists:keyfind(imports, 1, List) of
 
707
        {imports, Is} ->
708
708
            flatten_imports(Is);
709
709
        _ ->
710
710
            []
1799
1799
    exit(error).
1800
1800
 
1801
1801
get_env(Tree) ->
1802
 
    case lists:keysearch(env, 1, erl_syntax:get_ann(Tree)) of
1803
 
        {value, {env, Env}} ->
 
1802
    case lists:keyfind(env, 1, erl_syntax:get_ann(Tree)) of
 
1803
        {env, Env} ->
1804
1804
            Env;
1805
1805
        _ ->
1806
1806
            []