summaryrefslogtreecommitdiff
path: root/lib/ASN1.y
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-10-01 22:18:09 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-10-01 22:22:33 +0200
commit0e0068c42896c411420da4d03166d54ea32694ee (patch)
tree35a5abbafbb3bdfb2e89a6087fdda70dfb149c9e /lib/ASN1.y
parent841a2450a9d4497c84b248f8faec1e3e38cd195b (diff)
downloadlibtasn1-0e0068c42896c411420da4d03166d54ea32694ee.tar.gz
libtasn1-0e0068c42896c411420da4d03166d54ea32694ee.tar.bz2
libtasn1-0e0068c42896c411420da4d03166d54ea32694ee.zip
eliminated use of old types
Diffstat (limited to 'lib/ASN1.y')
-rw-r--r--lib/ASN1.y21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/ASN1.y b/lib/ASN1.y
index 66173ea..68515cf 100644
--- a/lib/ASN1.y
+++ b/lib/ASN1.y
@@ -32,9 +32,9 @@
#include <structure.h>
static FILE *file_asn1; /* Pointer to file to parse */
-static asn1_retCode result_parse; /* result of the parser
+static int result_parse; /* result of the parser
algorithm */
-static ASN1_TYPE p_tree; /* pointer to the root of the
+static asn_node_t p_tree; /* pointer to the root of the
structure created by the
parser*/
static unsigned long lineNumber; /* line number describing the
@@ -57,7 +57,7 @@ static int _asn1_yylex(void);
%union {
unsigned int constant;
char str[ASN1_MAX_NAME_SIZE+1];
- ASN1_TYPE node;
+ asn_node_t node;
}
@@ -568,23 +568,24 @@ _asn1_create_errorDescription(int error,char *errorDescription)
*
* Returns: %ASN1_SUCCESS if the file has a correct syntax and every
* identifier is known, %ASN1_ELEMENT_NOT_EMPTY if @definitions not
- * %ASN1_TYPE_EMPTY, %ASN1_FILE_NOT_FOUND if an error occured while
+ * %NULL, %ASN1_FILE_NOT_FOUND if an error occured while
* opening @file_name, %ASN1_SYNTAX_ERROR if the syntax is not
* correct, %ASN1_IDENTIFIER_NOT_FOUND if in the file there is an
* identifier that is not defined, %ASN1_NAME_TOO_LONG if in the
* file there is an identifier whith more than %ASN1_MAX_NAME_SIZE
* characters.
**/
-asn1_retCode
-asn1_parser2tree(const char *file_name, ASN1_TYPE *definitions,
- char *errorDescription){
+int
+asn1_parser2tree(const char *file_name, asn_node_t *definitions,
+ char *errorDescription)
+{
- p_tree=ASN1_TYPE_EMPTY;
+ p_tree=NULL;
- if(*definitions != ASN1_TYPE_EMPTY)
+ if(*definitions != NULL)
return ASN1_ELEMENT_NOT_EMPTY;
- *definitions=ASN1_TYPE_EMPTY;
+ *definitions=NULL;
fileName = file_name;