Changeset d0752e8 for lib


Ignore:
Timestamp:
2012-09-22T12:12:12Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
11ec078
Parents:
55ccc9a0
Message:

Little cleanup. Use xt_from_string() where possible.

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/xmltree.c

    r55ccc9a0 rd0752e8  
    263263}
    264264
    265 struct xt_node *xt_from_string( const char *in )
     265struct xt_node *xt_from_string( const char *in, int len )
    266266{
    267267        struct xt_parser *parser;
    268268        struct xt_node *ret;
    269269       
     270        if( len == 0 )
     271                len = strlen( in );
     272       
    270273        parser = xt_new( NULL, NULL );
    271         xt_feed( parser, in, strlen( in ) );
     274        xt_feed( parser, in, len );
    272275        ret = parser->root;
    273276        parser->root = NULL;
  • lib/xmltree.h

    r55ccc9a0 rd0752e8  
    8282int xt_handle( struct xt_parser *xt, struct xt_node *node, int depth );
    8383void xt_cleanup( struct xt_parser *xt, struct xt_node *node, int depth );
    84 struct xt_node *xt_from_string( const char *in );
     84struct xt_node *xt_from_string( const char *in, int text_len );
    8585char *xt_to_string( struct xt_node *node );
    8686void xt_print( struct xt_node *node );
Note: See TracChangeset for help on using the changeset viewer.