Revert, don't export asn1_find_up.
authorSimon Josefsson <simon@josefsson.org>
Wed, 8 Mar 2006 15:37:34 +0000 (15:37 +0000)
committerSimon Josefsson <simon@josefsson.org>
Wed, 8 Mar 2006 15:37:34 +0000 (15:37 +0000)
lib/coding.c
lib/decoding.c
lib/element.c
lib/parser_aux.c
lib/structure.c

index 1f93382..4be3a2f 100644 (file)
@@ -937,7 +937,7 @@ asn1_der_coding(ASN1_TYPE element,const char *name,void *ider,int *len,
          move=RIGHT;
          continue;
        }
-       else p=asn1_find_up(p);
+       else p=_asn1_find_up(p);
        move=UP;
       }
       if(move==UP){
@@ -988,7 +988,7 @@ asn1_der_coding(ASN1_TYPE element,const char *name,void *ider,int *len,
       if(p->right) p=p->right;
       else move=UP;
     }
-   if(move==UP) p=asn1_find_up(p);
+   if(move==UP) p=_asn1_find_up(p);
   }
 
   *len=counter;
index f0e3e97..1539666 100644 (file)
@@ -447,7 +447,7 @@ _asn1_delete_not_used(node_asn *node)
       p2=NULL;
       if(p!=node){
        p2=_asn1_find_left(p);
-       if(!p2) p2=asn1_find_up(p);
+       if(!p2) p2=_asn1_find_up(p);
       }
       asn1_delete_structure(&p);
       p=p2;
@@ -463,7 +463,7 @@ _asn1_delete_not_used(node_asn *node)
       else if(p->right) p=p->right;
       else{
        while(1){
-         p=asn1_find_up(p);
+         p=_asn1_find_up(p);
          if(p==node){
            p=NULL;
            break;
@@ -661,7 +661,7 @@ asn1_der_decoding(ASN1_TYPE *element,const void *ider,int len,
     ris=ASN1_SUCCESS;
     if(move!=UP){
       if(p->type&CONST_SET){
-       p2=asn1_find_up(p);
+       p2=_asn1_find_up(p);
        len2=strtol(p2->value,NULL,10);
        if(len2==-1){
          if(!der[counter] && !der[counter+1]){
@@ -708,7 +708,7 @@ asn1_der_decoding(ASN1_TYPE *element,const void *ider,int len,
       }
 
       if((p->type&CONST_OPTION) || (p->type&CONST_DEFAULT)){
-       p2=asn1_find_up(p);
+       p2=_asn1_find_up(p);
        len2=strtol(p2->value,NULL,10);
        if(counter==len2){
          if(p->right){
@@ -758,7 +758,7 @@ asn1_der_decoding(ASN1_TYPE *element,const void *ider,int len,
       }
 
       if((p->type&CONST_OPTION) || (p->type&CONST_DEFAULT)){
-       p2=asn1_find_up(p);
+       p2=_asn1_find_up(p);
        len2=strtol(p2->value,NULL,10);
        if((len2!=-1) && (counter>len2)) ris=ASN1_TAG_ERROR;
       }
@@ -1035,7 +1035,7 @@ asn1_der_decoding(ASN1_TYPE *element,const void *ider,int len,
       if(p->right) p=p->right;
       else move=UP;
     }
-    if(move==UP) p=asn1_find_up(p);
+    if(move==UP) p=_asn1_find_up(p);
   }
 
   _asn1_delete_not_used(*element);
@@ -1144,7 +1144,7 @@ asn1_der_decoding_element(ASN1_TYPE *structure,const char *elementName,
 
     if(move!=UP){
       if(p->type&CONST_SET){
-       p2=asn1_find_up(p);
+       p2=_asn1_find_up(p);
        len2=strtol(p2->value,NULL,10);
        if(counter==len2){
          p=p2;
@@ -1183,7 +1183,7 @@ asn1_der_decoding_element(ASN1_TYPE *structure,const char *elementName,
       }
 
       if((p->type&CONST_OPTION) || (p->type&CONST_DEFAULT)){
-       p2=asn1_find_up(p);
+       p2=_asn1_find_up(p);
        len2=strtol(p2->value,NULL,10);
        if(counter==len2){
          if(p->right){
@@ -1233,7 +1233,7 @@ asn1_der_decoding_element(ASN1_TYPE *structure,const char *elementName,
       }
 
       if((p->type&CONST_OPTION) || (p->type&CONST_DEFAULT)){
-       p2=asn1_find_up(p);
+       p2=_asn1_find_up(p);
        len2=strtol(p2->value,NULL,10);
        if(counter>len2) ris=ASN1_TAG_ERROR;
       }
@@ -1628,7 +1628,7 @@ asn1_der_decoding_element(ASN1_TYPE *structure,const char *elementName,
     }
 
     if(move==UP){
-      p=asn1_find_up(p);
+      p=_asn1_find_up(p);
 
       if(state != FOUND){
        dot_p=char_p=currentName;
@@ -1729,7 +1729,7 @@ asn1_der_decoding_startEnd(ASN1_TYPE element,const void *ider,int len,
     
     if(move!=UP){
       if(p->type&CONST_SET){
-       p2=asn1_find_up(p);
+       p2=_asn1_find_up(p);
        len2=strtol(p2->value,NULL,10);
        if(len2==-1){
          if(!der[counter] && !der[counter+1]){
@@ -1929,7 +1929,7 @@ asn1_der_decoding_startEnd(ASN1_TYPE element,const void *ider,int len,
       if(p->right) p=p->right;
       else move=UP;
     }
-    if(move==UP) p=asn1_find_up(p);
+    if(move==UP) p=_asn1_find_up(p);
   }
 
   return ASN1_ELEMENT_NOT_FOUND;
@@ -1989,7 +1989,7 @@ asn1_expand_any_defined_by(ASN1_TYPE definitions,ASN1_TYPE *element)
          break;
        }
        
-       p3=asn1_find_up(p);
+       p3=_asn1_find_up(p);
        
        if(!p3){
          retCode=ASN1_ERROR_TYPE_ANY;
@@ -2005,8 +2005,8 @@ asn1_expand_any_defined_by(ASN1_TYPE definitions,ASN1_TYPE *element)
        if((!p3) || (type_field(p3->type)!=TYPE_OBJECT_ID) ||
           (p3->value==NULL)){
 
-         p3=asn1_find_up(p);
-         p3=asn1_find_up(p3);
+         p3=_asn1_find_up(p);
+         p3=_asn1_find_up(p3);
 
          if(!p3){
            retCode=ASN1_ERROR_TYPE_ANY;
@@ -2114,7 +2114,7 @@ asn1_expand_any_defined_by(ASN1_TYPE definitions,ASN1_TYPE *element)
     else if(p->right) p=p->right;
     else{
       while(1){
-       p=asn1_find_up(p);
+       p=_asn1_find_up(p);
        if(p==*element){
          p=NULL;
          break;
index dc98c2f..afc1423 100644 (file)
@@ -51,7 +51,7 @@ _asn1_hierarchical_name(node_asn *node,char *name,int name_size)
       _asn1_str_cat(name,name_size,".");
       _asn1_str_cat(name,name_size,tmp_name);
     }
-    p=asn1_find_up(p);
+    p=_asn1_find_up(p);
   }
 
   if(name[0]==0) _asn1_str_cpy(name,name_size,"ROOT");
index 464ad50..5b82d27 100644 (file)
@@ -365,16 +365,15 @@ _asn1_remove_node(node_asn *node)
   _asn1_free(node);
 }
 
-/**
- * asn1_find_up:
- * @node: NODE_ASN element pointer.
- *
- * Return the father of the NODE_ASN element.
- *
- * Return value: Return the father of the node, or %NULL if not found.
- **/
-ASN1_TYPE
-asn1_find_up(ASN1_TYPE node)
+/******************************************************************/
+/* Function : __asn1_find_up                                       */
+/* Description: return the father of the NODE_ASN element.        */
+/* Parameters:                                                    */
+/*   node: NODE_ASN element pointer.                              */
+/* Return: Null if not found.                                     */
+/******************************************************************/
+node_asn *
+__asn1_find_up(node_asn *node)
 {
   node_asn *p;
 
@@ -490,7 +489,7 @@ _asn1_change_integer_value(ASN1_TYPE node)
       else if(p->right) p=p->right;
       else{
        while(1){
-         p=asn1_find_up(p);
+         p=_asn1_find_up(p);
          if(p==node){
            p=NULL;
            break;
@@ -586,7 +585,7 @@ _asn1_expand_object_id(ASN1_TYPE node)
       if(p->right) p=p->right;
       else move=UP;
     }
-    if(move==UP) p=asn1_find_up(p);
+    if(move==UP) p=_asn1_find_up(p);
   }
 
 
@@ -637,7 +636,7 @@ _asn1_expand_object_id(ASN1_TYPE node)
       if(p->right) p=p->right;
       else move=UP;
     }
-    if(move==UP) p=asn1_find_up(p);
+    if(move==UP) p=_asn1_find_up(p);
   }
 
   return ASN1_SUCCESS;
@@ -690,7 +689,7 @@ _asn1_type_set_config(ASN1_TYPE node)
       if(p->right) p=p->right;
       else move=UP;
     }
-    if(move==UP) p=asn1_find_up(p);
+    if(move==UP) p=_asn1_find_up(p);
   }
 
   return ASN1_SUCCESS;
@@ -771,7 +770,7 @@ _asn1_check_identifier(ASN1_TYPE node)
     else if(p->right) p=p->right;
     else{
       while(1){
-       p=asn1_find_up(p);
+       p=_asn1_find_up(p);
        if(p==node){
          p=NULL;
          break;
@@ -822,7 +821,7 @@ _asn1_set_default_tag(ASN1_TYPE node)
     else if(p->right) p=p->right;
     else{
       while(1){
-         p=asn1_find_up(p);
+         p=_asn1_find_up(p);
          if(p==node){
            p=NULL;
            break;
index e6262b7..3eaf338 100644 (file)
@@ -122,7 +122,7 @@ _asn1_create_static_structure(ASN1_TYPE pointer,char* output_file_name,char *vec
    }
    else{
      while(1){
-       p=asn1_find_up(p);
+       p=_asn1_find_up(p);
        if(p==pointer){
         p=NULL;
         break;
@@ -199,7 +199,7 @@ asn1_array2tree(const ASN1_ARRAY_TYPE *array,ASN1_TYPE *definitions,
       while(1){
        if(p_last==*definitions) break;
 
-       p_last= asn1_find_up(p_last);
+       p_last= _asn1_find_up(p_last);
 
        if(p_last==NULL) break;
 
@@ -274,7 +274,7 @@ asn1_delete_structure(ASN1_TYPE *structure)
     else{   /* no down */
       p2=p->right;
       if(p!=*structure){
-       p3=asn1_find_up(p);
+       p3=_asn1_find_up(p);
        _asn1_set_down(p3,p2);
        _asn1_remove_node(p);
        p=p3;
@@ -282,7 +282,7 @@ asn1_delete_structure(ASN1_TYPE *structure)
       else{   /* p==root */
        p3=_asn1_find_left(p);
        if(!p3){
-         p3=asn1_find_up(p);
+         p3=_asn1_find_up(p);
          if(p3) _asn1_set_down(p3,p2);
          else{
            if(p->right) p->right->left=NULL;
@@ -327,7 +327,7 @@ asn1_delete_element(ASN1_TYPE structure,const char *element_name)
   p2=source_node->right;
   p3=_asn1_find_left(source_node);
   if(!p3){
-    p3=asn1_find_up(source_node);
+    p3=_asn1_find_up(source_node);
     if(p3)
       _asn1_set_down(p3,p2);
     else
@@ -399,8 +399,8 @@ _asn1_copy_structure3(node_asn *source_node)
       else move=UP;
     }
     if(move==UP){
-      p_s=asn1_find_up(p_s);
-      p_d=asn1_find_up(p_d);
+      p_s=_asn1_find_up(p_s);
+      p_d=_asn1_find_up(p_d);
     }
   }while(p_s!=source_node);
 
@@ -477,7 +477,7 @@ _asn1_type_choice_config(node_asn *node)
       if(p->right) p=p->right;
       else move=UP;
     }
-    if(move==UP) p=asn1_find_up(p);
+    if(move==UP) p=_asn1_find_up(p);
   }
 
   return ASN1_SUCCESS;
@@ -520,7 +520,7 @@ _asn1_expand_identifier(node_asn **node,node_asn *root)
        p3=_asn1_find_left(p);
        if(p3) _asn1_set_right(p3,p2);
        else{
-         p3=asn1_find_up(p);
+         p3=_asn1_find_up(p);
          if(p3) _asn1_set_down(p3,p2);
          else {
            p2->left=NULL;
@@ -555,7 +555,7 @@ _asn1_expand_identifier(node_asn **node,node_asn *root)
       if(p->right) p=p->right;
       else move=UP;
     }
-    if(move==UP) p=asn1_find_up(p);
+    if(move==UP) p=_asn1_find_up(p);
   }
 
   return ASN1_SUCCESS;
@@ -856,7 +856,7 @@ asn1_print_structure(FILE *out,ASN1_TYPE structure,const char *name,int mode)
     else if(p->right) p=p->right;
     else{
       while(1){
-       p=asn1_find_up(p);
+       p=_asn1_find_up(p);
        if(p==root){
          p=NULL;
          break;