Debian Codegraph @

debian/patches/error.patch

raw symbols SCIP
1 Description: replace error() with pd_error()
2 error() has been removed and -Werror=implicit-function-declaration leads to
3 FTBFS
4 Author: IOhannes m zmölnig
5 Origin: Debian
6 Forwarded: no
7 Last-Update: 2024-03-16
8 ---
9 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
10 --- pd-unauthorized.orig/audience~.c
11 +++ pd-unauthorized/audience~.c
12 @@ -513,7 +513,7 @@
13 x->x_inputs_y = (t_int *) getbytes( x->x_nbinputs*sizeof(t_int) );
14 if ( !x->x_inputs || !x->x_inputs_x || !x->x_inputs_y )
15 {
16 - error( "audience~ : fatal : could not create new object" );
17 + pd_error(x, "audience~ : fatal : could not create new object" );
18 return;
19 }
20 for ( bi=0; bi<x->x_nbinputs; bi++ )
21 @@ -550,7 +550,7 @@
22 x->x_outputs_y = (t_int *) getbytes( x->x_nboutputs*sizeof(t_int) );
23 if ( !x->x_outputs || !x->x_outputs_x || !x->x_outputs_y )
24 {
25 - // error( "audience~ : fatal : could not create new object" );
26 + // pd_error(x, "audience~ : fatal : could not create new object" );
27 return;
28 }
29 for ( bi=0; bi<x->x_nboutputs; bi++ )
30 @@ -937,7 +937,7 @@
31 }
32 else
33 {
34 - error( "audience~ : delay : %d : wrong readpos !!! : %d >= %d or < 0", delay, readpos, x->x_audiobuffersize );
35 + pd_error(x, "audience~ : delay : %d : wrong readpos !!! : %d >= %d or < 0", delay, readpos, x->x_audiobuffersize );
36 }
37 op++;
38 }
39 --- pd-unauthorized.orig/blinkenlights.c
40 +++ pd-unauthorized/blinkenlights.c
41 @@ -767,7 +767,7 @@
42
43 if ( ( x->x_filed = sys_fopen( sfile->s_name, "r" ) ) == NULL )
44 {
45 - error( "blinkenlights : cannot open >%s<", sfile->s_name);
46 + pd_error(x, "blinkenlights : cannot open >%s<", sfile->s_name);
47 return;
48 }
49 post( "blinkenlights : opened >%s<", sfile->s_name);
50 --- pd-unauthorized.orig/formant~.c
51 +++ pd-unauthorized/formant~.c
52 @@ -87,7 +87,7 @@
53
54 if ( x->x_size <= 0 || x->x_central_freq <= 0 || x->x_filter_width <= 0 || x->x_skirt_width <= 0 )
55 {
56 - error( "formant~ : error generating data : negative or null parameter(s)" );
57 + pd_error(x, "formant~ : error generating data : negative or null parameter(s)" );
58 return -1;
59 }
60
61 @@ -229,7 +229,7 @@
62
63 if ( fsize <= 0 || ffreq <= 0 || ffwidth <= 0 || fswidth <= 0 )
64 {
65 - error( "formant~ : missing or negative creation arguments" );
66 + pd_error(x, "formant~ : missing or negative creation arguments" );
67 return NULL;
68 }
69
70 --- pd-unauthorized.orig/mp3amp~.c
71 +++ pd-unauthorized/mp3amp~.c
72 @@ -340,7 +340,7 @@
73 }
74 else // sorry, it will be ignored
75 {
76 - // error( "mp3amp~: incomplete frame...ignored");
77 + // pd_error(x, "mp3amp~: incomplete frame...ignored");
78 // x->x_offset = 0;
79 // x->x_inwriteposition = 0;
80 // x->x_inframes = 0;
81 @@ -431,7 +431,7 @@
82
83 if ( ret == 0 && ( x->x_inbuffersize-x->x_inwriteposition != 0 ) )
84 {
85 - error("mp3amp~: stream lost...");
86 + pd_error(x, "mp3amp~: stream lost...");
87 mp3amp_disconnect(x);
88 }
89 else
90 @@ -617,14 +617,14 @@
91
92 if (x->x_fd >= 0)
93 {
94 - error("mp3amp~: already connected");
95 + pd_error(x, "mp3amp~: already connected");
96 return NULL;
97 }
98
99 sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
100 if (sockfd < 0)
101 {
102 - error("mp3amp~: internal error while attempting to open socket");
103 + pd_error(x, "mp3amp~: internal error while attempting to open socket");
104 return NULL;
105 }
106
107 @@ -646,7 +646,7 @@
108 post("mp3amp~: connecting to http:/%s:%d/%s", x->x_hostname, x->x_port, x->x_mountpoint );
109 if (connect(sockfd, (struct sockaddr *) &server, sizeof (server)) < 0)
110 {
111 - error("mp3amp~: connection failed!\n");
112 + pd_error(x, "mp3amp~: connection failed!\n");
113 sys_closesocket(sockfd);
114 return NULL;
115 }
116 @@ -661,7 +661,7 @@
117 ret = select(sockfd + 1, &fdset, NULL, NULL, &tv);
118 if(ret != 0)
119 {
120 - error("mp3amp~: can not read from socket");
121 + pd_error(x, "mp3amp~: can not read from socket");
122 sys_closesocket(sockfd);
123 return NULL;
124 }
125 @@ -697,7 +697,7 @@
126 {
127 if( ( ret = recv(sockfd, request+offset, STRBUF_SIZE, MSG_NOSIGNAL) ) <0)
128 {
129 - error("mp3amp~: no response from server");
130 + pd_error(x, "mp3amp~: no response from server");
131 #ifndef _MSC_VER
132 perror( "recv" );
133 #endif
134 @@ -747,7 +747,7 @@
135 }
136 if( !(sptr = strstr(request, "200")) && !relocate )
137 {
138 - error("mp3amp~: cannot connect to the (default) stream");
139 + pd_error(x, "mp3amp~: cannot connect to the (default) stream");
140 return NULL;
141 }
142
143 @@ -1029,7 +1029,7 @@
144 }
145 if (relocate)
146 {
147 - error("mp3amp~: too many HTTP relocations");
148 + pd_error(x, "mp3amp~: too many HTTP relocations");
149 return NULL;
150 }
151 post("mp3amp~: connected to http://%s:%d/%s", hp->h_name, portno, x->x_mountpoint);
152 --- pd-unauthorized.orig/mp3cast~.c
153 +++ pd-unauthorized/mp3cast~.c
154 @@ -142,7 +142,7 @@
155 if(x->x_lamechunk < (int)sizeof(x->x_mp3inbuf))
156 #endif
157 {
158 - error("not enough memory!");
159 + pd_error(x, "not enough memory!");
160 return;
161 }
162
163 @@ -161,7 +161,7 @@
164 }
165 x->x_start = 1;
166 }
167 - if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)error("mp3cast~: buffers overlap!");
168 + if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)pd_error(x, "mp3cast~: buffers overlap!");
169
170 i = MY_MP3_MALLOC_IN_SIZE - x->x_outp;
171
172 @@ -199,7 +199,7 @@
173 if(x->x_mp3size<0)
174 {
175 lame_close( x->lgfp );
176 - error("mp3cast~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size);
177 + pd_error(x, "mp3cast~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size);
178 x->x_lame = -1;
179 }
180 }
181 @@ -214,7 +214,7 @@
182 err = send(x->x_fd, x->x_mp3outbuf, x->x_mp3size, 0);
183 if(err < 0)
184 {
185 - error("mp3cast~: could not send encoded data to server (%d)", err);
186 + pd_error(x, "mp3cast~: could not send encoded data to server (%d)", err);
187 lame_close( x->lgfp );
188 x->x_lame = -1;
189 #ifdef _WIN32
190 @@ -225,7 +225,7 @@
191 x->x_fd = -1;
192 outlet_float(x->x_obj.ob_outlet, 0);
193 }
194 - if((err > 0)&&(err != x->x_mp3size))error("mp3cast~: %d bytes skipped", x->x_mp3size - err);
195 + if((err > 0)&&(err != x->x_mp3size))pd_error(x, "mp3cast~: %d bytes skipped", x->x_mp3size - err);
196 }
197
198
199 @@ -358,7 +358,7 @@
200 dll=LoadLibrary("lame_enc.dll");
201 if(!dll)
202 {
203 - error("mp3cast~: error loading lame_enc.dll");
204 + pd_error(x, "mp3cast~: error loading lame_enc.dll");
205 closesocket(x->x_fd);
206 x->x_fd = -1;
207 outlet_float(x->x_obj.ob_outlet, 0);
208 @@ -467,14 +467,14 @@
209
210 if (x->x_fd >= 0)
211 {
212 - error("mp3cast~: already connected");
213 + pd_error(x, "mp3cast~: already connected");
214 return;
215 }
216
217 sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
218 if (sockfd < 0)
219 {
220 - error("mp3cast~: internal error while attempting to open socket");
221 + pd_error(x, "mp3cast~: internal error while attempting to open socket");
222 return;
223 }
224
225 @@ -496,7 +496,7 @@
226 post("mp3cast~: connecting to port %d", portno);
227 if (connect(sockfd, (struct sockaddr *) &server, sizeof (server)) < 0)
228 {
229 - error("mp3cast~: connection failed!\n");
230 + pd_error(x, "mp3cast~: connection failed!\n");
231 #ifdef _WIN32
232 closesocket(sockfd);
233 #else
234 @@ -514,7 +514,7 @@
235 ret = select(sockfd + 1, &fdset, NULL, NULL, &tv);
236 if(ret < 0)
237 {
238 - error("mp3cast~: can not read from socket");
239 + pd_error(x, "mp3cast~: can not read from socket");
240 #ifdef _WIN32
241 closesocket(sockfd);
242 #else
243 @@ -526,7 +526,7 @@
244 ret = select(sockfd + 1, NULL, &fdset, NULL, &tv);
245 if(ret < 0)
246 {
247 - error("mp3cast~: can not write to socket");
248 + pd_error(x, "mp3cast~: can not write to socket");
249 close(sockfd);
250 return;
251 }
252 @@ -579,7 +579,7 @@
253 send(sockfd, buf, strlen(buf), 0);
254 if(sprintf(resp, "%d", x->x_bitrate) == -1) /* convert int to a string */
255 {
256 - error("mp3cast~: wrong bitrate");
257 + pd_error(x, "mp3cast~: wrong bitrate");
258 }
259 send(sockfd, resp, strlen(resp), 0);
260 buf = "\nicy-pub:";
261 @@ -617,7 +617,7 @@
262 send(sockfd, buf, strlen(buf), 0);
263 if(sprintf(resp, "%d", x->x_bitrate) == -1) /* convert int to a string */
264 {
265 - error("mp3cast~: wrong bitrate");
266 + pd_error(x, "mp3cast~: wrong bitrate");
267 }
268 send(sockfd, resp, strlen(resp), 0);
269
270 @@ -711,7 +711,7 @@
271 /* bitrate */
272 if(sprintf(resp, "\r\nice-audio-info: bitrate=%d", x->x_bitrate) == -1)
273 {
274 - error("shoutcast~: could not create audio-info");
275 + pd_error(x, "shoutcast~: could not create audio-info");
276 }
277 send(sockfd, resp, strlen(resp), 0);
278 /* description */
279 @@ -953,7 +953,7 @@
280 x->x_buffer = getbytes(MY_MP3_MALLOC_IN_SIZE*sizeof(short)); /* what we get from pd, converted to PCM */
281 if ((!x->x_buffer)||(!x->x_mp3inbuf)||(!x->x_mp3outbuf)) /* check buffers... */
282 {
283 - error("out of memory!");
284 + pd_error(x, "out of memory!");
285 }
286 x->x_bytesbuffered = 0;
287 x->x_inp = 0;
288 --- pd-unauthorized.orig/mp3fileout~.c
289 +++ pd-unauthorized/mp3fileout~.c
290 @@ -434,14 +434,14 @@
291
292 if (x->x_socket >= 0)
293 {
294 - error("mp3fileout~: already connected");
295 + pd_error(x, "mp3fileout~: already connected");
296 return;
297 }
298
299 sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
300 if (sockfd < 0)
301 {
302 - error("mp3fileout~: internal error while attempting to open socket");
303 + pd_error(x, "mp3fileout~: internal error while attempting to open socket");
304 return;
305 }
306
307 @@ -467,7 +467,7 @@
308 post("mp3fileout~: connecting to port %d", portno);
309 if (connect(sockfd, (struct sockaddr *) &csocket, sizeof (csocket)) < 0)
310 {
311 - error("mp3fileout~: connection failed!\n");
312 + pd_error(x, "mp3fileout~: connection failed!\n");
313 #ifdef _WIN32
314 closesocket(sockfd);
315 #else
316 --- pd-unauthorized.orig/mp3streamout~.c
317 +++ pd-unauthorized/mp3streamout~.c
318 @@ -127,7 +127,7 @@
319 if(x->x_lamechunk < (int)sizeof(x->x_mp3inbuf))
320 #endif
321 {
322 - error("not enough memory!");
323 + pd_error(x, "not enough memory!");
324 return;
325 }
326
327 @@ -146,7 +146,7 @@
328 }
329 x->x_start = 1;
330 }
331 - if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)error("mp3streamout~: buffers overlap!");
332 + if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)pd_error(x, "mp3streamout~: buffers overlap!");
333
334 i = MY_MP3_MALLOC_IN_SIZE - x->x_outp;
335
336 @@ -186,7 +186,7 @@
337 if(x->x_mp3size<0)
338 {
339 lame_close( x->lgfp );
340 - error("mp3streamout~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size);
341 + pd_error(x, "mp3streamout~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size);
342 x->x_lame = -1;
343 }
344 }
345 @@ -211,7 +211,7 @@
346 count = send(x->x_fd, x->x_mp3outbuf, x->x_mp3size, MSG_NOSIGNAL);
347 if(count < 0)
348 {
349 - error("mp3streamout~: could not send encoded data to the peer (%d)", count);
350 + pd_error(x, "mp3streamout~: could not send encoded data to the peer (%d)", count);
351 lame_close( x->lgfp );
352 x->x_lame = -1;
353 #ifdef _WIN32
354 @@ -232,7 +232,7 @@
355 }
356 if((count > 0)&&(count != x->x_mp3size))
357 {
358 - error("mp3streamout~: %d bytes skipped", x->x_mp3size - count);
359 + pd_error(x, "mp3streamout~: %d bytes skipped", x->x_mp3size - count);
360 }
361 }
362
363 @@ -366,7 +366,7 @@
364 dll=LoadLibrary("lame_enc.dll");
365 if(dll==NULL)
366 {
367 - error("mp3streamout~: error loading lame_enc.dll");
368 + pd_error(x, "mp3streamout~: error loading lame_enc.dll");
369 closesocket(x->x_fd);
370 x->x_fd = -1;
371 outlet_float(x->x_obj.ob_outlet, 0);
372 @@ -428,14 +428,14 @@
373
374 if (x->x_fd >= 0)
375 {
376 - error("mp3streamout~: already connected");
377 + pd_error(x, "mp3streamout~: already connected");
378 return;
379 }
380
381 sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
382 if (sockfd < 0)
383 {
384 - error("mp3streamout~: internal error while attempting to open socket");
385 + pd_error(x, "mp3streamout~: internal error while attempting to open socket");
386 return;
387 }
388
389 @@ -461,7 +461,7 @@
390 post("mp3streamout~: connecting to port %d", portno);
391 if (connect(sockfd, (struct sockaddr *) &csocket, sizeof (csocket)) < 0)
392 {
393 - error("mp3streamout~: connection failed!\n");
394 + pd_error(x, "mp3streamout~: connection failed!\n");
395 #ifdef _WIN32
396 closesocket(sockfd);
397 #else
398 @@ -618,7 +618,7 @@
399 x->x_buffer = getbytes(MY_MP3_MALLOC_IN_SIZE*sizeof(short)); /* what we get from pd, converted to PCM */
400 if ((!x->x_buffer)||(!x->x_mp3inbuf)||(!x->x_mp3outbuf)) /* check buffers... */
401 {
402 - error("out of memory!");
403 + pd_error(x, "out of memory!");
404 }
405 x->x_bytesbuffered = 0;
406 x->x_inp = 0;
407 --- pd-unauthorized.orig/mp3write~.c
408 +++ pd-unauthorized/mp3write~.c
409 @@ -126,7 +126,7 @@
410 if(x->x_lamechunk < (int)sizeof(x->x_mp3inbuf))
411 #endif
412 {
413 - error("not enough memory!");
414 + pd_error(x, "not enough memory!");
415 return;
416 }
417
418 @@ -145,7 +145,7 @@
419 }
420 x->x_start = 1;
421 }
422 - if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)error("mp3write~: buffers overlap!");
423 + if((unsigned short)(x->x_outp - x->x_inp) < x->x_lamechunk)pd_error(x, "mp3write~: buffers overlap!");
424
425 i = MY_MP3_MALLOC_IN_SIZE - x->x_outp;
426
427 @@ -184,7 +184,7 @@
428 if(x->x_mp3size<0)
429 {
430 lame_close( x->lgfp );
431 - error("mp3write~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size);
432 + pd_error(x, "mp3write~: lame_encode_buffer_interleaved failed (%d)", x->x_mp3size);
433 x->x_lame = -1;
434 }
435 }
436 @@ -208,11 +208,11 @@
437
438 if(err < 0)
439 {
440 - error("mp3write~: could not write encoded data to file (%d)", err);
441 + pd_error(x, "mp3write~: could not write encoded data to file (%d)", err);
442 lame_close( x->lgfp );
443 x->x_lame = -1;
444 #ifdef _WIN32
445 - error("mp3write~: writing data");
446 + pd_error(x, "mp3write~: writing data");
447 _close(x->x_fd);
448 #else
449 perror("mp3write~: writing data");
450 @@ -225,7 +225,7 @@
451 x->x_byteswritten += err;
452 outlet_float( x->x_obj.ob_outlet, x->x_byteswritten );
453 }
454 - if((err > 0)&&(err != x->x_mp3size))error("mp3write~: %d bytes skipped", x->x_mp3size - err);
455 + if((err > 0)&&(err != x->x_mp3size))pd_error(x, "mp3write~: %d bytes skipped", x->x_mp3size - err);
456 }
457
458
459 @@ -360,7 +360,7 @@
460 dll=LoadLibrary("lame_enc.dll");
461 if(dll==NULL)
462 {
463 - error("mp3write~: error loading lame_enc.dll");
464 + pd_error(x, "mp3write~: error loading lame_enc.dll");
465 closesocket(x->x_fd);
466 x->x_fd = -1;
467 post("mp3write~: connection closed");
468 @@ -418,7 +418,7 @@
469 {
470 if ( mp3write_tilde_lame_init(x) < 0 )
471 {
472 - error( "mp3write~ : lame initialization failed ... check parameters.");
473 + pd_error(x, "mp3write~ : lame initialization failed ... check parameters.");
474 return;
475 }
476
477 @@ -444,7 +444,7 @@
478 #endif
479 if ( ( x->x_fd = sys_open( sfile->s_name, x->x_file_open_mode, mode) ) < 0 )
480 {
481 - error( "mp3write~ : cannot open >%s<", sfile->s_name);
482 + pd_error(x, "mp3write~ : cannot open >%s<", sfile->s_name);
483 x->x_fd=-1;
484 return;
485 }
486 @@ -615,7 +615,7 @@
487 x->x_buffer = getbytes(MY_MP3_MALLOC_IN_SIZE*sizeof(short)); /* what we get from pd, converted to PCM */
488 if ((!x->x_buffer)||(!x->x_mp3inbuf)||(!x->x_mp3outbuf)) /* check buffers... */
489 {
490 - error("mp3write~ : cannot allocate internal buffers");
491 + pd_error(x, "mp3write~ : cannot allocate internal buffers");
492 return NULL;
493 }
494 x->x_bytesbuffered = 0;
495 --- pd-unauthorized.orig/probalizer.c
496 +++ pd-unauthorized/probalizer.c
497 @@ -512,13 +512,13 @@
498 x->x_probs = (t_int*) getbytes( x->x_nvalues*sizeof(t_int) );
499 if ( !x->x_probs )
500 {
501 - error( "probalizer : could not allocate buffer" );
502 + pd_error(x, "probalizer : could not allocate buffer" );
503 return NULL;
504 }
505 x->x_ovalues = (t_int*) getbytes( x->x_nvalues*sizeof(t_int) );
506 if ( !x->x_ovalues )
507 {
508 - error( "probalizer : could not allocate buffer" );
509 + pd_error(x, "probalizer : could not allocate buffer" );
510 return NULL;
511 }
512 for ( ei=0; ei<x->x_nvalues; ei++ )
513 @@ -575,14 +575,14 @@
514
515 if ( nevalues == 0 )
516 {
517 - error( "probalizer : probabilities are null, sorry" );
518 + pd_error(x, "probalizer : probabilities are null, sorry" );
519 return;
520 }
521
522 candidates = ( t_int* ) getbytes( nevalues*sizeof( t_int ) );
523 if ( !candidates )
524 {
525 - error( "probalizer : could not allocate buffer for internal computation" );
526 + pd_error(x, "probalizer : could not allocate buffer for internal computation" );
527 return;
528 }
529
530 --- pd-unauthorized.orig/samplebox~.c
531 +++ pd-unauthorized/samplebox~.c
532 @@ -546,7 +546,7 @@
533
534 if ( fsize <= 0 )
535 {
536 - error( "samplebox~ : missing or negative creation arguments" );
537 + pd_error(x, "samplebox~ : missing or negative creation arguments" );
538 return NULL;
539 }
540
541 --- pd-unauthorized.orig/scrolllist.c
542 +++ pd-unauthorized/scrolllist.c
543 @@ -844,7 +844,7 @@
544 {
545 if ( argv[0].a_type != A_FLOAT )
546 {
547 - error( "scrolllist : wrong argument (capacity : 1)" );
548 + pd_error(x, "scrolllist : wrong argument (capacity : 1)" );
549 return NULL;
550 }
551 x->x_capacity = (int)argv[0].a_w.w_float;
552 @@ -853,13 +853,13 @@
553 {
554 if ( argv[1].a_type != A_FLOAT )
555 {
556 - error( "scrolllist : wrong argument (width : 2)" );
557 + pd_error(x, "scrolllist : wrong argument (width : 2)" );
558 return NULL;
559 }
560 if ( (int)argv[1].a_w.w_float <= 0 )
561 {
562 - error( "scrolllist : wrong width (%d)", (t_int)(int)argv[1].a_w.w_float );
563 - error( "scrolllist : usage : scrolllist <capacity> <width> <height>" );
564 + pd_error(x, "scrolllist : wrong width (%d)", (t_int)(int)argv[1].a_w.w_float );
565 + pd_error(x, "scrolllist : usage : scrolllist <capacity> <width> <height>" );
566 return NULL;
567 }
568 x->x_width = (int)argv[1].a_w.w_float;
569 @@ -868,13 +868,13 @@
570 {
571 if ( argv[2].a_type != A_FLOAT )
572 {
573 - error( "scrolllist : wrong argument (height : 3)" );
574 + pd_error(x, "scrolllist : wrong argument (height : 3)" );
575 return NULL;
576 }
577 if ( (int)argv[2].a_w.w_float <= 0 )
578 {
579 - error( "scrolllist : wrong height (%d)", (t_int)(int)argv[2].a_w.w_float );
580 - error( "scrolllist : usage : scrolllist <capacity> <width> <height>" );
581 + pd_error(x, "scrolllist : wrong height (%d)", (t_int)(int)argv[2].a_w.w_float );
582 + pd_error(x, "scrolllist : usage : scrolllist <capacity> <width> <height>" );
583 return NULL;
584 }
585 x->x_height = (int)argv[2].a_w.w_float;
586 @@ -884,15 +884,15 @@
587 if ( argv[3].a_type != A_SYMBOL ||
588 argv[5].a_type != A_SYMBOL )
589 {
590 - error( "scrolllist : wrong arguments (font : 4,6)" );
591 - error( "argument types : %d %d", argv[3].a_type, argv[5].a_type );
592 + pd_error(x, "scrolllist : wrong arguments (font : 4,6)" );
593 + pd_error(x, "argument types : %d %d", argv[3].a_type, argv[5].a_type );
594 return NULL;
595 }
596 if ( argv[4].a_type != A_SYMBOL &&
597 argv[4].a_type != A_FLOAT )
598 {
599 - error( "scrolllist : wrong arguments (font size : 5)" );
600 - error( "argument types : %d", argv[4].a_type );
601 + pd_error(x, "scrolllist : wrong arguments (font size : 5)" );
602 + pd_error(x, "argument types : %d", argv[4].a_type );
603 return NULL;
604 }
605 if ( argv[4].a_type == A_SYMBOL )
606 @@ -914,7 +914,7 @@
607 {
608 if ( argv[6-argoffset].a_type != A_SYMBOL )
609 {
610 - error( "scrolllist : wrong arguments (background color : %d)", 7-argoffset );
611 + pd_error(x, "scrolllist : wrong arguments (background color : %d)", 7-argoffset );
612 return NULL;
613 }
614 strcpy( x->x_bgcolor, argv[6-argoffset].a_w.w_symbol->s_name );
615 @@ -923,7 +923,7 @@
616 {
617 if ( argv[7-argoffset].a_type != A_SYMBOL )
618 {
619 - error( "scrolllist : wrong arguments (foreground color : %d)", 8-argoffset );
620 + pd_error(x, "scrolllist : wrong arguments (foreground color : %d)", 8-argoffset );
621 return NULL;
622 }
623 strcpy( x->x_fgcolor, argv[7-argoffset].a_w.w_symbol->s_name );
624 @@ -932,7 +932,7 @@
625 {
626 if ( argv[8-argoffset].a_type != A_SYMBOL )
627 {
628 - error( "scrolllist : wrong arguments (selection color : %d)", 9-argoffset );
629 + pd_error(x, "scrolllist : wrong arguments (selection color : %d)", 9-argoffset );
630 return NULL;
631 }
632 strcpy( x->x_secolor, argv[8-argoffset].a_w.w_symbol->s_name );
633 --- pd-unauthorized.orig/sonogram~.c
634 +++ pd-unauthorized/sonogram~.c
635 @@ -2200,7 +2200,7 @@
636
637 if ( fsize <= 0 || ( fgraphic != 0 && fgraphic != 1 ) || ( fphaso != 0 && fphaso != 1 ) )
638 {
639 - error( "sonogram~ : missing or negative creation arguments" );
640 + pd_error(x, "sonogram~ : missing or negative creation arguments" );
641 return NULL;
642 }
643
644 --- pd-unauthorized.orig/speexin~.c
645 +++ pd-unauthorized/speexin~.c
646 @@ -197,7 +197,7 @@
647 break;
648
649 default :
650 - error( "speexin~ : severe error : decoding scheme is unknown" );
651 + pd_error(x, "speexin~ : severe error : decoding scheme is unknown" );
652 break;
653 }
654
655 @@ -600,7 +600,7 @@
656 x->x_decchunk = (t_float*)getbytes(x->x_framesize*sizeof(t_float));
657 if (!x->x_decchunk) /* check allocation... */
658 {
659 - error("speexin~ : cannot allocate chunk");
660 + pd_error(x, "speexin~ : cannot allocate chunk");
661 return NULL;
662 }
663
664 --- pd-unauthorized.orig/speexout~.c
665 +++ pd-unauthorized/speexout~.c
666 @@ -178,7 +178,7 @@
667 count = send(x->x_fd, x->x_outbuf, x->x_encsize+1, MSG_NOSIGNAL);
668 if(count < 0)
669 {
670 - error("speexout~: could not send encoded data to the peer (%d)", count);
671 + pd_error(x, "speexout~: could not send encoded data to the peer (%d)", count);
672 #ifdef _WIN32
673 closesocket(x->x_fd);
674 #else
675 @@ -197,7 +197,7 @@
676 }
677 if(count != x->x_encsize+1)
678 {
679 - error("speexout~: %d bytes skipped", x->x_encsize - count);
680 + pd_error(x, "speexout~: %d bytes skipped", x->x_encsize - count);
681 }
682 }
683 x->x_encsize = -1;
684 @@ -276,7 +276,7 @@
685 break;
686
687 default :
688 - error( "speexout~ : severe error : encoding scheme is unknown" );
689 + pd_error(x, "speexout~ : severe error : encoding scheme is unknown" );
690 break;
691 }
692
693 @@ -305,14 +305,14 @@
694
695 if (x->x_fd >= 0)
696 {
697 - error("speexout~: already connected");
698 + pd_error(x, "speexout~: already connected");
699 return;
700 }
701
702 sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
703 if (sockfd < 0)
704 {
705 - error("speexout~: internal error while attempting to open socket");
706 + pd_error(x, "speexout~: internal error while attempting to open socket");
707 return;
708 }
709
710 @@ -338,7 +338,7 @@
711 post("speexout~: connecting to port %d", portno);
712 if (connect(sockfd, (struct sockaddr *) &csocket, sizeof (csocket)) < 0)
713 {
714 - error("speexout~: connection failed!\n");
715 + pd_error(x, "speexout~: connection failed!\n");
716 #ifdef _WIN32
717 closesocket(sockfd);
718 #else
719 @@ -422,7 +422,7 @@
720 x->x_outbuf = getbytes(OUT_BUFFER_SIZE); /* our mp3 stream */
721 if ((!x->x_inbuf)||(!x->x_outbuf)) /* check buffers... */
722 {
723 - error("speexout~ : cannot allocate buffers");
724 + pd_error(x, "speexout~ : cannot allocate buffers");
725 return NULL;
726 }
727 x->x_bytesbuffered = 0;
728 @@ -436,7 +436,7 @@
729 x->x_encchunk = (t_float*)getbytes(x->x_framesize*sizeof(t_float));
730 if (!x->x_encchunk) /* check allocation... */
731 {
732 - error("speexout~ : cannot allocate chunk");
733 + pd_error(x, "speexout~ : cannot allocate chunk");
734 return NULL;
735 }
736 return(x);