[packages] ezxml: clean patch headers and new ezxml_cut patch
authorRaphaël Huck <rhk@cksum.org>
Mon, 13 Sep 2010 14:46:43 +0000 (14:46 +0000)
committerRaphaël Huck <rhk@cksum.org>
Mon, 13 Sep 2010 14:46:43 +0000 (14:46 +0000)
SVN-Revision: 23053

libs/ezxml/patches/100-cross_compile.patch
libs/ezxml/patches/101-build_shared.patch
libs/ezxml/patches/200-ezxml_parse_str_d.patch
libs/ezxml/patches/300-ezxml_int.patch
libs/ezxml/patches/400-ezxml_child.patch
libs/ezxml/patches/500-ezxml_cut.patch [new file with mode: 0644]

index 28a8164c64f5fbc408b45de98a5fb8616a9465a5..dd3ef3d15e0f288558d2e4a51fcec1b851ad2f57 100644 (file)
@@ -1,6 +1,5 @@
-diff -pruN ezxml-0.8.6.orig/GNUmakefile ezxml-0.8.6/GNUmakefile
---- ezxml-0.8.6.orig/GNUmakefile       2007-08-30 17:38:55.000000000 +0200
-+++ ezxml-0.8.6/GNUmakefile    2007-08-30 17:41:12.000000000 +0200
+--- a/GNUmakefile
++++ b/GNUmakefile
 @@ -21,10 +21,10 @@
  # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
index 988868686009ddfbdc8afd0a230571a0cb22bbca..e3124f073ba0c7829f5fb26d06d8b9553de9b779 100644 (file)
@@ -1,6 +1,5 @@
-diff -pruN ezxml-0.8.6.orig/GNUmakefile ezxml-0.8.6/GNUmakefile
---- ezxml-0.8.6.orig/GNUmakefile       2008-12-16 15:22:46.773434689 +0100
-+++ ezxml-0.8.6/GNUmakefile    2008-12-16 15:22:27.337440224 +0100
+--- a/GNUmakefile
++++ b/GNUmakefile
 @@ -28,6 +28,7 @@ RM = rm -f
  DEBUG_CFLAGS = -O0 -g
  OBJS = ezxml.o
index 17d5efaef57def936ba1c39801d38d890f70e67d..dd65defb240d6c95f1e635f699baba94bc4b37d8 100644 (file)
@@ -1,7 +1,6 @@
-diff -pruN ezxml-0.8.6.orig/ezxml.c ezxml-0.8.6/ezxml.c
---- ezxml-0.8.6.orig/ezxml.c   2006-06-08 04:33:38.000000000 +0200
-+++ ezxml-0.8.6/ezxml.c        2008-02-15 14:35:17.000000000 +0100
-@@ -599,6 +599,19 @@ ezxml_t ezxml_parse_str(char *s, size_t 
+--- a/ezxml.c
++++ b/ezxml.c
+@@ -599,6 +599,19 @@ ezxml_t ezxml_parse_str(char *s, size_t
      else return ezxml_err(root, d, "unclosed tag <%s>", root->cur->name);
  }
  
@@ -21,9 +20,8 @@ diff -pruN ezxml-0.8.6.orig/ezxml.c ezxml-0.8.6/ezxml.c
  // Wrapper for ezxml_parse_str() that accepts a file stream. Reads the entire
  // stream into memory and then parses it. For xml files, use ezxml_parse_file()
  // or ezxml_parse_fd()
-diff -pruN ezxml-0.8.6.orig/ezxml.h ezxml-0.8.6/ezxml.h
---- ezxml-0.8.6.orig/ezxml.h   2006-06-08 03:57:30.000000000 +0200
-+++ ezxml-0.8.6/ezxml.h        2008-02-15 14:37:15.000000000 +0100
+--- a/ezxml.h
++++ b/ezxml.h
 @@ -59,6 +59,11 @@ struct ezxml {
  // pass in the copy. Returns NULL on failure.
  ezxml_t ezxml_parse_str(char *s, size_t len);
index 00a3d18cc61598586b697f2bf7df8d3d1162f8b8..1616bd5f870c8a181a974077bf53b69ce7a61a05 100644 (file)
@@ -1,6 +1,5 @@
-diff -pruN ezxml-0.8.6.orig/ezxml.c ezxml-0.8.6/ezxml.c
---- ezxml-0.8.6.orig/ezxml.c   2008-12-16 17:02:17.262312778 +0100
-+++ ezxml-0.8.6/ezxml.c        2008-12-16 17:03:24.231073153 +0100
+--- a/ezxml.c
++++ b/ezxml.c
 @@ -25,6 +25,7 @@
  #include <stdlib.h>
  #include <stdio.h>
@@ -86,9 +85,8 @@ diff -pruN ezxml-0.8.6.orig/ezxml.c ezxml-0.8.6/ezxml.c
  // sets a flag for the given tag and returns the tag
  ezxml_t ezxml_set_flag(ezxml_t xml, short flag)
  {
-diff -pruN ezxml-0.8.6.orig/ezxml.h ezxml-0.8.6/ezxml.h
---- ezxml-0.8.6.orig/ezxml.h   2008-12-16 17:02:17.262312778 +0100
-+++ ezxml-0.8.6/ezxml.h        2008-12-16 17:03:44.189450448 +0100
+--- a/ezxml.h
++++ b/ezxml.h
 @@ -95,9 +95,13 @@ ezxml_t ezxml_idx(ezxml_t xml, int idx);
  // returns the given tag's character content or empty string if none
  #define ezxml_txt(xml) ((xml) ? xml->txt : "")
index 46d2faa08fce14d3f23d1677e4338e3b59808b53..96e30858a5fdbb5cac72922b73bc5fdd5dbb5631 100644 (file)
@@ -1,6 +1,5 @@
-diff -pruN ezxml-0.8.6.orig/ezxml.h ezxml-0.8.6/ezxml.h
---- ezxml-0.8.6.orig/ezxml.h   2008-12-16 17:07:47.585487234 +0100
-+++ ezxml-0.8.6/ezxml.h        2008-12-16 17:08:29.037939949 +0100
+--- a/ezxml.h
++++ b/ezxml.h
 @@ -175,6 +175,17 @@ ezxml_t ezxml_insert(ezxml_t xml, ezxml_
  // removes a tag along with all its subtags
  #define ezxml_remove(xml) ezxml_free(ezxml_cut(xml))
diff --git a/libs/ezxml/patches/500-ezxml_cut.patch b/libs/ezxml/patches/500-ezxml_cut.patch
new file mode 100644 (file)
index 0000000..63642de
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/ezxml.c
++++ b/ezxml.c
+@@ -1042,7 +1042,7 @@ ezxml_t ezxml_cut(ezxml_t xml)
+             cur = xml->parent->child; // go back to head of subtag list
+             if (strcmp(cur->name, xml->name)) { // not in first sibling list
+-                while (strcmp(cur->sibling->name, xml->name))
++                while (cur->sibling && strcmp(cur->sibling->name, xml->name))
+                     cur = cur->sibling;
+                 if (cur->sibling == xml) { // first of a sibling list
+                     cur->sibling = (xml->next) ? xml->next
+@@ -1051,8 +1051,9 @@ ezxml_t ezxml_cut(ezxml_t xml)
+                 else cur = cur->sibling; // not first of a sibling list
+             }
+-            while (cur->next && cur->next != xml) cur = cur->next;
+-            if (cur->next) cur->next = cur->next->next; // patch next list
++            cur = xml->parent->child; // go back to head of subtag list
++            while (cur && cur->next != xml) cur = cur->ordered;
++            if (cur && cur->next) cur->next = cur->next->next; // patch next list
+         }        
+     }
+     xml->ordered = xml->sibling = xml->next = NULL;