reheaderization
diff --git a/libasn1compiler/asn1c_save.c b/libasn1compiler/asn1c_save.c
index 00a4496..381404e 100644
--- a/libasn1compiler/asn1c_save.c
+++ b/libasn1compiler/asn1c_save.c
@@ -216,7 +216,7 @@
fprintf(fp_h, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n");
- fprintf(fp_h, "#include <constr_TYPE.h>\n\n");
+ fprintf(fp_h, "#include <asn_application.h>\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 d010de4..ae62596 100644
--- a/skeletons/ANY.h
+++ b/skeletons/ANY.h
@@ -5,7 +5,6 @@
#ifndef ASN_TYPE_ANY_H
#define ASN_TYPE_ANY_H
-#include <constr_TYPE.h>
#include <OCTET_STRING.h> /* Implemented via OCTET SRING type */
typedef struct ANY {
diff --git a/skeletons/BIT_STRING.h b/skeletons/BIT_STRING.h
index f9ebf9b..ff622a3 100644
--- a/skeletons/BIT_STRING.h
+++ b/skeletons/BIT_STRING.h
@@ -5,10 +5,9 @@
#ifndef _BIT_STRING_H_
#define _BIT_STRING_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 31d67ea..2860e6b 100644
--- a/skeletons/BMPString.h
+++ b/skeletons/BMPString.h
@@ -5,10 +5,9 @@
#ifndef _BMPString_H_
#define _BMPString_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 b9b836e..2b195dc 100644
--- a/skeletons/BOOLEAN.h
+++ b/skeletons/BOOLEAN.h
@@ -5,7 +5,7 @@
#ifndef _BOOLEAN_H_
#define _BOOLEAN_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
/*
* The underlying integer may contain various values, but everything
diff --git a/skeletons/ENUMERATED.h b/skeletons/ENUMERATED.h
index a0948ed..b926eb2 100644
--- a/skeletons/ENUMERATED.h
+++ b/skeletons/ENUMERATED.h
@@ -5,10 +5,9 @@
#ifndef _ENUMERATED_H_
#define _ENUMERATED_H_
-#include <constr_TYPE.h>
#include <INTEGER.h>
-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 6d5bfdf..d8d07e9 100644
--- a/skeletons/GeneralString.h
+++ b/skeletons/GeneralString.h
@@ -5,10 +5,9 @@
#ifndef _GeneralString_H_
#define _GeneralString_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 06b4ca5..6681183 100644
--- a/skeletons/GeneralizedTime.h
+++ b/skeletons/GeneralizedTime.h
@@ -5,10 +5,9 @@
#ifndef _GeneralizedTime_H_
#define _GeneralizedTime_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 b37b2c7..64fcf64 100644
--- a/skeletons/GraphicString.h
+++ b/skeletons/GraphicString.h
@@ -5,10 +5,9 @@
#ifndef _GraphicString_H_
#define _GraphicString_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 a80004e..6c40a95 100644
--- a/skeletons/IA5String.h
+++ b/skeletons/IA5String.h
@@ -5,10 +5,9 @@
#ifndef _IA5String_H_
#define _IA5String_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 8e3c545..89ab1af 100644
--- a/skeletons/INTEGER.h
+++ b/skeletons/INTEGER.h
@@ -5,7 +5,7 @@
#ifndef _INTEGER_H_
#define _INTEGER_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
typedef struct INTEGER {
uint8_t *buf; /* Buffer with consecutive INTEGER bits (big-endian) */
diff --git a/skeletons/ISO646String.h b/skeletons/ISO646String.h
index 566ce3b..c1ff80f 100644
--- a/skeletons/ISO646String.h
+++ b/skeletons/ISO646String.h
@@ -5,7 +5,7 @@
#ifndef _ISO646String_H_
#define _ISO646String_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
#include <VisibleString.h>
typedef VisibleString_t ISO646String_t; /* Implemented using VisibleString */
diff --git a/skeletons/NULL.h b/skeletons/NULL.h
index 0c07ffe..64c02f7 100644
--- a/skeletons/NULL.h
+++ b/skeletons/NULL.h
@@ -5,7 +5,7 @@
#ifndef ASN_TYPE_NULL_H
#define ASN_TYPE_NULL_H
-#include <constr_TYPE.h>
+#include <asn_application.h>
/*
* 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 2d0cdda..5c1e5e4 100644
--- a/skeletons/NativeInteger.h
+++ b/skeletons/NativeInteger.h
@@ -12,7 +12,7 @@
#ifndef _NativeInteger_H_
#define _NativeInteger_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
extern asn1_TYPE_descriptor_t asn1_DEF_NativeInteger;
diff --git a/skeletons/NativeReal.h b/skeletons/NativeReal.h
index a130a33..2f3b0a6 100644
--- a/skeletons/NativeReal.h
+++ b/skeletons/NativeReal.h
@@ -11,7 +11,7 @@
#ifndef ASN_TYPE_NativeReal_H
#define ASN_TYPE_NativeReal_H
-#include <constr_TYPE.h>
+#include <asn_application.h>
extern asn1_TYPE_descriptor_t asn1_DEF_NativeReal;
diff --git a/skeletons/NumericString.h b/skeletons/NumericString.h
index 71f72c7..2e06255 100644
--- a/skeletons/NumericString.h
+++ b/skeletons/NumericString.h
@@ -5,10 +5,9 @@
#ifndef _NumericString_H_
#define _NumericString_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 4f45090..e232f70 100644
--- a/skeletons/OBJECT_IDENTIFIER.h
+++ b/skeletons/OBJECT_IDENTIFIER.h
@@ -5,10 +5,9 @@
#ifndef _OBJECT_IDENTIFIER_H_
#define _OBJECT_IDENTIFIER_H_
-#include <constr_TYPE.h>
#include <INTEGER.h>
-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 a67cef9..3c4509b 100644
--- a/skeletons/OCTET_STRING.h
+++ b/skeletons/OCTET_STRING.h
@@ -5,7 +5,7 @@
#ifndef _OCTET_STRING_H_
#define _OCTET_STRING_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
typedef struct OCTET_STRING {
uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */
diff --git a/skeletons/ObjectDescriptor.h b/skeletons/ObjectDescriptor.h
index 67addf2..2620d13 100644
--- a/skeletons/ObjectDescriptor.h
+++ b/skeletons/ObjectDescriptor.h
@@ -5,10 +5,9 @@
#ifndef _ObjectDescriptor_H_
#define _ObjectDescriptor_H_
-#include <constr_TYPE.h>
#include <GraphicString.h>
-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 b44a61e..fffb86e 100644
--- a/skeletons/PrintableString.h
+++ b/skeletons/PrintableString.h
@@ -5,10 +5,9 @@
#ifndef _PrintableString_H_
#define _PrintableString_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 83f96d0..2f7809b 100644
--- a/skeletons/REAL.h
+++ b/skeletons/REAL.h
@@ -5,7 +5,7 @@
#ifndef ASN_TYPE_REAL_H
#define ASN_TYPE_REAL_H
-#include <constr_TYPE.h>
+#include <asn_application.h>
typedef struct REAL {
uint8_t *buf; /* Buffer with REAL type encoding */
diff --git a/skeletons/RELATIVE-OID.h b/skeletons/RELATIVE-OID.h
index e6af934..855391c 100644
--- a/skeletons/RELATIVE-OID.h
+++ b/skeletons/RELATIVE-OID.h
@@ -5,10 +5,9 @@
#ifndef _RELATIVE_OID_H_
#define _RELATIVE_OID_H_
-#include <constr_TYPE.h>
#include <OBJECT_IDENTIFIER.h>
-/* 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 1485577..f523444 100644
--- a/skeletons/T61String.h
+++ b/skeletons/T61String.h
@@ -5,10 +5,9 @@
#ifndef _T61String_H_
#define _T61String_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 6f51358..e92f7c2 100644
--- a/skeletons/TeletexString.h
+++ b/skeletons/TeletexString.h
@@ -5,10 +5,9 @@
#ifndef _TeletexString_H_
#define _TeletexString_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 b026ded..65de7a3 100644
--- a/skeletons/UTCTime.h
+++ b/skeletons/UTCTime.h
@@ -5,10 +5,9 @@
#ifndef _UTCTime_H_
#define _UTCTime_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 543d319..bb58bbe 100644
--- a/skeletons/UTF8String.h
+++ b/skeletons/UTF8String.h
@@ -5,10 +5,9 @@
#ifndef _UTF8String_H_
#define _UTF8String_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 8887523..fe74f0f 100644
--- a/skeletons/UniversalString.h
+++ b/skeletons/UniversalString.h
@@ -5,10 +5,9 @@
#ifndef _UniversalString_H_
#define _UniversalString_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 4dd7c8e..6b60341 100644
--- a/skeletons/VideotexString.h
+++ b/skeletons/VideotexString.h
@@ -5,10 +5,9 @@
#ifndef _VideotexString_H_
#define _VideotexString_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 3c1df42..b90234c 100644
--- a/skeletons/VisibleString.h
+++ b/skeletons/VisibleString.h
@@ -5,10 +5,9 @@
#ifndef _VisibleString_H_
#define _VisibleString_H_
-#include <constr_TYPE.h>
#include <OCTET_STRING.h>
-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 4842adb..3e1b84f 100644
--- a/skeletons/ber_decoder.h
+++ b/skeletons/ber_decoder.h
@@ -5,7 +5,7 @@
#ifndef _BER_DECODER_H_
#define _BER_DECODER_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
struct asn1_TYPE_descriptor_s; /* Forward declaration */
@@ -68,7 +68,7 @@
* 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 35b9511..4e29641 100644
--- a/skeletons/constr_CHOICE.h
+++ b/skeletons/constr_CHOICE.h
@@ -5,7 +5,7 @@
#ifndef _CONSTR_CHOICE_H_
#define _CONSTR_CHOICE_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
typedef struct asn1_CHOICE_specifics_s {
/*
diff --git a/skeletons/constr_SEQUENCE.h b/skeletons/constr_SEQUENCE.h
index 156db8c..27903b1 100644
--- a/skeletons/constr_SEQUENCE.h
+++ b/skeletons/constr_SEQUENCE.h
@@ -5,7 +5,7 @@
#ifndef _CONSTR_SEQUENCE_H_
#define _CONSTR_SEQUENCE_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
typedef struct asn1_SEQUENCE_specifics_s {
/*
diff --git a/skeletons/constr_SEQUENCE_OF.h b/skeletons/constr_SEQUENCE_OF.h
index ee11750..f6b7149 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 <constr_TYPE.h>
+#include <asn_application.h>
#include <constr_SET_OF.h> /* Implemented using SET OF */
/*
diff --git a/skeletons/constr_SET.h b/skeletons/constr_SET.h
index eaf7df0..17fb613 100644
--- a/skeletons/constr_SET.h
+++ b/skeletons/constr_SET.h
@@ -5,7 +5,7 @@
#ifndef _CONSTR_SET_H_
#define _CONSTR_SET_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
typedef struct asn1_SET_specifics_s {
diff --git a/skeletons/constr_SET_OF.h b/skeletons/constr_SET_OF.h
index 1a1384d..b013dd6 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 <constr_TYPE.h>
+#include <asn_application.h>
typedef struct asn1_SET_OF_specifics_s {
/*
diff --git a/skeletons/constr_TYPE.h b/skeletons/constr_TYPE.h
index 28e8e2c..c8982f9 100644
--- a/skeletons/constr_TYPE.h
+++ b/skeletons/constr_TYPE.h
@@ -11,8 +11,6 @@
#ifndef _CONSTR_TYPE_H
#define _CONSTR_TYPE_H
-#include <asn_types.h> /* 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 d95e3cb..9c34885 100644
--- a/skeletons/constraints.c
+++ b/skeletons/constraints.c
@@ -1,6 +1,5 @@
#include <asn_internal.h>
#include <constraints.h>
-#include <constr_TYPE.h>
int
asn_generic_no_constraint(asn1_TYPE_descriptor_t *type_descriptor,
diff --git a/skeletons/der_encoder.c b/skeletons/der_encoder.c
index 4f1936f..3d5cc85 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 <asn_internal.h>
-#include <constr_TYPE.h>
#include <assert.h>
#include <errno.h>
diff --git a/skeletons/der_encoder.h b/skeletons/der_encoder.h
index fe64bcc..2acccaa 100644
--- a/skeletons/der_encoder.h
+++ b/skeletons/der_encoder.h
@@ -5,7 +5,7 @@
#ifndef _DER_ENCODER_H_
#define _DER_ENCODER_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
struct asn1_TYPE_descriptor_s; /* Forward declaration */
diff --git a/skeletons/file-dependencies b/skeletons/file-dependencies
index 25d10a0..559d272 100644
--- a/skeletons/file-dependencies
+++ b/skeletons/file-dependencies
@@ -43,8 +43,9 @@
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 e4581aa..876980e 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 <asn_internal.h>
-#include <constr_TYPE.h>
#include <stdio.h>
#include <assert.h>
#include <errno.h>
@@ -43,7 +42,7 @@
}
/*
- * 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 43c192d..fbb7a81 100644
--- a/skeletons/xer_encoder.h
+++ b/skeletons/xer_encoder.h
@@ -5,7 +5,7 @@
#ifndef _XER_ENCODER_H_
#define _XER_ENCODER_H_
-#include <constr_TYPE.h>
+#include <asn_application.h>
struct asn1_TYPE_descriptor_s; /* Forward declaration */