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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
|
--- lib/loader/ext.c.orig Sat Sep 16 17:02:10 2000
+++ lib/loader/ext.c Sat Sep 16 17:02:14 2000
@@ -7,7 +7,7 @@
********************************************************/
#include <config.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <errno.h>
--- lib/loader/win32.c.orig Sat Sep 16 17:03:28 2000
+++ lib/loader/win32.c Sat Sep 16 17:03:30 2000
@@ -13,7 +13,7 @@
#include "win32.h"
#include <stdio.h>
#include <pthread.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/time.h>
--- lib/loader/driver.c.orig Sat Sep 16 17:04:30 2000
+++ lib/loader/driver.c Sat Sep 16 17:04:32 2000
@@ -1,6 +1,6 @@
#include <config.h>
#include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <wine/driver.h>
#include <wine/pe_image.h>
#include <wine/winreg.h>
--- lib/loader/resource.c.orig Sat Sep 16 17:07:41 2000
+++ lib/loader/resource.c Sat Sep 16 17:08:00 2000
@@ -253,6 +253,56 @@
return RES_SizeofResource( hModule, hRsrc );
}
+/**********************************************************************
+ * LoadStringW (USER32.376)
+ */
+INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
+ LPWSTR buffer, INT buflen )
+{
+ HGLOBAL hmem;
+ HRSRC hrsrc;
+ WCHAR *p;
+ int string_num;
+ int i;
+
+ if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
+ resource_id = (UINT)(-((INT)resource_id));
+ TRACE("instance = %04x, id = %04x, buffer = %08x, "
+ "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
+
+ /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
+ * 20 - 31. */
+ hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
+ RT_STRINGW );
+ if (!hrsrc) return 0;
+ hmem = LoadResource( instance, hrsrc );
+ if (!hmem) return 0;
+
+ p = LockResource(hmem);
+ string_num = resource_id & 0x000f;
+ for (i = 0; i < string_num; i++)
+ p += *p + 1;
+
+ TRACE("strlen = %d\n", (int)*p );
+
+ if (buffer == NULL) return *p;
+ i = min(buflen - 1, *p);
+ if (i > 0) {
+ memcpy(buffer, p + 1, i * sizeof (WCHAR));
+ buffer[i] = (WCHAR) 0;
+ } else {
+ if (buflen > 1) {
+ buffer[0] = (WCHAR) 0;
+ return 0;
+ }
+#if 0
+ WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
+#endif
+ }
+
+ TRACE("String loaded !\n");
+ return i;
+}
/**********************************************************************
@@ -303,57 +353,6 @@
HeapFree( GetProcessHeap(), 0, wbuf );
return retval;
-}
-
-/**********************************************************************
- * LoadStringW (USER32.376)
- */
-INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
- LPWSTR buffer, INT buflen )
-{
- HGLOBAL hmem;
- HRSRC hrsrc;
- WCHAR *p;
- int string_num;
- int i;
-
- if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
- resource_id = (UINT)(-((INT)resource_id));
- TRACE("instance = %04x, id = %04x, buffer = %08x, "
- "length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
-
- /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
- * 20 - 31. */
- hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
- RT_STRINGW );
- if (!hrsrc) return 0;
- hmem = LoadResource( instance, hrsrc );
- if (!hmem) return 0;
-
- p = LockResource(hmem);
- string_num = resource_id & 0x000f;
- for (i = 0; i < string_num; i++)
- p += *p + 1;
-
- TRACE("strlen = %d\n", (int)*p );
-
- if (buffer == NULL) return *p;
- i = min(buflen - 1, *p);
- if (i > 0) {
- memcpy(buffer, p + 1, i * sizeof (WCHAR));
- buffer[i] = (WCHAR) 0;
- } else {
- if (buflen > 1) {
- buffer[0] = (WCHAR) 0;
- return 0;
- }
-#if 0
- WARN("Dont know why caller give buflen=%d *p=%d trying to obtain string '%s'\n", buflen, *p, p + 1);
-#endif
- }
-
- TRACE("String loaded !\n");
- return i;
}
/* Messages...used by FormatMessage32* (KERNEL32.something)
--- lib/videocodec/VideoDecoder.cpp.orig Sat Sep 16 17:11:41 2000
+++ lib/videocodec/VideoDecoder.cpp Sat Sep 16 17:16:25 2000
@@ -20,7 +20,6 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/types.h>
-#include <malloc.h>
#include <stdio.h>
#include <unistd.h>
#include <strstream>
--- lib/avifile/Cache.h.orig Sat Sep 16 17:22:11 2000
+++ lib/avifile/Cache.h Sat Sep 16 17:22:14 2000
@@ -2,7 +2,7 @@
#include <default.h>
#define _LARGEFILE64_SOURCE
#include <unistd.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <pthread.h>
--- lib/avifile/FastReadStream.cpp.orig Sat Sep 16 17:23:45 2000
+++ lib/avifile/FastReadStream.cpp Sat Sep 16 17:23:47 2000
@@ -8,7 +8,7 @@
#include <features.h>
#endif
#include <unistd.h>
-#include <malloc.h>
+#include <stdlib.h>
#ifdef __FreeBSD__
#define lseek64 lseek
--- lib/avifile/AviRead.h.orig Sat Sep 16 17:25:10 2000
+++ lib/avifile/AviRead.h Sat Sep 16 17:25:13 2000
@@ -10,7 +10,7 @@
#include <avifmt.h>
#include <default.h>
#include <unistd.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <pthread.h>
--- lib/avifile/AviWrite.h.orig Sat Sep 16 17:26:35 2000
+++ lib/avifile/AviWrite.h Sat Sep 16 17:26:37 2000
@@ -11,7 +11,7 @@
#include <avifmt.h>
#include <default.h>
#include <unistd.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <pthread.h>
--- samples/benchmark/main.cpp.orig Sat Sep 16 17:28:22 2000
+++ samples/benchmark/main.cpp Sat Sep 16 17:28:24 2000
@@ -9,7 +9,6 @@
#include <config.h>
#include <stdio.h>
-#include <malloc.h>
#include <signal.h>
#include <iostream.h>
#include <unistd.h>
--- samples/benchmark/renderer.cpp.orig Sat Sep 16 17:29:28 2000
+++ samples/benchmark/renderer.cpp Sat Sep 16 17:29:29 2000
@@ -14,7 +14,7 @@
#include <sys/ipc.h>
#include <sys/shm.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <pthread.h>
#include "renderer.h"
#include "RegAccess.h"
--- player/renderer.cpp.orig Sat Sep 16 22:31:56 2000
+++ player/renderer.cpp Sat Sep 16 22:32:02 2000
@@ -16,7 +16,7 @@
#include <sys/ipc.h>
#include <sys/shm.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <pthread.h>
#include "renderer.h"
#include "RegAccess.h"
|