summaryrefslogtreecommitdiff
path: root/libs/files/domc-library.patch
blob: f9133a5b47e65b8ba5735c67e5a8308a83e015b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
diff -r -U3 domc-0.7.1/Makefile domc/Makefile
--- domc-0.7.1/Makefile	2004-08-05 22:32:24.000000000 -0600
+++ domc/Makefile	2004-08-31 17:05:22.326058272 -0600
@@ -1,7 +1,8 @@
-prefix     = /usr/local
-includedir = $(prefix)/include
-libdir     = $(prefix)/lib
-mandir     = $(prefix)/man
+_EXTRA     = -I../libmba/src/ -L../libmba/
+prefix     = ./
+includedir = $(prefix)
+libdir     = $(prefix)
+mandir     = $(prefix)
 CC         = gcc
 LIBNAME    = domc
 MAJVERSION = 0.7
@@ -11,7 +12,7 @@
 SOVERSION  = lib$(LIBNAME).so.$(MAJVERSION)
 DISTRO     = $(LIBNAME)-$(MINVERSION)
 RPM_OPT_FLAGS = -O2
-CFLAGS     = -Wall -W -DMSGNO $(RPM_OPT_FLAGS) -I$(includedir) -L$(libdir)
+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/expatls.o src/events.o src/node.o src/nodelist.o src/namednodemap.o src/dom.o src/timestamp.o src/wcwidth.o src/mbs.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
@@ -19,7 +20,7 @@
 all: $(ARNAME)($(OBJS)) $(SONAME) src/defines.h
 
 $(SONAME): $(OBJS)
-	$(CC) -shared $(OBJS) -L$(libdir) -lmba -lexpat -Wl,-h,$(SOVERSION) -o $(SONAME)
+	$(CC) -shared $(OBJS) $(_EXTRA) -L$(libdir) -lmba -Wl,-h,$(SOVERSION) -o $(SONAME)
 
 .c.a:
 	$(CC) $(CFLAGS) -c -o $*.o $<
@@ -47,5 +48,5 @@
 
 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)
+	# cd $(mandir)/man3 && rm -f $(MAN)
 
diff -r -U3 domc-0.7.1/Makefile.msvc domc/Makefile.msvc
--- domc-0.7.1/Makefile.msvc	2004-08-04 17:20:02.000000000 -0600
+++ domc/Makefile.msvc	2004-08-31 17:07:15.622292073 -0600
@@ -1,22 +1,26 @@
 !include <win32.mak>
-LIBMBA=..\libmba-0.8.9
-EXPAT=..\Expat-1.95.5
+LIBMBA=..\libmba
+# EXPAT=..\Expat-1.95.5
 # For i18n support in domc the encdec library is required.
 # Specify were the encdec library is below, change HAVE_ENCDEC to 1
 # in src\defines.h and add /LIBPATH:$(ENCDEC) encdec.lib to the
 # .dll link command.
-ENCDEC=..\encdec-0.3.7
+# ENCDEC=..\encdec-0.3.7
 OBJS=src\expatls.obj src\events.obj src\timestamp.obj src\dom.obj src\node.obj src\namednodemap.obj src\nodelist.obj src\wcwidth.obj
 
+# Debug flags
+cflags=$(cflags) /MLd /GZ /Gm /ZI /Od /D_DEBUG 
 
-domc.dll: $(OBJS)
-	$(link) /INCREMENTAL:NO /NOLOGO /LIBPATH:$(EXPAT)\Libs /LIBPATH:$(LIBMBA) /LIBPATH:$(ENCDEC) libexpat.lib libmba.lib encdec.lib /DEF:domc.def /OUT:domc.dll -entry:_DllMainCRTStartup@12 -dll $(OBJS)
+all: domc.lib
+  
+# domc.dll: $(OBJS)
+# 	$(link) /INCREMENTAL:NO /NOLOGO /LIBPATH:$(EXPAT)\Libs /LIBPATH:$(LIBMBA) /LIBPATH:$(ENCDEC) libexpat.lib libmba.lib encdec.lib /DEF:domc.def /OUT:domc.dll -entry:_DllMainCRTStartup@12 -dll $(OBJS)
 
 domc.lib: $(OBJS)
 	$(implib) -machine:$(CPU) -out:domc.lib $(OBJS)
 
 .c.obj:
-	$(cc) $(cflags) /I$(EXPAT)\Source\lib /I$(ENCDEC)\src /I$(LIBMBA)\src /Fo$@ $*.c
+	$(cc) $(cflags) /I$(LIBMBA)\src /Fo$@ $*.c
 
 clean:
 	del domc.dll domc.lib domc.exp $(OBJS)
diff -r -U3 domc-0.7.1/src/defines.h domc/src/defines.h
--- domc-0.7.1/src/defines.h	2003-03-22 16:35:36.000000000 -0700
+++ domc/src/defines.h	2004-08-31 17:07:36.699545018 -0600
@@ -7,7 +7,7 @@
 #define HAVE_ENCDEC 0
 #define HAVE_STRDUP 1
 #define HAVE_STRNLEN 0
-#define HAVE_EXPAT 195
+#define HAVE_EXPAT 0
 #define HAVE_MBSTATE 0
 #define HAVE_WCWIDTH 1
 #define HAVE_SNPRINTF 1
@@ -21,7 +21,7 @@
 #define HAVE_ENCDEC 0
 #define HAVE_STRDUP 1
 #define HAVE_STRNLEN 0
-#define HAVE_EXPAT 195
+#define HAVE_EXPAT 0
 #define HAVE_MBSTATE 0
 #define HAVE_WCWIDTH 0
 #define HAVE_SNPRINTF 0
@@ -35,7 +35,7 @@
 #define HAVE_ENCDEC 0
 #define HAVE_STRDUP 1
 #define HAVE_STRNLEN 1
-#define HAVE_EXPAT 195
+#define HAVE_EXPAT 0
 #define HAVE_MBSTATE 1
 #define HAVE_WCWIDTH 1
 #define HAVE_SNPRINTF 1
diff -r -U3 domc-0.7.1/src/domc.h domc/src/domc.h
--- domc-0.7.1/src/domc.h	2004-08-04 17:32:30.000000000 -0600
+++ domc/src/domc.h	2004-08-31 17:11:39.228935518 -0600
@@ -185,6 +185,8 @@
             DOM_String *data;
         } ProcessingInstruction;
     } u;
+    unsigned int rtfxRefCount;          /* Reference counting added for RTFX */
+    void* userData;                     /* User data added for RTFX */
 };
 
 DOM_Node *DOM_Node_insertBefore(DOM_Node *node, DOM_Node *newChild, DOM_Node *refChild);
@@ -212,6 +214,7 @@
 	NodeEntry *last;
 	unsigned short filter;
 	struct DOM_NodeList *list; /* Used for entities and notations */
+    unsigned int rtfxRefCount; /* Reference counting added for RTFX */
 };
 
 DOM_Node *DOM_NodeList_item(const DOM_NodeList *nl, int index);
@@ -286,8 +289,10 @@
  * described in the latest W3C drafts at all.
  */
 
+#if HAVE_EXPAT > 0
 int DOM_DocumentLS_load(DOM_DocumentLS *this, const char *uri);
 int DOM_DocumentLS_fread(DOM_DocumentLS *this, FILE *stream);
+#endif
 int DOM_DocumentLS_save(DOM_DocumentLS *this, const char *uri, const DOM_Node *node);
 int DOM_DocumentLS_fwrite(const DOM_DocumentLS *this, FILE *stream);
 
diff -r -U3 domc-0.7.1/src/expatls.c domc/src/expatls.c
--- domc-0.7.1/src/expatls.c	2004-08-04 17:28:49.000000000 -0600
+++ domc/src/expatls.c	2004-08-31 17:12:25.887854337 -0600
@@ -731,9 +731,6 @@
         case '"':
             fputs("&quot;", stream);
             break;
-        case '\'':
-            fputs("&squot;", stream);
-            break;
         default:
             AMSG("");
             break;