[packages] ezxml: clean patch headers and new ezxml_cut patch
git-svn-id: svn://svn.openwrt.org/openwrt/packages@23053 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
82b77c0fc0
commit
c804b40766
@ -1,6 +1,5 @@
|
|||||||
diff -pruN ezxml-0.8.6.orig/GNUmakefile ezxml-0.8.6/GNUmakefile
|
--- a/GNUmakefile
|
||||||
--- ezxml-0.8.6.orig/GNUmakefile 2007-08-30 17:38:55.000000000 +0200
|
+++ b/GNUmakefile
|
||||||
+++ ezxml-0.8.6/GNUmakefile 2007-08-30 17:41:12.000000000 +0200
|
|
||||||
@@ -21,10 +21,10 @@
|
@@ -21,10 +21,10 @@
|
||||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
diff -pruN ezxml-0.8.6.orig/GNUmakefile ezxml-0.8.6/GNUmakefile
|
--- a/GNUmakefile
|
||||||
--- ezxml-0.8.6.orig/GNUmakefile 2008-12-16 15:22:46.773434689 +0100
|
+++ b/GNUmakefile
|
||||||
+++ ezxml-0.8.6/GNUmakefile 2008-12-16 15:22:27.337440224 +0100
|
|
||||||
@@ -28,6 +28,7 @@ RM = rm -f
|
@@ -28,6 +28,7 @@ RM = rm -f
|
||||||
DEBUG_CFLAGS = -O0 -g
|
DEBUG_CFLAGS = -O0 -g
|
||||||
OBJS = ezxml.o
|
OBJS = ezxml.o
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
diff -pruN ezxml-0.8.6.orig/ezxml.c ezxml-0.8.6/ezxml.c
|
--- a/ezxml.c
|
||||||
--- ezxml-0.8.6.orig/ezxml.c 2006-06-08 04:33:38.000000000 +0200
|
+++ b/ezxml.c
|
||||||
+++ 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
|
||||||
@@ -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);
|
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
|
// 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()
|
// stream into memory and then parses it. For xml files, use ezxml_parse_file()
|
||||||
// or ezxml_parse_fd()
|
// or ezxml_parse_fd()
|
||||||
diff -pruN ezxml-0.8.6.orig/ezxml.h ezxml-0.8.6/ezxml.h
|
--- a/ezxml.h
|
||||||
--- ezxml-0.8.6.orig/ezxml.h 2006-06-08 03:57:30.000000000 +0200
|
+++ b/ezxml.h
|
||||||
+++ ezxml-0.8.6/ezxml.h 2008-02-15 14:37:15.000000000 +0100
|
|
||||||
@@ -59,6 +59,11 @@ struct ezxml {
|
@@ -59,6 +59,11 @@ struct ezxml {
|
||||||
// pass in the copy. Returns NULL on failure.
|
// pass in the copy. Returns NULL on failure.
|
||||||
ezxml_t ezxml_parse_str(char *s, size_t len);
|
ezxml_t ezxml_parse_str(char *s, size_t len);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
diff -pruN ezxml-0.8.6.orig/ezxml.c ezxml-0.8.6/ezxml.c
|
--- a/ezxml.c
|
||||||
--- ezxml-0.8.6.orig/ezxml.c 2008-12-16 17:02:17.262312778 +0100
|
+++ b/ezxml.c
|
||||||
+++ ezxml-0.8.6/ezxml.c 2008-12-16 17:03:24.231073153 +0100
|
|
||||||
@@ -25,6 +25,7 @@
|
@@ -25,6 +25,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.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
|
// sets a flag for the given tag and returns the tag
|
||||||
ezxml_t ezxml_set_flag(ezxml_t xml, short flag)
|
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
|
--- a/ezxml.h
|
||||||
--- ezxml-0.8.6.orig/ezxml.h 2008-12-16 17:02:17.262312778 +0100
|
+++ b/ezxml.h
|
||||||
+++ ezxml-0.8.6/ezxml.h 2008-12-16 17:03:44.189450448 +0100
|
|
||||||
@@ -95,9 +95,13 @@ ezxml_t ezxml_idx(ezxml_t xml, int idx);
|
@@ -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
|
// returns the given tag's character content or empty string if none
|
||||||
#define ezxml_txt(xml) ((xml) ? xml->txt : "")
|
#define ezxml_txt(xml) ((xml) ? xml->txt : "")
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
diff -pruN ezxml-0.8.6.orig/ezxml.h ezxml-0.8.6/ezxml.h
|
--- a/ezxml.h
|
||||||
--- ezxml-0.8.6.orig/ezxml.h 2008-12-16 17:07:47.585487234 +0100
|
+++ b/ezxml.h
|
||||||
+++ ezxml-0.8.6/ezxml.h 2008-12-16 17:08:29.037939949 +0100
|
|
||||||
@@ -175,6 +175,17 @@ ezxml_t ezxml_insert(ezxml_t xml, ezxml_
|
@@ -175,6 +175,17 @@ ezxml_t ezxml_insert(ezxml_t xml, ezxml_
|
||||||
// removes a tag along with all its subtags
|
// removes a tag along with all its subtags
|
||||||
#define ezxml_remove(xml) ezxml_free(ezxml_cut(xml))
|
#define ezxml_remove(xml) ezxml_free(ezxml_cut(xml))
|
||||||
|
23
libs/ezxml/patches/500-ezxml_cut.patch
Normal file
23
libs/ezxml/patches/500-ezxml_cut.patch
Normal file
@ -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;
|
Loading…
x
Reference in New Issue
Block a user