From 61489c9cb2176e9c6e659313b756d5646d6d4e93 Mon Sep 17 00:00:00 2001 From: Shohei Urabe Date: Wed, 13 Dec 2006 02:38:33 +0000 Subject: [PATCH] merge timidity++-2.13.2-exiterror.patch --- ChangeLog | 8 ++++++++ interface/alsaseq_c.c | 9 +++++---- interface/emacs_c.c | 10 +++++----- interface/gtk_c.c | 7 ++++--- interface/mac_c.c | 5 +++-- interface/motif_c.c | 9 ++++++--- interface/ncurs_c.c | 10 +++++----- interface/portmidisyn_c.c | 16 ++++++---------- interface/server_c.c | 11 ++++++----- interface/tk_c.c | 7 ++++--- interface/w32g_c.c | 11 ++++++----- interface/w32g_syn.c | 5 +++-- interface/winsyn_c.c | 16 ++++++---------- interface/xaw_c.c | 4 ++-- interface/xskin_c.c | 7 ++++--- timidity/controls.h | 2 +- timidity/playmidi.c | 6 +++--- timidity/playmidi.h | 2 +- timidity/sndfont.c | 2 +- timidity/timidity.c | 5 +++-- 20 files changed, 82 insertions(+), 70 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5a793a48..57e2b19d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,14 @@ * timidity/flac_a.c: merge patch from FLAC team. * interface/xaw_i.c: merge patch fixing gcc4 compilation problem. + * interface/alsaseq_c.c, interface/emacs_c.c, interface/gtk_c.c, + interface/mac_c.c, interface/motif_c.c, interface/ncurs_c.c, + interface/portmidisyn_c.c, interface/server_c.c, + interface/tk_c.c, interface/w32g_c.c, interface/w32g_syn.c, + interface/winsyn_c.c, interface/xaw_c.c, interface/xskin_c.c, + timidity/controls.h, timidity/playmidi.c, timidity/playmidi.h, + timidity/sndfont.c, timidity/timidity.c: + propagate return code 2006-07-27 Keishi Suenaga diff --git a/interface/alsaseq_c.c b/interface/alsaseq_c.c index 21c804a4..61ba631a 100644 --- a/interface/alsaseq_c.c +++ b/interface/alsaseq_c.c @@ -177,7 +177,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_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 */ @@ -310,7 +310,7 @@ static int set_realtime_priority(void) 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; @@ -325,7 +325,7 @@ static void ctl_pass_playing_list(int n, char *args[]) 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); @@ -344,7 +344,7 @@ static void ctl_pass_playing_list(int n, char *args[]) 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]); @@ -413,6 +413,7 @@ static void ctl_pass_playing_list(int n, char *args[]) server_reset(); doit(&alsactx); } + return 0; } /* diff --git a/interface/emacs_c.c b/interface/emacs_c.c index f9ad9e1c..0d726c5d 100644 --- a/interface/emacs_c.c +++ b/interface/emacs_c.c @@ -78,7 +78,7 @@ static int ctl_open(int using_stdin, int using_stdout); 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:?? @@ -251,7 +251,7 @@ static char *chomp(char *s) 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]; @@ -276,7 +276,7 @@ static void ctl_pass_playing_list(int argc, char *argv[]) { for(i = 1; i < argc; i++) play_midi_file(argv[i]); - return; + return 0; } /* Main Loop */ @@ -298,11 +298,11 @@ static void ctl_pass_playing_list(int argc, char *argv[]) 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 --git a/interface/gtk_c.c b/interface/gtk_c.c index 283e11d7..25a33cc5 100644 --- a/interface/gtk_c.c +++ b/interface/gtk_c.c @@ -56,7 +56,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); @@ -529,7 +529,7 @@ ctl_read(int32 *valp) #endif } -static void +static int ctl_pass_playing_list(int number_of_files, char *list_of_files[]) { int i=0; @@ -559,7 +559,7 @@ ctl_pass_playing_list(int number_of_files, char *list_of_files[]) } else { if (command==RC_QUIT) - return; + return 0; if (command==RC_ERROR) command=RC_TUNE_END; /* Launch next file */ @@ -581,6 +581,7 @@ ctl_pass_playing_list(int number_of_files, char *list_of_files[]) command = ctl_blocking_read(&val); } } + return 0; } /* diff --git a/interface/mac_c.c b/interface/mac_c.c index 9b7b76f4..f2c346d8 100644 --- a/interface/mac_c.c +++ b/interface/mac_c.c @@ -71,7 +71,7 @@ static void ctl_sustain(int channel, int val); 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, ...); @@ -957,7 +957,7 @@ static void ctl_close(void) } -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; @@ -985,6 +985,7 @@ static void ctl_pass_playing_list(int init_number_of_files, mac_HandleEvent(&event); } Do_Quit(); + return 0; } static Boolean UserWantsControl() diff --git a/interface/motif_c.c b/interface/motif_c.c index a9bdec72..2235a40f 100644 --- a/interface/motif_c.c +++ b/interface/motif_c.c @@ -59,7 +59,7 @@ static int ctl_open(int using_stdin, int using_stdout); 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; @@ -347,12 +347,13 @@ static int ctl_read(int32 *valp) 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; @@ -382,12 +383,13 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) 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; @@ -412,6 +414,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) command = ctl_blocking_read(&val); } } + return retval; } /* diff --git a/interface/ncurs_c.c b/interface/ncurs_c.c index 6e3a89bf..8481fad0 100644 --- a/interface/ncurs_c.c +++ b/interface/ncurs_c.c @@ -177,7 +177,7 @@ static void display_aq_ratio(void); 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 ctl_write(char *valp, int32 size); static int cmsg(int type, int verbosity_level, char *fmt, ...); @@ -3120,7 +3120,7 @@ static void shuffle_list(void) 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; @@ -3148,7 +3148,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) if (file_list.number<0) { cmsg(CMSG_FATAL, VERB_NORMAL, "No MIDI file to play!"); - return; + return 1; } ctl_listmode_max=1; @@ -3189,7 +3189,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) if(!(ctl.flags & CTLF_LIST_LOOP) || stdin_check) { aq_flush(0); - return; + return 0; } i = 0; if(rc == RC_TUNE_END) @@ -3207,7 +3207,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) /* else fall through */ case RC_QUIT: - return; + return 0; } ctl_reset(); } diff --git a/interface/portmidisyn_c.c b/interface/portmidisyn_c.c index 2a518ed5..fe5a5a40 100755 --- a/interface/portmidisyn_c.c +++ b/interface/portmidisyn_c.c @@ -91,7 +91,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_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); @@ -212,17 +212,17 @@ static void doit(void); #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[]) @@ -238,7 +238,7 @@ rtsyn_get_port_list(); #ifndef IA_W32G_SYN if(n > MAX_PORT ){ printf( "Usage: timidity -iW [Midi interface No s]\n"); - return; + return 1; } #endif @@ -344,11 +344,7 @@ rtsyn_get_port_list(); #endif /* USE_GTK_GUI */ rtsyn_close(); -#ifdef IA_W32G_SYN return 0; -#else - return; -#endif } diff --git a/interface/server_c.c b/interface/server_c.c index 2eaa6241..7059cbf7 100644 --- a/interface/server_c.c +++ b/interface/server_c.c @@ -181,7 +181,7 @@ static int ctl_read(int32 *valp); static int ctl_write(char *buffer, int32 size); 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 */ @@ -375,14 +375,14 @@ static int send_status(int status, char *message, ...); 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; } control_port = atoi(args[0]); @@ -397,7 +397,7 @@ static void ctl_pass_playing_list(int n, char *args[]) #endif /* SIGPIPE */ 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 */ @@ -422,7 +422,7 @@ static void ctl_pass_playing_list(int n, char *args[]) continue; perror("accept"); close(sock); - return; + return 1; } } else control_fd = 0; @@ -464,6 +464,7 @@ static void ctl_pass_playing_list(int n, char *args[]) if (!control_port) break; } + return 0; } #define MAX_GETCMD_PARAMS 8 diff --git a/interface/tk_c.c b/interface/tk_c.c index 37fd89ed..7acab670 100644 --- a/interface/tk_c.c +++ b/interface/tk_c.c @@ -82,7 +82,7 @@ static int ctl_open(int using_stdin, int using_stdout); 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); @@ -585,7 +585,7 @@ static int ctl_read(int32 *valp) 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]; @@ -616,7 +616,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) /* 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 */ @@ -644,6 +644,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) command = ctl_blocking_read(&val); } } + return 0; } diff --git a/interface/w32g_c.c b/interface/w32g_c.c index 25802876..32921f95 100644 --- a/interface/w32g_c.c +++ b/interface/w32g_c.c @@ -86,7 +86,7 @@ extern int w32g_msg_box(char *message, char *title, int type); 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, ...); @@ -664,7 +664,7 @@ static void ctl_tempo(int t, int tr) } 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; @@ -781,7 +781,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) if(ctl.flags & CTLF_AUTOEXIT) { if(play_mode->fd != -1) aq_flush(0); - return; + return 0; } break; } @@ -805,7 +805,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) 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()) { @@ -841,7 +841,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) case RC_QUIT: if(play_mode->fd != -1) aq_flush(1); - return; + return 0; case RC_CHANGE_VOLUME: amplification += value; @@ -870,6 +870,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) PrefSettingApplyReally(); rc = RC_NONE; } + return 0; } static void ctl_lcd_mark(int flag, int x, int y) diff --git a/interface/w32g_syn.c b/interface/w32g_syn.c index da7d68d1..e5474443 100755 --- a/interface/w32g_syn.c +++ b/interface/w32g_syn.c @@ -284,7 +284,7 @@ static void terminate_syn_thread ( void ); 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 ); @@ -1406,7 +1406,7 @@ void w32g_syn_doit(void) } } -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 @@ -1474,6 +1474,7 @@ void w32g_syn_ctl_pass_playing_list ( int n_, char *args_[] ) } #endif if ( w32g_syn.quit_state < 2 ) w32g_syn.quit_state = 2; + return 0; } int w32g_syn_do_before_pref_apply ( void ) diff --git a/interface/winsyn_c.c b/interface/winsyn_c.c index 974a332a..5c2064e9 100755 --- a/interface/winsyn_c.c +++ b/interface/winsyn_c.c @@ -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_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); @@ -208,17 +208,17 @@ static void doit(void); #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[]) @@ -234,7 +234,7 @@ rtsyn_get_port_list(); #ifndef IA_W32G_SYN if(n > MAX_PORT ){ printf( "Usage: timidity -iW [Midi interface No s]\n"); - return; + return 1; } #endif @@ -340,11 +340,7 @@ rtsyn_get_port_list(); #endif /* USE_GTK_GUI */ rtsyn_close(); -#ifdef IA_W32G_SYN return 0; -#else - return; -#endif } diff --git a/interface/xaw_c.c b/interface/xaw_c.c index 49fb5032..cdeb53ef 100644 --- a/interface/xaw_c.c +++ b/interface/xaw_c.c @@ -55,7 +55,7 @@ static int ctl_open(int using_stdin, int using_stdout); 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); @@ -465,7 +465,7 @@ static void shuffle(int n,int *a) { } } -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 --git a/interface/xskin_c.c b/interface/xskin_c.c index c3c6c785..b97cdf1f 100644 --- a/interface/xskin_c.c +++ b/interface/xskin_c.c @@ -55,7 +55,7 @@ static int ctl_open(int using_stdin, int using_stdout); 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 ); @@ -344,7 +344,7 @@ static void shuffle(int n,int *a) { } } -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; @@ -405,7 +405,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) { 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"); @@ -463,6 +463,7 @@ static void ctl_pass_playing_list(int number_of_files, char *list_of_files[]) { command=ctl_blocking_read(&val); } } + return 0; } /* ------ Pipe handlers ----- */ diff --git a/timidity/controls.h b/timidity/controls.h index 94354c74..e2ce6055 100644 --- a/timidity/controls.h +++ b/timidity/controls.h @@ -148,7 +148,7 @@ typedef struct { 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 (*write)(char *buf, int32 size); int (*cmsg)(int type, int verbosity_level, char *fmt, ...); diff --git a/timidity/playmidi.c b/timidity/playmidi.c index 4599cf7d..4b9a6ed8 100644 --- a/timidity/playmidi.c +++ b/timidity/playmidi.c @@ -8579,7 +8579,7 @@ int play_midi_file(char *fn) 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; @@ -8603,12 +8603,12 @@ void dumb_pass_playing_list(int number_of_files, char *list_of_files[]) aq_flush(0); if(!(ctl->flags & CTLF_LIST_LOOP)) - return; + return 0; i = 0; break; case RC_QUIT: - return; + return 0; } } #endif diff --git a/timidity/playmidi.h b/timidity/playmidi.h index 84b993c9..dd40c31f 100644 --- a/timidity/playmidi.h +++ b/timidity/playmidi.h @@ -577,7 +577,7 @@ extern int opt_user_volume_curve; 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 --git a/timidity/sndfont.c b/timidity/sndfont.c index 3a8a73fa..9df63fb9 100644 --- a/timidity/sndfont.c +++ b/timidity/sndfont.c @@ -1912,7 +1912,7 @@ static void cfgforsf_usage(const char *program_name, int status) #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 --git a/timidity/timidity.c b/timidity/timidity.c index 1876f833..eb2b902d 100644 --- a/timidity/timidity.c +++ b/timidity/timidity.c @@ -5345,6 +5345,7 @@ MAIN_INTERFACE int timidity_play_main(int nfiles, char **files) 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; @@ -5464,7 +5465,7 @@ MAIN_INTERFACE int timidity_play_main(int nfiles, char **files) 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); @@ -5505,7 +5506,7 @@ MAIN_INTERFACE int timidity_play_main(int nfiles, char **files) url_news_connection_cache(URL_NEWS_CLOSE_CACHE); #endif /* SUPPORT_SOCKET */ - return 0; + return retval; } #ifdef IA_W32GUI -- 2.11.0