add missing xml closers, add fix for folder bug, add roundoff fixups
[goodguy/history.git] / cinelerra-5.1 / cinelerra / filexml.C
index eccb503ac6143b1e9f5fa44c04236c89a87b670d..5aa82f56942f39f7425bd185ec3506c88f4952b2 100644 (file)
@@ -472,6 +472,22 @@ int FileXML::read_tag()
        return tag.read_tag(this);
 }
 
+int FileXML::skip_tag()
+{
+       char tag_title[sizeof(tag.title)];
+       strcpy(tag_title, tag.title);
+       int n = 1;
+       while( !read_tag() ) {
+               if( tag.title[0] == tag_title[0] ) {
+                       if( !strcasecmp(&tag_title[1], &tag.title[1]) ) ++n;
+               }
+               else if( tag.title[0] != '/' ) continue;
+               else if( strcasecmp(&tag_title[0], &tag.title[1]) ) continue;
+               else if( --n <= 0 ) return 0;
+       }
+       return 1;
+}
+
 int FileXML::read_data_until(const char *tag_end, char *out, int len)
 {
        long ipos = buffer->itell();