summaryrefslogtreecommitdiff
path: root/lib/structure.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-10-06 14:29:37 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-10-06 14:29:37 +0200
commit22dd88046a752020c9b7aec5710231da92cdbeb7 (patch)
tree64e9155520d48d3ca7df5668f3492bd2354da543 /lib/structure.c
parent40e7731b1ff6b250744b76216945308dc7146213 (diff)
downloadlibtasn1-22dd88046a752020c9b7aec5710231da92cdbeb7.tar.gz
asn_ -> asn1_
Diffstat (limited to 'lib/structure.c')
-rw-r--r--lib/structure.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/lib/structure.c b/lib/structure.c
index 4ce9f6a..3eb562f 100644
--- a/lib/structure.c
+++ b/lib/structure.c
@@ -44,12 +44,12 @@ extern char _asn1_identifierMissing[];
/* and CONST_ constants). */
/* Return: pointer to the new element. */
/******************************************************/
-asn_node_t
+asn1_node_t
_asn1_add_single_node (unsigned int type)
{
- asn_node_t punt;
+ asn1_node_t punt;
- punt = calloc (1, sizeof (struct asn_node_st));
+ punt = calloc (1, sizeof (struct asn1_node_st));
if (punt == NULL)
return NULL;
@@ -67,8 +67,8 @@ _asn1_add_single_node (unsigned int type)
/* node: NODE_ASN element pointer. */
/* Return: NULL if not found. */
/******************************************************************/
-asn_node_t
-_asn1_find_left (asn_node_t node)
+asn1_node_t
+_asn1_find_left (asn1_node_t node)
{
if ((node == NULL) || (node->left == NULL) || (node->left->down == node))
return NULL;
@@ -78,11 +78,11 @@ _asn1_find_left (asn_node_t node)
int
-_asn1_create_static_structure (asn_node_t pointer, char *output_file_name,
+_asn1_create_static_structure (asn1_node_t pointer, char *output_file_name,
char *vector_name)
{
FILE *file;
- asn_node_t p;
+ asn1_node_t p;
unsigned long t;
file = fopen (output_file_name, "w");
@@ -96,7 +96,7 @@ _asn1_create_static_structure (asn_node_t pointer, char *output_file_name,
fprintf (file, "#include <libtasn1.h>\n\n");
- fprintf (file, "const asn_static_node_t %s[] = {\n", vector_name);
+ fprintf (file, "const asn1_static_node_t %s[] = {\n", vector_name);
p = pointer;
@@ -174,10 +174,10 @@ _asn1_create_static_structure (asn_node_t pointer, char *output_file_name,
* %ASN1_ARRAY_ERROR if the array pointed by @array is wrong.
**/
int
-asn1_array2tree (const asn_static_node_t * array, asn_node_t * definitions,
+asn1_array2tree (const asn1_static_node_t * array, asn1_node_t * definitions,
char *errorDescription)
{
- asn_node_t p, p_last = NULL;
+ asn1_node_t p, p_last = NULL;
unsigned long k;
int move;
int result;
@@ -282,9 +282,9 @@ asn1_array2tree (const asn_static_node_t * array, asn_node_t * definitions,
* *@structure was NULL.
**/
int
-asn1_delete_structure (asn_node_t * structure)
+asn1_delete_structure (asn1_node_t * structure)
{
- asn_node_t p, p2, p3;
+ asn1_node_t p, p2, p3;
if (*structure == NULL)
return ASN1_ELEMENT_NOT_FOUND;
@@ -346,9 +346,9 @@ asn1_delete_structure (asn_node_t * structure)
* the @element_name was not found.
**/
int
-asn1_delete_element (asn_node_t structure, const char *element_name)
+asn1_delete_element (asn1_node_t structure, const char *element_name)
{
- asn_node_t p2, p3, source_node;
+ asn1_node_t p2, p3, source_node;
source_node = asn1_find_node (structure, element_name);
@@ -371,10 +371,10 @@ asn1_delete_element (asn_node_t structure, const char *element_name)
return asn1_delete_structure (&source_node);
}
-asn_node_t
-_asn1_copy_structure3 (asn_node_t source_node)
+asn1_node_t
+_asn1_copy_structure3 (asn1_node_t source_node)
{
- asn_node_t dest_node, p_s, p_d, p_d_prev;
+ asn1_node_t dest_node, p_s, p_d, p_d_prev;
int move;
if (source_node == NULL)
@@ -429,10 +429,10 @@ _asn1_copy_structure3 (asn_node_t source_node)
}
-static asn_node_t
-_asn1_copy_structure2 (asn_node_t root, const char *source_name)
+static asn1_node_t
+_asn1_copy_structure2 (asn1_node_t root, const char *source_name)
{
- asn_node_t source_node;
+ asn1_node_t source_node;
source_node = asn1_find_node (root, source_name);
@@ -442,9 +442,9 @@ _asn1_copy_structure2 (asn_node_t root, const char *source_name)
static int
-_asn1_type_choice_config (asn_node_t node)
+_asn1_type_choice_config (asn1_node_t node)
{
- asn_node_t p, p2, p3, p4;
+ asn1_node_t p, p2, p3, p4;
int move, tlen;
if (node == NULL)
@@ -527,9 +527,9 @@ _asn1_type_choice_config (asn_node_t node)
static int
-_asn1_expand_identifier (asn_node_t * node, asn_node_t root)
+_asn1_expand_identifier (asn1_node_t * node, asn1_node_t root)
{
- asn_node_t p, p2, p3;
+ asn1_node_t p, p2, p3;
char name2[ASN1_MAX_NAME_SIZE + 2];
int move;
@@ -649,10 +649,10 @@ _asn1_expand_identifier (asn_node_t * node, asn_node_t root)
* @source_name is not known.
**/
int
-asn1_create_element (asn_node_t definitions, const char *source_name,
- asn_node_t * element)
+asn1_create_element (asn1_node_t definitions, const char *source_name,
+ asn1_node_t * element)
{
- asn_node_t dest_node;
+ asn1_node_t dest_node;
int res;
dest_node = _asn1_copy_structure2 (definitions, source_name);
@@ -684,10 +684,10 @@ asn1_create_element (asn_node_t definitions, const char *source_name,
* from the @name element inside the structure @structure.
**/
void
-asn1_print_structure (FILE * out, asn_node_t structure, const char *name,
+asn1_print_structure (FILE * out, asn1_node_t structure, const char *name,
int mode)
{
- asn_node_t p, root;
+ asn1_node_t p, root;
int k, indent = 0, len, len2, len3;
if (out == NULL)
@@ -1048,9 +1048,9 @@ asn1_print_structure (FILE * out, asn_node_t structure, const char *name,
* @name is not known, %ASN1_GENERIC_ERROR if pointer @num is %NULL.
**/
int
-asn1_number_of_elements (asn_node_t element, const char *name, int *num)
+asn1_number_of_elements (asn1_node_t element, const char *name, int *num)
{
- asn_node_t node, p;
+ asn1_node_t node, p;
if (num == NULL)
return ASN1_GENERIC_ERROR;
@@ -1086,11 +1086,11 @@ asn1_number_of_elements (asn_node_t element, const char *name, int *num)
* the OID.
**/
const char *
-asn1_find_structure_from_oid (asn_node_t definitions, const char *oidValue)
+asn1_find_structure_from_oid (asn1_node_t definitions, const char *oidValue)
{
char definitionsName[ASN1_MAX_NAME_SIZE], name[2 * ASN1_MAX_NAME_SIZE + 1];
char value[ASN1_MAX_NAME_SIZE];
- asn_node_t p;
+ asn1_node_t p;
int len;
int result;
@@ -1131,24 +1131,24 @@ asn1_find_structure_from_oid (asn_node_t definitions, const char *oidValue)
/**
* asn1_copy_node:
- * @dst: Destination asn_node_t node.
+ * @dst: Destination asn1_node_t node.
* @dst_name: Field name in destination node.
- * @src: Source asn_node_t node.
+ * @src: Source asn1_node_t node.
* @src_name: Field name in source node.
*
- * Create a deep copy of a asn_node_t variable.
+ * Create a deep copy of a asn1_node_t variable.
*
* Returns: Return %ASN1_SUCCESS on success.
**/
int
-asn1_copy_node (asn_node_t dst, const char *dst_name,
- asn_node_t src, const char *src_name)
+asn1_copy_node (asn1_node_t dst, const char *dst_name,
+ asn1_node_t src, const char *src_name)
{
/* FIXME: rewrite using copy_structure().
* It seems quite hard to do.
*/
int result;
- asn_node_t dst_node;
+ asn1_node_t dst_node;
void *data = NULL;
int size = 0;