Changeset 9ead105 for lib


Ignore:
Timestamp:
2014-10-17T22:37:41Z (10 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
fef97af
Parents:
4f7255d (diff), 46511b3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Bunch of merges from dx.

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/xmltree.c

    r4f7255d r9ead105  
    524524}
    525525
     526struct xt_node *xt_find_node_by_attr( struct xt_node *xt, const char *tag, const char *key, const char *value )
     527{
     528        struct xt_node *c;
     529        char *s;
     530
     531        for( c = xt; ( c = xt_find_node( c, tag ) ); c = c->next )
     532        {
     533                if( ( s = xt_find_attr( c, key ) ) && strcmp( s, value ) == 0 )
     534                {
     535                        return c;
     536                }
     537        }
     538        return NULL;
     539}
     540
     541
    526542/* Strip a few non-printable characters that aren't allowed in XML streams
    527543   (and upset some XMPP servers for example). */
  • lib/xmltree.h

    r4f7255d r9ead105  
    9292struct xt_node *xt_find_path( struct xt_node *node, const char *name );
    9393char *xt_find_attr( struct xt_node *node, const char *key );
     94struct xt_node *xt_find_node_by_attr( struct xt_node *xt, const char *tag, const char *key, const char *value );
    9495
    9596struct xt_node *xt_new_node( char *name, const char *text, struct xt_node *children );
Note: See TracChangeset for help on using the changeset viewer.