? Makefile
? TiMidity-uj.ad
? TiMidity.ad
? common.makefile
? config.h
? config.log
? config.status
? interface.h
? stamp-h1
? stamp-h2
? autoconf/Makefile
? configs/Makefile
? doc/Makefile
? doc/C/Makefile
? doc/ja_JP.eucJP/Makefile
? interface/.deps
? interface/Makefile
? interface/bitmaps/Makefile
? interface/motif_bitmaps/Makefile
? interface/pixmaps/Makefile
? libarc/.deps
? libarc/Makefile
? libunimod/.deps
? libunimod/Makefile
? script/Makefile
? timidity/.deps
? timidity/Makefile
? timidity/timidity.cfg
? timidity/url_fake.c
? utils/.deps
? utils/Makefile
? windrv/.deps
? windrv/Makefile
Index: timidity/mod.c
===================================================================
RCS file: /cvsroot/timidity/timidity/timidity/mod.c,v
retrieving revision 1.3
diff -d -u -r1.3 mod.c
--- timidity/mod.c	5 Jun 2003 11:27:54 -0000	1.3
+++ timidity/mod.c	3 Apr 2006 23:10:19 -0000
@@ -28,6 +28,8 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#ifndef NO_MODULES
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
@@ -3040,3 +3042,5 @@
   free (mp.control);
   return 0;
 }
+
+#endif	/* NO_MODULES */
Index: timidity/mod.h
===================================================================
RCS file: /cvsroot/timidity/timidity/timidity/mod.h,v
retrieving revision 1.3
diff -d -u -r1.3 mod.h
--- timidity/mod.h	5 Jun 2003 11:27:55 -0000	1.3
+++ timidity/mod.h	3 Apr 2006 23:11:57 -0000
@@ -21,10 +21,14 @@
 #ifndef ___MOD_H_
 #define ___MOD_H_
 
+#ifndef NO_MODULES
+
 #define MOD_NUM_VOICES	MAX_CHANNELS
 
 extern int get_module_type (char *fn);
 extern int load_module_file (struct timidity_file *tf, int mod_type);
 extern char *get_module_title (struct timidity_file *tf, int mod_type);
 
+#endif /* NOMODULES */
+
 #endif /* ___MOD_H_ */
Index: timidity/mod2midi.c
===================================================================
RCS file: /cvsroot/timidity/timidity/timidity/mod2midi.c,v
retrieving revision 1.13
diff -d -u -r1.13 mod2midi.c
--- timidity/mod2midi.c	30 Sep 2005 00:17:11 -0000	1.13
+++ timidity/mod2midi.c	3 Apr 2006 23:10:52 -0000
@@ -25,6 +25,9 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
+
+#ifndef NO_MODULES
+
 #ifndef NO_STRING_H
 #include <string.h>
 #else
@@ -746,3 +749,5 @@
 	s->id = i;
     }
 }
+
+#endif	/* NO_MODULES */
Index: timidity/mod2midi.h
===================================================================
RCS file: /cvsroot/timidity/timidity/timidity/mod2midi.h,v
retrieving revision 1.3
diff -d -u -r1.3 mod2midi.h
--- timidity/mod2midi.h	5 Jun 2003 11:27:55 -0000	1.3
+++ timidity/mod2midi.h	3 Apr 2006 23:12:20 -0000
@@ -23,6 +23,8 @@
 
  */
 
+#ifndef NO_MODULES
+
 #include "unimod.h"
 
 void Voice_SetVolume (UBYTE, UWORD);
@@ -37,3 +39,5 @@
 void Voice_EndPlaying ();
 void load_module_samples (SAMPLE *, int, int);
 void Voice_SetPeriod (UBYTE v, ULONG period);
+
+#endif /* NO_MODULES */
Index: timidity/playmidi.c
===================================================================
RCS file: /cvsroot/timidity/timidity/timidity/playmidi.c,v
retrieving revision 1.195
diff -d -u -r1.195 playmidi.c
--- timidity/playmidi.c	4 Feb 2006 01:10:31 -0000	1.195
+++ timidity/playmidi.c	4 Apr 2006 01:14:38 -0000
@@ -72,6 +72,10 @@
 int usleep(unsigned int useconds);
 #endif
 
+#ifdef __W32__
+extern HANDLE KillerEvent;  /* [RH] */
+#endif
+
 #ifdef SUPPORT_SOUNDSPEC
 #include "soundspec.h"
 #endif /* SUPPORT_SOUNDSPEC */
@@ -7514,6 +7518,15 @@
     int32 i, j, cet;
     int k, l, ch, orig_ch, port_ch, offset, layered;
 
+#ifdef __W32__
+    /* [RH] */
+    if(KillerEvent != NULL)
+    {
+	if(WaitForSingleObject(KillerEvent, 0) == WAIT_OBJECT_0)
+	    return RC_QUIT;
+    }
+#endif
+
     if(play_mode->flag & PF_MIDI_EVENT)
 	return play_mode->acntl(PM_REQ_MIDI, ev);
     if(!(play_mode->flag & PF_PCM_STREAM))
Index: timidity/readmidi.c
===================================================================
RCS file: /cvsroot/timidity/timidity/timidity/readmidi.c,v
retrieving revision 1.95
diff -d -u -r1.95 readmidi.c
--- timidity/readmidi.c	4 Feb 2006 12:27:37 -0000	1.95
+++ timidity/readmidi.c	3 Apr 2006 23:15:03 -0000
@@ -4519,6 +4519,7 @@
 
     errno = 0;
 
+#ifndef NO_MODULES
     if((mtype = get_module_type(fn)) > 0)
     {
 	readmidi_read_init();
@@ -4538,6 +4539,7 @@
 	url_rewind(tf->url);
 	url_cache_disable(tf->url);
     }
+#endif
 
 #if MAX_CHANNELS > 16
     for(i = 16; i < MAX_CHANNELS; i++)
@@ -4867,11 +4869,13 @@
 	return p->format;
     p = get_midi_file_info(filename, 1);
 
+#ifndef NO_MODULES
     if(get_module_type(filename) > 0)
     {
 	p->format = 0;
 	return 0;
     }
+#endif
 
     tf = open_file(filename, 1, OF_SILENT);
     if(tf == NULL)
@@ -5010,6 +5014,7 @@
     if(tf == NULL)
 	return NULL;
 
+#ifndef NO_MODULES
     mtype = get_module_type(filename);
     check_cache = check_need_cache(tf->url, filename);
     if(check_cache || mtype > 0)
@@ -5047,6 +5052,7 @@
 	free (title);
 	goto end_of_parse;
     }
+#endif
 
     /* Parse MIDI header */
     if(tf_read(tmp, 1, 4, tf) != 4)
Index: timidity/timidity.c
===================================================================
RCS file: /cvsroot/timidity/timidity/timidity/timidity.c,v
retrieving revision 1.175
diff -d -u -r1.175 timidity.c
--- timidity/timidity.c	21 Mar 2006 09:42:16 -0000	1.175
+++ timidity/timidity.c	4 Apr 2006 01:10:53 -0000
@@ -91,7 +91,9 @@
 #include "mid.defs"
 #include "aq.h"
 #include "mix.h"
+#ifndef NO_MODULES
 #include "unimod.h"
+#endif
 #include "quantity.h"
 #include "rtsyn.h"
 
@@ -598,6 +600,10 @@
     intr++;
     return TRUE;
 }
+
+HANDLE KillerEvent; /* [RH] */
+static const char KillerEventName[] = "TiMidity Killer";
+
 #endif
 
 
@@ -5122,7 +5128,9 @@
 	init_midi_trace();
 	int_rand(-1);	/* initialize random seed */
 	int_rand(42);	/* the 1st number generated is not very random */
+#ifndef NO_MODULES
 	ML_RegisterAllLoaders ();
+#endif
     }
 
     is_first = 0;
@@ -5591,6 +5599,17 @@
     printf("TiMidity++ start\n");fflush(stdout);
 #endif
 
+#if defined(__W32__)
+	/* [RH] Make sure stdout and stdin are using binary output. */
+	_setmode(_fileno(stdout), _O_BINARY);
+	_setmode(_fileno(stdin), _O_BINARY);
+
+	/* [RH] If the specified named event can be found, signalling
+	 * it will cause Timidity to quit.
+	 */
+	KillerEvent = OpenEvent(EVENT_ALL_ACCESS, FALSE, KillerEventName);
+#endif
+
 #ifdef main
     {
 	static int maincnt = 0;
