Added SILC Thread Queue API
[silc.git] / lib / silcasn1 / silcasn1_i.h
index 122036755cd221868b10ea791ff237c5fe6a9f5d..8dd98752474063889e6111e2b4ecdc8fa8392967 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2003 - 2006 Pekka Riikonen
+  Copyright (C) 2003 - 2007 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
 
 /* ASN.1 context */
 struct SilcAsn1Object {
-  va_list ap;                  /* List of ASN.1 types given as argument */
+  SilcStack orig_stack;                /* Stack given to silc_asn1_alloc */
   SilcStack stack1;            /* Stack for encoder */
   SilcStack stack2;            /* Internal stack for encoding/decoding */
+  va_list ap;                  /* List of ASN.1 types given as argument */
   unsigned int accumul  : 1;   /* Accumulate memory from stack for result */
+  unsigned int switched  : 1;  /* Set when stack2 is set to stack1 */
 };
 
 /* The maximum depth for recursion in encoder and decoder. */
@@ -100,12 +102,14 @@ struct SilcAsn1Object {
     ret_type = (ret_type & 0xffff) & ~0x8000;                          \
   }
 
-#ifdef SILC_DIST_INPLACE
 /* Internal functions */
 
+#if defined(SILC_DEBUG)
 /* Returns string representation of a tag */
 const char *silc_asn1_tag_name(SilcAsn1Tag tag);
+#endif /* SILC_DEBUG */
 
+#ifdef SILC_DIST_INPLACE
 /* Dumps the ASN.1 data block into standard output (stdout). */
 SilcBool silc_asn1_dump(SilcAsn1 asn1, SilcBuffer src);
 #endif /* SILC_DIST_INPLACE */