~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/docbuilder/src/docb_tr_term2html.erl

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
purge_body([{pcdata,_Attrs,_More}|Rest], TermList) ->
40
40
    purge_body(Rest, TermList);
41
41
purge_body([{term,[{"ID","CDATA",ID}],More}|Rest], TermList) ->
42
 
    case lists:keysearch(ID, 1, TermList) of
 
42
    case lists:keyfind(ID, 1, TermList) of
43
43
        false ->
44
44
            [{term,[{"NAME","CDATA",ID},{"ID","CDATA",ID}],More}|
45
45
             purge_body(Rest, TermList)];
46
 
        {value, {ID, Name, _Description, _Responsible}} ->
 
46
        {ID, Name, _Description, _Responsible} ->
47
47
            [{term,[{"NAME","CDATA",Name},{"ID","CDATA",ID}],More}|
48
48
             purge_body(Rest, TermList)];
49
 
        {value, {ID, Name, _Description}} ->
 
49
        {ID, Name, _Description} ->
50
50
            [{term,[{"NAME","CDATA",Name},{"ID","CDATA",ID}],More}|
51
51
             purge_body(Rest, TermList)]
52
52
    end;
53
53
purge_body([{_Tag,_Attrs,More}|Rest], TermList) ->
54
 
    lists:append(purge_body(More, TermList),
55
 
                 purge_body(Rest, TermList)).
 
54
    purge_body(More, TermList) ++ purge_body(Rest, TermList).
56
55
 
57
56
rule([header|_], _) ->
58
57
    {drop, ""};
59
 
 
60
58
rule(_, _) ->
61
59
    {drop, ""}.
62
60
 
82
80
                   false -> [];
83
81
                   Value  -> Value
84
82
               end,
85
 
    case lists:keysearch(ID, 1, TermList) of
 
83
    case lists:keyfind(ID, 1, TermList) of
86
84
        false ->
87
85
            {{drop,"\n<dt><a name=\"" ++ ID ++ "\">" ++ 
88
86
              "<strong>" ++ ID ++ "</strong></a>\n</dt>\n<dd>" ++
89
87
              docb_html_util:pcdata_to_html(Def) ++ "\n</dd>\n"}, Opts};
90
 
        {value, {ID, Name, Description, _Responsible}} ->
 
88
        {ID, Name, Description, _Responsible} ->
91
89
            docb_util:message(warning,
92
90
                              "Global term ~s overriding local", [ID]),
93
91
            {{drop,"\n<dt><a name=\"" ++ ID ++ "\">" ++
94
92
              "<strong>" ++ Name ++ "</strong></a></dt>\n<dd>" ++
95
93
              docb_html_util:pcdata_to_html(Description) ++ "\n</dd>\n"},
96
94
             Opts};
97
 
        {value, {ID, Name, Description}} ->
 
95
        {ID, Name, Description} ->
98
96
            docb_util:message(warning,
99
97
                              "Global term ~s overriding local", [ID]),
100
98
            {{drop, "\n<dt><a name=\"" ++ ID ++ "\">" ++ 
107
105
                   false -> [];
108
106
                   Value  -> Value
109
107
               end,
110
 
    case lists:keysearch(ID, 1, TermList) of
 
108
    case lists:keyfind(ID, 1, TermList) of
111
109
        false ->
112
110
            docb_util:message(error,
113
111
                              "The term ~s has no definition", [ID]),
114
112
            {{drop, "\n<dt><a name=\"" ++ ID ++ "\">" ++ 
115
113
              "<strong>" ++ ID ++ "</strong></a></dt>\n<dd>" ++
116
114
              "??" ++ "\n</dd>\n"}, Opts};
117
 
        {value, {ID, Name, Description, _Responsible}} ->
 
115
        {ID, Name, Description, _Responsible} ->
118
116
            {{drop, "\n<dt><a name=\"" ++ ID ++ "\">" ++
119
117
              "<strong>" ++ Name ++ "</strong></a></dt>\n<dd>" ++
120
118
              docb_html_util:pcdata_to_html(Description) ++ "\n</dd>\n"},
121
119
             Opts};
122
 
        {value, {ID, Name, Description}} ->
 
120
        {ID, Name, Description} ->
123
121
            {{drop, "\n<dt><a name=\"" ++ ID ++ "\">" ++ 
124
122
              "<strong>" ++ Name ++ "</strong></a></dt>\n<dd>" ++
125
123
              docb_html_util:pcdata_to_html(Description) ++ "\n</dd>\n"}, Opts}