per_get_undo()
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1319 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/skeletons/per_support.h b/skeletons/per_support.h
index c22bc72..bf06f05 100644
--- a/skeletons/per_support.h
+++ b/skeletons/per_support.h
@@ -37,11 +37,12 @@
* This structure describes a position inside an incoming PER bit stream.
*/
typedef struct asn_per_data_s {
- const uint8_t *buffer; /* Pointer to the octet stream */
- size_t nboff; /* Bit offset to the meaningful bit */
- size_t nbits; /* Number of bits in the stream */
- int (*refill)(struct asn_per_data_s *);
- void *refill_key;
+ const uint8_t *buffer; /* Pointer to the octet stream */
+ size_t nboff; /* Bit offset to the meaningful bit */
+ size_t nbits; /* Number of bits in the stream */
+ size_t moved; /* Number of bits moved through this bit stream */
+ int (*refill)(struct asn_per_data_s *);
+ void *refill_key;
} asn_per_data_t;
/*
@@ -51,6 +52,9 @@
*/
int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits);
+/* Undo the immediately preceeding "get_few_bits" operation */
+void per_get_undo(asn_per_data_t *per_data, int get_nbits);
+
/*
* Extract a large number of bits from the specified PER data pointer.
* This function returns -1 if the specified number of bits could not be