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

« back to all changes in this revision

Viewing changes to lib/asn1/src/asn1ct_constructed_ber_bin_v2.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:
1
1
%%
2
2
%% %CopyrightBegin%
3
3
%% 
4
 
%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
 
4
%% Copyright Ericsson AB 2002-2010. All Rights Reserved.
5
5
%% 
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
75
75
            "Val"
76
76
        end,
77
77
 
78
 
    {SeqOrSet,TableConsInfo,CompList} = 
 
78
    {SeqOrSet,TableConsInfo,CompList0} =
79
79
        case D#type.def of
80
80
            #'SEQUENCE'{tablecinf=TCI,components=CL} -> 
81
81
                {'SEQUENCE',TCI,CL};
82
82
            #'SET'{tablecinf=TCI,components=CL} -> 
83
83
                {'SET',TCI,CL}
84
84
        end,
 
85
    %% filter away extensionAdditiongroup markers
 
86
    CompList = filter_complist(CompList0),
85
87
    Ext = extensible(CompList),
86
88
    CompList1 = case CompList of
87
89
                    {Rl1,El,Rl2} -> Rl1 ++ El ++ Rl2;
183
185
    asn1ct_name:start(),
184
186
    asn1ct_name:clear(),
185
187
    asn1ct_name:new(tag),
186
 
    #'SEQUENCE'{tablecinf=TableConsInfo,components=CList} = D#type.def,
 
188
    #'SEQUENCE'{tablecinf=TableConsInfo,components=CList0} = D#type.def,
 
189
 
 
190
    %% filter away extensionAdditiongroup markers
 
191
    CList = filter_complist(CList0),
187
192
    Ext = extensible(CList),
188
193
    {CompList,CompList2} = 
189
194
        case CList of
345
350
    asn1ct_name:clear(),
346
351
%%    asn1ct_name:new(term),
347
352
    asn1ct_name:new(tag),
348
 
    #'SET'{tablecinf=TableConsInfo,components=TCompList} = D#type.def,
 
353
    #'SET'{tablecinf=TableConsInfo,components=TCompList0} = D#type.def,
 
354
    %% filter away extensionAdditiongroup markers
 
355
    TCompList = filter_complist(TCompList0),
349
356
    Ext = extensible(TCompList),
350
357
    ToOptional = fun(mandatory) ->
351
358
                         'OPTIONAL';
1426
1433
    {ext,length(RootList)+1,length(ExtList)};
1427
1434
extensible({_Rl1,_Ext,_Rl2}) ->
1428
1435
    extensible.
 
1436
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
1437
%% filter away ExtensionAdditionGroup start and end marks since these
 
1438
%% have no significance for the BER encoding
 
1439
%%
 
1440
filter_complist(CompList) when is_list(CompList) ->
 
1441
    lists:filter(fun(#'ExtensionAdditionGroup'{}) ->
 
1442
                         false;
 
1443
                    ('ExtensionAdditionGroupEnd') ->
 
1444
                         false;
 
1445
                    (_) ->
 
1446
                         true
 
1447
                 end, CompList);
 
1448
filter_complist({Root,Ext}) ->
 
1449
    {Root,filter_complist(Ext)};
 
1450
filter_complist({Root1,Ext,Root2}) ->
 
1451
    {Root1,filter_complist(Ext),Root2}.
1429
1452
 
1430
1453
 
1431
1454
print_attribute_comment(InnerType,Pos,Cname,Prop) ->