+/*-\r
+ * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.\r
+ * Redistribution and modifications are permitted subject to BSD license.\r
+ */\r
+#ifndef ASN_SEQUENCE_OF_H\r
+#define ASN_SEQUENCE_OF_H\r
+\r
+#include <asn_SET_OF.h>\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+/*\r
+ * SEQUENCE OF is the same as SET OF with a tiny difference:\r
+ * the delete operation preserves the initial order of elements\r
+ * and thus MAY operate in non-constant time.\r
+ */\r
+#define A_SEQUENCE_OF(type) A_SET_OF(type)\r
+\r
+#define ASN_SEQUENCE_ADD(headptr, ptr) \\r
+ asn_sequence_add((headptr), (ptr))\r
+\r
+/***********************************************\r
+ * Implementation of the SEQUENCE OF structure.\r
+ */\r
+\r
+#define asn_sequence_add asn_set_add\r
+#define asn_sequence_empty asn_set_empty\r
+\r
+/*\r
+ * Delete the element from the set by its number (base 0).\r
+ * This is NOT a constant-time operation.\r
+ * The order of elements is preserved.\r
+ * If _do_free is given AND the (*free) is initialized, the element\r
+ * will be freed using the custom (*free) function as well.\r
+ */\r
+void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free);\r
+\r
+/*\r
+ * Cope with different conversions requirements to/from void in C and C++.\r
+ * This is mostly useful for support library.\r
+ */\r
+typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_;\r
+#define _A_SEQUENCE_FROM_VOID(ptr) ((asn_anonymous_sequence_ *)(ptr))\r
+#define _A_CSEQUENCE_FROM_VOID(ptr) ((const asn_anonymous_sequence_ *)(ptr))\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* ASN_SEQUENCE_OF_H */\r