]> git.sesse.net Git - vlc/blobdiff - modules/codec/cmml/xtag.c
Fix most of the issues of the Equalizer.
[vlc] / modules / codec / cmml / xtag.c
index 70fefb20ad7b9d1197d19da78e5ceeae3861114a..a7e3b97633f1fe41d9dcb14487c292bbe14a63c0 100644 (file)
@@ -24,8 +24,9 @@
  * 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>
@@ -35,6 +36,8 @@
 
 #include <xlist.h>
 
+#include <assert.h>
+
 #undef XTAG_DEBUG
 
 #undef FALSE
@@ -80,6 +83,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
@@ -411,14 +423,14 @@ xtag_free (XTag * xtag)
 
   if (xtag == NULL) return NULL;
 
-  if (xtag->name) free (xtag->name);
-  if (xtag->pcdata) free (xtag->pcdata);
+  free( xtag->name );
+  free( xtag->pcdata );
 
   for (l = xtag->attributes; l; l = l->next) {
     if ((attr = (XAttribute *)l->data) != NULL) {
-      if (attr->name) free (attr->name);
-      if (attr->value) free (attr->value);
-      free (attr);
+      free( attr->name );
+      free( attr->value );
+      free( attr );
     }
   }
   xlist_free (xtag->attributes);