2176
|
1 |
--- wildmidi-0.2.2.orig/configure.ac 2004-01-28 13:25:44.000000000 -0500
|
|
2 |
+++ wildmidi-0.2.2/configure.ac 2009-09-17 17:33:28.773882786 -0400
|
|
3 |
@@ -44,12 +44,9 @@
|
|
4 |
AM_PROG_LIBTOOL
|
|
5 |
|
|
6 |
|
|
7 |
-set $CC
|
|
8 |
-if test "$1" = gcc; then
|
|
9 |
- shift
|
|
10 |
- args="$*"
|
|
11 |
+if test "$GCC" = "yes"; then
|
|
12 |
AC_MSG_CHECKING(for gcc version)
|
|
13 |
- CCVER="gcc `gcc --version`"
|
|
14 |
+ CCVER="gcc `$CC --version`"
|
|
15 |
AC_MSG_RESULT($CCVER)
|
|
16 |
fi
|
|
17 |
|
|
18 |
@@ -95,14 +92,16 @@
|
|
19 |
|
|
20 |
AC_C_BIGENDIAN
|
|
21 |
|
|
22 |
-CFLAGS="$CFLAGS -Wall"
|
|
23 |
+if test "$GCC" = "yes"; then
|
|
24 |
+ CFLAGS="$CFLAGS -Wall"
|
|
25 |
+fi
|
|
26 |
AC_ARG_ENABLE(werror,
|
|
27 |
[ --disable-werror disable fail on compile warnings], werror=$enable_werror,
|
|
28 |
werror=yes
|
|
29 |
)
|
|
30 |
|
|
31 |
AC_MSG_CHECKING(for Werror)
|
|
32 |
-if test "x$werror" = xyes; then
|
|
33 |
+if test "x$werror" = xyes -a "$GCC" = "yes"; then
|
|
34 |
AC_MSG_RESULT(yes)
|
|
35 |
CFLAGS="$CFLAGS -Werror"
|
|
36 |
else
|
|
37 |
@@ -170,7 +169,7 @@
|
|
38 |
[ --enable-profile compile with profiling (for development)],
|
|
39 |
profile=$enable_profile
|
|
40 |
)
|
|
41 |
-if test "x$profile" = xyes; then
|
|
42 |
+if test "x$profile" = xyes -a "$GCC" = "yes"; then
|
|
43 |
BUILD_TYPE="$BUILD_TYPE Profile"
|
|
44 |
CFLAGS="`echo $CFLAGS | sed -e 's/-fomit-frame-pointer//g'` -pg -fprofile-arcs"
|
|
45 |
LDFLAGS="$LDFLAGS -pg -fprofile-arcs"
|
|
46 |
@@ -180,7 +179,7 @@
|
|
47 |
[ --enable-temps compile with save-temps],
|
|
48 |
temps=$enable_temps
|
|
49 |
)
|
|
50 |
-if test "x$temps" = xyes; then
|
|
51 |
+if test "x$temps" = xyes -a "$GCC" = "yes"; then
|
|
52 |
CFLAGS="$CFLAGS -save-temps"
|
|
53 |
fi
|
|
54 |
|
|
55 |
@@ -227,18 +226,22 @@
|
|
56 |
|
|
57 |
case "$arch" in
|
|
58 |
auto)
|
|
59 |
- case "${host_cpu}" in
|
|
60 |
- i?86)
|
|
61 |
- if test "x$HAVE_AMD" = "xyes"; then
|
|
62 |
- CFLAGS="$CFLAGS -march=k6"
|
|
63 |
- else
|
|
64 |
- CFLAGS="$CFLAGS -march=${host_cpu}"
|
|
65 |
- fi
|
|
66 |
- ;;
|
|
67 |
- esac
|
|
68 |
+ if test "$GCC" = "yes"; then
|
|
69 |
+ case "${host_cpu}" in
|
|
70 |
+ i?86)
|
|
71 |
+ if test "x$HAVE_AMD" = "xyes"; then
|
|
72 |
+ CFLAGS="$CFLAGS -march=k6"
|
|
73 |
+ else
|
|
74 |
+ CFLAGS="$CFLAGS -march=${host_cpu}"
|
|
75 |
+ fi
|
|
76 |
+ ;;
|
|
77 |
+ esac
|
|
78 |
+ fi
|
|
79 |
;;
|
|
80 |
*)
|
|
81 |
- CFLAGS="$CFLAGS -march=$arch"
|
|
82 |
+ if test "$GCC" = "yes"; then
|
|
83 |
+ CFLAGS="$CFLAGS -march=$arch"
|
|
84 |
+ fi
|
|
85 |
;;
|
|
86 |
|
|
87 |
esac
|
1923
|
88 |
--- wildmidi-0.2.2/src/wildmidi_lib.c 2009-06-13 19:01:17.737707714 +0200
|
|
89 |
+++ wildmidi-0.2.2-patch/src/wildmidi_lib.c 2009-06-13 19:01:14.950440156 +0200
|
|
90 |
@@ -584,8 +584,8 @@
|
|
91 |
char *buffer_file = malloc(strlen(filename) + 1);
|
|
92 |
|
|
93 |
if (buffer_file == NULL) {
|
|
94 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
95 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, filename, errno);
|
|
96 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
97 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, filename, errno);
|
|
98 |
return NULL;
|
|
99 |
}
|
|
100 |
|
|
101 |
@@ -600,8 +600,8 @@
|
|
102 |
if (home) {
|
|
103 |
buffer_file = realloc(buffer_file,(strlen(buffer_file) + strlen(home) + 1));
|
|
104 |
if (buffer_file == NULL) {
|
|
105 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
106 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, filename, errno);
|
|
107 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
108 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, filename, errno);
|
|
109 |
free(buffer_file);
|
|
110 |
return NULL;
|
|
111 |
}
|
|
112 |
@@ -616,8 +616,8 @@
|
|
113 |
}
|
|
114 |
buffer_file = realloc(buffer_file,(strlen(buffer_file) + strlen(buffer_dir) + 1));
|
|
115 |
if (buffer_file == NULL) {
|
|
116 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
117 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, filename, errno);
|
|
118 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
119 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, filename, errno);
|
|
120 |
free(buffer_file);
|
|
121 |
return NULL;
|
|
122 |
}
|
|
123 |
@@ -626,15 +626,15 @@
|
|
124 |
}
|
|
125 |
#endif
|
|
126 |
if (stat(buffer_file,&buffer_stat)) {
|
|
127 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_STAT, filename, errno);
|
|
128 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_STAT, filename, errno);
|
|
129 |
free(buffer_file);
|
|
130 |
return NULL;
|
|
131 |
}
|
|
132 |
*size = buffer_stat.st_size;
|
|
133 |
data = malloc(*size);
|
|
134 |
if (data == NULL) {
|
|
135 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
136 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, filename, errno);
|
|
137 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
138 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, filename, errno);
|
|
139 |
free(buffer_file);
|
|
140 |
return NULL;
|
|
141 |
}
|
|
142 |
@@ -643,13 +643,13 @@
|
|
143 |
#else
|
|
144 |
if ((buffer_fd = open(buffer_file,O_RDONLY)) == -1) {
|
|
145 |
#endif
|
|
146 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_OPEN, filename, errno);
|
|
147 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_OPEN, filename, errno);
|
|
148 |
free(buffer_file);
|
|
149 |
free(data);
|
|
150 |
return NULL;
|
|
151 |
}
|
|
152 |
if (read(buffer_fd,data,*size) != buffer_stat.st_size) {
|
|
153 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_READ, filename, errno);
|
|
154 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_READ, filename, errno);
|
|
155 |
free(buffer_file);
|
|
156 |
free(data);
|
|
157 |
close(buffer_fd);
|
|
158 |
@@ -749,8 +749,8 @@
|
|
159 |
if (dir_end != NULL) {
|
|
160 |
config_dir = malloc((dir_end - config_file + 2));
|
|
161 |
if (config_dir == NULL) {
|
|
162 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
163 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
164 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
165 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
166 |
WM_FreePatches();
|
|
167 |
free (config_buffer);
|
|
168 |
return -1;
|
|
169 |
@@ -791,8 +791,8 @@
|
|
170 |
// copy line into a workable buffer
|
|
171 |
line_buffer = realloc(line_buffer, (config_ptr - line_start_ptr + 1));
|
|
172 |
if (line_buffer == NULL) {
|
|
173 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
174 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
175 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
176 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
177 |
WM_FreePatches();
|
|
178 |
if (config_dir != NULL)
|
|
179 |
free(config_dir);
|
|
180 |
@@ -822,8 +822,8 @@
|
|
181 |
if (line_buffer[strlen(line_buffer) - 1] == '/') {
|
|
182 |
config_dir = realloc(config_dir, strlen(&line_buffer[4]) + 1);
|
|
183 |
if (config_dir == NULL) {
|
|
184 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
185 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
186 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
187 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
188 |
WM_FreePatches();
|
|
189 |
free (line_buffer);
|
|
190 |
free (config_buffer);
|
|
191 |
@@ -833,8 +833,8 @@
|
|
192 |
} else {
|
|
193 |
config_dir = realloc(config_dir, strlen(&line_buffer[4]) + 2);
|
|
194 |
if (config_dir == NULL) {
|
|
195 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
196 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
197 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
198 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
199 |
WM_FreePatches();
|
|
200 |
free (line_buffer);
|
|
201 |
free (config_buffer);
|
|
202 |
@@ -848,8 +848,8 @@
|
|
203 |
if (config_dir != NULL) {
|
|
204 |
new_config = malloc(strlen(config_dir) + strlen(&line_buffer[7]) + 1);
|
|
205 |
if (new_config == NULL) {
|
|
206 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
207 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
208 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
209 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
210 |
WM_FreePatches();
|
|
211 |
free (config_dir);
|
|
212 |
free (line_buffer);
|
|
213 |
@@ -861,8 +861,8 @@
|
|
214 |
} else {
|
|
215 |
new_config = malloc(strlen(&line_buffer[7]) + 1);
|
|
216 |
if (new_config == NULL) {
|
|
217 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
218 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
219 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse config", errno);
|
|
220 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
221 |
WM_FreePatches();
|
|
222 |
free (line_buffer);
|
|
223 |
free (config_buffer);
|
|
224 |
@@ -882,8 +882,8 @@
|
|
225 |
continue;
|
|
226 |
} else if (strncasecmp(line_buffer, "bank ", 5) == 0) {
|
|
227 |
if (!isdigit(line_buffer[5])) {
|
|
228 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in bank line)", 0);
|
|
229 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
230 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in bank line)", 0);
|
|
231 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
232 |
WM_FreePatches();
|
|
233 |
if (config_dir != NULL)
|
|
234 |
free (config_dir);
|
|
235 |
@@ -895,8 +895,8 @@
|
|
236 |
continue;
|
|
237 |
} else if (strncasecmp(line_buffer, "drumset ", 8) == 0) {
|
|
238 |
if (!isdigit(line_buffer[8])) {
|
|
239 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in drumset line)", 0);
|
|
240 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
241 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in drumset line)", 0);
|
|
242 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
243 |
WM_FreePatches();
|
|
244 |
if (config_dir != NULL)
|
|
245 |
free (config_dir);
|
|
246 |
@@ -911,8 +911,8 @@
|
|
247 |
if (patch[(patchid & 0x7F)] == NULL) {
|
|
248 |
patch[(patchid & 0x7F)] = malloc (sizeof(struct _patch));
|
|
249 |
if (patch[(patchid & 0x7F)] == NULL) {
|
|
250 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
251 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
252 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
253 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
254 |
WM_FreePatches();
|
|
255 |
if (config_dir != NULL)
|
|
256 |
free (config_dir);
|
|
257 |
@@ -946,8 +946,8 @@
|
|
258 |
if (tmp_patch->next == NULL) {
|
|
259 |
tmp_patch->next = malloc (sizeof(struct _patch));
|
|
260 |
if (tmp_patch->next == NULL) {
|
|
261 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
262 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
263 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
264 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
265 |
WM_FreePatches();
|
|
266 |
if (config_dir != NULL)
|
|
267 |
free (config_dir);
|
|
268 |
@@ -974,8 +974,8 @@
|
|
269 |
} else {
|
|
270 |
tmp_patch->next = malloc (sizeof(struct _patch));
|
|
271 |
if (tmp_patch->next == NULL) {
|
|
272 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
273 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
274 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
275 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
276 |
WM_FreePatches();
|
|
277 |
if (config_dir != NULL)
|
|
278 |
free (config_dir);
|
|
279 |
@@ -998,8 +998,8 @@
|
|
280 |
|
|
281 |
chr_ptr = strchr(line_buffer,' ') + 1;
|
|
282 |
if (chr_ptr == NULL) {
|
|
283 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
284 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
285 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
286 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
287 |
WM_FreePatches();
|
|
288 |
if (config_dir != NULL)
|
|
289 |
free (config_dir);
|
|
290 |
@@ -1016,8 +1016,8 @@
|
|
291 |
if (config_dir != NULL) {
|
|
292 |
tmp_patch->filename = malloc(strlen(config_dir) + strlen(&line_buffer[line_ptr]) + 5);
|
|
293 |
if (tmp_patch->filename == NULL) {
|
|
294 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
295 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
296 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
297 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
298 |
WM_FreePatches();
|
|
299 |
if (config_dir != NULL)
|
|
300 |
free (config_dir);
|
|
301 |
@@ -1030,8 +1030,8 @@
|
|
302 |
} else {
|
|
303 |
tmp_patch->filename = malloc(strlen(&line_buffer[line_ptr]) + 5);
|
|
304 |
if (tmp_patch->filename == NULL) {
|
|
305 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
306 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
307 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
308 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
309 |
WM_FreePatches();
|
|
310 |
free (line_buffer);
|
|
311 |
free (config_buffer);
|
|
312 |
@@ -1044,8 +1044,8 @@
|
|
313 |
if (config_dir != NULL) {
|
|
314 |
tmp_patch->filename = malloc(strlen(config_dir) + strlen(&line_buffer[line_ptr]) + 1);
|
|
315 |
if (tmp_patch->filename == NULL) {
|
|
316 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
317 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
318 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
319 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
320 |
WM_FreePatches();
|
|
321 |
if (config_dir != NULL)
|
|
322 |
free (config_dir);
|
|
323 |
@@ -1058,8 +1058,8 @@
|
|
324 |
} else {
|
|
325 |
tmp_patch->filename = malloc(strlen(&line_buffer[line_ptr]) + 1);
|
|
326 |
if (tmp_patch->filename == NULL) {
|
|
327 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
328 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
329 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
330 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, config_file, 0);
|
|
331 |
WM_FreePatches();
|
|
332 |
free (line_buffer);
|
|
333 |
free (config_buffer);
|
|
334 |
@@ -1083,7 +1083,7 @@
|
|
335 |
chr_ptr = strstr(&line_buffer[line_ptr], "amp=");
|
|
336 |
if (chr_ptr != NULL) {
|
|
337 |
if (!isdigit(chr_ptr[4])) {
|
|
338 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
339 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
340 |
} else {
|
|
341 |
tmp_patch->amp = ((atoi(&chr_ptr[4]) << 10) / 100);
|
|
342 |
}
|
|
343 |
@@ -1091,7 +1091,7 @@
|
|
344 |
chr_ptr = strstr(&line_buffer[line_ptr], "note=");
|
|
345 |
if (chr_ptr != NULL) {
|
|
346 |
if (!isdigit(chr_ptr[5])) {
|
|
347 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
348 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
349 |
} else {
|
|
350 |
tmp_patch->note = atoi(&chr_ptr[5]);
|
|
351 |
}
|
|
352 |
@@ -1111,11 +1111,11 @@
|
|
353 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_time0=");
|
|
354 |
if (chr_ptr != NULL) {
|
|
355 |
if (!isdigit(chr_ptr[10])) {
|
|
356 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
357 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
358 |
} else {
|
|
359 |
tmp_patch->env[0].time = atof(&chr_ptr[10]);
|
|
360 |
if ((tmp_patch->env[0].time > 45000.0) || (tmp_patch->env[0].time < 1.47)) {
|
|
361 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
362 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
363 |
tmp_patch->env[0].set &= 0xFE;
|
|
364 |
} else {
|
|
365 |
tmp_patch->env[0].set |= 0x01;
|
|
366 |
@@ -1126,11 +1126,11 @@
|
|
367 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_time1=");
|
|
368 |
if (chr_ptr != NULL) {
|
|
369 |
if (!isdigit(chr_ptr[10])) {
|
|
370 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
371 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
372 |
} else {
|
|
373 |
tmp_patch->env[1].time = atof(&chr_ptr[10]);
|
|
374 |
if ((tmp_patch->env[1].time > 45000.0) || (tmp_patch->env[1].time < 1.47)) {
|
|
375 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
376 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
377 |
tmp_patch->env[1].set &= 0xFE;
|
|
378 |
} else {
|
|
379 |
tmp_patch->env[1].set |= 0x01;
|
|
380 |
@@ -1140,11 +1140,11 @@
|
|
381 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_time2=");
|
|
382 |
if (chr_ptr != NULL) {
|
|
383 |
if (!isdigit(chr_ptr[10])) {
|
|
384 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
385 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
386 |
} else {
|
|
387 |
tmp_patch->env[2].time = atof(&chr_ptr[10]);
|
|
388 |
if ((tmp_patch->env[2].time > 45000.0) || (tmp_patch->env[2].time < 1.47)) {
|
|
389 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
390 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
391 |
tmp_patch->env[2].set &= 0xFE;
|
|
392 |
} else {
|
|
393 |
tmp_patch->env[2].set |= 0x01;
|
|
394 |
@@ -1154,11 +1154,11 @@
|
|
395 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_time3=");
|
|
396 |
if (chr_ptr != NULL) {
|
|
397 |
if (!isdigit(chr_ptr[10])) {
|
|
398 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
399 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
400 |
} else {
|
|
401 |
tmp_patch->env[3].time = atof(&chr_ptr[10]);
|
|
402 |
if ((tmp_patch->env[3].time > 45000.0) || (tmp_patch->env[3].time < 1.47)) {
|
|
403 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
404 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
405 |
tmp_patch->env[3].set &= 0xFE;
|
|
406 |
} else {
|
|
407 |
tmp_patch->env[3].set |= 0x01;
|
|
408 |
@@ -1168,11 +1168,11 @@
|
|
409 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_time4=");
|
|
410 |
if (chr_ptr != NULL) {
|
|
411 |
if (!isdigit(chr_ptr[10])) {
|
|
412 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
413 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
414 |
} else {
|
|
415 |
tmp_patch->env[4].time = atof(&chr_ptr[10]);
|
|
416 |
if ((tmp_patch->env[4].time > 45000.0) || (tmp_patch->env[4].time < 1.47)) {
|
|
417 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
418 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
419 |
tmp_patch->env[4].set &= 0xFE;
|
|
420 |
} else {
|
|
421 |
tmp_patch->env[4].set |= 0x01;
|
|
422 |
@@ -1182,11 +1182,11 @@
|
|
423 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_time5=");
|
|
424 |
if (chr_ptr != NULL) {
|
|
425 |
if (!isdigit(chr_ptr[10])) {
|
|
426 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
427 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
428 |
} else {
|
|
429 |
tmp_patch->env[5].time = atof(&chr_ptr[10]);
|
|
430 |
if ((tmp_patch->env[5].time > 45000.0) || (tmp_patch->env[5].time < 1.47)) {
|
|
431 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
432 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
433 |
tmp_patch->env[5].set &= 0xFE;
|
|
434 |
} else {
|
|
435 |
tmp_patch->env[5].set |= 0x01;
|
|
436 |
@@ -1196,11 +1196,11 @@
|
|
437 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_level0=");
|
|
438 |
if (chr_ptr != NULL) {
|
|
439 |
if (!isdigit(chr_ptr[11])) {
|
|
440 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
441 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
442 |
} else {
|
|
443 |
tmp_patch->env[0].level = atof(&chr_ptr[10]);
|
|
444 |
if ((tmp_patch->env[0].level > 1.0) || (tmp_patch->env[0].level < 0.0)) {
|
|
445 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
446 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
447 |
tmp_patch->env[0].set &= 0xFD;
|
|
448 |
} else {
|
|
449 |
tmp_patch->env[0].set |= 0x02;
|
|
450 |
@@ -1211,11 +1211,11 @@
|
|
451 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_level1=");
|
|
452 |
if (chr_ptr != NULL) {
|
|
453 |
if (!isdigit(chr_ptr[11])) {
|
|
454 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
455 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
456 |
} else {
|
|
457 |
tmp_patch->env[1].level = atof(&chr_ptr[10]);
|
|
458 |
if ((tmp_patch->env[1].level > 1.0) || (tmp_patch->env[1].level < 0.0)) {
|
|
459 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
460 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
461 |
tmp_patch->env[1].set &= 0xFD;
|
|
462 |
} else {
|
|
463 |
tmp_patch->env[1].set |= 0x02;
|
|
464 |
@@ -1225,11 +1225,11 @@
|
|
465 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_level2=");
|
|
466 |
if (chr_ptr != NULL) {
|
|
467 |
if (!isdigit(chr_ptr[11])) {
|
|
468 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
469 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
470 |
} else {
|
|
471 |
tmp_patch->env[2].level = atof(&chr_ptr[10]);
|
|
472 |
if ((tmp_patch->env[2].level > 1.0) || (tmp_patch->env[2].level < 0.0)) {
|
|
473 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
474 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
475 |
tmp_patch->env[2].set &= 0xFD;
|
|
476 |
} else {
|
|
477 |
tmp_patch->env[2].set |= 0x02;
|
|
478 |
@@ -1239,11 +1239,11 @@
|
|
479 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_level3=");
|
|
480 |
if (chr_ptr != NULL) {
|
|
481 |
if (!isdigit(chr_ptr[11])) {
|
|
482 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
483 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
484 |
} else {
|
|
485 |
tmp_patch->env[3].level = atof(&chr_ptr[10]);
|
|
486 |
if ((tmp_patch->env[3].level > 1.0) || (tmp_patch->env[3].level < 0.0)) {
|
|
487 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
488 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
489 |
tmp_patch->env[3].set &= 0xFD;
|
|
490 |
} else {
|
|
491 |
tmp_patch->env[3].set |= 0x02;
|
|
492 |
@@ -1253,11 +1253,11 @@
|
|
493 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_level4=");
|
|
494 |
if (chr_ptr != NULL) {
|
|
495 |
if (!isdigit(chr_ptr[11])) {
|
|
496 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
497 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
498 |
} else {
|
|
499 |
tmp_patch->env[4].level = atof(&chr_ptr[10]);
|
|
500 |
if ((tmp_patch->env[4].level > 1.0) || (tmp_patch->env[4].level < 0.0)) {
|
|
501 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
502 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
503 |
tmp_patch->env[4].set &= 0xFD;
|
|
504 |
} else {
|
|
505 |
tmp_patch->env[4].set |= 0x02;
|
|
506 |
@@ -1267,11 +1267,11 @@
|
|
507 |
chr_ptr = strstr(&line_buffer[line_ptr], "env_level5=");
|
|
508 |
if (chr_ptr != NULL) {
|
|
509 |
if (!isdigit(chr_ptr[11])) {
|
|
510 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
511 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(syntax error in patch line)", 0);
|
|
512 |
} else {
|
|
513 |
tmp_patch->env[5].level = atof(&chr_ptr[10]);
|
|
514 |
if ((tmp_patch->env[5].level > 1.0) || (tmp_patch->env[5].level < 0.0)) {
|
|
515 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
516 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, "(range error in patch line)", 0);
|
|
517 |
tmp_patch->env[5].set &= 0xFD;
|
|
518 |
} else {
|
|
519 |
tmp_patch->env[5].set |= 0x02;
|
|
520 |
@@ -1306,7 +1306,7 @@
|
|
521 |
unsigned char *read_end = data + gus_sample->data_length;
|
|
522 |
signed short int *write_data = NULL;
|
|
523 |
|
|
524 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
525 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
526 |
gus_sample->data = calloc((gus_sample->data_length + 1), sizeof(signed short int));
|
|
527 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
528 |
write_data = gus_sample->data;
|
|
529 |
@@ -1322,7 +1322,7 @@
|
|
530 |
return 0;
|
|
531 |
}
|
|
532 |
|
|
533 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
534 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
535 |
return -1;
|
|
536 |
}
|
|
537 |
|
|
538 |
@@ -1338,7 +1338,7 @@
|
|
539 |
signed short int *write_data_a = NULL;
|
|
540 |
signed short int *write_data_b = NULL;
|
|
541 |
|
|
542 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
543 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
544 |
gus_sample->data = calloc((new_length + 1), sizeof(signed short int));
|
|
545 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
546 |
write_data = gus_sample->data;
|
|
547 |
@@ -1391,7 +1391,7 @@
|
|
548 |
return 0;
|
|
549 |
}
|
|
550 |
|
|
551 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
552 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
553 |
return -1;
|
|
554 |
}
|
|
555 |
|
|
556 |
@@ -1403,7 +1403,7 @@
|
|
557 |
signed short int *write_data = NULL;
|
|
558 |
unsigned long int tmp_loop = 0;
|
|
559 |
|
|
560 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
561 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
562 |
gus_sample->data = calloc((gus_sample->data_length + 1), sizeof(signed short int));
|
|
563 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
564 |
write_data = gus_sample->data + gus_sample->data_length - 1;
|
|
565 |
@@ -1423,7 +1423,7 @@
|
|
566 |
gus_sample->modes ^= SAMPLE_REVERSE;
|
|
567 |
return 0;
|
|
568 |
}
|
|
569 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
570 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
571 |
return -1;
|
|
572 |
}
|
|
573 |
|
|
574 |
@@ -1440,7 +1440,7 @@
|
|
575 |
signed short int *write_data_a = NULL;
|
|
576 |
signed short int *write_data_b = NULL;
|
|
577 |
|
|
578 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
579 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
580 |
gus_sample->data = calloc((new_length + 1), sizeof(signed short int));
|
|
581 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
582 |
write_data = gus_sample->data;
|
|
583 |
@@ -1491,7 +1491,7 @@
|
|
584 |
return 0;
|
|
585 |
}
|
|
586 |
|
|
587 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
588 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
589 |
return -1;
|
|
590 |
}
|
|
591 |
|
|
592 |
@@ -1502,7 +1502,7 @@
|
|
593 |
unsigned char *read_end = data + gus_sample->data_length;
|
|
594 |
signed short int *write_data = NULL;
|
|
595 |
|
|
596 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
597 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
598 |
gus_sample->data = calloc((gus_sample->data_length + 1), sizeof(signed short int));
|
|
599 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
600 |
write_data = gus_sample->data;
|
|
601 |
@@ -1518,7 +1518,7 @@
|
|
602 |
gus_sample->modes ^= SAMPLE_UNSIGNED;
|
|
603 |
return 0;
|
|
604 |
}
|
|
605 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
606 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
607 |
return -1;
|
|
608 |
}
|
|
609 |
|
|
610 |
@@ -1534,7 +1534,7 @@
|
|
611 |
signed short int *write_data_a = NULL;
|
|
612 |
signed short int *write_data_b = NULL;
|
|
613 |
|
|
614 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
615 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
616 |
gus_sample->data = calloc((new_length + 1), sizeof(signed short int));
|
|
617 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
618 |
write_data = gus_sample->data;
|
|
619 |
@@ -1587,7 +1587,7 @@
|
|
620 |
return 0;
|
|
621 |
}
|
|
622 |
|
|
623 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
624 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
625 |
return -1;
|
|
626 |
}
|
|
627 |
|
|
628 |
@@ -1599,7 +1599,7 @@
|
|
629 |
signed short int *write_data = NULL;
|
|
630 |
unsigned long int tmp_loop = 0;
|
|
631 |
|
|
632 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
633 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
634 |
gus_sample->data = calloc((gus_sample->data_length + 1), sizeof(signed short int));
|
|
635 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
636 |
write_data = gus_sample->data + gus_sample->data_length - 1;
|
|
637 |
@@ -1619,7 +1619,7 @@
|
|
638 |
gus_sample->modes ^= SAMPLE_REVERSE | SAMPLE_UNSIGNED;
|
|
639 |
return 0;
|
|
640 |
}
|
|
641 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
642 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
643 |
return -1;
|
|
644 |
}
|
|
645 |
|
|
646 |
@@ -1635,7 +1635,7 @@
|
|
647 |
signed short int *write_data_a = NULL;
|
|
648 |
signed short int *write_data_b = NULL;
|
|
649 |
|
|
650 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
651 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
652 |
gus_sample->data = calloc((new_length + 1), sizeof(signed short int));
|
|
653 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
654 |
write_data = gus_sample->data;
|
|
655 |
@@ -1686,7 +1686,7 @@
|
|
656 |
return 0;
|
|
657 |
}
|
|
658 |
|
|
659 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
660 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
661 |
return -1;
|
|
662 |
}
|
|
663 |
|
|
664 |
@@ -1697,7 +1697,7 @@
|
|
665 |
unsigned char *read_end = data + gus_sample->data_length;
|
|
666 |
signed short int *write_data = NULL;
|
|
667 |
|
|
668 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
669 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
670 |
gus_sample->data = calloc(((gus_sample->data_length >> 1) + 1),sizeof(signed short int));
|
|
671 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
672 |
write_data = gus_sample->data;
|
|
673 |
@@ -1717,7 +1717,7 @@
|
|
674 |
gus_sample->data_length >>= 1;
|
|
675 |
return 0;
|
|
676 |
}
|
|
677 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
678 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
679 |
return -1;
|
|
680 |
}
|
|
681 |
|
|
682 |
@@ -1733,7 +1733,7 @@
|
|
683 |
signed short int *write_data_a = NULL;
|
|
684 |
signed short int *write_data_b = NULL;
|
|
685 |
|
|
686 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
687 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
688 |
gus_sample->data = calloc(((new_length >> 1) + 1), sizeof(signed short int));
|
|
689 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
690 |
write_data = gus_sample->data;
|
|
691 |
@@ -1794,7 +1794,7 @@
|
|
692 |
return 0;
|
|
693 |
}
|
|
694 |
|
|
695 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
696 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
697 |
return -1;
|
|
698 |
}
|
|
699 |
|
|
700 |
@@ -1806,7 +1806,7 @@
|
|
701 |
signed short int *write_data = NULL;
|
|
702 |
unsigned long int tmp_loop = 0;
|
|
703 |
|
|
704 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
705 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
706 |
gus_sample->data = calloc(((gus_sample->data_length >> 1) + 1), sizeof(signed short int));
|
|
707 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
708 |
write_data = gus_sample->data + (gus_sample->data_length >> 1) - 1;
|
|
709 |
@@ -1830,7 +1830,7 @@
|
|
710 |
gus_sample->modes ^= SAMPLE_REVERSE;
|
|
711 |
return 0;
|
|
712 |
}
|
|
713 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
714 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
715 |
return -1;
|
|
716 |
}
|
|
717 |
|
|
718 |
@@ -1847,7 +1847,7 @@
|
|
719 |
signed short int *write_data_a = NULL;
|
|
720 |
signed short int *write_data_b = NULL;
|
|
721 |
|
|
722 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
723 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
724 |
gus_sample->data = calloc(((new_length >> 1) + 1), sizeof(signed short int));
|
|
725 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
726 |
write_data = gus_sample->data;
|
|
727 |
@@ -1904,7 +1904,7 @@
|
|
728 |
return 0;
|
|
729 |
}
|
|
730 |
|
|
731 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
732 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
733 |
return -1;
|
|
734 |
}
|
|
735 |
|
|
736 |
@@ -1915,7 +1915,7 @@
|
|
737 |
unsigned char *read_end = data + gus_sample->data_length;
|
|
738 |
signed short int *write_data = NULL;
|
|
739 |
|
|
740 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
741 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
742 |
gus_sample->data = calloc(((gus_sample->data_length >> 1) + 1),sizeof(signed short int));
|
|
743 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
744 |
write_data = gus_sample->data;
|
|
745 |
@@ -1935,7 +1935,7 @@
|
|
746 |
gus_sample->modes ^= SAMPLE_UNSIGNED;
|
|
747 |
return 0;
|
|
748 |
}
|
|
749 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
750 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
751 |
return -1;
|
|
752 |
}
|
|
753 |
|
|
754 |
@@ -1951,7 +1951,7 @@
|
|
755 |
signed short int *write_data_a = NULL;
|
|
756 |
signed short int *write_data_b = NULL;
|
|
757 |
|
|
758 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
759 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
760 |
gus_sample->data = calloc(((new_length >> 1) + 1), sizeof(signed short int));
|
|
761 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
762 |
write_data = gus_sample->data;
|
|
763 |
@@ -2012,7 +2012,7 @@
|
|
764 |
return 0;
|
|
765 |
}
|
|
766 |
|
|
767 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
768 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
769 |
return -1;
|
|
770 |
}
|
|
771 |
|
|
772 |
@@ -2024,7 +2024,7 @@
|
|
773 |
signed short int *write_data = NULL;
|
|
774 |
unsigned long int tmp_loop = 0;
|
|
775 |
|
|
776 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
777 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
778 |
gus_sample->data = calloc(((gus_sample->data_length >> 1) + 1), sizeof(signed short int));
|
|
779 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
780 |
write_data = gus_sample->data + (gus_sample->data_length >> 1) - 1;
|
|
781 |
@@ -2048,7 +2048,7 @@
|
|
782 |
gus_sample->modes ^= SAMPLE_REVERSE | SAMPLE_UNSIGNED;
|
|
783 |
return 0;
|
|
784 |
}
|
|
785 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
786 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
787 |
return -1;
|
|
788 |
}
|
|
789 |
|
|
790 |
@@ -2064,7 +2064,7 @@
|
|
791 |
signed short int *write_data_a = NULL;
|
|
792 |
signed short int *write_data_b = NULL;
|
|
793 |
|
|
794 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
795 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
796 |
gus_sample->data = calloc(((new_length >> 1) + 1), sizeof(signed short int));
|
|
797 |
if (__builtin_expect((gus_sample->data != NULL),1)) {
|
|
798 |
write_data = gus_sample->data;
|
|
799 |
@@ -2120,7 +2120,7 @@
|
|
800 |
return 0;
|
|
801 |
}
|
|
802 |
|
|
803 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
804 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to parse sample", errno);
|
|
805 |
return -1;
|
|
806 |
}
|
|
807 |
|
|
808 |
@@ -2156,33 +2156,33 @@
|
|
809 |
};
|
|
810 |
unsigned long int tmp_loop;
|
|
811 |
|
|
812 |
- SAMPLE_CONVERT_DEBUG(__FUNCTION__);
|
|
813 |
+ SAMPLE_CONVERT_DEBUG(__func__);
|
|
814 |
SAMPLE_CONVERT_DEBUG(sample_patch->filename);
|
|
815 |
sample_patch->loaded = 1;
|
|
816 |
if ((gus_patch = WM_BufferFile(sample_patch->filename,&gus_size)) == NULL) {
|
|
817 |
return -1;
|
|
818 |
}
|
|
819 |
if (gus_size < 239) {
|
|
820 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_CORUPT, "(too short)", 0);
|
|
821 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, sample_patch->filename, 0);
|
|
822 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_CORUPT, "(too short)", 0);
|
|
823 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, sample_patch->filename, 0);
|
|
824 |
free(gus_patch);
|
|
825 |
return -1;
|
|
826 |
}
|
|
827 |
if (memcmp(gus_patch, "GF1PATCH110\0ID#000002", 22) && memcmp(gus_patch, "GF1PATCH100\0ID#000002", 22)) {
|
|
828 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID,"(unsupported format)", 0);
|
|
829 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, sample_patch->filename, 0);
|
|
830 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID,"(unsupported format)", 0);
|
|
831 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, sample_patch->filename, 0);
|
|
832 |
free(gus_patch);
|
|
833 |
return -1;
|
|
834 |
}
|
|
835 |
if (gus_patch[82] > 1) {
|
|
836 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID,"(unsupported format)", 0);
|
|
837 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, sample_patch->filename, 0);
|
|
838 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID,"(unsupported format)", 0);
|
|
839 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, sample_patch->filename, 0);
|
|
840 |
free(gus_patch);
|
|
841 |
return -1;
|
|
842 |
}
|
|
843 |
if (gus_patch[151] > 1) {
|
|
844 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID,"(unsupported format)", 0);
|
|
845 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, sample_patch->filename, 0);
|
|
846 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID,"(unsupported format)", 0);
|
|
847 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, sample_patch->filename, 0);
|
|
848 |
free(gus_patch);
|
|
849 |
return -1;
|
|
850 |
}
|
|
851 |
@@ -2200,8 +2200,8 @@
|
|
852 |
gus_sample = gus_sample->next;
|
|
853 |
}
|
|
854 |
if (gus_sample == NULL) {
|
|
855 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
856 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_LOAD, sample_patch->filename, 0);
|
|
857 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, 0);
|
|
858 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_LOAD, sample_patch->filename, 0);
|
|
859 |
return -1;
|
|
860 |
}
|
|
861 |
|
|
862 |
@@ -2259,7 +2259,7 @@
|
|
863 |
} else {
|
|
864 |
gus_sample->env_rate[i] = (unsigned long int)(4194303.0 / ((float)WM_SampleRate * env_time_table[env_rate]));
|
|
865 |
if (gus_sample->env_rate[i] == 0) {
|
|
866 |
- fprintf(stderr,"\rWarning: libWildMidi %s found invalid envelope(%lu) rate setting in %s. Using %f instead.\n",__FUNCTION__, i, sample_patch->filename, env_time_table[63]);
|
|
867 |
+ fprintf(stderr,"\rWarning: libWildMidi %s found invalid envelope(%lu) rate setting in %s. Using %f instead.\n",__func__, i, sample_patch->filename, env_time_table[63]);
|
|
868 |
gus_sample->env_rate[i] = (unsigned long int)(4194303.0 / ((float)WM_SampleRate * env_time_table[63]));
|
|
869 |
}
|
|
870 |
}
|
|
871 |
@@ -2420,7 +2420,7 @@
|
|
872 |
var_data |= mdi->data[track->ptr] & 0x7f;
|
|
873 |
track->ptr++;
|
|
874 |
if (track->ptr > mdi->size) {
|
|
875 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_CORUPT, "(too short)", 0);
|
|
876 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_CORUPT, "(too short)", 0);
|
|
877 |
return 0xFFFFFFFF;
|
|
878 |
}
|
|
879 |
var_data = (var_data << 7);
|
|
880 |
@@ -2430,7 +2430,7 @@
|
|
881 |
track->ptr++;
|
|
882 |
|
|
883 |
if (track->ptr > mdi->size) {
|
|
884 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_CORUPT, "(too short)", 0);
|
|
885 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_CORUPT, "(too short)", 0);
|
|
886 |
return 0xFFFFFFFF;
|
|
887 |
}
|
|
888 |
|
|
889 |
@@ -2441,7 +2441,7 @@
|
|
890 |
do_note_off (unsigned char ch, struct _mdi *mdi, unsigned long int ptr) {
|
|
891 |
struct _note *nte;
|
|
892 |
|
|
893 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
894 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
895 |
|
|
896 |
nte = &mdi->note_table[0][ch][mdi->data[ptr]];
|
|
897 |
if (!nte->active)
|
|
898 |
@@ -2530,7 +2530,7 @@
|
|
899 |
return;
|
|
900 |
}
|
|
901 |
|
|
902 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
903 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
904 |
|
|
905 |
if (ch != 9) {
|
|
906 |
patch = mdi->channel[ch].patch;
|
|
907 |
@@ -2597,7 +2597,7 @@
|
|
908 |
do_aftertouch (unsigned char ch, struct _mdi *mdi, unsigned long int ptr) {
|
|
909 |
struct _note *nte;
|
|
910 |
|
|
911 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
912 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
913 |
|
|
914 |
nte = &mdi->note_table[0][ch][mdi->data[ptr]];
|
|
915 |
if (!nte->active) {
|
|
916 |
@@ -2945,7 +2945,7 @@
|
|
917 |
|
|
918 |
void
|
|
919 |
do_patch (unsigned char ch, struct _mdi *mdi, unsigned long int ptr) {
|
|
920 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
921 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
922 |
if (ch != 9) {
|
|
923 |
mdi->channel[ch].patch = get_patch_data(mdi, ((mdi->channel[ch].bank << 8) | mdi->data[ptr]));
|
|
924 |
} else {
|
|
925 |
@@ -2956,7 +2956,7 @@
|
|
926 |
void
|
|
927 |
do_channel_pressure (unsigned char ch, struct _mdi *mdi, unsigned long int ptr) {
|
|
928 |
struct _note **note_data = mdi->note;
|
|
929 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
930 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
931 |
|
|
932 |
if (note_data != mdi->last_note) {
|
|
933 |
do {
|
|
934 |
@@ -2978,7 +2978,7 @@
|
|
935 |
do_pitch (unsigned char ch, struct _mdi *mdi, unsigned long int ptr) {
|
|
936 |
struct _note **note_data = mdi->note;
|
|
937 |
|
|
938 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
939 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
940 |
mdi->channel[ch].pitch = ((mdi->data[ptr+1] << 7) | mdi->data[ptr]) - 0x2000;
|
|
941 |
|
|
942 |
if (mdi->channel[ch].pitch < 0) {
|
|
943 |
@@ -3002,7 +3002,7 @@
|
|
944 |
unsigned char event_type = 0xF0 | ch;
|
|
945 |
static unsigned long int tempo = 500000;
|
|
946 |
|
|
947 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
948 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
949 |
if (event_type == 0xFF) {
|
|
950 |
if ((mdi->data[ptr] == 0x51) && (mdi->data[ptr+1] == 3)) {
|
|
951 |
tempo = (mdi->data[ptr+2] << 16) | (mdi->data[ptr+3] << 8) | mdi->data[ptr+4];
|
|
952 |
@@ -3017,7 +3017,7 @@
|
|
953 |
|
|
954 |
void
|
|
955 |
do_null (unsigned char ch, struct _mdi *mdi, unsigned long int ptr) {
|
|
956 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
957 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
958 |
};
|
|
959 |
|
|
960 |
|
|
961 |
@@ -3138,7 +3138,7 @@
|
|
962 |
|
|
963 |
void
|
|
964 |
do_amp_setup_note_off (unsigned char ch, struct _mdi *mdi, struct _miditrack *track) {
|
|
965 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
966 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
967 |
|
|
968 |
mdi->lin_cur_vol -= (lin_volume[mdi->note_vel[ch][mdi->data[track->ptr]]] *
|
|
969 |
lin_volume[mdi->ch_exp[ch]] * lin_volume[mdi->ch_vol[ch]]) / 1048576;
|
|
970 |
@@ -3154,7 +3154,7 @@
|
|
971 |
|
|
972 |
void
|
|
973 |
do_amp_setup_note_on (unsigned char ch, struct _mdi *mdi, struct _miditrack *track) {
|
|
974 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
975 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
976 |
if (mdi->data[track->ptr+1] == 0x00) {
|
|
977 |
do_amp_setup_note_off(ch, mdi, track);
|
|
978 |
track->running_event = 0x90 | ch;
|
|
979 |
@@ -3194,7 +3194,7 @@
|
|
980 |
do_amp_setup_aftertouch (unsigned char ch, struct _mdi *mdi, struct _miditrack *track) {
|
|
981 |
unsigned char pres = mdi->data[track->ptr+1];
|
|
982 |
|
|
983 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
984 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
985 |
|
|
986 |
if (pres == 0)
|
|
987 |
pres = 1;
|
|
988 |
@@ -3229,7 +3229,7 @@
|
|
989 |
do_amp_setup_control (unsigned char ch, struct _mdi *mdi, struct _miditrack *track) {
|
|
990 |
int i;
|
|
991 |
|
|
992 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
993 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
994 |
if (mdi->data[track->ptr] == 0x00) {
|
|
995 |
mdi->channel[ch].bank = mdi->data[track->ptr + 1];
|
|
996 |
} else if (mdi->data[track->ptr] == 0x07) {
|
|
997 |
@@ -3300,7 +3300,7 @@
|
|
998 |
int i;
|
|
999 |
unsigned char pres = mdi->data[track->ptr];
|
|
1000 |
|
|
1001 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
1002 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
1003 |
|
|
1004 |
if (pres == 0)
|
|
1005 |
pres = 1;
|
|
1006 |
@@ -3334,7 +3334,7 @@
|
|
1007 |
|
|
1008 |
void
|
|
1009 |
do_amp_setup_pitch (unsigned char ch, struct _mdi *mdi, struct _miditrack *track) {
|
|
1010 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
1011 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
1012 |
track->running_event = 0xE0 | ch;
|
|
1013 |
track->ptr += 2;
|
|
1014 |
return;
|
|
1015 |
@@ -3347,7 +3347,7 @@
|
|
1016 |
unsigned char event_data = mdi->data[track->ptr];
|
|
1017 |
static unsigned long int tempo = 500000;
|
|
1018 |
|
|
1019 |
- MIDI_EVENT_DEBUG(__FUNCTION__,ch);
|
|
1020 |
+ MIDI_EVENT_DEBUG(__func__,ch);
|
|
1021 |
if (event_type == 0xF0) {
|
|
1022 |
track->running_event = 0x00;
|
|
1023 |
do {
|
|
1024 |
@@ -3407,7 +3407,7 @@
|
|
1025 |
|
|
1026 |
mdi = malloc(sizeof(struct _mdi));
|
|
1027 |
if (mdi == NULL) {
|
|
1028 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM," to parse midi data", errno);
|
|
1029 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM," to parse midi data", errno);
|
|
1030 |
free (mididata);
|
|
1031 |
return NULL;
|
|
1032 |
}
|
|
1033 |
@@ -3421,7 +3421,7 @@
|
|
1034 |
|
|
1035 |
mdi->index = malloc(((midisize / 2) + 1)* sizeof(struct _mdi_index));
|
|
1036 |
if (mdi->index == NULL) {
|
|
1037 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM," to parse midi data", errno);
|
|
1038 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM," to parse midi data", errno);
|
|
1039 |
free(mdi);
|
|
1040 |
return NULL;
|
|
1041 |
}
|
|
1042 |
@@ -3444,14 +3444,14 @@
|
|
1043 |
midiofs = 20;
|
|
1044 |
|
|
1045 |
if (strncmp(&mididata[midiofs],"MThd",4) != 0) {
|
|
1046 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID,"(not a midi file)", 0);
|
|
1047 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID,"(not a midi file)", 0);
|
|
1048 |
free(mdi->index);
|
|
1049 |
free(mdi);
|
|
1050 |
return NULL;
|
|
1051 |
}
|
|
1052 |
|
|
1053 |
if ((midiofs + 25) > midisize) {
|
|
1054 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_CORUPT,"(too short)", 0);
|
|
1055 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_CORUPT,"(too short)", 0);
|
|
1056 |
free(mdi->index);
|
|
1057 |
free(mdi);
|
|
1058 |
return NULL;
|
|
1059 |
@@ -3459,7 +3459,7 @@
|
|
1060 |
|
|
1061 |
midiofs += 9;
|
|
1062 |
if (mididata[midiofs] > 1) {
|
|
1063 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID, NULL, 0);
|
|
1064 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID, NULL, 0);
|
|
1065 |
free(mdi->index);
|
|
1066 |
free(mdi);
|
|
1067 |
return NULL;
|
|
1068 |
@@ -3478,7 +3478,7 @@
|
|
1069 |
if (first_handle == NULL) {
|
|
1070 |
first_handle = malloc(sizeof(struct _hndl));
|
|
1071 |
if (first_handle == NULL) {
|
|
1072 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM," to parse midi data", errno);
|
|
1073 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM," to parse midi data", errno);
|
|
1074 |
free(mdi->data);
|
|
1075 |
free(mdi);
|
|
1076 |
return NULL;
|
|
1077 |
@@ -3495,7 +3495,7 @@
|
|
1078 |
}
|
|
1079 |
tmp_handle->next = malloc(sizeof(struct _hndl));
|
|
1080 |
if (tmp_handle->next == NULL) {
|
|
1081 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM," to parse midi data", errno);
|
|
1082 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM," to parse midi data", errno);
|
|
1083 |
free(mdi->data);
|
|
1084 |
free(mdi);
|
|
1085 |
return NULL;
|
|
1086 |
@@ -3512,13 +3512,13 @@
|
|
1087 |
midi_track_counter = 0;
|
|
1088 |
while (midi_track_counter != no_tracks) {
|
|
1089 |
if ((midiofs + 12) > midisize) {
|
|
1090 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_CORUPT, "(too short)", 0);
|
|
1091 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_CORUPT, "(too short)", 0);
|
|
1092 |
WildMidi_Close(mdi);
|
|
1093 |
free(tmp_trackdata);
|
|
1094 |
return NULL;
|
|
1095 |
}
|
|
1096 |
if (strncmp(&mididata[midiofs],"MTrk",4) != 0) {
|
|
1097 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_CORUPT, "(Expected track header)", 0);
|
|
1098 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_CORUPT, "(Expected track header)", 0);
|
|
1099 |
WildMidi_Close(mdi);
|
|
1100 |
free(tmp_trackdata);
|
|
1101 |
return NULL;
|
|
1102 |
@@ -3528,7 +3528,7 @@
|
|
1103 |
midiofs += 4;
|
|
1104 |
|
|
1105 |
if (midisize < (midiofs + tmp_trackdata[midi_track_counter].length)) {
|
|
1106 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_CORUPT, "(too short)", 0);
|
|
1107 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_CORUPT, "(too short)", 0);
|
|
1108 |
WildMidi_Close(mdi);
|
|
1109 |
free(tmp_trackdata);
|
|
1110 |
return NULL;
|
|
1111 |
@@ -3545,7 +3545,7 @@
|
|
1112 |
midiofs += tmp_trackdata[midi_track_counter].length;
|
|
1113 |
|
|
1114 |
if (memcmp(&mididata[midiofs-3], eot,3) != 0) {
|
|
1115 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_CORUPT, "(Expected EOT)", 0);
|
|
1116 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_CORUPT, "(Expected EOT)", 0);
|
|
1117 |
WildMidi_Close(mdi);
|
|
1118 |
free(tmp_trackdata);
|
|
1119 |
return NULL;
|
|
1120 |
@@ -3579,7 +3579,7 @@
|
|
1121 |
if (mdi->data[tmp_trackdata[i].ptr] < 0x80) {
|
|
1122 |
current_event = tmp_trackdata[i].running_event;
|
|
1123 |
if (current_event < 0x80) {
|
|
1124 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_CORUPT, "(expected event)", 0);
|
|
1125 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_CORUPT, "(expected event)", 0);
|
|
1126 |
WildMidi_Close(mdi);
|
|
1127 |
free(tmp_trackdata);
|
|
1128 |
return NULL;
|
|
1129 |
@@ -3630,7 +3630,7 @@
|
|
1130 |
mdi->index_size = index_count;
|
|
1131 |
mdi->index = realloc(mdi->index, (sizeof(struct _mdi_index) * mdi->index_size));
|
|
1132 |
if (mdi->index == NULL) {
|
|
1133 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
1134 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, NULL, errno);
|
|
1135 |
WildMidi_Close(mdi);
|
|
1136 |
free(tmp_trackdata);
|
|
1137 |
return NULL;
|
|
1138 |
@@ -3704,12 +3704,12 @@
|
|
1139 |
int
|
|
1140 |
WildMidi_Init (const char * config_file, unsigned short int rate, unsigned short int options) {
|
|
1141 |
if (WM_Initialized) {
|
|
1142 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1143 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1144 |
return -1;
|
|
1145 |
}
|
|
1146 |
|
|
1147 |
if (config_file == NULL) {
|
|
1148 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL config file pointer)", 0);
|
|
1149 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL config file pointer)", 0);
|
|
1150 |
return -1;
|
|
1151 |
}
|
|
1152 |
WM_InitPatches();
|
|
1153 |
@@ -3718,14 +3718,14 @@
|
|
1154 |
}
|
|
1155 |
|
|
1156 |
if (options & 0xFFD8) {
|
|
1157 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(invalid option)", 0);
|
|
1158 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(invalid option)", 0);
|
|
1159 |
WM_FreePatches();
|
|
1160 |
return -1;
|
|
1161 |
}
|
|
1162 |
WM_MixerOptions = options;
|
|
1163 |
|
|
1164 |
if ((rate < 11000) || (rate > 65000)) {
|
|
1165 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(rate out of bounds, range is 11000 - 65000)", 0);
|
|
1166 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(rate out of bounds, range is 11000 - 65000)", 0);
|
|
1167 |
WM_FreePatches();
|
|
1168 |
return -1;
|
|
1169 |
}
|
|
1170 |
@@ -3745,11 +3745,11 @@
|
|
1171 |
int i = 0;
|
|
1172 |
|
|
1173 |
if (!WM_Initialized) {
|
|
1174 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1175 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1176 |
return -1;
|
|
1177 |
}
|
|
1178 |
if (master_volume > 127) {
|
|
1179 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(master volume out of range, range is 0-127)", 0);
|
|
1180 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(master volume out of range, range is 0-127)", 0);
|
|
1181 |
return -1;
|
|
1182 |
}
|
|
1183 |
|
|
1184 |
@@ -3776,15 +3776,15 @@
|
|
1185 |
int i;
|
|
1186 |
|
|
1187 |
if (!WM_Initialized) {
|
|
1188 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1189 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1190 |
return -1;
|
|
1191 |
}
|
|
1192 |
if (handle == NULL) {
|
|
1193 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1194 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1195 |
return -1;
|
|
1196 |
}
|
|
1197 |
if (first_handle == NULL) {
|
|
1198 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(no midi's open)", 0);
|
|
1199 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(no midi's open)", 0);
|
|
1200 |
return -1;
|
|
1201 |
}
|
|
1202 |
WM_Lock(&mdi->lock);
|
|
1203 |
@@ -3799,7 +3799,7 @@
|
|
1204 |
while (tmp_handle->handle != handle) {
|
|
1205 |
tmp_handle = tmp_handle->next;
|
|
1206 |
if (tmp_handle == NULL) {
|
|
1207 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(handle does not exist)", 0);
|
|
1208 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(handle does not exist)", 0);
|
|
1209 |
return -1;
|
|
1210 |
}
|
|
1211 |
}
|
|
1212 |
@@ -3850,11 +3850,11 @@
|
|
1213 |
unsigned long int midisize = 0;
|
|
1214 |
|
|
1215 |
if (!WM_Initialized) {
|
|
1216 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1217 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1218 |
return NULL;
|
|
1219 |
}
|
|
1220 |
if (midifile == NULL) {
|
|
1221 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL filename)", 0);
|
|
1222 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL filename)", 0);
|
|
1223 |
return NULL;
|
|
1224 |
}
|
|
1225 |
|
|
1226 |
@@ -3868,11 +3868,11 @@
|
|
1227 |
midi *
|
|
1228 |
WildMidi_OpenBuffer (unsigned char *midibuffer, unsigned long int size) {
|
|
1229 |
if (!WM_Initialized) {
|
|
1230 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1231 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1232 |
return NULL;
|
|
1233 |
}
|
|
1234 |
if (midibuffer == NULL) {
|
|
1235 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL midi data buffer)", 0);
|
|
1236 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL midi data buffer)", 0);
|
|
1237 |
return NULL;
|
|
1238 |
}
|
|
1239 |
|
|
1240 |
@@ -3901,16 +3901,16 @@
|
|
1241 |
unsigned long int real_samples_to_mix = 0;
|
|
1242 |
|
|
1243 |
if (!WM_Initialized) {
|
|
1244 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1245 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1246 |
return -1;
|
|
1247 |
}
|
|
1248 |
if (handle == NULL) {
|
|
1249 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1250 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1251 |
return -1;
|
|
1252 |
}
|
|
1253 |
WM_Lock(&mdi->lock);
|
|
1254 |
if (sample_pos == NULL) {
|
|
1255 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL seek position pointer)", 0);
|
|
1256 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL seek position pointer)", 0);
|
|
1257 |
WM_Unlock(&mdi->lock);
|
|
1258 |
return -1;
|
|
1259 |
}
|
|
1260 |
@@ -3992,16 +3992,16 @@
|
|
1261 |
unsigned long int tmp_samples_to_mix = 0;
|
|
1262 |
|
|
1263 |
if (!WM_Initialized) {
|
|
1264 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1265 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1266 |
return -1;
|
|
1267 |
}
|
|
1268 |
if (handle == NULL) {
|
|
1269 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1270 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1271 |
return -1;
|
|
1272 |
}
|
|
1273 |
WM_Lock(&mdi->lock);
|
|
1274 |
if (sample_pos == NULL) {
|
|
1275 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL seek position pointer)", 0);
|
|
1276 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL seek position pointer)", 0);
|
|
1277 |
WM_Unlock(&mdi->lock);
|
|
1278 |
return -1;
|
|
1279 |
}
|
|
1280 |
@@ -4191,15 +4191,15 @@
|
|
1281 |
unsigned long int count;
|
|
1282 |
|
|
1283 |
if (__builtin_expect((!WM_Initialized),0)) {
|
|
1284 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1285 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1286 |
return -1;
|
|
1287 |
}
|
|
1288 |
if (__builtin_expect((handle == NULL),0)) {
|
|
1289 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1290 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1291 |
return -1;
|
|
1292 |
}
|
|
1293 |
if (__builtin_expect((buffer == NULL),0)) {
|
|
1294 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL buffer pointer)", 0);
|
|
1295 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL buffer pointer)", 0);
|
|
1296 |
return -1;
|
|
1297 |
}
|
|
1298 |
|
|
1299 |
@@ -4208,7 +4208,7 @@
|
|
1300 |
}
|
|
1301 |
|
|
1302 |
if (__builtin_expect((size % 4),0)) {
|
|
1303 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(size not a multiple of 4)", 0);
|
|
1304 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(size not a multiple of 4)", 0);
|
|
1305 |
return -1;
|
|
1306 |
}
|
|
1307 |
|
|
1308 |
@@ -4548,15 +4548,15 @@
|
|
1309 |
|
|
1310 |
|
|
1311 |
if (__builtin_expect((!WM_Initialized),0)) {
|
|
1312 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1313 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1314 |
return -1;
|
|
1315 |
}
|
|
1316 |
if (__builtin_expect((handle == NULL),0)) {
|
|
1317 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1318 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1319 |
return -1;
|
|
1320 |
}
|
|
1321 |
if (__builtin_expect((buffer == NULL),0)) {
|
|
1322 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL buffer pointer)", 0);
|
|
1323 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL buffer pointer)", 0);
|
|
1324 |
return -1;
|
|
1325 |
}
|
|
1326 |
|
|
1327 |
@@ -4565,7 +4565,7 @@
|
|
1328 |
}
|
|
1329 |
|
|
1330 |
if (__builtin_expect((size % 4),0)) {
|
|
1331 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(size not a multiple of 4)", 0);
|
|
1332 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(size not a multiple of 4)", 0);
|
|
1333 |
return -1;
|
|
1334 |
}
|
|
1335 |
|
|
1336 |
@@ -4922,15 +4922,15 @@
|
|
1337 |
struct _mdi *mdi = (struct _mdi *)handle;
|
|
1338 |
|
|
1339 |
if (__builtin_expect((!WM_Initialized),0)) {
|
|
1340 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1341 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1342 |
return -1;
|
|
1343 |
}
|
|
1344 |
if (__builtin_expect((handle == NULL),0)) {
|
|
1345 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1346 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1347 |
return -1;
|
|
1348 |
}
|
|
1349 |
if (__builtin_expect((buffer == NULL),0)) {
|
|
1350 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL buffer pointer)", 0);
|
|
1351 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL buffer pointer)", 0);
|
|
1352 |
return -1;
|
|
1353 |
}
|
|
1354 |
|
|
1355 |
@@ -4939,7 +4939,7 @@
|
|
1356 |
}
|
|
1357 |
|
|
1358 |
if (__builtin_expect((size % 4),0)) {
|
|
1359 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(size not a multiple of 4)", 0);
|
|
1360 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(size not a multiple of 4)", 0);
|
|
1361 |
return -1;
|
|
1362 |
}
|
|
1363 |
if (mdi->info.mixer_options & WM_MO_EXPENSIVE_INTERPOLATION) {
|
|
1364 |
@@ -4956,21 +4956,21 @@
|
|
1365 |
int i;
|
|
1366 |
|
|
1367 |
if (!WM_Initialized) {
|
|
1368 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1369 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1370 |
return -1;
|
|
1371 |
}
|
|
1372 |
if (handle == NULL) {
|
|
1373 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1374 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1375 |
return -1;
|
|
1376 |
}
|
|
1377 |
WM_Lock(&mdi->lock);
|
|
1378 |
if ((!(options & 0x0007)) || (options & 0xFFF8)){
|
|
1379 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(invalid option)", 0);
|
|
1380 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(invalid option)", 0);
|
|
1381 |
WM_Unlock(&mdi->lock);
|
|
1382 |
return -1;
|
|
1383 |
}
|
|
1384 |
if (setting & 0xFFF8) {
|
|
1385 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(invalid setting)", 0);
|
|
1386 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(invalid setting)", 0);
|
|
1387 |
WM_Unlock(&mdi->lock);
|
|
1388 |
return -1;
|
|
1389 |
}
|
|
1390 |
@@ -5023,18 +5023,18 @@
|
|
1391 |
WildMidi_GetInfo (midi * handle) {
|
|
1392 |
struct _mdi *mdi = (struct _mdi *)handle;
|
|
1393 |
if (!WM_Initialized) {
|
|
1394 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1395 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1396 |
return NULL;
|
|
1397 |
}
|
|
1398 |
if (handle == NULL) {
|
|
1399 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1400 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_INVALID_ARG, "(NULL handle)", 0);
|
|
1401 |
return NULL;
|
|
1402 |
}
|
|
1403 |
WM_Lock(&mdi->lock);
|
|
1404 |
if (mdi->tmp_info == NULL) {
|
|
1405 |
mdi->tmp_info = malloc(sizeof(struct _WM_Info));
|
|
1406 |
if (mdi->tmp_info == NULL) {
|
|
1407 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_MEM, "to set info", 0);
|
|
1408 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_MEM, "to set info", 0);
|
|
1409 |
WM_Unlock(&mdi->lock);
|
|
1410 |
return NULL;
|
|
1411 |
}
|
|
1412 |
@@ -5051,7 +5051,7 @@
|
|
1413 |
struct _hndl * tmp_hdle;
|
|
1414 |
|
|
1415 |
if (!WM_Initialized) {
|
|
1416 |
- WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1417 |
+ WM_ERROR(__func__, __LINE__, WM_ERR_NOT_INIT, NULL, 0);
|
|
1418 |
return -1;
|
|
1419 |
}
|
|
1420 |
if (first_handle != NULL) {
|