X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fmisc%2Fxml%2Fxtag.c;h=d9b866d760f2a3b03a3220827dc2678391ec5c2b;hb=6ee1e193fd896ab9a4729fde14f009d9ce629815;hp=a553ea7bbb844ef7e2b30a3b8574f22c576489d9;hpb=2b37ec2d3d1aea84e903fc7b354db8f613604f2d;p=vlc diff --git a/modules/misc/xml/xtag.c b/modules/misc/xml/xtag.c index a553ea7bbb..d9b866d760 100644 --- a/modules/misc/xml/xtag.c +++ b/modules/misc/xml/xtag.c @@ -26,7 +26,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include #include #include "vlc_xml.h" @@ -34,10 +33,7 @@ #include "vlc_stream.h" #include -#include #include -#include -#include #undef XTAG_DEBUG @@ -349,7 +345,7 @@ static XList *xlist_append( XList *list, void *data ) if( last->next == NULL ) break; if( last ) last->next = l; - l->prev = last; + l->prev = last; return list; } @@ -558,7 +554,7 @@ static XTag *xtag_parse_tag( XTagParser *parser ) char *name; char *pcdata; char *s; - int xi; + int xi; if( !parser->valid ) return NULL; @@ -566,7 +562,7 @@ static XTag *xtag_parse_tag( XTagParser *parser ) /* if this starts a comment tag, skip until end */ if( (parser->end - parser->start) > 7 && - xtag_cin( s[0], X_OPENTAG ) && xtag_cin( s[1], X_EMARK ) && + xtag_cin( s[0], X_OPENTAG ) && xtag_cin( s[1], X_EMARK ) && xtag_cin( s[2], X_DASH ) && xtag_cin( s[3], X_DASH ) ) { parser->start = s = &s[4]; @@ -585,7 +581,7 @@ static XTag *xtag_parse_tag( XTagParser *parser ) /* ignore processing instructions '' */ if( (parser->end - parser->start) > 4 && - xtag_cin( s[0], X_OPENTAG ) && xtag_cin( s[1], X_QMARK ) ) + xtag_cin( s[0], X_OPENTAG ) && xtag_cin( s[1], X_QMARK ) ) { parser->start = s = &s[2]; while ((xi = xtag_index( parser, X_QMARK )) >= 0) { @@ -600,7 +596,7 @@ static XTag *xtag_parse_tag( XTagParser *parser ) /* ignore doctype '' */ if ( (parser->end - parser->start) > 8 && - !strncmp( s, " 0 ) { parser->start = s = &s[xi+1]; @@ -630,8 +626,8 @@ static XTag *xtag_parse_tag( XTagParser *parser ) return NULL; /* parse CDATA content */ - if ( (parser->end - parser->start) > 8 && - !strncmp( s, "end - parser->start) > 8 && + !strncmp( s, "start = s = &s[9]; while (parser->end - s > 2) { if (strncmp( s, "]]>", 3 ) == 0) { @@ -777,7 +773,7 @@ static XTag *xtag_new_parse( const char *s, int n ) { #ifdef XTAG_DEBUG printf ("empty buffer"); -#endif +#endif return NULL; } else parser.end = (char *)&s[n]; @@ -950,7 +946,7 @@ static int xtag_snprints( char *buf, int n, ... ) int len, to_copy, total = 0; va_start( ap, n ); - + for( s = va_arg( ap, char * ); s; s = va_arg( ap, char *) ) { len = strlen (s); @@ -1004,7 +1000,7 @@ static int xtag_snprint( char *buf, int n, XTag *xtag ) for( l = xtag->attributes; l; l = l->next ) { attr = (XAttribute *)l->data; - + nn = xtag_snprints( buf, n, " ", attr->name, "=\"", attr->value, "\"", NULL); FORWARD( nn );