diff options
author | Björn Gustavsson <[email protected]> | 2013-01-22 13:12:20 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-01-23 15:22:56 +0100 |
commit | 26182a5c8cf96fa6d255e23a6d4cd0d2c5248a69 (patch) | |
tree | 17b5b35cc2d201a6bd22348e58d80d3ad1352ef5 /lib | |
parent | 79c59e5d6199ca3410d97aac47bac3be4f5d3089 (diff) | |
download | otp-26182a5c8cf96fa6d255e23a6d4cd0d2c5248a69.tar.gz otp-26182a5c8cf96fa6d255e23a6d4cd0d2c5248a69.tar.bz2 otp-26182a5c8cf96fa6d255e23a6d4cd0d2c5248a69.zip |
Share all code for dec_gen_prim/3 between per/uper back-ends
Diffstat (limited to 'lib')
-rw-r--r-- | lib/asn1/src/asn1ct_gen_per_rt2ct.erl | 81 |
1 files changed, 2 insertions, 79 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per_rt2ct.erl b/lib/asn1/src/asn1ct_gen_per_rt2ct.erl index b6be3a1a8f..e39af78147 100644 --- a/lib/asn1/src/asn1ct_gen_per_rt2ct.erl +++ b/lib/asn1/src/asn1ct_gen_per_rt2ct.erl @@ -1366,85 +1366,8 @@ gen_decode_user(Erules,D) when is_record(D,typedef) -> -gen_dec_prim(Erules,Att,BytesVar) -> - Typename = Att#type.def, - case Typename of - 'INTEGER' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - {'INTEGER',_NamedNumberList} -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - 'REAL' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - {'BIT STRING',_} -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - 'NULL' -> - emit({"{'NULL',",BytesVar,"}"}); - 'OBJECT IDENTIFIER' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - 'RELATIVE-OID' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - 'ObjectDescriptor' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - {'ENUMERATED',_} -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - 'BOOLEAN'-> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'OCTET STRING' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'NumericString' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - TString when TString == 'TeletexString'; - TString == 'T61String' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'VideotexString' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'UTCTime' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'GeneralizedTime' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'GraphicString' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'VisibleString' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'GeneralString' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'PrintableString' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - 'IA5String' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'BMPString' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'UniversalString' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - - 'UTF8String' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - 'ANY' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - 'ASN1_OPEN_TYPE' -> - asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); - #'ObjectClassFieldType'{} -> - case asn1ct_gen:get_inner(Att#type.def) of - {fixedtypevaluefield,_,InnerType} -> - gen_dec_prim(Erules,InnerType,BytesVar); - T -> - gen_dec_prim(Erules,Att#type{def=T},BytesVar) - end; - Other -> - exit({'cant decode' ,Other}) - end. +gen_dec_prim(Erules, Att, BytesVar) -> + asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar). %% For PER the ExtensionAdditionGroup notation has significance for the encoding and decoding %% the components within the ExtensionAdditionGroup is treated in a similar way as if they |