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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
|
diff -ur TiMidity++-2.13.2/interface/alsaseq_c.c TiMidity++-2.13.2-new/interface/alsaseq_c.c
--- TiMidity++-2.13.2/interface/alsaseq_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/alsaseq_c.c 2005-01-02 03:39:15.968158520 +0100
@@ -177,7 +177,7 @@
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
static void ctl_event(CtlEvent *e);
-static void ctl_pass_playing_list(int n, char *args[]);
+static int ctl_pass_playing_list(int n, char *args[]);
/**********************************/
/* export the interface functions */
@@ -308,7 +308,7 @@
return 0;
}
-static void ctl_pass_playing_list(int n, char *args[])
+static int ctl_pass_playing_list(int n, char *args[])
{
double btime;
int i, j;
@@ -323,7 +323,7 @@
if (alsa_seq_open(&alsactx.handle) < 0) {
fprintf(stderr, "error in snd_seq_open\n");
- return;
+ return 1;
}
alsactx.queue = -1;
alsactx.client = snd_seq_client_id(alsactx.handle);
@@ -342,7 +342,7 @@
int port;
port = alsa_create_port(alsactx.handle, i);
if (port < 0)
- return;
+ return 1;
alsactx.port[i] = port;
alsa_set_timestamping(&alsactx, port);
printf(" %d:%d", alsactx.client, alsactx.port[i]);
@@ -411,6 +411,7 @@
server_reset();
doit(&alsactx);
}
+ return 0;
}
/*
diff -ur TiMidity++-2.13.2/interface/emacs_c.c TiMidity++-2.13.2-new/interface/emacs_c.c
--- TiMidity++-2.13.2/interface/emacs_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/emacs_c.c 2005-01-02 03:02:02.000000000 +0100
@@ -78,7 +78,7 @@
static void ctl_close(void);
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
static void ctl_event(CtlEvent *e);
static int read_ready(void);
static int emacs_type = 0; /* 0:emacs, 1:mule, 2:??
@@ -249,7 +249,7 @@
return s;
}
-static void ctl_pass_playing_list(int argc, char *argv[])
+static int ctl_pass_playing_list(int argc, char *argv[])
{
int i;
char cmd[BUFSIZ];
@@ -274,7 +274,7 @@
{
for(i = 1; i < argc; i++)
play_midi_file(argv[i]);
- return;
+ return 0;
}
/* Main Loop */
@@ -296,11 +296,11 @@
ctl_refresh();
break;
case RC_QUIT:
- return;
+ return 0;
} /* skipping others command */
}
else if(!strncmp(cmd, "QUIT", 4))
- return;
+ return 0;
else
continue; /* skipping unknown command */
}
diff -ur TiMidity++-2.13.2/interface/gtk_c.c TiMidity++-2.13.2-new/interface/gtk_c.c
--- TiMidity++-2.13.2/interface/gtk_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/gtk_c.c 2005-01-02 03:35:53.447946272 +0100
@@ -57,7 +57,7 @@
static int ctl_open(int using_stdin, int using_stdout);
static void ctl_close(void);
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
static void ctl_event(CtlEvent *e);
@@ -528,7 +528,7 @@
#endif
}
-static void
+static int
ctl_pass_playing_list(int number_of_files, char *list_of_files[])
{
int i=0;
@@ -558,7 +558,7 @@
}
else {
if (command==RC_QUIT)
- return;
+ return 0;
if (command==RC_ERROR)
command=RC_TUNE_END; /* Launch next file */
@@ -580,6 +580,7 @@
command = ctl_blocking_read(&val);
}
}
+ return 0;
}
/*
diff -ur TiMidity++-2.13.2/interface/mac_c.c TiMidity++-2.13.2-new/interface/mac_c.c
--- TiMidity++-2.13.2/interface/mac_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/mac_c.c 2005-01-02 03:04:13.000000000 +0100
@@ -71,7 +71,7 @@
static void ctl_pitch_bend(int channel, int val);
static void ctl_reset(void);
static int ctl_open(int using_stdin, int using_stdout);
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
static void ctl_close(void);
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
@@ -955,7 +955,7 @@
}
-static void ctl_pass_playing_list(int init_number_of_files,
+static int ctl_pass_playing_list(int init_number_of_files,
char * /*init_list_of_files*/ [])
{
EventRecord event;
@@ -983,6 +983,7 @@
mac_HandleEvent(&event);
}
Do_Quit();
+ return 0;
}
static Boolean UserWantsControl()
diff -ur TiMidity++-2.13.2/interface/motif_c.c TiMidity++-2.13.2-new/interface/motif_c.c
--- TiMidity++-2.13.2/interface/motif_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/motif_c.c 2005-01-02 03:05:04.000000000 +0100
@@ -60,7 +60,7 @@
static void ctl_close(void);
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
static void ctl_event(CtlEvent *e);
static int motif_ready = 0;
@@ -346,12 +346,13 @@
return(ctl_blocking_read(valp));
}
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[])
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[])
{
int i=0;
char file_to_play[1000];
int command;
int32 val;
+ int retval;
motif_ready = 1;
@@ -381,12 +382,13 @@
else
{
if (command==RC_QUIT)
- return;
+ return 0;
switch(command)
{
case RC_ERROR:
m_pipe_int_write(ERROR_MESSAGE);
+ retval=1;
break;
case RC_NONE:
break;
@@ -411,6 +413,7 @@
command = ctl_blocking_read(&val);
}
}
+ return retval;
}
/*
diff -ur TiMidity++-2.13.2/interface/ncurs_c.c TiMidity++-2.13.2-new/interface/ncurs_c.c
--- TiMidity++-2.13.2/interface/ncurs_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/ncurs_c.c 2005-01-02 03:05:48.000000000 +0100
@@ -174,7 +174,7 @@
static int ctl_open(int using_stdin, int using_stdout);
static void ctl_close(void);
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
static void ctl_event(CtlEvent *e);
@@ -3100,7 +3100,7 @@
reuse_mblock(&tmpbuffer);
}
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[])
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[])
{
int i;
int act_number_of_files;
@@ -3128,7 +3128,7 @@
if (file_list.number<0) {
cmsg(CMSG_FATAL, VERB_NORMAL, "No MIDI file to play!");
- return;
+ return 1;
}
ctl_listmode_max=1;
@@ -3169,7 +3169,7 @@
if(!(ctl.flags & CTLF_LIST_LOOP) || stdin_check)
{
aq_flush(0);
- return;
+ return 0;
}
i = 0;
if(rc == RC_TUNE_END)
@@ -3187,7 +3187,7 @@
/* else fall through */
case RC_QUIT:
- return;
+ return 0;
}
ctl_reset();
}
diff -ur TiMidity++-2.13.2/interface/portmidisyn_c.c TiMidity++-2.13.2-new/interface/portmidisyn_c.c
--- TiMidity++-2.13.2/interface/portmidisyn_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/portmidisyn_c.c 2005-01-02 03:13:05.000000000 +0100
@@ -96,7 +96,7 @@
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
static void ctl_event(CtlEvent *e);
-static void ctl_pass_playing_list(int n, char *args[]);
+static int ctl_pass_playing_list(int n, char *args[]);
#ifndef __W32__
static void init_keybord(void);
@@ -215,17 +215,17 @@
#ifdef IA_W32G_SYN
extern void w32g_syn_doit(void);
-extern void w32g_syn_ctl_pass_playing_list(int n_, char *args_[]);
+extern int w32g_syn_ctl_pass_playing_list(int n_, char *args_[]);
-static void ctl_pass_playing_list(int n, char *args[])
+static int ctl_pass_playing_list(int n, char *args[])
{
- w32g_syn_ctl_pass_playing_list ( n, args );
+ return w32g_syn_ctl_pass_playing_list ( n, args );
}
#endif
#ifndef IA_W32G_SYN
-static void ctl_pass_playing_list(int n, char *args[])
+static int ctl_pass_playing_list(int n, char *args[])
#else
// 0: OK, 2: Require to reset.
int ctl_pass_playing_list2(int n, char *args[])
@@ -241,7 +241,7 @@
#ifndef IA_W32G_SYN
if(n > MAX_PORT ){
printf( "Usage: timidity -iW [Midi interface No s]\n");
- return;
+ return 1;
}
#endif
@@ -347,11 +347,7 @@
#endif /* USE_GTK_GUI */
rtsyn_close();
-#ifdef IA_W32G_SYN
return 0;
-#else
- return;
-#endif
}
diff -ur TiMidity++-2.13.2/interface/server_c.c TiMidity++-2.13.2-new/interface/server_c.c
--- TiMidity++-2.13.2/interface/server_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/server_c.c 2005-01-02 03:07:38.000000000 +0100
@@ -176,7 +176,7 @@
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
static void ctl_event(CtlEvent *e);
-static void ctl_pass_playing_list(int n, char *args[]);
+static int ctl_pass_playing_list(int n, char *args[]);
/**********************************/
/* export the interface functions */
@@ -356,14 +356,14 @@
static void compute_sample_increment(void);
static void server_reset(void);
-static void ctl_pass_playing_list(int n, char *args[])
+static int ctl_pass_playing_list(int n, char *args[])
{
int sock;
if(n != 2 && n != 1)
{
fprintf(stderr, "Usage: timidity -ir control-port [data-port]\n");
- return;
+ return 1;
}
#ifdef SIGPIPE
@@ -379,7 +379,7 @@
if (control_port) {
sock = pasv_open(&control_port);
if(sock == -1)
- return;
+ return 1;
}
opt_realtime_playing = 1; /* Enable loading patch while playing */
allocate_cache_size = 0; /* Don't use pre-calclated samples */
@@ -404,7 +404,7 @@
continue;
perror("accept");
close(sock);
- return;
+ return 1;
}
}
else control_fd = 0;
@@ -446,6 +446,7 @@
if (!control_port)
break;
}
+ return 0;
}
#define MAX_GETCMD_PARAMS 8
diff -ur TiMidity++-2.13.2/interface/tk_c.c TiMidity++-2.13.2-new/interface/tk_c.c
--- TiMidity++-2.13.2/interface/tk_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/tk_c.c 2005-01-02 03:08:48.000000000 +0100
@@ -86,7 +86,7 @@
static void ctl_close(void);
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
static int ctl_blocking_read(int32 *valp);
static void ctl_note(int status, int ch, int note, int vel);
static void ctl_event(CtlEvent *e);
@@ -587,7 +587,7 @@
return(ctl_blocking_read(valp));
}
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[])
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[])
{
int i=0;
char local[1000];
@@ -618,7 +618,7 @@
/* if really QUIT */
k_pipe_gets(local, sizeof(local)-1);
if (*local == 'Z')
- return;
+ return 0;
/* only stop playing..*/
}
if (command==RC_CHANGE_VOLUME) /* init volume */
@@ -646,6 +646,7 @@
command = ctl_blocking_read(&val);
}
}
+ return 0;
}
diff -ur TiMidity++-2.13.2/interface/w32g_c.c TiMidity++-2.13.2-new/interface/w32g_c.c
--- TiMidity++-2.13.2/interface/w32g_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/w32g_c.c 2005-01-02 03:10:03.000000000 +0100
@@ -86,7 +86,7 @@
static int ctl_open(int using_stdin, int using_stdout);
static void ctl_close(void);
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
static void ctl_event(CtlEvent *e);
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
@@ -662,7 +662,7 @@
}
extern BOOL SetWrdWndActive(void);
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[])
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[])
{
static int init_flag = 1;
int rc;
@@ -779,7 +779,7 @@
if(ctl.flags & CTLF_AUTOEXIT) {
if(play_mode->fd != -1)
aq_flush(0);
- return;
+ return 0;
}
break;
}
@@ -803,7 +803,7 @@
if(ctl.flags & CTLF_AUTOEXIT){
if(play_mode->fd != -1)
aq_flush(0);
- return;
+ return 0;
}
if((ctl.flags & CTLF_LIST_LOOP) && w32g_nvalid_playlist())
{
@@ -839,7 +839,7 @@
case RC_QUIT:
if(play_mode->fd != -1)
aq_flush(1);
- return;
+ return 0;
case RC_CHANGE_VOLUME:
amplification += value;
@@ -868,6 +868,7 @@
PrefSettingApplyReally();
rc = RC_NONE;
}
+ return 0;
}
static void ctl_lcd_mark(int flag, int x, int y)
diff -ur TiMidity++-2.13.2/interface/w32g_syn.c TiMidity++-2.13.2-new/interface/w32g_syn.c
--- TiMidity++-2.13.2/interface/w32g_syn.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/w32g_syn.c 2005-01-02 03:10:49.000000000 +0100
@@ -281,7 +281,7 @@
static int wait_for_termination_of_syn_thread ( void );
int w32g_message_set ( int cmd );
int w32g_message_get ( w32g_syn_message_t *msg );
-void w32g_syn_ctl_pass_playing_list ( int n_, char *args_[] );
+int w32g_syn_ctl_pass_playing_list ( int n_, char *args_[] );
int w32g_syn_do_before_pref_apply ( void );
int w32g_syn_do_after_pref_apply ( void );
@@ -1403,7 +1403,7 @@
}
}
-void w32g_syn_ctl_pass_playing_list ( int n_, char *args_[] )
+int w32g_syn_ctl_pass_playing_list ( int n_, char *args_[] )
{
int i;
#ifndef TWSYNSRV
@@ -1471,6 +1471,7 @@
}
#endif
if ( w32g_syn.quit_state < 2 ) w32g_syn.quit_state = 2;
+ return 0;
}
int w32g_syn_do_before_pref_apply ( void )
diff -ur TiMidity++-2.13.2/interface/winsyn_c.c TiMidity++-2.13.2-new/interface/winsyn_c.c
--- TiMidity++-2.13.2/interface/winsyn_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/winsyn_c.c 2005-01-02 03:11:36.000000000 +0100
@@ -88,7 +88,7 @@
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
static void ctl_event(CtlEvent *e);
-static void ctl_pass_playing_list(int n, char *args[]);
+static int ctl_pass_playing_list(int n, char *args[]);
#ifndef __W32__
static void init_keybord(void);
@@ -207,17 +207,17 @@
#ifdef IA_W32G_SYN
extern void w32g_syn_doit(void);
-extern void w32g_syn_ctl_pass_playing_list(int n_, char *args_[]);
+extern int w32g_syn_ctl_pass_playing_list(int n_, char *args_[]);
-static void ctl_pass_playing_list(int n, char *args[])
+static int ctl_pass_playing_list(int n, char *args[])
{
- w32g_syn_ctl_pass_playing_list ( n, args );
+ return w32g_syn_ctl_pass_playing_list ( n, args );
}
#endif
#ifndef IA_W32G_SYN
-static void ctl_pass_playing_list(int n, char *args[])
+static int ctl_pass_playing_list(int n, char *args[])
#else
// 0: OK, 2: Require to reset.
int ctl_pass_playing_list2(int n, char *args[])
@@ -233,7 +233,7 @@
#ifndef IA_W32G_SYN
if(n > MAX_PORT ){
printf( "Usage: timidity -iW [Midi interface No s]\n");
- return;
+ return 1;
}
#endif
@@ -339,11 +339,7 @@
#endif /* USE_GTK_GUI */
rtsyn_close();
-#ifdef IA_W32G_SYN
return 0;
-#else
- return;
-#endif
}
diff -ur TiMidity++-2.13.2/interface/xaw_c.c TiMidity++-2.13.2-new/interface/xaw_c.c
--- TiMidity++-2.13.2/interface/xaw_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/xaw_c.c 2005-01-02 03:11:57.000000000 +0100
@@ -55,7 +55,7 @@
static void ctl_close(void);
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
static void ctl_event(CtlEvent *e);
static void a_pipe_open(void);
@@ -463,7 +463,7 @@
}
}
-static void ctl_pass_playing_list(int init_number_of_files,
+static int ctl_pass_playing_list(int init_number_of_files,
char *init_list_of_files[]) {
int current_no,command=RC_NONE,i,j;
int32 val;
diff -ur TiMidity++-2.13.2/interface/xskin_c.c TiMidity++-2.13.2-new/interface/xskin_c.c
--- TiMidity++-2.13.2/interface/xskin_c.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/interface/xskin_c.c 2005-01-02 03:12:31.000000000 +0100
@@ -55,7 +55,7 @@
static void ctl_close(void);
static int ctl_read(int32 *valp);
static int cmsg(int type, int verbosity_level, char *fmt, ...);
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]);
static void ctl_event(CtlEvent *e);
static void ctl_speana_data(double *val, int size);
static void initialize_exp_hz_table( void );
@@ -342,7 +342,7 @@
}
}
-static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) {
+static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]) {
int current_no,command,i;
int32 val;
@@ -403,7 +403,7 @@
command=play_midi_file(list_of_files[file_table[current_no]]);
} else {
/* Quit timidity*/
- if (exitflag) return;
+ if (exitflag) return 0;
/* Stop playing */
if (command==RC_QUIT) {
sprintf(local_buf,"T 00:00");
@@ -461,6 +461,7 @@
command=ctl_blocking_read(&val);
}
}
+ return 0;
}
/* ------ Pipe handlers ----- */
diff -ur TiMidity++-2.13.2/timidity/controls.h TiMidity++-2.13.2-new/timidity/controls.h
--- TiMidity++-2.13.2/timidity/controls.h 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/timidity/controls.h 2005-01-02 02:59:37.000000000 +0100
@@ -147,7 +147,7 @@
int (*open)(int using_stdin, int using_stdout);
void (*close)(void);
- void (*pass_playing_list)(int number_of_files, char *list_of_files[]);
+ int (*pass_playing_list)(int number_of_files, char *list_of_files[]);
int (*read)(int32 *valp);
int (*cmsg)(int type, int verbosity_level, char *fmt, ...);
void (*event)(CtlEvent *ev); /* Control events */
diff -ur TiMidity++-2.13.2/timidity/playmidi.c TiMidity++-2.13.2-new/timidity/playmidi.c
--- TiMidity++-2.13.2/timidity/playmidi.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/timidity/playmidi.c 2005-01-02 03:15:55.000000000 +0100
@@ -8562,7 +8562,7 @@
return rc;
}
-void dumb_pass_playing_list(int number_of_files, char *list_of_files[])
+int dumb_pass_playing_list(int number_of_files, char *list_of_files[])
{
#ifndef CFG_FOR_SF
int i = 0;
@@ -8586,12 +8586,12 @@
aq_flush(0);
if(!(ctl->flags & CTLF_LIST_LOOP))
- return;
+ return 0;
i = 0;
break;
case RC_QUIT:
- return;
+ return 0;
}
}
#endif
diff -ur TiMidity++-2.13.2/timidity/playmidi.h TiMidity++-2.13.2-new/timidity/playmidi.h
--- TiMidity++-2.13.2/timidity/playmidi.h 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/timidity/playmidi.h 2005-01-02 03:16:07.000000000 +0100
@@ -577,7 +577,7 @@
extern int opt_pan_delay;
extern int play_midi_file(char *fn);
-extern void dumb_pass_playing_list(int number_of_files, char *list_of_files[]);
+extern int dumb_pass_playing_list(int number_of_files, char *list_of_files[]);
extern void default_ctl_lyric(int lyricid);
extern int check_apply_control(void);
extern void recompute_freq(int v);
diff -ur TiMidity++-2.13.2/timidity/sndfont.c TiMidity++-2.13.2-new/timidity/sndfont.c
--- TiMidity++-2.13.2/timidity/sndfont.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/timidity/sndfont.c 2005-01-02 03:15:27.000000000 +0100
@@ -1893,7 +1893,7 @@
#if CFG_FOR_SF_SUPPORT_FFT
int check_apply_control(void) { return 0; } // not pass
-void dumb_pass_playing_list(int number_of_files, char *list_of_files[]) {}
+int dumb_pass_playing_list(int number_of_files, char *list_of_files[]) {return 0;}
void recompute_freq(int v) {} // not pass
int32 control_ratio = 0;
int reduce_quality_flag = 0;
diff -ur TiMidity++-2.13.2/timidity/timidity.c TiMidity++-2.13.2-new/timidity/timidity.c
--- TiMidity++-2.13.2/timidity/timidity.c 2005-01-02 02:53:01.000000000 +0100
+++ TiMidity++-2.13.2-new/timidity/timidity.c 2005-01-02 02:59:29.000000000 +0100
@@ -5291,6 +5291,7 @@
int need_stdin = 0, need_stdout = 0;
int i;
int output_fail = 0;
+ int retval;
if(nfiles == 0 && !strchr(INTERACTIVE_INTERFACE_IDS, ctl->id_character))
return 0;
@@ -5410,7 +5411,7 @@
ctl->cmsg(CMSG_INFO, VERB_DEBUG_SILLY,
"pass_playing_list() nfiles=%d", nfiles);
- ctl->pass_playing_list(nfiles, files);
+ retval=ctl->pass_playing_list(nfiles, files);
if(intr)
aq_flush(1);
@@ -5451,7 +5452,7 @@
url_news_connection_cache(URL_NEWS_CLOSE_CACHE);
#endif /* SUPPORT_SOCKET */
- return 0;
+ return retval;
}
#ifdef IA_W32GUI
|