2004-06-03 03:38:44 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "asn1parser.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Construct a new structure that would hold the EXPORTS or IMPORTS
|
|
|
|
* clause data.
|
|
|
|
*/
|
|
|
|
asn1p_xports_t *
|
|
|
|
asn1p_xports_new() {
|
|
|
|
asn1p_xports_t *xp;
|
|
|
|
|
|
|
|
xp = calloc(1, sizeof *xp);
|
|
|
|
if(xp) {
|
|
|
|
TQ_INIT(&(xp->members));
|
|
|
|
}
|
|
|
|
|
|
|
|
return xp;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Destroy the xports structure.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
asn1p_xports_free(asn1p_xports_t *xp) {
|
|
|
|
if(xp) {
|
2005-08-12 10:09:10 +00:00
|
|
|
if(xp->fromModuleName)
|
|
|
|
free(xp->fromModuleName);
|
|
|
|
if(xp->identifier.oid)
|
|
|
|
asn1p_oid_free(xp->identifier.oid);
|
2004-06-03 03:38:44 +00:00
|
|
|
free(xp);
|
|
|
|
}
|
|
|
|
}
|