more tweaking indent options SDL-1.3
authorSam Lantinga <slouken@libsdl.org>
Mon, 29 May 2006 04:04:35 +0000
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1667 1fddae038bc8
child 1669 9857d21967bb
more tweaking indent options
include/SDL.h
include/SDL_audio.h
include/SDL_cdrom.h
include/SDL_compat.h
include/SDL_cpuinfo.h
include/SDL_endian.h
include/SDL_error.h
include/SDL_events.h
include/SDL_joystick.h
include/SDL_keyboard.h
include/SDL_loadso.h
include/SDL_main.h
include/SDL_mouse.h
include/SDL_mutex.h
include/SDL_pixels.h
include/SDL_rwops.h
include/SDL_stdinc.h
include/SDL_syswm.h
include/SDL_thread.h
include/SDL_timer.h
include/SDL_version.h
include/SDL_video.h
src/SDL.c
src/SDL_compat.c
src/SDL_error.c
src/SDL_fatal.c
src/SDL_fatal.h
src/audio/SDL_audio.c
src/audio/SDL_audio_c.h
src/audio/SDL_audiocvt.c
src/audio/SDL_audiodev.c
src/audio/SDL_audiodev_c.h
src/audio/SDL_mixer.c
src/audio/SDL_mixer_MMX.c
src/audio/SDL_mixer_MMX.h
src/audio/SDL_mixer_MMX_VC.c
src/audio/SDL_mixer_MMX_VC.h
src/audio/SDL_mixer_m68k.c
src/audio/SDL_mixer_m68k.h
src/audio/SDL_wave.c
src/audio/alsa/SDL_alsa_audio.c
src/audio/amigaos/SDL_ahiaudio.c
src/audio/arts/SDL_artsaudio.c
src/audio/baudio/SDL_beaudio.cc
src/audio/bsd/SDL_bsdaudio.c
src/audio/dart/SDL_dart.c
src/audio/dc/SDL_dcaudio.c
src/audio/dc/aica.c
src/audio/dc/aica.h
src/audio/disk/SDL_diskaudio.c
src/audio/dma/SDL_dmaaudio.c
src/audio/dmedia/SDL_irixaudio.c
src/audio/dsp/SDL_dspaudio.c
src/audio/dummy/SDL_dummyaudio.c
src/audio/esd/SDL_esdaudio.c
src/audio/macosx/SDL_coreaudio.c
src/audio/macrom/SDL_romaudio.c
src/audio/mint/SDL_mintaudio.c
src/audio/mint/SDL_mintaudio.h
src/audio/mint/SDL_mintaudio_dma8.c
src/audio/mint/SDL_mintaudio_gsxb.c
src/audio/mint/SDL_mintaudio_mcsn.c
src/audio/mint/SDL_mintaudio_stfa.c
src/audio/mint/SDL_mintaudio_xbios.c
src/audio/mme/SDL_mmeaudio.c
src/audio/nas/SDL_nasaudio.c
src/audio/nto/SDL_nto_audio.c
src/audio/paudio/SDL_paudio.c
src/audio/sun/SDL_sunaudio.c
src/audio/ums/SDL_umsaudio.c
src/audio/windib/SDL_dibaudio.c
src/audio/windx5/SDL_dx5audio.c
src/cdrom/SDL_cdrom.c
src/cdrom/SDL_syscdrom.h
src/cdrom/aix/SDL_syscdrom.c
src/cdrom/beos/SDL_syscdrom.cc
src/cdrom/bsdi/SDL_syscdrom.c
src/cdrom/dc/SDL_syscdrom.c
src/cdrom/dummy/SDL_syscdrom.c
src/cdrom/freebsd/SDL_syscdrom.c
src/cdrom/linux/SDL_syscdrom.c
src/cdrom/macos/SDL_syscdrom.c
src/cdrom/macosx/AudioFilePlayer.c
src/cdrom/macosx/AudioFilePlayer.h
src/cdrom/macosx/AudioFileReaderThread.c
src/cdrom/macosx/CDPlayer.c
src/cdrom/macosx/CDPlayer.h
src/cdrom/macosx/SDLOSXCAGuard.c
src/cdrom/macosx/SDLOSXCAGuard.h
src/cdrom/macosx/SDL_syscdrom.c
src/cdrom/mint/SDL_syscdrom.c
src/cdrom/openbsd/SDL_syscdrom.c
src/cdrom/os2/SDL_syscdrom.c
src/cdrom/osf/SDL_syscdrom.c
src/cdrom/qnx/SDL_syscdrom.c
src/cdrom/win32/SDL_syscdrom.c
src/cpuinfo/SDL_cpuinfo.c
src/events/SDL_events.c
src/events/SDL_events_c.h
src/events/SDL_keyboard.c
src/events/SDL_mouse.c
src/events/SDL_quit.c
src/events/SDL_windowevents.c
src/file/SDL_rwops.c
src/hermes/HeadMMX.h
src/hermes/HeadX86.h
src/joystick/SDL_joystick.c
src/joystick/SDL_joystick_c.h
src/joystick/SDL_sysjoystick.h
src/joystick/amigaos/SDL_sysjoystick.c
src/joystick/beos/SDL_bejoystick.cc
src/joystick/bsd/SDL_sysjoystick.c
src/joystick/darwin/SDL_sysjoystick.c
src/joystick/dc/SDL_sysjoystick.c
src/joystick/dummy/SDL_sysjoystick.c
src/joystick/linux/SDL_sysjoystick.c
src/joystick/macos/SDL_sysjoystick.c
src/joystick/mint/SDL_sysjoystick.c
src/joystick/os2/SDL_sysjoystick.c
src/joystick/riscos/SDL_sysjoystick.c
src/joystick/win32/SDL_dxjoystick.c
src/joystick/win32/SDL_mmjoystick.c
src/loadso/beos/SDL_sysloadso.c
src/loadso/dlopen/SDL_sysloadso.c
src/loadso/dummy/SDL_sysloadso.c
src/loadso/macos/SDL_sysloadso.c
src/loadso/macosx/SDL_dlcompat.c
src/loadso/mint/SDL_sysloadso.c
src/loadso/os2/SDL_sysloadso.c
src/loadso/win32/SDL_sysloadso.c
src/main/beos/SDL_BeApp.cc
src/main/beos/SDL_BeApp.h
src/main/dummy/SDL_dummy_main.c
src/main/macos/SDL_main.c
src/main/qtopia/SDL_qtopia_main.cc
src/main/win32/SDL_win32_main.c
src/stdlib/SDL_getenv.c
src/stdlib/SDL_iconv.c
src/stdlib/SDL_malloc.c
src/stdlib/SDL_qsort.c
src/stdlib/SDL_stdlib.c
src/stdlib/SDL_string.c
src/thread/SDL_systhread.h
src/thread/SDL_thread.c
src/thread/SDL_thread_c.h
src/thread/amigaos/SDL_syssem.c
src/thread/amigaos/SDL_systhread.c
src/thread/amigaos/SDL_thread.c
src/thread/beos/SDL_syssem.c
src/thread/beos/SDL_systhread.c
src/thread/beos/SDL_systhread_c.h
src/thread/dc/SDL_syscond.c
src/thread/dc/SDL_sysmutex.c
src/thread/dc/SDL_syssem.c
src/thread/dc/SDL_systhread.c
src/thread/generic/SDL_syscond.c
src/thread/generic/SDL_sysmutex.c
src/thread/generic/SDL_syssem.c
src/thread/generic/SDL_systhread.c
src/thread/irix/SDL_syssem.c
src/thread/irix/SDL_systhread.c
src/thread/os2/SDL_syscond.c
src/thread/os2/SDL_sysmutex.c
src/thread/os2/SDL_syssem.c
src/thread/os2/SDL_systhread.c
src/thread/pth/SDL_syscond.c
src/thread/pth/SDL_sysmutex.c
src/thread/pth/SDL_systhread.c
src/thread/pthread/SDL_syscond.c
src/thread/pthread/SDL_sysmutex.c
src/thread/pthread/SDL_syssem.c
src/thread/pthread/SDL_systhread.c
src/thread/riscos/SDL_syscond.c
src/thread/riscos/SDL_sysmutex.c
src/thread/riscos/SDL_syssem.c
src/thread/riscos/SDL_systhread.c
src/thread/win32/SDL_sysmutex.c
src/thread/win32/SDL_syssem.c
src/thread/win32/SDL_systhread.c
src/thread/win32/win_ce_semaphore.c
src/thread/win32/win_ce_semaphore.h
src/timer/SDL_systimer.h
src/timer/SDL_timer.c
src/timer/SDL_timer_c.h
src/timer/amigaos/SDL_systimer.c
src/timer/beos/SDL_systimer.c
src/timer/dc/SDL_systimer.c
src/timer/dummy/SDL_systimer.c
src/timer/macos/FastTimes.c
src/timer/macos/FastTimes.h
src/timer/macos/SDL_MPWtimer.c
src/timer/macos/SDL_systimer.c
src/timer/mint/SDL_systimer.c
src/timer/mint/SDL_vbltimer_s.h
src/timer/os2/SDL_systimer.c
src/timer/riscos/SDL_systimer.c
src/timer/unix/SDL_systimer.c
src/timer/win32/SDL_systimer.c
src/timer/wince/SDL_systimer.c
src/video/SDL_RLEaccel.c
src/video/SDL_RLEaccel_c.h
src/video/SDL_blit.c
src/video/SDL_blit.h
src/video/SDL_blit_0.c
src/video/SDL_blit_1.c
src/video/SDL_blit_A.c
src/video/SDL_blit_N.c
src/video/SDL_bmp.c
src/video/SDL_cursor.c
src/video/SDL_cursor_c.h
src/video/SDL_gamma.c
src/video/SDL_glfuncs.h
src/video/SDL_pixels.c
src/video/SDL_pixels_c.h
src/video/SDL_stretch.c
src/video/SDL_stretch_c.h
src/video/SDL_surface.c
src/video/SDL_sysvideo.h
src/video/SDL_video.c
src/video/SDL_yuv.c
src/video/SDL_yuv_mmx.c
src/video/SDL_yuv_sw.c
src/video/SDL_yuv_sw_c.h
src/video/Xext/XME/xme.c
src/video/Xext/Xinerama/Xinerama.c
src/video/Xext/Xv/Xv.c
src/video/Xext/Xxf86dga/XF86DGA.c
src/video/Xext/Xxf86dga/XF86DGA2.c
src/video/Xext/Xxf86vm/XF86VMode.c
src/video/Xext/extensions/Xext.h
src/video/Xext/extensions/Xinerama.h
src/video/Xext/extensions/Xvlib.h
src/video/Xext/extensions/extutil.h
src/video/Xext/extensions/panoramiXext.h
src/video/Xext/extensions/xf86dga.h
src/video/Xext/extensions/xf86dga1.h
src/video/Xext/extensions/xf86vmode.h
src/video/Xext/extensions/xme.h
src/video/aalib/SDL_aaevents.c
src/video/aalib/SDL_aaevents_c.h
src/video/aalib/SDL_aavideo.c
src/video/ataricommon/SDL_ataric2p_s.h
src/video/ataricommon/SDL_ataridevmouse.c
src/video/ataricommon/SDL_ataridevmouse_c.h
src/video/ataricommon/SDL_atarieddi_s.h
src/video/ataricommon/SDL_atarievents.c
src/video/ataricommon/SDL_atarievents_c.h
src/video/ataricommon/SDL_atarigl.c
src/video/ataricommon/SDL_atarigl_c.h
src/video/ataricommon/SDL_atarimxalloc.c
src/video/ataricommon/SDL_atarimxalloc_c.h
src/video/ataricommon/SDL_biosevents.c
src/video/ataricommon/SDL_biosevents_c.h
src/video/ataricommon/SDL_gemdosevents.c
src/video/ataricommon/SDL_gemdosevents_c.h
src/video/ataricommon/SDL_ikbdevents.c
src/video/ataricommon/SDL_ikbdevents_c.h
src/video/ataricommon/SDL_ikbdinterrupt_s.h
src/video/ataricommon/SDL_xbiosevents.c
src/video/ataricommon/SDL_xbiosevents_c.h
src/video/ataricommon/SDL_xbiosinterrupt_s.h
src/video/bwindow/SDL_BView.h
src/video/bwindow/SDL_BWin.h
src/video/bwindow/SDL_sysevents.cc
src/video/bwindow/SDL_sysevents_c.h
src/video/bwindow/SDL_sysmouse.cc
src/video/bwindow/SDL_sysmouse_c.h
src/video/bwindow/SDL_sysvideo.cc
src/video/bwindow/SDL_syswm.cc
src/video/bwindow/SDL_syswm_c.h
src/video/bwindow/SDL_sysyuv.cc
src/video/bwindow/SDL_sysyuv.h
src/video/cybergfx/SDL_amigaevents.c
src/video/cybergfx/SDL_amigaevents_c.h
src/video/cybergfx/SDL_amigamouse.c
src/video/cybergfx/SDL_amigamouse_c.h
src/video/cybergfx/SDL_cgxaccel.c
src/video/cybergfx/SDL_cgxgl.c
src/video/cybergfx/SDL_cgxgl_c.h
src/video/cybergfx/SDL_cgximage.c
src/video/cybergfx/SDL_cgximage_c.h
src/video/cybergfx/SDL_cgxmodes.c
src/video/cybergfx/SDL_cgxmodes_c.h
src/video/cybergfx/SDL_cgxvideo.c
src/video/cybergfx/SDL_cgxvideo.h
src/video/cybergfx/SDL_cgxwm.c
src/video/cybergfx/SDL_cgxwm_c.h
src/video/dc/SDL_dcevents.c
src/video/dc/SDL_dcevents_c.h
src/video/dc/SDL_dcvideo.c
src/video/dga/SDL_dgaevents.c
src/video/dga/SDL_dgaevents_c.h
src/video/dga/SDL_dgavideo.c
src/video/directfb/SDL_DirectFB_events.c
src/video/directfb/SDL_DirectFB_events.h
src/video/directfb/SDL_DirectFB_video.c
src/video/directfb/SDL_DirectFB_video.h
src/video/directfb/SDL_DirectFB_yuv.c
src/video/directfb/SDL_DirectFB_yuv.h
src/video/dummy/SDL_nullevents.c
src/video/dummy/SDL_nullevents_c.h
src/video/dummy/SDL_nullvideo.c
src/video/e_log.h
src/video/e_pow.h
src/video/e_sqrt.h
src/video/epoc/SDL_epocevents_c.h
src/video/epoc/SDL_epocvideo.h
src/video/fbcon/SDL_fb3dfx.c
src/video/fbcon/SDL_fb3dfx.h
src/video/fbcon/SDL_fbelo.c
src/video/fbcon/SDL_fbelo.h
src/video/fbcon/SDL_fbevents.c
src/video/fbcon/SDL_fbevents_c.h
src/video/fbcon/SDL_fbmatrox.c
src/video/fbcon/SDL_fbmatrox.h
src/video/fbcon/SDL_fbriva.c
src/video/fbcon/SDL_fbriva.h
src/video/fbcon/SDL_fbvideo.c
src/video/fbcon/SDL_fbvideo.h
src/video/gapi/SDL_gapivideo.c
src/video/gapi/SDL_gapivideo.h
src/video/gem/SDL_gemevents.c
src/video/gem/SDL_gemevents_c.h
src/video/gem/SDL_gemmouse.c
src/video/gem/SDL_gemmouse_c.h
src/video/gem/SDL_gemvideo.c
src/video/gem/SDL_gemvideo.h
src/video/gem/SDL_gemwm.c
src/video/gem/SDL_gemwm_c.h
src/video/ggi/SDL_ggievents.c
src/video/ggi/SDL_ggievents_c.h
src/video/ggi/SDL_ggivideo.c
src/video/ggi/SDL_ggivideo.h
src/video/glsdl/SDL_glsdl.c
src/video/ipod/SDL_ipodvideo.c
src/video/maccommon/SDL_macevents.c
src/video/maccommon/SDL_macevents_c.h
src/video/maccommon/SDL_macgl.c
src/video/maccommon/SDL_macgl_c.h
src/video/maccommon/SDL_macmouse.c
src/video/maccommon/SDL_macmouse_c.h
src/video/maccommon/SDL_macwm.c
src/video/maccommon/SDL_macwm_c.h
src/video/macdsp/SDL_dspvideo.c
src/video/macrom/SDL_romvideo.c
src/video/mmx.h
src/video/nanox/SDL_nxevents.c
src/video/nanox/SDL_nxevents_c.h
src/video/nanox/SDL_nximage.c
src/video/nanox/SDL_nximage_c.h
src/video/nanox/SDL_nxmodes.c
src/video/nanox/SDL_nxmodes_c.h
src/video/nanox/SDL_nxmouse.c
src/video/nanox/SDL_nxmouse_c.h
src/video/nanox/SDL_nxvideo.c
src/video/nanox/SDL_nxwm.c
src/video/nanox/SDL_nxwm_c.h
src/video/os2fslib/SDL_os2fslib.c
src/video/os2fslib/SDL_os2fslib.h
src/video/photon/SDL_ph_events.c
src/video/photon/SDL_ph_events_c.h
src/video/photon/SDL_ph_gl.c
src/video/photon/SDL_ph_gl.h
src/video/photon/SDL_ph_image.c
src/video/photon/SDL_ph_image_c.h
src/video/photon/SDL_ph_modes.c
src/video/photon/SDL_ph_modes_c.h
src/video/photon/SDL_ph_mouse.c
src/video/photon/SDL_ph_mouse_c.h
src/video/photon/SDL_ph_video.c
src/video/photon/SDL_ph_wm.c
src/video/photon/SDL_ph_wm_c.h
src/video/photon/SDL_phyuv.c
src/video/photon/SDL_phyuv_c.h
src/video/picogui/SDL_pgevents.c
src/video/picogui/SDL_pgevents_c.h
src/video/picogui/SDL_pgvideo.c
src/video/ps2gs/SDL_gsevents.c
src/video/ps2gs/SDL_gsevents_c.h
src/video/ps2gs/SDL_gsmouse.c
src/video/ps2gs/SDL_gsmouse_c.h
src/video/ps2gs/SDL_gsvideo.c
src/video/ps2gs/SDL_gsvideo.h
src/video/ps2gs/SDL_gsyuv.c
src/video/ps2gs/SDL_gsyuv_c.h
src/video/qtopia/SDL_QPEApp.cc
src/video/qtopia/SDL_QPEApp.h
src/video/qtopia/SDL_QWin.cc
src/video/qtopia/SDL_QWin.h
src/video/qtopia/SDL_sysevents.cc
src/video/qtopia/SDL_sysevents_c.h
src/video/qtopia/SDL_sysmouse.cc
src/video/qtopia/SDL_sysmouse_c.h
src/video/qtopia/SDL_sysvideo.cc
src/video/qtopia/SDL_syswm.cc
src/video/qtopia/SDL_syswm_c.h
src/video/quartz/CGS.h
src/video/quartz/SDL_QuartzVideo.h
src/video/riscos/SDL_riscosFullScreenVideo.c
src/video/riscos/SDL_riscosevents.c
src/video/riscos/SDL_riscosevents_c.h
src/video/riscos/SDL_riscosmouse.c
src/video/riscos/SDL_riscosmouse_c.h
src/video/riscos/SDL_riscossprite.c
src/video/riscos/SDL_riscostask.c
src/video/riscos/SDL_riscostask.h
src/video/riscos/SDL_riscosvideo.c
src/video/riscos/SDL_wimppoll.c
src/video/riscos/SDL_wimpvideo.c
src/video/svga/SDL_svgaevents.c
src/video/svga/SDL_svgaevents_c.h
src/video/svga/SDL_svgavideo.c
src/video/vgl/SDL_vglevents.c
src/video/vgl/SDL_vglevents_c.h
src/video/vgl/SDL_vglmouse.c
src/video/vgl/SDL_vglmouse_c.h
src/video/vgl/SDL_vglvideo.c
src/video/wincommon/SDL_lowvideo.h
src/video/wincommon/SDL_sysevents.c
src/video/wincommon/SDL_sysmouse.c
src/video/wincommon/SDL_sysmouse_c.h
src/video/wincommon/SDL_syswm.c
src/video/wincommon/SDL_syswm_c.h
src/video/wincommon/SDL_wingl.c
src/video/wincommon/SDL_wingl_c.h
src/video/windib/SDL_dibevents.c
src/video/windib/SDL_dibevents_c.h
src/video/windib/SDL_dibvideo.c
src/video/windx5/SDL_dx5events.c
src/video/windx5/SDL_dx5events_c.h
src/video/windx5/SDL_dx5video.c
src/video/windx5/SDL_dx5video.h
src/video/windx5/SDL_dx5yuv.c
src/video/windx5/SDL_dx5yuv_c.h
src/video/wscons/SDL_wsconsevents.c
src/video/wscons/SDL_wsconsevents_c.h
src/video/wscons/SDL_wsconsvideo.c
src/video/wscons/SDL_wsconsvideo.h
src/video/x11/SDL_x11dga.c
src/video/x11/SDL_x11dga_c.h
src/video/x11/SDL_x11dyn.c
src/video/x11/SDL_x11dyn.h
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11events_c.h
src/video/x11/SDL_x11gamma.c
src/video/x11/SDL_x11gamma_c.h
src/video/x11/SDL_x11gl.c
src/video/x11/SDL_x11gl_c.h
src/video/x11/SDL_x11image.c
src/video/x11/SDL_x11image_c.h
src/video/x11/SDL_x11modes.c
src/video/x11/SDL_x11modes_c.h
src/video/x11/SDL_x11mouse.c
src/video/x11/SDL_x11mouse_c.h
src/video/x11/SDL_x11sym.h
src/video/x11/SDL_x11video.c
src/video/x11/SDL_x11video.h
src/video/x11/SDL_x11wm.c
src/video/x11/SDL_x11wm_c.h
src/video/x11/SDL_x11yuv.c
src/video/x11/SDL_x11yuv_c.h
src/video/xbios/SDL_xbios.c
src/video/xbios/SDL_xbios.h
src/video/xbios/SDL_xbios_blowup.c
src/video/xbios/SDL_xbios_blowup.h
src/video/xbios/SDL_xbios_centscreen.c
src/video/xbios/SDL_xbios_centscreen.h
src/video/xbios/SDL_xbios_sb3.c
src/video/xbios/SDL_xbios_sb3.h
test/checkkeys.c
test/graywin.c
test/loopwave.c
test/testalpha.c
test/testbitmap.c
test/testblitspeed.c
test/testcdrom.c
test/testdyngl.c
test/testerror.c
test/testfile.c
test/testgamma.c
test/testgl.c
test/testhread.c
test/testiconv.c
test/testjoystick.c
test/testkeys.c
test/testlock.c
test/testoverlay.c
test/testoverlay2.c
test/testpalette.c
test/testplatform.c
test/testsem.c
test/testsprite.c
test/testtimer.c
test/testver.c
test/testvidinfo.c
test/testwin.c
test/testwm.c
test/threadwin.c
test/torturethread.c
--- a/include/SDL.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL.h	Mon May 29 04:04:35 2006 +0000
@@ -118,24 +118,24 @@
  * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
  * signal handlers for some commonly ignored fatal signals (like SIGSEGV)
  */
-extern DECLSPEC int SDLCALL SDL_Init (Uint32 flags);
+extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
 
 /* This function initializes specific SDL subsystems */
-extern DECLSPEC int SDLCALL SDL_InitSubSystem (Uint32 flags);
+extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
 
 /* This function cleans up specific SDL subsystems */
-extern DECLSPEC void SDLCALL SDL_QuitSubSystem (Uint32 flags);
+extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
 
 /* This function returns mask of the specified subsystems which have
    been initialized.
    If 'flags' is 0, it returns a mask of all initialized subsystems.
 */
-extern DECLSPEC Uint32 SDLCALL SDL_WasInit (Uint32 flags);
+extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
 
 /* This function cleans up all initialized subsystems and unloads the
  * dynamically linked library.  You should call it upon all exit conditions.
  */
-extern DECLSPEC void SDLCALL SDL_Quit (void);
+extern DECLSPEC void SDLCALL SDL_Quit(void);
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
--- a/include/SDL_audio.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_audio.h	Mon May 29 04:04:35 2006 +0000
@@ -106,20 +106,20 @@
 /* These functions return the list of built in video drivers, in the 
  * order that they are normally initialized by default.
  */
-extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers (void);
-extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver (int index);
+extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
+extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
 
 /* These functions are used internally, and should not be used unless you
  * have a specific need to specify the audio driver you want to use.
  * You should normally use SDL_Init() or SDL_InitSubSystem().
  */
-extern DECLSPEC int SDLCALL SDL_AudioInit (const char *driver_name);
-extern DECLSPEC void SDLCALL SDL_AudioQuit (void);
+extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
+extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
 
 /* This function returns the name of the current audio driver, or NULL
  * if no driver has been initialized.
  */
-extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver (void);
+extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
 
 /*
  * This function opens the audio device with the desired parameters, and
@@ -162,8 +162,8 @@
  * may modify the requested size of the audio buffer, you should allocate
  * any local mixing buffers after you open the audio device.
  */
-extern DECLSPEC int SDLCALL SDL_OpenAudio (SDL_AudioSpec * desired,
-                                           SDL_AudioSpec * obtained);
+extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
+                                          SDL_AudioSpec * obtained);
 
 /*
  * Get the current audio state:
@@ -174,7 +174,7 @@
     SDL_AUDIO_PLAYING,
     SDL_AUDIO_PAUSED
 } SDL_audiostatus;
-extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioStatus (void);
+extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioStatus(void);
 
 /*
  * This function pauses and unpauses the audio callback processing.
@@ -183,7 +183,7 @@
  * data for your callback function after opening the audio device.
  * Silence will be written to the audio device during the pause.
  */
-extern DECLSPEC void SDLCALL SDL_PauseAudio (int pause_on);
+extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
 
 /*
  * This function loads a WAVE from the data source, automatically freeing
@@ -202,11 +202,11 @@
  * wave file cannot be opened, uses an unknown data format, or is 
  * corrupt.  Currently raw and MS-ADPCM WAVE files are supported.
  */
-extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW (SDL_RWops * src,
-                                                       int freesrc,
-                                                       SDL_AudioSpec * spec,
-                                                       Uint8 ** audio_buf,
-                                                       Uint32 * audio_len);
+extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
+                                                      int freesrc,
+                                                      SDL_AudioSpec * spec,
+                                                      Uint8 ** audio_buf,
+                                                      Uint32 * audio_len);
 
 /* Compatibility convenience function -- loads a WAV from a file */
 #define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
@@ -215,7 +215,7 @@
 /*
  * This function frees data previously allocated with SDL_LoadWAV_RW()
  */
-extern DECLSPEC void SDLCALL SDL_FreeWAV (Uint8 * audio_buf);
+extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
 
 /*
  * This function takes a source format and rate and a destination format
@@ -224,13 +224,13 @@
  * to the other.
  * This function returns 0, or -1 if there was an error.
  */
-extern DECLSPEC int SDLCALL SDL_BuildAudioCVT (SDL_AudioCVT * cvt,
-                                               Uint16 src_format,
-                                               Uint8 src_channels,
-                                               int src_rate,
-                                               Uint16 dst_format,
-                                               Uint8 dst_channels,
-                                               int dst_rate);
+extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
+                                              Uint16 src_format,
+                                              Uint8 src_channels,
+                                              int src_rate,
+                                              Uint16 dst_format,
+                                              Uint8 dst_channels,
+                                              int dst_rate);
 
 /* Once you have initialized the 'cvt' structure using SDL_BuildAudioCVT(),
  * created an audio buffer cvt->buf, and filled it with cvt->len bytes of
@@ -240,7 +240,7 @@
  * cvt->buf should be allocated after the cvt structure is initialized by
  * SDL_BuildAudioCVT(), and should be cvt->len*cvt->len_mult bytes long.
  */
-extern DECLSPEC int SDLCALL SDL_ConvertAudio (SDL_AudioCVT * cvt);
+extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
 
 /*
  * This takes two audio buffers of the playing audio format and mixes
@@ -250,8 +250,8 @@
  * This is provided for convenience -- you can mix your own audio data.
  */
 #define SDL_MIX_MAXVOLUME 128
-extern DECLSPEC void SDLCALL SDL_MixAudio (Uint8 * dst, const Uint8 * src,
-                                           Uint32 len, int volume);
+extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
+                                          Uint32 len, int volume);
 
 /*
  * The lock manipulated by these functions protects the callback function.
@@ -259,13 +259,13 @@
  * callback function is not running.  Do not call these from the callback
  * function or you will cause deadlock.
  */
-extern DECLSPEC void SDLCALL SDL_LockAudio (void);
-extern DECLSPEC void SDLCALL SDL_UnlockAudio (void);
+extern DECLSPEC void SDLCALL SDL_LockAudio(void);
+extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
 
 /*
  * This function shuts down audio processing and closes the audio device.
  */
-extern DECLSPEC void SDLCALL SDL_CloseAudio (void);
+extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
 
 
 /* Ends C function definitions when using C++ */
--- a/include/SDL_cdrom.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_cdrom.h	Mon May 29 04:04:35 2006 +0000
@@ -104,7 +104,7 @@
 /* Returns the number of CD-ROM drives on the system, or -1 if
    SDL_Init() has not been called with the SDL_INIT_CDROM flag.
  */
-extern DECLSPEC int SDLCALL SDL_CDNumDrives (void);
+extern DECLSPEC int SDLCALL SDL_CDNumDrives(void);
 
 /* Returns a human-readable, system-dependent identifier for the CD-ROM.
    Example:
@@ -112,7 +112,7 @@
 	"E:"
 	"/dev/disk/ide/1/master"
 */
-extern DECLSPEC const char *SDLCALL SDL_CDName (int drive);
+extern DECLSPEC const char *SDLCALL SDL_CDName(int drive);
 
 /* Opens a CD-ROM drive for access.  It returns a drive handle on success,
    or NULL if the drive was invalid or busy.  This newly opened CD-ROM
@@ -120,13 +120,13 @@
    CD-ROM handle.
    Drives are numbered starting with 0.  Drive 0 is the system default CD-ROM.
 */
-extern DECLSPEC SDL_CD *SDLCALL SDL_CDOpen (int drive);
+extern DECLSPEC SDL_CD *SDLCALL SDL_CDOpen(int drive);
 
 /* This function returns the current status of the given drive.
    If the drive has a CD in it, the table of contents of the CD and current
    play position of the CD will be stored in the SDL_CD structure.
 */
-extern DECLSPEC CDstatus SDLCALL SDL_CDStatus (SDL_CD * cdrom);
+extern DECLSPEC CDstatus SDLCALL SDL_CDStatus(SDL_CD * cdrom);
 
 /* Play the given CD starting at 'start_track' and 'start_frame' for 'ntracks'
    tracks and 'nframes' frames.  If both 'ntrack' and 'nframe' are 0, play 
@@ -147,31 +147,30 @@
 
    This function returns 0, or -1 if there was an error.
 */
-extern DECLSPEC int SDLCALL SDL_CDPlayTracks (SDL_CD * cdrom,
-                                              int start_track,
-                                              int start_frame, int ntracks,
-                                              int nframes);
+extern DECLSPEC int SDLCALL SDL_CDPlayTracks(SDL_CD * cdrom,
+                                             int start_track,
+                                             int start_frame, int ntracks,
+                                             int nframes);
 
 /* Play the given CD starting at 'start' frame for 'length' frames.
    It returns 0, or -1 if there was an error.
 */
-extern DECLSPEC int SDLCALL SDL_CDPlay (SDL_CD * cdrom, int start,
-                                        int length);
+extern DECLSPEC int SDLCALL SDL_CDPlay(SDL_CD * cdrom, int start, int length);
 
 /* Pause play -- returns 0, or -1 on error */
-extern DECLSPEC int SDLCALL SDL_CDPause (SDL_CD * cdrom);
+extern DECLSPEC int SDLCALL SDL_CDPause(SDL_CD * cdrom);
 
 /* Resume play -- returns 0, or -1 on error */
-extern DECLSPEC int SDLCALL SDL_CDResume (SDL_CD * cdrom);
+extern DECLSPEC int SDLCALL SDL_CDResume(SDL_CD * cdrom);
 
 /* Stop play -- returns 0, or -1 on error */
-extern DECLSPEC int SDLCALL SDL_CDStop (SDL_CD * cdrom);
+extern DECLSPEC int SDLCALL SDL_CDStop(SDL_CD * cdrom);
 
 /* Eject CD-ROM -- returns 0, or -1 on error */
-extern DECLSPEC int SDLCALL SDL_CDEject (SDL_CD * cdrom);
+extern DECLSPEC int SDLCALL SDL_CDEject(SDL_CD * cdrom);
 
 /* Closes the handle for the CD-ROM drive */
-extern DECLSPEC void SDLCALL SDL_CDClose (SDL_CD * cdrom);
+extern DECLSPEC void SDLCALL SDL_CDClose(SDL_CD * cdrom);
 
 
 /* Ends C function definitions when using C++ */
--- a/include/SDL_compat.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_compat.h	Mon May 29 04:04:35 2006 +0000
@@ -66,29 +66,28 @@
     SDL_GRAB_ON = 1
 } SDL_GrabMode;
 
-extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version (void);
-extern DECLSPEC char *SDLCALL SDL_AudioDriverName (char *namebuf, int maxlen);
-extern DECLSPEC char *SDLCALL SDL_VideoDriverName (char *namebuf, int maxlen);
-extern DECLSPEC int SDLCALL SDL_VideoModeOK (int width, int height, int bpp,
-                                             Uint32 flags);
-extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes (SDL_PixelFormat * format,
-                                                  Uint32 flags);
-extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode (int width, int height,
-                                                       int bpp, Uint32 flags);
-extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface (void);
-extern DECLSPEC void SDLCALL SDL_WM_SetCaption (const char *title,
-                                                const char *icon);
-extern DECLSPEC void SDLCALL SDL_WM_GetCaption (char **title, char **icon);
-extern DECLSPEC void SDLCALL SDL_WM_SetIcon (SDL_Surface * icon,
-                                             Uint8 * mask);
-extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow (void);
-extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen (SDL_Surface * surface);
-extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput (SDL_GrabMode mode);
-extern DECLSPEC Uint8 SDLCALL SDL_GetAppState (void);
-extern DECLSPEC int SDLCALL SDL_SetPalette (SDL_Surface * surface, int flags,
-                                            SDL_Color * colors,
-                                            int firstcolor, int ncolors);
-extern DECLSPEC int SDLCALL SDL_GetWMInfo (SDL_SysWMinfo * info);
+extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void);
+extern DECLSPEC char *SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
+extern DECLSPEC char *SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
+extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width, int height, int bpp,
+                                            Uint32 flags);
+extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes(SDL_PixelFormat * format,
+                                                 Uint32 flags);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode(int width, int height,
+                                                      int bpp, Uint32 flags);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface(void);
+extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title,
+                                               const char *icon);
+extern DECLSPEC void SDLCALL SDL_WM_GetCaption(char **title, char **icon);
+extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask);
+extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
+extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface * surface);
+extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
+extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
+extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface, int flags,
+                                           SDL_Color * colors,
+                                           int firstcolor, int ncolors);
+extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo * info);
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
--- a/include/SDL_cpuinfo.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_cpuinfo.h	Mon May 29 04:04:35 2006 +0000
@@ -41,35 +41,35 @@
 
 /* This function returns true if the CPU has the RDTSC instruction
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC (void);
+extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
 
 /* This function returns true if the CPU has MMX features
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX (void);
+extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
 
 /* This function returns true if the CPU has MMX Ext. features
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt (void);
+extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
 
 /* This function returns true if the CPU has 3DNow features
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow (void);
+extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
 
 /* This function returns true if the CPU has 3DNow! Ext. features
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt (void);
+extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
 
 /* This function returns true if the CPU has SSE features
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE (void);
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
 
 /* This function returns true if the CPU has SSE2 features
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2 (void);
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
 
 /* This function returns true if the CPU has AltiVec features
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec (void);
+extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
--- a/include/SDL_endian.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_endian.h	Mon May 29 04:04:35 2006 +0000
@@ -64,37 +64,37 @@
 #if defined(__GNUC__) && defined(__i386__) && \
    !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
 static __inline__ Uint16
-SDL_Swap16 (Uint16 x)
+SDL_Swap16(Uint16 x)
 {
-  __asm__ ("xchgb %b0,%h0": "=q" (x):"0" (x));
+  __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
     return x;
 }
 #elif defined(__GNUC__) && defined(__x86_64__)
 static __inline__ Uint16
-SDL_Swap16 (Uint16 x)
+SDL_Swap16(Uint16 x)
 {
-  __asm__ ("xchgb %b0,%h0": "=Q" (x):"0" (x));
+  __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
     return x;
 }
 #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
 static __inline__ Uint16
-SDL_Swap16 (Uint16 x)
+SDL_Swap16(Uint16 x)
 {
     Uint16 result;
 
-  __asm__ ("rlwimi %0,%2,8,16,23": "=&r" (result):"0" (x >> 8), "r" (x));
+  __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
     return result;
 }
 #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
 static __inline__ Uint16
-SDL_Swap16 (Uint16 x)
+SDL_Swap16(Uint16 x)
 {
-  __asm__ ("rorw #8,%0": "=d" (x): "0" (x):"cc");
+  __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
     return x;
 }
 #else
 static __inline__ Uint16
-SDL_Swap16 (Uint16 x)
+SDL_Swap16(Uint16 x)
 {
     return ((x << 8) | (x >> 8));
 }
@@ -102,40 +102,39 @@
 
 #if defined(__GNUC__) && defined(__i386__)
 static __inline__ Uint32
-SDL_Swap32 (Uint32 x)
+SDL_Swap32(Uint32 x)
 {
-  __asm__ ("bswap %0": "=r" (x):"0" (x));
+  __asm__("bswap %0": "=r"(x):"0"(x));
     return x;
 }
 #elif defined(__GNUC__) && defined(__x86_64__)
 static __inline__ Uint32
-SDL_Swap32 (Uint32 x)
+SDL_Swap32(Uint32 x)
 {
-  __asm__ ("bswapl %0": "=r" (x):"0" (x));
+  __asm__("bswapl %0": "=r"(x):"0"(x));
     return x;
 }
 #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
 static __inline__ Uint32
-SDL_Swap32 (Uint32 x)
+SDL_Swap32(Uint32 x)
 {
     Uint32 result;
 
-  __asm__ ("rlwimi %0,%2,24,16,23": "=&r" (result):"0" (x >> 24),
-             "r" (x));
-  __asm__ ("rlwimi %0,%2,8,8,15": "=&r" (result):"0" (result), "r" (x));
-  __asm__ ("rlwimi %0,%2,24,0,7": "=&r" (result):"0" (result), "r" (x));
+  __asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x));
+  __asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x));
+  __asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x));
     return result;
 }
 #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
 static __inline__ Uint32
-SDL_Swap32 (Uint32 x)
+SDL_Swap32(Uint32 x)
 {
-  __asm__ ("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d" (x): "0" (x):"cc");
+  __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
     return x;
 }
 #else
 static __inline__ Uint32
-SDL_Swap32 (Uint32 x)
+SDL_Swap32(Uint32 x)
 {
     return ((x << 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) |
             (x >> 24));
@@ -145,7 +144,7 @@
 #ifdef SDL_HAS_64BIT_TYPE
 #if defined(__GNUC__) && defined(__i386__)
 static __inline__ Uint64
-SDL_Swap64 (Uint64 x)
+SDL_Swap64(Uint64 x)
 {
     union
     {
@@ -156,21 +155,21 @@
         Uint64 u;
     } v;
     v.u = x;
-  __asm__ ("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r" (v.s.a), "=r" (v.s.b):"0" (v.s.a),
-             "1" (v.s.
-                  b));
+  __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
+            "1"(v.s.
+                b));
     return v.u;
 }
 #elif defined(__GNUC__) && defined(__x86_64__)
 static __inline__ Uint64
-SDL_Swap64 (Uint64 x)
+SDL_Swap64(Uint64 x)
 {
-  __asm__ ("bswapq %0": "=r" (x):"0" (x));
+  __asm__("bswapq %0": "=r"(x):"0"(x));
     return x;
 }
 #else
 static __inline__ Uint64
-SDL_Swap64 (Uint64 x)
+SDL_Swap64(Uint64 x)
 {
     Uint32 hi, lo;
 
@@ -178,9 +177,9 @@
     lo = (Uint32) (x & 0xFFFFFFFF);
     x >>= 32;
     hi = (Uint32) (x & 0xFFFFFFFF);
-    x = SDL_Swap32 (lo);
+    x = SDL_Swap32(lo);
     x <<= 32;
-    x |= SDL_Swap32 (hi);
+    x |= SDL_Swap32(hi);
     return (x);
 }
 #endif
--- a/include/SDL_error.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_error.h	Mon May 29 04:04:35 2006 +0000
@@ -39,9 +39,9 @@
 #endif
 
 /* Public functions */
-extern DECLSPEC void SDLCALL SDL_SetError (const char *fmt, ...);
-extern DECLSPEC char *SDLCALL SDL_GetError (void);
-extern DECLSPEC void SDLCALL SDL_ClearError (void);
+extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
+extern DECLSPEC char *SDLCALL SDL_GetError(void);
+extern DECLSPEC void SDLCALL SDL_ClearError(void);
 
 /* Private error message function - used internally */
 #define SDL_OutOfMemory()	SDL_Error(SDL_ENOMEM)
@@ -55,7 +55,7 @@
     SDL_UNSUPPORTED,
     SDL_LASTERROR
 } SDL_errorcode;
-extern DECLSPEC void SDLCALL SDL_Error (SDL_errorcode code);
+extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
 
 
 /* Ends C function definitions when using C++ */
--- a/include/SDL_events.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_events.h	Mon May 29 04:04:35 2006 +0000
@@ -89,28 +89,26 @@
 #define SDL_EVENTMASK(X)	(1<<(X))
 typedef enum
 {
-    SDL_WINDOWEVENTMASK = SDL_EVENTMASK (SDL_WINDOWEVENT),
-    SDL_KEYDOWNMASK = SDL_EVENTMASK (SDL_KEYDOWN),
-    SDL_KEYUPMASK = SDL_EVENTMASK (SDL_KEYUP),
-    SDL_KEYEVENTMASK = SDL_EVENTMASK (SDL_KEYDOWN) |
-        SDL_EVENTMASK (SDL_KEYUP),
-    SDL_MOUSEMOTIONMASK = SDL_EVENTMASK (SDL_MOUSEMOTION),
-    SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK (SDL_MOUSEBUTTONDOWN),
-    SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK (SDL_MOUSEBUTTONUP),
-    SDL_MOUSEEVENTMASK = SDL_EVENTMASK (SDL_MOUSEMOTION) |
-        SDL_EVENTMASK (SDL_MOUSEBUTTONDOWN) |
-        SDL_EVENTMASK (SDL_MOUSEBUTTONUP),
-    SDL_JOYAXISMOTIONMASK = SDL_EVENTMASK (SDL_JOYAXISMOTION),
-    SDL_JOYBALLMOTIONMASK = SDL_EVENTMASK (SDL_JOYBALLMOTION),
-    SDL_JOYHATMOTIONMASK = SDL_EVENTMASK (SDL_JOYHATMOTION),
-    SDL_JOYBUTTONDOWNMASK = SDL_EVENTMASK (SDL_JOYBUTTONDOWN),
-    SDL_JOYBUTTONUPMASK = SDL_EVENTMASK (SDL_JOYBUTTONUP),
-    SDL_JOYEVENTMASK = SDL_EVENTMASK (SDL_JOYAXISMOTION) |
-        SDL_EVENTMASK (SDL_JOYBALLMOTION) |
-        SDL_EVENTMASK (SDL_JOYHATMOTION) |
-        SDL_EVENTMASK (SDL_JOYBUTTONDOWN) | SDL_EVENTMASK (SDL_JOYBUTTONUP),
-    SDL_QUITMASK = SDL_EVENTMASK (SDL_QUIT),
-    SDL_SYSWMEVENTMASK = SDL_EVENTMASK (SDL_SYSWMEVENT)
+    SDL_WINDOWEVENTMASK = SDL_EVENTMASK(SDL_WINDOWEVENT),
+    SDL_KEYDOWNMASK = SDL_EVENTMASK(SDL_KEYDOWN),
+    SDL_KEYUPMASK = SDL_EVENTMASK(SDL_KEYUP),
+    SDL_KEYEVENTMASK = SDL_EVENTMASK(SDL_KEYDOWN) | SDL_EVENTMASK(SDL_KEYUP),
+    SDL_MOUSEMOTIONMASK = SDL_EVENTMASK(SDL_MOUSEMOTION),
+    SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN),
+    SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
+    SDL_MOUSEEVENTMASK = SDL_EVENTMASK(SDL_MOUSEMOTION) |
+        SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN) | SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
+    SDL_JOYAXISMOTIONMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION),
+    SDL_JOYBALLMOTIONMASK = SDL_EVENTMASK(SDL_JOYBALLMOTION),
+    SDL_JOYHATMOTIONMASK = SDL_EVENTMASK(SDL_JOYHATMOTION),
+    SDL_JOYBUTTONDOWNMASK = SDL_EVENTMASK(SDL_JOYBUTTONDOWN),
+    SDL_JOYBUTTONUPMASK = SDL_EVENTMASK(SDL_JOYBUTTONUP),
+    SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION) |
+        SDL_EVENTMASK(SDL_JOYBALLMOTION) |
+        SDL_EVENTMASK(SDL_JOYHATMOTION) |
+        SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP),
+    SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT),
+    SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT)
 } SDL_EventMask;
 #define SDL_ALLEVENTS		0xFFFFFFFF
 
@@ -299,7 +297,7 @@
    This function updates the event queue and internal input device state.
    This should only be run in the thread that sets the video mode.
 */
-extern DECLSPEC void SDLCALL SDL_PumpEvents (void);
+extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
 
 /* Checks the event queue for messages and optionally returns them.
    If 'action' is SDL_ADDEVENT, up to 'numevents' events will be added to
@@ -320,27 +318,27 @@
     SDL_GETEVENT
 } SDL_eventaction;
 /* */
-extern DECLSPEC int SDLCALL SDL_PeepEvents (SDL_Event * events, int numevents,
-                                            SDL_eventaction action,
-                                            Uint32 mask);
+extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
+                                           SDL_eventaction action,
+                                           Uint32 mask);
 
 /* Polls for currently pending events, and returns 1 if there are any pending
    events, or 0 if there are none available.  If 'event' is not NULL, the next
    event is removed from the queue and stored in that area.
  */
-extern DECLSPEC int SDLCALL SDL_PollEvent (SDL_Event * event);
+extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
 
 /* Waits indefinitely for the next available event, returning 1, or 0 if there
    was an error while waiting for events.  If 'event' is not NULL, the next
    event is removed from the queue and stored in that area.
  */
-extern DECLSPEC int SDLCALL SDL_WaitEvent (SDL_Event * event);
+extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
 
 /* Add an event to the event queue.
    This function returns 0 on success, or -1 if the event queue was full
    or there was some other error.
  */
-extern DECLSPEC int SDLCALL SDL_PushEvent (SDL_Event * event);
+extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
 
 /*
   This function sets up a filter to process all events before they
@@ -365,13 +363,13 @@
   If the quit event is generated by an interrupt signal, it will bypass the
   internal queue and be delivered to the application at the next event poll.
 */
-extern DECLSPEC void SDLCALL SDL_SetEventFilter (SDL_EventFilter filter);
+extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter);
 
 /*
   Return the current event filter - can be used to "chain" filters.
   If there is no event filter set, this function returns NULL.
 */
-extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter (void);
+extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter(void);
 
 /*
   This function allows you to set the state of processing certain events.
@@ -385,7 +383,7 @@
 #define SDL_IGNORE	 0
 #define SDL_DISABLE	 0
 #define SDL_ENABLE	 1
-extern DECLSPEC Uint8 SDLCALL SDL_EventState (Uint8 type, int state);
+extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint8 type, int state);
 
 
 /* Ends C function definitions when using C++ */
--- a/include/SDL_joystick.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_joystick.h	Mon May 29 04:04:35 2006 +0000
@@ -54,14 +54,14 @@
 /*
  * Count the number of joysticks attached to the system
  */
-extern DECLSPEC int SDLCALL SDL_NumJoysticks (void);
+extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
 
 /*
  * Get the implementation dependent name of a joystick.
  * This can be called before any joysticks are opened.
  * If no name can be found, this function returns NULL.
  */
-extern DECLSPEC const char *SDLCALL SDL_JoystickName (int device_index);
+extern DECLSPEC const char *SDLCALL SDL_JoystickName(int device_index);
 
 /*
  * Open a joystick for use - the index passed as an argument refers to
@@ -70,46 +70,46 @@
  *
  * This function returns a joystick identifier, or NULL if an error occurred.
  */
-extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen (int device_index);
+extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
 
 /*
  * Returns 1 if the joystick has been opened, or 0 if it has not.
  */
-extern DECLSPEC int SDLCALL SDL_JoystickOpened (int device_index);
+extern DECLSPEC int SDLCALL SDL_JoystickOpened(int device_index);
 
 /*
  * Get the device index of an opened joystick.
  */
-extern DECLSPEC int SDLCALL SDL_JoystickIndex (SDL_Joystick * joystick);
+extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick * joystick);
 
 /*
  * Get the number of general axis controls on a joystick
  */
-extern DECLSPEC int SDLCALL SDL_JoystickNumAxes (SDL_Joystick * joystick);
+extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
 
 /*
  * Get the number of trackballs on a joystick
  * Joystick trackballs have only relative motion events associated
  * with them and their state cannot be polled.
  */
-extern DECLSPEC int SDLCALL SDL_JoystickNumBalls (SDL_Joystick * joystick);
+extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
 
 /*
  * Get the number of POV hats on a joystick
  */
-extern DECLSPEC int SDLCALL SDL_JoystickNumHats (SDL_Joystick * joystick);
+extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
 
 /*
  * Get the number of buttons on a joystick
  */
-extern DECLSPEC int SDLCALL SDL_JoystickNumButtons (SDL_Joystick * joystick);
+extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
 
 /*
  * Update the current state of the open joysticks.
  * This is called automatically by the event loop if any joystick
  * events are enabled.
  */
-extern DECLSPEC void SDLCALL SDL_JoystickUpdate (void);
+extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
 
 /*
  * Enable/disable joystick event polling.
@@ -118,15 +118,15 @@
  * information.
  * The state can be one of SDL_QUERY, SDL_ENABLE or SDL_IGNORE.
  */
-extern DECLSPEC int SDLCALL SDL_JoystickEventState (int state);
+extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
 
 /*
  * Get the current state of an axis control on a joystick
  * The state is a value ranging from -32768 to 32767.
  * The axis indices start at index 0.
  */
-extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis (SDL_Joystick * joystick,
-                                                    int axis);
+extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
+                                                   int axis);
 
 /*
  * Get the current state of a POV hat on a joystick
@@ -144,28 +144,28 @@
 /*
  * The hat indices start at index 0.
  */
-extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat (SDL_Joystick * joystick,
-                                                  int hat);
+extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
+                                                 int hat);
 
 /*
  * Get the ball axis change since the last poll
  * This returns 0, or -1 if you passed it invalid parameters.
  * The ball indices start at index 0.
  */
-extern DECLSPEC int SDLCALL SDL_JoystickGetBall (SDL_Joystick * joystick,
-                                                 int ball, int *dx, int *dy);
+extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
+                                                int ball, int *dx, int *dy);
 
 /*
  * Get the current state of a button on a joystick
  * The button indices start at index 0.
  */
-extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton (SDL_Joystick * joystick,
-                                                     int button);
+extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
+                                                    int button);
 
 /*
  * Close a joystick previously opened with SDL_JoystickOpen()
  */
-extern DECLSPEC void SDLCALL SDL_JoystickClose (SDL_Joystick * joystick);
+extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
 
 
 /* Ends C function definitions when using C++ */
--- a/include/SDL_keyboard.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_keyboard.h	Mon May 29 04:04:35 2006 +0000
@@ -77,7 +77,7 @@
  * If 'enable' is -1, the translation state is not changed.
  * It returns the previous state of keyboard translation.
  */
-extern DECLSPEC int SDLCALL SDL_EnableUNICODE (int enable);
+extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
 
 /*
  * Enable/Disable keyboard repeat.  Keyboard repeat defaults to off.
@@ -90,8 +90,8 @@
 /*
  * If 'delay' is set to 0, keyboard repeat is disabled.
  */
-extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat (int delay, int interval);
-extern DECLSPEC void SDLCALL SDL_GetKeyRepeat (int *delay, int *interval);
+extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
+extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
 
 /*
  * Get a snapshot of the current state of the keyboard.
@@ -100,23 +100,23 @@
  * 	Uint8 *keystate = SDL_GetKeyState(NULL);
  *	if ( keystate[SDLK_RETURN] ) ... <RETURN> is pressed.
  */
-extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyState (int *numkeys);
+extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyState(int *numkeys);
 
 /*
  * Get the current key modifier state
  */
-extern DECLSPEC SDLMod SDLCALL SDL_GetModState (void);
+extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
 
 /*
  * Set the current key modifier state
  * This does not change the keyboard state, only the key modifier flags.
  */
-extern DECLSPEC void SDLCALL SDL_SetModState (SDLMod modstate);
+extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
 
 /*
  * Get the name of an SDL virtual keysym
  */
-extern DECLSPEC char *SDLCALL SDL_GetKeyName (SDLKey key);
+extern DECLSPEC char *SDLCALL SDL_GetKeyName(SDLKey key);
 
 
 /* Ends C function definitions when using C++ */
--- a/include/SDL_loadso.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_loadso.h	Mon May 29 04:04:35 2006 +0000
@@ -57,17 +57,17 @@
  * to the object handle (or NULL if there was an error).
  * The 'sofile' parameter is a system dependent name of the object file.
  */
-extern DECLSPEC void *SDLCALL SDL_LoadObject (const char *sofile);
+extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
 
 /* Given an object handle, this function looks up the address of the
  * named function in the shared object and returns it.  This address
  * is no longer valid after calling SDL_UnloadObject().
  */
-extern DECLSPEC void *SDLCALL SDL_LoadFunction (void *handle,
-                                                const char *name);
+extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
+                                               const char *name);
 
 /* Unload a shared object from memory */
-extern DECLSPEC void SDLCALL SDL_UnloadObject (void *handle);
+extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
--- a/include/SDL_main.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_main.h	Mon May 29 04:04:35 2006 +0000
@@ -50,7 +50,7 @@
 #define main	SDL_main
 
 /* The prototype for the application's main() function */
-extern C_LINKAGE int SDL_main (int argc, char *argv[]);
+extern C_LINKAGE int SDL_main(int argc, char *argv[]);
 
 
 /* From the SDL library code -- needed for registering the app on Win32 */
@@ -64,12 +64,12 @@
 #endif
 
 /* This should be called from your WinMain() function, if any */
-extern DECLSPEC void SDLCALL SDL_SetModuleHandle (void *hInst);
+extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst);
 /* This can also be called, but is no longer necessary */
-extern DECLSPEC int SDLCALL SDL_RegisterApp (char *name, Uint32 style,
-                                             void *hInst);
+extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
+                                            void *hInst);
 /* This can also be called, but is no longer necessary (SDL_Quit calls it) */
-extern DECLSPEC void SDLCALL SDL_UnregisterApp (void);
+extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
 #ifdef __cplusplus
 /* *INDENT-OFF* */
 }
@@ -92,7 +92,7 @@
 struct QDGlobals;
 
 /* This should be called from your main() function, if any */
-extern DECLSPEC void SDLCALL SDL_InitQuickDraw (struct QDGlobals *the_qd);
+extern DECLSPEC void SDLCALL SDL_InitQuickDraw(struct QDGlobals *the_qd);
 
 #ifdef __cplusplus
 /* *INDENT-OFF* */
--- a/include/SDL_mouse.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_mouse.h	Mon May 29 04:04:35 2006 +0000
@@ -59,7 +59,7 @@
  * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
  * current mouse cursor position.  You can pass NULL for either x or y.
  */
-extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState (int *x, int *y);
+extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
 
 /*
  * Retrieve the current state of the mouse.
@@ -67,12 +67,12 @@
  * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
  * mouse deltas since the last call to SDL_GetRelativeMouseState().
  */
-extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState (int *x, int *y);
+extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
 
 /*
  * Set the position of the mouse cursor (generates a mouse motion event)
  */
-extern DECLSPEC void SDLCALL SDL_WarpMouse (Uint16 x, Uint16 y);
+extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
 
 /*
  * Create a cursor using the specified data and mask (in MSB format).
@@ -95,17 +95,17 @@
  * If the cursor is currently visible, the change will be immediately 
  * represented on the display.
  */
-extern DECLSPEC void SDLCALL SDL_SetCursor (SDL_Cursor * cursor);
+extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
 
 /*
  * Returns the currently active cursor.
  */
-extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor (void);
+extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
 
 /*
  * Deallocates a cursor created with SDL_CreateCursor().
  */
-extern DECLSPEC void SDLCALL SDL_FreeCursor (SDL_Cursor * cursor);
+extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
 
 /*
  * Toggle whether or not the cursor is shown on the screen.
@@ -114,7 +114,7 @@
  * before the call, or 0 if it was not.  You can query the current
  * state by passing a 'toggle' value of -1.
  */
-extern DECLSPEC int SDLCALL SDL_ShowCursor (int toggle);
+extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
 
 /* Used as a mask when testing buttons in buttonstate
    Button 1:	Left mouse button
--- a/include/SDL_mutex.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_mutex.h	Mon May 29 04:04:35 2006 +0000
@@ -58,21 +58,21 @@
 typedef struct SDL_mutex SDL_mutex;
 
 /* Create a mutex, initialized unlocked */
-extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex (void);
+extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
 
 /* Lock the mutex  (Returns 0, or -1 on error) */
 #define SDL_LockMutex(m)	SDL_mutexP(m)
-extern DECLSPEC int SDLCALL SDL_mutexP (SDL_mutex * mutex);
+extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex * mutex);
 
 /* Unlock the mutex  (Returns 0, or -1 on error)
    It is an error to unlock a mutex that has not been locked by
    the current thread, and doing so results in undefined behavior.
  */
 #define SDL_UnlockMutex(m)	SDL_mutexV(m)
-extern DECLSPEC int SDLCALL SDL_mutexV (SDL_mutex * mutex);
+extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex * mutex);
 
 /* Destroy a mutex */
-extern DECLSPEC void SDLCALL SDL_DestroyMutex (SDL_mutex * mutex);
+extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
 
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -84,21 +84,21 @@
 typedef struct SDL_semaphore SDL_sem;
 
 /* Create a semaphore, initialized with value, returns NULL on failure. */
-extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore (Uint32 initial_value);
+extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
 
 /* Destroy a semaphore */
-extern DECLSPEC void SDLCALL SDL_DestroySemaphore (SDL_sem * sem);
+extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
 
 /* This function suspends the calling thread until the semaphore pointed 
  * to by sem has a positive count. It then atomically decreases the semaphore
  * count.
  */
-extern DECLSPEC int SDLCALL SDL_SemWait (SDL_sem * sem);
+extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
 
 /* Non-blocking variant of SDL_SemWait(), returns 0 if the wait succeeds,
    SDL_MUTEX_TIMEDOUT if the wait would block, and -1 on error.
 */
-extern DECLSPEC int SDLCALL SDL_SemTryWait (SDL_sem * sem);
+extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
 
 /* Variant of SDL_SemWait() with a timeout in milliseconds, returns 0 if
    the wait succeeds, SDL_MUTEX_TIMEDOUT if the wait does not succeed in
@@ -106,15 +106,15 @@
    On some platforms this function is implemented by looping with a delay
    of 1 ms, and so should be avoided if possible.
 */
-extern DECLSPEC int SDLCALL SDL_SemWaitTimeout (SDL_sem * sem, Uint32 ms);
+extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
 
 /* Atomically increases the semaphore's count (not blocking), returns 0,
    or -1 on error.
  */
-extern DECLSPEC int SDLCALL SDL_SemPost (SDL_sem * sem);
+extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
 
 /* Returns the current count of the semaphore */
-extern DECLSPEC Uint32 SDLCALL SDL_SemValue (SDL_sem * sem);
+extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
 
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -126,27 +126,27 @@
 typedef struct SDL_cond SDL_cond;
 
 /* Create a condition variable */
-extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond (void);
+extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
 
 /* Destroy a condition variable */
-extern DECLSPEC void SDLCALL SDL_DestroyCond (SDL_cond * cond);
+extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
 
 /* Restart one of the threads that are waiting on the condition variable,
    returns 0 or -1 on error.
  */
-extern DECLSPEC int SDLCALL SDL_CondSignal (SDL_cond * cond);
+extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
 
 /* Restart all threads that are waiting on the condition variable,
    returns 0 or -1 on error.
  */
-extern DECLSPEC int SDLCALL SDL_CondBroadcast (SDL_cond * cond);
+extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
 
 /* Wait on the condition variable, unlocking the provided mutex.
    The mutex must be locked before entering this function!
    The mutex is re-locked once the condition variable is signaled.
    Returns 0 when it is signaled, or -1 on error.
  */
-extern DECLSPEC int SDLCALL SDL_CondWait (SDL_cond * cond, SDL_mutex * mut);
+extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mut);
 
 /* Waits for at most 'ms' milliseconds, and returns 0 if the condition
    variable is signaled, SDL_MUTEX_TIMEDOUT if the condition is not
@@ -154,9 +154,8 @@
    On some platforms this function is implemented by looping with a delay
    of 1 ms, and so should be avoided if possible.
 */
-extern DECLSPEC int SDLCALL SDL_CondWaitTimeout (SDL_cond * cond,
-                                                 SDL_mutex * mutex,
-                                                 Uint32 ms);
+extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
+                                                SDL_mutex * mutex, Uint32 ms);
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
--- a/include/SDL_pixels.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_pixels.h	Mon May 29 04:04:35 2006 +0000
@@ -109,64 +109,64 @@
 {
     SDL_PixelFormat_Unknown,
     SDL_PixelFormat_Index1LSB =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Index1, SDL_BitmapOrder_1234, 0,
-                                1, 0),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index1, SDL_BitmapOrder_1234, 0,
+                               1, 0),
     SDL_PixelFormat_Index1MSB =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Index1, SDL_BitmapOrder_4321, 0,
-                                1, 0),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index1, SDL_BitmapOrder_4321, 0,
+                               1, 0),
     SDL_PixelFormat_Index4LSB =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Index4, SDL_BitmapOrder_1234, 0,
-                                2, 0),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index4, SDL_BitmapOrder_1234, 0,
+                               2, 0),
     SDL_PixelFormat_Index4MSB =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Index4, SDL_BitmapOrder_4321, 0,
-                                2, 0),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index4, SDL_BitmapOrder_4321, 0,
+                               2, 0),
     SDL_PixelFormat_Index8 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Index8, 0, 0, 8, 1),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index8, 0, 0, 8, 1),
     SDL_PixelFormat_RGB332 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed8, SDL_PackedOrder_XRGB,
-                                SDL_PackedLayout_332, 8, 1),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed8, SDL_PackedOrder_XRGB,
+                               SDL_PackedLayout_332, 8, 1),
     SDL_PixelFormat_RGB444 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
-                                SDL_PackedLayout_4444, 12, 2),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
+                               SDL_PackedLayout_4444, 12, 2),
     SDL_PixelFormat_RGB555 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
-                                SDL_PackedLayout_1555, 15, 2),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
+                               SDL_PackedLayout_1555, 15, 2),
     SDL_PixelFormat_ARGB4444 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
-                                SDL_PackedLayout_4444, 16, 2),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
+                               SDL_PackedLayout_4444, 16, 2),
     SDL_PixelFormat_ARGB1555 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
-                                SDL_PackedLayout_1555, 16, 2),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
+                               SDL_PackedLayout_1555, 16, 2),
     SDL_PixelFormat_RGB565 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
-                                SDL_PackedLayout_565, 16, 2),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
+                               SDL_PackedLayout_565, 16, 2),
     SDL_PixelFormat_RGB24 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_ArrayU8, SDL_ArrayOrder_RGB, 0,
-                                24, 3),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_ArrayU8, SDL_ArrayOrder_RGB, 0,
+                               24, 3),
     SDL_PixelFormat_BGR24 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_ArrayU8, SDL_ArrayOrder_BGR, 0,
-                                24, 3),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_ArrayU8, SDL_ArrayOrder_BGR, 0,
+                               24, 3),
     SDL_PixelFormat_RGB888 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_XRGB,
-                                SDL_PackedLayout_8888, 24, 4),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_XRGB,
+                               SDL_PackedLayout_8888, 24, 4),
     SDL_PixelFormat_BGR888 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_XBGR,
-                                SDL_PackedLayout_8888, 24, 4),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_XBGR,
+                               SDL_PackedLayout_8888, 24, 4),
     SDL_PixelFormat_ARGB8888 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
-                                SDL_PackedLayout_8888, 32, 4),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
+                               SDL_PackedLayout_8888, 32, 4),
     SDL_PixelFormat_RGBA8888 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_RGBA,
-                                SDL_PackedLayout_8888, 32, 4),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_RGBA,
+                               SDL_PackedLayout_8888, 32, 4),
     SDL_PixelFormat_ABGR8888 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_ABGR,
-                                SDL_PackedLayout_8888, 32, 4),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ABGR,
+                               SDL_PackedLayout_8888, 32, 4),
     SDL_PixelFormat_BGRA8888 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_BGRA,
-                                SDL_PackedLayout_8888, 32, 4),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_BGRA,
+                               SDL_PackedLayout_8888, 32, 4),
     SDL_PixelFormat_ARGB2101010 =
-        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
-                                SDL_PackedLayout_2101010, 32, 4),
+        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
+                               SDL_PackedLayout_2101010, 32, 4),
 };
 
 typedef struct SDL_Color
@@ -213,19 +213,19 @@
  * Convert one of the enumerated formats above to a bpp and RGBA masks.
  * Returns SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.
  */
-extern DECLSPEC SDL_bool SDL_PixelFormatEnumToMasks (Uint32 format, int *bpp,
-                                                     Uint32 * Rmask,
-                                                     Uint32 * Gmask,
-                                                     Uint32 * Bmask,
-                                                     Uint32 * Amask);
+extern DECLSPEC SDL_bool SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp,
+                                                    Uint32 * Rmask,
+                                                    Uint32 * Gmask,
+                                                    Uint32 * Bmask,
+                                                    Uint32 * Amask);
 
 /*
  * Convert a bpp and RGBA masks to one of the enumerated formats above.
  * Returns SDL_PixelFormat_Unknown if the conversion wasn't possible.
  */
-extern DECLSPEC Uint32 SDL_MasksToPixelFormatEnum (int bpp, Uint32 Rmask,
-                                                   Uint32 Gmask, Uint32 Bmask,
-                                                   Uint32 Amask);
+extern DECLSPEC Uint32 SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask,
+                                                  Uint32 Gmask, Uint32 Bmask,
+                                                  Uint32 Amask);
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
--- a/include/SDL_rwops.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_rwops.h	Mon May 29 04:04:35 2006 +0000
@@ -102,19 +102,19 @@
 
 /* Functions to create SDL_RWops structures from various data sources */
 
-extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile (const char *file,
-                                                   const char *mode);
+extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
+                                                  const char *mode);
 
 #ifdef HAVE_STDIO_H
-extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP (FILE * fp, int autoclose);
+extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, int autoclose);
 #endif
 
-extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem (void *mem, int size);
-extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem (const void *mem,
-                                                       int size);
+extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
+extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
+                                                      int size);
 
-extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW (void);
-extern DECLSPEC void SDLCALL SDL_FreeRW (SDL_RWops * area);
+extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
+extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
 
 #define RW_SEEK_SET	0       /* Seek from the beginning of data */
 #define RW_SEEK_CUR	1       /* Seek relative to current read point */
@@ -129,20 +129,20 @@
 
 
 /* Read an item of the specified endianness and return in native format */
-extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16 (SDL_RWops * src);
-extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16 (SDL_RWops * src);
-extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32 (SDL_RWops * src);
-extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32 (SDL_RWops * src);
-extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64 (SDL_RWops * src);
-extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64 (SDL_RWops * src);
+extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
+extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
+extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
+extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
+extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
+extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
 
 /* Write an item of native format to the specified endianness */
-extern DECLSPEC int SDLCALL SDL_WriteLE16 (SDL_RWops * dst, Uint16 value);
-extern DECLSPEC int SDLCALL SDL_WriteBE16 (SDL_RWops * dst, Uint16 value);
-extern DECLSPEC int SDLCALL SDL_WriteLE32 (SDL_RWops * dst, Uint32 value);
-extern DECLSPEC int SDLCALL SDL_WriteBE32 (SDL_RWops * dst, Uint32 value);
-extern DECLSPEC int SDLCALL SDL_WriteLE64 (SDL_RWops * dst, Uint64 value);
-extern DECLSPEC int SDLCALL SDL_WriteBE64 (SDL_RWops * dst, Uint64 value);
+extern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
+extern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
+extern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
+extern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
+extern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
+extern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
 
 
 /* Ends C function definitions when using C++ */
--- a/include/SDL_stdinc.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_stdinc.h	Mon May 29 04:04:35 2006 +0000
@@ -141,14 +141,14 @@
 #define SDL_COMPILE_TIME_ASSERT(name, x)               \
        typedef int SDL_dummy_ ## name[(x) * 2 - 1]
 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
-SDL_COMPILE_TIME_ASSERT (uint8, sizeof (Uint8) == 1);
-SDL_COMPILE_TIME_ASSERT (sint8, sizeof (Sint8) == 1);
-SDL_COMPILE_TIME_ASSERT (uint16, sizeof (Uint16) == 2);
-SDL_COMPILE_TIME_ASSERT (sint16, sizeof (Sint16) == 2);
-SDL_COMPILE_TIME_ASSERT (uint32, sizeof (Uint32) == 4);
-SDL_COMPILE_TIME_ASSERT (sint32, sizeof (Sint32) == 4);
-SDL_COMPILE_TIME_ASSERT (uint64, sizeof (Uint64) == 8);
-SDL_COMPILE_TIME_ASSERT (sint64, sizeof (Sint64) == 8);
+SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
+SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
+SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
+SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
+SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
+SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
+SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
+SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
 
 /* Check to make sure enums are the size of ints, for structure packing.
@@ -167,7 +167,7 @@
     DUMMY_ENUM_VALUE
 } SDL_DUMMY_ENUM;
 
-SDL_COMPILE_TIME_ASSERT (enum, sizeof (SDL_DUMMY_ENUM) == sizeof (int));
+SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
 
 #include "begin_code.h"
@@ -181,25 +181,25 @@
 #ifdef HAVE_MALLOC
 #define SDL_malloc	malloc
 #else
-extern DECLSPEC void *SDLCALL SDL_malloc (size_t size);
+extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
 #endif
 
 #ifdef HAVE_CALLOC
 #define SDL_calloc	calloc
 #else
-extern DECLSPEC void *SDLCALL SDL_calloc (size_t nmemb, size_t size);
+extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
 #endif
 
 #ifdef HAVE_REALLOC
 #define SDL_realloc	realloc
 #else
-extern DECLSPEC void *SDLCALL SDL_realloc (void *mem, size_t size);
+extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
 #endif
 
 #ifdef HAVE_FREE
 #define SDL_free	free
 #else
-extern DECLSPEC void SDLCALL SDL_free (void *mem);
+extern DECLSPEC void SDLCALL SDL_free(void *mem);
 #endif
 
 #if defined(HAVE_ALLOCA) && !defined(alloca)
@@ -215,9 +215,9 @@
 # elif defined(__AIX__)
 #pragma alloca
 # elif defined(__MRC__)
-void *alloca (unsigned);
+void *alloca(unsigned);
 # else
-char *alloca ();
+char *alloca();
 # endif
 #endif
 #ifdef HAVE_ALLOCA
@@ -231,21 +231,21 @@
 #ifdef HAVE_GETENV
 #define SDL_getenv	getenv
 #else
-extern DECLSPEC char *SDLCALL SDL_getenv (const char *name);
+extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
 #endif
 
 #ifdef HAVE_PUTENV
 #define SDL_putenv	putenv
 #else
-extern DECLSPEC int SDLCALL SDL_putenv (const char *variable);
+extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
 #endif
 
 #ifdef HAVE_QSORT
 #define SDL_qsort	qsort
 #else
-extern DECLSPEC void SDLCALL SDL_qsort (void *base, size_t nmemb, size_t size,
-                                        int (*compare) (const void *,
-                                                        const void *));
+extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size,
+                                       int (*compare) (const void *,
+                                                       const void *));
 #endif
 
 #ifdef HAVE_ABS
@@ -272,7 +272,7 @@
 #ifdef HAVE_MEMSET
 #define SDL_memset      memset
 #else
-extern DECLSPEC void *SDLCALL SDL_memset (void *dst, int c, size_t len);
+extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
 #endif
 #define SDL_zero(x)	SDL_memset(&(x), 0, sizeof((x)))
 #define SDL_zerop(x)	SDL_memset((x), 0, sizeof(*(x)))
@@ -331,8 +331,8 @@
 #elif defined(HAVE_BCOPY)
 #define SDL_memcpy(d, s, n)	bcopy((s), (d), (n))
 #else
-extern DECLSPEC void *SDLCALL SDL_memcpy (void *dst, const void *src,
-                                          size_t len);
+extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src,
+                                         size_t len);
 #endif
 #endif
 
@@ -379,8 +379,8 @@
 } while(0)
 #endif
 #ifndef SDL_revcpy
-extern DECLSPEC void *SDLCALL SDL_revcpy (void *dst, const void *src,
-                                          size_t len);
+extern DECLSPEC void *SDLCALL SDL_revcpy(void *dst, const void *src,
+                                         size_t len);
 #endif
 
 #ifdef HAVE_MEMMOVE
@@ -401,52 +401,52 @@
 #ifdef HAVE_MEMCMP
 #define SDL_memcmp      memcmp
 #else
-extern DECLSPEC int SDLCALL SDL_memcmp (const void *s1, const void *s2,
-                                        size_t len);
+extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2,
+                                       size_t len);
 #endif
 
 #ifdef HAVE_STRLEN
 #define SDL_strlen      strlen
 #else
-extern DECLSPEC size_t SDLCALL SDL_strlen (const char *string);
+extern DECLSPEC size_t SDLCALL SDL_strlen(const char *string);
 #endif
 
 #ifdef HAVE_STRLCPY
 #define SDL_strlcpy     strlcpy
 #else
-extern DECLSPEC size_t SDLCALL SDL_strlcpy (char *dst, const char *src,
-                                            size_t maxlen);
+extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src,
+                                           size_t maxlen);
 #endif
 
 #ifdef HAVE_STRLCAT
 #define SDL_strlcat    strlcat
 #else
-extern DECLSPEC size_t SDLCALL SDL_strlcat (char *dst, const char *src,
-                                            size_t maxlen);
+extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src,
+                                           size_t maxlen);
 #endif
 
 #ifdef HAVE_STRDUP
 #define SDL_strdup     strdup
 #else
-extern DECLSPEC char *SDLCALL SDL_strdup (const char *string);
+extern DECLSPEC char *SDLCALL SDL_strdup(const char *string);
 #endif
 
 #ifdef HAVE__STRREV
 #define SDL_strrev      _strrev
 #else
-extern DECLSPEC char *SDLCALL SDL_strrev (char *string);
+extern DECLSPEC char *SDLCALL SDL_strrev(char *string);
 #endif
 
 #ifdef HAVE__STRUPR
 #define SDL_strupr      _strupr
 #else
-extern DECLSPEC char *SDLCALL SDL_strupr (char *string);
+extern DECLSPEC char *SDLCALL SDL_strupr(char *string);
 #endif
 
 #ifdef HAVE__STRLWR
 #define SDL_strlwr      _strlwr
 #else
-extern DECLSPEC char *SDLCALL SDL_strlwr (char *string);
+extern DECLSPEC char *SDLCALL SDL_strlwr(char *string);
 #endif
 
 #ifdef HAVE_STRCHR
@@ -454,7 +454,7 @@
 #elif defined(HAVE_INDEX)
 #define SDL_strchr      index
 #else
-extern DECLSPEC char *SDLCALL SDL_strchr (const char *string, int c);
+extern DECLSPEC char *SDLCALL SDL_strchr(const char *string, int c);
 #endif
 
 #ifdef HAVE_STRRCHR
@@ -462,14 +462,14 @@
 #elif defined(HAVE_RINDEX)
 #define SDL_strrchr     rindex
 #else
-extern DECLSPEC char *SDLCALL SDL_strrchr (const char *string, int c);
+extern DECLSPEC char *SDLCALL SDL_strrchr(const char *string, int c);
 #endif
 
 #ifdef HAVE_STRSTR
 #define SDL_strstr      strstr
 #else
-extern DECLSPEC char *SDLCALL SDL_strstr (const char *haystack,
-                                          const char *needle);
+extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack,
+                                         const char *needle);
 #endif
 
 #ifdef HAVE_ITOA
@@ -481,7 +481,7 @@
 #ifdef HAVE__LTOA
 #define SDL_ltoa        _ltoa
 #else
-extern DECLSPEC char *SDLCALL SDL_ltoa (long value, char *string, int radix);
+extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *string, int radix);
 #endif
 
 #ifdef HAVE__UITOA
@@ -493,22 +493,22 @@
 #ifdef HAVE__ULTOA
 #define SDL_ultoa       _ultoa
 #else
-extern DECLSPEC char *SDLCALL SDL_ultoa (unsigned long value, char *string,
-                                         int radix);
+extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *string,
+                                        int radix);
 #endif
 
 #ifdef HAVE_STRTOL
 #define SDL_strtol      strtol
 #else
-extern DECLSPEC long SDLCALL SDL_strtol (const char *string, char **endp,
-                                         int base);
+extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp,
+                                        int base);
 #endif
 
 #ifdef HAVE_STRTOUL
 #define SDL_strtoul      strtoul
 #else
-extern DECLSPEC unsigned long SDLCALL SDL_strtoul (const char *string,
-                                                   char **endp, int base);
+extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string,
+                                                  char **endp, int base);
 #endif
 
 #ifdef SDL_HAS_64BIT_TYPE
@@ -516,29 +516,29 @@
 #ifdef HAVE__I64TOA
 #define SDL_lltoa       _i64toa
 #else
-extern DECLSPEC char *SDLCALL SDL_lltoa (Sint64 value, char *string,
-                                         int radix);
+extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *string,
+                                        int radix);
 #endif
 
 #ifdef HAVE__UI64TOA
 #define SDL_ulltoa      _ui64toa
 #else
-extern DECLSPEC char *SDLCALL SDL_ulltoa (Uint64 value, char *string,
-                                          int radix);
+extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *string,
+                                         int radix);
 #endif
 
 #ifdef HAVE_STRTOLL
 #define SDL_strtoll     strtoll
 #else
-extern DECLSPEC Sint64 SDLCALL SDL_strtoll (const char *string, char **endp,
-                                            int base);
+extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp,
+                                           int base);
 #endif
 
 #ifdef HAVE_STRTOULL
 #define SDL_strtoull     strtoull
 #else
-extern DECLSPEC Uint64 SDLCALL SDL_strtoull (const char *string, char **endp,
-                                             int base);
+extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp,
+                                            int base);
 #endif
 
 #endif /* SDL_HAS_64BIT_TYPE */
@@ -546,7 +546,7 @@
 #ifdef HAVE_STRTOD
 #define SDL_strtod      strtod
 #else
-extern DECLSPEC double SDLCALL SDL_strtod (const char *string, char **endp);
+extern DECLSPEC double SDLCALL SDL_strtod(const char *string, char **endp);
 #endif
 
 #ifdef HAVE_ATOI
@@ -564,14 +564,14 @@
 #ifdef HAVE_STRCMP
 #define SDL_strcmp      strcmp
 #else
-extern DECLSPEC int SDLCALL SDL_strcmp (const char *str1, const char *str2);
+extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
 #endif
 
 #ifdef HAVE_STRNCMP
 #define SDL_strncmp     strncmp
 #else
-extern DECLSPEC int SDLCALL SDL_strncmp (const char *str1, const char *str2,
-                                         size_t maxlen);
+extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2,
+                                        size_t maxlen);
 #endif
 
 #ifdef HAVE_STRCASECMP
@@ -579,8 +579,8 @@
 #elif defined(HAVE__STRICMP)
 #define SDL_strcasecmp  _stricmp
 #else
-extern DECLSPEC int SDLCALL SDL_strcasecmp (const char *str1,
-                                            const char *str2);
+extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1,
+                                           const char *str2);
 #endif
 
 #ifdef HAVE_STRNCASECMP
@@ -588,29 +588,29 @@
 #elif defined(HAVE__STRNICMP)
 #define SDL_strncasecmp _strnicmp
 #else
-extern DECLSPEC int SDLCALL SDL_strncasecmp (const char *str1,
-                                             const char *str2, size_t maxlen);
+extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1,
+                                            const char *str2, size_t maxlen);
 #endif
 
 #ifdef HAVE_SSCANF
 #define SDL_sscanf      sscanf
 #else
-extern DECLSPEC int SDLCALL SDL_sscanf (const char *text, const char *fmt,
-                                        ...);
+extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt,
+                                       ...);
 #endif
 
 #ifdef HAVE_SNPRINTF
 #define SDL_snprintf    snprintf
 #else
-extern DECLSPEC int SDLCALL SDL_snprintf (char *text, size_t maxlen,
-                                          const char *fmt, ...);
+extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen,
+                                         const char *fmt, ...);
 #endif
 
 #ifdef HAVE_VSNPRINTF
 #define SDL_vsnprintf   vsnprintf
 #else
-extern DECLSPEC int SDLCALL SDL_vsnprintf (char *text, size_t maxlen,
-                                           const char *fmt, va_list ap);
+extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen,
+                                          const char *fmt, va_list ap);
 #endif
 
 /* The SDL implementation of iconv() returns these error codes */
@@ -623,25 +623,25 @@
 #define SDL_iconv_t     iconv_t
 #define SDL_iconv_open  iconv_open
 #define SDL_iconv_close iconv_close
-extern DECLSPEC size_t SDLCALL SDL_iconv (SDL_iconv_t cd, char **inbuf,
-                                          size_t * inbytesleft, char **outbuf,
-                                          size_t * outbytesleft);
+extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf,
+                                         size_t * inbytesleft, char **outbuf,
+                                         size_t * outbytesleft);
 #else
 typedef struct _SDL_iconv_t *SDL_iconv_t;
-extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open (const char *tocode,
-                                                    const char *fromcode);
-extern DECLSPEC int SDLCALL SDL_iconv_close (SDL_iconv_t cd);
-extern DECLSPEC size_t SDLCALL SDL_iconv (SDL_iconv_t cd, char **inbuf,
-                                          size_t * inbytesleft, char **outbuf,
-                                          size_t * outbytesleft);
+extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
+                                                   const char *fromcode);
+extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
+extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf,
+                                         size_t * inbytesleft, char **outbuf,
+                                         size_t * outbytesleft);
 #endif
 /* This function converts a string between encodings in one pass, returning a
    string that must be freed with SDL_free() or NULL on error.
 */
-extern DECLSPEC char *SDLCALL SDL_iconv_string (const char *tocode,
-                                                const char *fromcode,
-                                                char *inbuf,
-                                                size_t inbytesleft);
+extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
+                                               const char *fromcode,
+                                               char *inbuf,
+                                               size_t inbytesleft);
 #define SDL_iconv_utf8_ascii(S)		SDL_iconv_string("ASCII", "UTF-8", S, SDL_strlen(S)+1)
 #define SDL_iconv_utf8_latin1(S)	SDL_iconv_string("LATIN1", "UTF-8", S, SDL_strlen(S)+1)
 #define SDL_iconv_utf8_ucs2(S)		(Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)
--- a/include/SDL_syswm.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_syswm.h	Mon May 29 04:04:35 2006 +0000
@@ -228,8 +228,8 @@
  * if ( SDL_GetWindowWMInfo(&info) ) { ... }
  * \endcode
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo (SDL_WindowID windowID,
-                                                      SDL_SysWMinfo * info);
+extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_WindowID windowID,
+                                                     SDL_SysWMinfo * info);
 
 
 /* Ends C function definitions when using C++ */
--- a/include/SDL_thread.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_thread.h	Mon May 29 04:04:35 2006 +0000
@@ -82,21 +82,21 @@
                                                              *threadID);
 typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
 #else
-typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
-                                                         unsigned (__stdcall *
-                                                                   func) (void
-                                                                          *),
-                                                         void *arg, unsigned,
-                                                         unsigned *threadID);
+typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
+                                                        unsigned (__stdcall *
+                                                                  func) (void
+                                                                         *),
+                                                        void *arg, unsigned,
+                                                        unsigned *threadID);
 typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
 #endif
 
-extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread (int (*fn) (void *),
-                                                      void *data,
-                                                      pfnSDL_CurrentBeginThread
-                                                      pfnBeginThread,
-                                                      pfnSDL_CurrentEndThread
-                                                      pfnEndThread);
+extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (*fn) (void *),
+                                                     void *data,
+                                                     pfnSDL_CurrentBeginThread
+                                                     pfnBeginThread,
+                                                     pfnSDL_CurrentEndThread
+                                                     pfnEndThread);
 
 #ifdef __OS2__
 #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthread, _endthread)
@@ -107,26 +107,25 @@
 #endif
 #else
 extern DECLSPEC SDL_Thread *SDLCALL
-SDL_CreateThread (int (SDLCALL * fn) (void *), void *data);
+SDL_CreateThread(int (SDLCALL * fn) (void *), void *data);
 #endif
 
 /* Get the 32-bit thread identifier for the current thread */
-extern DECLSPEC Uint32 SDLCALL SDL_ThreadID (void);
+extern DECLSPEC Uint32 SDLCALL SDL_ThreadID(void);
 
 /* Get the 32-bit thread identifier for the specified thread,
    equivalent to SDL_ThreadID() if the specified thread is NULL.
  */
-extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID (SDL_Thread * thread);
+extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID(SDL_Thread * thread);
 
 /* Wait for a thread to finish.
    The return code for the thread function is placed in the area
    pointed to by 'status', if 'status' is not NULL.
  */
-extern DECLSPEC void SDLCALL SDL_WaitThread (SDL_Thread * thread,
-                                             int *status);
+extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
 
 /* Forcefully kill a thread without worrying about its state */
-extern DECLSPEC void SDLCALL SDL_KillThread (SDL_Thread * thread);
+extern DECLSPEC void SDLCALL SDL_KillThread(SDL_Thread * thread);
 
 
 /* Ends C function definitions when using C++ */
--- a/include/SDL_timer.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_timer.h	Mon May 29 04:04:35 2006 +0000
@@ -49,13 +49,13 @@
 /* Get the number of milliseconds since the SDL library initialization.
  * Note that this value wraps if the program runs for more than ~49 days.
  */
-extern DECLSPEC Uint32 SDLCALL SDL_GetTicks (void);
+extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
 
 /* Wait a specified number of milliseconds before returning */
-extern DECLSPEC void SDLCALL SDL_Delay (Uint32 ms);
+extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
 
 /* Function prototype for the timer callback function */
-typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval);
+typedef Uint32(SDLCALL * SDL_TimerCallback) (Uint32 interval);
 
 /* Set a callback to run after the specified number of milliseconds has
  * elapsed. The callback function is passed the current timer interval
@@ -85,8 +85,8 @@
  *
  * This function returns 0 if successful, or -1 if there was an error.
  */
-extern DECLSPEC int SDLCALL SDL_SetTimer (Uint32 interval,
-                                          SDL_TimerCallback callback);
+extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval,
+                                         SDL_TimerCallback callback);
 
 /* New timer API, supports multiple timers
  * Written by Stephane Peter <megastep@lokigames.com>
@@ -98,8 +98,7 @@
  * passed in, the periodic alarm continues, otherwise a new alarm is
  * scheduled.  If the callback returns 0, the periodic alarm is cancelled.
  */
-typedef Uint32 (SDLCALL * SDL_NewTimerCallback) (Uint32 interval,
-                                                 void *param);
+typedef Uint32(SDLCALL * SDL_NewTimerCallback) (Uint32 interval, void *param);
 
 /* Definition of the timer ID type */
 typedef struct _SDL_TimerID *SDL_TimerID;
@@ -107,14 +106,14 @@
 /* Add a new timer to the pool of timers already running.
    Returns a timer ID, or NULL when an error occurs.
  */
-extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer (Uint32 interval,
-                                                  SDL_NewTimerCallback
-                                                  callback, void *param);
+extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
+                                                 SDL_NewTimerCallback
+                                                 callback, void *param);
 
 /* Remove one of the multiple timers knowing its ID.
  * Returns a boolean value indicating success.
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer (SDL_TimerID t);
+extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID t);
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
--- a/include/SDL_version.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_version.h	Mon May 29 04:04:35 2006 +0000
@@ -129,7 +129,7 @@
  *
  * \sa SDL_VERSION
  */
-extern DECLSPEC void SDLCALL SDL_GetVersion (SDL_version * ver);
+extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
--- a/include/SDL_video.h	Mon May 29 03:53:21 2006 +0000
+++ b/include/SDL_video.h	Mon May 29 04:04:35 2006 +0000
@@ -285,7 +285,7 @@
  *
  * \sa SDL_GetVideoDriver()
  */
-extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers (void);
+extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
 
 /**
  * \fn const char *SDL_GetVideoDriver(int index)
@@ -297,7 +297,7 @@
  *
  * \sa SDL_GetNumVideoDrivers()
  */
-extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver (int index);
+extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
 
 /**
  * \fn int SDL_VideoInit(const char *driver_name, Uint32 flags)
@@ -315,8 +315,8 @@
  *
  * \sa SDL_VideoQuit()
  */
-extern DECLSPEC int SDLCALL SDL_VideoInit (const char *driver_name,
-                                           Uint32 flags);
+extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name,
+                                          Uint32 flags);
 
 /**
  * \fn void SDL_VideoQuit(void)
@@ -327,7 +327,7 @@
  *
  * \sa SDL_VideoInit()
  */
-extern DECLSPEC void SDLCALL SDL_VideoQuit (void);
+extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
 
 /**
  * \fn const char *SDL_GetCurrentVideoDriver(void)
@@ -340,7 +340,7 @@
  * \sa SDL_GetNumVideoDrivers()
  * \sa SDL_GetVideoDriver()
  */
-extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver (void);
+extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
 
 /**
  * \fn const SDL_VideoInfo *SDL_GetVideoInfo(void)
@@ -350,7 +350,7 @@
  * \return A read-only pointer to information about the video hardware,
  *         or NULL if no video driver has been initialized.
  */
-extern DECLSPEC const SDL_VideoInfo *SDLCALL SDL_GetVideoInfo (void);
+extern DECLSPEC const SDL_VideoInfo *SDLCALL SDL_GetVideoInfo(void);
 
 /**
  * \fn int SDL_GetNumVideoDisplays(void)
@@ -359,7 +359,7 @@
  *
  * \sa SDL_SelectVideoDisplay()
  */
-extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays (void);
+extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
 
 /**
  * \fn int SDL_SelectVideoDisplay(int index)
@@ -370,7 +370,7 @@
  *
  * \sa SDL_GetNumVideoDisplays()
  */
-extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay (int index);
+extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay(int index);
 
 /**
  * \fn int SDL_GetNumDisplayModes(void)
@@ -379,7 +379,7 @@
  *
  * \sa SDL_GetDisplayMode()
  */
-extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes (void);
+extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void);
 
 /**
  * \fn const SDL_DisplayMode *SDL_GetDisplayMode(int index)
@@ -394,7 +394,7 @@
  *
  * \sa SDL_GetNumDisplayModes()
  */
-extern DECLSPEC const SDL_DisplayMode *SDLCALL SDL_GetDisplayMode (int index);
+extern DECLSPEC const SDL_DisplayMode *SDLCALL SDL_GetDisplayMode(int index);
 
 /**
  * \fn const SDL_DisplayMode *SDL_GetDesktopDisplayMode(void)
@@ -402,7 +402,7 @@
  * \brief Retrieve information about the desktop display mode for the current display.
  */
 extern DECLSPEC const SDL_DisplayMode *SDLCALL
-SDL_GetDesktopDisplayMode (void);
+SDL_GetDesktopDisplayMode(void);
 
 /**
  * \fn const SDL_DisplayMode *SDL_GetCurrentDisplayMode(void)
@@ -410,7 +410,7 @@
  * \brief Retrieve information about the current display mode.
  */
 extern DECLSPEC const SDL_DisplayMode *SDLCALL
-SDL_GetCurrentDisplayMode (void);
+SDL_GetCurrentDisplayMode(void);
 
 /**
  * \fn SDL_DisplayMode *SDL_GetClosestDisplayMode(const SDL_DisplayMode *mode, SDL_DisplayMode *closest)
@@ -427,12 +427,11 @@
  * \sa SDL_GetNumDisplayModes()
  * \sa SDL_GetDisplayMode()
  */
-extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode (const
-                                                                    SDL_DisplayMode
-                                                                    * mode,
-                                                                    SDL_DisplayMode
-                                                                    *
-                                                                    closest);
+extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(const
+                                                                   SDL_DisplayMode
+                                                                   * mode,
+                                                                   SDL_DisplayMode
+                                                                   * closest);
 
 /**
  * \fn int SDL_SetDisplayMode(const SDL_DisplayMode *mode)
@@ -443,7 +442,7 @@
  *
  * \return 0 on success, or -1 if setting the display mode failed.
  */
-extern DECLSPEC int SDLCALL SDL_SetDisplayMode (const SDL_DisplayMode * mode);
+extern DECLSPEC int SDLCALL SDL_SetDisplayMode(const SDL_DisplayMode * mode);
 
 /**
  * \fn SDL_WindowID SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
@@ -463,9 +462,9 @@
  *
  * \sa SDL_DestroyWindow()
  */
-extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindow (const char *title,
-                                                       int x, int y, int w,
-                                                       int h, Uint32 flags);
+extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindow(const char *title,
+                                                      int x, int y, int w,
+                                                      int h, Uint32 flags);
 
 /**
  * \fn SDL_WindowID SDL_CreateWindowFrom(void *data)
@@ -480,14 +479,14 @@
  *
  * \sa SDL_DestroyWindow()
  */
-extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindowFrom (void *data);
+extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindowFrom(void *data);
 
 /**
  * \fn Uint32 SDL_GetWindowFlags(SDL_WindowID windowID)
  *
  * \brief Get the window flags.
  */
-extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags (SDL_WindowID windowID);
+extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_WindowID windowID);
 
 /**
  * \fn void SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
@@ -496,8 +495,8 @@
  *
  * \sa SDL_GetWindowTitle()
  */
-extern DECLSPEC void SDLCALL SDL_SetWindowTitle (SDL_WindowID windowID,
-                                                 const char *title);
+extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_WindowID windowID,
+                                                const char *title);
 
 /**
  * \fn const char *SDL_GetWindowTitle(SDL_WindowID windowID)
@@ -506,8 +505,7 @@
  *
  * \sa SDL_SetWindowTitle()
  */
-extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle (SDL_WindowID
-                                                        windowID);
+extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_WindowID windowID);
 
 /**
  * \fn void SDL_SetWindowIcon(SDL_Surface *icon)
@@ -518,7 +516,7 @@
  *
  * FIXME: The icon needs to be set before the window is first shown.  Should some icon representation be part of the window creation data?
  */
-extern DECLSPEC void SDLCALL SDL_SetWindowIcon (SDL_Surface * icon);
+extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Surface * icon);
 
 /**
  * \fn void SDL_SetWindowData(SDL_WindowID windowID, void *userdata)
@@ -527,8 +525,8 @@
  *
  * \sa SDL_GetWindowData()
  */
-extern DECLSPEC void SDLCALL SDL_SetWindowData (SDL_WindowID windowID,
-                                                void *userdata);
+extern DECLSPEC void SDLCALL SDL_SetWindowData(SDL_WindowID windowID,
+                                               void *userdata);
 
 /**
  * \fn void *SDL_GetWindowData(SDL_WindowID windowID)
@@ -537,7 +535,7 @@
  *
  * \sa SDL_SetWindowData()
  */
-extern DECLSPEC void *SDLCALL SDL_GetWindowData (SDL_WindowID windowID);
+extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_WindowID windowID);
 
 /**
  * \fn void SDL_SetWindowPosition(SDL_WindowID windowID, int x, int y)
@@ -546,8 +544,8 @@
  *
  * \sa SDL_GetWindowPosition()
  */
-extern DECLSPEC void SDLCALL SDL_SetWindowPosition (SDL_WindowID windowID,
-                                                    int x, int y);
+extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_WindowID windowID,
+                                                   int x, int y);
 
 /**
  * \fn void SDL_GetWindowPosition(SDL_WindowID windowID, int *x, int *y)
@@ -556,8 +554,8 @@
  *
  * \sa SDL_SetWindowPosition()
  */
-extern DECLSPEC void SDLCALL SDL_GetWindowPosition (SDL_WindowID windowID,
-                                                    int *x, int *y);
+extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_WindowID windowID,
+                                                   int *x, int *y);
 
 /**
  * \fn void SDL_SetWindowSize(SDL_WindowID windowID, int w, int w)
@@ -569,8 +567,8 @@
  *
  * \sa SDL_GetWindowSize()
  */
-extern DECLSPEC void SDLCALL SDL_SetWindowSize (SDL_WindowID windowID, int w,
-                                                int h);
+extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_WindowID windowID, int w,
+                                               int h);
 
 /**
  * \fn void SDL_GetWindowSize(SDL_WindowID windowID, int *w, int *w)
@@ -579,8 +577,8 @@
  *
  * \sa SDL_SetWindowSize()
  */
-extern DECLSPEC void SDLCALL SDL_GetWindowSize (SDL_WindowID windowID, int *w,
-                                                int *h);
+extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_WindowID windowID, int *w,
+                                               int *h);
 
 /**
  * \fn void SDL_ShowWindow(SDL_WindowID windowID)
@@ -589,7 +587,7 @@
  *
  * \sa SDL_HideWindow()
  */
-extern DECLSPEC void SDLCALL SDL_ShowWindow (SDL_WindowID windowID);
+extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_WindowID windowID);
 
 /**
  * \fn void SDL_HideWindow(SDL_WindowID windowID)
@@ -598,14 +596,14 @@
  *
  * \sa SDL_ShowWindow()
  */
-extern DECLSPEC void SDLCALL SDL_HideWindow (SDL_WindowID windowID);
+extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_WindowID windowID);
 
 /**
  * \fn void SDL_RaiseWindow(SDL_WindowID windowID)
  *
  * \brief Raise the window so it's above other windows.
  */
-extern DECLSPEC void SDLCALL SDL_RaiseWindow (SDL_WindowID windowID);
+extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_WindowID windowID);
 
 /**
  * \fn void SDL_MaximizeWindow(SDL_WindowID windowID)
@@ -614,7 +612,7 @@
  *
  * \sa SDL_RestoreWindow()
  */
-extern DECLSPEC void SDLCALL SDL_MaximizeWindow (SDL_WindowID windowID);
+extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_WindowID windowID);
 
 /**
  * \fn void SDL_MinimizeWindow(SDL_WindowID windowID)
@@ -623,7 +621,7 @@
  *
  * \sa SDL_RestoreWindow()
  */
-extern DECLSPEC void SDLCALL SDL_MinimizeWindow (SDL_WindowID windowID);
+extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_WindowID windowID);
 
 /**
  * \fn void SDL_RestoreWindow(SDL_WindowID windowID)
@@ -633,7 +631,7 @@
  * \sa SDL_MaximizeWindow()
  * \sa SDL_MinimizeWindow()
  */
-extern DECLSPEC void SDLCALL SDL_RestoreWindow (SDL_WindowID windowID);
+extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_WindowID windowID);
 
 /**
  * \fn void SDL_SetWindowGrab(SDL_WindowID windowID, int mode)
@@ -645,8 +643,8 @@
  * \sa SDL_GrabMode
  * \sa SDL_GetWindowGrab()
  */
-extern DECLSPEC void SDLCALL SDL_SetWindowGrab (SDL_WindowID windowID,
-                                                int mode);
+extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_WindowID windowID,
+                                               int mode);
 
 /**
  * \fn int SDL_GetWindowGrab(SDL_WindowID windowID)
@@ -658,24 +656,24 @@
  * \sa SDL_GrabMode
  * \sa SDL_SetWindowGrab()
  */
-extern DECLSPEC int SDLCALL SDL_GetWindowGrab (SDL_WindowID windowID);
+extern DECLSPEC int SDLCALL SDL_GetWindowGrab(SDL_WindowID windowID);
 
 /**
  * \fn void SDL_DestroyWindow(SDL_WindowID windowID)
  *
  * \brief Destroy a window.
  */
-extern DECLSPEC void SDLCALL SDL_DestroyWindow (SDL_WindowID windowID);
+extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_WindowID windowID);
 
 /**
  * \fn SDL_Surface *SDL_CreateWindowSurface (SDL_WindowID windowID, Uint32 format, Uint32 flags)
  *
  * \brief Create an SDL_Surface representing the drawing area of the window.
  */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateWindowSurface (SDL_WindowID
-                                                              windowID,
-                                                              Uint32 format,
-                                                              Uint32 flags);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateWindowSurface(SDL_WindowID
+                                                             windowID,
+                                                             Uint32 format,
+                                                             Uint32 flags);
 
 /*
  * Makes sure the given list of rectangles is updated on the given screen.
@@ -698,7 +696,7 @@
  * setting the video mode for this function to perform hardware flipping.
  * This function returns 0 if successful, or -1 if there was an error.
  */
-extern DECLSPEC int SDLCALL SDL_Flip (SDL_Surface * screen);
+extern DECLSPEC int SDLCALL SDL_Flip(SDL_Surface * screen);
 
 /*
  * Set the gamma correction for each of the color channels.
@@ -708,7 +706,7 @@
  * be emulated using gamma ramps, if available.  If successful, this
  * function returns 0, otherwise it returns -1.
  */
-extern DECLSPEC int SDLCALL SDL_SetGamma (float red, float green, float blue);
+extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
 
 /*
  * Set the gamma translation table for the red, green, and blue channels
@@ -722,9 +720,9 @@
  * hardware does not support gamma translation, or otherwise fails,
  * this function will return -1.
  */
-extern DECLSPEC int SDLCALL SDL_SetGammaRamp (const Uint16 * red,
-                                              const Uint16 * green,
-                                              const Uint16 * blue);
+extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red,
+                                             const Uint16 * green,
+                                             const Uint16 * blue);
 
 /*
  * Retrieve the current values of the gamma translation tables.
@@ -735,8 +733,8 @@
  * hardware does not support gamma translation, or otherwise fails,
  * this function will return -1.
  */
-extern DECLSPEC int SDLCALL SDL_GetGammaRamp (Uint16 * red, Uint16 * green,
-                                              Uint16 * blue);
+extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
+                                             Uint16 * blue);
 
 /*
  * Sets a portion of the colormap for the given 8-bit surface.  If 'surface'
@@ -753,9 +751,9 @@
  * you desire, even if the window colormap has to be warped or run under
  * emulation.
  */
-extern DECLSPEC int SDLCALL SDL_SetColors (SDL_Surface * surface,
-                                           SDL_Color * colors, int firstcolor,
-                                           int ncolors);
+extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface * surface,
+                                          SDL_Color * colors, int firstcolor,
+                                          int ncolors);
 
 /*
  * Maps an RGB triple to an opaque pixel value for a given pixel format
@@ -766,22 +764,22 @@
 /*
  * Maps an RGBA quadruple to a pixel value for a given pixel format
  */
-extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA (SDL_PixelFormat * format,
-                                            Uint8 r, Uint8 g, Uint8 b,
-                                            Uint8 a);
+extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(SDL_PixelFormat * format,
+                                           Uint8 r, Uint8 g, Uint8 b,
+                                           Uint8 a);
 
 /*
  * Maps a pixel value into the RGB components for a given pixel format
  */
-extern DECLSPEC void SDLCALL SDL_GetRGB (Uint32 pixel, SDL_PixelFormat * fmt,
-                                         Uint8 * r, Uint8 * g, Uint8 * b);
+extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, SDL_PixelFormat * fmt,
+                                        Uint8 * r, Uint8 * g, Uint8 * b);
 
 /*
  * Maps a pixel value into the RGBA components for a given pixel format
  */
-extern DECLSPEC void SDLCALL SDL_GetRGBA (Uint32 pixel, SDL_PixelFormat * fmt,
-                                          Uint8 * r, Uint8 * g, Uint8 * b,
-                                          Uint8 * a);
+extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat * fmt,
+                                         Uint8 * r, Uint8 * g, Uint8 * b,
+                                         Uint8 * a);
 
 /*
  * Allocate and free an RGB surface (must be called after SDL_SetVideoMode)
@@ -821,16 +819,16 @@
 extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
     (Uint32 flags, int width, int height, int depth,
      Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
-extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom (void *pixels,
-                                                               int width,
-                                                               int height,
-                                                               int depth,
-                                                               int pitch,
-                                                               Uint32 Rmask,
-                                                               Uint32 Gmask,
-                                                               Uint32 Bmask,
-                                                               Uint32 Amask);
-extern DECLSPEC void SDLCALL SDL_FreeSurface (SDL_Surface * surface);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
+                                                              int width,
+                                                              int height,
+                                                              int depth,
+                                                              int pitch,
+                                                              Uint32 Rmask,
+                                                              Uint32 Gmask,
+                                                              Uint32 Bmask,
+                                                              Uint32 Amask);
+extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
 
 /*
  * SDL_LockSurface() sets up a surface for directly accessing the pixels.
@@ -850,8 +848,8 @@
  *
  * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
  */
-extern DECLSPEC int SDLCALL SDL_LockSurface (SDL_Surface * surface);
-extern DECLSPEC void SDLCALL SDL_UnlockSurface (SDL_Surface * surface);
+extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
+extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
 
 /*
  * Load a surface from a seekable SDL data source (memory or file.)
@@ -859,8 +857,8 @@
  * Returns the new surface, or NULL if there was an error.
  * The new surface should be freed with SDL_FreeSurface().
  */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW (SDL_RWops * src,
-                                                     int freesrc);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
+                                                    int freesrc);
 
 /* Convenience macro -- load a surface from a file */
 #define SDL_LoadBMP(file)	SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
@@ -904,8 +902,8 @@
  *
  * The 'alpha' parameter is ignored for surfaces that have an alpha channel.
  */
-extern DECLSPEC int SDLCALL SDL_SetAlpha (SDL_Surface * surface, Uint32 flag,
-                                          Uint8 alpha);
+extern DECLSPEC int SDLCALL SDL_SetAlpha(SDL_Surface * surface, Uint32 flag,
+                                         Uint8 alpha);
 
 /*
  * Sets the clipping rectangle for the destination surface in a blit.
@@ -919,16 +917,16 @@
  * Note that blits are automatically clipped to the edges of the source
  * and destination surfaces.
  */
-extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect (SDL_Surface * surface,
-                                                  const SDL_Rect * rect);
+extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
+                                                 const SDL_Rect * rect);
 
 /*
  * Gets the clipping rectangle for the destination surface in a blit.
  * 'rect' must be a pointer to a valid rectangle which will be filled
  * with the correct values.
  */
-extern DECLSPEC void SDLCALL SDL_GetClipRect (SDL_Surface * surface,
-                                              SDL_Rect * rect);
+extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
+                                             SDL_Rect * rect);
 
 /*
  * Creates a new surface of the specified format, and then copies and maps 
@@ -1052,8 +1050,7 @@
  *
  * If the conversion fails or runs out of memory, it returns NULL
  */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormat (SDL_Surface *
-                                                        surface);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormat(SDL_Surface * surface);
 
 /* 
  * This function takes a surface and copies it to a new surface of the
@@ -1067,8 +1064,8 @@
  *
  * If the conversion fails or runs out of memory, it returns NULL
  */
-extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormatAlpha (SDL_Surface *
-                                                             surface);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormatAlpha(SDL_Surface *
+                                                            surface);
 
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1080,15 +1077,15 @@
    the contents of the display surface underneath the area where the overlay
    is shown is undefined - it may be overwritten with the converted YUV data.
 */
-extern DECLSPEC SDL_Overlay *SDLCALL SDL_CreateYUVOverlay (int width,
-                                                           int height,
-                                                           Uint32 format,
-                                                           SDL_Surface *
-                                                           display);
+extern DECLSPEC SDL_Overlay *SDLCALL SDL_CreateYUVOverlay(int width,
+                                                          int height,
+                                                          Uint32 format,
+                                                          SDL_Surface *
+                                                          display);
 
 /* Lock an overlay for direct access, and unlock it when you are done */
-extern DECLSPEC int SDLCALL SDL_LockYUVOverlay (SDL_Overlay * overlay);
-extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay (SDL_Overlay * overlay);
+extern DECLSPEC int SDLCALL SDL_LockYUVOverlay(SDL_Overlay * overlay);
+extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay * overlay);
 
 /* Blit a video overlay to the display surface.
    The contents of the video surface underneath the blit destination are
@@ -1096,11 +1093,11 @@
    The width and height of the destination rectangle may be different from
    that of the overlay, but currently only 2x scaling is supported.
 */
-extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay (SDL_Overlay * overlay,
-                                                   SDL_Rect * dstrect);
+extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
+                                                  SDL_Rect * dstrect);
 
 /* Free a video overlay */
-extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay (SDL_Overlay * overlay);
+extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay);
 
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -1113,17 +1110,17 @@
  * If you do this, you need to retrieve all of the GL functions used in
  * your program from the dynamic library using SDL_GL_GetProcAddress().
  */
-extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary (const char *path);
+extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
 
 /*
  * Get the address of a GL function
  */
-extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress (const char *proc);
+extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
 
 /*
  * Set an attribute of the OpenGL subsystem before window creation.
  */
-extern DECLSPEC int SDLCALL SDL_GL_SetAttribute (SDL_GLattr attr, int value);
+extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
 
 /*
  * Get an attribute of the OpenGL subsystem from the windowing
@@ -1134,18 +1131,18 @@
  * Developers should track the values they pass into SDL_GL_SetAttribute
  * themselves if they want to retrieve these values.
  */
-extern DECLSPEC int SDLCALL SDL_GL_GetAttribute (SDL_GLattr attr, int *value);
+extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
 
 /*
  * Swap the OpenGL buffers, if double-buffering is supported.
  */
-extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers (void);
+extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
 
 /* Not in public API at the moment - do not use! */
-extern DECLSPEC int SDLCALL SDL_SoftStretch (SDL_Surface * src,
-                                             SDL_Rect * srcrect,
-                                             SDL_Surface * dst,
-                                             SDL_Rect * dstrect);
+extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
+                                            SDL_Rect * srcrect,
+                                            SDL_Surface * dst,
+                                            SDL_Rect * dstrect);
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus
--- a/src/SDL.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/SDL.c	Mon May 29 04:04:35 2006 +0000
@@ -35,17 +35,17 @@
 
 /* Initialization/Cleanup routines */
 #if !SDL_JOYSTICK_DISABLED
-extern int SDL_JoystickInit (void);
-extern void SDL_JoystickQuit (void);
+extern int SDL_JoystickInit(void);
+extern void SDL_JoystickQuit(void);
 #endif
 #if !SDL_CDROM_DISABLED
-extern int SDL_CDROMInit (void);
-extern void SDL_CDROMQuit (void);
+extern int SDL_CDROMInit(void);
+extern void SDL_CDROMQuit(void);
 #endif
 #if !SDL_TIMERS_DISABLED
-extern void SDL_StartTicks (void);
-extern int SDL_TimerInit (void);
-extern void SDL_TimerQuit (void);
+extern void SDL_StartTicks(void);
+extern int SDL_TimerInit(void);
+extern void SDL_TimerQuit(void);
 #endif
 
 /* The initialized subsystems */
@@ -57,20 +57,20 @@
 #endif
 
 int
-SDL_InitSubSystem (Uint32 flags)
+SDL_InitSubSystem(Uint32 flags)
 {
 #if !SDL_VIDEO_DISABLED
     /* Initialize the video/event subsystem */
     if ((flags & SDL_INIT_VIDEO) && !(SDL_initialized & SDL_INIT_VIDEO)) {
-        if (SDL_VideoInit (SDL_getenv ("SDL_VIDEODRIVER"),
-                           (flags & SDL_INIT_EVENTTHREAD)) < 0) {
+        if (SDL_VideoInit(SDL_getenv("SDL_VIDEODRIVER"),
+                          (flags & SDL_INIT_EVENTTHREAD)) < 0) {
             return (-1);
         }
         SDL_initialized |= SDL_INIT_VIDEO;
     }
 #else
     if (flags & SDL_INIT_VIDEO) {
-        SDL_SetError ("SDL not built with video support");
+        SDL_SetError("SDL not built with video support");
         return (-1);
     }
 #endif
@@ -78,14 +78,14 @@
 #if !SDL_AUDIO_DISABLED
     /* Initialize the audio subsystem */
     if ((flags & SDL_INIT_AUDIO) && !(SDL_initialized & SDL_INIT_AUDIO)) {
-        if (SDL_AudioInit (SDL_getenv ("SDL_AUDIODRIVER")) < 0) {
+        if (SDL_AudioInit(SDL_getenv("SDL_AUDIODRIVER")) < 0) {
             return (-1);
         }
         SDL_initialized |= SDL_INIT_AUDIO;
     }
 #else
     if (flags & SDL_INIT_AUDIO) {
-        SDL_SetError ("SDL not built with audio support");
+        SDL_SetError("SDL not built with audio support");
         return (-1);
     }
 #endif
@@ -93,18 +93,18 @@
 #if !SDL_TIMERS_DISABLED
     /* Initialize the timer subsystem */
     if (!ticks_started) {
-        SDL_StartTicks ();
+        SDL_StartTicks();
         ticks_started = 1;
     }
     if ((flags & SDL_INIT_TIMER) && !(SDL_initialized & SDL_INIT_TIMER)) {
-        if (SDL_TimerInit () < 0) {
+        if (SDL_TimerInit() < 0) {
             return (-1);
         }
         SDL_initialized |= SDL_INIT_TIMER;
     }
 #else
     if (flags & SDL_INIT_TIMER) {
-        SDL_SetError ("SDL not built with timer support");
+        SDL_SetError("SDL not built with timer support");
         return (-1);
     }
 #endif
@@ -112,14 +112,14 @@
 #if !SDL_JOYSTICK_DISABLED
     /* Initialize the joystick subsystem */
     if ((flags & SDL_INIT_JOYSTICK) && !(SDL_initialized & SDL_INIT_JOYSTICK)) {
-        if (SDL_JoystickInit () < 0) {
+        if (SDL_JoystickInit() < 0) {
             return (-1);
         }
         SDL_initialized |= SDL_INIT_JOYSTICK;
     }
 #else
     if (flags & SDL_INIT_JOYSTICK) {
-        SDL_SetError ("SDL not built with joystick support");
+        SDL_SetError("SDL not built with joystick support");
         return (-1);
     }
 #endif
@@ -127,14 +127,14 @@
 #if !SDL_CDROM_DISABLED
     /* Initialize the CD-ROM subsystem */
     if ((flags & SDL_INIT_CDROM) && !(SDL_initialized & SDL_INIT_CDROM)) {
-        if (SDL_CDROMInit () < 0) {
+        if (SDL_CDROMInit() < 0) {
             return (-1);
         }
         SDL_initialized |= SDL_INIT_CDROM;
     }
 #else
     if (flags & SDL_INIT_CDROM) {
-        SDL_SetError ("SDL not built with cdrom support");
+        SDL_SetError("SDL not built with cdrom support");
         return (-1);
     }
 #endif
@@ -142,67 +142,67 @@
 }
 
 int
-SDL_Init (Uint32 flags)
+SDL_Init(Uint32 flags)
 {
 #if !SDL_THREADS_DISABLED && SDL_THREAD_PTH
-    if (!pth_init ()) {
+    if (!pth_init()) {
         return -1;
     }
 #endif
 
     /* Clear the error message */
-    SDL_ClearError ();
+    SDL_ClearError();
 
     /* Initialize the desired subsystems */
-    if (SDL_InitSubSystem (flags) < 0) {
+    if (SDL_InitSubSystem(flags) < 0) {
         return (-1);
     }
 
     /* Everything is initialized */
     if (!(flags & SDL_INIT_NOPARACHUTE)) {
-        SDL_InstallParachute ();
+        SDL_InstallParachute();
     }
     return (0);
 }
 
 void
-SDL_QuitSubSystem (Uint32 flags)
+SDL_QuitSubSystem(Uint32 flags)
 {
     /* Shut down requested initialized subsystems */
 #if !SDL_CDROM_DISABLED
     if ((flags & SDL_initialized & SDL_INIT_CDROM)) {
-        SDL_CDROMQuit ();
+        SDL_CDROMQuit();
         SDL_initialized &= ~SDL_INIT_CDROM;
     }
 #endif
 #if !SDL_JOYSTICK_DISABLED
     if ((flags & SDL_initialized & SDL_INIT_JOYSTICK)) {
-        SDL_JoystickQuit ();
+        SDL_JoystickQuit();
         SDL_initialized &= ~SDL_INIT_JOYSTICK;
     }
 #endif
 #if !SDL_TIMERS_DISABLED
     if ((flags & SDL_initialized & SDL_INIT_TIMER)) {
-        SDL_TimerQuit ();
+        SDL_TimerQuit();
         SDL_initialized &= ~SDL_INIT_TIMER;
     }
 #endif
 #if !SDL_AUDIO_DISABLED
     if ((flags & SDL_initialized & SDL_INIT_AUDIO)) {
-        SDL_AudioQuit ();
+        SDL_AudioQuit();
         SDL_initialized &= ~SDL_INIT_AUDIO;
     }
 #endif
 #if !SDL_VIDEO_DISABLED
     if ((flags & SDL_initialized & SDL_INIT_VIDEO)) {
-        SDL_VideoQuit ();
+        SDL_VideoQuit();
         SDL_initialized &= ~SDL_INIT_VIDEO;
     }
 #endif
 }
 
 Uint32
-SDL_WasInit (Uint32 flags)
+SDL_WasInit(Uint32 flags)
 {
     if (!flags) {
         flags = SDL_INIT_EVERYTHING;
@@ -211,50 +211,50 @@
 }
 
 void
-SDL_Quit (void)
+SDL_Quit(void)
 {
     /* Quit all subsystems */
 #ifdef DEBUG_BUILD
-    printf ("[SDL_Quit] : Enter! Calling QuitSubSystem()\n");
-    fflush (stdout);
+    printf("[SDL_Quit] : Enter! Calling QuitSubSystem()\n");
+    fflush(stdout);
 #endif
-    SDL_QuitSubSystem (SDL_INIT_EVERYTHING);
+    SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
 
 #ifdef CHECK_LEAKS
 #ifdef DEBUG_BUILD
-    printf ("[SDL_Quit] : CHECK_LEAKS\n");
-    fflush (stdout);
+    printf("[SDL_Quit] : CHECK_LEAKS\n");
+    fflush(stdout);
 #endif
 
     /* Print the number of surfaces not freed */
     if (surfaces_allocated != 0) {
-        fprintf (stderr, "SDL Warning: %d SDL surfaces extant\n",
-                 surfaces_allocated);
+        fprintf(stderr, "SDL Warning: %d SDL surfaces extant\n",
+                surfaces_allocated);
     }
 #endif
 #ifdef DEBUG_BUILD
-    printf ("[SDL_Quit] : SDL_UninstallParachute()\n");
-    fflush (stdout);
+    printf("[SDL_Quit] : SDL_UninstallParachute()\n");
+    fflush(stdout);
 #endif
 
     /* Uninstall any parachute signal handlers */
-    SDL_UninstallParachute ();
+    SDL_UninstallParachute();
 
 #if !SDL_THREADS_DISABLED && SDL_THREAD_PTH
-    pth_kill ();
+    pth_kill();
 #endif
 #ifdef DEBUG_BUILD
-    printf ("[SDL_Quit] : Returning!\n");
-    fflush (stdout);
+    printf("[SDL_Quit] : Returning!\n");
+    fflush(stdout);
 #endif
 
 }
 
 /* Get the library version number */
 void
-SDL_GetVersion (SDL_version * ver)
+SDL_GetVersion(SDL_version * ver)
 {
-    SDL_VERSION (ver);
+    SDL_VERSION(ver);
 }
 
 #if defined(__OS2__)
@@ -267,9 +267,9 @@
 
 /* Exception handler to prevent the Audio thread hanging, making a zombie process! */
 ULONG _System
-SDL_Main_ExceptionHandler (PEXCEPTIONREPORTRECORD pERepRec,
-                           PEXCEPTIONREGISTRATIONRECORD pERegRec,
-                           PCONTEXTRECORD pCtxRec, PVOID p)
+SDL_Main_ExceptionHandler(PEXCEPTIONREPORTRECORD pERepRec,
+                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
+                          PCONTEXTRECORD pCtxRec, PVOID p)
 {
     if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
         return XCPT_CONTINUE_SEARCH;
@@ -288,7 +288,7 @@
             printf
                 ("[SDL_Main_ExceptionHandler] : Calling SDL_CloseAudio()!\n");
 #endif
-            SDL_CloseAudio ();
+            SDL_CloseAudio();
         }
     }
     return (XCPT_CONTINUE_SEARCH);
@@ -300,26 +300,26 @@
 
 /* The main DLL entry for DLL Initialization and Uninitialization: */
 unsigned _System
-LibMain (unsigned hmod, unsigned termination)
+LibMain(unsigned hmod, unsigned termination)
 {
     if (termination) {
 #ifdef DEBUG_BUILD
 /*    printf("[SDL DLL Unintialization] : Removing exception handler\n"); */
 #endif
-        DosUnsetExceptionHandler (&SDL_Main_xcpthand);
+        DosUnsetExceptionHandler(&SDL_Main_xcpthand);
         return 1;
     } else {
 #ifdef DEBUG_BUILD
         /* Make stdout and stderr unbuffered! */
-        setbuf (stdout, NULL);
-        setbuf (stderr, NULL);
+        setbuf(stdout, NULL);
+        setbuf(stderr, NULL);
 #endif
         /* Fire up exception handler */
 #ifdef DEBUG_BUILD
 /*    printf("[SDL DLL Initialization] : Setting exception handler\n"); */
 #endif
         /* Set exception handler */
-        DosSetExceptionHandler (&SDL_Main_xcpthand);
+        DosSetExceptionHandler(&SDL_Main_xcpthand);
 
         return 1;
     }
@@ -334,8 +334,8 @@
 #include <windows.h>
 
 BOOL APIENTRY
-_DllMainCRTStartup (HANDLE hModule,
-                    DWORD ul_reason_for_call, LPVOID lpReserved)
+_DllMainCRTStartup(HANDLE hModule,
+                   DWORD ul_reason_for_call, LPVOID lpReserved)
 {
     switch (ul_reason_for_call) {
     case DLL_PROCESS_ATTACH:
--- a/src/SDL_compat.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/SDL_compat.c	Mon May 29 04:04:35 2006 +0000
@@ -32,48 +32,48 @@
 static char *wm_title;
 
 char *
-SDL_AudioDriverName (char *namebuf, int maxlen)
+SDL_AudioDriverName(char *namebuf, int maxlen)
 {
-    const char *name = SDL_GetCurrentAudioDriver ();
+    const char *name = SDL_GetCurrentAudioDriver();
     if (name) {
-        SDL_strlcpy (namebuf, name, maxlen);
+        SDL_strlcpy(namebuf, name, maxlen);
         return namebuf;
     }
     return NULL;
 }
 
 char *
-SDL_VideoDriverName (char *namebuf, int maxlen)
+SDL_VideoDriverName(char *namebuf, int maxlen)
 {
-    const char *name = SDL_GetCurrentVideoDriver ();
+    const char *name = SDL_GetCurrentVideoDriver();
     if (name) {
-        SDL_strlcpy (namebuf, name, maxlen);
+        SDL_strlcpy(namebuf, name, maxlen);
         return namebuf;
     }
     return NULL;
 }
 
 int
-SDL_VideoModeOK (int width, int height, int bpp, Uint32 flags)
+SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags)
 {
     int i, actual_bpp = 0;
 
-    if (!SDL_GetVideoDevice ()) {
+    if (!SDL_GetVideoDevice()) {
         return 0;
     }
 
     if (!(flags & SDL_FULLSCREEN)) {
-        return SDL_BITSPERPIXEL (SDL_GetDesktopDisplayMode ()->format);
+        return SDL_BITSPERPIXEL(SDL_GetDesktopDisplayMode()->format);
     }
 
-    for (i = 0; i < SDL_GetNumDisplayModes (); ++i) {
-        const SDL_DisplayMode *mode = SDL_GetDisplayMode (i);
+    for (i = 0; i < SDL_GetNumDisplayModes(); ++i) {
+        const SDL_DisplayMode *mode = SDL_GetDisplayMode(i);
         if (!mode->w || !mode->h || (width == mode->w && height == mode->h)) {
             if (!mode->format) {
                 return bpp;
             }
-            if (SDL_BITSPERPIXEL (mode->format) >= bpp) {
-                actual_bpp = SDL_BITSPERPIXEL (mode->format);
+            if (SDL_BITSPERPIXEL(mode->format) >= bpp) {
+                actual_bpp = SDL_BITSPERPIXEL(mode->format);
             }
         }
     }
@@ -81,12 +81,12 @@
 }
 
 SDL_Rect **
-SDL_ListModes (SDL_PixelFormat * format, Uint32 flags)
+SDL_ListModes(SDL_PixelFormat * format, Uint32 flags)
 {
     int i, nmodes;
     SDL_Rect **modes;
 
-    if (!SDL_GetVideoDevice ()) {
+    if (!SDL_GetVideoDevice()) {
         return NULL;
     }
 
@@ -96,12 +96,12 @@
 
     /* Memory leak, but this is a compatibility function, who cares? */
     nmodes = 0;
-    for (i = 0; i < SDL_GetNumDisplayModes (); ++i) {
-        const SDL_DisplayMode *mode = SDL_GetDisplayMode (i);
+    for (i = 0; i < SDL_GetNumDisplayModes(); ++i) {
+        const SDL_DisplayMode *mode = SDL_GetDisplayMode(i);
         if (!mode->w || !mode->h) {
             return (SDL_Rect **) (-1);
         }
-        if (SDL_BITSPERPIXEL (mode->format) != format->BitsPerPixel) {
+        if (SDL_BITSPERPIXEL(mode->format) != format->BitsPerPixel) {
             continue;
         }
         if (nmodes > 0 && modes[nmodes - 1]->w == mode->w
@@ -109,11 +109,11 @@
             continue;
         }
 
-        modes = SDL_realloc (modes, (nmodes + 2) * sizeof (*modes));
+        modes = SDL_realloc(modes, (nmodes + 2) * sizeof(*modes));
         if (!modes) {
             return NULL;
         }
-        modes[nmodes] = (SDL_Rect *) SDL_malloc (sizeof (SDL_Rect));
+        modes[nmodes] = (SDL_Rect *) SDL_malloc(sizeof(SDL_Rect));
         if (!modes[nmodes]) {
             return NULL;
         }
@@ -130,7 +130,7 @@
 }
 
 SDL_Surface *
-SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
+SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
 {
     SDL_DisplayMode mode;
     int i;
@@ -138,14 +138,14 @@
     Uint32 desktop_format;
     Uint32 desired_format;
 
-    if (!SDL_GetVideoDevice ()) {
-        if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) {
+    if (!SDL_GetVideoDevice()) {
+        if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) {
             return NULL;
         }
     }
 
     /* Destroy existing window */
-    SDL_DestroyWindow (window);
+    SDL_DestroyWindow(window);
 
     /* Create a new window */
     window_flags = SDL_WINDOW_SHOWN;
@@ -161,13 +161,13 @@
     if (flags & SDL_NOFRAME) {
         window_flags |= SDL_WINDOW_BORDERLESS;
     }
-    window = SDL_CreateWindow (wm_title, 0, 0, width, height, window_flags);
+    window = SDL_CreateWindow(wm_title, 0, 0, width, height, window_flags);
     if (!window) {
         return NULL;
     }
 
     /* Set up the desired display mode */
-    desktop_format = SDL_GetDesktopDisplayMode ()->format;
+    desktop_format = SDL_GetDesktopDisplayMode()->format;
     if ((bpp == SDL_BITSPERPIXEL(desktop_format)) ||
         (desktop_format && (flags & SDL_ANYFORMAT))) {
         desired_format = desktop_format;
@@ -189,7 +189,7 @@
             desired_format = SDL_PixelFormat_RGB888;
             break;
         default:
-            SDL_SetError ("Unsupported bpp in SDL_SetVideoMode()");
+            SDL_SetError("Unsupported bpp in SDL_SetVideoMode()");
             return NULL;
         }
     }
@@ -200,41 +200,41 @@
 
     /* Set the desired display mode */
     if (flags & SDL_FULLSCREEN) {
-        if (!SDL_GetClosestDisplayMode (&mode, &mode)) {
+        if (!SDL_GetClosestDisplayMode(&mode, &mode)) {
             return NULL;
         }
     } else {
-        mode = *SDL_GetDesktopDisplayMode ();
+        mode = *SDL_GetDesktopDisplayMode();
     }
-    if (SDL_SetDisplayMode (&mode) < 0) {
+    if (SDL_SetDisplayMode(&mode) < 0) {
         return NULL;
     }
 
     /* Create the display surface */
-    return SDL_CreateWindowSurface (window, desired_format, flags);
+    return SDL_CreateWindowSurface(window, desired_format, flags);
 }
 
 SDL_Surface *
-SDL_GetVideoSurface (void)
+SDL_GetVideoSurface(void)
 {
-    SDL_VideoDevice *_this = SDL_GetVideoDevice ();
+    SDL_VideoDevice *_this = SDL_GetVideoDevice();
 
     return SDL_VideoSurface;
 }
 
 void
-SDL_WM_SetCaption (const char *title, const char *icon)
+SDL_WM_SetCaption(const char *title, const char *icon)
 {
     if (wm_title) {
-        SDL_free (wm_title);
+        SDL_free(wm_title);
     } else {
-        wm_title = SDL_strdup (title);
+        wm_title = SDL_strdup(title);
     }
-    SDL_SetWindowTitle (window, wm_title);
+    SDL_SetWindowTitle(window, wm_title);
 }
 
 void
-SDL_WM_GetCaption (char **title, char **icon)
+SDL_WM_GetCaption(char **title, char **icon)
 {
     if (title) {
         *title = wm_title;
@@ -245,39 +245,39 @@
 }
 
 void
-SDL_WM_SetIcon (SDL_Surface * icon, Uint8 * mask)
+SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask)
 {
     /* FIXME */
 }
 
 int
-SDL_WM_IconifyWindow (void)
+SDL_WM_IconifyWindow(void)
 {
-    SDL_MinimizeWindow (window);
+    SDL_MinimizeWindow(window);
 }
 
 int
-SDL_WM_ToggleFullScreen (SDL_Surface * surface)
+SDL_WM_ToggleFullScreen(SDL_Surface * surface)
 {
     return 0;
 }
 
 SDL_GrabMode
-SDL_WM_GrabInput (SDL_GrabMode mode)
+SDL_WM_GrabInput(SDL_GrabMode mode)
 {
     if (mode != SDL_GRAB_QUERY) {
-        SDL_SetWindowGrab (window, mode);
+        SDL_SetWindowGrab(window, mode);
     }
-    return (SDL_GrabMode) SDL_GetWindowGrab (window);
+    return (SDL_GrabMode) SDL_GetWindowGrab(window);
 }
 
 Uint8
-SDL_GetAppState (void)
+SDL_GetAppState(void)
 {
     Uint8 state = 0;
     Uint32 flags = 0;
 
-    flags = SDL_GetWindowFlags (window);
+    flags = SDL_GetWindowFlags(window);
     if ((flags & SDL_WINDOW_SHOWN) && !(flags & SDL_WINDOW_MINIMIZED)) {
         state |= SDL_APPACTIVE;
     }
@@ -291,24 +291,24 @@
 }
 
 const SDL_version *
-SDL_Linked_Version (void)
+SDL_Linked_Version(void)
 {
     static SDL_version version;
-    SDL_VERSION (&version);
+    SDL_VERSION(&version);
     return &version;
 }
 
 int
-SDL_SetPalette (SDL_Surface * surface, int flags, SDL_Color * colors,
-                int firstcolor, int ncolors)
+SDL_SetPalette(SDL_Surface * surface, int flags, SDL_Color * colors,
+               int firstcolor, int ncolors)
 {
-    SDL_SetColors (surface, colors, firstcolor, ncolors);
+    SDL_SetColors(surface, colors, firstcolor, ncolors);
 }
 
 int
-SDL_GetWMInfo (SDL_SysWMinfo * info)
+SDL_GetWMInfo(SDL_SysWMinfo * info)
 {
-    return SDL_GetWindowWMInfo (window, info);
+    return SDL_GetWindowWMInfo(window, info);
 }
 
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/SDL_error.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/SDL_error.c	Mon May 29 04:04:35 2006 +0000
@@ -32,7 +32,7 @@
 static SDL_error SDL_global_error;
 #define SDL_GetErrBuf()	(&SDL_global_error)
 #else
-extern SDL_error *SDL_GetErrBuf (void);
+extern SDL_error *SDL_GetErrBuf(void);
 #endif /* SDL_THREADS_DISABLED */
 
 #define SDL_ERRBUFIZE	1024
@@ -40,7 +40,7 @@
 /* Private functions */
 
 static const char *
-SDL_LookupString (const char *key)
+SDL_LookupString(const char *key)
 {
     /* FIXME: Add code to lookup key in language string hash-table */
     return key;
@@ -49,17 +49,17 @@
 /* Public functions */
 
 void
-SDL_SetError (const char *fmt, ...)
+SDL_SetError(const char *fmt, ...)
 {
     va_list ap;
     SDL_error *error;
 
     /* Copy in the key, mark error as valid */
-    error = SDL_GetErrBuf ();
+    error = SDL_GetErrBuf();
     error->error = 1;
-    SDL_strlcpy ((char *) error->key, fmt, sizeof (error->key));
+    SDL_strlcpy((char *) error->key, fmt, sizeof(error->key));
 
-    va_start (ap, fmt);
+    va_start(ap, fmt);
     error->argc = 0;
     while (*fmt) {
         if (*fmt++ == '%') {
@@ -77,22 +77,22 @@
             case 'o':
             case 'x':
             case 'X':
-                error->args[error->argc++].value_i = va_arg (ap, int);
+                error->args[error->argc++].value_i = va_arg(ap, int);
                 break;
             case 'f':
-                error->args[error->argc++].value_f = va_arg (ap, double);
+                error->args[error->argc++].value_f = va_arg(ap, double);
                 break;
             case 'p':
-                error->args[error->argc++].value_ptr = va_arg (ap, void *);
+                error->args[error->argc++].value_ptr = va_arg(ap, void *);
                 break;
             case 's':
                 {
                     int i = error->argc;
-                    const char *str = va_arg (ap, const char *);
+                    const char *str = va_arg(ap, const char *);
                     if (str == NULL)
                         str = "(null)";
-                    SDL_strlcpy ((char *) error->args[i].buf, str,
-                                 ERR_MAX_STRLEN);
+                    SDL_strlcpy((char *) error->args[i].buf, str,
+                                ERR_MAX_STRLEN);
                     error->argc++;
                 }
                 break;
@@ -104,11 +104,11 @@
             }
         }
     }
-    va_end (ap);
+    va_end(ap);
 
     /* If we are in debug mode, print out an error message */
 #ifdef DEBUG_ERROR
-    fprintf (stderr, "SDL_SetError: %s\n", SDL_GetError ());
+    fprintf(stderr, "SDL_SetError: %s\n", SDL_GetError());
 #endif
 }
 
@@ -116,7 +116,7 @@
    so that it supports internationalization and thread-safe errors.
 */
 char *
-SDL_GetErrorMsg (char *errstr, unsigned int maxlen)
+SDL_GetErrorMsg(char *errstr, unsigned int maxlen)
 {
     SDL_error *error;
 
@@ -125,21 +125,21 @@
     --maxlen;
 
     /* Get the thread-safe error, and print it out */
-    error = SDL_GetErrBuf ();
+    error = SDL_GetErrBuf();
     if (error->error) {
         const char *fmt;
         char *msg = errstr;
         int len;
         int argi;
 
-        fmt = SDL_LookupString (error->key);
+        fmt = SDL_LookupString(error->key);
         argi = 0;
         while (*fmt && (maxlen > 0)) {
             if (*fmt == '%') {
                 char tmp[32], *spot = tmp;
                 *spot++ = *fmt++;
                 while ((*fmt == '.' || (*fmt >= '0' && *fmt <= '9'))
-                       && spot < (tmp + SDL_arraysize (tmp) - 2)) {
+                       && spot < (tmp + SDL_arraysize(tmp) - 2)) {
                     *spot++ = *fmt++;
                 }
                 *spot++ = *fmt++;
@@ -157,30 +157,30 @@
                 case 'x':
                 case 'X':
                     len =
-                        SDL_snprintf (msg, maxlen, tmp,
-                                      error->args[argi++].value_i);
+                        SDL_snprintf(msg, maxlen, tmp,
+                                     error->args[argi++].value_i);
                     msg += len;
                     maxlen -= len;
                     break;
                 case 'f':
                     len =
-                        SDL_snprintf (msg, maxlen, tmp,
-                                      error->args[argi++].value_f);
+                        SDL_snprintf(msg, maxlen, tmp,
+                                     error->args[argi++].value_f);
                     msg += len;
                     maxlen -= len;
                     break;
                 case 'p':
                     len =
-                        SDL_snprintf (msg, maxlen, tmp,
-                                      error->args[argi++].value_ptr);
+                        SDL_snprintf(msg, maxlen, tmp,
+                                     error->args[argi++].value_ptr);
                     msg += len;
                     maxlen -= len;
                     break;
                 case 's':
                     len =
-                        SDL_snprintf (msg, maxlen, tmp,
-                                      SDL_LookupString (error->
-                                                        args[argi++].buf));
+                        SDL_snprintf(msg, maxlen, tmp,
+                                     SDL_LookupString(error->
+                                                      args[argi++].buf));
                     msg += len;
                     maxlen -= len;
                     break;
@@ -197,59 +197,59 @@
 
 /* Available for backwards compatibility */
 char *
-SDL_GetError (void)
+SDL_GetError(void)
 {
     static char errmsg[SDL_ERRBUFIZE];
 
-    return ((char *) SDL_GetErrorMsg (errmsg, SDL_ERRBUFIZE));
+    return ((char *) SDL_GetErrorMsg(errmsg, SDL_ERRBUFIZE));
 }
 
 void
-SDL_ClearError (void)
+SDL_ClearError(void)
 {
     SDL_error *error;
 
-    error = SDL_GetErrBuf ();
+    error = SDL_GetErrBuf();
     error->error = 0;
 }
 
 /* Very common errors go here */
 void
-SDL_Error (SDL_errorcode code)
+SDL_Error(SDL_errorcode code)
 {
     switch (code) {
     case SDL_ENOMEM:
-        SDL_SetError ("Out of memory");
+        SDL_SetError("Out of memory");
         break;
     case SDL_EFREAD:
-        SDL_SetError ("Error reading from datastream");
+        SDL_SetError("Error reading from datastream");
         break;
     case SDL_EFWRITE:
-        SDL_SetError ("Error writing to datastream");
+        SDL_SetError("Error writing to datastream");
         break;
     case SDL_EFSEEK:
-        SDL_SetError ("Error seeking in datastream");
+        SDL_SetError("Error seeking in datastream");
         break;
     default:
-        SDL_SetError ("Unknown SDL error");
+        SDL_SetError("Unknown SDL error");
         break;
     }
 }
 
 #ifdef TEST_ERROR
 int
-main (int argc, char *argv[])
+main(int argc, char *argv[])
 {
     char buffer[BUFSIZ + 1];
 
-    SDL_SetError ("Hi there!");
-    printf ("Error 1: %s\n", SDL_GetError ());
-    SDL_ClearError ();
-    SDL_memset (buffer, '1', BUFSIZ);
+    SDL_SetError("Hi there!");
+    printf("Error 1: %s\n", SDL_GetError());
+    SDL_ClearError();
+    SDL_memset(buffer, '1', BUFSIZ);
     buffer[BUFSIZ] = 0;
-    SDL_SetError ("This is the error: %s (%f)", buffer, 1.0);
-    printf ("Error 2: %s\n", SDL_GetError ());
-    exit (0);
+    SDL_SetError("This is the error: %s (%f)", buffer, 1.0);
+    printf("Error 2: %s\n", SDL_GetError());
+    exit(0);
 }
 #endif
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/SDL_fatal.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/SDL_fatal.c	Mon May 29 04:04:35 2006 +0000
@@ -36,11 +36,11 @@
 */
 
 static void
-SDL_Parachute (int sig)
+SDL_Parachute(int sig)
 {
-    signal (sig, SIG_DFL);
-    SDL_Quit ();
-    raise (sig);
+    signal(sig, SIG_DFL);
+    SDL_Quit();
+    raise(sig);
 }
 
 static int SDL_fatal_signals[] = {
@@ -58,7 +58,7 @@
 };
 
 void
-SDL_InstallParachute (void)
+SDL_InstallParachute(void)
 {
     /* Set a handler for any fatal signal not already handled */
     int i;
@@ -66,27 +66,27 @@
     struct sigaction action;
 
     for (i = 0; SDL_fatal_signals[i]; ++i) {
-        sigaction (SDL_fatal_signals[i], NULL, &action);
+        sigaction(SDL_fatal_signals[i], NULL, &action);
         if (action.sa_handler == SIG_DFL) {
             action.sa_handler = SDL_Parachute;
-            sigaction (SDL_fatal_signals[i], &action, NULL);
+            sigaction(SDL_fatal_signals[i], &action, NULL);
         }
     }
 #ifdef SIGALRM
     /* Set SIGALRM to be ignored -- necessary on Solaris */
-    sigaction (SIGALRM, NULL, &action);
+    sigaction(SIGALRM, NULL, &action);
     if (action.sa_handler == SIG_DFL) {
         action.sa_handler = SIG_IGN;
-        sigaction (SIGALRM, &action, NULL);
+        sigaction(SIGALRM, &action, NULL);
     }
 #endif
 #else
     void (*ohandler) (int);
 
     for (i = 0; SDL_fatal_signals[i]; ++i) {
-        ohandler = signal (SDL_fatal_signals[i], SDL_Parachute);
+        ohandler = signal(SDL_fatal_signals[i], SDL_Parachute);
         if (ohandler != SIG_DFL) {
-            signal (SDL_fatal_signals[i], ohandler);
+            signal(SDL_fatal_signals[i], ohandler);
         }
     }
 #endif /* HAVE_SIGACTION */
@@ -94,7 +94,7 @@
 }
 
 void
-SDL_UninstallParachute (void)
+SDL_UninstallParachute(void)
 {
     /* Remove a handler for any fatal signal handled */
     int i;
@@ -102,19 +102,19 @@
     struct sigaction action;
 
     for (i = 0; SDL_fatal_signals[i]; ++i) {
-        sigaction (SDL_fatal_signals[i], NULL, &action);
+        sigaction(SDL_fatal_signals[i], NULL, &action);
         if (action.sa_handler == SDL_Parachute) {
             action.sa_handler = SIG_DFL;
-            sigaction (SDL_fatal_signals[i], &action, NULL);
+            sigaction(SDL_fatal_signals[i], &action, NULL);
         }
     }
 #else
     void (*ohandler) (int);
 
     for (i = 0; SDL_fatal_signals[i]; ++i) {
-        ohandler = signal (SDL_fatal_signals[i], SIG_DFL);
+        ohandler = signal(SDL_fatal_signals[i], SIG_DFL);
         if (ohandler != SDL_Parachute) {
-            signal (SDL_fatal_signals[i], ohandler);
+            signal(SDL_fatal_signals[i], ohandler);
         }
     }
 #endif /* HAVE_SIGACTION */
@@ -125,13 +125,13 @@
 /* No signals on this platform, nothing to do.. */
 
 void
-SDL_InstallParachute (void)
+SDL_InstallParachute(void)
 {
     return;
 }
 
 void
-SDL_UninstallParachute (void)
+SDL_UninstallParachute(void)
 {
     return;
 }
--- a/src/SDL_fatal.h	Mon May 29 03:53:21 2006 +0000
+++ b/src/SDL_fatal.h	Mon May 29 04:04:35 2006 +0000
@@ -23,6 +23,6 @@
 
 /* General fatal signal handling code for SDL */
 
-extern void SDL_InstallParachute (void);
-extern void SDL_UninstallParachute (void);
+extern void SDL_InstallParachute(void);
+extern void SDL_UninstallParachute(void);
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/audio/SDL_audio.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_audio.c	Mon May 29 04:04:35 2006 +0000
@@ -112,8 +112,8 @@
 SDL_AudioDevice *current_audio = NULL;
 
 /* Various local functions */
-int SDL_AudioInit (const char *driver_name);
-void SDL_AudioQuit (void);
+int SDL_AudioInit(const char *driver_name);
+void SDL_AudioQuit(void);
 
 #if SDL_AUDIO_DRIVER_AHI
 static int audio_configured = 0;
@@ -121,7 +121,7 @@
 
 /* The general mixing thread function */
 int SDLCALL
-SDL_RunAudio (void *audiop)
+SDL_RunAudio(void *audiop)
 {
     SDL_AudioDevice *audio = (SDL_AudioDevice *) audiop;
     Uint8 *stream;
@@ -134,21 +134,21 @@
 
 /* AmigaOS NEEDS that the audio driver is opened in the thread that uses it! */
 
-    D (bug ("Task audio started audio struct:<%lx>...\n", audiop));
+    D(bug("Task audio started audio struct:<%lx>...\n", audiop));
 
-    D (bug ("Before Openaudio..."));
-    if (audio->OpenAudio (audio, &audio->spec) == -1) {
-        D (bug ("Open audio failed...\n"));
+    D(bug("Before Openaudio..."));
+    if (audio->OpenAudio(audio, &audio->spec) == -1) {
+        D(bug("Open audio failed...\n"));
         return (-1);
     }
-    D (bug ("OpenAudio...OK\n"));
+    D(bug("OpenAudio...OK\n"));
 #endif
 
     /* Perform any thread setup */
     if (audio->ThreadInit) {
-        audio->ThreadInit (audio);
+        audio->ThreadInit(audio);
     }
-    audio->threadid = SDL_ThreadID ();
+    audio->threadid = SDL_ThreadID();
 
     /* Set up the mixing function */
     fill = audio->spec.callback;
@@ -157,9 +157,9 @@
 #if SDL_AUDIO_DRIVER_AHI
     audio_configured = 1;
 
-    D (bug ("Audio configured... Checking for conversion\n"));
-    SDL_mutexP (audio->mixer_lock);
-    D (bug ("Semaphore obtained...\n"));
+    D(bug("Audio configured... Checking for conversion\n"));
+    SDL_mutexP(audio->mixer_lock);
+    D(bug("Semaphore obtained...\n"));
 #endif
 
     if (audio->convert.needed) {
@@ -175,28 +175,28 @@
     }
 
 #if SDL_AUDIO_DRIVER_AHI
-    SDL_mutexV (audio->mixer_lock);
-    D (bug ("Entering audio loop...\n"));
+    SDL_mutexV(audio->mixer_lock);
+    D(bug("Entering audio loop...\n"));
 #endif
 
 #ifdef __OS2__
     /* Increase the priority of this thread to make sure that
        the audio will be continuous all the time! */
 #ifdef USE_DOSSETPRIORITY
-    if (SDL_getenv ("SDL_USE_TIMECRITICAL_AUDIO")) {
+    if (SDL_getenv("SDL_USE_TIMECRITICAL_AUDIO")) {
 #ifdef DEBUG_BUILD
         printf
             ("[SDL_RunAudio] : Setting priority to TimeCritical+0! (TID%d)\n",
-             SDL_ThreadID ());
+             SDL_ThreadID());
 #endif
-        DosSetPriority (PRTYS_THREAD, PRTYC_TIMECRITICAL, 0, 0);
+        DosSetPriority(PRTYS_THREAD, PRTYC_TIMECRITICAL, 0, 0);
     } else {
 #ifdef DEBUG_BUILD
         printf
             ("[SDL_RunAudio] : Setting priority to ForegroundServer+0! (TID%d)\n",
-             SDL_ThreadID ());
+             SDL_ThreadID());
 #endif
-        DosSetPriority (PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
+        DosSetPriority(PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
     }
 #endif
 #endif
@@ -212,82 +212,82 @@
                 continue;
             }
         } else {
-            stream = audio->GetAudioBuf (audio);
+            stream = audio->GetAudioBuf(audio);
             if (stream == NULL) {
                 stream = audio->fake_stream;
             }
         }
-        SDL_memset (stream, silence, stream_len);
+        SDL_memset(stream, silence, stream_len);
 
         if (!audio->paused) {
-            SDL_mutexP (audio->mixer_lock);
+            SDL_mutexP(audio->mixer_lock);
             (*fill) (udata, stream, stream_len);
-            SDL_mutexV (audio->mixer_lock);
+            SDL_mutexV(audio->mixer_lock);
         }
 
         /* Convert the audio if necessary */
         if (audio->convert.needed) {
-            SDL_ConvertAudio (&audio->convert);
-            stream = audio->GetAudioBuf (audio);
+            SDL_ConvertAudio(&audio->convert);
+            stream = audio->GetAudioBuf(audio);
             if (stream == NULL) {
                 stream = audio->fake_stream;
             }
-            SDL_memcpy (stream, audio->convert.buf, audio->convert.len_cvt);
+            SDL_memcpy(stream, audio->convert.buf, audio->convert.len_cvt);
         }
 
         /* Ready current buffer for play and change current buffer */
         if (stream != audio->fake_stream) {
-            audio->PlayAudio (audio);
+            audio->PlayAudio(audio);
         }
 
         /* Wait for an audio buffer to become available */
         if (stream == audio->fake_stream) {
-            SDL_Delay ((audio->spec.samples * 1000) / audio->spec.freq);
+            SDL_Delay((audio->spec.samples * 1000) / audio->spec.freq);
         } else {
-            audio->WaitAudio (audio);
+            audio->WaitAudio(audio);
         }
     }
 
     /* Wait for the audio to drain.. */
     if (audio->WaitDone) {
-        audio->WaitDone (audio);
+        audio->WaitDone(audio);
     }
 #if SDL_AUDIO_DRIVER_AHI
-    D (bug ("WaitAudio...Done\n"));
+    D(bug("WaitAudio...Done\n"));
 
-    audio->CloseAudio (audio);
+    audio->CloseAudio(audio);
 
-    D (bug ("CloseAudio..Done, subtask exiting...\n"));
+    D(bug("CloseAudio..Done, subtask exiting...\n"));
     audio_configured = 0;
 #endif
 #ifdef __OS2__
 #ifdef DEBUG_BUILD
-    printf ("[SDL_RunAudio] : Task exiting. (TID%d)\n", SDL_ThreadID ());
+    printf("[SDL_RunAudio] : Task exiting. (TID%d)\n", SDL_ThreadID());
 #endif
 #endif
     return (0);
 }
 
 static void
-SDL_LockAudio_Default (SDL_AudioDevice * audio)
+SDL_LockAudio_Default(SDL_AudioDevice * audio)
 {
-    if (audio->thread && (SDL_ThreadID () == audio->threadid)) {
+    if (audio->thread && (SDL_ThreadID() == audio->threadid)) {
         return;
     }
-    SDL_mutexP (audio->mixer_lock);
+    SDL_mutexP(audio->mixer_lock);
 }
 
 static void
-SDL_UnlockAudio_Default (SDL_AudioDevice * audio)
+SDL_UnlockAudio_Default(SDL_AudioDevice * audio)
 {
-    if (audio->thread && (SDL_ThreadID () == audio->threadid)) {
+    if (audio->thread && (SDL_ThreadID() == audio->threadid)) {
         return;
     }
-    SDL_mutexV (audio->mixer_lock);
+    SDL_mutexV(audio->mixer_lock);
 }
 
 static Uint16
-SDL_ParseAudioFormat (const char *string)
+SDL_ParseAudioFormat(const char *string)
 {
     Uint16 format = 0;
 
@@ -303,7 +303,7 @@
     default:
         return 0;
     }
-    switch (SDL_atoi (string)) {
+    switch (SDL_atoi(string)) {
     case 8:
         string += 1;
         format |= 8;
@@ -311,16 +311,16 @@
     case 16:
         string += 2;
         format |= 16;
-        if (SDL_strcmp (string, "LSB") == 0
+        if (SDL_strcmp(string, "LSB") == 0
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
-            || SDL_strcmp (string, "SYS") == 0
+            || SDL_strcmp(string, "SYS") == 0
 #endif
             ) {
             format |= 0x0000;
         }
-        if (SDL_strcmp (string, "MSB") == 0
+        if (SDL_strcmp(string, "MSB") == 0
 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
-            || SDL_strcmp (string, "SYS") == 0
+            || SDL_strcmp(string, "SYS") == 0
 #endif
             ) {
             format |= 0x1000;
@@ -333,58 +333,58 @@
 }
 
 int
-SDL_GetNumAudioDrivers (void)
+SDL_GetNumAudioDrivers(void)
 {
-    return (SDL_arraysize (bootstrap) - 1);
+    return (SDL_arraysize(bootstrap) - 1);
 }
 
 const char *
-SDL_GetAudioDriver (int index)
+SDL_GetAudioDriver(int index)
 {
-    if (index >= 0 && index < SDL_GetNumAudioDrivers ()) {
+    if (index >= 0 && index < SDL_GetNumAudioDrivers()) {
         return (bootstrap[index]->name);
     }
     return (NULL);
 }
 
 int
-SDL_AudioInit (const char *driver_name)
+SDL_AudioInit(const char *driver_name)
 {
     SDL_AudioDevice *audio;
     int i = 0, idx;
 
     /* Check to make sure we don't overwrite 'current_audio' */
     if (current_audio != NULL) {
-        SDL_AudioQuit ();
+        SDL_AudioQuit();
     }
 
     /* Select the proper audio driver */
     audio = NULL;
     idx = 0;
 #if SDL_AUDIO_DRIVER_ESD
-    if ((driver_name == NULL) && (SDL_getenv ("ESPEAKER") != NULL)) {
+    if ((driver_name == NULL) && (SDL_getenv("ESPEAKER") != NULL)) {
         /* Ahem, we know that if ESPEAKER is set, user probably wants
            to use ESD, but don't start it if it's not already running.
            This probably isn't the place to do this, but... Shh! :)
          */
         for (i = 0; bootstrap[i]; ++i) {
-            if (SDL_strcmp (bootstrap[i]->name, "esd") == 0) {
+            if (SDL_strcmp(bootstrap[i]->name, "esd") == 0) {
 #ifdef HAVE_PUTENV
                 const char *esd_no_spawn;
 
                 /* Don't start ESD if it's not running */
-                esd_no_spawn = getenv ("ESD_NO_SPAWN");
+                esd_no_spawn = getenv("ESD_NO_SPAWN");
                 if (esd_no_spawn == NULL) {
-                    putenv ("ESD_NO_SPAWN=1");
+                    putenv("ESD_NO_SPAWN=1");
                 }
 #endif
-                if (bootstrap[i]->available ()) {
-                    audio = bootstrap[i]->create (0);
+                if (bootstrap[i]->available()) {
+                    audio = bootstrap[i]->create(0);
                     break;
                 }
 #ifdef HAVE_UNSETENV
                 if (esd_no_spawn == NULL) {
-                    unsetenv ("ESD_NO_SPAWN");
+                    unsetenv("ESD_NO_SPAWN");
                 }
 #endif
             }
@@ -394,23 +394,23 @@
     if (audio == NULL) {
         if (driver_name != NULL) {
 #if 0                           /* This will be replaced with a better driver selection API */
-            if (SDL_strrchr (driver_name, ':') != NULL) {
-                idx = atoi (SDL_strrchr (driver_name, ':') + 1);
+            if (SDL_strrchr(driver_name, ':') != NULL) {
+                idx = atoi(SDL_strrchr(driver_name, ':') + 1);
             }
 #endif
             for (i = 0; bootstrap[i]; ++i) {
-                if (SDL_strncmp (bootstrap[i]->name, driver_name,
-                                 SDL_strlen (bootstrap[i]->name)) == 0) {
-                    if (bootstrap[i]->available ()) {
-                        audio = bootstrap[i]->create (idx);
+                if (SDL_strncmp(bootstrap[i]->name, driver_name,
+                                SDL_strlen(bootstrap[i]->name)) == 0) {
+                    if (bootstrap[i]->available()) {
+                        audio = bootstrap[i]->create(idx);
                     }
                     break;
                 }
             }
         } else {
             for (i = 0; bootstrap[i]; ++i) {
-                if (bootstrap[i]->available ()) {
-                    audio = bootstrap[i]->create (idx);
+                if (bootstrap[i]->available()) {
+                    audio = bootstrap[i]->create(idx);
                     if (audio != NULL) {
                         break;
                     }
@@ -419,9 +419,9 @@
         }
         if (audio == NULL) {
             if (driver_name) {
-                SDL_SetError ("%s not available", driver_name);
+                SDL_SetError("%s not available", driver_name);
             } else {
-                SDL_SetError ("No available audio device");
+                SDL_SetError("No available audio device");
             }
 #if 0                           /* Don't fail SDL_Init() if audio isn't available.
                                    SDL_OpenAudio() will handle it at that point.  *sigh*
@@ -445,7 +445,7 @@
  * Get the current audio driver name
  */
 const char *
-SDL_GetCurrentAudioDriver ()
+SDL_GetCurrentAudioDriver()
 {
     if (current_audio) {
         return current_audio->name;
@@ -454,14 +454,14 @@
 }
 
 int
-SDL_OpenAudio (SDL_AudioSpec * desired, SDL_AudioSpec * obtained)
+SDL_OpenAudio(SDL_AudioSpec * desired, SDL_AudioSpec * obtained)
 {
     SDL_AudioDevice *audio;
     const char *env;
 
     /* Start up the audio driver, if necessary */
     if (!current_audio) {
-        if ((SDL_InitSubSystem (SDL_INIT_AUDIO) < 0) ||
+        if ((SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) ||
             (current_audio == NULL)) {
             return (-1);
         }
@@ -469,15 +469,15 @@
     audio = current_audio;
 
     if (audio->opened) {
-        SDL_SetError ("Audio device is already opened");
+        SDL_SetError("Audio device is already opened");
         return (-1);
     }
 
     /* Verify some parameters */
     if (desired->freq == 0) {
-        env = SDL_getenv ("SDL_AUDIO_FREQUENCY");
+        env = SDL_getenv("SDL_AUDIO_FREQUENCY");
         if (env) {
-            desired->freq = SDL_atoi (env);
+            desired->freq = SDL_atoi(env);
         }
     }
     if (desired->freq == 0) {
@@ -485,9 +485,9 @@
         desired->freq = 22050;
     }
     if (desired->format == 0) {
-        env = SDL_getenv ("SDL_AUDIO_FORMAT");
+        env = SDL_getenv("SDL_AUDIO_FORMAT");
         if (env) {
-            desired->format = SDL_ParseAudioFormat (env);
+            desired->format = SDL_ParseAudioFormat(env);
         }
     }
     if (desired->format == 0) {
@@ -495,9 +495,9 @@
         desired->format = AUDIO_S16;
     }
     if (desired->channels == 0) {
-        env = SDL_getenv ("SDL_AUDIO_CHANNELS");
+        env = SDL_getenv("SDL_AUDIO_CHANNELS");
         if (env) {
-            desired->channels = SDL_atoi (env);
+            desired->channels = SDL_atoi(env);
         }
     }
     if (desired->channels == 0) {
@@ -511,13 +511,13 @@
     case 6:                    /* surround with center and lfe */
         break;
     default:
-        SDL_SetError ("1 (mono) and 2 (stereo) channels supported");
+        SDL_SetError("1 (mono) and 2 (stereo) channels supported");
         return (-1);
     }
     if (desired->samples == 0) {
-        env = SDL_getenv ("SDL_AUDIO_SAMPLES");
+        env = SDL_getenv("SDL_AUDIO_SAMPLES");
         if (env) {
-            desired->samples = SDL_atoi (env);
+            desired->samples = SDL_atoi(env);
         }
     }
     if (desired->samples == 0) {
@@ -530,7 +530,7 @@
         desired->samples = power2;
     }
     if (desired->callback == NULL) {
-        SDL_SetError ("SDL_OpenAudio() passed a NULL callback");
+        SDL_SetError("SDL_OpenAudio() passed a NULL callback");
         return (-1);
     }
 #if defined(__MACOS__) || (defined(__RISCOS__) && SDL_THREADS_DISABLED)
@@ -540,20 +540,20 @@
     /* Uses interrupt driven audio, without thread */
 #else
     /* Create a semaphore for locking the sound buffers */
-    audio->mixer_lock = SDL_CreateMutex ();
+    audio->mixer_lock = SDL_CreateMutex();
     if (audio->mixer_lock == NULL) {
-        SDL_SetError ("Couldn't create mixer lock");
-        SDL_CloseAudio ();
+        SDL_SetError("Couldn't create mixer lock");
+        SDL_CloseAudio();
         return (-1);
     }
 #endif /* __MINT__ */
 #endif /* __MACOS__ */
 
     /* Calculate the silence and size of the audio specification */
-    SDL_CalculateAudioSpec (desired);
+    SDL_CalculateAudioSpec(desired);
 
     /* Open the audio subsystem */
-    SDL_memcpy (&audio->spec, desired, sizeof (audio->spec));
+    SDL_memcpy(&audio->spec, desired, sizeof(audio->spec));
     audio->convert.needed = 0;
     audio->enabled = 1;
     audio->paused = 1;
@@ -561,68 +561,68 @@
 #if !SDL_AUDIO_DRIVER_AHI
 
 /* AmigaOS opens audio inside the main loop */
-    audio->opened = audio->OpenAudio (audio, &audio->spec) + 1;
+    audio->opened = audio->OpenAudio(audio, &audio->spec) + 1;
 
     if (!audio->opened) {
-        SDL_CloseAudio ();
+        SDL_CloseAudio();
         return (-1);
     }
 #else
-    D (bug ("Locking semaphore..."));
-    SDL_mutexP (audio->mixer_lock);
+    D(bug("Locking semaphore..."));
+    SDL_mutexP(audio->mixer_lock);
 
 
-    audio->thread = SDL_CreateThread (SDL_RunAudio, audio);
-    D (bug ("Created thread...\n"));
+    audio->thread = SDL_CreateThread(SDL_RunAudio, audio);
+    D(bug("Created thread...\n"));
 
     if (audio->thread == NULL) {
-        SDL_mutexV (audio->mixer_lock);
-        SDL_CloseAudio ();
-        SDL_SetError ("Couldn't create audio thread");
+        SDL_mutexV(audio->mixer_lock);
+        SDL_CloseAudio();
+        SDL_SetError("Couldn't create audio thread");
         return (-1);
     }
 
     while (!audio_configured)
-        SDL_Delay (100);
+        SDL_Delay(100);
 #endif
 
     /* If the audio driver changes the buffer size, accept it */
     if (audio->spec.samples != desired->samples) {
         desired->samples = audio->spec.samples;
-        SDL_CalculateAudioSpec (desired);
+        SDL_CalculateAudioSpec(desired);
     }
 
     /* Allocate a fake audio memory buffer */
-    audio->fake_stream = SDL_AllocAudioMem (audio->spec.size);
+    audio->fake_stream = SDL_AllocAudioMem(audio->spec.size);
     if (audio->fake_stream == NULL) {
-        SDL_CloseAudio ();
-        SDL_OutOfMemory ();
+        SDL_CloseAudio();
+        SDL_OutOfMemory();
         return (-1);
     }
 
     /* See if we need to do any conversion */
     if (obtained != NULL) {
-        SDL_memcpy (obtained, &audio->spec, sizeof (audio->spec));
+        SDL_memcpy(obtained, &audio->spec, sizeof(audio->spec));
     } else if (desired->freq != audio->spec.freq ||
                desired->format != audio->spec.format ||
                desired->channels != audio->spec.channels) {
         /* Build an audio conversion block */
-        if (SDL_BuildAudioCVT (&audio->convert,
-                               desired->format, desired->channels,
-                               desired->freq,
-                               audio->spec.format, audio->spec.channels,
-                               audio->spec.freq) < 0) {
-            SDL_CloseAudio ();
+        if (SDL_BuildAudioCVT(&audio->convert,
+                              desired->format, desired->channels,
+                              desired->freq,
+                              audio->spec.format, audio->spec.channels,
+                              audio->spec.freq) < 0) {
+            SDL_CloseAudio();
             return (-1);
         }
         if (audio->convert.needed) {
             audio->convert.len = desired->size;
             audio->convert.buf =
-                (Uint8 *) SDL_AllocAudioMem (audio->convert.len *
-                                             audio->convert.len_mult);
+                (Uint8 *) SDL_AllocAudioMem(audio->convert.len *
+                                            audio->convert.len_mult);
             if (audio->convert.buf == NULL) {
-                SDL_CloseAudio ();
-                SDL_OutOfMemory ();
+                SDL_CloseAudio();
+                SDL_OutOfMemory();
                 return (-1);
             }
         }
@@ -634,13 +634,13 @@
         /* Start the audio thread */
 #if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
 #undef SDL_CreateThread
-        audio->thread = SDL_CreateThread (SDL_RunAudio, audio, NULL, NULL);
+        audio->thread = SDL_CreateThread(SDL_RunAudio, audio, NULL, NULL);
 #else
-        audio->thread = SDL_CreateThread (SDL_RunAudio, audio);
+        audio->thread = SDL_CreateThread(SDL_RunAudio, audio);
 #endif
         if (audio->thread == NULL) {
-            SDL_CloseAudio ();
-            SDL_SetError ("Couldn't create audio thread");
+            SDL_CloseAudio();
+            SDL_SetError("Couldn't create audio thread");
             return (-1);
         }
         break;
@@ -650,8 +650,8 @@
         break;
     }
 #else
-    SDL_mutexV (audio->mixer_lock);
-    D (bug ("SDL_OpenAudio USCITA...\n"));
+    SDL_mutexV(audio->mixer_lock);
+    D(bug("SDL_OpenAudio USCITA...\n"));
 
 #endif
 
@@ -659,7 +659,7 @@
 }
 
 SDL_audiostatus
-SDL_GetAudioStatus (void)
+SDL_GetAudioStatus(void)
 {
     SDL_AudioDevice *audio = current_audio;
     SDL_audiostatus status;
@@ -676,7 +676,7 @@
 }
 
 void
-SDL_PauseAudio (int pause_on)
+SDL_PauseAudio(int pause_on)
 {
     SDL_AudioDevice *audio = current_audio;
 
@@ -686,61 +686,61 @@
 }
 
 void
-SDL_LockAudio (void)
+SDL_LockAudio(void)
 {
     SDL_AudioDevice *audio = current_audio;
 
     /* Obtain a lock on the mixing buffers */
     if (audio && audio->LockAudio) {
-        audio->LockAudio (audio);
+        audio->LockAudio(audio);
     }
 }
 
 void
-SDL_UnlockAudio (void)
+SDL_UnlockAudio(void)
 {
     SDL_AudioDevice *audio = current_audio;
 
     /* Release lock on the mixing buffers */
     if (audio && audio->UnlockAudio) {
-        audio->UnlockAudio (audio);
+        audio->UnlockAudio(audio);
     }
 }
 
 void
-SDL_CloseAudio (void)
+SDL_CloseAudio(void)
 {
-    SDL_QuitSubSystem (SDL_INIT_AUDIO);
+    SDL_QuitSubSystem(SDL_INIT_AUDIO);
 }
 
 void
-SDL_AudioQuit (void)
+SDL_AudioQuit(void)
 {
     SDL_AudioDevice *audio = current_audio;
 
     if (audio) {
         audio->enabled = 0;
         if (audio->thread != NULL) {
-            SDL_WaitThread (audio->thread, NULL);
+            SDL_WaitThread(audio->thread, NULL);
         }
         if (audio->mixer_lock != NULL) {
-            SDL_DestroyMutex (audio->mixer_lock);
+            SDL_DestroyMutex(audio->mixer_lock);
         }
         if (audio->fake_stream != NULL) {
-            SDL_FreeAudioMem (audio->fake_stream);
+            SDL_FreeAudioMem(audio->fake_stream);
         }
         if (audio->convert.needed) {
-            SDL_FreeAudioMem (audio->convert.buf);
+            SDL_FreeAudioMem(audio->convert.buf);
 
         }
 #if !SDL_AUDIO_DRIVER_AHI
         if (audio->opened) {
-            audio->CloseAudio (audio);
+            audio->CloseAudio(audio);
             audio->opened = 0;
         }
 #endif
         /* Free the driver data */
-        audio->free (audio);
+        audio->free(audio);
         current_audio = NULL;
     }
 }
@@ -764,7 +764,7 @@
 };
 
 Uint16
-SDL_FirstAudioFormat (Uint16 format)
+SDL_FirstAudioFormat(Uint16 format)
 {
     for (format_idx = 0; format_idx < NUM_FORMATS; ++format_idx) {
         if (format_list[format_idx][0] == format) {
@@ -772,11 +772,11 @@
         }
     }
     format_idx_sub = 0;
-    return (SDL_NextAudioFormat ());
+    return (SDL_NextAudioFormat());
 }
 
 Uint16
-SDL_NextAudioFormat (void)
+SDL_NextAudioFormat(void)
 {
     if ((format_idx == NUM_FORMATS) || (format_idx_sub == NUM_FORMATS)) {
         return (0);
@@ -785,7 +785,7 @@
 }
 
 void
-SDL_CalculateAudioSpec (SDL_AudioSpec * spec)
+SDL_CalculateAudioSpec(SDL_AudioSpec * spec)
 {
     switch (spec->format) {
     case AUDIO_U8:
--- a/src/audio/SDL_audio_c.h	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_audio_c.h	Mon May 29 04:04:35 2006 +0000
@@ -24,12 +24,12 @@
 /* Functions and variables exported from SDL_audio.c for SDL_sysaudio.c */
 
 /* Functions to get a list of "close" audio formats */
-extern Uint16 SDL_FirstAudioFormat (Uint16 format);
-extern Uint16 SDL_NextAudioFormat (void);
+extern Uint16 SDL_FirstAudioFormat(Uint16 format);
+extern Uint16 SDL_NextAudioFormat(void);
 
 /* Function to calculate the size and silence for a SDL_AudioSpec */
-extern void SDL_CalculateAudioSpec (SDL_AudioSpec * spec);
+extern void SDL_CalculateAudioSpec(SDL_AudioSpec * spec);
 
 /* The actual mixing thread function */
-extern int SDLCALL SDL_RunAudio (void *audiop);
+extern int SDLCALL SDL_RunAudio(void *audiop);
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/audio/SDL_audiocvt.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_audiocvt.c	Mon May 29 04:04:35 2006 +0000
@@ -28,13 +28,13 @@
 
 /* Effectively mix right and left channels into a single channel */
 void SDLCALL
-SDL_ConvertMono (SDL_AudioCVT * cvt, Uint16 format)
+SDL_ConvertMono(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Sint32 sample;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting to mono\n");
+    fprintf(stderr, "Converting to mono\n");
 #endif
     switch (format & 0x8018) {
 
@@ -172,13 +172,13 @@
 
 /* Discard top 4 channels */
 void SDLCALL
-SDL_ConvertStrip (SDL_AudioCVT * cvt, Uint16 format)
+SDL_ConvertStrip(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Sint32 lsample, rsample;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting down to stereo\n");
+    fprintf(stderr, "Converting down to stereo\n");
 #endif
     switch (format & 0x8018) {
 
@@ -293,13 +293,13 @@
 
 /* Discard top 2 channels of 6 */
 void SDLCALL
-SDL_ConvertStrip_2 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_ConvertStrip_2(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Sint32 lsample, rsample;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting 6 down to quad\n");
+    fprintf(stderr, "Converting 6 down to quad\n");
 #endif
     switch (format & 0x8018) {
 
@@ -413,12 +413,12 @@
 
 /* Duplicate a mono channel to both stereo channels */
 void SDLCALL
-SDL_ConvertStereo (SDL_AudioCVT * cvt, Uint16 format)
+SDL_ConvertStereo(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting to stereo\n");
+    fprintf(stderr, "Converting to stereo\n");
 #endif
     if ((format & 0xFF) == 16) {
         Uint16 *src, *dst;
@@ -452,12 +452,12 @@
 
 /* Duplicate a stereo channel to a pseudo-5.1 stream */
 void SDLCALL
-SDL_ConvertSurround (SDL_AudioCVT * cvt, Uint16 format)
+SDL_ConvertSurround(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting stereo to surround\n");
+    fprintf(stderr, "Converting stereo to surround\n");
 #endif
     switch (format & 0x8018) {
 
@@ -634,12 +634,12 @@
 
 /* Duplicate a stereo channel to a pseudo-4.0 stream */
 void SDLCALL
-SDL_ConvertSurround_4 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_ConvertSurround_4(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting stereo to quad\n");
+    fprintf(stderr, "Converting stereo to quad\n");
 #endif
     switch (format & 0x8018) {
 
@@ -792,13 +792,13 @@
 
 /* Convert 8-bit to 16-bit - LSB */
 void SDLCALL
-SDL_Convert16LSB (SDL_AudioCVT * cvt, Uint16 format)
+SDL_Convert16LSB(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting to 16-bit LSB\n");
+    fprintf(stderr, "Converting to 16-bit LSB\n");
 #endif
     src = cvt->buf + cvt->len_cvt;
     dst = cvt->buf + cvt->len_cvt * 2;
@@ -817,13 +817,13 @@
 
 /* Convert 8-bit to 16-bit - MSB */
 void SDLCALL
-SDL_Convert16MSB (SDL_AudioCVT * cvt, Uint16 format)
+SDL_Convert16MSB(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting to 16-bit MSB\n");
+    fprintf(stderr, "Converting to 16-bit MSB\n");
 #endif
     src = cvt->buf + cvt->len_cvt;
     dst = cvt->buf + cvt->len_cvt * 2;
@@ -842,13 +842,13 @@
 
 /* Convert 16-bit to 8-bit */
 void SDLCALL
-SDL_Convert8 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_Convert8(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting to 8-bit\n");
+    fprintf(stderr, "Converting to 8-bit\n");
 #endif
     src = cvt->buf;
     dst = cvt->buf;
@@ -869,13 +869,13 @@
 
 /* Toggle signed/unsigned */
 void SDLCALL
-SDL_ConvertSign (SDL_AudioCVT * cvt, Uint16 format)
+SDL_ConvertSign(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *data;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio signedness\n");
+    fprintf(stderr, "Converting audio signedness\n");
 #endif
     data = cvt->buf;
     if ((format & 0xFF) == 16) {
@@ -899,13 +899,13 @@
 
 /* Toggle endianness */
 void SDLCALL
-SDL_ConvertEndian (SDL_AudioCVT * cvt, Uint16 format)
+SDL_ConvertEndian(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *data, tmp;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio endianness\n");
+    fprintf(stderr, "Converting audio endianness\n");
 #endif
     data = cvt->buf;
     for (i = cvt->len_cvt / 2; i; --i) {
@@ -922,13 +922,13 @@
 
 /* Convert rate up by multiple of 2 */
 void SDLCALL
-SDL_RateMUL2 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_RateMUL2(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio rate * 2\n");
+    fprintf(stderr, "Converting audio rate * 2\n");
 #endif
     src = cvt->buf + cvt->len_cvt;
     dst = cvt->buf + cvt->len_cvt * 2;
@@ -961,13 +961,13 @@
 
 /* Convert rate up by multiple of 2, for stereo */
 void SDLCALL
-SDL_RateMUL2_c2 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_RateMUL2_c2(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio rate * 2\n");
+    fprintf(stderr, "Converting audio rate * 2\n");
 #endif
     src = cvt->buf + cvt->len_cvt;
     dst = cvt->buf + cvt->len_cvt * 2;
@@ -1005,13 +1005,13 @@
 
 /* Convert rate up by multiple of 2, for quad */
 void SDLCALL
-SDL_RateMUL2_c4 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_RateMUL2_c4(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio rate * 2\n");
+    fprintf(stderr, "Converting audio rate * 2\n");
 #endif
     src = cvt->buf + cvt->len_cvt;
     dst = cvt->buf + cvt->len_cvt * 2;
@@ -1062,13 +1062,13 @@
 
 /* Convert rate up by multiple of 2, for 5.1 */
 void SDLCALL
-SDL_RateMUL2_c6 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_RateMUL2_c6(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio rate * 2\n");
+    fprintf(stderr, "Converting audio rate * 2\n");
 #endif
     src = cvt->buf + cvt->len_cvt;
     dst = cvt->buf + cvt->len_cvt * 2;
@@ -1130,13 +1130,13 @@
 
 /* Convert rate down by multiple of 2 */
 void SDLCALL
-SDL_RateDIV2 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_RateDIV2(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio rate / 2\n");
+    fprintf(stderr, "Converting audio rate / 2\n");
 #endif
     src = cvt->buf;
     dst = cvt->buf;
@@ -1166,13 +1166,13 @@
 
 /* Convert rate down by multiple of 2, for stereo */
 void SDLCALL
-SDL_RateDIV2_c2 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_RateDIV2_c2(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio rate / 2\n");
+    fprintf(stderr, "Converting audio rate / 2\n");
 #endif
     src = cvt->buf;
     dst = cvt->buf;
@@ -1205,13 +1205,13 @@
 
 /* Convert rate down by multiple of 2, for quad */
 void SDLCALL
-SDL_RateDIV2_c4 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_RateDIV2_c4(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio rate / 2\n");
+    fprintf(stderr, "Converting audio rate / 2\n");
 #endif
     src = cvt->buf;
     dst = cvt->buf;
@@ -1249,13 +1249,13 @@
 
 /* Convert rate down by multiple of 2, for 5.1 */
 void SDLCALL
-SDL_RateDIV2_c6 (SDL_AudioCVT * cvt, Uint16 format)
+SDL_RateDIV2_c6(SDL_AudioCVT * cvt, Uint16 format)
 {
     int i;
     Uint8 *src, *dst;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio rate / 2\n");
+    fprintf(stderr, "Converting audio rate / 2\n");
 #endif
     src = cvt->buf;
     dst = cvt->buf;
@@ -1299,13 +1299,13 @@
 
 /* Very slow rate conversion routine */
 void SDLCALL
-SDL_RateSLOW (SDL_AudioCVT * cvt, Uint16 format)
+SDL_RateSLOW(SDL_AudioCVT * cvt, Uint16 format)
 {
     double ipos;
     int i, clen;
 
 #ifdef DEBUG_CONVERT
-    fprintf (stderr, "Converting audio rate * %4.4f\n", 1.0 / cvt->rate_incr);
+    fprintf(stderr, "Converting audio rate * %4.4f\n", 1.0 / cvt->rate_incr);
 #endif
     clen = (int) ((double) cvt->len_cvt / cvt->rate_incr);
     if (cvt->rate_incr > 1.0) {
@@ -1378,11 +1378,11 @@
 }
 
 int
-SDL_ConvertAudio (SDL_AudioCVT * cvt)
+SDL_ConvertAudio(SDL_AudioCVT * cvt)
 {
     /* Make sure there's data to convert */
     if (cvt->buf == NULL) {
-        SDL_SetError ("No buffer allocated for conversion");
+        SDL_SetError("No buffer allocated for conversion");
         return (-1);
     }
     /* Return okay if no conversion is necessary */
@@ -1403,9 +1403,9 @@
 */
 
 int
-SDL_BuildAudioCVT (SDL_AudioCVT * cvt,
-                   Uint16 src_format, Uint8 src_channels, int src_rate,
-                   Uint16 dst_format, Uint8 dst_channels, int dst_rate)
+SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
+                  Uint16 src_format, Uint8 src_channels, int src_rate,
+                  Uint16 dst_format, Uint8 dst_channels, int dst_rate)
 {
 /*printf("Build format %04x->%04x, channels %u->%u, rate %d->%d\n",
 		src_format, dst_format, src_channels, dst_channels, src_rate, dst_rate);*/
--- a/src/audio/SDL_audiodev.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_audiodev.c	Mon May 29 04:04:35 2006 +0000
@@ -48,52 +48,52 @@
 
 
 int
-SDL_OpenAudioPath (char *path, int maxlen, int flags, int classic)
+SDL_OpenAudioPath(char *path, int maxlen, int flags, int classic)
 {
     const char *audiodev;
     int audio_fd;
     char audiopath[1024];
 
     /* Figure out what our audio device is */
-    if (((audiodev = SDL_getenv ("SDL_PATH_DSP")) == NULL) &&
-        ((audiodev = SDL_getenv ("AUDIODEV")) == NULL)) {
+    if (((audiodev = SDL_getenv("SDL_PATH_DSP")) == NULL) &&
+        ((audiodev = SDL_getenv("AUDIODEV")) == NULL)) {
         if (classic) {
             audiodev = _PATH_DEV_AUDIO;
         } else {
             struct stat sb;
 
             /* Added support for /dev/sound/\* in Linux 2.4 */
-            if (((stat ("/dev/sound", &sb) == 0) && S_ISDIR (sb.st_mode))
-                && ((stat (_PATH_DEV_DSP24, &sb) == 0)
-                    && S_ISCHR (sb.st_mode))) {
+            if (((stat("/dev/sound", &sb) == 0) && S_ISDIR(sb.st_mode))
+                && ((stat(_PATH_DEV_DSP24, &sb) == 0)
+                    && S_ISCHR(sb.st_mode))) {
                 audiodev = _PATH_DEV_DSP24;
             } else {
                 audiodev = _PATH_DEV_DSP;
             }
         }
     }
-    audio_fd = open (audiodev, flags, 0);
+    audio_fd = open(audiodev, flags, 0);
 
     /* If the first open fails, look for other devices */
-    if ((audio_fd < 0) && (SDL_strlen (audiodev) < (sizeof (audiopath) - 3))) {
+    if ((audio_fd < 0) && (SDL_strlen(audiodev) < (sizeof(audiopath) - 3))) {
         int exists, instance;
         struct stat sb;
 
         instance = 1;
         do {                    /* Don't use errno ENOENT - it may not be thread-safe */
-            SDL_snprintf (audiopath, SDL_arraysize (audiopath),
-                          "%s%d", audiodev, instance++);
+            SDL_snprintf(audiopath, SDL_arraysize(audiopath),
+                         "%s%d", audiodev, instance++);
             exists = 0;
-            if (stat (audiopath, &sb) == 0) {
+            if (stat(audiopath, &sb) == 0) {
                 exists = 1;
-                audio_fd = open (audiopath, flags, 0);
+                audio_fd = open(audiopath, flags, 0);
             }
         }
         while (exists && (audio_fd < 0));
         audiodev = audiopath;
     }
     if (path != NULL) {
-        SDL_strlcpy (path, audiodev, maxlen);
+        SDL_strlcpy(path, audiodev, maxlen);
         path[maxlen - 1] = '\0';
     }
     return (audio_fd);
@@ -126,51 +126,51 @@
 };
 
 static int
-OpenUserDefinedDevice (char *path, int maxlen, int flags)
+OpenUserDefinedDevice(char *path, int maxlen, int flags)
 {
     const char *audiodev;
     int audio_fd;
 
     /* Figure out what our audio device is */
-    if ((audiodev = SDL_getenv ("SDL_PATH_DSP")) == NULL) {
-        audiodev = SDL_getenv ("AUDIODEV");
+    if ((audiodev = SDL_getenv("SDL_PATH_DSP")) == NULL) {
+        audiodev = SDL_getenv("AUDIODEV");
     }
     if (audiodev == NULL) {
         return -1;
     }
-    audio_fd = open (audiodev, flags, 0);
+    audio_fd = open(audiodev, flags, 0);
     if (path != NULL) {
-        SDL_strlcpy (path, audiodev, maxlen);
+        SDL_strlcpy(path, audiodev, maxlen);
         path[maxlen - 1] = '\0';
     }
     return audio_fd;
 }
 
 int
-SDL_OpenAudioPath (char *path, int maxlen, int flags, int classic)
+SDL_OpenAudioPath(char *path, int maxlen, int flags, int classic)
 {
     struct stat sb;
     int audio_fd;
     char audiopath[1024];
     int cycle;
 
-    audio_fd = OpenUserDefinedDevice (path, maxlen, flags);
+    audio_fd = OpenUserDefinedDevice(path, maxlen, flags);
     if (audio_fd != -1) {
         return audio_fd;
     }
 
     cycle = 0;
     while (devsettings[cycle][0] != '\0') {
-        SDL_snprintf (audiopath, SDL_arraysize (audiopath),
-                      _PATH_DEV_DSP,
-                      devsettings[cycle][0],
-                      devsettings[cycle][1], devsettings[cycle][2]);
+        SDL_snprintf(audiopath, SDL_arraysize(audiopath),
+                     _PATH_DEV_DSP,
+                     devsettings[cycle][0],
+                     devsettings[cycle][1], devsettings[cycle][2]);
 
-        if (stat (audiopath, &sb) == 0) {
-            audio_fd = open (audiopath, flags, 0);
+        if (stat(audiopath, &sb) == 0) {
+            audio_fd = open(audiopath, flags, 0);
             if (audio_fd > 0) {
                 if (path != NULL) {
-                    SDL_strlcpy (path, audiopath, maxlen);
+                    SDL_strlcpy(path, audiopath, maxlen);
                 }
                 return audio_fd;
             }
--- a/src/audio/SDL_audiodev_c.h	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_audiodev_c.h	Mon May 29 04:04:35 2006 +0000
@@ -22,5 +22,5 @@
 #include "SDL_config.h"
 
 /* Open the audio device, storing the pathname in 'path'  */
-extern int SDL_OpenAudioPath (char *path, int maxlen, int flags, int classic);
+extern int SDL_OpenAudioPath(char *path, int maxlen, int flags, int classic);
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/audio/SDL_mixer.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_mixer.c	Mon May 29 04:04:35 2006 +0000
@@ -90,7 +90,7 @@
 #define ADJUST_VOLUME_U8(s, v)	(s = (((s-128)*v)/SDL_MIX_MAXVOLUME)+128)
 
 void
-SDL_MixAudio (Uint8 * dst, const Uint8 * src, Uint32 len, int volume)
+SDL_MixAudio(Uint8 * dst, const Uint8 * src, Uint32 len, int volume)
 {
     Uint16 format;
 
@@ -113,15 +113,15 @@
     case AUDIO_U8:
         {
 #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
-            SDL_MixAudio_m68k_U8 ((char *) dst, (char *) src,
-                                  (unsigned long) len, (long) volume,
-                                  (char *) mix8);
+            SDL_MixAudio_m68k_U8((char *) dst, (char *) src,
+                                 (unsigned long) len, (long) volume,
+                                 (char *) mix8);
 #else
             Uint8 src_sample;
 
             while (len--) {
                 src_sample = *src;
-                ADJUST_VOLUME_U8 (src_sample, volume);
+                ADJUST_VOLUME_U8(src_sample, volume);
                 *dst = mix8[*dst + src_sample];
                 ++dst;
                 ++src;
@@ -133,19 +133,19 @@
     case AUDIO_S8:
         {
 #if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
-            if (SDL_HasMMX ()) {
-                SDL_MixAudio_MMX_S8 ((char *) dst, (char *) src,
-                                     (unsigned int) len, (int) volume);
+            if (SDL_HasMMX()) {
+                SDL_MixAudio_MMX_S8((char *) dst, (char *) src,
+                                    (unsigned int) len, (int) volume);
             } else
 #elif ((defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)) && defined(SDL_ASSEMBLY_ROUTINES)
-            if (SDL_HasMMX ()) {
-                SDL_MixAudio_MMX_S8_VC ((char *) dst, (char *) src,
-                                        (unsigned int) len, (int) volume);
+            if (SDL_HasMMX()) {
+                SDL_MixAudio_MMX_S8_VC((char *) dst, (char *) src,
+                                       (unsigned int) len, (int) volume);
             } else
 #endif
 #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
-                SDL_MixAudio_m68k_S8 ((char *) dst, (char *) src,
-                                      (unsigned long) len, (long) volume);
+                SDL_MixAudio_m68k_S8((char *) dst, (char *) src,
+                                     (unsigned long) len, (long) volume);
 #else
             {
                 Sint8 *dst8, *src8;
@@ -158,7 +158,7 @@
                 dst8 = (Sint8 *) dst;
                 while (len--) {
                     src_sample = *src8;
-                    ADJUST_VOLUME (src_sample, volume);
+                    ADJUST_VOLUME(src_sample, volume);
                     dst_sample = *dst8 + src_sample;
                     if (dst_sample > max_audioval) {
                         *dst8 = max_audioval;
@@ -178,19 +178,19 @@
     case AUDIO_S16LSB:
         {
 #if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
-            if (SDL_HasMMX ()) {
-                SDL_MixAudio_MMX_S16 ((char *) dst, (char *) src,
-                                      (unsigned int) len, (int) volume);
+            if (SDL_HasMMX()) {
+                SDL_MixAudio_MMX_S16((char *) dst, (char *) src,
+                                     (unsigned int) len, (int) volume);
             } else
 #elif ((defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)) && defined(SDL_ASSEMBLY_ROUTINES)
-            if (SDL_HasMMX ()) {
-                SDL_MixAudio_MMX_S16_VC ((char *) dst, (char *) src,
-                                         (unsigned int) len, (int) volume);
+            if (SDL_HasMMX()) {
+                SDL_MixAudio_MMX_S16_VC((char *) dst, (char *) src,
+                                        (unsigned int) len, (int) volume);
             } else
 #endif
 #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
-                SDL_MixAudio_m68k_S16LSB ((short *) dst, (short *) src,
-                                          (unsigned long) len, (long) volume);
+                SDL_MixAudio_m68k_S16LSB((short *) dst, (short *) src,
+                                         (unsigned long) len, (long) volume);
 #else
             {
                 Sint16 src1, src2;
@@ -201,7 +201,7 @@
                 len /= 2;
                 while (len--) {
                     src1 = ((src[1]) << 8 | src[0]);
-                    ADJUST_VOLUME (src1, volume);
+                    ADJUST_VOLUME(src1, volume);
                     src2 = ((dst[1]) << 8 | dst[0]);
                     src += 2;
                     dst_sample = src1 + src2;
@@ -223,8 +223,8 @@
     case AUDIO_S16MSB:
         {
 #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
-            SDL_MixAudio_m68k_S16MSB ((short *) dst, (short *) src,
-                                      (unsigned long) len, (long) volume);
+            SDL_MixAudio_m68k_S16MSB((short *) dst, (short *) src,
+                                     (unsigned long) len, (long) volume);
 #else
             Sint16 src1, src2;
             int dst_sample;
@@ -234,7 +234,7 @@
             len /= 2;
             while (len--) {
                 src1 = ((src[0]) << 8 | src[1]);
-                ADJUST_VOLUME (src1, volume);
+                ADJUST_VOLUME(src1, volume);
                 src2 = ((dst[0]) << 8 | dst[1]);
                 src += 2;
                 dst_sample = src1 + src2;
@@ -253,7 +253,7 @@
         break;
 
     default:                   /* If this happens... FIXME! */
-        SDL_SetError ("SDL_MixAudio(): unknown audio format");
+        SDL_SetError("SDL_MixAudio(): unknown audio format");
         return;
     }
 }
--- a/src/audio/SDL_mixer_MMX.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_mixer_MMX.c	Mon May 29 04:04:35 2006 +0000
@@ -37,49 +37,49 @@
 
 #if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
 void
-SDL_MixAudio_MMX_S16 (char *dst, char *src, unsigned int size, int volume)
+SDL_MixAudio_MMX_S16(char *dst, char *src, unsigned int size, int volume)
 {
-    __asm__ __volatile__ ("	movl %3,%%eax\n"        /* eax = volume */
-                          "	movl %2,%%edx\n"        /* edx = size */
-                          "	shrl $4,%%edx\n"        /* process 16 bytes per iteration = 8 samples */
-                          "	jz .endS16\n" "	pxor %%mm0,%%mm0\n" "	movd %%eax,%%mm0\n" "	movq %%mm0,%%mm1\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n"      /* mm0 = vol|vol|vol|vol */
-                          ".align 8\n" "	.mixloopS16:\n" "	movq (%1),%%mm1\n"      /* mm1 = a|b|c|d */
-                          "	movq %%mm1,%%mm2\n"     /* mm2 = a|b|c|d */
-                          "	movq 8(%1),%%mm4\n"     /* mm4 = e|f|g|h */
-                          /* pré charger le buffer dst dans mm7 */
-                          "	movq (%0),%%mm7\n"      /* mm7 = dst[0] */
-                          /* multiplier par le volume */
-                          "	pmullw %%mm0,%%mm1\n"   /* mm1 = l(a*v)|l(b*v)|l(c*v)|l(d*v) */
-                          "	pmulhw %%mm0,%%mm2\n"   /* mm2 = h(a*v)|h(b*v)|h(c*v)|h(d*v) */
-                          "	movq %%mm4,%%mm5\n"     /* mm5 = e|f|g|h */
-                          "	pmullw %%mm0,%%mm4\n"   /* mm4 = l(e*v)|l(f*v)|l(g*v)|l(h*v) */
-                          "	pmulhw %%mm0,%%mm5\n"   /* mm5 = h(e*v)|h(f*v)|h(g*v)|h(h*v) */
-                          "	movq %%mm1,%%mm3\n"     /* mm3 = l(a*v)|l(b*v)|l(c*v)|l(d*v) */
-                          "	punpckhwd %%mm2,%%mm1\n"        /* mm1 = a*v|b*v */
-                          "	movq %%mm4,%%mm6\n"     /* mm6 = l(e*v)|l(f*v)|l(g*v)|l(h*v) */
-                          "	punpcklwd %%mm2,%%mm3\n"        /* mm3 = c*v|d*v */
-                          "	punpckhwd %%mm5,%%mm4\n"        /* mm4 = e*f|f*v */
-                          "	punpcklwd %%mm5,%%mm6\n"        /* mm6 = g*v|h*v */
-                          /* pré charger le buffer dst dans mm5 */
-                          "	movq 8(%0),%%mm5\n"     /* mm5 = dst[1] */
-                          /* diviser par 128 */
-                          "	psrad $7,%%mm1\n"       /* mm1 = a*v/128|b*v/128 , 128 = SDL_MIX_MAXVOLUME */
-                          "	add $16,%1\n" "	psrad $7,%%mm3\n"       /* mm3 = c*v/128|d*v/128 */
-                          "	psrad $7,%%mm4\n"       /* mm4 = e*v/128|f*v/128 */
-                          /* mm1 = le sample avec le volume modifié */
-                          "	packssdw %%mm1,%%mm3\n" /* mm3 = s(a*v|b*v|c*v|d*v) */
-                          "	psrad $7,%%mm6\n"       /* mm6= g*v/128|h*v/128 */
-                          "	paddsw %%mm7,%%mm3\n"   /* mm3 = adjust_volume(src)+dst */
-                          /* mm4 = le sample avec le volume modifié */
-                          "	packssdw %%mm4,%%mm6\n" /* mm6 = s(e*v|f*v|g*v|h*v) */
-                          "	movq %%mm3,(%0)\n" "	paddsw %%mm5,%%mm6\n"   /* mm6 = adjust_volume(src)+dst */
-                          "	movq %%mm6,8(%0)\n"
-                          "	add $16,%0\n"
-                          "	dec %%edx\n"
-                          "	jnz .mixloopS16\n"
-                          "	emms\n"
-                          ".endS16:\n"::"r" (dst), "r" (src),
-                          "m" (size), "m" (volume):"eax", "edx", "memory");
+    __asm__ __volatile__("	movl %3,%%eax\n"        /* eax = volume */
+                         "	movl %2,%%edx\n"        /* edx = size */
+                         "	shrl $4,%%edx\n"        /* process 16 bytes per iteration = 8 samples */
+                         "	jz .endS16\n" "	pxor %%mm0,%%mm0\n" "	movd %%eax,%%mm0\n" "	movq %%mm0,%%mm1\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n"      /* mm0 = vol|vol|vol|vol */
+                         ".align 8\n" "	.mixloopS16:\n" "	movq (%1),%%mm1\n"      /* mm1 = a|b|c|d */
+                         "	movq %%mm1,%%mm2\n"     /* mm2 = a|b|c|d */
+                         "	movq 8(%1),%%mm4\n"     /* mm4 = e|f|g|h */
+                         /* pré charger le buffer dst dans mm7 */
+                         "	movq (%0),%%mm7\n"      /* mm7 = dst[0] */
+                         /* multiplier par le volume */
+                         "	pmullw %%mm0,%%mm1\n"   /* mm1 = l(a*v)|l(b*v)|l(c*v)|l(d*v) */
+                         "	pmulhw %%mm0,%%mm2\n"   /* mm2 = h(a*v)|h(b*v)|h(c*v)|h(d*v) */
+                         "	movq %%mm4,%%mm5\n"     /* mm5 = e|f|g|h */
+                         "	pmullw %%mm0,%%mm4\n"   /* mm4 = l(e*v)|l(f*v)|l(g*v)|l(h*v) */
+                         "	pmulhw %%mm0,%%mm5\n"   /* mm5 = h(e*v)|h(f*v)|h(g*v)|h(h*v) */
+                         "	movq %%mm1,%%mm3\n"     /* mm3 = l(a*v)|l(b*v)|l(c*v)|l(d*v) */
+                         "	punpckhwd %%mm2,%%mm1\n"        /* mm1 = a*v|b*v */
+                         "	movq %%mm4,%%mm6\n"     /* mm6 = l(e*v)|l(f*v)|l(g*v)|l(h*v) */
+                         "	punpcklwd %%mm2,%%mm3\n"        /* mm3 = c*v|d*v */
+                         "	punpckhwd %%mm5,%%mm4\n"        /* mm4 = e*f|f*v */
+                         "	punpcklwd %%mm5,%%mm6\n"        /* mm6 = g*v|h*v */
+                         /* pré charger le buffer dst dans mm5 */
+                         "	movq 8(%0),%%mm5\n"     /* mm5 = dst[1] */
+                         /* diviser par 128 */
+                         "	psrad $7,%%mm1\n"       /* mm1 = a*v/128|b*v/128 , 128 = SDL_MIX_MAXVOLUME */
+                         "	add $16,%1\n" "	psrad $7,%%mm3\n"       /* mm3 = c*v/128|d*v/128 */
+                         "	psrad $7,%%mm4\n"       /* mm4 = e*v/128|f*v/128 */
+                         /* mm1 = le sample avec le volume modifié */
+                         "	packssdw %%mm1,%%mm3\n" /* mm3 = s(a*v|b*v|c*v|d*v) */
+                         "	psrad $7,%%mm6\n"       /* mm6= g*v/128|h*v/128 */
+                         "	paddsw %%mm7,%%mm3\n"   /* mm3 = adjust_volume(src)+dst */
+                         /* mm4 = le sample avec le volume modifié */
+                         "	packssdw %%mm4,%%mm6\n" /* mm6 = s(e*v|f*v|g*v|h*v) */
+                         "	movq %%mm3,(%0)\n" "	paddsw %%mm5,%%mm6\n"   /* mm6 = adjust_volume(src)+dst */
+                         "	movq %%mm6,8(%0)\n"
+                         "	add $16,%0\n"
+                         "	dec %%edx\n"
+                         "	jnz .mixloopS16\n"
+                         "	emms\n"
+                         ".endS16:\n"::"r"(dst), "r"(src),
+                         "m"(size), "m"(volume):"eax", "edx", "memory");
 }
 
 
@@ -89,32 +89,32 @@
 /*////////////////////////////////////////////// */
 
 void
-SDL_MixAudio_MMX_S8 (char *dst, char *src, unsigned int size, int volume)
+SDL_MixAudio_MMX_S8(char *dst, char *src, unsigned int size, int volume)
 {
-    __asm__ __volatile__ ("	movl %3,%%eax\n"        /* eax = volume */
-                          "	movd %%eax,%%mm0\n" "	movq %%mm0,%%mm1\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n" "	movl %2,%%edx\n"        /* edx = size */
-                          "	shr $3,%%edx\n" /* process 8 bytes per iteration = 8 samples */
-                          "	cmp $0,%%edx\n" "	je .endS8\n" ".align 8\n" "	.mixloopS8:\n" "	pxor %%mm2,%%mm2\n"     /* mm2 = 0 */
-                          "	movq (%1),%%mm1\n"      /* mm1 = a|b|c|d|e|f|g|h */
-                          "	movq %%mm1,%%mm3\n"     /* mm3 = a|b|c|d|e|f|g|h */
-                          /* on va faire le "sign extension" en faisant un cmp avec 0 qui retourne 1 si <0, 0 si >0 */
-                          "	pcmpgtb %%mm1,%%mm2\n"  /* mm2 = 11111111|00000000|00000000.... */
-                          "	punpckhbw %%mm2,%%mm1\n"        /* mm1 = 0|a|0|b|0|c|0|d */
-                          "	punpcklbw %%mm2,%%mm3\n"        /* mm3 = 0|e|0|f|0|g|0|h */
-                          "	movq (%0),%%mm2\n"      /* mm2 = destination */
-                          "	pmullw %%mm0,%%mm1\n"   /* mm1 = v*a|v*b|v*c|v*d */
-                          "	add $8,%1\n" "	pmullw %%mm0,%%mm3\n"   /* mm3 = v*e|v*f|v*g|v*h */
-                          "	psraw $7,%%mm1\n"       /* mm1 = v*a/128|v*b/128|v*c/128|v*d/128  */
-                          "	psraw $7,%%mm3\n"       /* mm3 = v*e/128|v*f/128|v*g/128|v*h/128 */
-                          "	packsswb %%mm1,%%mm3\n" /* mm1 = v*a/128|v*b/128|v*c/128|v*d/128|v*e/128|v*f/128|v*g/128|v*h/128 */
-                          "	paddsb %%mm2,%%mm3\n"   /* add to destination buffer */
-                          "	movq %%mm3,(%0)\n"      /* store back to ram */
-                          "	add $8,%0\n"
-                          "	dec %%edx\n"
-                          "	jnz .mixloopS8\n"
-                          ".endS8:\n"
-                          "	emms\n"::"r" (dst), "r" (src), "m" (size),
-                          "m" (volume):"eax", "edx", "memory");
+    __asm__ __volatile__("	movl %3,%%eax\n"        /* eax = volume */
+                         "	movd %%eax,%%mm0\n" "	movq %%mm0,%%mm1\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n" "	psllq $16,%%mm0\n" "	por %%mm1,%%mm0\n" "	movl %2,%%edx\n"        /* edx = size */
+                         "	shr $3,%%edx\n" /* process 8 bytes per iteration = 8 samples */
+                         "	cmp $0,%%edx\n" "	je .endS8\n" ".align 8\n" "	.mixloopS8:\n" "	pxor %%mm2,%%mm2\n"     /* mm2 = 0 */
+                         "	movq (%1),%%mm1\n"      /* mm1 = a|b|c|d|e|f|g|h */
+                         "	movq %%mm1,%%mm3\n"     /* mm3 = a|b|c|d|e|f|g|h */
+                         /* on va faire le "sign extension" en faisant un cmp avec 0 qui retourne 1 si <0, 0 si >0 */
+                         "	pcmpgtb %%mm1,%%mm2\n"  /* mm2 = 11111111|00000000|00000000.... */
+                         "	punpckhbw %%mm2,%%mm1\n"        /* mm1 = 0|a|0|b|0|c|0|d */
+                         "	punpcklbw %%mm2,%%mm3\n"        /* mm3 = 0|e|0|f|0|g|0|h */
+                         "	movq (%0),%%mm2\n"      /* mm2 = destination */
+                         "	pmullw %%mm0,%%mm1\n"   /* mm1 = v*a|v*b|v*c|v*d */
+                         "	add $8,%1\n" "	pmullw %%mm0,%%mm3\n"   /* mm3 = v*e|v*f|v*g|v*h */
+                         "	psraw $7,%%mm1\n"       /* mm1 = v*a/128|v*b/128|v*c/128|v*d/128  */
+                         "	psraw $7,%%mm3\n"       /* mm3 = v*e/128|v*f/128|v*g/128|v*h/128 */
+                         "	packsswb %%mm1,%%mm3\n" /* mm1 = v*a/128|v*b/128|v*c/128|v*d/128|v*e/128|v*f/128|v*g/128|v*h/128 */
+                         "	paddsb %%mm2,%%mm3\n"   /* add to destination buffer */
+                         "	movq %%mm3,(%0)\n"      /* store back to ram */
+                         "	add $8,%0\n"
+                         "	dec %%edx\n"
+                         "	jnz .mixloopS8\n"
+                         ".endS8:\n"
+                         "	emms\n"::"r"(dst), "r"(src), "m"(size),
+                         "m"(volume):"eax", "edx", "memory");
 }
 #endif
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/audio/SDL_mixer_MMX.h	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_mixer_MMX.h	Mon May 29 04:04:35 2006 +0000
@@ -9,7 +9,7 @@
 #include "SDL_config.h"
 
 #if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
-void SDL_MixAudio_MMX_S16 (char *, char *, unsigned int, int);
-void SDL_MixAudio_MMX_S8 (char *, char *, unsigned int, int);
+void SDL_MixAudio_MMX_S16(char *, char *, unsigned int, int);
+void SDL_MixAudio_MMX_S8(char *, char *, unsigned int, int);
 #endif
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/audio/SDL_mixer_MMX_VC.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_mixer_MMX_VC.c	Mon May 29 04:04:35 2006 +0000
@@ -38,7 +38,7 @@
 ////////////////////////////////////////////////
 
 void
-SDL_MixAudio_MMX_S16_VC (char *dst, char *src, unsigned int nSize, int volume)
+SDL_MixAudio_MMX_S16_VC(char *dst, char *src, unsigned int nSize, int volume)
 {
     __asm {
 
@@ -102,7 +102,7 @@
 ////////////////////////////////////////////////
 
 void
-SDL_MixAudio_MMX_S8_VC (char *dst, char *src, unsigned int nSize, int volume)
+SDL_MixAudio_MMX_S8_VC(char *dst, char *src, unsigned int nSize, int volume)
 {
     _asm {
 
--- a/src/audio/SDL_mixer_MMX_VC.h	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_mixer_MMX_VC.h	Mon May 29 04:04:35 2006 +0000
@@ -31,7 +31,7 @@
    Assumes buffer size in bytes is a multiple of 16
    Assumes SDL_MIX_MAXVOLUME = 128
 */
-void SDL_MixAudio_MMX_S16_VC (char *, char *, unsigned int, int);
-void SDL_MixAudio_MMX_S8_VC (char *, char *, unsigned int, int);
+void SDL_MixAudio_MMX_S16_VC(char *, char *, unsigned int, int);
+void SDL_MixAudio_MMX_S8_VC(char *, char *, unsigned int, int);
 #endif
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/audio/SDL_mixer_m68k.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_mixer_m68k.c	Mon May 29 04:04:35 2006 +0000
@@ -29,112 +29,112 @@
 
 #if defined(__M68000__) && defined(__GNUC__)
 void
-SDL_MixAudio_m68k_U8 (char *dst, char *src, long len, long volume, char *mix8)
+SDL_MixAudio_m68k_U8(char *dst, char *src, long len, long volume, char *mix8)
 {
-    __asm__ __volatile__ ("tstl	%2\n" "	beqs	stoploop_u8\n" "mixloop_u8:\n"
-                          /* Mix a sample */
-                          "	moveq	#0,%%d0\n" "	moveq	#0,%%d1\n" "	moveb	%1@+,%%d0\n"    /* d0 = *src++ */
-                          "	sub	#128,%%d0\n"    /* d0 -= 128 */
-                          "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
-                          "	moveb	%0@,%%d1\n"     /* d1 = *dst */
-                          "	asr	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
-                          "	add	#128,%%d0\n"    /* d0 += 128 */
-                          "	add	%%d1,%%d0\n"
-                          "	moveb	%4@(%%d0:w),%0@+\n"
-                          /* Loop till done */
-                          "	subql	#1,%2\n" "	bhis	mixloop_u8\n" "stoploop_u8:\n": /* no return value */
-                          :     /* input */
-                          "a" (dst), "a" (src), "d" (len), "d" (volume), "a" (mix8):    /* clobbered registers */
-                          "d0", "d1", "cc", "memory");
+    __asm__ __volatile__("tstl	%2\n" "	beqs	stoploop_u8\n" "mixloop_u8:\n"
+                         /* Mix a sample */
+                         "	moveq	#0,%%d0\n" "	moveq	#0,%%d1\n" "	moveb	%1@+,%%d0\n"    /* d0 = *src++ */
+                         "	sub	#128,%%d0\n"    /* d0 -= 128 */
+                         "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
+                         "	moveb	%0@,%%d1\n"     /* d1 = *dst */
+                         "	asr	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
+                         "	add	#128,%%d0\n"    /* d0 += 128 */
+                         "	add	%%d1,%%d0\n"
+                         "	moveb	%4@(%%d0:w),%0@+\n"
+                         /* Loop till done */
+                         "	subql	#1,%2\n" "	bhis	mixloop_u8\n" "stoploop_u8:\n": /* no return value */
+                         :      /* input */
+                         "a"(dst), "a"(src), "d"(len), "d"(volume), "a"(mix8):  /* clobbered registers */
+                         "d0", "d1", "cc", "memory");
 }
 
 void
-SDL_MixAudio_m68k_S8 (char *dst, char *src, long len, long volume)
+SDL_MixAudio_m68k_S8(char *dst, char *src, long len, long volume)
 {
-    __asm__ __volatile__ ("tstl	%2\n"
-                          "	beqs	stoploop_s8\n"
-                          "	moveq	#-128,%%d2\n"
-                          "	moveq	#127,%%d3\n" "mixloop_s8:\n"
-                          /* Mix a sample */
-                          "	moveq	#0,%%d0\n" "	moveq	#0,%%d1\n" "	moveb	%1@+,%%d0\n"    /* d0 = *src++ */
-                          "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
-                          "	moveb	%0@,%%d1\n"     /* d1 = *dst */
-                          "	asr	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
-                          "	add	%%d1,%%d0\n"
-                          "	cmp	%%d2,%%d0\n"
-                          "	bges	lower_limit_s8\n"
-                          "	move	%%d2,%%d0\n"
-                          "lower_limit_s8:\n"
-                          "	cmp	%%d3,%%d0\n"
-                          "	bles	upper_limit_s8\n"
-                          "	move	%%d3,%%d0\n"
-                          "upper_limit_s8:\n" "	moveb	%%d0,%0@+\n"
-                          /* Loop till done */
-                          "	subql	#1,%2\n" "	bhis	mixloop_s8\n" "stoploop_s8:\n": /* no return value */
-                          :     /* input */
-                          "a" (dst), "a" (src), "d" (len), "d" (volume):        /* clobbered registers */
-                          "d0", "d1", "d2", "d3", "cc", "memory");
+    __asm__ __volatile__("tstl	%2\n"
+                         "	beqs	stoploop_s8\n"
+                         "	moveq	#-128,%%d2\n"
+                         "	moveq	#127,%%d3\n" "mixloop_s8:\n"
+                         /* Mix a sample */
+                         "	moveq	#0,%%d0\n" "	moveq	#0,%%d1\n" "	moveb	%1@+,%%d0\n"    /* d0 = *src++ */
+                         "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
+                         "	moveb	%0@,%%d1\n"     /* d1 = *dst */
+                         "	asr	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
+                         "	add	%%d1,%%d0\n"
+                         "	cmp	%%d2,%%d0\n"
+                         "	bges	lower_limit_s8\n"
+                         "	move	%%d2,%%d0\n"
+                         "lower_limit_s8:\n"
+                         "	cmp	%%d3,%%d0\n"
+                         "	bles	upper_limit_s8\n"
+                         "	move	%%d3,%%d0\n"
+                         "upper_limit_s8:\n" "	moveb	%%d0,%0@+\n"
+                         /* Loop till done */
+                         "	subql	#1,%2\n" "	bhis	mixloop_s8\n" "stoploop_s8:\n": /* no return value */
+                         :      /* input */
+                         "a"(dst), "a"(src), "d"(len), "d"(volume):     /* clobbered registers */
+                         "d0", "d1", "d2", "d3", "cc", "memory");
 }
 
 void
-SDL_MixAudio_m68k_S16MSB (short *dst, short *src, long len, long volume)
+SDL_MixAudio_m68k_S16MSB(short *dst, short *src, long len, long volume)
 {
-    __asm__ __volatile__ ("tstl	%2\n"
-                          "	beqs	stoploop_s16msb\n"
-                          "	movel	#-32768,%%d2\n"
-                          "	movel	#32767,%%d3\n"
-                          "	lsrl	#1,%2\n" "mixloop_s16msb:\n"
-                          /* Mix a sample */
-                          "	move	%1@+,%%d0\n"    /* d0 = *src++ */
-                          "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
-                          "	move	%0@,%%d1\n"     /* d1 = *dst */
-                          "	extl	%%d1\n" /* extend d1 to 32 bits */
-                          "	asrl	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
-                          "	addl	%%d1,%%d0\n"
-                          "	cmpl	%%d2,%%d0\n"
-                          "	bges	lower_limit_s16msb\n"
-                          "	move	%%d2,%%d0\n"
-                          "lower_limit_s16msb:\n"
-                          "	cmpl	%%d3,%%d0\n"
-                          "	bles	upper_limit_s16msb\n"
-                          "	move	%%d3,%%d0\n"
-                          "upper_limit_s16msb:\n" "	move	%%d0,%0@+\n"
-                          /* Loop till done */
-                          "	subql	#1,%2\n" "	bhis	mixloop_s16msb\n" "stoploop_s16msb:\n": /* no return value */
-                          :     /* input */
-                          "a" (dst), "a" (src), "d" (len), "d" (volume):        /* clobbered registers */
-                          "d0", "d1", "d2", "d3", "cc", "memory");
+    __asm__ __volatile__("tstl	%2\n"
+                         "	beqs	stoploop_s16msb\n"
+                         "	movel	#-32768,%%d2\n"
+                         "	movel	#32767,%%d3\n"
+                         "	lsrl	#1,%2\n" "mixloop_s16msb:\n"
+                         /* Mix a sample */
+                         "	move	%1@+,%%d0\n"    /* d0 = *src++ */
+                         "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
+                         "	move	%0@,%%d1\n"     /* d1 = *dst */
+                         "	extl	%%d1\n" /* extend d1 to 32 bits */
+                         "	asrl	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
+                         "	addl	%%d1,%%d0\n"
+                         "	cmpl	%%d2,%%d0\n"
+                         "	bges	lower_limit_s16msb\n"
+                         "	move	%%d2,%%d0\n"
+                         "lower_limit_s16msb:\n"
+                         "	cmpl	%%d3,%%d0\n"
+                         "	bles	upper_limit_s16msb\n"
+                         "	move	%%d3,%%d0\n"
+                         "upper_limit_s16msb:\n" "	move	%%d0,%0@+\n"
+                         /* Loop till done */
+                         "	subql	#1,%2\n" "	bhis	mixloop_s16msb\n" "stoploop_s16msb:\n": /* no return value */
+                         :      /* input */
+                         "a"(dst), "a"(src), "d"(len), "d"(volume):     /* clobbered registers */
+                         "d0", "d1", "d2", "d3", "cc", "memory");
 }
 
 void
-SDL_MixAudio_m68k_S16LSB (short *dst, short *src, long len, long volume)
+SDL_MixAudio_m68k_S16LSB(short *dst, short *src, long len, long volume)
 {
-    __asm__ __volatile__ ("tstl	%2\n"
-                          "	beqs	stoploop_s16lsb\n"
-                          "	movel	#-32768,%%d2\n"
-                          "	movel	#32767,%%d3\n"
-                          "	lsrl	#1,%2\n" "mixloop_s16lsb:\n"
-                          /* Mix a sample */
-                          "	move	%1@+,%%d0\n"    /* d0 = *src++ */
-                          "	rorw	#8,%%d0\n" "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
-                          "	move	%0@,%%d1\n"     /* d1 = *dst */
-                          "	rorw	#8,%%d1\n" "	extl	%%d1\n" /* extend d1 to 32 bits */
-                          "	asrl	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
-                          "	addl	%%d1,%%d0\n"
-                          "	cmpl	%%d2,%%d0\n"
-                          "	bges	lower_limit_s16lsb\n"
-                          "	move	%%d2,%%d0\n"
-                          "lower_limit_s16lsb:\n"
-                          "	cmpl	%%d3,%%d0\n"
-                          "	bles	upper_limit_s16lsb\n"
-                          "	move	%%d3,%%d0\n"
-                          "upper_limit_s16lsb:\n"
-                          "	rorw	#8,%%d0\n" "	move	%%d0,%0@+\n"
-                          /* Loop till done */
-                          "	subql	#1,%2\n" "	bhis	mixloop_s16lsb\n" "stoploop_s16lsb:\n": /* no return value */
-                          :     /* input */
-                          "a" (dst), "a" (src), "d" (len), "d" (volume):        /* clobbered registers */
-                          "d0", "d1", "d2", "d3", "cc", "memory");
+    __asm__ __volatile__("tstl	%2\n"
+                         "	beqs	stoploop_s16lsb\n"
+                         "	movel	#-32768,%%d2\n"
+                         "	movel	#32767,%%d3\n"
+                         "	lsrl	#1,%2\n" "mixloop_s16lsb:\n"
+                         /* Mix a sample */
+                         "	move	%1@+,%%d0\n"    /* d0 = *src++ */
+                         "	rorw	#8,%%d0\n" "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
+                         "	move	%0@,%%d1\n"     /* d1 = *dst */
+                         "	rorw	#8,%%d1\n" "	extl	%%d1\n" /* extend d1 to 32 bits */
+                         "	asrl	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
+                         "	addl	%%d1,%%d0\n"
+                         "	cmpl	%%d2,%%d0\n"
+                         "	bges	lower_limit_s16lsb\n"
+                         "	move	%%d2,%%d0\n"
+                         "lower_limit_s16lsb:\n"
+                         "	cmpl	%%d3,%%d0\n"
+                         "	bles	upper_limit_s16lsb\n"
+                         "	move	%%d3,%%d0\n"
+                         "upper_limit_s16lsb:\n"
+                         "	rorw	#8,%%d0\n" "	move	%%d0,%0@+\n"
+                         /* Loop till done */
+                         "	subql	#1,%2\n" "	bhis	mixloop_s16lsb\n" "stoploop_s16lsb:\n": /* no return value */
+                         :      /* input */
+                         "a"(dst), "a"(src), "d"(len), "d"(volume):     /* clobbered registers */
+                         "d0", "d1", "d2", "d3", "cc", "memory");
 }
 #endif
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/audio/SDL_mixer_m68k.h	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_mixer_m68k.h	Mon May 29 04:04:35 2006 +0000
@@ -28,11 +28,11 @@
 */
 
 #if defined(__M68000__) && defined(__GNUC__)
-void SDL_MixAudio_m68k_U8 (char *dst, char *src, long len, long volume,
-                           char *mix8);
-void SDL_MixAudio_m68k_S8 (char *dst, char *src, long len, long volume);
+void SDL_MixAudio_m68k_U8(char *dst, char *src, long len, long volume,
+                          char *mix8);
+void SDL_MixAudio_m68k_S8(char *dst, char *src, long len, long volume);
 
-void SDL_MixAudio_m68k_S16MSB (short *dst, short *src, long len, long volume);
-void SDL_MixAudio_m68k_S16LSB (short *dst, short *src, long len, long volume);
+void SDL_MixAudio_m68k_S16MSB(short *dst, short *src, long len, long volume);
+void SDL_MixAudio_m68k_S16LSB(short *dst, short *src, long len, long volume);
 #endif
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/audio/SDL_wave.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/SDL_wave.c	Mon May 29 04:04:35 2006 +0000
@@ -27,7 +27,7 @@
 #include "SDL_wave.h"
 
 
-static int ReadChunk (SDL_RWops * src, Chunk * chunk);
+static int ReadChunk(SDL_RWops * src, Chunk * chunk);
 
 struct MS_ADPCM_decodestate
 {
@@ -47,45 +47,45 @@
 } MS_ADPCM_state;
 
 static int
-InitMS_ADPCM (WaveFMT * format)
+InitMS_ADPCM(WaveFMT * format)
 {
     Uint8 *rogue_feel;
     Uint16 extra_info;
     int i;
 
     /* Set the rogue pointer to the MS_ADPCM specific data */
-    MS_ADPCM_state.wavefmt.encoding = SDL_SwapLE16 (format->encoding);
-    MS_ADPCM_state.wavefmt.channels = SDL_SwapLE16 (format->channels);
-    MS_ADPCM_state.wavefmt.frequency = SDL_SwapLE32 (format->frequency);
-    MS_ADPCM_state.wavefmt.byterate = SDL_SwapLE32 (format->byterate);
-    MS_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16 (format->blockalign);
+    MS_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
+    MS_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
+    MS_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
+    MS_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate);
+    MS_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign);
     MS_ADPCM_state.wavefmt.bitspersample =
-        SDL_SwapLE16 (format->bitspersample);
-    rogue_feel = (Uint8 *) format + sizeof (*format);
-    if (sizeof (*format) == 16) {
+        SDL_SwapLE16(format->bitspersample);
+    rogue_feel = (Uint8 *) format + sizeof(*format);
+    if (sizeof(*format) == 16) {
         extra_info = ((rogue_feel[1] << 8) | rogue_feel[0]);
-        rogue_feel += sizeof (Uint16);
+        rogue_feel += sizeof(Uint16);
     }
     MS_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1] << 8) | rogue_feel[0]);
-    rogue_feel += sizeof (Uint16);
+    rogue_feel += sizeof(Uint16);
     MS_ADPCM_state.wNumCoef = ((rogue_feel[1] << 8) | rogue_feel[0]);
-    rogue_feel += sizeof (Uint16);
+    rogue_feel += sizeof(Uint16);
     if (MS_ADPCM_state.wNumCoef != 7) {
-        SDL_SetError ("Unknown set of MS_ADPCM coefficients");
+        SDL_SetError("Unknown set of MS_ADPCM coefficients");
         return (-1);
     }
     for (i = 0; i < MS_ADPCM_state.wNumCoef; ++i) {
         MS_ADPCM_state.aCoeff[i][0] = ((rogue_feel[1] << 8) | rogue_feel[0]);
-        rogue_feel += sizeof (Uint16);
+        rogue_feel += sizeof(Uint16);
         MS_ADPCM_state.aCoeff[i][1] = ((rogue_feel[1] << 8) | rogue_feel[0]);
-        rogue_feel += sizeof (Uint16);
+        rogue_feel += sizeof(Uint16);
     }
     return (0);
 }
 
 static Sint32
-MS_ADPCM_nibble (struct MS_ADPCM_decodestate *state,
-                 Uint8 nybble, Sint16 * coeff)
+MS_ADPCM_nibble(struct MS_ADPCM_decodestate *state,
+                Uint8 nybble, Sint16 * coeff)
 {
     const Sint32 max_audioval = ((1 << (16 - 1)) - 1);
     const Sint32 min_audioval = -(1 << (16 - 1));
@@ -118,7 +118,7 @@
 }
 
 static int
-MS_ADPCM_decode (Uint8 ** audio_buf, Uint32 * audio_len)
+MS_ADPCM_decode(Uint8 ** audio_buf, Uint32 * audio_len)
 {
     struct MS_ADPCM_decodestate *state[2];
     Uint8 *freeable, *encoded, *decoded;
@@ -133,10 +133,10 @@
     freeable = *audio_buf;
     *audio_len = (encoded_len / MS_ADPCM_state.wavefmt.blockalign) *
         MS_ADPCM_state.wSamplesPerBlock *
-        MS_ADPCM_state.wavefmt.channels * sizeof (Sint16);
-    *audio_buf = (Uint8 *) SDL_malloc (*audio_len);
+        MS_ADPCM_state.wavefmt.channels * sizeof(Sint16);
+    *audio_buf = (Uint8 *) SDL_malloc(*audio_len);
     if (*audio_buf == NULL) {
-        SDL_Error (SDL_ENOMEM);
+        SDL_Error(SDL_ENOMEM);
         return (-1);
     }
     decoded = *audio_buf;
@@ -152,22 +152,22 @@
             state[1]->hPredictor = *encoded++;
         }
         state[0]->iDelta = ((encoded[1] << 8) | encoded[0]);
-        encoded += sizeof (Sint16);
+        encoded += sizeof(Sint16);
         if (stereo) {
             state[1]->iDelta = ((encoded[1] << 8) | encoded[0]);
-            encoded += sizeof (Sint16);
+            encoded += sizeof(Sint16);
         }
         state[0]->iSamp1 = ((encoded[1] << 8) | encoded[0]);
-        encoded += sizeof (Sint16);
+        encoded += sizeof(Sint16);
         if (stereo) {
             state[1]->iSamp1 = ((encoded[1] << 8) | encoded[0]);
-            encoded += sizeof (Sint16);
+            encoded += sizeof(Sint16);
         }
         state[0]->iSamp2 = ((encoded[1] << 8) | encoded[0]);
-        encoded += sizeof (Sint16);
+        encoded += sizeof(Sint16);
         if (stereo) {
             state[1]->iSamp2 = ((encoded[1] << 8) | encoded[0]);
-            encoded += sizeof (Sint16);
+            encoded += sizeof(Sint16);
         }
         coeff[0] = MS_ADPCM_state.aCoeff[state[0]->hPredictor];
         coeff[1] = MS_ADPCM_state.aCoeff[state[1]->hPredictor];
@@ -195,14 +195,14 @@
             MS_ADPCM_state.wavefmt.channels;
         while (samplesleft > 0) {
             nybble = (*encoded) >> 4;
-            new_sample = MS_ADPCM_nibble (state[0], nybble, coeff[0]);
+            new_sample = MS_ADPCM_nibble(state[0], nybble, coeff[0]);
             decoded[0] = new_sample & 0xFF;
             new_sample >>= 8;
             decoded[1] = new_sample & 0xFF;
             decoded += 2;
 
             nybble = (*encoded) & 0x0F;
-            new_sample = MS_ADPCM_nibble (state[1], nybble, coeff[1]);
+            new_sample = MS_ADPCM_nibble(state[1], nybble, coeff[1]);
             decoded[0] = new_sample & 0xFF;
             new_sample >>= 8;
             decoded[1] = new_sample & 0xFF;
@@ -213,7 +213,7 @@
         }
         encoded_len -= MS_ADPCM_state.wavefmt.blockalign;
     }
-    SDL_free (freeable);
+    SDL_free(freeable);
     return (0);
 }
 
@@ -231,30 +231,30 @@
 } IMA_ADPCM_state;
 
 static int
-InitIMA_ADPCM (WaveFMT * format)
+InitIMA_ADPCM(WaveFMT * format)
 {
     Uint8 *rogue_feel;
     Uint16 extra_info;
 
     /* Set the rogue pointer to the IMA_ADPCM specific data */
-    IMA_ADPCM_state.wavefmt.encoding = SDL_SwapLE16 (format->encoding);
-    IMA_ADPCM_state.wavefmt.channels = SDL_SwapLE16 (format->channels);
-    IMA_ADPCM_state.wavefmt.frequency = SDL_SwapLE32 (format->frequency);
-    IMA_ADPCM_state.wavefmt.byterate = SDL_SwapLE32 (format->byterate);
-    IMA_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16 (format->blockalign);
+    IMA_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
+    IMA_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
+    IMA_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
+    IMA_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate);
+    IMA_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign);
     IMA_ADPCM_state.wavefmt.bitspersample =
-        SDL_SwapLE16 (format->bitspersample);
-    rogue_feel = (Uint8 *) format + sizeof (*format);
-    if (sizeof (*format) == 16) {
+        SDL_SwapLE16(format->bitspersample);
+    rogue_feel = (Uint8 *) format + sizeof(*format);
+    if (sizeof(*format) == 16) {
         extra_info = ((rogue_feel[1] << 8) | rogue_feel[0]);
-        rogue_feel += sizeof (Uint16);
+        rogue_feel += sizeof(Uint16);
     }
     IMA_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1] << 8) | rogue_feel[0]);
     return (0);
 }
 
 static Sint32
-IMA_ADPCM_nibble (struct IMA_ADPCM_decodestate *state, Uint8 nybble)
+IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state, Uint8 nybble)
 {
     const Sint32 max_audioval = ((1 << (16 - 1)) - 1);
     const Sint32 min_audioval = -(1 << (16 - 1));
@@ -308,9 +308,9 @@
 
 /* Fill the decode buffer with a channel block of data (8 samples) */
 static void
-Fill_IMA_ADPCM_block (Uint8 * decoded, Uint8 * encoded,
-                      int channel, int numchannels,
-                      struct IMA_ADPCM_decodestate *state)
+Fill_IMA_ADPCM_block(Uint8 * decoded, Uint8 * encoded,
+                     int channel, int numchannels,
+                     struct IMA_ADPCM_decodestate *state)
 {
     int i;
     Sint8 nybble;
@@ -319,14 +319,14 @@
     decoded += (channel * 2);
     for (i = 0; i < 4; ++i) {
         nybble = (*encoded) & 0x0F;
-        new_sample = IMA_ADPCM_nibble (state, nybble);
+        new_sample = IMA_ADPCM_nibble(state, nybble);
         decoded[0] = new_sample & 0xFF;
         new_sample >>= 8;
         decoded[1] = new_sample & 0xFF;
         decoded += 2 * numchannels;
 
         nybble = (*encoded) >> 4;
-        new_sample = IMA_ADPCM_nibble (state, nybble);
+        new_sample = IMA_ADPCM_nibble(state, nybble);
         decoded[0] = new_sample & 0xFF;
         new_sample >>= 8;
         decoded[1] = new_sample & 0xFF;
@@ -337,7 +337,7 @@
 }
 
 static int
-IMA_ADPCM_decode (Uint8 ** audio_buf, Uint32 * audio_len)
+IMA_ADPCM_decode(Uint8 ** audio_buf, Uint32 * audio_len)
 {
     struct IMA_ADPCM_decodestate *state;
     Uint8 *freeable, *encoded, *decoded;
@@ -346,9 +346,9 @@
 
     /* Check to make sure we have enough variables in the state array */
     channels = IMA_ADPCM_state.wavefmt.channels;
-    if (channels > SDL_arraysize (IMA_ADPCM_state.state)) {
-        SDL_SetError ("IMA ADPCM decoder can only handle %d channels",
-                      SDL_arraysize (IMA_ADPCM_state.state));
+    if (channels > SDL_arraysize(IMA_ADPCM_state.state)) {
+        SDL_SetError("IMA ADPCM decoder can only handle %d channels",
+                     SDL_arraysize(IMA_ADPCM_state.state));
         return (-1);
     }
     state = IMA_ADPCM_state.state;
@@ -359,10 +359,10 @@
     freeable = *audio_buf;
     *audio_len = (encoded_len / IMA_ADPCM_state.wavefmt.blockalign) *
         IMA_ADPCM_state.wSamplesPerBlock *
-        IMA_ADPCM_state.wavefmt.channels * sizeof (Sint16);
-    *audio_buf = (Uint8 *) SDL_malloc (*audio_len);
+        IMA_ADPCM_state.wavefmt.channels * sizeof(Sint16);
+    *audio_buf = (Uint8 *) SDL_malloc(*audio_len);
     if (*audio_buf == NULL) {
-        SDL_Error (SDL_ENOMEM);
+        SDL_Error(SDL_ENOMEM);
         return (-1);
     }
     decoded = *audio_buf;
@@ -393,8 +393,8 @@
         samplesleft = (IMA_ADPCM_state.wSamplesPerBlock - 1) * channels;
         while (samplesleft > 0) {
             for (c = 0; c < channels; ++c) {
-                Fill_IMA_ADPCM_block (decoded, encoded,
-                                      c, channels, &state[c]);
+                Fill_IMA_ADPCM_block(decoded, encoded,
+                                     c, channels, &state[c]);
                 encoded += 4;
                 samplesleft -= 8;
             }
@@ -402,13 +402,13 @@
         }
         encoded_len -= IMA_ADPCM_state.wavefmt.blockalign;
     }
-    SDL_free (freeable);
+    SDL_free(freeable);
     return (0);
 }
 
 SDL_AudioSpec *
-SDL_LoadWAV_RW (SDL_RWops * src, int freesrc,
-                SDL_AudioSpec * spec, Uint8 ** audio_buf, Uint32 * audio_len)
+SDL_LoadWAV_RW(SDL_RWops * src, int freesrc,
+               SDL_AudioSpec * spec, Uint8 ** audio_buf, Uint32 * audio_len)
 {
     int was_error;
     Chunk chunk;
@@ -433,53 +433,53 @@
     }
 
     /* Check the magic header */
-    RIFFchunk = SDL_ReadLE32 (src);
-    wavelen = SDL_ReadLE32 (src);
+    RIFFchunk = SDL_ReadLE32(src);
+    wavelen = SDL_ReadLE32(src);
     if (wavelen == WAVE) {      /* The RIFFchunk has already been read */
         WAVEmagic = wavelen;
         wavelen = RIFFchunk;
         RIFFchunk = RIFF;
     } else {
-        WAVEmagic = SDL_ReadLE32 (src);
+        WAVEmagic = SDL_ReadLE32(src);
     }
     if ((RIFFchunk != RIFF) || (WAVEmagic != WAVE)) {
-        SDL_SetError ("Unrecognized file type (not WAVE)");
+        SDL_SetError("Unrecognized file type (not WAVE)");
         was_error = 1;
         goto done;
     }
-    headerDiff += sizeof (Uint32);      /* for WAVE */
+    headerDiff += sizeof(Uint32);       /* for WAVE */
 
     /* Read the audio data format chunk */
     chunk.data = NULL;
     do {
         if (chunk.data != NULL) {
-            SDL_free (chunk.data);
+            SDL_free(chunk.data);
         }
-        lenread = ReadChunk (src, &chunk);
+        lenread = ReadChunk(src, &chunk);
         if (lenread < 0) {
             was_error = 1;
             goto done;
         }
         /* 2 Uint32's for chunk header+len, plus the lenread */
-        headerDiff += lenread + 2 * sizeof (Uint32);
+        headerDiff += lenread + 2 * sizeof(Uint32);
     }
     while ((chunk.magic == FACT) || (chunk.magic == LIST));
 
     /* Decode the audio data format */
     format = (WaveFMT *) chunk.data;
     if (chunk.magic != FMT) {
-        SDL_SetError ("Complex WAVE files not supported");
+        SDL_SetError("Complex WAVE files not supported");
         was_error = 1;
         goto done;
     }
     MS_ADPCM_encoded = IMA_ADPCM_encoded = 0;
-    switch (SDL_SwapLE16 (format->encoding)) {
+    switch (SDL_SwapLE16(format->encoding)) {
     case PCM_CODE:
         /* We can understand this */
         break;
     case MS_ADPCM_CODE:
         /* Try to understand this */
-        if (InitMS_ADPCM (format) < 0) {
+        if (InitMS_ADPCM(format) < 0) {
             was_error = 1;
             goto done;
         }
@@ -487,26 +487,26 @@
         break;
     case IMA_ADPCM_CODE:
         /* Try to understand this */
-        if (InitIMA_ADPCM (format) < 0) {
+        if (InitIMA_ADPCM(format) < 0) {
             was_error = 1;
             goto done;
         }
         IMA_ADPCM_encoded = 1;
         break;
     case MP3_CODE:
-        SDL_SetError ("MPEG Layer 3 data not supported",
-                      SDL_SwapLE16 (format->encoding));
+        SDL_SetError("MPEG Layer 3 data not supported",
+                     SDL_SwapLE16(format->encoding));
         was_error = 1;
         goto done;
     default:
-        SDL_SetError ("Unknown WAVE data format: 0x%.4x",
-                      SDL_SwapLE16 (format->encoding));
+        SDL_SetError("Unknown WAVE data format: 0x%.4x",
+                     SDL_SwapLE16(format->encoding));
         was_error = 1;
         goto done;
     }
-    SDL_memset (spec, 0, (sizeof *spec));
-    spec->freq = SDL_SwapLE32 (format->frequency);
-    switch (SDL_SwapLE16 (format->bitspersample)) {
+    SDL_memset(spec, 0, (sizeof *spec));
+    spec->freq = SDL_SwapLE32(format->frequency);
+    switch (SDL_SwapLE16(format->bitspersample)) {
     case 4:
         if (MS_ADPCM_encoded || IMA_ADPCM_encoded) {
             spec->format = AUDIO_S16;
@@ -525,20 +525,20 @@
         break;
     }
     if (was_error) {
-        SDL_SetError ("Unknown %d-bit PCM data format",
-                      SDL_SwapLE16 (format->bitspersample));
+        SDL_SetError("Unknown %d-bit PCM data format",
+                     SDL_SwapLE16(format->bitspersample));
         goto done;
     }
-    spec->channels = (Uint8) SDL_SwapLE16 (format->channels);
+    spec->channels = (Uint8) SDL_SwapLE16(format->channels);
     spec->samples = 4096;       /* Good default buffer size */
 
     /* Read the audio data chunk */
     *audio_buf = NULL;
     do {
         if (*audio_buf != NULL) {
-            SDL_free (*audio_buf);
+            SDL_free(*audio_buf);
         }
-        lenread = ReadChunk (src, &chunk);
+        lenread = ReadChunk(src, &chunk);
         if (lenread < 0) {
             was_error = 1;
             goto done;
@@ -546,19 +546,19 @@
         *audio_len = lenread;
         *audio_buf = chunk.data;
         if (chunk.magic != DATA)
-            headerDiff += lenread + 2 * sizeof (Uint32);
+            headerDiff += lenread + 2 * sizeof(Uint32);
     }
     while (chunk.magic != DATA);
-    headerDiff += 2 * sizeof (Uint32);  /* for the data chunk and len */
+    headerDiff += 2 * sizeof(Uint32);   /* for the data chunk and len */
 
     if (MS_ADPCM_encoded) {
-        if (MS_ADPCM_decode (audio_buf, audio_len) < 0) {
+        if (MS_ADPCM_decode(audio_buf, audio_len) < 0) {
             was_error = 1;
             goto done;
         }
     }
     if (IMA_ADPCM_encoded) {
-        if (IMA_ADPCM_decode (audio_buf, audio_len) < 0) {
+        if (IMA_ADPCM_decode(audio_buf, audio_len) < 0) {
             was_error = 1;
             goto done;
         }
@@ -570,15 +570,14 @@
 
   done:
     if (format != NULL) {
-        SDL_free (format);
+        SDL_free(format);
     }
     if (src) {
         if (freesrc) {
-            SDL_RWclose (src);
+            SDL_RWclose(src);
         } else {
             /* seek to the end of the file (given by the RIFF chunk) */
-            SDL_RWseek (src, wavelen - chunk.length - headerDiff,
-                        RW_SEEK_CUR);
+            SDL_RWseek(src, wavelen - chunk.length - headerDiff, RW_SEEK_CUR);
         }
     }
     if (was_error) {
@@ -591,26 +590,26 @@
    be freed here.  (Necessary under Win32, VC++)
  */
 void
-SDL_FreeWAV (Uint8 * audio_buf)
+SDL_FreeWAV(Uint8 * audio_buf)
 {
     if (audio_buf != NULL) {
-        SDL_free (audio_buf);
+        SDL_free(audio_buf);
     }
 }
 
 static int
-ReadChunk (SDL_RWops * src, Chunk * chunk)
+ReadChunk(SDL_RWops * src, Chunk * chunk)
 {
-    chunk->magic = SDL_ReadLE32 (src);
-    chunk->length = SDL_ReadLE32 (src);
-    chunk->data = (Uint8 *) SDL_malloc (chunk->length);
+    chunk->magic = SDL_ReadLE32(src);
+    chunk->length = SDL_ReadLE32(src);
+    chunk->data = (Uint8 *) SDL_malloc(chunk->length);
     if (chunk->data == NULL) {
-        SDL_Error (SDL_ENOMEM);
+        SDL_Error(SDL_ENOMEM);
         return (-1);
     }
-    if (SDL_RWread (src, chunk->data, chunk->length, 1) != 1) {
-        SDL_Error (SDL_EFREAD);
-        SDL_free (chunk->data);
+    if (SDL_RWread(src, chunk->data, chunk->length, 1) != 1) {
+        SDL_Error(SDL_EFREAD);
+        SDL_free(chunk->data);
         return (-1);
     }
     return (chunk->length);
--- a/src/audio/alsa/SDL_alsa_audio.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/alsa/SDL_alsa_audio.c	Mon May 29 04:04:35 2006 +0000
@@ -48,11 +48,11 @@
 #define DEFAULT_DEVICE	"default"
 
 /* Audio driver functions */
-static int ALSA_OpenAudio (_THIS, SDL_AudioSpec * spec);
-static void ALSA_WaitAudio (_THIS);
-static void ALSA_PlayAudio (_THIS);
-static Uint8 *ALSA_GetAudioBuf (_THIS);
-static void ALSA_CloseAudio (_THIS);
+static int ALSA_OpenAudio(_THIS, SDL_AudioSpec * spec);
+static void ALSA_WaitAudio(_THIS);
+static void ALSA_PlayAudio(_THIS);
+static Uint8 *ALSA_GetAudioBuf(_THIS);
+static void ALSA_CloseAudio(_THIS);
 
 #ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
 
@@ -62,83 +62,81 @@
 
 static int (*SDL_snd_pcm_open) (snd_pcm_t ** pcm, const char *name,
                                 snd_pcm_stream_t stream, int mode);
-static int (*SDL_NAME (snd_pcm_open)) (snd_pcm_t ** pcm, const char *name,
-                                       snd_pcm_stream_t stream, int mode);
-static int (*SDL_NAME (snd_pcm_close)) (snd_pcm_t * pcm);
-static snd_pcm_sframes_t (*SDL_NAME (snd_pcm_writei)) (snd_pcm_t * pcm,
-                                                       const void *buffer,
-                                                       snd_pcm_uframes_t
-                                                       size);
-static int (*SDL_NAME (snd_pcm_resume)) (snd_pcm_t * pcm);
-static int (*SDL_NAME (snd_pcm_prepare)) (snd_pcm_t * pcm);
-static int (*SDL_NAME (snd_pcm_drain)) (snd_pcm_t * pcm);
-static const char *(*SDL_NAME (snd_strerror)) (int errnum);
-static size_t (*SDL_NAME (snd_pcm_hw_params_sizeof)) (void);
-static size_t (*SDL_NAME (snd_pcm_sw_params_sizeof)) (void);
-static int (*SDL_NAME (snd_pcm_hw_params_any)) (snd_pcm_t * pcm,
-                                                snd_pcm_hw_params_t * params);
-static int (*SDL_NAME (snd_pcm_hw_params_set_access)) (snd_pcm_t * pcm,
-                                                       snd_pcm_hw_params_t *
-                                                       params,
-                                                       snd_pcm_access_t
-                                                       access);
-static int (*SDL_NAME (snd_pcm_hw_params_set_format)) (snd_pcm_t * pcm,
-                                                       snd_pcm_hw_params_t *
-                                                       params,
-                                                       snd_pcm_format_t val);
-static int (*SDL_NAME (snd_pcm_hw_params_set_channels)) (snd_pcm_t * pcm,
-                                                         snd_pcm_hw_params_t *
-                                                         params,
-                                                         unsigned int val);
-static int (*SDL_NAME (snd_pcm_hw_params_get_channels)) (const
-                                                         snd_pcm_hw_params_t *
-                                                         params);
+static int (*SDL_NAME(snd_pcm_open)) (snd_pcm_t ** pcm, const char *name,
+                                      snd_pcm_stream_t stream, int mode);
+static int (*SDL_NAME(snd_pcm_close)) (snd_pcm_t * pcm);
+static snd_pcm_sframes_t(*SDL_NAME(snd_pcm_writei)) (snd_pcm_t * pcm,
+                                                     const void *buffer,
+                                                     snd_pcm_uframes_t size);
+static int (*SDL_NAME(snd_pcm_resume)) (snd_pcm_t * pcm);
+static int (*SDL_NAME(snd_pcm_prepare)) (snd_pcm_t * pcm);
+static int (*SDL_NAME(snd_pcm_drain)) (snd_pcm_t * pcm);
+static const char *(*SDL_NAME(snd_strerror)) (int errnum);
+static size_t(*SDL_NAME(snd_pcm_hw_params_sizeof)) (void);
+static size_t(*SDL_NAME(snd_pcm_sw_params_sizeof)) (void);
+static int (*SDL_NAME(snd_pcm_hw_params_any)) (snd_pcm_t * pcm,
+                                               snd_pcm_hw_params_t * params);
+static int (*SDL_NAME(snd_pcm_hw_params_set_access)) (snd_pcm_t * pcm,
+                                                      snd_pcm_hw_params_t *
+                                                      params,
+                                                      snd_pcm_access_t
+                                                      access);
+static int (*SDL_NAME(snd_pcm_hw_params_set_format)) (snd_pcm_t * pcm,
+                                                      snd_pcm_hw_params_t *
+                                                      params,
+                                                      snd_pcm_format_t val);
+static int (*SDL_NAME(snd_pcm_hw_params_set_channels)) (snd_pcm_t * pcm,
+                                                        snd_pcm_hw_params_t *
+                                                        params,
+                                                        unsigned int val);
+static int (*SDL_NAME(snd_pcm_hw_params_get_channels)) (const
+                                                        snd_pcm_hw_params_t *
+                                                        params);
 static unsigned int
-    (*SDL_NAME (snd_pcm_hw_params_set_rate_near)) (snd_pcm_t *
-                                                   pcm,
-                                                   snd_pcm_hw_params_t
-                                                   * params,
-                                                   unsigned
-                                                   int val, int *dir);
+    (*SDL_NAME(snd_pcm_hw_params_set_rate_near)) (snd_pcm_t *
+                                                  pcm,
+                                                  snd_pcm_hw_params_t
+                                                  * params,
+                                                  unsigned int val, int *dir);
 static snd_pcm_uframes_t
-    (*SDL_NAME (snd_pcm_hw_params_set_period_size_near)) (snd_pcm_t * pcm,
-                                                          snd_pcm_hw_params_t
-                                                          * params,
-                                                          snd_pcm_uframes_t
-                                                          val, int *dir);
+    (*SDL_NAME(snd_pcm_hw_params_set_period_size_near)) (snd_pcm_t * pcm,
+                                                         snd_pcm_hw_params_t
+                                                         * params,
+                                                         snd_pcm_uframes_t
+                                                         val, int *dir);
 static snd_pcm_sframes_t
-    (*SDL_NAME (snd_pcm_hw_params_get_period_size)) (const
-                                                     snd_pcm_hw_params_t
-                                                     * params);
+    (*SDL_NAME(snd_pcm_hw_params_get_period_size)) (const
+                                                    snd_pcm_hw_params_t
+                                                    * params);
 static unsigned int
-    (*SDL_NAME (snd_pcm_hw_params_set_periods_near)) (snd_pcm_t * pcm,
-                                                      snd_pcm_hw_params_t
-                                                      * params,
-                                                      unsigned int val,
-                                                      int *dir);
-static int (*SDL_NAME (snd_pcm_hw_params_get_periods)) (snd_pcm_hw_params_t *
-                                                        params);
-static int (*SDL_NAME (snd_pcm_hw_params)) (snd_pcm_t * pcm,
-                                            snd_pcm_hw_params_t * params);
+    (*SDL_NAME(snd_pcm_hw_params_set_periods_near)) (snd_pcm_t * pcm,
+                                                     snd_pcm_hw_params_t
+                                                     * params,
+                                                     unsigned int val,
+                                                     int *dir);
+static int (*SDL_NAME(snd_pcm_hw_params_get_periods)) (snd_pcm_hw_params_t *
+                                                       params);
+static int (*SDL_NAME(snd_pcm_hw_params)) (snd_pcm_t * pcm,
+                                           snd_pcm_hw_params_t * params);
 /*
 */
-static int (*SDL_NAME (snd_pcm_sw_params_current)) (snd_pcm_t * pcm,
-                                                    snd_pcm_sw_params_t *
-                                                    swparams);
-static int (*SDL_NAME (snd_pcm_sw_params_set_start_threshold)) (snd_pcm_t *
-                                                                pcm,
-                                                                snd_pcm_sw_params_t
-                                                                * params,
-                                                                snd_pcm_uframes_t
-                                                                val);
-static int (*SDL_NAME (snd_pcm_sw_params_set_avail_min)) (snd_pcm_t * pcm,
-                                                          snd_pcm_sw_params_t
-                                                          * params,
-                                                          snd_pcm_uframes_t
-                                                          val);
-static int (*SDL_NAME (snd_pcm_sw_params)) (snd_pcm_t * pcm,
-                                            snd_pcm_sw_params_t * params);
-static int (*SDL_NAME (snd_pcm_nonblock)) (snd_pcm_t * pcm, int nonblock);
+static int (*SDL_NAME(snd_pcm_sw_params_current)) (snd_pcm_t * pcm,
+                                                   snd_pcm_sw_params_t *
+                                                   swparams);
+static int (*SDL_NAME(snd_pcm_sw_params_set_start_threshold)) (snd_pcm_t *
+                                                               pcm,
+                                                               snd_pcm_sw_params_t
+                                                               * params,
+                                                               snd_pcm_uframes_t
+                                                               val);
+static int (*SDL_NAME(snd_pcm_sw_params_set_avail_min)) (snd_pcm_t * pcm,
+                                                         snd_pcm_sw_params_t
+                                                         * params,
+                                                         snd_pcm_uframes_t
+                                                         val);
+static int (*SDL_NAME(snd_pcm_sw_params)) (snd_pcm_t * pcm,
+                                           snd_pcm_sw_params_t * params);
+static int (*SDL_NAME(snd_pcm_nonblock)) (snd_pcm_t * pcm, int nonblock);
 #define snd_pcm_hw_params_sizeof SDL_NAME(snd_pcm_hw_params_sizeof)
 #define snd_pcm_sw_params_sizeof SDL_NAME(snd_pcm_sw_params_sizeof)
 
@@ -149,81 +147,81 @@
     void **func;
 } alsa_functions[] = {
     {
-    "snd_pcm_open", (void **) (char *) &SDL_NAME (snd_pcm_open)}, {
-    "snd_pcm_close", (void **) (char *) &SDL_NAME (snd_pcm_close)}, {
-    "snd_pcm_writei", (void **) (char *) &SDL_NAME (snd_pcm_writei)}, {
-    "snd_pcm_resume", (void **) (char *) &SDL_NAME (snd_pcm_resume)}, {
-    "snd_pcm_prepare", (void **) (char *) &SDL_NAME (snd_pcm_prepare)}, {
-    "snd_pcm_drain", (void **) (char *) &SDL_NAME (snd_pcm_drain)}, {
-    "snd_strerror", (void **) (char *) &SDL_NAME (snd_strerror)}, {
+    "snd_pcm_open", (void **) (char *) &SDL_NAME(snd_pcm_open)}, {
+    "snd_pcm_close", (void **) (char *) &SDL_NAME(snd_pcm_close)}, {
+    "snd_pcm_writei", (void **) (char *) &SDL_NAME(snd_pcm_writei)}, {
+    "snd_pcm_resume", (void **) (char *) &SDL_NAME(snd_pcm_resume)}, {
+    "snd_pcm_prepare", (void **) (char *) &SDL_NAME(snd_pcm_prepare)}, {
+    "snd_pcm_drain", (void **) (char *) &SDL_NAME(snd_pcm_drain)}, {
+    "snd_strerror", (void **) (char *) &SDL_NAME(snd_strerror)}, {
     "snd_pcm_hw_params_sizeof",
-            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_sizeof)}, {
+            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_sizeof)}, {
     "snd_pcm_sw_params_sizeof",
-            (void **) (char *) &SDL_NAME (snd_pcm_sw_params_sizeof)}, {
+            (void **) (char *) &SDL_NAME(snd_pcm_sw_params_sizeof)}, {
     "snd_pcm_hw_params_any",
-            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_any)}, {
+            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_any)}, {
     "snd_pcm_hw_params_set_access",
-            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_set_access)}, {
+            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_set_access)}, {
     "snd_pcm_hw_params_set_format",
-            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_set_format)}, {
+            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_set_format)}, {
     "snd_pcm_hw_params_set_channels",
-            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_set_channels)}, {
+            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_set_channels)}, {
     "snd_pcm_hw_params_get_channels",
-            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_get_channels)}, {
+            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_get_channels)}, {
     "snd_pcm_hw_params_set_rate_near",
-            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_set_rate_near)}, {
+            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_set_rate_near)}, {
         "snd_pcm_hw_params_set_period_size_near", (void **) (char *)
-    &SDL_NAME (snd_pcm_hw_params_set_period_size_near)}, {
+    &SDL_NAME(snd_pcm_hw_params_set_period_size_near)}, {
     "snd_pcm_hw_params_get_period_size",
-            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_get_period_size)},
+            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_get_period_size)},
     {
         "snd_pcm_hw_params_set_periods_near", (void **) (char *)
-    &SDL_NAME (snd_pcm_hw_params_set_periods_near)}, {
+    &SDL_NAME(snd_pcm_hw_params_set_periods_near)}, {
     "snd_pcm_hw_params_get_periods",
-            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_get_periods)}, {
-    "snd_pcm_hw_params", (void **) (char *) &SDL_NAME (snd_pcm_hw_params)}, {
+            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_get_periods)}, {
+    "snd_pcm_hw_params", (void **) (char *) &SDL_NAME(snd_pcm_hw_params)}, {
     "snd_pcm_sw_params_current",
-            (void **) (char *) &SDL_NAME (snd_pcm_sw_params_current)}, {
+            (void **) (char *) &SDL_NAME(snd_pcm_sw_params_current)}, {
         "snd_pcm_sw_params_set_start_threshold", (void **) (char *)
-    &SDL_NAME (snd_pcm_sw_params_set_start_threshold)}, {
+    &SDL_NAME(snd_pcm_sw_params_set_start_threshold)}, {
     "snd_pcm_sw_params_set_avail_min",
-            (void **) (char *) &SDL_NAME (snd_pcm_sw_params_set_avail_min)}, {
-    "snd_pcm_sw_params", (void **) (char *) &SDL_NAME (snd_pcm_sw_params)}, {
-"snd_pcm_nonblock", (void **) (char *) &SDL_NAME (snd_pcm_nonblock)},};
+            (void **) (char *) &SDL_NAME(snd_pcm_sw_params_set_avail_min)}, {
+    "snd_pcm_sw_params", (void **) (char *) &SDL_NAME(snd_pcm_sw_params)}, {
+"snd_pcm_nonblock", (void **) (char *) &SDL_NAME(snd_pcm_nonblock)},};
 
 static void
-UnloadALSALibrary (void)
+UnloadALSALibrary(void)
 {
     if (alsa_loaded) {
 /*		SDL_UnloadObject(alsa_handle);*/
-        dlclose (alsa_handle);
+        dlclose(alsa_handle);
         alsa_handle = NULL;
         alsa_loaded = 0;
     }
 }
 
 static int
-LoadALSALibrary (void)
+LoadALSALibrary(void)
 {
     int i, retval = -1;
 
 /*	alsa_handle = SDL_LoadObject(alsa_library);*/
-    alsa_handle = dlopen (alsa_library, RTLD_NOW);
+    alsa_handle = dlopen(alsa_library, RTLD_NOW);
     if (alsa_handle) {
         alsa_loaded = 1;
         retval = 0;
-        for (i = 0; i < SDL_arraysize (alsa_functions); i++) {
+        for (i = 0; i < SDL_arraysize(alsa_functions); i++) {
 /*			*alsa_functions[i].func = SDL_LoadFunction(alsa_handle,alsa_functions[i].name);*/
 #if HAVE_DLVSYM
             *alsa_functions[i].func =
-                dlvsym (alsa_handle, alsa_functions[i].name, "ALSA_0.9");
+                dlvsym(alsa_handle, alsa_functions[i].name, "ALSA_0.9");
             if (!*alsa_functions[i].func)
 #endif
                 *alsa_functions[i].func =
-                    dlsym (alsa_handle, alsa_functions[i].name);
+                    dlsym(alsa_handle, alsa_functions[i].name);
             if (!*alsa_functions[i].func) {
                 retval = -1;
-                UnloadALSALibrary ();
+                UnloadALSALibrary();
                 break;
             }
         }
@@ -234,13 +232,13 @@
 #else
 
 static void
-UnloadALSALibrary (void)
+UnloadALSALibrary(void)
 {
     return;
 }
 
 static int
-LoadALSALibrary (void)
+LoadALSALibrary(void)
 {
     return 0;
 }
@@ -248,11 +246,11 @@
 #endif /* SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
 
 static const char *
-get_audio_device (int channels)
+get_audio_device(int channels)
 {
     const char *device;
 
-    device = SDL_getenv ("AUDIODEV");   /* Is there a standard variable name? */
+    device = SDL_getenv("AUDIODEV");    /* Is there a standard variable name? */
     if (device == NULL) {
         if (channels == 6)
             device = "surround51";
@@ -267,56 +265,56 @@
 /* Audio driver bootstrap functions */
 
 static int
-Audio_Available (void)
+Audio_Available(void)
 {
     int available;
     int status;
     snd_pcm_t *handle;
 
     available = 0;
-    if (LoadALSALibrary () < 0) {
+    if (LoadALSALibrary() < 0) {
         return available;
     }
     status =
-        SDL_NAME (snd_pcm_open) (&handle, get_audio_device (2),
-                                 SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
+        SDL_NAME(snd_pcm_open) (&handle, get_audio_device(2),
+                                SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
     if (status >= 0) {
         available = 1;
-        SDL_NAME (snd_pcm_close) (handle);
+        SDL_NAME(snd_pcm_close) (handle);
     }
-    UnloadALSALibrary ();
+    UnloadALSALibrary();
     return (available);
 }
 
 static void
-Audio_DeleteDevice (SDL_AudioDevice * device)
+Audio_DeleteDevice(SDL_AudioDevice * device)
 {
-    SDL_free (device->hidden);
-    SDL_free (device);
-    UnloadALSALibrary ();
+    SDL_free(device->hidden);
+    SDL_free(device);
+    UnloadALSALibrary();
 }
 
 static SDL_AudioDevice *
-Audio_CreateDevice (int devindex)
+Audio_CreateDevice(int devindex)
 {
     SDL_AudioDevice *this;
 
     /* Initialize all variables that we clean on shutdown */
-    LoadALSALibrary ();
-    this = (SDL_AudioDevice *) SDL_malloc (sizeof (SDL_AudioDevice));
+    LoadALSALibrary();
+    this = (SDL_AudioDevice *) SDL_malloc(sizeof(SDL_AudioDevice));
     if (this) {
-        SDL_memset (this, 0, (sizeof *this));
+        SDL_memset(this, 0, (sizeof *this));
         this->hidden = (struct SDL_PrivateAudioData *)
-            SDL_malloc ((sizeof *this->hidden));
+            SDL_malloc((sizeof *this->hidden));
     }
     if ((this == NULL) || (this->hidden == NULL)) {
-        SDL_OutOfMemory ();
+        SDL_OutOfMemory();
         if (this) {
-            SDL_free (this);
+            SDL_free(this);
         }
         return (0);
     }
-    SDL_memset (this->hidden, 0, (sizeof *this->hidden));
+    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
 
     /* Set the function pointers */
     this->OpenAudio = ALSA_OpenAudio;
@@ -337,7 +335,7 @@
 
 /* This function waits until it is possible to write a full sound buffer */
 static void
-ALSA_WaitAudio (_THIS)
+ALSA_WaitAudio(_THIS)
 {
     /* Check to see if the thread-parent process is still alive */
     {
@@ -346,7 +344,7 @@
            that use a different process id for each thread.
          */
         if (parent && (((++cnt) % 10) == 0)) {  /* Check every 10 loops */
-            if (kill (parent, 0) < 0) {
+            if (kill(parent, 0) < 0) {
                 this->enabled = 0;
             }
         }
@@ -354,7 +352,7 @@
 }
 
 static void
-ALSA_PlayAudio (_THIS)
+ALSA_PlayAudio(_THIS)
 {
     int status;
     int sample_len;
@@ -364,21 +362,21 @@
     sample_buf = (signed short *) mixbuf;
     while (sample_len > 0) {
         status =
-            SDL_NAME (snd_pcm_writei) (pcm_handle, sample_buf, sample_len);
+            SDL_NAME(snd_pcm_writei) (pcm_handle, sample_buf, sample_len);
         if (status < 0) {
             if (status == -EAGAIN) {
-                SDL_Delay (1);
+                SDL_Delay(1);
                 continue;
             }
             if (status == -ESTRPIPE) {
                 do {
-                    SDL_Delay (1);
-                    status = SDL_NAME (snd_pcm_resume) (pcm_handle);
+                    SDL_Delay(1);
+                    status = SDL_NAME(snd_pcm_resume) (pcm_handle);
                 }
                 while (status == -EAGAIN);
             }
             if (status < 0) {
-                status = SDL_NAME (snd_pcm_prepare) (pcm_handle);
+                status = SDL_NAME(snd_pcm_prepare) (pcm_handle);
             }
             if (status < 0) {
                 /* Hmm, not much we can do - abort */
@@ -393,27 +391,27 @@
 }
 
 static Uint8 *
-ALSA_GetAudioBuf (_THIS)
+ALSA_GetAudioBuf(_THIS)
 {
     return (mixbuf);
 }
 
 static void
-ALSA_CloseAudio (_THIS)
+ALSA_CloseAudio(_THIS)
 {
     if (mixbuf != NULL) {
-        SDL_FreeAudioMem (mixbuf);
+        SDL_FreeAudioMem(mixbuf);
         mixbuf = NULL;
     }
     if (pcm_handle) {
-        SDL_NAME (snd_pcm_drain) (pcm_handle);
-        SDL_NAME (snd_pcm_close) (pcm_handle);
+        SDL_NAME(snd_pcm_drain) (pcm_handle);
+        SDL_NAME(snd_pcm_close) (pcm_handle);
         pcm_handle = NULL;
     }
 }
 
 static int
-ALSA_OpenAudio (_THIS, SDL_AudioSpec * spec)
+ALSA_OpenAudio(_THIS, SDL_AudioSpec * spec)
 {
     int status;
     snd_pcm_hw_params_t *hwparams;
@@ -425,40 +423,40 @@
     /* Open the audio device */
     /* Name of device should depend on # channels in spec */
     status =
-        SDL_NAME (snd_pcm_open) (&pcm_handle,
-                                 get_audio_device (spec->channels),
-                                 SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
+        SDL_NAME(snd_pcm_open) (&pcm_handle,
+                                get_audio_device(spec->channels),
+                                SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
 
     if (status < 0) {
-        SDL_SetError ("Couldn't open audio device: %s",
-                      SDL_NAME (snd_strerror) (status));
+        SDL_SetError("Couldn't open audio device: %s",
+                     SDL_NAME(snd_strerror) (status));
         return (-1);
     }
 
     /* Figure out what the hardware is capable of */
-    snd_pcm_hw_params_alloca (&hwparams);
-    status = SDL_NAME (snd_pcm_hw_params_any) (pcm_handle, hwparams);
+    snd_pcm_hw_params_alloca(&hwparams);
+    status = SDL_NAME(snd_pcm_hw_params_any) (pcm_handle, hwparams);
     if (status < 0) {
-        SDL_SetError ("Couldn't get hardware config: %s",
-                      SDL_NAME (snd_strerror) (status));
-        ALSA_CloseAudio (this);
+        SDL_SetError("Couldn't get hardware config: %s",
+                     SDL_NAME(snd_strerror) (status));
+        ALSA_CloseAudio(this);
         return (-1);
     }
 
     /* SDL only uses interleaved sample output */
     status =
-        SDL_NAME (snd_pcm_hw_params_set_access) (pcm_handle, hwparams,
-                                                 SND_PCM_ACCESS_RW_INTERLEAVED);
+        SDL_NAME(snd_pcm_hw_params_set_access) (pcm_handle, hwparams,
+                                                SND_PCM_ACCESS_RW_INTERLEAVED);
     if (status < 0) {
-        SDL_SetError ("Couldn't set interleaved access: %s",
-                      SDL_NAME (snd_strerror) (status));
-        ALSA_CloseAudio (this);
+        SDL_SetError("Couldn't set interleaved access: %s",
+                     SDL_NAME(snd_strerror) (status));
+        ALSA_CloseAudio(this);
         return (-1);
     }
 
     /* Try for a closest match on audio format */
     status = -1;
-    for (test_format = SDL_FirstAudioFormat (spec->format);
+    for (test_format = SDL_FirstAudioFormat(spec->format);
          test_format && (status < 0);) {
         switch (test_format) {
         case AUDIO_U8:
@@ -485,29 +483,29 @@
         }
         if (format != 0) {
             status =
-                SDL_NAME (snd_pcm_hw_params_set_format) (pcm_handle,
-                                                         hwparams, format);
+                SDL_NAME(snd_pcm_hw_params_set_format) (pcm_handle,
+                                                        hwparams, format);
         }
         if (status < 0) {
-            test_format = SDL_NextAudioFormat ();
+            test_format = SDL_NextAudioFormat();
         }
     }
     if (status < 0) {
-        SDL_SetError ("Couldn't find any hardware audio formats");
-        ALSA_CloseAudio (this);
+        SDL_SetError("Couldn't find any hardware audio formats");
+        ALSA_CloseAudio(this);
         return (-1);
     }
     spec->format = test_format;
 
     /* Set the number of channels */
     status =
-        SDL_NAME (snd_pcm_hw_params_set_channels) (pcm_handle, hwparams,
-                                                   spec->channels);
+        SDL_NAME(snd_pcm_hw_params_set_channels) (pcm_handle, hwparams,
+                                                  spec->channels);
     if (status < 0) {
-        status = SDL_NAME (snd_pcm_hw_params_get_channels) (hwparams);
+        status = SDL_NAME(snd_pcm_hw_params_get_channels) (hwparams);
         if ((status <= 0) || (status > 2)) {
-            SDL_SetError ("Couldn't set audio channels");
-            ALSA_CloseAudio (this);
+            SDL_SetError("Couldn't set audio channels");
+            ALSA_CloseAudio(this);
             return (-1);
         }
         spec->channels = status;
@@ -515,12 +513,12 @@
 
     /* Set the audio rate */
     status =
-        SDL_NAME (snd_pcm_hw_params_set_rate_near) (pcm_handle, hwparams,
-                                                    spec->freq, NULL);
+        SDL_NAME(snd_pcm_hw_params_set_rate_near) (pcm_handle, hwparams,
+                                                   spec->freq, NULL);
     if (status < 0) {
-        SDL_SetError ("Couldn't set audio frequency: %s",
-                      SDL_NAME (snd_strerror) (status));
-        ALSA_CloseAudio (this);
+        SDL_SetError("Couldn't set audio frequency: %s",
+                     SDL_NAME(snd_strerror) (status));
+        ALSA_CloseAudio(this);
         return (-1);
     }
     spec->freq = status;
@@ -528,19 +526,19 @@
     /* Set the buffer size, in samples */
     frames = spec->samples;
     frames =
-        SDL_NAME (snd_pcm_hw_params_set_period_size_near) (pcm_handle,
-                                                           hwparams, frames,
-                                                           NULL);
+        SDL_NAME(snd_pcm_hw_params_set_period_size_near) (pcm_handle,
+                                                          hwparams, frames,
+                                                          NULL);
     spec->samples = frames;
-    SDL_NAME (snd_pcm_hw_params_set_periods_near) (pcm_handle, hwparams, 2,
-                                                   NULL);
+    SDL_NAME(snd_pcm_hw_params_set_periods_near) (pcm_handle, hwparams, 2,
+                                                  NULL);
 
     /* "set" the hardware with the desired parameters */
-    status = SDL_NAME (snd_pcm_hw_params) (pcm_handle, hwparams);
+    status = SDL_NAME(snd_pcm_hw_params) (pcm_handle, hwparams);
     if (status < 0) {
-        SDL_SetError ("Couldn't set hardware audio parameters: %s",
-                      SDL_NAME (snd_strerror) (status));
-        ALSA_CloseAudio (this);
+        SDL_SetError("Couldn't set hardware audio parameters: %s",
+                     SDL_NAME(snd_strerror) (status));
+        ALSA_CloseAudio(this);
         return (-1);
     }
 
@@ -555,57 +553,57 @@
 */
 
     /* Set the software parameters */
-    snd_pcm_sw_params_alloca (&swparams);
-    status = SDL_NAME (snd_pcm_sw_params_current) (pcm_handle, swparams);
+    snd_pcm_sw_params_alloca(&swparams);
+    status = SDL_NAME(snd_pcm_sw_params_current) (pcm_handle, swparams);
     if (status < 0) {
-        SDL_SetError ("Couldn't get software config: %s",
-                      SDL_NAME (snd_strerror) (status));
-        ALSA_CloseAudio (this);
+        SDL_SetError("Couldn't get software config: %s",
+                     SDL_NAME(snd_strerror) (status));
+        ALSA_CloseAudio(this);
         return (-1);
     }
     status =
-        SDL_NAME (snd_pcm_sw_params_set_start_threshold) (pcm_handle,
-                                                          swparams, 0);
+        SDL_NAME(snd_pcm_sw_params_set_start_threshold) (pcm_handle,
+                                                         swparams, 0);
     if (status < 0) {
-        SDL_SetError ("Couldn't set start threshold: %s",
-                      SDL_NAME (snd_strerror) (status));
-        ALSA_CloseAudio (this);
+        SDL_SetError("Couldn't set start threshold: %s",
+                     SDL_NAME(snd_strerror) (status));
+        ALSA_CloseAudio(this);
         return (-1);
     }
     status =
-        SDL_NAME (snd_pcm_sw_params_set_avail_min) (pcm_handle, swparams,
-                                                    frames);
+        SDL_NAME(snd_pcm_sw_params_set_avail_min) (pcm_handle, swparams,
+                                                   frames);
     if (status < 0) {
-        SDL_SetError ("Couldn't set avail min: %s",
-                      SDL_NAME (snd_strerror) (status));
-        ALSA_CloseAudio (this);
+        SDL_SetError("Couldn't set avail min: %s",
+                     SDL_NAME(snd_strerror) (status));
+        ALSA_CloseAudio(this);
         return (-1);
     }
-    status = SDL_NAME (snd_pcm_sw_params) (pcm_handle, swparams);
+    status = SDL_NAME(snd_pcm_sw_params) (pcm_handle, swparams);
     if (status < 0) {
-        SDL_SetError ("Couldn't set software audio parameters: %s",
-                      SDL_NAME (snd_strerror) (status));
-        ALSA_CloseAudio (this);
+        SDL_SetError("Couldn't set software audio parameters: %s",
+                     SDL_NAME(snd_strerror) (status));
+        ALSA_CloseAudio(this);
         return (-1);
     }
 
     /* Calculate the final parameters for this audio specification */
-    SDL_CalculateAudioSpec (spec);
+    SDL_CalculateAudioSpec(spec);
 
     /* Allocate mixing buffer */
     mixlen = spec->size;
-    mixbuf = (Uint8 *) SDL_AllocAudioMem (mixlen);
+    mixbuf = (Uint8 *) SDL_AllocAudioMem(mixlen);
     if (mixbuf == NULL) {
-        ALSA_CloseAudio (this);
+        ALSA_CloseAudio(this);
         return (-1);
     }
-    SDL_memset (mixbuf, spec->silence, spec->size);
+    SDL_memset(mixbuf, spec->silence, spec->size);
 
     /* Get the parent process id (we're the parent of the audio thread) */
-    parent = getpid ();
+    parent = getpid();
 
     /* Switch to blocking mode for playback */
-    SDL_NAME (snd_pcm_nonblock) (pcm_handle, 0);
+    SDL_NAME(snd_pcm_nonblock) (pcm_handle, 0);
 
     /* We're ready to rock and roll. :-) */
     return (0);
--- a/src/audio/amigaos/SDL_ahiaudio.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/amigaos/SDL_ahiaudio.c	Mon May 29 04:04:35 2006 +0000
@@ -28,11 +28,11 @@
 #include "SDL_ahiaudio.h"
 
 /* Audio driver functions */
-static int AHI_OpenAudio (_THIS, SDL_AudioSpec * spec);
-static void AHI_WaitAudio (_THIS);
-static void AHI_PlayAudio (_THIS);
-static Uint8 *AHI_GetAudioBuf (_THIS);
-static void AHI_CloseAudio (_THIS);
+static int AHI_OpenAudio(_THIS, SDL_AudioSpec * spec);
+static void AHI_WaitAudio(_THIS);
+static void AHI_PlayAudio(_THIS);
+static Uint8 *AHI_GetAudioBuf(_THIS);
+static void AHI_CloseAudio(_THIS);
 
 #ifndef __SASC
 #define mymalloc(x) AllocVec(x,MEMF_PUBLIC)
@@ -45,64 +45,64 @@
 /* Audio driver bootstrap functions */
 
 static int
-Audio_Available (void)
+Audio_Available(void)
 {
     int ok = 0;
     struct MsgPort *p;
     struct AHIRequest *req;
 
-    if (p = CreateMsgPort ()) {
+    if (p = CreateMsgPort()) {
         if (req =
-            (struct AHIRequest *) CreateIORequest (p,
-                                                   sizeof (struct
-                                                           AHIRequest))) {
+            (struct AHIRequest *) CreateIORequest(p,
+                                                  sizeof(struct
+                                                         AHIRequest))) {
             req->ahir_Version = 4;
 
-            if (!OpenDevice (AHINAME, 0, (struct IORequest *) req, NULL)) {
-                D (bug ("AHI available.\n"));
+            if (!OpenDevice(AHINAME, 0, (struct IORequest *) req, NULL)) {
+                D(bug("AHI available.\n"));
                 ok = 1;
-                CloseDevice ((struct IORequest *) req);
+                CloseDevice((struct IORequest *) req);
             }
-            DeleteIORequest ((struct IORequest *) req);
+            DeleteIORequest((struct IORequest *) req);
         }
-        DeleteMsgPort (p);
+        DeleteMsgPort(p);
     }
 
-    D (if (!ok) bug ("AHI not available\n"));
+    D(if (!ok) bug("AHI not available\n"));
     return ok;
 }
 
 static void
-Audio_DeleteDevice (SDL_AudioDevice * device)
+Audio_DeleteDevice(SDL_AudioDevice * device)
 {
-    SDL_free (device->hidden);
-    SDL_free (device);
+    SDL_free(device->hidden);
+    SDL_free(device);
 }
 
 static SDL_AudioDevice *
-Audio_CreateDevice (int devindex)
+Audio_CreateDevice(int devindex)
 {
     SDL_AudioDevice *this;
 
 #ifndef NO_AMIGADEBUG
-    D (bug ("AHI created...\n"));
+    D(bug("AHI created...\n"));
 #endif
 
     /* Initialize all variables that we clean on shutdown */
-    this = (SDL_AudioDevice *) SDL_malloc (sizeof (SDL_AudioDevice));
+    this = (SDL_AudioDevice *) SDL_malloc(sizeof(SDL_AudioDevice));
     if (this) {
-        SDL_memset (this, 0, (sizeof *this));
+        SDL_memset(this, 0, (sizeof *this));
         this->hidden = (struct SDL_PrivateAudioData *)
-            SDL_malloc ((sizeof *this->hidden));
+            SDL_malloc((sizeof *this->hidden));
     }
     if ((this == NULL) || (this->hidden == NULL)) {
-        SDL_OutOfMemory ();
+        SDL_OutOfMemory();
         if (this) {
-            SDL_free (this);
+            SDL_free(this);
         }
         return (0);
     }
-    SDL_memset (this->hidden, 0, (sizeof *this->hidden));
+    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
 
     /* Set the function pointers */
     this->OpenAudio = AHI_OpenAudio;
@@ -122,19 +122,19 @@
 
 
 void static
-AHI_WaitAudio (_THIS)
+AHI_WaitAudio(_THIS)
 {
-    if (!CheckIO ((struct IORequest *) audio_req[current_buffer])) {
-        WaitIO ((struct IORequest *) audio_req[current_buffer]);
+    if (!CheckIO((struct IORequest *) audio_req[current_buffer])) {
+        WaitIO((struct IORequest *) audio_req[current_buffer]);
 //              AbortIO((struct IORequest *)audio_req[current_buffer]);
     }
 }
 
 static void
-AHI_PlayAudio (_THIS)
+AHI_PlayAudio(_THIS)
 {
     if (playing > 1)
-        WaitIO ((struct IORequest *) audio_req[current_buffer]);
+        WaitIO((struct IORequest *) audio_req[current_buffer]);
 
     /* Write the audio data out */
     audio_req[current_buffer]->ahir_Std.io_Message.mn_Node.ln_Pri = 60;
@@ -149,92 +149,92 @@
     audio_req[current_buffer]->ahir_Link =
         (playing > 0 ? audio_req[current_buffer ^ 1] : NULL);
 
-    SendIO ((struct IORequest *) audio_req[current_buffer]);
+    SendIO((struct IORequest *) audio_req[current_buffer]);
     current_buffer ^= 1;
 
     playing++;
 }
 
 static Uint8 *
-AHI_GetAudioBuf (_THIS)
+AHI_GetAudioBuf(_THIS)
 {
     return (mixbuf[current_buffer]);
 }
 
 static void
-AHI_CloseAudio (_THIS)
+AHI_CloseAudio(_THIS)
 {
-    D (bug ("Closing audio...\n"));
+    D(bug("Closing audio...\n"));
 
     playing = 0;
 
     if (audio_req[0]) {
         if (audio_req[1]) {
-            D (bug ("Break req[1]...\n"));
+            D(bug("Break req[1]...\n"));
 
-            AbortIO ((struct IORequest *) audio_req[1]);
-            WaitIO ((struct IORequest *) audio_req[1]);
+            AbortIO((struct IORequest *) audio_req[1]);
+            WaitIO((struct IORequest *) audio_req[1]);
         }
 
-        D (bug ("Break req[0]...\n"));
+        D(bug("Break req[0]...\n"));
 
-        AbortIO ((struct IORequest *) audio_req[0]);
-        WaitIO ((struct IORequest *) audio_req[0]);
+        AbortIO((struct IORequest *) audio_req[0]);
+        WaitIO((struct IORequest *) audio_req[0]);
 
         if (audio_req[1]) {
-            D (bug ("Break AGAIN req[1]...\n"));
-            AbortIO ((struct IORequest *) audio_req[1]);
-            WaitIO ((struct IORequest *) audio_req[1]);
+            D(bug("Break AGAIN req[1]...\n"));
+            AbortIO((struct IORequest *) audio_req[1]);
+            WaitIO((struct IORequest *) audio_req[1]);
         }
 // Double abort to be sure to break the dbuffering process.
 
-        SDL_Delay (200);
+        SDL_Delay(200);
 
-        D (bug ("Reqs breaked, closing device...\n"));
-        CloseDevice ((struct IORequest *) audio_req[0]);
-        D (bug ("Device closed, freeing memory...\n"));
-        myfree (audio_req[1]);
-        D (bug ("Memory freed, deleting IOReq...\n"));
-        DeleteIORequest ((struct IORequest *) audio_req[0]);
+        D(bug("Reqs breaked, closing device...\n"));
+        CloseDevice((struct IORequest *) audio_req[0]);
+        D(bug("Device closed, freeing memory...\n"));
+        myfree(audio_req[1]);
+        D(bug("Memory freed, deleting IOReq...\n"));
+        DeleteIORequest((struct IORequest *) audio_req[0]);
         audio_req[0] = audio_req[1] = NULL;
     }
 
-    D (bug ("Freeing mixbuf[0]...\n"));
+    D(bug("Freeing mixbuf[0]...\n"));
     if (mixbuf[0] != NULL) {
-        myfree (mixbuf[0]);
+        myfree(mixbuf[0]);
 //              SDL_FreeAudioMem(mixbuf[0]);
         mixbuf[0] = NULL;
     }
 
-    D (bug ("Freeing mixbuf[1]...\n"));
+    D(bug("Freeing mixbuf[1]...\n"));
     if (mixbuf[1] != NULL) {
-        myfree (mixbuf[1]);
+        myfree(mixbuf[1]);
 //              SDL_FreeAudioMem(mixbuf[1]);
         mixbuf[1] = NULL;
     }
 
-    D (bug ("Freeing audio_port...\n"));
+    D(bug("Freeing audio_port...\n"));
 
     if (audio_port != NULL) {
-        DeleteMsgPort (audio_port);
+        DeleteMsgPort(audio_port);
         audio_port = NULL;
     }
-    D (bug ("...done!\n"));
+    D(bug("...done!\n"));
 }
 
 static int
-AHI_OpenAudio (_THIS, SDL_AudioSpec * spec)
+AHI_OpenAudio(_THIS, SDL_AudioSpec * spec)
 {
 //      int width;
 
-    D (bug ("AHI opening...\n"));
+    D(bug("AHI opening...\n"));
 
     /* Determine the audio parameters from the AudioSpec */
     switch (spec->format & 0xFF) {
 
     case 8:
         {                       /* Signed 8 bit audio data */
-            D (bug ("Samples a 8 bit...\n"));
+            D(bug("Samples a 8 bit...\n"));
             spec->format = AUDIO_S8;
             this->hidden->bytespersample = 1;
             if (spec->channels < 2)
@@ -246,7 +246,7 @@
 
     case 16:
         {                       /* Signed 16 bit audio data */
-            D (bug ("Samples a 16 bit...\n"));
+            D(bug("Samples a 16 bit...\n"));
             spec->format = AUDIO_S16MSB;
             this->hidden->bytespersample = 2;
             if (spec->channels < 2)
@@ -258,89 +258,88 @@
 
     default:
         {
-            SDL_SetError ("Unsupported audio format");
+            SDL_SetError("Unsupported audio format");
             return (-1);
         }
     }
 
     if (spec->channels != 1 && spec->channels != 2) {
-        D (bug ("Wrong channel number!\n"));
-        SDL_SetError ("Channel number non supported");
+        D(bug("Wrong channel number!\n"));
+        SDL_SetError("Channel number non supported");
         return -1;
     }
 
-    D (bug ("Before CalculateAudioSpec\n"));
+    D(bug("Before CalculateAudioSpec\n"));
     /* Update the fragment size as size in bytes */
-    SDL_CalculateAudioSpec (spec);
+    SDL_CalculateAudioSpec(spec);
 
-    D (bug ("Before CreateMsgPort\n"));
+    D(bug("Before CreateMsgPort\n"));
 
-    if (!(audio_port = CreateMsgPort ())) {
-        SDL_SetError ("Unable to create a MsgPort");
+    if (!(audio_port = CreateMsgPort())) {
+        SDL_SetError("Unable to create a MsgPort");
         return -1;
     }
 
-    D (bug ("Before CreateIORequest\n"));
+    D(bug("Before CreateIORequest\n"));
 
     if (!
         (audio_req[0] =
-         (struct AHIRequest *) CreateIORequest (audio_port,
-                                                sizeof (struct AHIRequest))))
-    {
-        SDL_SetError ("Unable to create an AHIRequest");
-        DeleteMsgPort (audio_port);
+         (struct AHIRequest *) CreateIORequest(audio_port,
+                                               sizeof(struct AHIRequest)))) {
+        SDL_SetError("Unable to create an AHIRequest");
+        DeleteMsgPort(audio_port);
         return -1;
     }
 
     audio_req[0]->ahir_Version = 4;
 
-    if (OpenDevice (AHINAME, 0, (struct IORequest *) audio_req[0], NULL)) {
-        SDL_SetError ("Unable to open AHI device!\n");
-        DeleteIORequest ((struct IORequest *) audio_req[0]);
-        DeleteMsgPort (audio_port);
+    if (OpenDevice(AHINAME, 0, (struct IORequest *) audio_req[0], NULL)) {
+        SDL_SetError("Unable to open AHI device!\n");
+        DeleteIORequest((struct IORequest *) audio_req[0]);
+        DeleteMsgPort(audio_port);
         return -1;
     }
 
-    D (bug ("AFTER opendevice\n"));
+    D(bug("AFTER opendevice\n"));
 
     /* Set output frequency and size */
     this->hidden->freq = spec->freq;
     this->hidden->size = spec->size;
 
-    D (bug ("Before buffer allocation\n"));
+    D(bug("Before buffer allocation\n"));
 
     /* Allocate mixing buffer */
-    mixbuf[0] = (Uint8 *) mymalloc (spec->size);
-    mixbuf[1] = (Uint8 *) mymalloc (spec->size);
+    mixbuf[0] = (Uint8 *) mymalloc(spec->size);
+    mixbuf[1] = (Uint8 *) mymalloc(spec->size);
 
-    D (bug ("Before audio_req allocation\n"));
+    D(bug("Before audio_req allocation\n"));
 
-    if (!(audio_req[1] = mymalloc (sizeof (struct AHIRequest)))) {
-        SDL_OutOfMemory ();
+    if (!(audio_req[1] = mymalloc(sizeof(struct AHIRequest)))) {
+        SDL_OutOfMemory();
         return (-1);
     }
 
-    D (bug ("Before audio_req memcpy\n"));
+    D(bug("Before audio_req memcpy\n"));
 
-    SDL_memcpy (audio_req[1], audio_req[0], sizeof (struct AHIRequest));
+    SDL_memcpy(audio_req[1], audio_req[0], sizeof(struct AHIRequest));
 
     if (mixbuf[0] == NULL || mixbuf[1] == NULL) {
-        SDL_OutOfMemory ();
+        SDL_OutOfMemory();
         return (-1);
     }
 
-    D (bug ("Before mixbuf memset\n"));
+    D(bug("Before mixbuf memset\n"));
 
-    SDL_memset (mixbuf[0], spec->silence, spec->size);
-    SDL_memset (mixbuf[1], spec->silence, spec->size);
+    SDL_memset(mixbuf[0], spec->silence, spec->size);
+    SDL_memset(mixbuf[1], spec->silence, spec->size);
 
     current_buffer = 0;
     playing = 0;
 
-    D (bug
-       ("AHI opened: freq:%ld mixbuf:%lx/%lx buflen:%ld bits:%ld channels:%ld\n",
-        spec->freq, mixbuf[0], mixbuf[1], spec->size,
-        this->hidden->bytespersample * 8, spec->channels));
+    D(bug
+      ("AHI opened: freq:%ld mixbuf:%lx/%lx buflen:%ld bits:%ld channels:%ld\n",
+       spec->freq, mixbuf[0], mixbuf[1], spec->size,
+       this->hidden->bytespersample * 8, spec->channels));
 
     /* We're ready to rock and roll. :-) */
     return (0);
--- a/src/audio/arts/SDL_artsaudio.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/audio/arts/SDL_artsaudio.c	Mon May 29 04:04:35 2006 +0000
@@ -41,11 +41,11 @@
 #define ARTS_DRIVER_NAME         "arts"
 
 /* Audio driver functions */
-static int ARTS_OpenAudio (_THIS, SDL_AudioSpec * spec);
-static void ARTS_WaitAudio (_THIS);
-static void ARTS_PlayAudio (_THIS);
-static Uint8 *ARTS_GetAudioBuf (_THIS);
-static void ARTS_CloseAudio (_THIS);
+static int ARTS_OpenAudio(_THIS, SDL_AudioSpec * spec);
+static void ARTS_WaitAudio(_THIS);
+static void ARTS_PlayAudio(_THIS);
+static Uint8 *ARTS_GetAudioBuf(_THIS);
+static void ARTS_CloseAudio(_THIS);
 
 #ifdef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
 
@@ -53,18 +53,18 @@
 static void *arts_handle = NULL;
 static int arts_loaded = 0;
 
-static int (*SDL_NAME (arts_init)) (void);
-static void (*SDL_NAME (arts_free)) (void);
-static arts_stream_t (*SDL_NAME (arts_play_stream)) (int rate, int bits,
-                                                     int channels,
-                                                     const char *name);
-static int (*SDL_NAME (arts_stream_set)) (arts_stream_t s,
-                                          arts_parameter_t param, int value);
-static int (*SDL_NAME (arts_stream_get)) (arts_stream_t s,
-                                          arts_parameter_t param);
-static int (*SDL_NAME (arts_write)) (arts_stream_t s, const void *buffer,
-                                     int count);
-static void (*SDL_NAME (arts_close_stream)) (arts_stream_t s);
+static int (*SDL_NAME(arts_init)) (void);
+static void (*SDL_NAME(arts_free)) (void);
+static arts_stream_t(*SDL_NAME(arts_play_stream)) (int rate, int bits,
+                                                   int channels,
+                                                   const char *name);
+static int (*SDL_NAME(arts_stream_set)) (arts_stream_t s,
+                                         arts_parameter_t param, int value);
+static int (*SDL_NAME(arts_stream_get)) (arts_stream_t s,
+                                         arts_parameter_t param);
+static int (*SDL_NAME(arts_write)) (arts_stream_t s, const void *buffer,
+                                    int count);
+static void (*SDL_NAME(arts_close_stream)) (arts_stream_t s);
 
 static struct
 {
@@ -72,39 +72,39 @@
     void **func;
 } arts_functions[] = {
     {
-    "arts_init", (void **) &SDL_NAME (arts_init)}, {
-    "arts_free", (void **) &SDL_NAME (arts_free)}, {
-    "arts_play_stream", (void **) &SDL_NAME (arts_play_stream)}, {
-    "arts_stream_set", (void **) &SDL_NAME (arts_stream_set)}, {
-    "arts_stream_get", (void **) &SDL_NAME (arts_stream_get)}, {
-    "arts_write", (void **) &SDL_NAME (arts_write)}, {
-"arts_close_stream", (void **) &SDL_NAME (arts_close_stream)},};
+    "arts_init", (void **) &SDL_NAME(arts_init)}, {
+    "arts_free", (void **) &SDL_NAME(arts_free)}, {
+    "arts_play_stream", (void **) &SDL_NAME(arts_play_stream)}, {
+    "arts_stream_set", (void **) &SDL_NAME(arts_stream_set)}, {
+    "arts_stream_get", (void **) &SDL_NAME(arts_stream_get)}, {
+    "arts_write", (void **) &SDL_NAME(arts_write)}, {
+"arts_close_stream", (void **) &SDL_NAME(arts_close_stream)},};
 
 static void
-UnloadARTSLibrary ()
+UnloadARTSLibrary()
 {
     if (arts_loaded) {
-        SDL_UnloadObject (arts_handle);
+        SDL_UnloadObject(arts_handle);
         arts_handle = NULL;
         arts_loaded = 0;
     }
 }
 
 static int
-LoadARTSLibrary (void)
+LoadARTSLibrary(void)
 {
     int i, retval = -1;
 
-    arts_handle = SDL_LoadObject (arts_library);
+    arts_handle = SDL_LoadObject(arts_library);
     if (arts_handle) {
         arts_loaded = 1;
         retval = 0;
-        for (i = 0; i < SDL_arraysize (arts_functions); ++i) {
+        for (i = 0; i < SDL_arraysize(arts_functions); ++i) {
             *arts_functions[i].func =
-                SDL_LoadFunction (arts_handle, arts_functions[i].name);
+                SDL_LoadFunction(arts_handle, arts_functions[i].name);
             if (!*arts_functions[i].func) {
                 retval = -1;
-                UnloadARTSLibrary ();
+                UnloadARTSLibrary();
                 break;
             }
         }
@@ -115,13 +115,13 @@
 #else
 
 static void
-UnloadARTSLibrary ()
+UnloadARTSLibrary()
 {
     return;
 }
 
 static int
-LoadARTSLibrary (void)
+LoadARTSLibrary(void)
 {
     return 0;
 }
@@ -131,58 +131,58 @@
 /* Audio driver bootstrap functions */
 
 static int
-Audio_Available (void)
+Audio_Available(void)
 {
     int available = 0;
 
-    if (LoadARTSLibrary () < 0) {
+    if (LoadARTSLibrary() < 0) {
         return available;
     }
-    if (SDL_NAME (arts_init) () == 0) {
+    if (SDL_NAME(arts_init) () == 0) {
 #define ARTS_CRASH_HACK         /* Play a stream so aRts doesn't crash */
 #ifdef ARTS_CRASH_HACK
         arts_stream_t stream2;
-        stream2 = SDL_NAME (arts_play_stream) (44100, 16, 2, "SDL");
-        SDL_NAME (arts_write) (stream2, "", 0);
-        SDL_NAME (arts_close_stream) (stream2);
+        stream2 = SDL_NAME(arts_play_stream) (44100, 16, 2, "SDL");
+        SDL_NAME(arts_write) (stream2, "", 0);
+        SDL_NAME(arts_close_stream) (stream2);
 #endif
         available = 1;
-        SDL_NAME (arts_free) ();
+        SDL_NAME(arts_free) ();
     }
-    UnloadARTSLibrary ();
+    UnloadARTSLibrary();
 
     return available;
 }
 
 static void
-Audio_DeleteDevice (SDL_AudioDevice * device)
+Audio_DeleteDevice(SDL_AudioDevice * device)
 {
-    SDL_free (device->hidden);
-    SDL_free (device);
-    UnloadARTSLibrary ();
+    SDL_free(device->hidden);
+    SDL_free(device);
+    UnloadARTSLibrary();
 }
 
 static SDL_AudioDevice *
-Audio_CreateDevice (int devindex)
+Audio_CreateDevice(int devindex)
 {
     SDL_AudioDevice *this;
 
     /* Initialize all variables that we clean on shutdown */
-    LoadARTSLibrary ();
-    this = (SDL_AudioDevice *) SDL_malloc (sizeof (SDL_AudioDevice));
+    LoadARTSLibrary();
+    this = (SDL_AudioDevice *) SDL_malloc(sizeof(SDL_AudioDevice));
     if (this) {
-        SDL_memset (this, 0, (sizeof *this));
+        SDL_memset(this, 0, (sizeof *this));
         this->hidden = (struct SDL_PrivateAudioData *)
-            SDL_malloc ((sizeof *this->hidden));
+            SDL_malloc((sizeof *this->hidden));
     }
     if ((this == NULL) || (this->hidden == NULL)) {
-        SDL_OutOfMemory ();
+        SDL_OutOfMemory();
         if (this) {
-            SDL_free (this);
+            SDL_free(this);
         }
         return (0);
     }
-    SDL_memset (this->hidden, 0, (sizeof *this->hidden));