Index: trunk/src/winmm/IRTMidi.cpp
===================================================================
--- trunk/src/winmm/IRTMidi.cpp	(revision 587)
+++ trunk/src/winmm/IRTMidi.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: IRTMidi.cpp,v 1.4 1999-06-19 10:54:47 sandervl Exp $ */
+/* $Id: IRTMidi.cpp,v 1.5 1999-08-19 18:46:03 phaller Exp $ */
 
 /*******************************************************************************
@@ -13,8 +13,13 @@
 *
 *******************************************************************************/
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #define INCL_DOS
-#include <os2wrap.h>	//Odin32 OS/2 api wrappers
+#include <os2wrap.h>     //Odin32 OS/2 api wrappers
 #include <win32type.h>
-
 #include "IRTMidi.hpp"
 #include <meerror.h>
@@ -692,2 +697,3 @@
 }
 
+
Index: trunk/src/winmm/aux.cpp
===================================================================
--- trunk/src/winmm/aux.cpp	(revision 587)
+++ trunk/src/winmm/aux.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: aux.cpp,v 1.3 1999-06-10 16:24:32 phaller Exp $ */
+/* $Id: aux.cpp,v 1.4 1999-08-19 18:46:04 phaller Exp $ */
 
 /*
@@ -10,7 +10,13 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
 #include <mmsystem.h>
-
+#include <odinwrap.h>
 #include <string.h>
 
@@ -21,7 +27,12 @@
 #include "aux.h"
 
+ODINDEBUGCHANNEL(WINMM-AUX)
+
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API auxGetDevCapsA(UINT uDeviceID, LPAUXCAPSA pac, UINT cbac)
+ODINFUNCTION3(MMRESULT, auxGetDevCapsA,
+              UINT, uDeviceID,
+              LPAUXCAPSA, pac,
+              UINT, cbac)
 {
   if(uDeviceID == AUX_MAPPER) {//AUX mapper
@@ -45,5 +56,8 @@
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API auxGetDevCapsW(UINT uDeviceID, LPAUXCAPSW pac, UINT cbac)
+ODINFUNCTION3(MMRESULT, auxGetDevCapsW,
+              UINT, uDeviceID,
+              LPAUXCAPSW, pac,
+              UINT, cbac)
 {
   if(uDeviceID == AUX_MAPPER) {//AUX mapper
@@ -67,5 +81,7 @@
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API auxSetVolume(UINT uDeviceID, DWORD dwVolume)
+ODINFUNCTION2(MMRESULT, auxSetVolume,
+              UINT, uDeviceID,
+              DWORD, dwVolume)
 {
   if(uDeviceID == AUX_MAPPER) {//AUX mapper
@@ -82,5 +98,7 @@
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API auxGetVolume(UINT uDeviceID, LPDWORD pdwVolume)
+ODINFUNCTION2(MMRESULT, auxGetVolume,
+              UINT, uDeviceID,
+              LPDWORD, pdwVolume)
 {
   if(uDeviceID == AUX_MAPPER) {//AUX mapper
@@ -97,14 +115,18 @@
 /******************************************************************************/
 /******************************************************************************/
-UINT WIN32API auxGetNumDevs(void)
+ODINFUNCTION0(UINT, auxGetNumDevs)
 {
-  if(auxOS2Open() == FALSE) {
-        return(0);
-  }
-  return 1;
+  if(auxOS2Open() == FALSE)
+    return(0);
+  else
+    return 1;
 }
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API auxOutMessage(UINT uDeviceID, UINT uMsg, DWORD dwParam1, DWORD dwParam2)
+ODINFUNCTION4(MMRESULT, auxOutMessage,
+              UINT, uDeviceID,
+              UINT, uMsg,
+              DWORD, dwParam1,
+              DWORD, dwParam2)
 {
   if(uDeviceID == AUX_MAPPER) {//AUX mapper
@@ -137,2 +159,3 @@
 /******************************************************************************/
 /******************************************************************************/
+
Index: trunk/src/winmm/auxos2.cpp
===================================================================
--- trunk/src/winmm/auxos2.cpp	(revision 587)
+++ trunk/src/winmm/auxos2.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: auxos2.cpp,v 1.4 1999-06-19 10:54:47 sandervl Exp $ */
+/* $Id: auxos2.cpp,v 1.5 1999-08-19 18:46:04 phaller Exp $ */
 
 /*
@@ -11,7 +11,12 @@
  */
 
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #define  INCL_BASE
 #define  INCL_OS2MM
-#include <os2wrap.h>	//Odin32 OS/2 api wrappers
+#include <os2wrap.h>    //Odin32 OS/2 api wrappers
 #include <os2me.h>
 #include <string.h>
@@ -100,2 +105,3 @@
 /******************************************************************************/
 /******************************************************************************/
+
Index: trunk/src/winmm/driver.cpp
===================================================================
--- trunk/src/winmm/driver.cpp	(revision 587)
+++ trunk/src/winmm/driver.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: driver.cpp,v 1.3 1999-06-10 16:24:33 phaller Exp $ */
+/* $Id: driver.cpp,v 1.4 1999-08-19 18:46:04 phaller Exp $ */
 
 /*
@@ -10,7 +10,13 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
 #include <mmsystem.h>
-
+#include <odinwrap.h>
 #include <string.h>
 #include <misc.h>
@@ -20,8 +26,9 @@
 #include "os2timer.h"
 
-
-/*****************************************************************************
- * Name      : LRESULT WIN32API SendDriverMessage
- * Purpose   : Sends the specified message to the installable driver
+ODINDEBUGCHANNEL(WINMM-DRIVER)
+
+
+/*****************************************************************************
+ *             Sends the specifiedmessage to the installable driver
  * Parameters: HDRVR hDrvr
  *             UINT  msg
@@ -36,22 +43,17 @@
  *****************************************************************************/
 
-LRESULT WIN32API SendDriverMessage(HDRVR hdrvr,
-                                      UINT msg,
-                                      LONG lParam1,
-                                      LONG lParam2)
-{
-  dprintf(("WINMM: SendDriverMessage(%08x,%08x,%08x,%08x) not implemented.\n",
-           hdrvr,
-           msg,
-           lParam1,
-           lParam2));
-
-  return 0; /* unsuccessful return */
-}
-
-
-/*****************************************************************************
- * Name      : HDRVR WIN32API OpenDriver
- * Purpose   : Opens an instance of an installable driver and initializes
+ODINFUNCTION4(LRESULT, SendDriverMessage,
+              HDRVR, hdrvr,
+              UINT, msg,
+              LONG, lParam1,
+              LONG, lParam2)
+{
+  dprintf(("WINMM: SendDriverMessage not implemented.\n"));
+  return 0; /* unsuccessful return */
+}
+
+
+/*****************************************************************************
+ *             Opens an instance of an installable driver and initializes
  *             the instance using either the driver's default settings or a
  *             driver-specific value.
@@ -67,20 +69,16 @@
  *****************************************************************************/
 
-HDRVR WIN32API OpenDriver(LPCWSTR lpDriverName,
-                             LPCWSTR lpSectionName,
-                             LONG    lParam)
-{
-  dprintf(("WINMM: OpenDriver(%s,%s,%08x) not implemented.\n",
-           lpDriverName,
-           lpSectionName,
-           lParam));
-
-  return 0; /* unsuccessful return */
-}
-
-
-/*****************************************************************************
- * Name      : HDRVR WIN32API OpenDriverA
- * Purpose   : Opens an instance of an installable driver and initializes
+ODINFUNCTION3(HDRVR, OpenDriver,
+              LPCWSTR, lpDriverName,
+              LPCWSTR, lpSectionName,
+              LONG, lParam)
+{
+  dprintf(("WINMM: OpenDriver not implemented.\n"));
+  return 0; /* unsuccessful return */
+}
+
+
+/*****************************************************************************
+ *             Opens an instance of an installable driver and initializes
  *             the instance using either the driver's default settings or a
  *             driver-specific value.
@@ -96,21 +94,17 @@
  *****************************************************************************/
 
-HDRVR WIN32API OpenDriverA(LPTSTR lpDriverName,
-                              LPTSTR lpSectionName,
-                              LONG   lParam)
-{
-  dprintf(("WINMM: OpenDriverA(%s,%s,%08x) not implemented.\n",
-           lpDriverName,
-           lpSectionName,
-           lParam));
-
-  return 0; /* unsuccessful return */
-}
-
-
-
-/*****************************************************************************
- * Name      : HDRVR WIN32API CloseDriver
- * Purpose   : Closes an installable driver.
+ODINFUNCTION3(HDRVR, OpenDriverA,
+              LPTSTR, lpDriverName,
+              LPTSTR, lpSectionName,
+              LONG, lParam)
+{
+  dprintf(("WINMM: OpenDriverA not implemented.\n"));
+  return 0; /* unsuccessful return */
+}
+
+
+
+/*****************************************************************************
+ *             Closes an installable driver.
  * Parameters: HDRVR hDrvr
  *             LONG  lParam1
@@ -124,20 +118,16 @@
  *****************************************************************************/
 
-LRESULT WIN32API CloseDriver(HDRVR hDrvr,
-                                LONG  lParam1,
-                                LONG  lParam2)
-{
-  dprintf(("WINMM: CloseDriver(%08x,%08x,%08x) not implemented.\n",
-           hDrvr,
-           lParam1,
-           lParam2));
-
-  return 0; /* unsuccessful return */
-}
-
-
-/*****************************************************************************
- * Name      : LRESULT WIN32API DefDriverProc
- * Purpose   : Provides default processing for any messages not processed by
+ODINFUNCTION3(LRESULT, CloseDriver,
+              HDRVR, hDrvr,
+              LONG, lParam1,
+              LONG, lParam2)
+{
+  dprintf(("WINMM: CloseDriver not implemented.\n"));
+  return 0; /* unsuccessful return */
+}
+
+
+/*****************************************************************************
+ *             Provides default processing for anymessages not processed by
  *             an installable driver.
  * Parameters: DWORD dwDriverID
@@ -154,25 +144,17 @@
  *****************************************************************************/
 
-LRESULT WIN32API DefDriverProc(DWORD dwDriverID,
-                                  HDRVR hDrvr,
-                                  UINT  msg,
-                                  LONG  lParam1,
-                                  LONG  lParam2)
-{
-  dprintf(("WINMM: DefDriverProc(%08x,%08x,%08x,%08x,%08x) not implemented.\n",
-           dwDriverID,
-           hDrvr,
-           msg,
-           lParam1,
-           lParam2));
-
-  return 0; /* unsuccessful return */
-}
-
-
-/*****************************************************************************
- * Name      : LRESULT WIN32API DriverCallback
- * Purpose   : Calls a callback function, sends a message to a window, or
- *             unblocks a thread.
+ODINFUNCTION5(LRESULT, DefDriverProc,
+              DWORD, dwDriverID,
+              HDRVR, hDrvr,
+              UINT, msg,
+              LONG, lParam1,
+              LONG, lParam2)
+{
+  dprintf(("WINMM: DefDriverProc not implemented.\n"));
+  return 0; /* unsuccessful return */
+}
+
+
+/*****************************************************************************
  * Parameters: DWORD dwCallback
  *             DWORD dwFlags
@@ -190,21 +172,14 @@
  *****************************************************************************/
 
-LRESULT WIN32API DriverCallback(DWORD dwCallback,
-                                   DWORD dwFlags,
-                                   HDRVR hDrvr,
-                                   DWORD msg,
-                                   DWORD dwUser,
-                                   DWORD dwParam1,
-                                   DWORD dwParam2)
-{
-  dprintf(("WINMM: DriverCallback(%08x,%08x,%08x,%08x,%08x,%08x,%08x) not implemented.\n",
-           dwCallback,
-           dwFlags,
-           hDrvr,
-           msg,
-           dwUser,
-           dwParam1,
-           dwParam2));
-
+ODINFUNCTION7(LRESULT, DriverCallback,
+              DWORD, dwCallback,
+              DWORD, dwFlags,
+              HDRVR, hDrvr,
+              DWORD, msg,
+              DWORD, dwUser,
+              DWORD, dwParam1,
+              DWORD, dwParam2)
+{
+  dprintf(("WINMM: DriverCallback not implemented.\n"));
   return FALSE; /* unsuccessful return */
 }
@@ -212,5 +187,4 @@
 
 /*****************************************************************************
- * Name      : HMODULE WIN32API DrvGetModuleHandle
  * Purpose   : Retrieves the instance handle of the module that contains the
  *             installable driver.
@@ -224,16 +198,14 @@
  *****************************************************************************/
 
-HMODULE WIN32API DrvGetModuleHandle(HDRVR hDriver)
-{
-  dprintf(("WINMM: DrvGetModuleHandle(%08x) not implemented.\n",
-           hDriver));
-
-  return 0; /* unsuccessful return */
-}
-
-
-/*****************************************************************************
- * Name      : LRESULT WIN32API DrvSendMessage
- * Purpose   : Sends the specified message to the installable driver
+ODINFUNCTION1(HMODULE, DrvGetModuleHandle,
+              HDRVR, hDriver)
+{
+  dprintf(("WINMM: DrvGetModuleHandle not implemented.\n"));
+  return 0; /* unsuccessful return */
+}
+
+
+/*****************************************************************************
+ *             Sends the specified message to the installable driver
  * Parameters: HDRVR hDrvr
  *             UINT  msg
@@ -248,22 +220,17 @@
  *****************************************************************************/
 
-LRESULT WIN32API DrvSendMessage(HDRVR hdrvr,
-                                   UINT msg,
-                                   LONG lParam1,
-                                   LONG lParam2)
-{
-  dprintf(("WINMM: DrvSendMessage(%08x,%08x,%08x,%08x) not implemented.\n",
-           hdrvr,
-           msg,
-           lParam1,
-           lParam2));
-
-  return 0; /* unsuccessful return */
-}
-
-
-/*****************************************************************************
- * Name      : HMODULE WIN32API GetDriverModuleHandle
- * Purpose   : Retrieves the instance handle of the module that contains the
+ODINFUNCTION4(LRESULT, DrvSendMessage,
+              HDRVR, hdrvr,
+              UINT, msg,
+              LONG, lParam1,
+              LONG, lParam2)
+{
+  dprintf(("WINMM: DrvSendMessage not implemented.\n"));
+  return 0; /* unsuccessful return */
+}
+
+
+/*****************************************************************************
+ *             Retrieves the instance handle of the module that contains the
  *             installable driver.
  * Parameters: HDRVR hDriver
@@ -276,9 +243,9 @@
  *****************************************************************************/
 
-HMODULE WIN32API GetDriverModuleHandle(HDRVR hDriver)
-{
-  dprintf(("WINMM: GetDriverModuleHandle(%08x) not implemented.\n",
-           hDriver));
-
-  return 0; /* unsuccessful return */
-}
+ODINFUNCTION1(HMODULE, GetDriverModuleHandle,
+              HDRVR, hDriver)
+{
+  dprintf(("WINMM: GetDriverModuleHandle not implemented.\n"));
+  return 0; /* unsuccessful return */
+}
+
Index: trunk/src/winmm/dwaveout.cpp
===================================================================
--- trunk/src/winmm/dwaveout.cpp	(revision 587)
+++ trunk/src/winmm/dwaveout.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: dwaveout.cpp,v 1.4 1999-06-19 10:54:47 sandervl Exp $ */
+/* $Id: dwaveout.cpp,v 1.5 1999-08-19 18:46:04 phaller Exp $ */
 
 /*
@@ -11,7 +11,12 @@
  */
 
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #define  INCL_BASE
 #define  INCL_OS2MM
-#include <os2wrap.h>	//Odin32 OS/2 api wrappers
+#include <os2wrap.h>   //Odin32 OS/2 api wrappers
 #include <os2me.h>
 #include <stdlib.h>
@@ -658,2 +663,3 @@
 /******************************************************************************/
 DartWaveOut *DartWaveOut::waveout = NULL;
+
Index: trunk/src/winmm/joy.cpp
===================================================================
--- trunk/src/winmm/joy.cpp	(revision 587)
+++ trunk/src/winmm/joy.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: joy.cpp,v 1.5 1999-06-30 11:29:40 sandervl Exp $ */
+/* $Id: joy.cpp,v 1.6 1999-08-19 18:46:04 phaller Exp $ */
 /*
  * Odin Joystick apis
@@ -9,6 +9,12 @@
  *
  */
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
 #include <mmsystem.h>
+#include <odinwrap.h>
 #include <misc.h>
 #include <string.h>
@@ -20,4 +26,7 @@
 #include "joyos2.h"
 
+ODINDEBUGCHANNEL(WINMM-JOY)
+
+
 #define MAXJOYDRIVERS 2
 
@@ -83,11 +92,11 @@
 
 /*****************************************************************************
- * Name      : UINT WIN32API joyGetNumDevs
- * Purpose   : Get number of installed joysticks
+ODINFUNCTION0(*, :
+ODINFUNCTION0(INT, joyGetNumDevs* Purpose   : Get number of installed joysticks
  * Status    : Done
  *
  * Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 10:00]
  *****************************************************************************/
-UINT WIN32API joyGetNumDevs()
+ODINFUNCTION0(UINT, joyGetNumDevs)
 {
   HANDLE            hJoy;
@@ -120,14 +129,16 @@
 
 /*****************************************************************************
- * Name      : UINT WIN32API joyGetDevCapsW
- * Purpose   : Get Joystick capatibities (Unicode)
+ODINFUNCTION1(*, :,
+ODINFUNCTION1(UINT,, *,
+              Purpose, :Get Joystick capatibities (Unicode)
  * Status    : Done
  *
  * Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 09:40]
  *****************************************************************************/
-MMRESULT WIN32API joyGetDevCapsW(UINT wID, LPJOYCAPSW lpCaps,UINT wSize)
-{
-    dprintf(("WINMM:joyGetDevCapsW = %d %X %d\n",wID, lpCaps, wSize));
-
+ODINFUNCTION3(MMRESULT, joyGetDevCapsW,
+              UINT, wID,
+              LPJOYCAPSW, lpCaps,
+              UINT, wSize)
+{
     if (wID >= MAXJOYDRIVERS) return JOYERR_PARMS;
 
@@ -167,14 +178,16 @@
 
 /*****************************************************************************
- * Name      : UINT WIN32API joyGetDevCapsW
- * Purpose   : Get Joystick capatibities (Unicode)
+ODINFUNCTION1(*, :,
+ODINFUNCTION1(UINT,, *,
+              Purpose, :Get Joystick capatibities (Unicode)
  * Status    : Done
  *
  * Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
  *****************************************************************************/
-MMRESULT WIN32API joyGetDevCapsA(UINT wID, LPJOYCAPSA lpCaps,UINT wSize)
-{
-    dprintf(("WINMM:joyGetDevCapsA = %d %X %d\n",wID, lpCaps, wSize));
-
+ODINFUNCTION3(MMRESULT, joyGetDevCapsA,
+              UINT, wID,
+              LPJOYCAPSA, lpCaps,
+              UINT, wSize)
+{
     if (wID >= MAXJOYDRIVERS) return JOYERR_PARMS;
 
@@ -213,6 +226,7 @@
 
 /*****************************************************************************
- * Name      : MMRESULT WIN32API joyGetPosEx
- * Purpose   : Get the extended actual joystick position
+ODINFUNCTION1(*, :,
+ODINFUNCTION1(MMRESULT,, *,
+              Purpose, :Get the extended actual joystick position
  * Status    : Done (but not all functions are functionally but Quake2
  *             running with this function)
@@ -220,5 +234,7 @@
  * Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 23:42]
  *****************************************************************************/
-MMRESULT WIN32API joyGetPosEx(UINT uJoyID, LPJOYINFOEX pji)
+ODINFUNCTION2(MMRESULT, joyGetPosEx,
+              UINT, uJoyID,
+              LPJOYINFOEX, pji)
 {
   JOYINFO            ji;
@@ -227,6 +243,4 @@
   DWORD              rc;
 
-  dprintf(("WINMM:joyGetPosEx %d %X",uJoyID, pji));
-
   if (uJoyID >= MAXJOYDRIVERS) return JOYERR_PARMS;
 
@@ -237,5 +251,5 @@
   rc=JoyOpen(&hGamePort);
 
-  if (rc) return (MMSYSERR_NODRIVER);  
+  if (rc) return (MMSYSERR_NODRIVER);
 
   JoyGetPos(hGamePort,uJoyID,&ji);
@@ -304,16 +318,19 @@
 
 /*****************************************************************************
- * Name      : MMRESULT WIN32API joyGetPos
- * Purpose   : Get the actual joystick position
- * Status    : Done
- *
- * Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
- *****************************************************************************/
-MMRESULT WIN32API joyGetPos(UINT uJoyID, LPJOYINFO pji)
+ODINFUNCTION2(*, :,
+ODINFUNCTION6(MMRESULT,, joyGetPos,
+              *,, Purpose:,
+              Get, the,
+              actual, joystick,
+              position *, Status,
+              :, Done,
+              * *, Author: Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
+ *****************************************************************************/
+ODINFUNCTION2(MMRESULT, joyGetPos,
+              UINT, uJoyID,
+              LPJOYINFO, pji)
 {
   HANDLE   hGame;
   MMRESULT rc;
-  dprintf(("WINMM:joyGetPos %d %X\n",uJoyID, pji));
-
   if (uJoyID >= MAXJOYDRIVERS) return JOYERR_PARMS;
 
@@ -331,10 +348,12 @@
 }
 /*****************************************************************************
- * Name      : MMRESULT WIN32API joyGetThreshold
- * Status    : Done
- *
- * Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
- *****************************************************************************/
-MMRESULT WINAPI joyGetThreshold(UINT wID, LPUINT lpThreshold)
+ODINFUNCTION2(*, :,
+ODINFUNCTION2(MMRESULT,, joyGetThreshold,
+              *,, Status:,
+              Done *, *Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
+ *****************************************************************************/
+ODINFUNCTION2(MMRESULT, joyGetThreshold,
+              UINT, wID,
+              LPUINT, lpThreshold)
 {
     dprintf(("WINMM:joyGetThreshold %d %X\n",wID, lpThreshold));
@@ -348,13 +367,13 @@
 
 /*****************************************************************************
- * Name      : MMRESULT WIN32API joySetThreshold
- * Status    : Done
- *
- * Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
- *****************************************************************************/
-MMRESULT WINAPI joySetThreshold(UINT wID, UINT wThreshold)
-{
-   dprintf(("WINMM:joySetThreshold %d %d\n",wID, wThreshold));
-
+ODINFUNCTION2(*, :,
+ODINFUNCTION2(MMRESULT,, joySetThreshold,
+              *,, Status:,
+              Done *, *Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
+ *****************************************************************************/
+ODINFUNCTION2(MMRESULT, joySetThreshold,
+              UINT, wID,
+              UINT, wThreshold)
+{
    if (wID >= MAXJOYDRIVERS) return JOYERR_PARMS;
 
@@ -374,17 +393,22 @@
 
 /*****************************************************************************
- * Name      : MMRESULT WIN32API joySetCapture
- * Purpose   : Start joystick moves capturing
- * Status    : Done
+ODINFUNCTION4(*, :,
+ODINFUNCTION4(MMRESULT,, joySetCapture,
+              *,, Purpose,
+              :,, Start,
+              joystick,, movescapturing,
+              *, Status: Done
  *
  * Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
  *****************************************************************************/
-MMRESULT WINAPI joySetCapture(HWND hWnd,UINT wID,UINT wPeriod,BOOL bChanged)
+ODINFUNCTION4(MMRESULT, joySetCapture,
+              HWND, hWnd,
+              UINT, wID,
+              UINT, wPeriod,
+              BOOL, bChanged)
 {
    JOYTHREADOPT *newthr;
    INT          iThreadId;
    DWORD        rc;
-
-   dprintf(("WINMM:joySetCapture %x %d %d %d\n", hWnd, wID, wPeriod, bChanged));
 
    if (wID >= MAXJOYDRIVERS) return JOYERR_PARMS;
@@ -412,15 +436,15 @@
 
 /*****************************************************************************
- * Name      : MMRESULT WIN32API joyReleaseCapture
- * Purpose   : Stop capturing joystick moves
+ODINFUNCTION1(*, :,
+ODINFUNCTION1(MMRESULT,, *,
+              Purpose, :Stop capturing joystick moves
  * Status    : Done (but must be rewriting)
  *
  * Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
  *****************************************************************************/
-MMRESULT WINAPI joyReleaseCapture(UINT wID)
+ODINFUNCTION1(MMRESULT, joyReleaseCapture,
+              UINT, wID)
 {
   // TODO: Semaphores or waiting for thread...
-  dprintf(("WINMM:joyReleaseCapture %d\n",wID));
-
   if (wID >= MAXJOYDRIVERS) return JOYERR_PARMS;
 
@@ -433,13 +457,15 @@
 
 /*****************************************************************************
- * Name      : MMRESULT WIN32API joyConfigChanged
- * Status    : Stub but done ;-)
- *
- * Author    : Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
- *****************************************************************************/
-MMRESULT WIN32API joyConfigChanged( DWORD dwFlags )
-{
-  dprintf(("WINMM:joyConfigChanged %X\n",dwFlags));
-
+ODINFUNCTION1(*, :,
+ODINFUNCTION4(MMRESULT,, *,
+              Status, :,
+              Stub, but,
+              done, ;-,
+              * *, Author)
+: Przemyslaw Dobrowolski [Tue, 1999/06/29 09:00]
+ *****************************************************************************/
+ODINFUNCTION1(MMRESULT, joyConfigChanged,
+              DWORD, dwFlags)
+{
   return JOYERR_NOERROR;
 }
@@ -500,2 +526,3 @@
   _endthread();
 }
+
Index: trunk/src/winmm/joyos2.cpp
===================================================================
--- trunk/src/winmm/joyos2.cpp	(revision 587)
+++ trunk/src/winmm/joyos2.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: joyos2.cpp,v 1.2 1999-06-30 11:29:40 sandervl Exp $ */
+/* $Id: joyos2.cpp,v 1.3 1999-08-19 18:46:04 phaller Exp $ */
 /*
  * OS/2 Joystick apis
@@ -9,8 +9,15 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #define  INCL_BASE
-#include <os2wrap.h>	//Odin32 OS/2 api wrappers
+#include <os2wrap.h>     //Odin32 OS/2 api wrappers
 #include <misc.h>
 #include "joyos2.h"
+
 
 #define GAMEPDDNAME     "GAME$"
@@ -171,2 +178,3 @@
 }
 
+
Index: trunk/src/winmm/mci.cpp
===================================================================
--- trunk/src/winmm/mci.cpp	(revision 587)
+++ trunk/src/winmm/mci.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: mci.cpp,v 1.3 1999-06-10 16:24:34 phaller Exp $ */
+/* $Id: mci.cpp,v 1.4 1999-08-19 18:46:04 phaller Exp $ */
 
 /*
@@ -10,7 +10,13 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
 #include <mmsystem.h>
-
+#include <odinwrap.h>
 #include <string.h>
 #include <stdio.h>
@@ -21,5 +27,11 @@
 #include "winmm.h"
 
-BOOL WIN32API mciDriverNotify(HWND hwndCallback, UINT uDeviceID, UINT uStatus)
+ODINDEBUGCHANNEL(WINMM-MCI)
+
+
+ODINFUNCTION3(BOOL, mciDriverNotify,
+              HWND, hwndCallback,
+              UINT, uDeviceID,
+              UINT, uStatus)
 {
   dprintf(("WINMM:mciDriverNotify - stub\n"));
@@ -27,5 +39,6 @@
 }
 
-UINT WIN32API mciDriverYield(UINT uDeviceID)
+ODINFUNCTION1(UINT, mciDriverYield,
+              UINT, uDeviceID)
 {
   dprintf(("WINMM:mciDriverYield - stub\n"));
@@ -33,5 +46,6 @@
 }
 
-BOOL WIN32API mciExecute(LPCSTR pszCommand)
+ODINFUNCTION1(BOOL, mciExecute,
+              LPCSTR, pszCommand)
 {
   dprintf(("WINMM:mciExecute(%s) - stub\n", pszCommand));
@@ -39,5 +53,6 @@
 }
 
-BOOL WIN32API mciFreeCommandResource(UINT uTable)
+ODINFUNCTION1(BOOL, mciFreeCommandResource,
+              UINT, uTable)
 {
   dprintf(("WINMM:mciFreeCommandResource - stub\n"));
@@ -45,5 +60,6 @@
 }
 
-HTASK WIN32API mciGetCreatorTask(MCIDEVICEID mciId)
+ODINFUNCTION1(HTASK, mciGetCreatorTask,
+              MCIDEVICEID, mciId)
 {
   dprintf(("WINMM:mciGetCreatorTask - stub\n"));
@@ -51,5 +67,6 @@
 }
 
-MCIDEVICEID WIN32API mciGetDeviceIDA(LPCSTR pszDevice)
+ODINFUNCTION1(MCIDEVICEID, mciGetDeviceIDA,
+              LPCSTR, pszDevice)
 {
   dprintf(("WINMM:mciGetDeviceIDA - stub\n"));
@@ -57,5 +74,6 @@
 }
 
-MCIDEVICEID WIN32API mciGetDeviceIDW(LPCWSTR pszDevice)
+ODINFUNCTION1(MCIDEVICEID, mciGetDeviceIDW,
+              LPCWSTR, pszDevice)
 {
   dprintf(("WINMM:mciGetDeviceIDW - stub\n"));
@@ -63,5 +81,7 @@
 }
 
-MCIDEVICEID WIN32API mciGetDeviceIDFromElementIDA(DWORD dwElementID, LPCSTR lpstrType )
+ODINFUNCTION2(MCIDEVICEID, mciGetDeviceIDFromElementIDA,
+              DWORD, dwElementID,
+              LPCSTR, lpstrType)
 {
   dprintf(("WINMM:mciGetDeviceIDFromElementIDA - stub\n"));
@@ -69,5 +89,7 @@
 }
 
-MCIDEVICEID WIN32API mciGetDeviceIDFromElementIDW(DWORD dwElementID, LPCWSTR lpstrType )
+ODINFUNCTION2(MCIDEVICEID, mciGetDeviceIDFromElementIDW,
+              DWORD, dwElementID,
+              LPCWSTR, lpstrType)
 {
   dprintf(("WINMM:mciGetDeviceIDFromElementIDW - stub\n"));
@@ -75,5 +97,6 @@
 }
 
-DWORD WIN32API mciGetDriverData(UINT uDeviceID)
+ODINFUNCTION1(DWORD, mciGetDriverData,
+              UINT, uDeviceID)
 {
   dprintf(("WINMM:mciGetDriverData - stub\n"));
@@ -81,5 +104,8 @@
 }
 
-BOOL WIN32API mciGetErrorStringA( MCIERROR mcierr, LPSTR pszText, UINT cchText )
+ODINFUNCTION3(BOOL, mciGetErrorStringA,
+              MCIERROR, mcierr,
+              LPSTR, pszText,
+              UINT, cchText)
 {
   dprintf(("WINMM:mciGetErrorStringA(%d)\n", mcierr ));
@@ -96,5 +122,8 @@
 }
 
-BOOL WIN32API mciGetErrorStringW( MCIERROR mcierr, LPWSTR pszText, UINT cchText )
+ODINFUNCTION3(BOOL, mciGetErrorStringW,
+              MCIERROR, mcierr,
+              LPWSTR, pszText,
+              UINT, cchText)
 {
   dprintf(("WINMM:mciGetErrorStringW(%d)\n", mcierr ));
@@ -111,5 +140,7 @@
 }
 
-YIELDPROC WIN32API mciGetYieldProc(MCIDEVICEID mciId, LPDWORD pdwYieldData)
+ODINFUNCTION2(YIELDPROC, mciGetYieldProc,
+              MCIDEVICEID, mciId,
+              LPDWORD, pdwYieldData)
 {
   dprintf(("WINMM:mciGetYieldProc - stub\n"));
@@ -117,5 +148,8 @@
 }
 
-UINT WIN32API mciLoadCommandResource(HINSTANCE hInstance, LPCWSTR lpResName, UINT uType)
+ODINFUNCTION3(UINT, mciLoadCommandResource,
+              HINSTANCE, hInstance,
+              LPCWSTR, lpResName,
+              UINT, uType)
 {
   dprintf(("WINMM:mciLoadCOmmandResource - stub\n"));
@@ -123,5 +157,9 @@
 }
 
-MCIERROR WIN32API mciSendCommandA(MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2)
+ODINFUNCTION4(MCIERROR, mciSendCommandA,
+              MCIDEVICEID, mciId,
+              UINT, uMsg,
+              DWORD, dwParam1,
+              DWORD, dwParam2)
 {
   dprintf(("WINMM:mciSendCommandA - stub %X %X %X %X\n", mciId, uMsg, dwParam1, dwParam2));
@@ -129,5 +167,9 @@
 }
 
-MCIERROR WIN32API mciSendCommandW(MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2)
+ODINFUNCTION4(MCIERROR, mciSendCommandW,
+              MCIDEVICEID, mciId,
+              UINT, uMsg,
+              DWORD, dwParam1,
+              DWORD, dwParam2)
 {
   dprintf(("WINMM:mciSendCommandW - stub %X %X %X %X\n", mciId, uMsg, dwParam1, dwParam2));
@@ -135,5 +177,9 @@
 }
 
-MCIERROR WIN32API mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback)
+ODINFUNCTION4(MCIERROR, mciSendStringA,
+              LPCSTR, lpstrCommand,
+              LPSTR, lpstrReturnString,
+              UINT, uReturnLength,
+              HWND, hwndCallback)
 {
   dprintf(("WINMM:mciSendStringA - stub\n"));
@@ -141,5 +187,9 @@
 }
 
-MCIERROR WIN32API mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback)
+ODINFUNCTION4(MCIERROR, mciSendStringW,
+              LPCWSTR, lpstrCommand,
+              LPWSTR, lpstrReturnString,
+              UINT, uReturnLength,
+              HWND, hwndCallback)
 {
   dprintf(("WINMM:mciSendStringW - stub\n"));
@@ -147,5 +197,7 @@
 }
 
-BOOL WIN32API mciSetDriverData(UINT uDeviceID, DWORD dwData)
+ODINFUNCTION2(BOOL, mciSetDriverData,
+              UINT, uDeviceID,
+              DWORD, dwData)
 {
   dprintf(("WINMM:mciSetDriverData - stub\n"));
@@ -153,5 +205,8 @@
 }
 
-BOOL WIN32API mciSetYieldProc(MCIDEVICEID mciId, YIELDPROC fpYieldProc, DWORD dwYieldData)
+ODINFUNCTION3(BOOL, mciSetYieldProc,
+              MCIDEVICEID, mciId,
+              YIELDPROC, fpYieldProc,
+              DWORD, dwYieldData)
 {
   dprintf(("WINMM:mciSetYieldProc - stub\n"));
@@ -159,2 +214,3 @@
 }
 
+
Index: trunk/src/winmm/midi.cpp
===================================================================
--- trunk/src/winmm/midi.cpp	(revision 587)
+++ trunk/src/winmm/midi.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: midi.cpp,v 1.3 1999-06-10 16:24:34 phaller Exp $ */
+/* $Id: midi.cpp,v 1.4 1999-08-19 18:46:04 phaller Exp $ */
 
 /*
@@ -10,6 +10,13 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
 #include <mmsystem.h>
+#include <odinwrap.h>
 #include <process.h>
 #include <stdio.h>
@@ -19,4 +26,7 @@
 #include "midi.hpp"
 #include <winos2def.h>
+
+
+ODINDEBUGCHANNEL(WINMM-MIDI)
 
 /*
@@ -103,7 +113,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiConnect( HMIDI hMidiIn,
-                               HMIDIOUT hMidiOut,
-                               LPVOID pReserved )
+ODINFUNCTION3(MMRESULT, midiConnect,
+              HMIDI, hMidiIn,
+              HMIDIOUT, hMidiOut,
+              LPVOID, pReserved)
 {
   // TODO: Implement using instance connections
@@ -125,7 +136,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiDisconnect( HMIDI hMidiIn,
-                                  HMIDIOUT hMidiOut,
-                                  LPVOID pReserved )
+ODINFUNCTION3(MMRESULT, midiDisconnect,
+              HMIDI, hMidiIn,
+              HMIDIOUT, hMidiOut,
+              LPVOID, pReserved)
 {
   // TODO: Implement using instance connections
@@ -147,7 +159,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInAddBuffer( HMIDIIN hMidiIn,
-                                   LPMIDIHDR lpMidiInHdr,
-                                   UINT cbMidiInHdr )
+ODINFUNCTION3(MMRESULT, midiInAddBuffer,
+              HMIDIIN, hMidiIn,
+              LPMIDIHDR, lpMidiInHdr,
+              UINT, cbMidiInHdr)
 {
   dprintf(("WINMM:midiInAddBuffer -- not Implemented\n" ));
@@ -164,5 +177,6 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInClose( HMIDIIN hMidiIn )
+ODINFUNCTION1(MMRESULT, midiInClose,
+              HMIDIIN, hMidiIn)
 {
   dprintf(("WINMM:midiInClose -- partially Implemented\n" ));
@@ -180,7 +194,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInGetDevCapsA( UINT uDeviceId,      // Device # or handle
-                                     LPMIDIINCAPSA midiInCaps,    // structure to fill in
-                                     UINT  sMidiInCaps )  // Length of structure
+ODINFUNCTION3(MMRESULT, midiInGetDevCapsA,
+              UINT, uDeviceId,
+              LPMIDIINCAPSA, midiInCaps,
+              UINT,  sMidiInCaps)
 {
   dprintf(("WINMM:midiInGetDevCapsA(%u)\n", uDeviceId ));
@@ -208,7 +223,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInGetDevCapsW( UINT uDeviceId,      // Device # or handle
-                                     LPMIDIINCAPSW midiInCaps,    // structure to fill in
-                                     UINT  sMidiInCaps )  // Length of structure
+ODINFUNCTION3(MMRESULT, midiInGetDevCapsW,
+              UINT, uDeviceId,
+              LPMIDIINCAPSW, midiInCaps,
+              UINT,  sMidiInCaps )
 {
   dprintf(("WINMM:midiInGetDevCapsA(%u)\n", uDeviceId ));
@@ -237,5 +253,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInGetErrorTextA( MMRESULT wError, LPSTR lpText, UINT cchText )
+ODINFUNCTION3(MMRESULT, midiInGetErrorTextA,
+              MMRESULT, wError,
+              LPSTR, lpText,
+              UINT, cchText)
 {
   dprintf(("WINMM:midiInGetErrorTextA(%d)\n", wError ));
@@ -253,5 +272,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInGetErrorTextW( MMRESULT wError, LPWSTR lpText, UINT cchText )
+ODINFUNCTION3(MMRESULT, midiInGetErrorTextW,
+              MMRESULT, wError,
+              LPWSTR, lpText,
+              UINT, cchText)
 {
   dprintf(("WINMM:midiInGetErrorTextW(%d)\n", wError ));
@@ -269,5 +291,7 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInGetID( HMIDIIN hMidiIn, LPUINT puDeviceID )
+ODINFUNCTION2(MMRESULT, midiInGetID,
+              HMIDIIN, hMidiIn,
+              LPUINT, puDeviceID)
 {
   dprintf(("WINMM:midiInGetID\n" ));
@@ -286,5 +310,9 @@
 
 /******************************************************************************/
-UINT WIN32API midiInMessage( HMIDIIN hmi, UINT msg, DWORD dw1, DWORD dw2 )
+ODINFUNCTION4(UINT, midiInMessage,
+              HMIDIIN, hmi,
+              UINT, msg,
+              DWORD, dw1,
+              DWORD, dw2)
 {
   dprintf(("WINMM:midiInMessage -- not Implemented\n" ));
@@ -293,17 +321,17 @@
 
 /******************************************************************************/
-UINT WIN32API midiInGetNumDevs( void )
+ODINFUNCTION0(UINT, midiInGetNumDevs)
 {
   UINT i = IRTMIDI->numInInstances();
-  dprintf(("WINMM:midiInGetNumDevs - returning %u\n", i ));
   return i;
 }
 
 /******************************************************************************/
-MMRESULT WIN32API midiInOpen( LPHMIDIIN lphMidiIn,
-                              UINT uDeviceId,
-                              DWORD dwCallback,
-                              DWORD dwCallbackInstance,
-                              DWORD dwflags )
+ODINFUNCTION5(MMRESULT, midiInOpen,
+              LPHMIDIIN, lphMidiIn,
+              UINT, uDeviceId,
+              DWORD, dwCallback,
+              DWORD, dwCallbackInstance,
+              DWORD, dwflags)
 {
   dprintf(("WINMM:midiInOpen(%d) --  partial Implementation\n", uDeviceId ));
@@ -326,7 +354,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInPrepareHeader( HMIDIIN hMidiIn,
-                                       LPMIDIHDR lpMidiInHdr,
-                                       UINT cbMidiInHdr )
+ODINFUNCTION3(MMRESULT, midiInPrepareHeader,
+              HMIDIIN, hMidiIn,
+              LPMIDIHDR, lpMidiInHdr,
+              UINT, cbMidiInHdr)
 {
   dprintf(("WINMM:midiInPrepareHeader -- not Implemented\n" ));
@@ -344,5 +373,6 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInReset( HMIDIIN hMidiIn )
+ODINFUNCTION1(MMRESULT, midiInReset,
+              HMIDIIN, hMidiIn)
 {
   dprintf(("WINMM:midiInReset -- not Implemented\n" ));
@@ -359,5 +389,6 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInStart( HMIDIIN hMidiIn )
+ODINFUNCTION1(MMRESULT, midiInStart,
+              HMIDIIN, hMidiIn)
 {
   dprintf(("WINMM:midiInStart\n" ));
@@ -374,5 +405,6 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInStop( HMIDIIN hMidiIn )
+ODINFUNCTION1(MMRESULT, midiInStop,
+              HMIDIIN, hMidiIn)
 {
   dprintf(("WINMM:midiInStop\n" ));
@@ -389,7 +421,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiInUnprepareHeader( HMIDIIN hMidiIn,
-                                         LPMIDIHDR lpMidiInHdr,
-                                         UINT cbMidiInHdr )
+ODINFUNCTION3(MMRESULT, midiInUnprepareHeader,
+              HMIDIIN, hMidiIn,
+              LPMIDIHDR, lpMidiInHdr,
+              UINT, cbMidiInHdr)
 {
   dprintf(("WINMM:midiInUnPrepareHeader -- not Implemented\n" ));
@@ -406,8 +439,9 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutCacheDrumPatches( HMIDIOUT hMidiOut,
-                                           UINT wPatch,
-                                           WORD * lpKeyArray,
-                                           UINT wFlags )
+ODINFUNCTION4(MMRESULT, midiOutCacheDrumPatches,
+              HMIDIOUT, hMidiOut,
+              UINT, wPatch,
+              WORD *, lpKeyArray,
+              UINT, wFlags)
 {
   // Valid only for an Internal synth.  So we won't do it for now.
@@ -425,8 +459,9 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutCachePatches( HMIDIOUT hMidiOut,
-                                       UINT wBank,
-                                       WORD * lpPatchArray,
-                                       UINT wFlags )
+ODINFUNCTION4(MMRESULT, midiOutCachePatches,
+              HMIDIOUT, hMidiOut,
+              UINT, wBank,
+              WORD *, lpPatchArray,
+              UINT, wFlags)
 {
   // Valid only for an Internal synth.  So we won't do it for now.
@@ -444,5 +479,6 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutClose( HMIDIOUT hMidiOut )
+ODINFUNCTION1(MMRESULT, midiOutClose,
+              HMIDIOUT, hMidiOut)
 {
   dprintf(("WINMM:midiOutClose - partially implemented\n" ));
@@ -461,7 +497,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutGetDevCapsA( UINT uDeviceId,      // Device # or handle
-                                      LPMIDIOUTCAPSA midiOutCaps,   // structure to fill in
-                                      UINT  sMidiOutCaps ) // Length of structure
+ODINFUNCTION3(MMRESULT, midiOutGetDevCapsA,
+              UINT, uDeviceId,
+              LPMIDIOUTCAPSA, midiOutCaps,
+              UINT,  sMidiOutCaps )
 {
   // TODO: Actually fill in the important fields
@@ -511,7 +548,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutGetDevCapsW( UINT uDeviceId,      // Device # or handle
-                                      LPMIDIOUTCAPSW midiOutCaps,   // structure to fill in
-                                      UINT  sMidiOutCaps ) // Length of structure
+ODINFUNCTION3(MMRESULT, midiOutGetDevCapsW,
+              UINT, uDeviceId,
+              LPMIDIOUTCAPSW, midiOutCaps,
+              UINT,  sMidiOutCaps )
 {
   // TODO: Actually fill in the important fields
@@ -563,5 +601,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutGetErrorTextA( MMRESULT wError, LPSTR lpText, UINT cchText )
+ODINFUNCTION3(MMRESULT, midiOutGetErrorTextA,
+              MMRESULT, wError,
+              LPSTR, lpText,
+              UINT, cchText)
 {
   dprintf(("WINMM:midiOutGetErrorTextA(%d)\n", wError ));
@@ -579,5 +620,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutGetErrorTextW( MMRESULT wError, LPWSTR lpText, UINT cchText )
+ODINFUNCTION3(MMRESULT, midiOutGetErrorTextW,
+              MMRESULT, wError,
+              LPWSTR, lpText,
+              UINT, cchText)
 {
   dprintf(("WINMM:midiOutGetErrorTextW(%d) - need to translate\n", wError ));
@@ -595,6 +639,7 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutGetID( HMIDIOUT hMidiOut,
-                                LPUINT puDeviceID )
+ODINFUNCTION2(MMRESULT, midiOutGetID,
+              HMIDIOUT, hMidiOut,
+              LPUINT, puDeviceID)
 {
   dprintf(("WINMM:midiOutGetID\n" ));
@@ -612,16 +657,15 @@
 
 /******************************************************************************/
-UINT WIN32API midiOutGetNumDevs( void )
+ODINFUNCTION0(UINT, midiOutGetNumDevs)
 {
   UINT i = IRTMIDI->numOutInstances();
-  dprintf(("WINMM:midiOutGetNumDevs - returning %u\n", i ));
   return i;
 }
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutGetVolume( HMIDIOUT hMidiOut,
-                                    LPDWORD lpdwVolume )
-{
-  dprintf(("WINMM:midiOutGetVolume\n" ));
+ODINFUNCTION2(MMRESULT, midiOutGetVolume,
+              HMIDIOUT, hMidiOut,
+              LPDWORD, lpdwVolume)
+{
   MMRESULT rc;
   MidiOut * midiOut = MidiOut::find( hMidiOut );
@@ -637,7 +681,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutLongMsg( HMIDIOUT hMidiOut,
-                                  LPMIDIHDR lpMidiOutHdr,
-                                  UINT cbMidiOutHdr )
+ODINFUNCTION3(MMRESULT, midiOutLongMsg,
+              HMIDIOUT, hMidiOut,
+              LPMIDIHDR, lpMidiOutHdr,
+              UINT, cbMidiOutHdr)
 {
   // TODO: Implement this
@@ -657,6 +702,9 @@
 
 /******************************************************************************/
-UINT WIN32API midiOutMessage( HMIDIOUT hMidiOut,
-                              UINT msg, DWORD dw1, DWORD dw2 )
+ODINFUNCTION4(UINT, midiOutMessage,
+              HMIDIOUT, hMidiOut,
+              UINT, msg,
+              DWORD, dw1,
+              DWORD, dw2)
 {
   // TODO: Need to find out wha drivers actually return.
@@ -666,9 +714,10 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutOpen( LPHMIDIOUT lphMidiOut,
-                               UINT uDeviceId,
-                               DWORD dwCallback,
-                               DWORD dwCallbackInstance,
-                               DWORD dwflags )
+ODINFUNCTION5(MMRESULT, midiOutOpen,
+              LPHMIDIOUT, lphMidiOut,
+              UINT, uDeviceId,
+              DWORD, dwCallback,
+              DWORD, dwCallbackInstance,
+              DWORD, dwflags)
 {
   // TODO: - Handle thread callback, if any program really needs it
@@ -706,7 +755,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutPrepareHeader( HMIDIOUT hMidiOut,
-                                        LPMIDIHDR lpMidiOutHdr,
-                                        UINT cbMidiOutHdr )
+ODINFUNCTION3(MMRESULT, midiOutPrepareHeader,
+              HMIDIOUT, hMidiOut,
+              LPMIDIHDR, lpMidiOutHdr,
+              UINT, cbMidiOutHdr)
 {
   // TODO: Either implement or treat as a NOOP as we may not need to "prepare"
@@ -725,5 +775,6 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutReset( HMIDIOUT hMidiOut )
+ODINFUNCTION1(MMRESULT, midiOutReset,
+              HMIDIOUT, hMidiOut)
 {
   // TODO: - return pending output buffers to callback
@@ -743,6 +794,7 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutSetVolume( HMIDIOUT hMidiOut,
-                                    DWORD dwVolume )
+ODINFUNCTION2(MMRESULT, midiOutSetVolume,
+              HMIDIOUT, hMidiOut,
+              DWORD, dwVolume)
 {
   dprintf(("WINMM:midiOutSetVolume\n" ));
@@ -760,6 +812,7 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutShortMsg( HMIDIOUT hMidiOut,
-                                   DWORD dwMsg )
+ODINFUNCTION2(MMRESULT, midiOutShortMsg,
+              HMIDIOUT, hMidiOut,
+              DWORD, dwMsg)
 {
   dprintf(("WINMM:midiOutShortMsg(%X)\n", dwMsg ));
@@ -777,7 +830,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiOutUnprepareHeader( HMIDIOUT hMidiOut,
-                                          LPMIDIHDR lpMidiOutHdr,
-                                          UINT cbMidiOutHdr )
+ODINFUNCTION3(MMRESULT, midiOutUnprepareHeader,
+              HMIDIOUT, hMidiOut,
+              LPMIDIHDR, lpMidiOutHdr,
+              UINT, cbMidiOutHdr)
 {
   // TODO: - return MIDIERR_STILLPLAYING if buffer is playing
@@ -1147,2 +1201,3 @@
 }
 
+
Index: trunk/src/winmm/midistrm.cpp
===================================================================
--- trunk/src/winmm/midistrm.cpp	(revision 587)
+++ trunk/src/winmm/midistrm.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: midistrm.cpp,v 1.3 1999-06-10 16:24:34 phaller Exp $ */
+/* $Id: midistrm.cpp,v 1.4 1999-08-19 18:46:04 phaller Exp $ */
 
 /*
@@ -10,6 +10,13 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
 #include <mmsystem.h>
+#include <odinwrap.h>
 #include "midi.hpp"
 #include <process.h>
@@ -18,6 +25,11 @@
 #include <unicode.h>
 
+
+ODINDEBUGCHANNEL(WINMM-MIDISTRM)
+
+
 /******************************************************************************/
-MMRESULT WIN32API midiStreamClose(HMIDISTRM hms)
+ODINFUNCTION1(MMRESULT, midiStreamClose,
+              HMIDISTRM, hms)
 {
   dprintf(("WINMM:midiStreamClose - stub\n" ));
@@ -28,10 +40,11 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiStreamOpen(LPHMIDISTRM phms,
-                                 LPUINT puDeviceID,
-                                 DWORD cMidi,
-                                 DWORD dwCallback,
-                                 DWORD dwInstance,
-                                 DWORD fdwOpen)
+ODINFUNCTION6(MMRESULT, midiStreamOpen,
+              LPHMIDISTRM, phms,
+              LPUINT, puDeviceID,
+              DWORD, cMidi,
+              DWORD, dwCallback,
+              DWORD, dwInstance,
+              DWORD, fdwOpen)
 {
   dprintf(("WINMM:midiStreamOpen - stub\n" ));
@@ -42,5 +55,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiStreamProperty(HMIDISTRM hms, LPBYTE lppropdata, DWORD dwProperty)
+ODINFUNCTION3(MMRESULT, midiStreamProperty,
+              HMIDISTRM, hms,
+              LPBYTE, lppropdata,
+              DWORD, dwProperty)
 {
   dprintf(("WINMM:midiStreamProperty - stub\n" ));
@@ -51,5 +67,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiStreamPosition(HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt)
+ODINFUNCTION3(MMRESULT, midiStreamPosition,
+              HMIDISTRM, hms,
+              LPMMTIME, lpmmt,
+              UINT, cbmmt)
 {
   dprintf(("WINMM:midiStreamPosition - stub\n" ));
@@ -60,5 +79,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiStreamOut(HMIDISTRM hms, LPMIDIHDR pmh, UINT cbmh)
+ODINFUNCTION3(MMRESULT, midiStreamOut,
+              HMIDISTRM, hms,
+              LPMIDIHDR, pmh,
+              UINT, cbmh)
 {
   dprintf(("WINMM:midiStreamOut - stub\n" ));
@@ -69,5 +91,6 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiStreamPause(HMIDISTRM hms)
+ODINFUNCTION1(MMRESULT, midiStreamPause,
+              HMIDISTRM, hms)
 {
   dprintf(("WINMM:midiStreamPause - stub\n" ));
@@ -78,5 +101,6 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiStreamRestart(HMIDISTRM hms)
+ODINFUNCTION1(MMRESULT, midiStreamRestart,
+              HMIDISTRM, hms)
 {
   dprintf(("WINMM:midiStreamRestart - stub\n" ));
@@ -87,5 +111,6 @@
 
 /******************************************************************************/
-MMRESULT WIN32API midiStreamStop(HMIDISTRM hms)
+ODINFUNCTION1(MMRESULT, midiStreamStop,
+              HMIDISTRM, hms)
 {
   dprintf(("WINMM:midiStreamStop - stub\n" ));
@@ -94,2 +119,3 @@
   return rc;
 }
+
Index: trunk/src/winmm/mixer.cpp
===================================================================
--- trunk/src/winmm/mixer.cpp	(revision 587)
+++ trunk/src/winmm/mixer.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: mixer.cpp,v 1.3 1999-06-10 16:24:34 phaller Exp $ */
+/* $Id: mixer.cpp,v 1.4 1999-08-19 18:46:04 phaller Exp $ */
 
 /*
@@ -10,7 +10,16 @@
  *
  */
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
 #include <mmsystem.h>
+#include <odinwrap.h>
 #include <misc.h>
+
+
+ODINDEBUGCHANNEL(WINMM-MIXER)
 
 //
@@ -19,5 +28,6 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerClose( HMIXER hmx )
+ODINFUNCTION1(MMRESULT, mixerClose,
+              HMIXER, hmx)
 {
   dprintf(("WINMM:mixerClose - stub\n" ));
@@ -26,5 +36,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerGetControlDetailsA(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails)
+ODINFUNCTION3(MMRESULT, mixerGetControlDetailsA,
+              HMIXEROBJ, hmxobj,
+              LPMIXERCONTROLDETAILS, pmxcd,
+              DWORD, fdwDetails)
 {
   dprintf(("WINMM:mixerGetControlDetailsA - stub\n" ));
@@ -33,5 +46,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerGetControlDetailsW(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails)
+ODINFUNCTION3(MMRESULT, mixerGetControlDetailsW,
+              HMIXEROBJ, hmxobj,
+              LPMIXERCONTROLDETAILS, pmxcd,
+              DWORD, fdwDetails)
 {
   dprintf(("WINMM:mixerGetControlDetailsW - stub\n" ));
@@ -40,5 +56,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerGetDevCapsA( UINT uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps)
+ODINFUNCTION3(MMRESULT, mixerGetDevCapsA,
+              UINT, uMxId,
+              LPMIXERCAPSA, pmxcaps,
+              UINT, cbmxcaps)
 {
   dprintf(("WINMM:mixerGetDevCapsA(%d) -stub\n", uMxId ));
@@ -47,5 +66,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerGetLineControlsA(HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls)
+ODINFUNCTION3(MMRESULT, mixerGetLineControlsA,
+              HMIXEROBJ, hmxobj,
+              LPMIXERLINECONTROLSA, pmxlc,
+              DWORD, fdwControls)
 {
   dprintf(("WINMM:mixerGetGetLineControlsA - stub\n" ));
@@ -54,5 +76,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerGetLineControlsW(HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls)
+ODINFUNCTION3(MMRESULT, mixerGetLineControlsW,
+              HMIXEROBJ, hmxobj,
+              LPMIXERLINECONTROLSW, pmxlc,
+              DWORD, fdwControls)
 {
   dprintf(("WINMM:mixerGetGetLineControlsW - stub\n" ));
@@ -61,5 +86,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerGetDevCapsW( UINT uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps)
+ODINFUNCTION3(MMRESULT, mixerGetDevCapsW,
+              UINT, uMxId,
+              LPMIXERCAPSW, pmxcaps,
+              UINT, cbmxcaps)
 {
   dprintf(("WINMM:mixerGetDevCapsW(%u) - stub\n", uMxId ));
@@ -68,5 +96,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerGetID( HMIXEROBJ hmxobj, UINT *puMxId, DWORD fdwId)
+ODINFUNCTION3(MMRESULT, mixerGetID,
+              HMIXEROBJ, hmxobj,
+              UINT *, puMxId,
+              DWORD, fdwId)
 {
   dprintf(("WINMM:mixerGetID - stub\n" ));
@@ -75,5 +106,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerGetLineInfoA(HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo)
+ODINFUNCTION3(MMRESULT, mixerGetLineInfoA,
+              HMIXEROBJ, hmxobj,
+              LPMIXERLINEA, pmxl,
+              DWORD, fdwInfo)
 {
   dprintf(("WINMM:mixerGetLineInfoA - stub\n" ));
@@ -82,5 +116,8 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerGetLineInfoW(HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo)
+ODINFUNCTION3(MMRESULT, mixerGetLineInfoW,
+              HMIXEROBJ, hmxobj,
+              LPMIXERLINEW, pmxl,
+              DWORD, fdwInfo)
 {
   dprintf(("WINMM:mixerGetLineInfoW - stub\n" ));
@@ -89,5 +126,9 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerMessage( HMIXER hmx, UINT uMsg, DWORD dwParam1, DWORD dwParam2)
+ODINFUNCTION4(MMRESULT, mixerMessage,
+              HMIXER, hmx,
+              UINT, uMsg,
+              DWORD, dwParam1,
+              DWORD, dwParam2)
 {
   dprintf(("WINMM:mixerMessage - stub\n" ));
@@ -96,5 +137,5 @@
 
 /******************************************************************************/
-UINT WIN32API mixerGetNumDevs( void )
+ODINFUNCTION0(UINT, mixerGetNumDevs)
 {
   dprintf(("WINMM:mixerGetNumDevs - returning 0\n"));
@@ -103,5 +144,10 @@
 
 /******************************************************************************/
-MMRESULT WIN32API mixerOpen( LPHMIXER phmx, UINT uMxId, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen)
+ODINFUNCTION5(MMRESULT, mixerOpen,
+              LPHMIXER, phmx,
+              UINT, uMxId,
+              DWORD, dwCallback,
+              DWORD, dwInstance,
+              DWORD, fdwOpen)
 {
   dprintf(("WINMM:mixerOpen(%d) - stub\n", uMxId ));
@@ -109,5 +155,8 @@
 }
 
-MMRESULT WIN32API mixerSetControlDetails(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails)
+ODINFUNCTION3(MMRESULT, mixerSetControlDetails,
+              HMIXEROBJ, hmxobj,
+              LPMIXERCONTROLDETAILS, pmxcd,
+              DWORD, fdwDetails)
 {
   dprintf(("WINMM:mixerSetControlDetails - stub\n" ));
@@ -115,2 +164,3 @@
 }
 
+
Index: trunk/src/winmm/mmio.cpp
===================================================================
--- trunk/src/winmm/mmio.cpp	(revision 587)
+++ trunk/src/winmm/mmio.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: mmio.cpp,v 1.3 1999-06-10 16:24:34 phaller Exp $ */
+/* $Id: mmio.cpp,v 1.4 1999-08-19 18:46:05 phaller Exp $ */
 
 /*
@@ -10,7 +10,13 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
 #include <mmsystem.h>
-
+#include <odinwrap.h>
 #include <string.h>
 #include <misc.h>
@@ -20,5 +26,11 @@
 
 
-MMRESULT WIN32API mmioAdvance(HMMIO hmmio, LPMMIOINFO lpmmioinfo, UINT fuOperation)
+ODINDEBUGCHANNEL(WINMM-MMIO)
+
+
+ODINFUNCTION3(MMRESULT, mmioAdvance,
+              HMMIO, hmmio,
+              LPMMIOINFO, lpmmioinfo,
+              UINT, fuOperation)
 {
   dprintf(("WINMM:mmioAdvance - stub\n"));
@@ -26,5 +38,8 @@
 }
 
-MMRESULT WIN32API mmioAscend(HMMIO hmmio, LPMMCKINFO lpmmcki, UINT uReserved)
+ODINFUNCTION3(MMRESULT, mmioAscend,
+              HMMIO, hmmio,
+              LPMMCKINFO, lpmmcki,
+              UINT, uReserved)
 {
   dprintf(("WINMM:mmioAscend - stub\n"));
@@ -32,5 +47,7 @@
 }
 
-MMRESULT WIN32API mmioClose(HMMIO hmmio, UINT fuOption)
+ODINFUNCTION2(MMRESULT, mmioClose,
+              HMMIO, hmmio,
+              UINT, fuOption)
 {
   dprintf(("WINMM:mmioClose - stub\n"));
@@ -43,5 +60,8 @@
 //UINT fuOptions;       /* chunk creation options       */
 /******************************************************************************/
-MMRESULT WIN32API mmioCreateChunk(HMMIO hmmio, LPMMCKINFO lpmmcki, UINT fuOptions)
+ODINFUNCTION3(MMRESULT, mmioCreateChunk,
+              HMMIO, hmmio,
+              LPMMCKINFO, lpmmcki,
+              UINT, fuOptions)
 {
     dprintf(("WINMM:mmioCreateChunk - stub\n"));
@@ -55,6 +75,9 @@
 //UINT fuSearch;        /* search-option flags  */
 /******************************************************************************/
-MMRESULT WIN32API mmioDescend(HMMIO hmmio, LPMMCKINFO lpmmcki,
-                              const MMCKINFO *lpmmckiParent, UINT fuSearch)
+ODINFUNCTION4(MMRESULT, mmioDescend,
+              HMMIO, hmmio,
+              LPMMCKINFO, lpmmcki,
+              const MMCKINFO *, lpmmckiParent,
+              UINT, fuSearch)
 {
     dprintf(("WINMM:mmioDescend - stub\n"));
@@ -62,5 +85,7 @@
 }
 
-MMRESULT WIN32API mmioFlush(HMMIO hmmio, UINT fuFlush)
+ODINFUNCTION2(MMRESULT, mmioFlush,
+              HMMIO, hmmio,
+              UINT, fuFlush)
 {
   dprintf(("WINMM:mmioFlush - stub\n"));
@@ -68,5 +93,8 @@
 }
 
-MMRESULT WIN32API mmioGetInfo(HMMIO hmmio, LPMMIOINFO lpmmioinfo, UINT uReserved)
+ODINFUNCTION3(MMRESULT, mmioGetInfo,
+              HMMIO, hmmio,
+              LPMMIOINFO, lpmmioinfo,
+              UINT, uReserved)
 {
   dprintf(("WINMM:mmioGetInfo - stub\n"));
@@ -76,5 +104,8 @@
 //   mmioInstallIOProc16        = _mmioInstallIOProc16@??     @120
 
-LPMMIOPROC WIN32API mmioInstallIOProcA(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
+ODINFUNCTION3(LPMMIOPROC, mmioInstallIOProcA,
+              FOURCC, fccIOProc,
+              LPMMIOPROC, pIOProc,
+              DWORD, dwFlags)
 {
   dprintf(("WINMM:mmioInstallIOProcA - stub\n"));
@@ -82,5 +113,8 @@
 }
 
-LPMMIOPROC WIN32API mmioInstallIOProcW(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
+ODINFUNCTION3(LPMMIOPROC, mmioInstallIOProcW,
+              FOURCC, fccIOProc,
+              LPMMIOPROC, pIOProc,
+              DWORD, dwFlags)
 {
   dprintf(("WINMM:mmioInstallIOProcW - stub\n"));
@@ -92,5 +126,8 @@
 //TODO: Not implemented
 /******************************************************************************/
-HMMIO WIN32API mmioOpenA(LPTSTR lpszFilename, LPMMIOINFO lpmmioinfo, DWORD fdwOpen)
+ODINFUNCTION3(HMMIO, mmioOpenA,
+              LPTSTR, lpszFilename,
+              LPMMIOINFO, lpmmioinfo,
+              DWORD, fdwOpen)
 {
   dprintf(("WINMM:mmioOpenA %s - stub\n", lpszFilename));
@@ -98,5 +135,8 @@
 }
 
-HMMIO WIN32API mmioOpenW(LPWSTR lpszFilename, LPMMIOINFO lpmmioinfo, DWORD fdwOpen)
+ODINFUNCTION3(HMMIO, mmioOpenW,
+              LPWSTR, lpszFilename,
+              LPMMIOINFO, lpmmioinfo,
+              DWORD, fdwOpen)
 {
   dprintf(("WINMM:mmioOpenW - stub\n"));
@@ -104,5 +144,8 @@
 }
 
-LONG WIN32API mmioRead(HMMIO hmmio, HPSTR pch, LONG cbRead)
+ODINFUNCTION3(LONG, mmioRead,
+              HMMIO, hmmio,
+              HPSTR, pch,
+              LONG, cbRead)
 {
   dprintf(("WINMM:mmioRead - stub\n"));
@@ -110,5 +153,9 @@
 }
 
-MMRESULT WIN32API mmioRenameA(LPCSTR pszFileName, LPCSTR pszNewFileName, LPMMIOINFO pmmioinfo, DWORD fdwRename)
+ODINFUNCTION4(MMRESULT, mmioRenameA,
+              LPCSTR, pszFileName,
+              LPCSTR, pszNewFileName,
+              LPMMIOINFO, pmmioinfo,
+              DWORD, fdwRename)
 {
   dprintf(("WINMM:mmioRenameA - stub\n"));
@@ -116,5 +163,9 @@
 }
 
-MMRESULT WIN32API mmioRenameW(LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPMMIOINFO pmmioinfo, DWORD fdwRename)
+ODINFUNCTION4(MMRESULT, mmioRenameW,
+              LPCWSTR, pszFileName,
+              LPCWSTR, pszNewFileName,
+              LPMMIOINFO, pmmioinfo,
+              DWORD, fdwRename)
 {
   dprintf(("WINMM:mmioRenameW - stub\n"));
@@ -122,5 +173,8 @@
 }
 
-LONG WIN32API mmioSeek(HMMIO hmmio, LONG lOffset, int nOrigin)
+ODINFUNCTION3(LONG, mmioSeek,
+              HMMIO, hmmio,
+              LONG, lOffset,
+              int, nOrigin)
 {
   dprintf(("WINMM:mmioSeek - stub\n"));
@@ -128,5 +182,9 @@
 }
 
-LRESULT WIN32API mmioSendMessage(HMMIO hmmio, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
+ODINFUNCTION4(LRESULT, mmioSendMessage,
+              HMMIO, hmmio,
+              UINT, uMsg,
+              LPARAM, lParam1,
+              LPARAM, lParam2)
 {
   dprintf(("WINMM:mmioSendMessage - stub\n"));
@@ -140,5 +198,8 @@
 }
 
-MMRESULT WIN32API mmioSetInfo(HMMIO hmmio, const MMIOINFO *lpmmioinfo, UINT uReserved)
+ODINFUNCTION3(MMRESULT, mmioSetInfo,
+              HMMIO, hmmio,
+              const MMIOINFO *, lpmmioinfo,
+              UINT, uReserved)
 {
   dprintf(("WINMM:mmioSetInfo - stub\n"));
@@ -148,11 +209,12 @@
 
 /*****************************************************************************
- * Name      : FOURCC WIN32API OS2mmioStringToFOURCCA
- * Purpose   : Converts a null-terminated string to a four-character code
+ODINFUNCTION2(*, :,
+              FOURCC, WIN32API,
+              OS2mmioStringToFOURCCA *, Purpose: Converts a null-terminated string to a four-character code
  * Parameters: LPTSTR sz
  *             UINT    wFlags
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    :
  *
@@ -160,17 +222,18 @@
  *****************************************************************************/
 
-FOURCC WIN32API mmioStringToFOURCCA(LPCSTR sz,
-                                    UINT   wFlags)
+ODINFUNCTION2(FOURCC, mmioStringToFOURCCA,
+              LPCSTR, sz,
+              UINT, wFlags)
 {
   union
   {
-    ULONG ulFourcc; 
+    ULONG ulFourcc;
     UCHAR ucFourcc[5];
   } unFourcc;
 
-  unFourcc.ucFourcc[0] = sz[0];  
-  unFourcc.ucFourcc[1] = sz[1];  
-  unFourcc.ucFourcc[2] = sz[2];  
-  unFourcc.ucFourcc[3] = sz[3];  
+  unFourcc.ucFourcc[0] = sz[0];
+  unFourcc.ucFourcc[1] = sz[1];
+  unFourcc.ucFourcc[2] = sz[2];
+  unFourcc.ucFourcc[3] = sz[3];
   unFourcc.ucFourcc[4] = 0;     /* string termination */
 
@@ -187,11 +250,12 @@
 
 /*****************************************************************************
- * Name      : FOURCC WIN32API mmioStringToFOURCCW
- * Purpose   : Converts a null-terminated string to a four-character code
+ODINFUNCTION2(*, :,
+              FOURCC, WIN32API,
+              mmioStringToFOURCCW *, Purpose: Converts a null-terminated string to a four-character code
  * Parameters: LPWSTR sz
  *             UINT    wFlags
  * Variables :
  * Result    :
- * Remark    : 
+ * Remark    :
  * Status    :
  *
@@ -199,10 +263,11 @@
  *****************************************************************************/
 
-FOURCC WIN32API mmioStringToFOURCCW(LPCWSTR sz,
-                                    UINT   wFlags)
+ODINFUNCTION2(FOURCC, mmioStringToFOURCCW,
+              LPCWSTR, sz,
+              UINT, wFlags)
 {
   union
   {
-    ULONG ulFourcc; 
+    ULONG ulFourcc;
     UCHAR ucFourcc[5];
   } unFourcc;
@@ -210,18 +275,18 @@
   LPSTR pszAscii;                                   /* pointer to ASCII string */
   UCHAR ucBuffer[5];                                    /* buffer for FOURCC */
-  
+
   pszAscii = UnicodeToAsciiString((LPWSTR)sz);
-  
+
   strncpy ( (LPSTR) ucBuffer,
            pszAscii,
            sizeof (ucBuffer) );
-  
+
   FreeAsciiString(pszAscii);
-  
-
-  unFourcc.ucFourcc[0] = ucBuffer[0];  
-  unFourcc.ucFourcc[1] = ucBuffer[1];  
-  unFourcc.ucFourcc[2] = ucBuffer[2];  
-  unFourcc.ucFourcc[3] = ucBuffer[3];  
+
+
+  unFourcc.ucFourcc[0] = ucBuffer[0];
+  unFourcc.ucFourcc[1] = ucBuffer[1];
+  unFourcc.ucFourcc[2] = ucBuffer[2];
+  unFourcc.ucFourcc[3] = ucBuffer[3];
   unFourcc.ucFourcc[4] = 0;                            /* string termination */
 
@@ -232,5 +297,5 @@
            sz,
            wFlags));
-  
+
   return unFourcc.ulFourcc; /* return FOURCC */
 }
@@ -240,7 +305,11 @@
 //TODO: Not implemented
 /******************************************************************************/
-LONG WIN32API mmioWrite(HMMIO hmmio, const char *ch, LONG cbWrite)
+ODINFUNCTION3(LONG, mmioWrite,
+              HMMIO, hmmio,
+              const char *, ch,
+              LONG, cbWrite)
 {
   dprintf(("WINMM:mmioWrite - stub\n"));
   return 0;
 }
+
Index: trunk/src/winmm/os2timer.cpp
===================================================================
--- trunk/src/winmm/os2timer.cpp	(revision 587)
+++ trunk/src/winmm/os2timer.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: os2timer.cpp,v 1.4 1999-06-19 10:54:48 sandervl Exp $ */
+/* $Id: os2timer.cpp,v 1.5 1999-08-19 18:46:05 phaller Exp $ */
 
 /*
@@ -9,8 +9,14 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #define INCL_DOSPROCESS
 #define INCL_DOSDATETIME
 #define INCL_DOSSEMAPHORES
-#include <os2wrap.h>	//Odin32 OS/2 api wrappers
+#include <os2wrap.h>      //Odin32 OS/2 api wrappers
 #include <process.h>
 #include "win32type.h"
@@ -19,5 +25,7 @@
 #include "misc.h"
 
+
 static void _Optlink TimerHlpHandler(void *);
+
 
 /******************************************************************************/
@@ -154,2 +162,3 @@
 OS2Timer *OS2Timer::timers      = NULL;
 int       OS2Timer::timerPeriod = 0;
+
Index: trunk/src/winmm/playsound.cpp
===================================================================
--- trunk/src/winmm/playsound.cpp	(revision 587)
+++ trunk/src/winmm/playsound.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: playsound.cpp,v 1.3 1999-06-19 10:54:48 sandervl Exp $ */
+/* $Id: playsound.cpp,v 1.4 1999-08-19 18:46:05 phaller Exp $ */
 
 /*
@@ -10,11 +10,20 @@
  *
  */
-#include <os2wrap.h>	//Odin32 OS/2 api wrappers
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
+#include <os2wrap.h>       //Odin32 OS/2 api wrappers
+#include <odinwrap.h>
 #include "win32type.h"
 #include "misc.h"
 
+ODINDEBUGCHANNEL(WINMM-PLAYSOUND)
+
+
 /*****************************************************************************
- * Name      : BOOL WIN32API PlaySound
- * Purpose   : Plays a sound specified by the given filename, resource, or
+ *             Plays a sound specified by the given filename, resource, or
  *             system event.
  * Parameters: LPCSTR  pszSound
@@ -28,12 +37,17 @@
  * Author    : Patrick Haller [Tue, 1998/05/05 10:44]
  *****************************************************************************/
-BOOL WIN32API PlaySoundA(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound )
+
+ODINFUNCTION3(BOOL, PlaySoundA,
+              LPCSTR, pszSound,
+              HMODULE, hmod,
+              DWORD, fdwSound)
 {
   dprintf(("WINMM:PlaySoundA not implemented\n"));
   return(FALSE);
 }
+
+
 /*****************************************************************************
- * Name      : BOOL WIN32API PlaySoundW
- * Purpose   : Plays a sound specified by the given filename, resource, or
+ *             Plays a sound specified by the given filename, resource, or
  *             system event.
  * Parameters: LPCSTR  pszSound
@@ -47,23 +61,55 @@
  * Author    : Patrick Haller [Tue, 1998/05/05 10:44]
  *****************************************************************************/
-BOOL WIN32API PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound )
+
+ODINFUNCTION3(BOOL, PlaySoundW,
+              LPCWSTR, pszSound,
+              HMODULE, hmod,
+              DWORD, fdwSound)
 {
   dprintf(("WINMM:PlaySoundW not implemented\n"));
   return(FALSE);
 }
-/******************************************************************************/
-/******************************************************************************/
-BOOL WIN32API sndPlaySoundA(LPCSTR pszSound, UINT fuSound)
+
+
+/*****************************************************************************
+ *             Plays a sound specified by the given filename
+ * Parameters: LPCSTR  pszSound
+ *             UINT    fuSound
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
+ *
+ * Author    : Patrick Haller [Tue, 1998/05/05 10:44]
+ *****************************************************************************/
+
+ODINFUNCTION2(BOOL, sndPlaySoundA,
+              LPCSTR, pszSound,
+              UINT, fuSound)
 {
   dprintf(("WINMM:sndPlaySoundA not implemented\n"));
   return(FALSE);
 }
-/******************************************************************************/
-/******************************************************************************/
-BOOL WIN32API sndPlaySoundW(LPCWSTR pszSound, UINT fuSound)
+
+
+/*****************************************************************************
+ *             Plays a sound specified by the given filename
+ * Parameters: LPCWSTR  pszSound
+ *             HMODULE  hMod
+ *             DWORD    fdwSound
+ * Variables :
+ * Result    :
+ * Remark    :
+ * Status    :
+ *
+ * Author    : Patrick Haller [Tue, 1998/05/05 10:44]
+ *****************************************************************************/
+
+ODINFUNCTION2(BOOL, sndPlaySoundW,
+              LPCWSTR, pszSound,
+              UINT, fuSound)
 {
   dprintf(("WINMM:sndPlaySoundW not implemented\n"));
   return(FALSE);
 }
-/******************************************************************************/
-/******************************************************************************/
+
Index: trunk/src/winmm/timegettime.cpp
===================================================================
--- trunk/src/winmm/timegettime.cpp	(revision 587)
+++ trunk/src/winmm/timegettime.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: timegettime.cpp,v 1.2 1999-06-10 16:24:34 phaller Exp $ */
+/* $Id: timegettime.cpp,v 1.3 1999-08-19 18:46:05 phaller Exp $ */
 
 /*
@@ -6,15 +6,22 @@
  *
  */
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
+#include <odinwrap.h>
+
+
+ODINDEBUGCHANNEL(WINMM-TIMEGETTIME)
 
 /******************************************************************************/
 /******************************************************************************/
-DWORD WIN32API timeGetTime(void)
+ODINFUNCTION0(DWORD, timeGetTime)
 {
-#ifdef DEBUG
-////    WriteLog("WINMM:timeGetTime\n");
-#endif
-    return O32_timeGetTime();
+  return O32_timeGetTime();
 }
 /******************************************************************************/
 /******************************************************************************/
+
Index: trunk/src/winmm/wavein.cpp
===================================================================
--- trunk/src/winmm/wavein.cpp	(revision 587)
+++ trunk/src/winmm/wavein.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: wavein.cpp,v 1.3 1999-06-10 16:24:35 phaller Exp $ */
+/* $Id: wavein.cpp,v 1.4 1999-08-19 18:46:05 phaller Exp $ */
 
 /*
@@ -10,10 +10,15 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
 #include <mmsystem.h>
-
+#include <odinwrap.h>
 #include <stdio.h>
 #include <string.h>
-
 #include <misc.h>
 #include <unicode.h>
@@ -22,6 +27,11 @@
 
 
+ODINDEBUGCHANNEL(WINMM-WAVEIN)
+
 // All stubs for now
-MMRESULT WIN32API waveInAddBuffer(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh)
+ODINFUNCTION3(MMRESULT, waveInAddBuffer,
+              HWAVEIN, hwi,
+              LPWAVEHDR, pwh,
+              UINT, cbwh)
 {
   dprintf(("WINMM:waveInAddBuffer - stub\n"));
@@ -29,5 +39,6 @@
 }
 
-MMRESULT WIN32API waveInClose(HWAVEIN hwi)
+ODINFUNCTION1(MMRESULT, waveInClose,
+              HWAVEIN, hwi)
 {
   dprintf(("WINMM:waveInClose - stub\n"));
@@ -35,5 +46,8 @@
 }
 
-MMRESULT WIN32API waveInGetDevCapsA(UINT uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic)
+ODINFUNCTION3(MMRESULT, waveInGetDevCapsA,
+              UINT, uDeviceID,
+              LPWAVEINCAPSA, pwic,
+              UINT, cbwic)
 {
   dprintf(("WINMM:waveInGetDevCapsA(%d) - stub\n", uDeviceID ));
@@ -41,5 +55,8 @@
 }
 
-MMRESULT WIN32API waveInGetDevCapsW(UINT uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic)
+ODINFUNCTION3(MMRESULT, waveInGetDevCapsW,
+              UINT, uDeviceID,
+              LPWAVEINCAPSW, pwic,
+              UINT, cbwic)
 {
   dprintf(("WINMM:waveInGetDevCapsW(%d) - stub\n", uDeviceID ));
@@ -47,5 +64,8 @@
 }
 
-MMRESULT WIN32API waveInGetErrorTextA(MMRESULT wError, LPSTR lpText, UINT cchText)
+ODINFUNCTION3(MMRESULT, waveInGetErrorTextA,
+              MMRESULT, wError,
+              LPSTR, lpText,
+              UINT, cchText)
 {
   dprintf(("WINMM:waveInGetErrorTextA(%d)\n", wError ));
@@ -62,5 +82,8 @@
 }
 
-MMRESULT WIN32API waveInGetErrorTextW(MMRESULT wError, LPWSTR lpText, UINT cchText)
+ODINFUNCTION3(MMRESULT, waveInGetErrorTextW,
+              MMRESULT, wError,
+              LPWSTR, lpText,
+              UINT, cchText)
 {
   dprintf(("WINMM:waveInGetErrorTextW(%d) - stub\n", wError ));
@@ -77,5 +100,7 @@
 }
 
-MMRESULT WIN32API waveInGetID(HWAVEIN hwi, LPUINT puDeviceID)
+ODINFUNCTION2(MMRESULT, waveInGetID,
+              HWAVEIN, hwi,
+              LPUINT, puDeviceID)
 {
   dprintf(("WINMM:waveInGetID - stub\n"));
@@ -83,5 +108,5 @@
 }
 
-UINT WIN32API waveInGetNumDevs(void)
+ODINFUNCTION0(UINT, waveInGetNumDevs)
 {
   dprintf(("WINMM:waveInGetNumDevs - stub\n"));
@@ -89,5 +114,8 @@
 }
 
-MMRESULT WIN32API waveInGetPosition(HWAVEIN hwi, LPMMTIME pmmt, UINT cbmmt)
+ODINFUNCTION3(MMRESULT, waveInGetPosition,
+              HWAVEIN, hwi,
+              LPMMTIME, pmmt,
+              UINT, cbmmt)
 {
   dprintf(("WINMM:waveInGetPosition - stub\n"));
@@ -95,5 +123,9 @@
 }
 
-MMRESULT WIN32API waveInMessage(HWAVEIN hwi, UINT uMsg, DWORD dw1, DWORD dw2)
+ODINFUNCTION4(MMRESULT, waveInMessage,
+              HWAVEIN, hwi,
+              UINT, uMsg,
+              DWORD, dw1,
+              DWORD, dw2)
 {
   dprintf(("WINMM:waveInMessage - stub\n"));
@@ -102,7 +134,11 @@
 
 
-MMRESULT WIN32API waveInOpen(LPHWAVEIN phwi, UINT uDeviceID,
-                             const LPWAVEFORMATEX pwfx,
-                             DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen)
+ODINFUNCTION6(MMRESULT, waveInOpen,
+              LPHWAVEIN, phwi,
+              UINT, uDeviceID,
+              const LPWAVEFORMATEX, pwfx,
+              DWORD, dwCallback,
+              DWORD, dwInstance,
+              DWORD, fdwOpen)
 {
   dprintf(("WINMM:waveInOpen - stub\n"));
@@ -110,5 +146,8 @@
 }
 
-MMRESULT WIN32API waveInPrepareHeader(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh)
+ODINFUNCTION3(MMRESULT, waveInPrepareHeader,
+              HWAVEIN, hwi,
+              LPWAVEHDR, pwh,
+              UINT, cbwh)
 {
   dprintf(("WINMM:waveInPrepareHeader - stub\n"));
@@ -116,5 +155,6 @@
 }
 
-MMRESULT WIN32API waveInReset(HWAVEIN hwi)
+ODINFUNCTION1(MMRESULT, waveInReset,
+              HWAVEIN, hwi)
 {
   dprintf(("WINMM:waveInReset - stub\n"));
@@ -122,5 +162,6 @@
 }
 
-MMRESULT WIN32API waveInStart(HWAVEIN hwi)
+ODINFUNCTION1(MMRESULT, waveInStart,
+              HWAVEIN, hwi)
 {
   dprintf(("WINMM:waveInStart - stub\n"));
@@ -128,5 +169,6 @@
 }
 
-MMRESULT WIN32API waveInStop(HWAVEIN hwi)
+ODINFUNCTION1(MMRESULT, waveInStop,
+              HWAVEIN, hwi)
 {
   dprintf(("WINMM:waveInStop - stub\n"));
@@ -134,5 +176,8 @@
 }
 
-MMRESULT WIN32API waveInUnprepareHeader(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh)
+ODINFUNCTION3(MMRESULT, waveInUnprepareHeader,
+              HWAVEIN, hwi,
+              LPWAVEHDR, pwh,
+              UINT, cbwh)
 {
   dprintf(("WINMM:waveInUnprepareHeader - stub\n"));
@@ -140,2 +185,3 @@
 }
 
+
Index: trunk/src/winmm/waveout.cpp
===================================================================
--- trunk/src/winmm/waveout.cpp	(revision 587)
+++ trunk/src/winmm/waveout.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: waveout.cpp,v 1.3 1999-06-10 16:24:35 phaller Exp $ */
+/* $Id: waveout.cpp,v 1.4 1999-08-19 18:46:05 phaller Exp $ */
 
 /*
@@ -10,6 +10,13 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
 #include <mmsystem.h>
+#include <odinwrap.h>
 
 #include <string.h>
@@ -22,14 +29,18 @@
 #include "winmm.h"
 
-/******************************************************************************/
-/******************************************************************************/
-MMRESULT WIN32API waveOutOpen(LPHWAVEOUT phwo, UINT uDeviceID,
-                              const LPWAVEFORMATEX pwfx, DWORD dwCallback,
-                              DWORD dwInstance, DWORD fdwOpen)
-{
- MMRESULT rc;
-
-  dprintf(("WINMM:waveOutOpen %d %X %X\n", uDeviceID, fdwOpen, dwCallback));
-  dprintf(("WINMM:waveOutOpen = %X\n", waveOutOpen));
+ODINDEBUGCHANNEL(WINMM-WAVEOUT)
+
+
+/******************************************************************************/
+/******************************************************************************/
+ODINFUNCTION6(MMRESULT, waveOutOpen,
+              LPHWAVEOUT, phwo,
+              UINT, uDeviceID,
+              const LPWAVEFORMATEX, pwfx,
+              DWORD, dwCallback,
+              DWORD, dwInstance,
+              DWORD, fdwOpen)
+{
+  MMRESULT rc;
 
   if(pwfx == NULL)
@@ -65,143 +76,163 @@
         return(rc);
   }
-  dprintf(("WINMM:waveOutOpen success\n"));
   return(MMSYSERR_NOERROR);
 }
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API waveOutWrite(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
-{
- DartWaveOut *dwave = (DartWaveOut *)hwo;
-
-#ifdef DEBUG1
-  WriteLog("WINMM:waveOutWrite %X %d\n", pwh, cbwh);
-#endif
-  if(DartWaveOut::find(dwave) == TRUE) {
-        if(!(pwh->dwFlags & WHDR_PREPARED) || pwh->lpData == NULL)
-                return WAVERR_UNPREPARED;
-        if(pwh->dwFlags & WHDR_INQUEUE)
-                return WAVERR_STILLPLAYING;
-
-        pwh->dwFlags |= WHDR_INQUEUE;
-        pwh->dwFlags &= ~WHDR_DONE;
-
-        return(dwave->write(pwh, cbwh));
-  }
-  else  return(MMSYSERR_INVALHANDLE);
-}
-/******************************************************************************/
-/******************************************************************************/
-MMRESULT WIN32API waveOutReset(HWAVEOUT hwaveout)
-{
- DartWaveOut *dwave = (DartWaveOut *)hwaveout;
-
-  dprintf(("WINMM:waveOutReset %X\n", hwaveout));
-  if(DartWaveOut::find(dwave) == TRUE) {
-        return(dwave->reset());
-  }
-  else  return(MMSYSERR_INVALHANDLE);
-}
-/******************************************************************************/
-/******************************************************************************/
-MMRESULT WIN32API waveOutBreakLoop(HWAVEOUT hwaveout)
-{
- DartWaveOut *dwave = (DartWaveOut *)hwaveout;
+ODINFUNCTION3(MMRESULT, waveOutWrite,
+              HWAVEOUT, hwo,
+              LPWAVEHDR, pwh,
+              UINT, cbwh)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwo;
+
+  if(DartWaveOut::find(dwave) == TRUE)
+  {
+    if(!(pwh->dwFlags & WHDR_PREPARED) || pwh->lpData == NULL)
+      return WAVERR_UNPREPARED;
+
+    if(pwh->dwFlags & WHDR_INQUEUE)
+      return WAVERR_STILLPLAYING;
+
+    pwh->dwFlags |= WHDR_INQUEUE;
+    pwh->dwFlags &= ~WHDR_DONE;
+
+    return(dwave->write(pwh, cbwh));
+  }
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+/******************************************************************************/
+/******************************************************************************/
+ODINFUNCTION1(MMRESULT, waveOutReset,
+              HWAVEOUT, hwaveout)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwaveout;
+
+  if(DartWaveOut::find(dwave) == TRUE)
+    return(dwave->reset());
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+/******************************************************************************/
+/******************************************************************************/
+ODINFUNCTION1(MMRESULT, waveOutBreakLoop,
+              HWAVEOUT, hwaveout)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwaveout;
 
   dprintf(("WINMM:waveOutBreakLoop (implemented as reset) %X\n", hwaveout));
-  if(DartWaveOut::find(dwave) == TRUE) {
-        return(dwave->reset());
-  }
-  else  return(MMSYSERR_INVALHANDLE);
-}
-/******************************************************************************/
-/******************************************************************************/
-MMRESULT WIN32API waveOutClose(HWAVEOUT hwaveout)
-{
- DartWaveOut *dwave = (DartWaveOut *)hwaveout;
-
-  dprintf(("WINMM:waveOutClose %X\n", hwaveout));
-  if(DartWaveOut::find(dwave) == TRUE) {
-        if(dwave->getState() == STATE_PLAYING)
-                return(WAVERR_STILLPLAYING);
-        delete dwave;
-        return(MMSYSERR_NOERROR);
-  }
-  else  return(MMSYSERR_INVALHANDLE);
-}
-/******************************************************************************/
-/******************************************************************************/
-MMRESULT WIN32API waveOutPause(HWAVEOUT hwaveout)
-{
- DartWaveOut *dwave = (DartWaveOut *)hwaveout;
-
-  dprintf(("WINMM:waveOutPause %X\n", hwaveout));
-  if(DartWaveOut::find(dwave) == TRUE) {
-        return(dwave->pause());
-  }
-  else  return(MMSYSERR_INVALHANDLE);
-}
-/******************************************************************************/
-/******************************************************************************/
-MMRESULT WIN32API waveOutRestart(HWAVEOUT hwaveout)
-{
- DartWaveOut *dwave = (DartWaveOut *)hwaveout;
-
-  dprintf(("WINMM:waveOutRestart %X\n", hwaveout));
-  if(DartWaveOut::find(dwave) == TRUE) {
-        return(dwave->restart());
-  }
-  else  return(MMSYSERR_INVALHANDLE);
-}
-/******************************************************************************/
-/******************************************************************************/
-MMRESULT WIN32API waveOutPrepareHeader(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
-{
- DartWaveOut *dwave = (DartWaveOut *)hwo;
-
-  dprintf(("WINMM:waveOutPrepareHeader %X %d\n", pwh, cbwh));
-
-  if(DartWaveOut::find(dwave) == TRUE) {
-        if(pwh->dwFlags & WHDR_INQUEUE)
-                return WAVERR_STILLPLAYING;
-        pwh->dwFlags |= WHDR_PREPARED;
-        pwh->dwFlags &= ~WHDR_DONE;
-        pwh->lpNext   = NULL;
-        return(MMSYSERR_NOERROR);
-  }
-  else  return(MMSYSERR_INVALHANDLE);
-}
-/******************************************************************************/
-/******************************************************************************/
-MMRESULT WIN32API waveOutUnprepareHeader(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh)
-{
- DartWaveOut *dwave = (DartWaveOut *)hwo;
-
-  dprintf(("WINMM:waveOutUnprepareHeader %X %d\n", pwh, cbwh));
-  if(DartWaveOut::find(dwave) == TRUE) {
-        if(pwh->dwFlags & WHDR_INQUEUE)
-                return WAVERR_STILLPLAYING;
-
-        pwh->dwFlags &= ~WHDR_PREPARED;
-        pwh->dwFlags |= WHDR_DONE;
-        return(MMSYSERR_NOERROR);
-  }
-  else  return(MMSYSERR_INVALHANDLE);
-}
-/******************************************************************************/
-/******************************************************************************/
-MMRESULT WIN32API waveOutGetPosition(HWAVEOUT hwo, LPMMTIME pmmt, UINT cbmmt)
+  if(DartWaveOut::find(dwave) == TRUE)
+    return(dwave->reset());
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+/******************************************************************************/
+/******************************************************************************/
+ODINFUNCTION1(MMRESULT, waveOutClose,
+              HWAVEOUT, hwaveout)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwaveout;
+
+  if(DartWaveOut::find(dwave) == TRUE)
+  {
+    if(dwave->getState() == STATE_PLAYING)
+      return(WAVERR_STILLPLAYING);
+
+    delete dwave;
+    return(MMSYSERR_NOERROR);
+  }
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+/******************************************************************************/
+/******************************************************************************/
+ODINFUNCTION1(MMRESULT, waveOutPause,
+              HWAVEOUT, hwaveout)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwaveout;
+
+  if(DartWaveOut::find(dwave) == TRUE)
+    return(dwave->pause());
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+/******************************************************************************/
+/******************************************************************************/
+ODINFUNCTION1(MMRESULT, waveOutRestart,
+              HWAVEOUT, hwaveout)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwaveout;
+
+  if(DartWaveOut::find(dwave) == TRUE)
+    return(dwave->restart());
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+/******************************************************************************/
+/******************************************************************************/
+ODINFUNCTION3(MMRESULT, waveOutPrepareHeader,
+              HWAVEOUT, hwo,
+              LPWAVEHDR, pwh,
+              UINT, cbwh)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwo;
+
+  if(DartWaveOut::find(dwave) == TRUE)
+  {
+    if(pwh->dwFlags & WHDR_INQUEUE)
+      return WAVERR_STILLPLAYING;
+
+    pwh->dwFlags |= WHDR_PREPARED;
+    pwh->dwFlags &= ~WHDR_DONE;
+    pwh->lpNext   = NULL;
+    return(MMSYSERR_NOERROR);
+  }
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+/******************************************************************************/
+/******************************************************************************/
+ODINFUNCTION3(MMRESULT, waveOutUnprepareHeader,
+              HWAVEOUT, hwo,
+              LPWAVEHDR, pwh,
+              UINT, cbwh)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwo;
+
+  if(DartWaveOut::find(dwave) == TRUE)
+  {
+    if(pwh->dwFlags & WHDR_INQUEUE)
+      return WAVERR_STILLPLAYING;
+
+    pwh->dwFlags &= ~WHDR_PREPARED;
+    pwh->dwFlags |= WHDR_DONE;
+   return(MMSYSERR_NOERROR);
+  }
+  else
+   return(MMSYSERR_INVALHANDLE);
+}
+/******************************************************************************/
+/******************************************************************************/
+ODINFUNCTION3(MMRESULT, waveOutGetPosition,
+              HWAVEOUT, hwo,
+              LPMMTIME, pmmt,
+              UINT, cbmmt)
 {
   DartWaveOut *dwave = (DartWaveOut *)hwo;
   dprintf(("WINMM:waveOutGetPosition - not implemented\n"));
-  if(DartWaveOut::find(dwave) == TRUE) {
-        return(MMSYSERR_NOERROR);
-  }
-  else  return(MMSYSERR_INVALHANDLE);
-}
-/******************************************************************************/
-/******************************************************************************/
-MMRESULT WIN32API waveOutGetDevCapsA(UINT uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc)
-{
-  dprintf(("WINMM:waveOutGetDevCapsA - stub\n"));
+  if(DartWaveOut::find(dwave) == TRUE)
+    return(MMSYSERR_NOERROR);
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+/******************************************************************************/
+/******************************************************************************/
+ODINFUNCTION3(MMRESULT, waveOutGetDevCapsA,
+              UINT, uDeviceID,
+              LPWAVEOUTCAPSA, pwoc,
+              UINT, cbwoc)
+{
+  dprintf(("WINMM:waveOutGetDevCapsA - not implemented\n"));
   // we have to fill in this thing
   pwoc->wMid = 0;                  /* manufacturer ID */
@@ -224,7 +255,10 @@
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API waveOutGetDevCapsW(UINT uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc)
-{
-  dprintf(("WINMM:waveOutGetDevCapsW - stub\n"));
+ODINFUNCTION3(MMRESULT, waveOutGetDevCapsW,
+              UINT, uDeviceID,
+              LPWAVEOUTCAPSW, pwoc,
+              UINT, cbwoc)
+{
+  dprintf(("WINMM:waveOutGetDevCapsW - not implemented\n"));
   // we have to fill in this thing
   pwoc->wMid = 0;                  /* manufacturer ID */
@@ -247,14 +281,15 @@
 /******************************************************************************/
 /******************************************************************************/
-UINT WIN32API waveOutGetNumDevs(void)
-{
-  dprintf(("WINMM:waveOutGetNumDevs\n"));
+ODINFUNCTION0(UINT, waveOutGetNumDevs)
+{
   return 1;
 }
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API waveOutGetErrorTextA(MMRESULT wError, LPSTR lpText, UINT cchText)
-{
-  dprintf(("WINMM:waveOutGetErrorTextA(%d)\n", wError ));
+ODINFUNCTION3(MMRESULT, waveOutGetErrorTextA,
+              MMRESULT, wError,
+              LPSTR, lpText,
+              UINT, cchText)
+{
   char * theMsg = getWinmmMsg( wError );
   if ( theMsg )
@@ -269,7 +304,9 @@
 }
 
-MMRESULT WIN32API waveOutGetErrorTextW(MMRESULT wError, LPWSTR lpText, UINT cchText)
-{
-  dprintf(("WINMM:waveOutGetErrorTextW(%d) - stub\n", wError ));
+ODINFUNCTION3(MMRESULT, waveOutGetErrorTextW,
+              MMRESULT, wError,
+              LPWSTR, lpText,
+              UINT, cchText)
+{
   char * theMsg = getWinmmMsg( wError );
   if ( theMsg )
@@ -284,7 +321,8 @@
 }
 
-MMRESULT WIN32API waveOutGetID(HWAVEOUT hwo, LPUINT puDeviceID)
-{
-  dprintf(("WINMM:waveOutGetID" ));
+ODINFUNCTION2(MMRESULT, waveOutGetID,
+              HWAVEOUT, hwo,
+              LPUINT, puDeviceID)
+{
   DartWaveOut *dwave = (DartWaveOut *)hwo;
   if(DartWaveOut::find(dwave) == TRUE)
@@ -297,86 +335,92 @@
 }
 
-MMRESULT WIN32API waveOutGetPitch(HWAVEOUT hwo, LPDWORD pdwPitch)
-{
-  dprintf(("WINMM:waveOutGetPitch"));
-  DartWaveOut *dwave = (DartWaveOut *)hwo;
-  if(DartWaveOut::find(dwave) == TRUE)
-  {
-    return MMSYSERR_NOTSUPPORTED;
-  }
-  else
-    return(MMSYSERR_INVALHANDLE);
-}
-
-MMRESULT WIN32API waveOutSetPitch(HWAVEOUT hwo, DWORD dwPitch)
-{
-  dprintf(("WINMM:waveOutSetPitch"));
-  DartWaveOut *dwave = (DartWaveOut *)hwo;
-  if(DartWaveOut::find(dwave) == TRUE)
-  {
-    return MMSYSERR_NOTSUPPORTED;
-  }
-  else
-    return(MMSYSERR_INVALHANDLE);
-}
-
-MMRESULT WIN32API waveOutGetVolume(HWAVEOUT hwo, LPDWORD pdwVolume)
-{
-  dprintf(("WINMM:waveOutGetVolume"));
-  DartWaveOut *dwave = (DartWaveOut *)hwo;
-  if(DartWaveOut::find(dwave) == TRUE)
-  {
-    return MMSYSERR_NOTSUPPORTED;
-  }
-  else
-    return(MMSYSERR_INVALHANDLE);
-}
-
-MMRESULT WIN32API waveOutSetVolume(HWAVEOUT hwo, DWORD dwVolume)
-{
-  dprintf(("WINMM:waveOutSetVolume"));
-  DartWaveOut *dwave = (DartWaveOut *)hwo;
-  if(DartWaveOut::find(dwave) == TRUE)
-  {
-    return MMSYSERR_NOTSUPPORTED;
-  }
-  else
-    return(MMSYSERR_INVALHANDLE);
-}
-
-MMRESULT WIN32API waveOutGetPlaybackRate(HWAVEOUT hwo, LPDWORD pdwRate)
-{
-  dprintf(("WINMM:waveOutGetPlaybackRate"));
-  DartWaveOut *dwave = (DartWaveOut *)hwo;
-  if(DartWaveOut::find(dwave) == TRUE)
-  {
-    return MMSYSERR_NOTSUPPORTED;
-  }
-  else
-    return(MMSYSERR_INVALHANDLE);
-}
-
-MMRESULT WIN32API waveOutSetPlaybackRate(HWAVEOUT hwo, DWORD dwRate)
-{
-  dprintf(("WINMM:waveOutSetPlaybackRate"));
-  DartWaveOut *dwave = (DartWaveOut *)hwo;
-  if(DartWaveOut::find(dwave) == TRUE)
-  {
-    return MMSYSERR_NOTSUPPORTED;
-  }
-  else
-    return(MMSYSERR_INVALHANDLE);
-}
-
-MMRESULT WIN32API waveOutMessage(HWAVEOUT hwo, UINT uMsg, DWORD dw1, DWORD dw2)
-{
-  dprintf(("WINMM:waveOutMessage"));
-  DartWaveOut *dwave = (DartWaveOut *)hwo;
-  if(DartWaveOut::find(dwave) == TRUE)
-  {
-    return MMSYSERR_NOTSUPPORTED;
-  }
-  else
-    return(MMSYSERR_INVALHANDLE);
-}
-
+ODINFUNCTION2(MMRESULT, waveOutGetPitch,
+              HWAVEOUT, hwo,
+              LPDWORD, pdwPitch)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwo;
+  if(DartWaveOut::find(dwave) == TRUE)
+    return MMSYSERR_NOTSUPPORTED;
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+
+ODINFUNCTION2(MMRESULT, waveOutSetPitch,
+              HWAVEOUT, hwo,
+              DWORD, dwPitch)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwo;
+  if(DartWaveOut::find(dwave) == TRUE)
+    return MMSYSERR_NOTSUPPORTED;
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+
+ODINFUNCTION2(MMRESULT, waveOutGetVolume,
+              HWAVEOUT, hwo,
+              LPDWORD, pdwVolume)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwo;
+  if(DartWaveOut::find(dwave) == TRUE)
+  {
+    return MMSYSERR_NOTSUPPORTED;
+  }
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+
+ODINFUNCTION2(MMRESULT, waveOutSetVolume,
+              HWAVEOUT, hwo,
+              DWORD, dwVolume)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwo;
+  if(DartWaveOut::find(dwave) == TRUE)
+  {
+    return MMSYSERR_NOTSUPPORTED;
+  }
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+
+ODINFUNCTION2(MMRESULT, waveOutGetPlaybackRate,
+              HWAVEOUT, hwo,
+              LPDWORD, pdwRate)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwo;
+  if(DartWaveOut::find(dwave) == TRUE)
+  {
+    return MMSYSERR_NOTSUPPORTED;
+  }
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+
+ODINFUNCTION2(MMRESULT, waveOutSetPlaybackRate,
+              HWAVEOUT, hwo,
+              DWORD, dwRate)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwo;
+  if(DartWaveOut::find(dwave) == TRUE)
+  {
+    return MMSYSERR_NOTSUPPORTED;
+  }
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+
+ODINFUNCTION4(MMRESULT, waveOutMessage,
+              HWAVEOUT, hwo,
+              UINT, uMsg,
+              DWORD, dw1,
+              DWORD, dw2)
+{
+  DartWaveOut *dwave = (DartWaveOut *)hwo;
+  if(DartWaveOut::find(dwave) == TRUE)
+  {
+    return MMSYSERR_NOTSUPPORTED;
+  }
+  else
+    return(MMSYSERR_INVALHANDLE);
+}
+
+
Index: trunk/src/winmm/winmm.cpp
===================================================================
--- trunk/src/winmm/winmm.cpp	(revision 587)
+++ trunk/src/winmm/winmm.cpp	(revision 588)
@@ -1,3 +1,3 @@
-/* $Id: winmm.cpp,v 1.3 1999-06-10 16:24:35 phaller Exp $ */
+/* $Id: winmm.cpp,v 1.4 1999-08-19 18:46:05 phaller Exp $ */
 
 /*
@@ -10,71 +10,90 @@
  *
  */
+
+
+/****************************************************************************
+ * Includes                                                                 *
+ ****************************************************************************/
+
 #include <os2win.h>
+#include <odinwrap.h>
 #include "misc.h"
 
 #include "os2timer.h"
 
+ODINDEBUGCHANNEL(WINMM-WINMM)
+
+
 /******************************************************************************/
-UINT WIN32API mmsystemGetVersion(void)
+ODINFUNCTION0(UINT, mmsystemGetVersion)
 {
-  dprintf(("WINMM:mmsystemGetVersion\n"));
   return 4;
 }
 
 /******************************************************************************/
-MMRESULT WIN32API timeGetDevCaps(LPTIMECAPS ptc, UINT cbtc)
+ODINFUNCTION2(MMRESULT, timeGetDevCaps,
+              LPTIMECAPS, ptc,
+              UINT, cbtc)
 {
-    dprintf(("WINMM:timeGetDevCaps Not really Implemented\n"));
-    ptc->wPeriodMin = 1;
-    ptc->wPeriodMax = 20;
-    return TIMERR_NOERROR;
+  dprintf(("WINMM:timeGetDevCaps Not really Implemented\n"));
+  ptc->wPeriodMin = 1;
+  ptc->wPeriodMax = 20;
+  return TIMERR_NOERROR;
 }
 
 /******************************************************************************/
-MMRESULT WIN32API timeBeginPeriod(UINT cMilliseconds)
+ODINFUNCTION1(MMRESULT, timeBeginPeriod,
+              UINT, cMilliseconds)
 {
-    dprintf(("WINMM:timeBeginPeriod %d ms\n", cMilliseconds));
-    return TIMERR_NOERROR;
+  dprintf(("WINMM: timeBeginPeriod not implemented.\n"));
+  return TIMERR_NOERROR;
 }
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API timeEndPeriod(UINT cMilliseconds)
+ODINFUNCTION1(MMRESULT, timeEndPeriod,
+              UINT, cMilliseconds)
 {
-    dprintf(("WINMM:timeEndPeriod %d ms\n", cMilliseconds));
-    return TIMERR_NOERROR;
+  dprintf(("WINMM: timeEndPeriod not implemented.\n"));
+  return TIMERR_NOERROR;
 }
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API timeKillEvent(UINT IDEvent)
+ODINFUNCTION1(MMRESULT, timeKillEvent,
+              UINT, IDEvent)
 {
-    dprintf(("WINMM:timeKillEvent Not Implemented\n"));
-    delete((OS2Timer *)IDEvent);
-    return TIMERR_NOERROR;
+  dprintf(("WINMM:timeKillEvent Not Implemented\n"));
+  delete((OS2Timer *)IDEvent);
+  return TIMERR_NOERROR;
 }
 /******************************************************************************/
 /******************************************************************************/
-MMRESULT WIN32API timeSetEvent(UINT wDelay, UINT wResolution, LPTIMECALLBACK lptc,
-                                  DWORD dwUser, UINT fuEvent)
+ODINFUNCTION5(MMRESULT, timeSetEvent,
+              UINT, wDelay,
+              UINT, wResolution,
+              LPTIMECALLBACK, lptc,
+              DWORD, dwUser,
+              UINT, fuEvent)
 {
- OS2Timer *timer;
+  OS2Timer *timer;
 
-    dprintf(("WINMM:timeSetEvent %d\n", wDelay));
+  timer = new OS2Timer();
+  if(timer == NULL)
+      return(0);
 
-    timer = new OS2Timer();
-    if(timer == NULL) {
-        return(0);
-    }
-    if(timer->StartTimer(wDelay, wResolution, lptc, dwUser, fuEvent) == FALSE) {
-        dprintf(("WINMM:timeSetEvent: couldn't start timer!\n"));
-        delete(timer);
-        return(0);
-    }
-    return(MMRESULT)timer;
+  if(timer->StartTimer(wDelay, wResolution, lptc, dwUser, fuEvent) == FALSE)
+  {
+    dprintf(("WINMM:timeSetEvent: couldn't start timer!\n"));
+    delete(timer);
+    return(0);
+  }
+  return(MMRESULT)timer;
 }
 
 /******************************************************************************/
-MMRESULT WIN32API timeGetSystemTime( LPMMTIME arg1, UINT  arg2)
+ODINFUNCTION2(MMRESULT, timeGetSystemTime,
+              LPMMTIME, arg1,
+              UINT, arg2)
 {
-    dprintf(("WINMM:timeGetSystemTime\n"));
-    return O32_timeGetSystemTime(arg1, arg2);
+  return O32_timeGetSystemTime(arg1, arg2);
 }
+
