Changeset b46769d for lib/xmltree.c


Ignore:
Timestamp:
2010-08-12T22:44:56Z (14 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.

File:
1 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{
Note: See TracChangeset for help on using the changeset viewer.