Changeset b46769d for lib


Ignore:
Timestamp:
2010-08-12T22:44:56Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
91d6e91
Parents:
be7a180
Message:

Some syntax checking fixups; don't make the same mistake of failing just if
the MSN server is sending a little bit *more* info.
And adding xt_insert_node() used in the ADL generation code.

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/xmltree.c

    rbe7a180 rb46769d  
    550550}
    551551
     552/* Same, but at the beginning. */
     553void xt_insert_child( struct xt_node *parent, struct xt_node *child )
     554{
     555        struct xt_node *node, *last;
     556       
     557        for( node = child; node; node = node->next )
     558        {
     559                if( node->parent != NULL )
     560                {
     561                        /* ERROR CONDITION: They seem to have a parent already??? */
     562                }
     563               
     564                node->parent = parent;
     565                last = node;
     566        }
     567       
     568        last->next = parent->children;
     569        parent->children = child;
     570}
     571
    552572void xt_add_attr( struct xt_node *node, const char *key, const char *value )
    553573{
  • lib/xmltree.h

    rbe7a180 rb46769d  
    9292struct xt_node *xt_new_node( char *name, const char *text, struct xt_node *children );
    9393void xt_add_child( struct xt_node *parent, struct xt_node *child );
     94void xt_insert_child( struct xt_node *parent, struct xt_node *child );
    9495void xt_add_attr( struct xt_node *node, const char *key, const char *value );
    9596int xt_remove_attr( struct xt_node *node, const char *key );
Note: See TracChangeset for help on using the changeset viewer.