asn1: Do not emit the same ASN.1 C comments repeatedly
This commit is contained in:

committed by
Jeffrey Altman

parent
cfd2ccb546
commit
c922303dd0
@@ -1925,10 +1925,13 @@ generate_type_header (const Symbol *s)
|
|||||||
* member fields are not OPTIONAL/DEFAULTed.
|
* member fields are not OPTIONAL/DEFAULTed.
|
||||||
*/
|
*/
|
||||||
generate_subtypes_header(s);
|
generate_subtypes_header(s);
|
||||||
|
if (!s->emitted_asn1) {
|
||||||
fprintf(headerfile, "/*\n");
|
fprintf(headerfile, "/*\n");
|
||||||
fprintf(headerfile, "%s ::= ", s->name);
|
fprintf(headerfile, "%s ::= ", s->name);
|
||||||
define_asn1 (0, s->type);
|
define_asn1 (0, s->type);
|
||||||
fprintf(headerfile, "\n*/\n\n");
|
fprintf(headerfile, "\n*/\n\n");
|
||||||
|
emitted_asn1(s);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Emit enums for the outermost tag of this type. These are needed for
|
* Emit enums for the outermost tag of this type. These are needed for
|
||||||
|
@@ -171,3 +171,9 @@ emitted_tag_enums(const Symbol *s)
|
|||||||
{
|
{
|
||||||
((Symbol *)(uintptr_t)s)->emitted_tag_enums = 1;
|
((Symbol *)(uintptr_t)s)->emitted_tag_enums = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
emitted_asn1(const Symbol *s)
|
||||||
|
{
|
||||||
|
((Symbol *)(uintptr_t)s)->emitted_asn1 = 1;
|
||||||
|
}
|
||||||
|
@@ -238,6 +238,7 @@ struct symbol {
|
|||||||
IOSObject *object;
|
IOSObject *object;
|
||||||
IOSObjectSet *objectset;
|
IOSObjectSet *objectset;
|
||||||
HEIM_TAILQ_ENTRY(symbol) symlist;
|
HEIM_TAILQ_ENTRY(symbol) symlist;
|
||||||
|
unsigned int emitted_asn1:1;
|
||||||
unsigned int emitted_declaration:1;
|
unsigned int emitted_declaration:1;
|
||||||
unsigned int emitted_definition:1;
|
unsigned int emitted_definition:1;
|
||||||
unsigned int emitted_tag_enums:1;
|
unsigned int emitted_tag_enums:1;
|
||||||
@@ -260,6 +261,7 @@ Symbol *getsym(char *name);
|
|||||||
void output_name (char *);
|
void output_name (char *);
|
||||||
int checkundefined(void);
|
int checkundefined(void);
|
||||||
void generate_types(void);
|
void generate_types(void);
|
||||||
|
void emitted_asn1(const Symbol *);
|
||||||
void emitted_declaration(const Symbol *);
|
void emitted_declaration(const Symbol *);
|
||||||
void emitted_definition(const Symbol *);
|
void emitted_definition(const Symbol *);
|
||||||
void emitted_tag_enums(const Symbol *);
|
void emitted_tag_enums(const Symbol *);
|
||||||
|
Reference in New Issue
Block a user