diff --git a/libasn1compiler/asn1c_save.c b/libasn1compiler/asn1c_save.c index 00a4496e..381404e4 100644 --- a/libasn1compiler/asn1c_save.c +++ b/libasn1compiler/asn1c_save.c @@ -216,7 +216,7 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps) { fprintf(fp_h, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n"); - fprintf(fp_h, "#include \n\n"); + fprintf(fp_h, "#include \n\n"); TQ_FOR(ot, &(cs->destination[OT_INCLUDES].chunks), next) { asn1c_activate_dependency(deps, 0, ot->buf); diff --git a/skeletons/ANY.h b/skeletons/ANY.h index d010de4a..ae62596f 100644 --- a/skeletons/ANY.h +++ b/skeletons/ANY.h @@ -5,7 +5,6 @@ #ifndef ASN_TYPE_ANY_H #define ASN_TYPE_ANY_H -#include #include /* Implemented via OCTET SRING type */ typedef struct ANY { diff --git a/skeletons/BIT_STRING.h b/skeletons/BIT_STRING.h index f9ebf9b7..ff622a32 100644 --- a/skeletons/BIT_STRING.h +++ b/skeletons/BIT_STRING.h @@ -5,10 +5,9 @@ #ifndef _BIT_STRING_H_ #define _BIT_STRING_H_ -#include #include -typedef OCTET_STRING_t BIT_STRING_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t BIT_STRING_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_BIT_STRING; diff --git a/skeletons/BMPString.h b/skeletons/BMPString.h index 31d67eae..2860e6ba 100644 --- a/skeletons/BMPString.h +++ b/skeletons/BMPString.h @@ -5,10 +5,9 @@ #ifndef _BMPString_H_ #define _BMPString_H_ -#include #include -typedef OCTET_STRING_t BMPString_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t BMPString_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_BMPString; diff --git a/skeletons/BOOLEAN.h b/skeletons/BOOLEAN.h index b9b836ee..2b195dc1 100644 --- a/skeletons/BOOLEAN.h +++ b/skeletons/BOOLEAN.h @@ -5,7 +5,7 @@ #ifndef _BOOLEAN_H_ #define _BOOLEAN_H_ -#include +#include /* * The underlying integer may contain various values, but everything diff --git a/skeletons/ENUMERATED.h b/skeletons/ENUMERATED.h index a0948ed0..b926eb26 100644 --- a/skeletons/ENUMERATED.h +++ b/skeletons/ENUMERATED.h @@ -5,10 +5,9 @@ #ifndef _ENUMERATED_H_ #define _ENUMERATED_H_ -#include #include -typedef INTEGER_t ENUMERATED_t; /* Implemented in terms of INTEGER */ +typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */ extern asn1_TYPE_descriptor_t asn1_DEF_ENUMERATED; diff --git a/skeletons/GeneralString.h b/skeletons/GeneralString.h index 6d5bfdf6..d8d07e97 100644 --- a/skeletons/GeneralString.h +++ b/skeletons/GeneralString.h @@ -5,10 +5,9 @@ #ifndef _GeneralString_H_ #define _GeneralString_H_ -#include #include -typedef OCTET_STRING_t GeneralString_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t GeneralString_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_GeneralString; diff --git a/skeletons/GeneralizedTime.h b/skeletons/GeneralizedTime.h index 06b4ca5f..6681183b 100644 --- a/skeletons/GeneralizedTime.h +++ b/skeletons/GeneralizedTime.h @@ -5,10 +5,9 @@ #ifndef _GeneralizedTime_H_ #define _GeneralizedTime_H_ -#include #include -typedef OCTET_STRING_t GeneralizedTime_t; /* Implemented using OCTET STRING */ +typedef OCTET_STRING_t GeneralizedTime_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_GeneralizedTime; diff --git a/skeletons/GraphicString.h b/skeletons/GraphicString.h index b37b2c7e..64fcf642 100644 --- a/skeletons/GraphicString.h +++ b/skeletons/GraphicString.h @@ -5,10 +5,9 @@ #ifndef _GraphicString_H_ #define _GraphicString_H_ -#include #include -typedef OCTET_STRING_t GraphicString_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t GraphicString_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_GraphicString; diff --git a/skeletons/IA5String.h b/skeletons/IA5String.h index a80004e8..6c40a954 100644 --- a/skeletons/IA5String.h +++ b/skeletons/IA5String.h @@ -5,10 +5,9 @@ #ifndef _IA5String_H_ #define _IA5String_H_ -#include #include -typedef OCTET_STRING_t IA5String_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t IA5String_t; /* Implemented via OCTET STRING */ /* * IA5String ASN.1 type definition. diff --git a/skeletons/INTEGER.h b/skeletons/INTEGER.h index 8e3c5458..89ab1af5 100644 --- a/skeletons/INTEGER.h +++ b/skeletons/INTEGER.h @@ -5,7 +5,7 @@ #ifndef _INTEGER_H_ #define _INTEGER_H_ -#include +#include typedef struct INTEGER { uint8_t *buf; /* Buffer with consecutive INTEGER bits (big-endian) */ diff --git a/skeletons/ISO646String.h b/skeletons/ISO646String.h index 566ce3be..c1ff80f7 100644 --- a/skeletons/ISO646String.h +++ b/skeletons/ISO646String.h @@ -5,7 +5,7 @@ #ifndef _ISO646String_H_ #define _ISO646String_H_ -#include +#include #include typedef VisibleString_t ISO646String_t; /* Implemented using VisibleString */ diff --git a/skeletons/NULL.h b/skeletons/NULL.h index 0c07ffe8..64c02f70 100644 --- a/skeletons/NULL.h +++ b/skeletons/NULL.h @@ -5,7 +5,7 @@ #ifndef ASN_TYPE_NULL_H #define ASN_TYPE_NULL_H -#include +#include /* * The value of the NULL type is meaningless: see BOOLEAN if you want to diff --git a/skeletons/NativeInteger.h b/skeletons/NativeInteger.h index 2d0cddaa..5c1e5e41 100644 --- a/skeletons/NativeInteger.h +++ b/skeletons/NativeInteger.h @@ -12,7 +12,7 @@ #ifndef _NativeInteger_H_ #define _NativeInteger_H_ -#include +#include extern asn1_TYPE_descriptor_t asn1_DEF_NativeInteger; diff --git a/skeletons/NativeReal.h b/skeletons/NativeReal.h index a130a334..2f3b0a60 100644 --- a/skeletons/NativeReal.h +++ b/skeletons/NativeReal.h @@ -11,7 +11,7 @@ #ifndef ASN_TYPE_NativeReal_H #define ASN_TYPE_NativeReal_H -#include +#include extern asn1_TYPE_descriptor_t asn1_DEF_NativeReal; diff --git a/skeletons/NumericString.h b/skeletons/NumericString.h index 71f72c76..2e06255e 100644 --- a/skeletons/NumericString.h +++ b/skeletons/NumericString.h @@ -5,10 +5,9 @@ #ifndef _NumericString_H_ #define _NumericString_H_ -#include #include -typedef OCTET_STRING_t NumericString_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t NumericString_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_NumericString; diff --git a/skeletons/OBJECT_IDENTIFIER.h b/skeletons/OBJECT_IDENTIFIER.h index 4f45090c..e232f70b 100644 --- a/skeletons/OBJECT_IDENTIFIER.h +++ b/skeletons/OBJECT_IDENTIFIER.h @@ -5,10 +5,9 @@ #ifndef _OBJECT_IDENTIFIER_H_ #define _OBJECT_IDENTIFIER_H_ -#include #include -typedef INTEGER_t OBJECT_IDENTIFIER_t; /* Implemented in terms of INTEGER */ +typedef INTEGER_t OBJECT_IDENTIFIER_t; /* Implemented via INTEGER */ extern asn1_TYPE_descriptor_t asn1_DEF_OBJECT_IDENTIFIER; diff --git a/skeletons/OCTET_STRING.h b/skeletons/OCTET_STRING.h index a67cef94..3c4509b6 100644 --- a/skeletons/OCTET_STRING.h +++ b/skeletons/OCTET_STRING.h @@ -5,7 +5,7 @@ #ifndef _OCTET_STRING_H_ #define _OCTET_STRING_H_ -#include +#include typedef struct OCTET_STRING { uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */ diff --git a/skeletons/ObjectDescriptor.h b/skeletons/ObjectDescriptor.h index 67addf24..2620d139 100644 --- a/skeletons/ObjectDescriptor.h +++ b/skeletons/ObjectDescriptor.h @@ -5,10 +5,9 @@ #ifndef _ObjectDescriptor_H_ #define _ObjectDescriptor_H_ -#include #include -typedef GraphicString_t ObjectDescriptor_t; /* Implemented in terms of. */ +typedef GraphicString_t ObjectDescriptor_t; /* Implemented via GraphicString */ extern asn1_TYPE_descriptor_t asn1_DEF_ObjectDescriptor; diff --git a/skeletons/PrintableString.h b/skeletons/PrintableString.h index b44a61ec..fffb86ee 100644 --- a/skeletons/PrintableString.h +++ b/skeletons/PrintableString.h @@ -5,10 +5,9 @@ #ifndef _PrintableString_H_ #define _PrintableString_H_ -#include #include -typedef OCTET_STRING_t PrintableString_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t PrintableString_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_PrintableString; diff --git a/skeletons/REAL.h b/skeletons/REAL.h index 83f96d01..2f7809b5 100644 --- a/skeletons/REAL.h +++ b/skeletons/REAL.h @@ -5,7 +5,7 @@ #ifndef ASN_TYPE_REAL_H #define ASN_TYPE_REAL_H -#include +#include typedef struct REAL { uint8_t *buf; /* Buffer with REAL type encoding */ diff --git a/skeletons/RELATIVE-OID.h b/skeletons/RELATIVE-OID.h index e6af9346..855391c9 100644 --- a/skeletons/RELATIVE-OID.h +++ b/skeletons/RELATIVE-OID.h @@ -5,10 +5,9 @@ #ifndef _RELATIVE_OID_H_ #define _RELATIVE_OID_H_ -#include #include -/* Implemented in terms of OBJECT IDENTIFIER */ +/* Implemented via OBJECT IDENTIFIER */ typedef OBJECT_IDENTIFIER_t RELATIVE_OID_t; extern asn1_TYPE_descriptor_t asn1_DEF_RELATIVE_OID; diff --git a/skeletons/T61String.h b/skeletons/T61String.h index 1485577e..f523444b 100644 --- a/skeletons/T61String.h +++ b/skeletons/T61String.h @@ -5,10 +5,9 @@ #ifndef _T61String_H_ #define _T61String_H_ -#include #include -typedef OCTET_STRING_t T61String_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t T61String_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_T61String; diff --git a/skeletons/TeletexString.h b/skeletons/TeletexString.h index 6f513581..e92f7c2d 100644 --- a/skeletons/TeletexString.h +++ b/skeletons/TeletexString.h @@ -5,10 +5,9 @@ #ifndef _TeletexString_H_ #define _TeletexString_H_ -#include #include -typedef OCTET_STRING_t TeletexString_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t TeletexString_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_TeletexString; diff --git a/skeletons/UTCTime.h b/skeletons/UTCTime.h index b026dedd..65de7a3a 100644 --- a/skeletons/UTCTime.h +++ b/skeletons/UTCTime.h @@ -5,10 +5,9 @@ #ifndef _UTCTime_H_ #define _UTCTime_H_ -#include #include -typedef OCTET_STRING_t UTCTime_t; /* Implemented using OCTET STRING */ +typedef OCTET_STRING_t UTCTime_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_UTCTime; diff --git a/skeletons/UTF8String.h b/skeletons/UTF8String.h index 543d3196..bb58bbea 100644 --- a/skeletons/UTF8String.h +++ b/skeletons/UTF8String.h @@ -5,10 +5,9 @@ #ifndef _UTF8String_H_ #define _UTF8String_H_ -#include #include -typedef OCTET_STRING_t UTF8String_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t UTF8String_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_UTF8String; diff --git a/skeletons/UniversalString.h b/skeletons/UniversalString.h index 88875236..fe74f0fd 100644 --- a/skeletons/UniversalString.h +++ b/skeletons/UniversalString.h @@ -5,10 +5,9 @@ #ifndef _UniversalString_H_ #define _UniversalString_H_ -#include #include -typedef OCTET_STRING_t UniversalString_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t UniversalString_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_UniversalString; diff --git a/skeletons/VideotexString.h b/skeletons/VideotexString.h index 4dd7c8e7..6b60341f 100644 --- a/skeletons/VideotexString.h +++ b/skeletons/VideotexString.h @@ -5,10 +5,9 @@ #ifndef _VideotexString_H_ #define _VideotexString_H_ -#include #include -typedef OCTET_STRING_t VideotexString_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t VideotexString_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_VideotexString; diff --git a/skeletons/VisibleString.h b/skeletons/VisibleString.h index 3c1df420..b90234c6 100644 --- a/skeletons/VisibleString.h +++ b/skeletons/VisibleString.h @@ -5,10 +5,9 @@ #ifndef _VisibleString_H_ #define _VisibleString_H_ -#include #include -typedef OCTET_STRING_t VisibleString_t; /* Implemented in terms of OCTET STRING */ +typedef OCTET_STRING_t VisibleString_t; /* Implemented via OCTET STRING */ extern asn1_TYPE_descriptor_t asn1_DEF_VisibleString; diff --git a/skeletons/ber_decoder.h b/skeletons/ber_decoder.h index 4842adb5..3e1b84f3 100644 --- a/skeletons/ber_decoder.h +++ b/skeletons/ber_decoder.h @@ -5,7 +5,7 @@ #ifndef _BER_DECODER_H_ #define _BER_DECODER_H_ -#include +#include struct asn1_TYPE_descriptor_s; /* Forward declaration */ @@ -68,7 +68,7 @@ typedef ber_dec_rval_t (ber_type_decoder_f)( * head->last_tag_form is non-zero. */ ber_dec_rval_t ber_check_tags(struct asn1_TYPE_descriptor_s *type_dsc, - ber_dec_ctx_t *ctx, /* saved context */ + ber_dec_ctx_t *opt_ctx, /* saved context */ void *ptr, size_t size, int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ ber_tlv_len_t *last_length, diff --git a/skeletons/constr_CHOICE.h b/skeletons/constr_CHOICE.h index 35b95110..4e296413 100644 --- a/skeletons/constr_CHOICE.h +++ b/skeletons/constr_CHOICE.h @@ -5,7 +5,7 @@ #ifndef _CONSTR_CHOICE_H_ #define _CONSTR_CHOICE_H_ -#include +#include typedef struct asn1_CHOICE_specifics_s { /* diff --git a/skeletons/constr_SEQUENCE.h b/skeletons/constr_SEQUENCE.h index 156db8c7..27903b13 100644 --- a/skeletons/constr_SEQUENCE.h +++ b/skeletons/constr_SEQUENCE.h @@ -5,7 +5,7 @@ #ifndef _CONSTR_SEQUENCE_H_ #define _CONSTR_SEQUENCE_H_ -#include +#include typedef struct asn1_SEQUENCE_specifics_s { /* diff --git a/skeletons/constr_SEQUENCE_OF.h b/skeletons/constr_SEQUENCE_OF.h index ee117508..f6b71491 100644 --- a/skeletons/constr_SEQUENCE_OF.h +++ b/skeletons/constr_SEQUENCE_OF.h @@ -5,7 +5,7 @@ #ifndef _CONSTR_SEQUENCE_OF_H_ #define _CONSTR_SEQUENCE_OF_H_ -#include +#include #include /* Implemented using SET OF */ /* diff --git a/skeletons/constr_SET.h b/skeletons/constr_SET.h index eaf7df0a..17fb6132 100644 --- a/skeletons/constr_SET.h +++ b/skeletons/constr_SET.h @@ -5,7 +5,7 @@ #ifndef _CONSTR_SET_H_ #define _CONSTR_SET_H_ -#include +#include typedef struct asn1_SET_specifics_s { diff --git a/skeletons/constr_SET_OF.h b/skeletons/constr_SET_OF.h index 1a1384da..b013dd6f 100644 --- a/skeletons/constr_SET_OF.h +++ b/skeletons/constr_SET_OF.h @@ -5,7 +5,7 @@ #ifndef _CONSTR_SET_OF_H_ #define _CONSTR_SET_OF_H_ -#include +#include typedef struct asn1_SET_OF_specifics_s { /* diff --git a/skeletons/constr_TYPE.h b/skeletons/constr_TYPE.h index 28e8e2cd..c8982f9d 100644 --- a/skeletons/constr_TYPE.h +++ b/skeletons/constr_TYPE.h @@ -11,8 +11,6 @@ #ifndef _CONSTR_TYPE_H #define _CONSTR_TYPE_H -#include /* System-dependent types */ - struct asn1_TYPE_descriptor_s; /* Forward declaration */ struct asn1_TYPE_member_s; /* Forward declaration */ diff --git a/skeletons/constraints.c b/skeletons/constraints.c index d95e3cbd..9c348851 100644 --- a/skeletons/constraints.c +++ b/skeletons/constraints.c @@ -1,6 +1,5 @@ #include #include -#include int asn_generic_no_constraint(asn1_TYPE_descriptor_t *type_descriptor, diff --git a/skeletons/der_encoder.c b/skeletons/der_encoder.c index 4f1936f8..3d5cc859 100644 --- a/skeletons/der_encoder.c +++ b/skeletons/der_encoder.c @@ -3,7 +3,6 @@ * Redistribution and modifications are permitted subject to BSD license. */ #include -#include #include #include diff --git a/skeletons/der_encoder.h b/skeletons/der_encoder.h index fe64bccf..2acccaaf 100644 --- a/skeletons/der_encoder.h +++ b/skeletons/der_encoder.h @@ -5,7 +5,7 @@ #ifndef _DER_ENCODER_H_ #define _DER_ENCODER_H_ -#include +#include struct asn1_TYPE_descriptor_s; /* Forward declaration */ diff --git a/skeletons/file-dependencies b/skeletons/file-dependencies index 25d10a07..559d2725 100644 --- a/skeletons/file-dependencies +++ b/skeletons/file-dependencies @@ -43,8 +43,9 @@ constr_SET.h constr_SET.c constr_SET_OF.h constr_SET_OF.c asn_SET_OF.h COMMON-FILES: # This is a special section -asn_types.h +asn_application.h asn_internal.h +asn_types.h OCTET_STRING.h OCTET_STRING.c # This one is used too widely ber_decoder.h ber_decoder.c ber_tlv_length.h ber_tlv_length.c diff --git a/skeletons/xer_encoder.c b/skeletons/xer_encoder.c index e4581aaa..876980e1 100644 --- a/skeletons/xer_encoder.c +++ b/skeletons/xer_encoder.c @@ -3,7 +3,6 @@ * Redistribution and modifications are permitted subject to BSD license. */ #include -#include #include #include #include @@ -43,7 +42,7 @@ xer_encode(asn1_TYPE_descriptor_t *td, void *sptr, } /* - * This is a helper function for xer_fprint, which directs all the incoming data + * This is a helper function for xer_fprint, which directs all incoming data * into the provided file descriptor. */ static int diff --git a/skeletons/xer_encoder.h b/skeletons/xer_encoder.h index 43c192d3..fbb7a817 100644 --- a/skeletons/xer_encoder.h +++ b/skeletons/xer_encoder.h @@ -5,7 +5,7 @@ #ifndef _XER_ENCODER_H_ #define _XER_ENCODER_H_ -#include +#include struct asn1_TYPE_descriptor_s; /* Forward declaration */