minor clean-up in SDL_os2audio.c
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
diff --git a/src/audio/os2/SDL_os2audio.c b/src/audio/os2/SDL_os2audio.c
index 1dcba93..abcbc1c 100644
--- a/src/audio/os2/SDL_os2audio.c
+++ b/src/audio/os2/SDL_os2audio.c
@@ -42,36 +42,36 @@ void lockDecr(volatile int *piVal);
parm [eax];
*/
-static ULONG _getEnvULong(PSZ pszName, ULONG ulMax, ULONG ulDefault)
+static ULONG _getEnvULong(const char *name, ULONG ulMax, ULONG ulDefault)
{
ULONG ulValue;
- PCHAR pcEnd;
- PSZ pszEnvVal = SDL_getenv(pszName);
+ char* end;
+ char* envval = SDL_getenv(name);
- if (pszEnvVal == NULL)
+ if (envval == NULL)
return ulDefault;
- ulValue = SDL_strtoul((const char *)pszEnvVal, &pcEnd, 10);
- return (pcEnd == pszEnvVal) || (ulValue > ulMax)? ulDefault : ulMax;
+ ulValue = SDL_strtoul(envval, &end, 10);
+ return (end == envval) || (ulValue > ulMax)? ulDefault : ulMax;
}
-static int _MCIError(PSZ pszFunc, ULONG ulResult)
+static int _MCIError(const char *func, ULONG ulResult)
{
CHAR acBuf[128];
mciGetErrorString(ulResult, acBuf, sizeof(acBuf));
- return SDL_SetError("[%s] %s", pszFunc, acBuf);
+ return SDL_SetError("[%s] %s", func, acBuf);
}
-static void _mixIOError(PSZ pszFunction, ULONG ulRC)
+static void _mixIOError(const char *function, ULONG ulRC)
{
debug_os2("%s() - failed, rc = 0x%X (%s)",
- pszFunction, ulRC,
+ function, ulRC,
(ulRC == MCIERR_INVALID_MODE) ? "Mixer mode does not match request" :
(ulRC == MCIERR_INVALID_BUFFER) ? "Caller sent an invalid buffer" : "unknown");
}
-LONG APIENTRY cbAudioWriteEvent(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer,
- ULONG ulFlags)
+static LONG APIENTRY cbAudioWriteEvent(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer,
+ ULONG ulFlags)
{
SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)pBuffer->ulUserParm;
ULONG ulRC;
@@ -90,8 +90,8 @@ LONG APIENTRY cbAudioWriteEvent(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer,
return 1; /* It seems, return value is not matter. */
}
-LONG APIENTRY cbAudioReadEvent(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer,
- ULONG ulFlags)
+static LONG APIENTRY cbAudioReadEvent(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer,
+ ULONG ulFlags)
{
SDL_PrivateAudioData *pAData = (SDL_PrivateAudioData *)pBuffer->ulUserParm;
ULONG ulRC;