summaryrefslogtreecommitdiff
path: root/libs/files
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-07-29 22:52:30 +0000
committerStef Walter <stef@memberwebs.com>2004-07-29 22:52:30 +0000
commit740d8a6bcb6521e188361befa7f5636c880bf63b (patch)
treef269a5d492d712be73d840fdefeb6ad247ee03db /libs/files
parent0105af34f6977c51619bf1060e74e3c249932c68 (diff)
- Moved to DOMC
Diffstat (limited to 'libs/files')
-rw-r--r--libs/files/domc-library.patch223
1 files changed, 181 insertions, 42 deletions
diff --git a/libs/files/domc-library.patch b/libs/files/domc-library.patch
index 614bf15..590979e 100644
--- a/libs/files/domc-library.patch
+++ b/libs/files/domc-library.patch
@@ -1,16 +1,15 @@
-diff -r -C3 domc-0.7.0/Makefile domc/Makefile
+diff -r -C2 domc-0.7.0/Makefile domc/Makefile
*** domc-0.7.0/Makefile 2003-03-22 17:08:50.000000000 -0700
---- domc/Makefile 2004-07-29 12:47:32.702686029 -0600
+--- domc/Makefile 2004-07-29 16:16:16.337211622 -0600
***************
-*** 1,7 ****
+*** 1,6 ****
! prefix = /usr/local
! includedir = $(prefix)/include
! libdir = $(prefix)/lib
! mandir = $(prefix)/man
CC = gcc
LIBNAME = domc
- MAJVERSION = 0.7
---- 1,8 ----
+--- 1,7 ----
! _EXTRA = -I../libmba/src/ -L../libmba/
! prefix = ./
! includedir = $(prefix)
@@ -18,87 +17,227 @@ diff -r -C3 domc-0.7.0/Makefile domc/Makefile
! mandir = $(prefix)
CC = gcc
LIBNAME = domc
- MAJVERSION = 0.7
***************
-*** 11,25 ****
- SOVERSION = lib$(LIBNAME).so.$(MAJVERSION)
+*** 12,16 ****
DISTRO = $(LIBNAME)-$(MINVERSION)
RPM_OPT_FLAGS = -O2
! CFLAGS = -Wall -W -DMSGNO $(RPM_OPT_FLAGS) -I$(includedir) -L$(libdir)
#CFLAGS = -Wall -W -DMSGNO -I$(includedir) -L$(libdir) $(RPM_OPT_FLAGS) -ansi -pedantic -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wtraditional -Wconversion -Waggregate-return -Wno-parentheses
-! OBJS = src/expatls.o src/events.o src/node.o src/nodelist.o src/namednodemap.o src/dom.o src/timestamp.o src/wcwidth.o
- MAN = DOM_CharacterData.3m.gz DOM_Document.3m.gz DOM_Element.3m.gz DOM_Implementation.3m.gz DOM_NamedNodeMap.3m.gz DOM_Node.3m.gz DOM_NodeList.3m.gz DOM_Text.3m.gz
-
- all: $(ARNAME)($(OBJS)) $(SONAME) src/defines.h
-
- $(SONAME): $(OBJS)
-! $(CC) -shared $(OBJS) -L$(libdir) -lmba -lexpat -Wl,-h,$(SOVERSION) -o $(SONAME)
-
- .c.a:
- $(CC) $(CFLAGS) -c -o $*.o $<
---- 12,26 ----
- SOVERSION = lib$(LIBNAME).so.$(MAJVERSION)
+ OBJS = src/expatls.o src/events.o src/node.o src/nodelist.o src/namednodemap.o src/dom.o src/timestamp.o src/wcwidth.o
+--- 13,17 ----
DISTRO = $(LIBNAME)-$(MINVERSION)
RPM_OPT_FLAGS = -O2
! CFLAGS = -Wall -W -DMSGNO $(RPM_OPT_FLAGS) $(_EXTRA) -I$(includedir) -L$(libdir)
#CFLAGS = -Wall -W -DMSGNO -I$(includedir) -L$(libdir) $(RPM_OPT_FLAGS) -ansi -pedantic -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wtraditional -Wconversion -Waggregate-return -Wno-parentheses
-! OBJS = src/events.o src/node.o src/nodelist.o src/namednodemap.o src/dom.o src/timestamp.o src/wcwidth.o
- MAN = DOM_CharacterData.3m.gz DOM_Document.3m.gz DOM_Element.3m.gz DOM_Implementation.3m.gz DOM_NamedNodeMap.3m.gz DOM_Node.3m.gz DOM_NodeList.3m.gz DOM_Text.3m.gz
+ OBJS = src/expatls.o src/events.o src/node.o src/nodelist.o src/namednodemap.o src/dom.o src/timestamp.o src/wcwidth.o
+***************
+*** 20,24 ****
+
+ $(SONAME): $(OBJS)
+! $(CC) -shared $(OBJS) -L$(libdir) -lmba -lexpat -Wl,-h,$(SOVERSION) -o $(SONAME)
- all: $(ARNAME)($(OBJS)) $(SONAME) src/defines.h
+ .c.a:
+--- 21,25 ----
$(SONAME): $(OBJS)
! $(CC) -shared $(OBJS) $(_EXTRA) -L$(libdir) -lmba -Wl,-h,$(SOVERSION) -o $(SONAME)
.c.a:
- $(CC) $(CFLAGS) -c -o $*.o $<
***************
-*** 47,51 ****
-
+*** 48,51 ****
clean:
rm -f $(OBJS) $(ARNAME) $(SONAME) $(includedir)/domc.h $(libdir)/$(ARNAME) $(libdir)/$(SONAME) $(libdir)/$(SOVERSION) $(libdir)/lib$(LIBNAME).so $(DISTRO).zip
! cd $(mandir)/man3 && rm -f $(MAN)
---- 48,52 ----
-
+--- 49,52 ----
clean:
rm -f $(OBJS) $(ARNAME) $(SONAME) $(includedir)/domc.h $(libdir)/$(ARNAME) $(libdir)/$(SONAME) $(libdir)/$(SOVERSION) $(libdir)/lib$(LIBNAME).so $(DISTRO).zip
! # cd $(mandir)/man3 && rm -f $(MAN)
-diff -r -C3 domc-0.7.0/src/defines.h domc/src/defines.h
+diff -r -C2 domc-0.7.0/src/defines.h domc/src/defines.h
*** domc-0.7.0/src/defines.h 2003-03-22 16:35:36.000000000 -0700
---- domc/src/defines.h 2004-07-29 12:40:28.443671463 -0600
+--- domc/src/defines.h 2004-07-29 16:16:16.338211509 -0600
***************
-*** 21,27 ****
- #define HAVE_ENCDEC 0
+*** 22,26 ****
#define HAVE_STRDUP 1
#define HAVE_STRNLEN 0
! #define HAVE_EXPAT 195
#define HAVE_MBSTATE 0
#define HAVE_WCWIDTH 0
- #define HAVE_SNPRINTF 0
---- 21,27 ----
- #define HAVE_ENCDEC 0
+--- 22,26 ----
#define HAVE_STRDUP 1
#define HAVE_STRNLEN 0
! #define HAVE_EXPAT 0
#define HAVE_MBSTATE 0
#define HAVE_WCWIDTH 0
- #define HAVE_SNPRINTF 0
***************
-*** 35,41 ****
- #define HAVE_ENCDEC 0
+*** 36,40 ****
#define HAVE_STRDUP 1
#define HAVE_STRNLEN 1
! #define HAVE_EXPAT 195
#define HAVE_MBSTATE 1
#define HAVE_WCWIDTH 1
- #define HAVE_SNPRINTF 1
---- 35,41 ----
- #define HAVE_ENCDEC 0
+--- 36,40 ----
#define HAVE_STRDUP 1
#define HAVE_STRNLEN 1
! #define HAVE_EXPAT 0
#define HAVE_MBSTATE 1
#define HAVE_WCWIDTH 1
- #define HAVE_SNPRINTF 1
+diff -r -C2 domc-0.7.0/src/domc.h domc/src/domc.h
+*** domc-0.7.0/src/domc.h 2003-03-22 16:46:46.000000000 -0700
+--- domc/src/domc.h 2004-07-29 16:16:16.375207324 -0600
+***************
+*** 186,189 ****
+--- 186,191 ----
+ } ProcessingInstruction;
+ } u;
++ unsigned int rtfxRefCount; /* Reference counting added for RTFX */
++ void* userData; /* User data added for RTFX */
+ };
+
+***************
+*** 213,216 ****
+--- 215,220 ----
+ unsigned short filter;
+ struct DOM_NodeList *list; /* Used for entities and notations */
++ /* Reference counting added for RTFX */
++ unsigned int rtfxRefCount;
+ };
+
+***************
+*** 287,293 ****
+ */
+
+ int DOM_DocumentLS_load(DOM_DocumentLS *this, const char *uri);
+- int DOM_DocumentLS_save(DOM_DocumentLS *this, const char *uri, const DOM_Node *node);
+ int DOM_DocumentLS_fread(DOM_DocumentLS *this, FILE *stream);
+ int DOM_DocumentLS_fwrite(const DOM_DocumentLS *this, FILE *stream);
+
+--- 291,299 ----
+ */
+
++ #if HAVE_EXPAT > 0
+ int DOM_DocumentLS_load(DOM_DocumentLS *this, const char *uri);
+ int DOM_DocumentLS_fread(DOM_DocumentLS *this, FILE *stream);
++ #endif /* HAVE_EXPAT */
++ int DOM_DocumentLS_save(DOM_DocumentLS *this, const char *uri, const DOM_Node *node);
+ int DOM_DocumentLS_fwrite(const DOM_DocumentLS *this, FILE *stream);
+
+Only in domc/src: dom.o
+Only in domc/src: events.o
+diff -r -C2 domc-0.7.0/src/expatls.c domc/src/expatls.c
+*** domc-0.7.0/src/expatls.c 2003-03-21 02:20:24.000000000 -0700
+--- domc/src/expatls.c 2004-07-29 16:53:54.199838102 -0600
+***************
+*** 64,67 ****
+--- 64,68 ----
+ #endif
+
++
+ #if HAVE_EXPAT > 130
+ #include <expat.h>
+***************
+*** 128,131 ****
+--- 129,134 ----
+ }
+
++ #if HAVE_EXPAT > 0
++
+ static void
+ xmldecl_fn(void *userData, const XML_Char *version, const XML_Char *encoding, int standalone)
+***************
+*** 708,711 ****
+--- 711,754 ----
+ }
+
++ #endif /* HAVE_EXPAT */
++
++ static void
++ fputds_encoded(const DOM_String *s, FILE *stream)
++ {
++ size_t l;
++
++ while (*s) {
++ l = strcspn(s, "<>&\"'");
++ if (l > 0) {
++ fwrite((void*)s, 1, sizeof(DOM_String) * l, stream);
++ s += l;
++ }
++ switch (*s) {
++ case '\0':
++ break;
++ case '<':
++ fputs("&lt;", stream);
++ break;
++ case '>':
++ fputs("&gt;", stream);
++ break;
++ case '&':
++ fputs("&apos;", stream);
++ break;
++ case '"':
++ fputs("&quot;", stream);
++ break;
++ case '\'':
++ fputs("&squot;", stream);
++ break;
++ default:
++ AMSG("");
++ break;
++ };
++ if(*s)
++ ++s;
++ }
++ }
++
+ int
+ DOM_DocumentLS_fwrite(const DOM_DocumentLS *node, FILE *stream)
+***************
+*** 732,736 ****
+ fputds(e->node->nodeName, stream);
+ fputs("=\"", stream);
+! fputds(e->node->nodeValue, stream);
+ fputc('"', stream);
+ }
+--- 775,779 ----
+ fputds(e->node->nodeName, stream);
+ fputs("=\"", stream);
+! fputds_encoded(e->node->nodeValue, stream);
+ fputc('"', stream);
+ }
+***************
+*** 753,757 ****
+ break;
+ case DOM_TEXT_NODE:
+! fputds(node->nodeValue, stream);
+ break;
+ case DOM_CDATA_SECTION_NODE:
+--- 796,800 ----
+ break;
+ case DOM_TEXT_NODE:
+! fputds_encoded(node->nodeValue, stream);
+ break;
+ case DOM_CDATA_SECTION_NODE:
+***************
+*** 805,814 ****
+ fputds(node->u.ProcessingInstruction.target, stream);
+ fputc(' ', stream);
+! fputds(node->u.ProcessingInstruction.data, stream);
+ fputs("?>", stream);
+ break;
+ case DOM_COMMENT_NODE:
+ fputs("<!--", stream);
+! fputds(node->nodeValue, stream);
+ fputs("-->", stream);
+ break;
+--- 848,857 ----
+ fputds(node->u.ProcessingInstruction.target, stream);
+ fputc(' ', stream);
+! fputds_encoded(node->u.ProcessingInstruction.data, stream);
+ fputs("?>", stream);
+ break;
+ case DOM_COMMENT_NODE:
+ fputs("<!--", stream);
+! fputds_encoded(node->nodeValue, stream);
+ fputs("-->", stream);
+ break;