]> git.sesse.net Git - vlc/blobdiff - modules/misc/xml/xtag.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / misc / xml / xtag.c
index a553ea7bbb844ef7e2b30a3b8574f22c576489d9..d9b866d760f2a3b03a3220827dc2678391ec5c2b 100644 (file)
@@ -26,7 +26,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#include <stdlib.h>
 #include <vlc/vlc.h>
 
 #include "vlc_xml.h"
 #include "vlc_stream.h"
 
 #include <ctype.h>
-#include <string.h>
 #include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
 
 #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  '<!DOCTYPE' ... '>' */
     if ( (parser->end - parser->start) > 8 &&
-                       !strncmp( s, "<!DOCTYPE", 9 ) ) {
+            !strncmp( s, "<!DOCTYPE", 9 ) ) {
         xi = xtag_index( parser, X_CLOSETAG );
         if ( xi > 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, "<![CDATA[", 9 ) ) {
+    if ( (parser->end - parser->start) > 8 &&
+            !strncmp( s, "<![CDATA[", 9 ) ) {
         parser->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 );