diff --git a/tests/42-real-life-OK.asn1.-PR b/tests/42-real-life-OK.asn1.-PR index ca84dcb7b1fe5682663471072b9a9cb826c32f31..3fc023ad0a9ce532bcee3daddb849c7ae0e79748 100644 --- a/tests/42-real-life-OK.asn1.-PR +++ b/tests/42-real-life-OK.asn1.-PR @@ -1,16 +1,14 @@ -/*** <<< DEPS [LogLine] >>> ***/ +/*** <<< INCLUDES [LogLine] >>> ***/ -/* Dependencies for LogLine */ #include <IA5String.h> - -/* Dependencies for varsets */ #include <VariablePartSet.h> #include <asn_SEQUENCE_OF.h> - - #include <constr_SEQUENCE_OF.h> +#include <constr_SEQUENCE_OF.h> #include <constr_SEQUENCE.h> +/*** <<< DEPS [LogLine] >>> ***/ + extern asn1_TYPE_descriptor_t asn1_DEF_LogLine; /*** <<< TYPE-DECLS [LogLine] >>> ***/ @@ -63,8 +61,6 @@ typedef struct LogLine { &asn1_DEF_varsets_specs /* Additional specs */ }; -#include <constr_SEQUENCE.h> - static asn1_SEQUENCE_element_t asn1_DEF_LogLine_elements[] = { { offsetof(struct LogLine, line_digest), 0, (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), @@ -113,18 +109,16 @@ asn1_TYPE_descriptor_t asn1_DEF_LogLine = { }; -/*** <<< DEPS [VariablePartSet] >>> ***/ +/*** <<< INCLUDES [VariablePartSet] >>> ***/ -/* Dependencies for VariablePartSet */ #include <ActionItem.h> - -/* Dependencies for vparts */ #include <VariablePart.h> #include <asn_SEQUENCE_OF.h> - - #include <constr_SEQUENCE_OF.h> +#include <constr_SEQUENCE_OF.h> #include <constr_SEQUENCE.h> +/*** <<< DEPS [VariablePartSet] >>> ***/ + extern asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet; /*** <<< TYPE-DECLS [VariablePartSet] >>> ***/ @@ -177,8 +171,6 @@ typedef struct VariablePartSet { &asn1_DEF_vparts_specs /* Additional specs */ }; -#include <constr_SEQUENCE.h> - static asn1_SEQUENCE_element_t asn1_DEF_VariablePartSet_elements[] = { { offsetof(struct VariablePartSet, vparts), 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), @@ -227,32 +219,29 @@ asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet = { }; -/*** <<< DEPS [VariablePart] >>> ***/ - +/*** <<< INCLUDES [VariablePart] >>> ***/ -/* Dependencies for vset */ #include <VisibleString.h> #include <asn_SET_OF.h> +#include <constr_SET_OF.h> +#include <constr_SEQUENCE.h> +#include <constr_CHOICE.h> - #include <constr_SET_OF.h> - -/* Dependencies for vrange */ -#include <VisibleString.h> -#include <VisibleString.h> +/*** <<< DEPS [VariablePart] >>> ***/ - #include <constr_SEQUENCE.h> - +typedef enum VariablePart_PR { + VariablePart_PR_NOTHING, /* No components present */ + VariablePart_PR_vset, + VariablePart_PR_vrange, + /* Extensions may appear below */ +} VariablePart_PR_e; extern asn1_TYPE_descriptor_t asn1_DEF_VariablePart; /*** <<< TYPE-DECLS [VariablePart] >>> ***/ typedef struct VariablePart { - enum { - VariablePart_PR_NOTHING, /* No components present */ - VariablePart_PR_vset, - VariablePart_PR_vrange, - } present; + VariablePart_PR_e present; union { struct vset { A_SET_OF(VisibleString_t) list; @@ -311,8 +300,6 @@ typedef struct VariablePart { &asn1_DEF_vset_specs /* Additional specs */ }; - #include <constr_SEQUENCE.h> - static asn1_SEQUENCE_element_t asn1_DEF_vrange_elements[] = { { offsetof(struct vrange, from), 0, (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), @@ -360,8 +347,6 @@ typedef struct VariablePart { &asn1_DEF_vrange_specs /* Additional specs */ }; -#include <constr_CHOICE.h> - static asn1_CHOICE_element_t asn1_DEF_VariablePart_elements[] = { { offsetof(struct VariablePart, choice.vset), 0, (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), @@ -411,10 +396,16 @@ asn1_TYPE_descriptor_t asn1_DEF_VariablePart = { }; -/*** <<< DEPS [ActionItem] >>> ***/ +/*** <<< INCLUDES [ActionItem] >>> ***/ -/* Dependencies for ActionItem */ #include <ENUMERATED.h> +#include <BOOLEAN.h> +#include <VisibleString.h> +#include <asn_SET_OF.h> +#include <constr_SET_OF.h> +#include <constr_SEQUENCE.h> + +/*** <<< DEPS [ActionItem] >>> ***/ typedef enum accept_as { accept_as_unknown = 0, @@ -424,19 +415,6 @@ asn1_TYPE_descriptor_t asn1_DEF_VariablePart = { * Enumeration is extensible */ } accept_as_e; -/* Dependencies for notify */ -#include <BOOLEAN.h> - -/* Dependencies for email */ -#include <VisibleString.h> -#include <asn_SET_OF.h> - - #include <constr_SET_OF.h> - - #include <constr_SEQUENCE.h> - -#include <constr_SEQUENCE.h> - extern asn1_TYPE_descriptor_t asn1_DEF_ActionItem; /*** <<< TYPE-DECLS [ActionItem] >>> ***/ @@ -499,8 +477,6 @@ typedef struct ActionItem { &asn1_DEF_email_specs /* Additional specs */ }; - #include <constr_SEQUENCE.h> - static asn1_SEQUENCE_element_t asn1_DEF_notify_elements[] = { { offsetof(struct notify, critical), 0, (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), @@ -548,8 +524,6 @@ typedef struct ActionItem { &asn1_DEF_notify_specs /* Additional specs */ }; -#include <constr_SEQUENCE.h> - static asn1_SEQUENCE_element_t asn1_DEF_ActionItem_elements[] = { { offsetof(struct ActionItem, accept_as), 0, (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), diff --git a/tests/44-choice-in-sequence-OK.asn1.-P b/tests/44-choice-in-sequence-OK.asn1.-P index 6cab701cfbe273d2a3148552e1016718b217d2f7..03f46ee64497e50f36fa2a014be2975b63394ce7 100644 --- a/tests/44-choice-in-sequence-OK.asn1.-P +++ b/tests/44-choice-in-sequence-OK.asn1.-P @@ -1,23 +1,29 @@ -/*** <<< DEPS [T] >>> ***/ - -/* Dependencies for T */ -#include <NULL.h> - -/* Dependencies for b */ -#include <NULL.h> -#include <NULL.h> - -/* Dependencies for e */ -#include <NULL.h> -#include <NULL.h> +/*** <<< INCLUDES [T] >>> ***/ -/* Dependencies for h */ #include <NULL.h> -#include <NULL.h> - +#include <constr_CHOICE.h> #include <constr_SEQUENCE.h> +/*** <<< DEPS [T] >>> ***/ + + typedef enum b_PR { + b_PR_NOTHING, /* No components present */ + b_PR_c, + b_PR_d, + b_PR_e, + b_PR_h, + } b_PR_e; + typedef enum e_PR { + e_PR_NOTHING, /* No components present */ + e_PR_f, + e_PR_g, + } e_PR_e; + typedef enum h_PR { + h_PR_NOTHING, /* No components present */ + h_PR_i, + h_PR_j, + } h_PR_e; extern asn1_TYPE_descriptor_t asn1_DEF_T; /*** <<< TYPE-DECLS [T] >>> ***/ @@ -26,22 +32,12 @@ extern asn1_TYPE_descriptor_t asn1_DEF_T; typedef struct T { NULL_t a; struct b { - enum { - b_PR_NOTHING, /* No components present */ - b_PR_c, - b_PR_d, - b_PR_e, - b_PR_h, - } present; + b_PR_e present; union { NULL_t c; NULL_t d; struct e { - enum { - e_PR_NOTHING, /* No components present */ - e_PR_f, - e_PR_g, - } present; + e_PR_e present; union { NULL_t f; NULL_t g; @@ -51,11 +47,7 @@ typedef struct T { ber_dec_ctx_t _ber_dec_ctx; } e; struct h { - enum { - h_PR_NOTHING, /* No components present */ - h_PR_i, - h_PR_j, - } present; + h_PR_e present; union { NULL_t i; NULL_t j; @@ -76,8 +68,6 @@ typedef struct T { /*** <<< STAT-DEFS [T] >>> ***/ - #include <constr_CHOICE.h> - static asn1_CHOICE_element_t asn1_DEF_e_elements[] = { { offsetof(struct e, choice.f), 0, (ASN_TAG_CLASS_PRIVATE | (7 << 2)), @@ -125,8 +115,6 @@ typedef struct T { &asn1_DEF_e_specs /* Additional specs */ }; - #include <constr_CHOICE.h> - static asn1_CHOICE_element_t asn1_DEF_h_elements[] = { { offsetof(struct h, choice.i), 0, (ASN_TAG_CLASS_PRIVATE | (1 << 2)), @@ -174,8 +162,6 @@ typedef struct T { &asn1_DEF_h_specs /* Additional specs */ }; - #include <constr_CHOICE.h> - static asn1_CHOICE_element_t asn1_DEF_b_elements[] = { { offsetof(struct b, choice.c), 0, (ASN_TAG_CLASS_PRIVATE | (5 << 2)), @@ -238,8 +224,6 @@ typedef struct T { &asn1_DEF_b_specs /* Additional specs */ }; -#include <constr_SEQUENCE.h> - static asn1_SEQUENCE_element_t asn1_DEF_T_elements[] = { { offsetof(struct T, a), 0, (ASN_TAG_CLASS_PRIVATE | (2 << 2)), diff --git a/tests/46-redefine-OK.asn1.-PR b/tests/46-redefine-OK.asn1.-PR index 2fc1e4dd311e40a2a99d191a3c196c52afe50fd8..31f6a8ec48ccc3a94ed090d81221921b776bb5ee 100644 --- a/tests/46-redefine-OK.asn1.-PR +++ b/tests/46-redefine-OK.asn1.-PR @@ -1,5 +1,5 @@ -/*** <<< DEPS [PrimitiveType] >>> ***/ +/*** <<< INCLUDES [PrimitiveType] >>> ***/ #include <OCTET_STRING.h> @@ -94,13 +94,13 @@ PrimitiveType_free(asn1_TYPE_descriptor_t *td, } -/*** <<< DEPS [ConstructedType] >>> ***/ +/*** <<< INCLUDES [ConstructedType] >>> ***/ -/* Dependencies for ConstructedType */ #include <PrimitiveType.h> - #include <constr_SEQUENCE.h> +/*** <<< DEPS [ConstructedType] >>> ***/ + extern asn1_TYPE_descriptor_t asn1_DEF_ConstructedType; /*** <<< TYPE-DECLS [ConstructedType] >>> ***/ @@ -115,8 +115,6 @@ typedef struct ConstructedType { /*** <<< STAT-DEFS [ConstructedType] >>> ***/ -#include <constr_SEQUENCE.h> - static asn1_SEQUENCE_element_t asn1_DEF_ConstructedType_elements[] = { { offsetof(struct ConstructedType, field), 0, (ASN_TAG_CLASS_CONTEXT | (5 << 2)), @@ -158,7 +156,7 @@ asn1_TYPE_descriptor_t asn1_DEF_ConstructedType = { }; -/*** <<< DEPS [T] >>> ***/ +/*** <<< INCLUDES [T] >>> ***/ #include <ConstructedType.h> diff --git a/tests/47-set-ext-OK.asn1.-P b/tests/47-set-ext-OK.asn1.-P index 69a7dedbee3d1c0456a37cc17bb9213bfbf26fbd..a3d1096e4aaa7159855e98861a0ed5318c6241f1 100644 --- a/tests/47-set-ext-OK.asn1.-P +++ b/tests/47-set-ext-OK.asn1.-P @@ -1,8 +1,10 @@ -/*** <<< DEPS [T1] >>> ***/ +/*** <<< INCLUDES [T1] >>> ***/ -/* Dependencies for T1 */ #include <INTEGER.h> +#include <constr_SET.h> + +/*** <<< DEPS [T1] >>> ***/ /* @@ -11,8 +13,6 @@ enum T1_PR_e { T1_PR_i, /* Member i is present */ }; -#include <constr_SET.h> - extern asn1_TYPE_descriptor_t asn1_DEF_T1; /*** <<< TYPE-DECLS [T1] >>> ***/ @@ -35,8 +35,6 @@ typedef struct T1 { /*** <<< STAT-DEFS [T1] >>> ***/ -#include <constr_SET.h> - static asn1_SET_element_t asn1_DEF_T1_elements[] = { { offsetof(struct T1, i), 0, (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), @@ -82,10 +80,12 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = { }; -/*** <<< DEPS [T2] >>> ***/ +/*** <<< INCLUDES [T2] >>> ***/ -/* Dependencies for T2 */ #include <INTEGER.h> +#include <constr_SET.h> + +/*** <<< DEPS [T2] >>> ***/ /* @@ -94,8 +94,6 @@ asn1_TYPE_descriptor_t asn1_DEF_T1 = { enum T2_PR_e { T2_PR_i, /* Member i is present */ }; -#include <constr_SET.h> - extern asn1_TYPE_descriptor_t asn1_DEF_T2; /*** <<< TYPE-DECLS [T2] >>> ***/ @@ -118,8 +116,6 @@ typedef struct T2 { /*** <<< STAT-DEFS [T2] >>> ***/ -#include <constr_SET.h> - static asn1_SET_element_t asn1_DEF_T2_elements[] = { { offsetof(struct T2, i), 0, (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), @@ -165,21 +161,25 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = { }; -/*** <<< DEPS [T3] >>> ***/ +/*** <<< INCLUDES [T3] >>> ***/ -/* Dependencies for T3 */ #include <INTEGER.h> +#include <constr_CHOICE.h> +/*** <<< DEPS [T3] >>> ***/ + +typedef enum T3_PR { + T3_PR_NOTHING, /* No components present */ + T3_PR_i, + /* Extensions may appear below */ +} T3_PR_e; extern asn1_TYPE_descriptor_t asn1_DEF_T3; /*** <<< TYPE-DECLS [T3] >>> ***/ typedef struct T3 { - enum { - T3_PR_NOTHING, /* No components present */ - T3_PR_i, - } present; + T3_PR_e present; union { INTEGER_t i; /* @@ -194,8 +194,6 @@ typedef struct T3 { /*** <<< STAT-DEFS [T3] >>> ***/ -#include <constr_CHOICE.h> - static asn1_CHOICE_element_t asn1_DEF_T3_elements[] = { { offsetof(struct T3, choice.i), 0, (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), @@ -238,21 +236,25 @@ asn1_TYPE_descriptor_t asn1_DEF_T3 = { }; -/*** <<< DEPS [T4] >>> ***/ +/*** <<< INCLUDES [T4] >>> ***/ -/* Dependencies for T4 */ #include <INTEGER.h> +#include <constr_CHOICE.h> +/*** <<< DEPS [T4] >>> ***/ + +typedef enum T4_PR { + T4_PR_NOTHING, /* No components present */ + T4_PR_i, + /* Extensions may appear below */ +} T4_PR_e; extern asn1_TYPE_descriptor_t asn1_DEF_T4; /*** <<< TYPE-DECLS [T4] >>> ***/ typedef struct T4 { - enum { - T4_PR_NOTHING, /* No components present */ - T4_PR_i, - } present; + T4_PR_e present; union { INTEGER_t i; /* @@ -267,8 +269,6 @@ typedef struct T4 { /*** <<< STAT-DEFS [T4] >>> ***/ -#include <constr_CHOICE.h> - static asn1_CHOICE_element_t asn1_DEF_T4_elements[] = { { offsetof(struct T4, choice.i), 0, (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),