summaryrefslogtreecommitdiff
path: root/lib
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
parent841a2450a9d4497c84b248f8faec1e3e38cd195b (diff)
downloadlibtasn1-0e0068c42896c411420da4d03166d54ea32694ee.tar.gz
libtasn1-0e0068c42896c411420da4d03166d54ea32694ee.tar.bz2
libtasn1-0e0068c42896c411420da4d03166d54ea32694ee.zip
eliminated use of old types
Diffstat (limited to 'lib')
-rw-r--r--lib/ASN1.c3
-rw-r--r--lib/ASN1.y21
-rw-r--r--lib/libtasn1.h3
3 files changed, 15 insertions, 12 deletions
diff --git a/lib/ASN1.c b/lib/ASN1.c
index f61df56..8a73052 100644
--- a/lib/ASN1.c
+++ b/lib/ASN1.c
@@ -2811,7 +2811,8 @@ _asn1_create_errorDescription(int error,char *errorDescription)
**/
int
asn1_parser2tree(const char *file_name, asn_node_t *definitions,
- char *errorDescription){
+ char *errorDescription)
+{
p_tree=NULL;
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;
diff --git a/lib/libtasn1.h b/lib/libtasn1.h
index f5ecbd7..8ad6b13 100644
--- a/lib/libtasn1.h
+++ b/lib/libtasn1.h
@@ -298,7 +298,8 @@ extern "C"
asn_node_t src, const char *src_name);
/* Compatibility types */
- typedef int asn1_retCode; /* type returned by libtasn1 functions */
+
+typedef int asn1_retCode; /* type returned by libtasn1 functions */
#define node_asn_struct asn_node_st
#define node_asn asn_node_st