]> git.sesse.net Git - vlc/blobdiff - modules/codec/cmml/xtag.c
codecs & packetizers: fix warnings
[vlc] / modules / codec / cmml / xtag.c
index 4ea0000c055c335f3b502fa9ccb5c93996d65f10..024e1e93387e8e9f27631ec38f066a70a7d55827 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
-
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <ctype.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include <xlist.h>
 
@@ -78,6 +81,15 @@ struct _XTagParser {
   char * end;
 };
 
+XTag * xtag_free (XTag * xtag);
+XTag * xtag_new_parse (const char * s, int n);
+char * xtag_get_name (XTag * xtag);
+char * xtag_get_pcdata (XTag * xtag);
+char * xtag_get_attribute (XTag * xtag, char * attribute);
+XTag * xtag_first_child (XTag * xtag, char * name);
+XTag * xtag_next_child (XTag * xtag, char * name);
+int    xtag_snprint (char * buf, int n, XTag * xtag);
+
 /* Character classes */
 #define X_NONE           0
 #define X_WHITESPACE  1<<0
@@ -174,7 +186,7 @@ xtag_skip_to (XTagParser * parser, int char_class)
     }
   }
 
-  return;  
+  return;
 }
 #endif
 
@@ -607,7 +619,7 @@ 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);
 
@@ -656,19 +668,19 @@ 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);
     }
-    
     if (xtag->children == NULL) {
       nn = xtag_snprints (buf, n, "/>", NULL);
       FORWARD(nn);
 
       return written;
     }
-    
     nn = xtag_snprints (buf, n, ">", NULL);
     FORWARD(nn);
   }