Initial revision


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@2 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/libasn1parser/asn1p_xports.c b/libasn1parser/asn1p_xports.c
new file mode 100644
index 0000000..cfc9fa4
--- /dev/null
+++ b/libasn1parser/asn1p_xports.c
@@ -0,0 +1,34 @@
+#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) {
+		if(xp->from)
+			free(xp->from);
+		if(xp->from_oid)
+			asn1p_oid_free(xp->from_oid);
+		free(xp);
+	}
+}