more tweaking indent options SDL-1.3
authorSam Lantinga <slouken@libsdl.org>
Mon, 29 May 2006 04:04:35 +0000
branchSDL-1.3
changeset 16684da1ee79c9af
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
     1.1 --- a/include/SDL.h	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/include/SDL.h	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -118,24 +118,24 @@
     1.4   * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
     1.5   * signal handlers for some commonly ignored fatal signals (like SIGSEGV)
     1.6   */
     1.7 -extern DECLSPEC int SDLCALL SDL_Init (Uint32 flags);
     1.8 +extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
     1.9  
    1.10  /* This function initializes specific SDL subsystems */
    1.11 -extern DECLSPEC int SDLCALL SDL_InitSubSystem (Uint32 flags);
    1.12 +extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
    1.13  
    1.14  /* This function cleans up specific SDL subsystems */
    1.15 -extern DECLSPEC void SDLCALL SDL_QuitSubSystem (Uint32 flags);
    1.16 +extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
    1.17  
    1.18  /* This function returns mask of the specified subsystems which have
    1.19     been initialized.
    1.20     If 'flags' is 0, it returns a mask of all initialized subsystems.
    1.21  */
    1.22 -extern DECLSPEC Uint32 SDLCALL SDL_WasInit (Uint32 flags);
    1.23 +extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
    1.24  
    1.25  /* This function cleans up all initialized subsystems and unloads the
    1.26   * dynamically linked library.  You should call it upon all exit conditions.
    1.27   */
    1.28 -extern DECLSPEC void SDLCALL SDL_Quit (void);
    1.29 +extern DECLSPEC void SDLCALL SDL_Quit(void);
    1.30  
    1.31  /* Ends C function definitions when using C++ */
    1.32  #ifdef __cplusplus
     2.1 --- a/include/SDL_audio.h	Mon May 29 03:53:21 2006 +0000
     2.2 +++ b/include/SDL_audio.h	Mon May 29 04:04:35 2006 +0000
     2.3 @@ -106,20 +106,20 @@
     2.4  /* These functions return the list of built in video drivers, in the 
     2.5   * order that they are normally initialized by default.
     2.6   */
     2.7 -extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers (void);
     2.8 -extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver (int index);
     2.9 +extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);
    2.10 +extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);
    2.11  
    2.12  /* These functions are used internally, and should not be used unless you
    2.13   * have a specific need to specify the audio driver you want to use.
    2.14   * You should normally use SDL_Init() or SDL_InitSubSystem().
    2.15   */
    2.16 -extern DECLSPEC int SDLCALL SDL_AudioInit (const char *driver_name);
    2.17 -extern DECLSPEC void SDLCALL SDL_AudioQuit (void);
    2.18 +extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);
    2.19 +extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
    2.20  
    2.21  /* This function returns the name of the current audio driver, or NULL
    2.22   * if no driver has been initialized.
    2.23   */
    2.24 -extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver (void);
    2.25 +extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
    2.26  
    2.27  /*
    2.28   * This function opens the audio device with the desired parameters, and
    2.29 @@ -162,8 +162,8 @@
    2.30   * may modify the requested size of the audio buffer, you should allocate
    2.31   * any local mixing buffers after you open the audio device.
    2.32   */
    2.33 -extern DECLSPEC int SDLCALL SDL_OpenAudio (SDL_AudioSpec * desired,
    2.34 -                                           SDL_AudioSpec * obtained);
    2.35 +extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
    2.36 +                                          SDL_AudioSpec * obtained);
    2.37  
    2.38  /*
    2.39   * Get the current audio state:
    2.40 @@ -174,7 +174,7 @@
    2.41      SDL_AUDIO_PLAYING,
    2.42      SDL_AUDIO_PAUSED
    2.43  } SDL_audiostatus;
    2.44 -extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioStatus (void);
    2.45 +extern DECLSPEC SDL_audiostatus SDLCALL SDL_GetAudioStatus(void);
    2.46  
    2.47  /*
    2.48   * This function pauses and unpauses the audio callback processing.
    2.49 @@ -183,7 +183,7 @@
    2.50   * data for your callback function after opening the audio device.
    2.51   * Silence will be written to the audio device during the pause.
    2.52   */
    2.53 -extern DECLSPEC void SDLCALL SDL_PauseAudio (int pause_on);
    2.54 +extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);
    2.55  
    2.56  /*
    2.57   * This function loads a WAVE from the data source, automatically freeing
    2.58 @@ -202,11 +202,11 @@
    2.59   * wave file cannot be opened, uses an unknown data format, or is 
    2.60   * corrupt.  Currently raw and MS-ADPCM WAVE files are supported.
    2.61   */
    2.62 -extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW (SDL_RWops * src,
    2.63 -                                                       int freesrc,
    2.64 -                                                       SDL_AudioSpec * spec,
    2.65 -                                                       Uint8 ** audio_buf,
    2.66 -                                                       Uint32 * audio_len);
    2.67 +extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
    2.68 +                                                      int freesrc,
    2.69 +                                                      SDL_AudioSpec * spec,
    2.70 +                                                      Uint8 ** audio_buf,
    2.71 +                                                      Uint32 * audio_len);
    2.72  
    2.73  /* Compatibility convenience function -- loads a WAV from a file */
    2.74  #define SDL_LoadWAV(file, spec, audio_buf, audio_len) \
    2.75 @@ -215,7 +215,7 @@
    2.76  /*
    2.77   * This function frees data previously allocated with SDL_LoadWAV_RW()
    2.78   */
    2.79 -extern DECLSPEC void SDLCALL SDL_FreeWAV (Uint8 * audio_buf);
    2.80 +extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);
    2.81  
    2.82  /*
    2.83   * This function takes a source format and rate and a destination format
    2.84 @@ -224,13 +224,13 @@
    2.85   * to the other.
    2.86   * This function returns 0, or -1 if there was an error.
    2.87   */
    2.88 -extern DECLSPEC int SDLCALL SDL_BuildAudioCVT (SDL_AudioCVT * cvt,
    2.89 -                                               Uint16 src_format,
    2.90 -                                               Uint8 src_channels,
    2.91 -                                               int src_rate,
    2.92 -                                               Uint16 dst_format,
    2.93 -                                               Uint8 dst_channels,
    2.94 -                                               int dst_rate);
    2.95 +extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
    2.96 +                                              Uint16 src_format,
    2.97 +                                              Uint8 src_channels,
    2.98 +                                              int src_rate,
    2.99 +                                              Uint16 dst_format,
   2.100 +                                              Uint8 dst_channels,
   2.101 +                                              int dst_rate);
   2.102  
   2.103  /* Once you have initialized the 'cvt' structure using SDL_BuildAudioCVT(),
   2.104   * created an audio buffer cvt->buf, and filled it with cvt->len bytes of
   2.105 @@ -240,7 +240,7 @@
   2.106   * cvt->buf should be allocated after the cvt structure is initialized by
   2.107   * SDL_BuildAudioCVT(), and should be cvt->len*cvt->len_mult bytes long.
   2.108   */
   2.109 -extern DECLSPEC int SDLCALL SDL_ConvertAudio (SDL_AudioCVT * cvt);
   2.110 +extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);
   2.111  
   2.112  /*
   2.113   * This takes two audio buffers of the playing audio format and mixes
   2.114 @@ -250,8 +250,8 @@
   2.115   * This is provided for convenience -- you can mix your own audio data.
   2.116   */
   2.117  #define SDL_MIX_MAXVOLUME 128
   2.118 -extern DECLSPEC void SDLCALL SDL_MixAudio (Uint8 * dst, const Uint8 * src,
   2.119 -                                           Uint32 len, int volume);
   2.120 +extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,
   2.121 +                                          Uint32 len, int volume);
   2.122  
   2.123  /*
   2.124   * The lock manipulated by these functions protects the callback function.
   2.125 @@ -259,13 +259,13 @@
   2.126   * callback function is not running.  Do not call these from the callback
   2.127   * function or you will cause deadlock.
   2.128   */
   2.129 -extern DECLSPEC void SDLCALL SDL_LockAudio (void);
   2.130 -extern DECLSPEC void SDLCALL SDL_UnlockAudio (void);
   2.131 +extern DECLSPEC void SDLCALL SDL_LockAudio(void);
   2.132 +extern DECLSPEC void SDLCALL SDL_UnlockAudio(void);
   2.133  
   2.134  /*
   2.135   * This function shuts down audio processing and closes the audio device.
   2.136   */
   2.137 -extern DECLSPEC void SDLCALL SDL_CloseAudio (void);
   2.138 +extern DECLSPEC void SDLCALL SDL_CloseAudio(void);
   2.139  
   2.140  
   2.141  /* Ends C function definitions when using C++ */
     3.1 --- a/include/SDL_cdrom.h	Mon May 29 03:53:21 2006 +0000
     3.2 +++ b/include/SDL_cdrom.h	Mon May 29 04:04:35 2006 +0000
     3.3 @@ -104,7 +104,7 @@
     3.4  /* Returns the number of CD-ROM drives on the system, or -1 if
     3.5     SDL_Init() has not been called with the SDL_INIT_CDROM flag.
     3.6   */
     3.7 -extern DECLSPEC int SDLCALL SDL_CDNumDrives (void);
     3.8 +extern DECLSPEC int SDLCALL SDL_CDNumDrives(void);
     3.9  
    3.10  /* Returns a human-readable, system-dependent identifier for the CD-ROM.
    3.11     Example:
    3.12 @@ -112,7 +112,7 @@
    3.13  	"E:"
    3.14  	"/dev/disk/ide/1/master"
    3.15  */
    3.16 -extern DECLSPEC const char *SDLCALL SDL_CDName (int drive);
    3.17 +extern DECLSPEC const char *SDLCALL SDL_CDName(int drive);
    3.18  
    3.19  /* Opens a CD-ROM drive for access.  It returns a drive handle on success,
    3.20     or NULL if the drive was invalid or busy.  This newly opened CD-ROM
    3.21 @@ -120,13 +120,13 @@
    3.22     CD-ROM handle.
    3.23     Drives are numbered starting with 0.  Drive 0 is the system default CD-ROM.
    3.24  */
    3.25 -extern DECLSPEC SDL_CD *SDLCALL SDL_CDOpen (int drive);
    3.26 +extern DECLSPEC SDL_CD *SDLCALL SDL_CDOpen(int drive);
    3.27  
    3.28  /* This function returns the current status of the given drive.
    3.29     If the drive has a CD in it, the table of contents of the CD and current
    3.30     play position of the CD will be stored in the SDL_CD structure.
    3.31  */
    3.32 -extern DECLSPEC CDstatus SDLCALL SDL_CDStatus (SDL_CD * cdrom);
    3.33 +extern DECLSPEC CDstatus SDLCALL SDL_CDStatus(SDL_CD * cdrom);
    3.34  
    3.35  /* Play the given CD starting at 'start_track' and 'start_frame' for 'ntracks'
    3.36     tracks and 'nframes' frames.  If both 'ntrack' and 'nframe' are 0, play 
    3.37 @@ -147,31 +147,30 @@
    3.38  
    3.39     This function returns 0, or -1 if there was an error.
    3.40  */
    3.41 -extern DECLSPEC int SDLCALL SDL_CDPlayTracks (SDL_CD * cdrom,
    3.42 -                                              int start_track,
    3.43 -                                              int start_frame, int ntracks,
    3.44 -                                              int nframes);
    3.45 +extern DECLSPEC int SDLCALL SDL_CDPlayTracks(SDL_CD * cdrom,
    3.46 +                                             int start_track,
    3.47 +                                             int start_frame, int ntracks,
    3.48 +                                             int nframes);
    3.49  
    3.50  /* Play the given CD starting at 'start' frame for 'length' frames.
    3.51     It returns 0, or -1 if there was an error.
    3.52  */
    3.53 -extern DECLSPEC int SDLCALL SDL_CDPlay (SDL_CD * cdrom, int start,
    3.54 -                                        int length);
    3.55 +extern DECLSPEC int SDLCALL SDL_CDPlay(SDL_CD * cdrom, int start, int length);
    3.56  
    3.57  /* Pause play -- returns 0, or -1 on error */
    3.58 -extern DECLSPEC int SDLCALL SDL_CDPause (SDL_CD * cdrom);
    3.59 +extern DECLSPEC int SDLCALL SDL_CDPause(SDL_CD * cdrom);
    3.60  
    3.61  /* Resume play -- returns 0, or -1 on error */
    3.62 -extern DECLSPEC int SDLCALL SDL_CDResume (SDL_CD * cdrom);
    3.63 +extern DECLSPEC int SDLCALL SDL_CDResume(SDL_CD * cdrom);
    3.64  
    3.65  /* Stop play -- returns 0, or -1 on error */
    3.66 -extern DECLSPEC int SDLCALL SDL_CDStop (SDL_CD * cdrom);
    3.67 +extern DECLSPEC int SDLCALL SDL_CDStop(SDL_CD * cdrom);
    3.68  
    3.69  /* Eject CD-ROM -- returns 0, or -1 on error */
    3.70 -extern DECLSPEC int SDLCALL SDL_CDEject (SDL_CD * cdrom);
    3.71 +extern DECLSPEC int SDLCALL SDL_CDEject(SDL_CD * cdrom);
    3.72  
    3.73  /* Closes the handle for the CD-ROM drive */
    3.74 -extern DECLSPEC void SDLCALL SDL_CDClose (SDL_CD * cdrom);
    3.75 +extern DECLSPEC void SDLCALL SDL_CDClose(SDL_CD * cdrom);
    3.76  
    3.77  
    3.78  /* Ends C function definitions when using C++ */
     4.1 --- a/include/SDL_compat.h	Mon May 29 03:53:21 2006 +0000
     4.2 +++ b/include/SDL_compat.h	Mon May 29 04:04:35 2006 +0000
     4.3 @@ -66,29 +66,28 @@
     4.4      SDL_GRAB_ON = 1
     4.5  } SDL_GrabMode;
     4.6  
     4.7 -extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version (void);
     4.8 -extern DECLSPEC char *SDLCALL SDL_AudioDriverName (char *namebuf, int maxlen);
     4.9 -extern DECLSPEC char *SDLCALL SDL_VideoDriverName (char *namebuf, int maxlen);
    4.10 -extern DECLSPEC int SDLCALL SDL_VideoModeOK (int width, int height, int bpp,
    4.11 -                                             Uint32 flags);
    4.12 -extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes (SDL_PixelFormat * format,
    4.13 -                                                  Uint32 flags);
    4.14 -extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode (int width, int height,
    4.15 -                                                       int bpp, Uint32 flags);
    4.16 -extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface (void);
    4.17 -extern DECLSPEC void SDLCALL SDL_WM_SetCaption (const char *title,
    4.18 -                                                const char *icon);
    4.19 -extern DECLSPEC void SDLCALL SDL_WM_GetCaption (char **title, char **icon);
    4.20 -extern DECLSPEC void SDLCALL SDL_WM_SetIcon (SDL_Surface * icon,
    4.21 -                                             Uint8 * mask);
    4.22 -extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow (void);
    4.23 -extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen (SDL_Surface * surface);
    4.24 -extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput (SDL_GrabMode mode);
    4.25 -extern DECLSPEC Uint8 SDLCALL SDL_GetAppState (void);
    4.26 -extern DECLSPEC int SDLCALL SDL_SetPalette (SDL_Surface * surface, int flags,
    4.27 -                                            SDL_Color * colors,
    4.28 -                                            int firstcolor, int ncolors);
    4.29 -extern DECLSPEC int SDLCALL SDL_GetWMInfo (SDL_SysWMinfo * info);
    4.30 +extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void);
    4.31 +extern DECLSPEC char *SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
    4.32 +extern DECLSPEC char *SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
    4.33 +extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width, int height, int bpp,
    4.34 +                                            Uint32 flags);
    4.35 +extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes(SDL_PixelFormat * format,
    4.36 +                                                 Uint32 flags);
    4.37 +extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode(int width, int height,
    4.38 +                                                      int bpp, Uint32 flags);
    4.39 +extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface(void);
    4.40 +extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title,
    4.41 +                                               const char *icon);
    4.42 +extern DECLSPEC void SDLCALL SDL_WM_GetCaption(char **title, char **icon);
    4.43 +extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask);
    4.44 +extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
    4.45 +extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface * surface);
    4.46 +extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
    4.47 +extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
    4.48 +extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface, int flags,
    4.49 +                                           SDL_Color * colors,
    4.50 +                                           int firstcolor, int ncolors);
    4.51 +extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo * info);
    4.52  
    4.53  /* Ends C function definitions when using C++ */
    4.54  #ifdef __cplusplus
     5.1 --- a/include/SDL_cpuinfo.h	Mon May 29 03:53:21 2006 +0000
     5.2 +++ b/include/SDL_cpuinfo.h	Mon May 29 04:04:35 2006 +0000
     5.3 @@ -41,35 +41,35 @@
     5.4  
     5.5  /* This function returns true if the CPU has the RDTSC instruction
     5.6   */
     5.7 -extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC (void);
     5.8 +extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
     5.9  
    5.10  /* This function returns true if the CPU has MMX features
    5.11   */
    5.12 -extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX (void);
    5.13 +extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
    5.14  
    5.15  /* This function returns true if the CPU has MMX Ext. features
    5.16   */
    5.17 -extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt (void);
    5.18 +extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
    5.19  
    5.20  /* This function returns true if the CPU has 3DNow features
    5.21   */
    5.22 -extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow (void);
    5.23 +extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
    5.24  
    5.25  /* This function returns true if the CPU has 3DNow! Ext. features
    5.26   */
    5.27 -extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt (void);
    5.28 +extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
    5.29  
    5.30  /* This function returns true if the CPU has SSE features
    5.31   */
    5.32 -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE (void);
    5.33 +extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
    5.34  
    5.35  /* This function returns true if the CPU has SSE2 features
    5.36   */
    5.37 -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2 (void);
    5.38 +extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
    5.39  
    5.40  /* This function returns true if the CPU has AltiVec features
    5.41   */
    5.42 -extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec (void);
    5.43 +extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
    5.44  
    5.45  /* Ends C function definitions when using C++ */
    5.46  #ifdef __cplusplus
     6.1 --- a/include/SDL_endian.h	Mon May 29 03:53:21 2006 +0000
     6.2 +++ b/include/SDL_endian.h	Mon May 29 04:04:35 2006 +0000
     6.3 @@ -64,37 +64,37 @@
     6.4  #if defined(__GNUC__) && defined(__i386__) && \
     6.5     !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
     6.6  static __inline__ Uint16
     6.7 -SDL_Swap16 (Uint16 x)
     6.8 +SDL_Swap16(Uint16 x)
     6.9  {
    6.10 -  __asm__ ("xchgb %b0,%h0": "=q" (x):"0" (x));
    6.11 +  __asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
    6.12      return x;
    6.13  }
    6.14  #elif defined(__GNUC__) && defined(__x86_64__)
    6.15  static __inline__ Uint16
    6.16 -SDL_Swap16 (Uint16 x)
    6.17 +SDL_Swap16(Uint16 x)
    6.18  {
    6.19 -  __asm__ ("xchgb %b0,%h0": "=Q" (x):"0" (x));
    6.20 +  __asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
    6.21      return x;
    6.22  }
    6.23  #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
    6.24  static __inline__ Uint16
    6.25 -SDL_Swap16 (Uint16 x)
    6.26 +SDL_Swap16(Uint16 x)
    6.27  {
    6.28      Uint16 result;
    6.29  
    6.30 -  __asm__ ("rlwimi %0,%2,8,16,23": "=&r" (result):"0" (x >> 8), "r" (x));
    6.31 +  __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
    6.32      return result;
    6.33  }
    6.34  #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
    6.35  static __inline__ Uint16
    6.36 -SDL_Swap16 (Uint16 x)
    6.37 +SDL_Swap16(Uint16 x)
    6.38  {
    6.39 -  __asm__ ("rorw #8,%0": "=d" (x): "0" (x):"cc");
    6.40 +  __asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
    6.41      return x;
    6.42  }
    6.43  #else
    6.44  static __inline__ Uint16
    6.45 -SDL_Swap16 (Uint16 x)
    6.46 +SDL_Swap16(Uint16 x)
    6.47  {
    6.48      return ((x << 8) | (x >> 8));
    6.49  }
    6.50 @@ -102,40 +102,39 @@
    6.51  
    6.52  #if defined(__GNUC__) && defined(__i386__)
    6.53  static __inline__ Uint32
    6.54 -SDL_Swap32 (Uint32 x)
    6.55 +SDL_Swap32(Uint32 x)
    6.56  {
    6.57 -  __asm__ ("bswap %0": "=r" (x):"0" (x));
    6.58 +  __asm__("bswap %0": "=r"(x):"0"(x));
    6.59      return x;
    6.60  }
    6.61  #elif defined(__GNUC__) && defined(__x86_64__)
    6.62  static __inline__ Uint32
    6.63 -SDL_Swap32 (Uint32 x)
    6.64 +SDL_Swap32(Uint32 x)
    6.65  {
    6.66 -  __asm__ ("bswapl %0": "=r" (x):"0" (x));
    6.67 +  __asm__("bswapl %0": "=r"(x):"0"(x));
    6.68      return x;
    6.69  }
    6.70  #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
    6.71  static __inline__ Uint32
    6.72 -SDL_Swap32 (Uint32 x)
    6.73 +SDL_Swap32(Uint32 x)
    6.74  {
    6.75      Uint32 result;
    6.76  
    6.77 -  __asm__ ("rlwimi %0,%2,24,16,23": "=&r" (result):"0" (x >> 24),
    6.78 -             "r" (x));
    6.79 -  __asm__ ("rlwimi %0,%2,8,8,15": "=&r" (result):"0" (result), "r" (x));
    6.80 -  __asm__ ("rlwimi %0,%2,24,0,7": "=&r" (result):"0" (result), "r" (x));
    6.81 +  __asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x));
    6.82 +  __asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x));
    6.83 +  __asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x));
    6.84      return result;
    6.85  }
    6.86  #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
    6.87  static __inline__ Uint32
    6.88 -SDL_Swap32 (Uint32 x)
    6.89 +SDL_Swap32(Uint32 x)
    6.90  {
    6.91 -  __asm__ ("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d" (x): "0" (x):"cc");
    6.92 +  __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
    6.93      return x;
    6.94  }
    6.95  #else
    6.96  static __inline__ Uint32
    6.97 -SDL_Swap32 (Uint32 x)
    6.98 +SDL_Swap32(Uint32 x)
    6.99  {
   6.100      return ((x << 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) |
   6.101              (x >> 24));
   6.102 @@ -145,7 +144,7 @@
   6.103  #ifdef SDL_HAS_64BIT_TYPE
   6.104  #if defined(__GNUC__) && defined(__i386__)
   6.105  static __inline__ Uint64
   6.106 -SDL_Swap64 (Uint64 x)
   6.107 +SDL_Swap64(Uint64 x)
   6.108  {
   6.109      union
   6.110      {
   6.111 @@ -156,21 +155,21 @@
   6.112          Uint64 u;
   6.113      } v;
   6.114      v.u = x;
   6.115 -  __asm__ ("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r" (v.s.a), "=r" (v.s.b):"0" (v.s.a),
   6.116 -             "1" (v.s.
   6.117 -                  b));
   6.118 +  __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
   6.119 +            "1"(v.s.
   6.120 +                b));
   6.121      return v.u;
   6.122  }
   6.123  #elif defined(__GNUC__) && defined(__x86_64__)
   6.124  static __inline__ Uint64
   6.125 -SDL_Swap64 (Uint64 x)
   6.126 +SDL_Swap64(Uint64 x)
   6.127  {
   6.128 -  __asm__ ("bswapq %0": "=r" (x):"0" (x));
   6.129 +  __asm__("bswapq %0": "=r"(x):"0"(x));
   6.130      return x;
   6.131  }
   6.132  #else
   6.133  static __inline__ Uint64
   6.134 -SDL_Swap64 (Uint64 x)
   6.135 +SDL_Swap64(Uint64 x)
   6.136  {
   6.137      Uint32 hi, lo;
   6.138  
   6.139 @@ -178,9 +177,9 @@
   6.140      lo = (Uint32) (x & 0xFFFFFFFF);
   6.141      x >>= 32;
   6.142      hi = (Uint32) (x & 0xFFFFFFFF);
   6.143 -    x = SDL_Swap32 (lo);
   6.144 +    x = SDL_Swap32(lo);
   6.145      x <<= 32;
   6.146 -    x |= SDL_Swap32 (hi);
   6.147 +    x |= SDL_Swap32(hi);
   6.148      return (x);
   6.149  }
   6.150  #endif
     7.1 --- a/include/SDL_error.h	Mon May 29 03:53:21 2006 +0000
     7.2 +++ b/include/SDL_error.h	Mon May 29 04:04:35 2006 +0000
     7.3 @@ -39,9 +39,9 @@
     7.4  #endif
     7.5  
     7.6  /* Public functions */
     7.7 -extern DECLSPEC void SDLCALL SDL_SetError (const char *fmt, ...);
     7.8 -extern DECLSPEC char *SDLCALL SDL_GetError (void);
     7.9 -extern DECLSPEC void SDLCALL SDL_ClearError (void);
    7.10 +extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
    7.11 +extern DECLSPEC char *SDLCALL SDL_GetError(void);
    7.12 +extern DECLSPEC void SDLCALL SDL_ClearError(void);
    7.13  
    7.14  /* Private error message function - used internally */
    7.15  #define SDL_OutOfMemory()	SDL_Error(SDL_ENOMEM)
    7.16 @@ -55,7 +55,7 @@
    7.17      SDL_UNSUPPORTED,
    7.18      SDL_LASTERROR
    7.19  } SDL_errorcode;
    7.20 -extern DECLSPEC void SDLCALL SDL_Error (SDL_errorcode code);
    7.21 +extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
    7.22  
    7.23  
    7.24  /* Ends C function definitions when using C++ */
     8.1 --- a/include/SDL_events.h	Mon May 29 03:53:21 2006 +0000
     8.2 +++ b/include/SDL_events.h	Mon May 29 04:04:35 2006 +0000
     8.3 @@ -89,28 +89,26 @@
     8.4  #define SDL_EVENTMASK(X)	(1<<(X))
     8.5  typedef enum
     8.6  {
     8.7 -    SDL_WINDOWEVENTMASK = SDL_EVENTMASK (SDL_WINDOWEVENT),
     8.8 -    SDL_KEYDOWNMASK = SDL_EVENTMASK (SDL_KEYDOWN),
     8.9 -    SDL_KEYUPMASK = SDL_EVENTMASK (SDL_KEYUP),
    8.10 -    SDL_KEYEVENTMASK = SDL_EVENTMASK (SDL_KEYDOWN) |
    8.11 -        SDL_EVENTMASK (SDL_KEYUP),
    8.12 -    SDL_MOUSEMOTIONMASK = SDL_EVENTMASK (SDL_MOUSEMOTION),
    8.13 -    SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK (SDL_MOUSEBUTTONDOWN),
    8.14 -    SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK (SDL_MOUSEBUTTONUP),
    8.15 -    SDL_MOUSEEVENTMASK = SDL_EVENTMASK (SDL_MOUSEMOTION) |
    8.16 -        SDL_EVENTMASK (SDL_MOUSEBUTTONDOWN) |
    8.17 -        SDL_EVENTMASK (SDL_MOUSEBUTTONUP),
    8.18 -    SDL_JOYAXISMOTIONMASK = SDL_EVENTMASK (SDL_JOYAXISMOTION),
    8.19 -    SDL_JOYBALLMOTIONMASK = SDL_EVENTMASK (SDL_JOYBALLMOTION),
    8.20 -    SDL_JOYHATMOTIONMASK = SDL_EVENTMASK (SDL_JOYHATMOTION),
    8.21 -    SDL_JOYBUTTONDOWNMASK = SDL_EVENTMASK (SDL_JOYBUTTONDOWN),
    8.22 -    SDL_JOYBUTTONUPMASK = SDL_EVENTMASK (SDL_JOYBUTTONUP),
    8.23 -    SDL_JOYEVENTMASK = SDL_EVENTMASK (SDL_JOYAXISMOTION) |
    8.24 -        SDL_EVENTMASK (SDL_JOYBALLMOTION) |
    8.25 -        SDL_EVENTMASK (SDL_JOYHATMOTION) |
    8.26 -        SDL_EVENTMASK (SDL_JOYBUTTONDOWN) | SDL_EVENTMASK (SDL_JOYBUTTONUP),
    8.27 -    SDL_QUITMASK = SDL_EVENTMASK (SDL_QUIT),
    8.28 -    SDL_SYSWMEVENTMASK = SDL_EVENTMASK (SDL_SYSWMEVENT)
    8.29 +    SDL_WINDOWEVENTMASK = SDL_EVENTMASK(SDL_WINDOWEVENT),
    8.30 +    SDL_KEYDOWNMASK = SDL_EVENTMASK(SDL_KEYDOWN),
    8.31 +    SDL_KEYUPMASK = SDL_EVENTMASK(SDL_KEYUP),
    8.32 +    SDL_KEYEVENTMASK = SDL_EVENTMASK(SDL_KEYDOWN) | SDL_EVENTMASK(SDL_KEYUP),
    8.33 +    SDL_MOUSEMOTIONMASK = SDL_EVENTMASK(SDL_MOUSEMOTION),
    8.34 +    SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN),
    8.35 +    SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
    8.36 +    SDL_MOUSEEVENTMASK = SDL_EVENTMASK(SDL_MOUSEMOTION) |
    8.37 +        SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN) | SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
    8.38 +    SDL_JOYAXISMOTIONMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION),
    8.39 +    SDL_JOYBALLMOTIONMASK = SDL_EVENTMASK(SDL_JOYBALLMOTION),
    8.40 +    SDL_JOYHATMOTIONMASK = SDL_EVENTMASK(SDL_JOYHATMOTION),
    8.41 +    SDL_JOYBUTTONDOWNMASK = SDL_EVENTMASK(SDL_JOYBUTTONDOWN),
    8.42 +    SDL_JOYBUTTONUPMASK = SDL_EVENTMASK(SDL_JOYBUTTONUP),
    8.43 +    SDL_JOYEVENTMASK = SDL_EVENTMASK(SDL_JOYAXISMOTION) |
    8.44 +        SDL_EVENTMASK(SDL_JOYBALLMOTION) |
    8.45 +        SDL_EVENTMASK(SDL_JOYHATMOTION) |
    8.46 +        SDL_EVENTMASK(SDL_JOYBUTTONDOWN) | SDL_EVENTMASK(SDL_JOYBUTTONUP),
    8.47 +    SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT),
    8.48 +    SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT)
    8.49  } SDL_EventMask;
    8.50  #define SDL_ALLEVENTS		0xFFFFFFFF
    8.51  
    8.52 @@ -299,7 +297,7 @@
    8.53     This function updates the event queue and internal input device state.
    8.54     This should only be run in the thread that sets the video mode.
    8.55  */
    8.56 -extern DECLSPEC void SDLCALL SDL_PumpEvents (void);
    8.57 +extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
    8.58  
    8.59  /* Checks the event queue for messages and optionally returns them.
    8.60     If 'action' is SDL_ADDEVENT, up to 'numevents' events will be added to
    8.61 @@ -320,27 +318,27 @@
    8.62      SDL_GETEVENT
    8.63  } SDL_eventaction;
    8.64  /* */
    8.65 -extern DECLSPEC int SDLCALL SDL_PeepEvents (SDL_Event * events, int numevents,
    8.66 -                                            SDL_eventaction action,
    8.67 -                                            Uint32 mask);
    8.68 +extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
    8.69 +                                           SDL_eventaction action,
    8.70 +                                           Uint32 mask);
    8.71  
    8.72  /* Polls for currently pending events, and returns 1 if there are any pending
    8.73     events, or 0 if there are none available.  If 'event' is not NULL, the next
    8.74     event is removed from the queue and stored in that area.
    8.75   */
    8.76 -extern DECLSPEC int SDLCALL SDL_PollEvent (SDL_Event * event);
    8.77 +extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
    8.78  
    8.79  /* Waits indefinitely for the next available event, returning 1, or 0 if there
    8.80     was an error while waiting for events.  If 'event' is not NULL, the next
    8.81     event is removed from the queue and stored in that area.
    8.82   */
    8.83 -extern DECLSPEC int SDLCALL SDL_WaitEvent (SDL_Event * event);
    8.84 +extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
    8.85  
    8.86  /* Add an event to the event queue.
    8.87     This function returns 0 on success, or -1 if the event queue was full
    8.88     or there was some other error.
    8.89   */
    8.90 -extern DECLSPEC int SDLCALL SDL_PushEvent (SDL_Event * event);
    8.91 +extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
    8.92  
    8.93  /*
    8.94    This function sets up a filter to process all events before they
    8.95 @@ -365,13 +363,13 @@
    8.96    If the quit event is generated by an interrupt signal, it will bypass the
    8.97    internal queue and be delivered to the application at the next event poll.
    8.98  */
    8.99 -extern DECLSPEC void SDLCALL SDL_SetEventFilter (SDL_EventFilter filter);
   8.100 +extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter);
   8.101  
   8.102  /*
   8.103    Return the current event filter - can be used to "chain" filters.
   8.104    If there is no event filter set, this function returns NULL.
   8.105  */
   8.106 -extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter (void);
   8.107 +extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter(void);
   8.108  
   8.109  /*
   8.110    This function allows you to set the state of processing certain events.
   8.111 @@ -385,7 +383,7 @@
   8.112  #define SDL_IGNORE	 0
   8.113  #define SDL_DISABLE	 0
   8.114  #define SDL_ENABLE	 1
   8.115 -extern DECLSPEC Uint8 SDLCALL SDL_EventState (Uint8 type, int state);
   8.116 +extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint8 type, int state);
   8.117  
   8.118  
   8.119  /* Ends C function definitions when using C++ */
     9.1 --- a/include/SDL_joystick.h	Mon May 29 03:53:21 2006 +0000
     9.2 +++ b/include/SDL_joystick.h	Mon May 29 04:04:35 2006 +0000
     9.3 @@ -54,14 +54,14 @@
     9.4  /*
     9.5   * Count the number of joysticks attached to the system
     9.6   */
     9.7 -extern DECLSPEC int SDLCALL SDL_NumJoysticks (void);
     9.8 +extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
     9.9  
    9.10  /*
    9.11   * Get the implementation dependent name of a joystick.
    9.12   * This can be called before any joysticks are opened.
    9.13   * If no name can be found, this function returns NULL.
    9.14   */
    9.15 -extern DECLSPEC const char *SDLCALL SDL_JoystickName (int device_index);
    9.16 +extern DECLSPEC const char *SDLCALL SDL_JoystickName(int device_index);
    9.17  
    9.18  /*
    9.19   * Open a joystick for use - the index passed as an argument refers to
    9.20 @@ -70,46 +70,46 @@
    9.21   *
    9.22   * This function returns a joystick identifier, or NULL if an error occurred.
    9.23   */
    9.24 -extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen (int device_index);
    9.25 +extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
    9.26  
    9.27  /*
    9.28   * Returns 1 if the joystick has been opened, or 0 if it has not.
    9.29   */
    9.30 -extern DECLSPEC int SDLCALL SDL_JoystickOpened (int device_index);
    9.31 +extern DECLSPEC int SDLCALL SDL_JoystickOpened(int device_index);
    9.32  
    9.33  /*
    9.34   * Get the device index of an opened joystick.
    9.35   */
    9.36 -extern DECLSPEC int SDLCALL SDL_JoystickIndex (SDL_Joystick * joystick);
    9.37 +extern DECLSPEC int SDLCALL SDL_JoystickIndex(SDL_Joystick * joystick);
    9.38  
    9.39  /*
    9.40   * Get the number of general axis controls on a joystick
    9.41   */
    9.42 -extern DECLSPEC int SDLCALL SDL_JoystickNumAxes (SDL_Joystick * joystick);
    9.43 +extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
    9.44  
    9.45  /*
    9.46   * Get the number of trackballs on a joystick
    9.47   * Joystick trackballs have only relative motion events associated
    9.48   * with them and their state cannot be polled.
    9.49   */
    9.50 -extern DECLSPEC int SDLCALL SDL_JoystickNumBalls (SDL_Joystick * joystick);
    9.51 +extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
    9.52  
    9.53  /*
    9.54   * Get the number of POV hats on a joystick
    9.55   */
    9.56 -extern DECLSPEC int SDLCALL SDL_JoystickNumHats (SDL_Joystick * joystick);
    9.57 +extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
    9.58  
    9.59  /*
    9.60   * Get the number of buttons on a joystick
    9.61   */
    9.62 -extern DECLSPEC int SDLCALL SDL_JoystickNumButtons (SDL_Joystick * joystick);
    9.63 +extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
    9.64  
    9.65  /*
    9.66   * Update the current state of the open joysticks.
    9.67   * This is called automatically by the event loop if any joystick
    9.68   * events are enabled.
    9.69   */
    9.70 -extern DECLSPEC void SDLCALL SDL_JoystickUpdate (void);
    9.71 +extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
    9.72  
    9.73  /*
    9.74   * Enable/disable joystick event polling.
    9.75 @@ -118,15 +118,15 @@
    9.76   * information.
    9.77   * The state can be one of SDL_QUERY, SDL_ENABLE or SDL_IGNORE.
    9.78   */
    9.79 -extern DECLSPEC int SDLCALL SDL_JoystickEventState (int state);
    9.80 +extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
    9.81  
    9.82  /*
    9.83   * Get the current state of an axis control on a joystick
    9.84   * The state is a value ranging from -32768 to 32767.
    9.85   * The axis indices start at index 0.
    9.86   */
    9.87 -extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis (SDL_Joystick * joystick,
    9.88 -                                                    int axis);
    9.89 +extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
    9.90 +                                                   int axis);
    9.91  
    9.92  /*
    9.93   * Get the current state of a POV hat on a joystick
    9.94 @@ -144,28 +144,28 @@
    9.95  /*
    9.96   * The hat indices start at index 0.
    9.97   */
    9.98 -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat (SDL_Joystick * joystick,
    9.99 -                                                  int hat);
   9.100 +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
   9.101 +                                                 int hat);
   9.102  
   9.103  /*
   9.104   * Get the ball axis change since the last poll
   9.105   * This returns 0, or -1 if you passed it invalid parameters.
   9.106   * The ball indices start at index 0.
   9.107   */
   9.108 -extern DECLSPEC int SDLCALL SDL_JoystickGetBall (SDL_Joystick * joystick,
   9.109 -                                                 int ball, int *dx, int *dy);
   9.110 +extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
   9.111 +                                                int ball, int *dx, int *dy);
   9.112  
   9.113  /*
   9.114   * Get the current state of a button on a joystick
   9.115   * The button indices start at index 0.
   9.116   */
   9.117 -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton (SDL_Joystick * joystick,
   9.118 -                                                     int button);
   9.119 +extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
   9.120 +                                                    int button);
   9.121  
   9.122  /*
   9.123   * Close a joystick previously opened with SDL_JoystickOpen()
   9.124   */
   9.125 -extern DECLSPEC void SDLCALL SDL_JoystickClose (SDL_Joystick * joystick);
   9.126 +extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
   9.127  
   9.128  
   9.129  /* Ends C function definitions when using C++ */
    10.1 --- a/include/SDL_keyboard.h	Mon May 29 03:53:21 2006 +0000
    10.2 +++ b/include/SDL_keyboard.h	Mon May 29 04:04:35 2006 +0000
    10.3 @@ -77,7 +77,7 @@
    10.4   * If 'enable' is -1, the translation state is not changed.
    10.5   * It returns the previous state of keyboard translation.
    10.6   */
    10.7 -extern DECLSPEC int SDLCALL SDL_EnableUNICODE (int enable);
    10.8 +extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
    10.9  
   10.10  /*
   10.11   * Enable/Disable keyboard repeat.  Keyboard repeat defaults to off.
   10.12 @@ -90,8 +90,8 @@
   10.13  /*
   10.14   * If 'delay' is set to 0, keyboard repeat is disabled.
   10.15   */
   10.16 -extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat (int delay, int interval);
   10.17 -extern DECLSPEC void SDLCALL SDL_GetKeyRepeat (int *delay, int *interval);
   10.18 +extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
   10.19 +extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
   10.20  
   10.21  /*
   10.22   * Get a snapshot of the current state of the keyboard.
   10.23 @@ -100,23 +100,23 @@
   10.24   * 	Uint8 *keystate = SDL_GetKeyState(NULL);
   10.25   *	if ( keystate[SDLK_RETURN] ) ... <RETURN> is pressed.
   10.26   */
   10.27 -extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyState (int *numkeys);
   10.28 +extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyState(int *numkeys);
   10.29  
   10.30  /*
   10.31   * Get the current key modifier state
   10.32   */
   10.33 -extern DECLSPEC SDLMod SDLCALL SDL_GetModState (void);
   10.34 +extern DECLSPEC SDLMod SDLCALL SDL_GetModState(void);
   10.35  
   10.36  /*
   10.37   * Set the current key modifier state
   10.38   * This does not change the keyboard state, only the key modifier flags.
   10.39   */
   10.40 -extern DECLSPEC void SDLCALL SDL_SetModState (SDLMod modstate);
   10.41 +extern DECLSPEC void SDLCALL SDL_SetModState(SDLMod modstate);
   10.42  
   10.43  /*
   10.44   * Get the name of an SDL virtual keysym
   10.45   */
   10.46 -extern DECLSPEC char *SDLCALL SDL_GetKeyName (SDLKey key);
   10.47 +extern DECLSPEC char *SDLCALL SDL_GetKeyName(SDLKey key);
   10.48  
   10.49  
   10.50  /* Ends C function definitions when using C++ */
    11.1 --- a/include/SDL_loadso.h	Mon May 29 03:53:21 2006 +0000
    11.2 +++ b/include/SDL_loadso.h	Mon May 29 04:04:35 2006 +0000
    11.3 @@ -57,17 +57,17 @@
    11.4   * to the object handle (or NULL if there was an error).
    11.5   * The 'sofile' parameter is a system dependent name of the object file.
    11.6   */
    11.7 -extern DECLSPEC void *SDLCALL SDL_LoadObject (const char *sofile);
    11.8 +extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
    11.9  
   11.10  /* Given an object handle, this function looks up the address of the
   11.11   * named function in the shared object and returns it.  This address
   11.12   * is no longer valid after calling SDL_UnloadObject().
   11.13   */
   11.14 -extern DECLSPEC void *SDLCALL SDL_LoadFunction (void *handle,
   11.15 -                                                const char *name);
   11.16 +extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,
   11.17 +                                               const char *name);
   11.18  
   11.19  /* Unload a shared object from memory */
   11.20 -extern DECLSPEC void SDLCALL SDL_UnloadObject (void *handle);
   11.21 +extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
   11.22  
   11.23  /* Ends C function definitions when using C++ */
   11.24  #ifdef __cplusplus
    12.1 --- a/include/SDL_main.h	Mon May 29 03:53:21 2006 +0000
    12.2 +++ b/include/SDL_main.h	Mon May 29 04:04:35 2006 +0000
    12.3 @@ -50,7 +50,7 @@
    12.4  #define main	SDL_main
    12.5  
    12.6  /* The prototype for the application's main() function */
    12.7 -extern C_LINKAGE int SDL_main (int argc, char *argv[]);
    12.8 +extern C_LINKAGE int SDL_main(int argc, char *argv[]);
    12.9  
   12.10  
   12.11  /* From the SDL library code -- needed for registering the app on Win32 */
   12.12 @@ -64,12 +64,12 @@
   12.13  #endif
   12.14  
   12.15  /* This should be called from your WinMain() function, if any */
   12.16 -extern DECLSPEC void SDLCALL SDL_SetModuleHandle (void *hInst);
   12.17 +extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst);
   12.18  /* This can also be called, but is no longer necessary */
   12.19 -extern DECLSPEC int SDLCALL SDL_RegisterApp (char *name, Uint32 style,
   12.20 -                                             void *hInst);
   12.21 +extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
   12.22 +                                            void *hInst);
   12.23  /* This can also be called, but is no longer necessary (SDL_Quit calls it) */
   12.24 -extern DECLSPEC void SDLCALL SDL_UnregisterApp (void);
   12.25 +extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
   12.26  #ifdef __cplusplus
   12.27  /* *INDENT-OFF* */
   12.28  }
   12.29 @@ -92,7 +92,7 @@
   12.30  struct QDGlobals;
   12.31  
   12.32  /* This should be called from your main() function, if any */
   12.33 -extern DECLSPEC void SDLCALL SDL_InitQuickDraw (struct QDGlobals *the_qd);
   12.34 +extern DECLSPEC void SDLCALL SDL_InitQuickDraw(struct QDGlobals *the_qd);
   12.35  
   12.36  #ifdef __cplusplus
   12.37  /* *INDENT-OFF* */
    13.1 --- a/include/SDL_mouse.h	Mon May 29 03:53:21 2006 +0000
    13.2 +++ b/include/SDL_mouse.h	Mon May 29 04:04:35 2006 +0000
    13.3 @@ -59,7 +59,7 @@
    13.4   * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
    13.5   * current mouse cursor position.  You can pass NULL for either x or y.
    13.6   */
    13.7 -extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState (int *x, int *y);
    13.8 +extern DECLSPEC Uint8 SDLCALL SDL_GetMouseState(int *x, int *y);
    13.9  
   13.10  /*
   13.11   * Retrieve the current state of the mouse.
   13.12 @@ -67,12 +67,12 @@
   13.13   * be tested using the SDL_BUTTON(X) macros, and x and y are set to the
   13.14   * mouse deltas since the last call to SDL_GetRelativeMouseState().
   13.15   */
   13.16 -extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState (int *x, int *y);
   13.17 +extern DECLSPEC Uint8 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
   13.18  
   13.19  /*
   13.20   * Set the position of the mouse cursor (generates a mouse motion event)
   13.21   */
   13.22 -extern DECLSPEC void SDLCALL SDL_WarpMouse (Uint16 x, Uint16 y);
   13.23 +extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
   13.24  
   13.25  /*
   13.26   * Create a cursor using the specified data and mask (in MSB format).
   13.27 @@ -95,17 +95,17 @@
   13.28   * If the cursor is currently visible, the change will be immediately 
   13.29   * represented on the display.
   13.30   */
   13.31 -extern DECLSPEC void SDLCALL SDL_SetCursor (SDL_Cursor * cursor);
   13.32 +extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);
   13.33  
   13.34  /*
   13.35   * Returns the currently active cursor.
   13.36   */
   13.37 -extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor (void);
   13.38 +extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
   13.39  
   13.40  /*
   13.41   * Deallocates a cursor created with SDL_CreateCursor().
   13.42   */
   13.43 -extern DECLSPEC void SDLCALL SDL_FreeCursor (SDL_Cursor * cursor);
   13.44 +extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
   13.45  
   13.46  /*
   13.47   * Toggle whether or not the cursor is shown on the screen.
   13.48 @@ -114,7 +114,7 @@
   13.49   * before the call, or 0 if it was not.  You can query the current
   13.50   * state by passing a 'toggle' value of -1.
   13.51   */
   13.52 -extern DECLSPEC int SDLCALL SDL_ShowCursor (int toggle);
   13.53 +extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
   13.54  
   13.55  /* Used as a mask when testing buttons in buttonstate
   13.56     Button 1:	Left mouse button
    14.1 --- a/include/SDL_mutex.h	Mon May 29 03:53:21 2006 +0000
    14.2 +++ b/include/SDL_mutex.h	Mon May 29 04:04:35 2006 +0000
    14.3 @@ -58,21 +58,21 @@
    14.4  typedef struct SDL_mutex SDL_mutex;
    14.5  
    14.6  /* Create a mutex, initialized unlocked */
    14.7 -extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex (void);
    14.8 +extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
    14.9  
   14.10  /* Lock the mutex  (Returns 0, or -1 on error) */
   14.11  #define SDL_LockMutex(m)	SDL_mutexP(m)
   14.12 -extern DECLSPEC int SDLCALL SDL_mutexP (SDL_mutex * mutex);
   14.13 +extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex * mutex);
   14.14  
   14.15  /* Unlock the mutex  (Returns 0, or -1 on error)
   14.16     It is an error to unlock a mutex that has not been locked by
   14.17     the current thread, and doing so results in undefined behavior.
   14.18   */
   14.19  #define SDL_UnlockMutex(m)	SDL_mutexV(m)
   14.20 -extern DECLSPEC int SDLCALL SDL_mutexV (SDL_mutex * mutex);
   14.21 +extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex * mutex);
   14.22  
   14.23  /* Destroy a mutex */
   14.24 -extern DECLSPEC void SDLCALL SDL_DestroyMutex (SDL_mutex * mutex);
   14.25 +extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
   14.26  
   14.27  
   14.28  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   14.29 @@ -84,21 +84,21 @@
   14.30  typedef struct SDL_semaphore SDL_sem;
   14.31  
   14.32  /* Create a semaphore, initialized with value, returns NULL on failure. */
   14.33 -extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore (Uint32 initial_value);
   14.34 +extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
   14.35  
   14.36  /* Destroy a semaphore */
   14.37 -extern DECLSPEC void SDLCALL SDL_DestroySemaphore (SDL_sem * sem);
   14.38 +extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
   14.39  
   14.40  /* This function suspends the calling thread until the semaphore pointed 
   14.41   * to by sem has a positive count. It then atomically decreases the semaphore
   14.42   * count.
   14.43   */
   14.44 -extern DECLSPEC int SDLCALL SDL_SemWait (SDL_sem * sem);
   14.45 +extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
   14.46  
   14.47  /* Non-blocking variant of SDL_SemWait(), returns 0 if the wait succeeds,
   14.48     SDL_MUTEX_TIMEDOUT if the wait would block, and -1 on error.
   14.49  */
   14.50 -extern DECLSPEC int SDLCALL SDL_SemTryWait (SDL_sem * sem);
   14.51 +extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
   14.52  
   14.53  /* Variant of SDL_SemWait() with a timeout in milliseconds, returns 0 if
   14.54     the wait succeeds, SDL_MUTEX_TIMEDOUT if the wait does not succeed in
   14.55 @@ -106,15 +106,15 @@
   14.56     On some platforms this function is implemented by looping with a delay
   14.57     of 1 ms, and so should be avoided if possible.
   14.58  */
   14.59 -extern DECLSPEC int SDLCALL SDL_SemWaitTimeout (SDL_sem * sem, Uint32 ms);
   14.60 +extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
   14.61  
   14.62  /* Atomically increases the semaphore's count (not blocking), returns 0,
   14.63     or -1 on error.
   14.64   */
   14.65 -extern DECLSPEC int SDLCALL SDL_SemPost (SDL_sem * sem);
   14.66 +extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
   14.67  
   14.68  /* Returns the current count of the semaphore */
   14.69 -extern DECLSPEC Uint32 SDLCALL SDL_SemValue (SDL_sem * sem);
   14.70 +extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
   14.71  
   14.72  
   14.73  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   14.74 @@ -126,27 +126,27 @@
   14.75  typedef struct SDL_cond SDL_cond;
   14.76  
   14.77  /* Create a condition variable */
   14.78 -extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond (void);
   14.79 +extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
   14.80  
   14.81  /* Destroy a condition variable */
   14.82 -extern DECLSPEC void SDLCALL SDL_DestroyCond (SDL_cond * cond);
   14.83 +extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
   14.84  
   14.85  /* Restart one of the threads that are waiting on the condition variable,
   14.86     returns 0 or -1 on error.
   14.87   */
   14.88 -extern DECLSPEC int SDLCALL SDL_CondSignal (SDL_cond * cond);
   14.89 +extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
   14.90  
   14.91  /* Restart all threads that are waiting on the condition variable,
   14.92     returns 0 or -1 on error.
   14.93   */
   14.94 -extern DECLSPEC int SDLCALL SDL_CondBroadcast (SDL_cond * cond);
   14.95 +extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
   14.96  
   14.97  /* Wait on the condition variable, unlocking the provided mutex.
   14.98     The mutex must be locked before entering this function!
   14.99     The mutex is re-locked once the condition variable is signaled.
  14.100     Returns 0 when it is signaled, or -1 on error.
  14.101   */
  14.102 -extern DECLSPEC int SDLCALL SDL_CondWait (SDL_cond * cond, SDL_mutex * mut);
  14.103 +extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mut);
  14.104  
  14.105  /* Waits for at most 'ms' milliseconds, and returns 0 if the condition
  14.106     variable is signaled, SDL_MUTEX_TIMEDOUT if the condition is not
  14.107 @@ -154,9 +154,8 @@
  14.108     On some platforms this function is implemented by looping with a delay
  14.109     of 1 ms, and so should be avoided if possible.
  14.110  */
  14.111 -extern DECLSPEC int SDLCALL SDL_CondWaitTimeout (SDL_cond * cond,
  14.112 -                                                 SDL_mutex * mutex,
  14.113 -                                                 Uint32 ms);
  14.114 +extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
  14.115 +                                                SDL_mutex * mutex, Uint32 ms);
  14.116  
  14.117  /* Ends C function definitions when using C++ */
  14.118  #ifdef __cplusplus
    15.1 --- a/include/SDL_pixels.h	Mon May 29 03:53:21 2006 +0000
    15.2 +++ b/include/SDL_pixels.h	Mon May 29 04:04:35 2006 +0000
    15.3 @@ -109,64 +109,64 @@
    15.4  {
    15.5      SDL_PixelFormat_Unknown,
    15.6      SDL_PixelFormat_Index1LSB =
    15.7 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Index1, SDL_BitmapOrder_1234, 0,
    15.8 -                                1, 0),
    15.9 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index1, SDL_BitmapOrder_1234, 0,
   15.10 +                               1, 0),
   15.11      SDL_PixelFormat_Index1MSB =
   15.12 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Index1, SDL_BitmapOrder_4321, 0,
   15.13 -                                1, 0),
   15.14 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index1, SDL_BitmapOrder_4321, 0,
   15.15 +                               1, 0),
   15.16      SDL_PixelFormat_Index4LSB =
   15.17 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Index4, SDL_BitmapOrder_1234, 0,
   15.18 -                                2, 0),
   15.19 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index4, SDL_BitmapOrder_1234, 0,
   15.20 +                               2, 0),
   15.21      SDL_PixelFormat_Index4MSB =
   15.22 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Index4, SDL_BitmapOrder_4321, 0,
   15.23 -                                2, 0),
   15.24 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index4, SDL_BitmapOrder_4321, 0,
   15.25 +                               2, 0),
   15.26      SDL_PixelFormat_Index8 =
   15.27 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Index8, 0, 0, 8, 1),
   15.28 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Index8, 0, 0, 8, 1),
   15.29      SDL_PixelFormat_RGB332 =
   15.30 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed8, SDL_PackedOrder_XRGB,
   15.31 -                                SDL_PackedLayout_332, 8, 1),
   15.32 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed8, SDL_PackedOrder_XRGB,
   15.33 +                               SDL_PackedLayout_332, 8, 1),
   15.34      SDL_PixelFormat_RGB444 =
   15.35 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
   15.36 -                                SDL_PackedLayout_4444, 12, 2),
   15.37 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
   15.38 +                               SDL_PackedLayout_4444, 12, 2),
   15.39      SDL_PixelFormat_RGB555 =
   15.40 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
   15.41 -                                SDL_PackedLayout_1555, 15, 2),
   15.42 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
   15.43 +                               SDL_PackedLayout_1555, 15, 2),
   15.44      SDL_PixelFormat_ARGB4444 =
   15.45 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
   15.46 -                                SDL_PackedLayout_4444, 16, 2),
   15.47 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
   15.48 +                               SDL_PackedLayout_4444, 16, 2),
   15.49      SDL_PixelFormat_ARGB1555 =
   15.50 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
   15.51 -                                SDL_PackedLayout_1555, 16, 2),
   15.52 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_ARGB,
   15.53 +                               SDL_PackedLayout_1555, 16, 2),
   15.54      SDL_PixelFormat_RGB565 =
   15.55 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
   15.56 -                                SDL_PackedLayout_565, 16, 2),
   15.57 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed16, SDL_PackedOrder_XRGB,
   15.58 +                               SDL_PackedLayout_565, 16, 2),
   15.59      SDL_PixelFormat_RGB24 =
   15.60 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_ArrayU8, SDL_ArrayOrder_RGB, 0,
   15.61 -                                24, 3),
   15.62 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_ArrayU8, SDL_ArrayOrder_RGB, 0,
   15.63 +                               24, 3),
   15.64      SDL_PixelFormat_BGR24 =
   15.65 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_ArrayU8, SDL_ArrayOrder_BGR, 0,
   15.66 -                                24, 3),
   15.67 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_ArrayU8, SDL_ArrayOrder_BGR, 0,
   15.68 +                               24, 3),
   15.69      SDL_PixelFormat_RGB888 =
   15.70 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_XRGB,
   15.71 -                                SDL_PackedLayout_8888, 24, 4),
   15.72 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_XRGB,
   15.73 +                               SDL_PackedLayout_8888, 24, 4),
   15.74      SDL_PixelFormat_BGR888 =
   15.75 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_XBGR,
   15.76 -                                SDL_PackedLayout_8888, 24, 4),
   15.77 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_XBGR,
   15.78 +                               SDL_PackedLayout_8888, 24, 4),
   15.79      SDL_PixelFormat_ARGB8888 =
   15.80 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
   15.81 -                                SDL_PackedLayout_8888, 32, 4),
   15.82 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
   15.83 +                               SDL_PackedLayout_8888, 32, 4),
   15.84      SDL_PixelFormat_RGBA8888 =
   15.85 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_RGBA,
   15.86 -                                SDL_PackedLayout_8888, 32, 4),
   15.87 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_RGBA,
   15.88 +                               SDL_PackedLayout_8888, 32, 4),
   15.89      SDL_PixelFormat_ABGR8888 =
   15.90 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_ABGR,
   15.91 -                                SDL_PackedLayout_8888, 32, 4),
   15.92 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ABGR,
   15.93 +                               SDL_PackedLayout_8888, 32, 4),
   15.94      SDL_PixelFormat_BGRA8888 =
   15.95 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_BGRA,
   15.96 -                                SDL_PackedLayout_8888, 32, 4),
   15.97 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_BGRA,
   15.98 +                               SDL_PackedLayout_8888, 32, 4),
   15.99      SDL_PixelFormat_ARGB2101010 =
  15.100 -        SDL_DEFINE_PIXELFORMAT (SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
  15.101 -                                SDL_PackedLayout_2101010, 32, 4),
  15.102 +        SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
  15.103 +                               SDL_PackedLayout_2101010, 32, 4),
  15.104  };
  15.105  
  15.106  typedef struct SDL_Color
  15.107 @@ -213,19 +213,19 @@
  15.108   * Convert one of the enumerated formats above to a bpp and RGBA masks.
  15.109   * Returns SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.
  15.110   */
  15.111 -extern DECLSPEC SDL_bool SDL_PixelFormatEnumToMasks (Uint32 format, int *bpp,
  15.112 -                                                     Uint32 * Rmask,
  15.113 -                                                     Uint32 * Gmask,
  15.114 -                                                     Uint32 * Bmask,
  15.115 -                                                     Uint32 * Amask);
  15.116 +extern DECLSPEC SDL_bool SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp,
  15.117 +                                                    Uint32 * Rmask,
  15.118 +                                                    Uint32 * Gmask,
  15.119 +                                                    Uint32 * Bmask,
  15.120 +                                                    Uint32 * Amask);
  15.121  
  15.122  /*
  15.123   * Convert a bpp and RGBA masks to one of the enumerated formats above.
  15.124   * Returns SDL_PixelFormat_Unknown if the conversion wasn't possible.
  15.125   */
  15.126 -extern DECLSPEC Uint32 SDL_MasksToPixelFormatEnum (int bpp, Uint32 Rmask,
  15.127 -                                                   Uint32 Gmask, Uint32 Bmask,
  15.128 -                                                   Uint32 Amask);
  15.129 +extern DECLSPEC Uint32 SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask,
  15.130 +                                                  Uint32 Gmask, Uint32 Bmask,
  15.131 +                                                  Uint32 Amask);
  15.132  
  15.133  /* Ends C function definitions when using C++ */
  15.134  #ifdef __cplusplus
    16.1 --- a/include/SDL_rwops.h	Mon May 29 03:53:21 2006 +0000
    16.2 +++ b/include/SDL_rwops.h	Mon May 29 04:04:35 2006 +0000
    16.3 @@ -102,19 +102,19 @@
    16.4  
    16.5  /* Functions to create SDL_RWops structures from various data sources */
    16.6  
    16.7 -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile (const char *file,
    16.8 -                                                   const char *mode);
    16.9 +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
   16.10 +                                                  const char *mode);
   16.11  
   16.12  #ifdef HAVE_STDIO_H
   16.13 -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP (FILE * fp, int autoclose);
   16.14 +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, int autoclose);
   16.15  #endif
   16.16  
   16.17 -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem (void *mem, int size);
   16.18 -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem (const void *mem,
   16.19 -                                                       int size);
   16.20 +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
   16.21 +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
   16.22 +                                                      int size);
   16.23  
   16.24 -extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW (void);
   16.25 -extern DECLSPEC void SDLCALL SDL_FreeRW (SDL_RWops * area);
   16.26 +extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
   16.27 +extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
   16.28  
   16.29  #define RW_SEEK_SET	0       /* Seek from the beginning of data */
   16.30  #define RW_SEEK_CUR	1       /* Seek relative to current read point */
   16.31 @@ -129,20 +129,20 @@
   16.32  
   16.33  
   16.34  /* Read an item of the specified endianness and return in native format */
   16.35 -extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16 (SDL_RWops * src);
   16.36 -extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16 (SDL_RWops * src);
   16.37 -extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32 (SDL_RWops * src);
   16.38 -extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32 (SDL_RWops * src);
   16.39 -extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64 (SDL_RWops * src);
   16.40 -extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64 (SDL_RWops * src);
   16.41 +extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
   16.42 +extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
   16.43 +extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
   16.44 +extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
   16.45 +extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
   16.46 +extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
   16.47  
   16.48  /* Write an item of native format to the specified endianness */
   16.49 -extern DECLSPEC int SDLCALL SDL_WriteLE16 (SDL_RWops * dst, Uint16 value);
   16.50 -extern DECLSPEC int SDLCALL SDL_WriteBE16 (SDL_RWops * dst, Uint16 value);
   16.51 -extern DECLSPEC int SDLCALL SDL_WriteLE32 (SDL_RWops * dst, Uint32 value);
   16.52 -extern DECLSPEC int SDLCALL SDL_WriteBE32 (SDL_RWops * dst, Uint32 value);
   16.53 -extern DECLSPEC int SDLCALL SDL_WriteLE64 (SDL_RWops * dst, Uint64 value);
   16.54 -extern DECLSPEC int SDLCALL SDL_WriteBE64 (SDL_RWops * dst, Uint64 value);
   16.55 +extern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
   16.56 +extern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
   16.57 +extern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
   16.58 +extern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
   16.59 +extern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
   16.60 +extern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
   16.61  
   16.62  
   16.63  /* Ends C function definitions when using C++ */
    17.1 --- a/include/SDL_stdinc.h	Mon May 29 03:53:21 2006 +0000
    17.2 +++ b/include/SDL_stdinc.h	Mon May 29 04:04:35 2006 +0000
    17.3 @@ -141,14 +141,14 @@
    17.4  #define SDL_COMPILE_TIME_ASSERT(name, x)               \
    17.5         typedef int SDL_dummy_ ## name[(x) * 2 - 1]
    17.6  #ifndef DOXYGEN_SHOULD_IGNORE_THIS
    17.7 -SDL_COMPILE_TIME_ASSERT (uint8, sizeof (Uint8) == 1);
    17.8 -SDL_COMPILE_TIME_ASSERT (sint8, sizeof (Sint8) == 1);
    17.9 -SDL_COMPILE_TIME_ASSERT (uint16, sizeof (Uint16) == 2);
   17.10 -SDL_COMPILE_TIME_ASSERT (sint16, sizeof (Sint16) == 2);
   17.11 -SDL_COMPILE_TIME_ASSERT (uint32, sizeof (Uint32) == 4);
   17.12 -SDL_COMPILE_TIME_ASSERT (sint32, sizeof (Sint32) == 4);
   17.13 -SDL_COMPILE_TIME_ASSERT (uint64, sizeof (Uint64) == 8);
   17.14 -SDL_COMPILE_TIME_ASSERT (sint64, sizeof (Sint64) == 8);
   17.15 +SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
   17.16 +SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
   17.17 +SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
   17.18 +SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
   17.19 +SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
   17.20 +SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
   17.21 +SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
   17.22 +SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
   17.23  #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
   17.24  
   17.25  /* Check to make sure enums are the size of ints, for structure packing.
   17.26 @@ -167,7 +167,7 @@
   17.27      DUMMY_ENUM_VALUE
   17.28  } SDL_DUMMY_ENUM;
   17.29  
   17.30 -SDL_COMPILE_TIME_ASSERT (enum, sizeof (SDL_DUMMY_ENUM) == sizeof (int));
   17.31 +SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
   17.32  #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
   17.33  
   17.34  #include "begin_code.h"
   17.35 @@ -181,25 +181,25 @@
   17.36  #ifdef HAVE_MALLOC
   17.37  #define SDL_malloc	malloc
   17.38  #else
   17.39 -extern DECLSPEC void *SDLCALL SDL_malloc (size_t size);
   17.40 +extern DECLSPEC void *SDLCALL SDL_malloc(size_t size);
   17.41  #endif
   17.42  
   17.43  #ifdef HAVE_CALLOC
   17.44  #define SDL_calloc	calloc
   17.45  #else
   17.46 -extern DECLSPEC void *SDLCALL SDL_calloc (size_t nmemb, size_t size);
   17.47 +extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
   17.48  #endif
   17.49  
   17.50  #ifdef HAVE_REALLOC
   17.51  #define SDL_realloc	realloc
   17.52  #else
   17.53 -extern DECLSPEC void *SDLCALL SDL_realloc (void *mem, size_t size);
   17.54 +extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
   17.55  #endif
   17.56  
   17.57  #ifdef HAVE_FREE
   17.58  #define SDL_free	free
   17.59  #else
   17.60 -extern DECLSPEC void SDLCALL SDL_free (void *mem);
   17.61 +extern DECLSPEC void SDLCALL SDL_free(void *mem);
   17.62  #endif
   17.63  
   17.64  #if defined(HAVE_ALLOCA) && !defined(alloca)
   17.65 @@ -215,9 +215,9 @@
   17.66  # elif defined(__AIX__)
   17.67  #pragma alloca
   17.68  # elif defined(__MRC__)
   17.69 -void *alloca (unsigned);
   17.70 +void *alloca(unsigned);
   17.71  # else
   17.72 -char *alloca ();
   17.73 +char *alloca();
   17.74  # endif
   17.75  #endif
   17.76  #ifdef HAVE_ALLOCA
   17.77 @@ -231,21 +231,21 @@
   17.78  #ifdef HAVE_GETENV
   17.79  #define SDL_getenv	getenv
   17.80  #else
   17.81 -extern DECLSPEC char *SDLCALL SDL_getenv (const char *name);
   17.82 +extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
   17.83  #endif
   17.84  
   17.85  #ifdef HAVE_PUTENV
   17.86  #define SDL_putenv	putenv
   17.87  #else
   17.88 -extern DECLSPEC int SDLCALL SDL_putenv (const char *variable);
   17.89 +extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
   17.90  #endif
   17.91  
   17.92  #ifdef HAVE_QSORT
   17.93  #define SDL_qsort	qsort
   17.94  #else
   17.95 -extern DECLSPEC void SDLCALL SDL_qsort (void *base, size_t nmemb, size_t size,
   17.96 -                                        int (*compare) (const void *,
   17.97 -                                                        const void *));
   17.98 +extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size,
   17.99 +                                       int (*compare) (const void *,
  17.100 +                                                       const void *));
  17.101  #endif
  17.102  
  17.103  #ifdef HAVE_ABS
  17.104 @@ -272,7 +272,7 @@
  17.105  #ifdef HAVE_MEMSET
  17.106  #define SDL_memset      memset
  17.107  #else
  17.108 -extern DECLSPEC void *SDLCALL SDL_memset (void *dst, int c, size_t len);
  17.109 +extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
  17.110  #endif
  17.111  #define SDL_zero(x)	SDL_memset(&(x), 0, sizeof((x)))
  17.112  #define SDL_zerop(x)	SDL_memset((x), 0, sizeof(*(x)))
  17.113 @@ -331,8 +331,8 @@
  17.114  #elif defined(HAVE_BCOPY)
  17.115  #define SDL_memcpy(d, s, n)	bcopy((s), (d), (n))
  17.116  #else
  17.117 -extern DECLSPEC void *SDLCALL SDL_memcpy (void *dst, const void *src,
  17.118 -                                          size_t len);
  17.119 +extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src,
  17.120 +                                         size_t len);
  17.121  #endif
  17.122  #endif
  17.123  
  17.124 @@ -379,8 +379,8 @@
  17.125  } while(0)
  17.126  #endif
  17.127  #ifndef SDL_revcpy
  17.128 -extern DECLSPEC void *SDLCALL SDL_revcpy (void *dst, const void *src,
  17.129 -                                          size_t len);
  17.130 +extern DECLSPEC void *SDLCALL SDL_revcpy(void *dst, const void *src,
  17.131 +                                         size_t len);
  17.132  #endif
  17.133  
  17.134  #ifdef HAVE_MEMMOVE
  17.135 @@ -401,52 +401,52 @@
  17.136  #ifdef HAVE_MEMCMP
  17.137  #define SDL_memcmp      memcmp
  17.138  #else
  17.139 -extern DECLSPEC int SDLCALL SDL_memcmp (const void *s1, const void *s2,
  17.140 -                                        size_t len);
  17.141 +extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2,
  17.142 +                                       size_t len);
  17.143  #endif
  17.144  
  17.145  #ifdef HAVE_STRLEN
  17.146  #define SDL_strlen      strlen
  17.147  #else
  17.148 -extern DECLSPEC size_t SDLCALL SDL_strlen (const char *string);
  17.149 +extern DECLSPEC size_t SDLCALL SDL_strlen(const char *string);
  17.150  #endif
  17.151  
  17.152  #ifdef HAVE_STRLCPY
  17.153  #define SDL_strlcpy     strlcpy
  17.154  #else
  17.155 -extern DECLSPEC size_t SDLCALL SDL_strlcpy (char *dst, const char *src,
  17.156 -                                            size_t maxlen);
  17.157 +extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src,
  17.158 +                                           size_t maxlen);
  17.159  #endif
  17.160  
  17.161  #ifdef HAVE_STRLCAT
  17.162  #define SDL_strlcat    strlcat
  17.163  #else
  17.164 -extern DECLSPEC size_t SDLCALL SDL_strlcat (char *dst, const char *src,
  17.165 -                                            size_t maxlen);
  17.166 +extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src,
  17.167 +                                           size_t maxlen);
  17.168  #endif
  17.169  
  17.170  #ifdef HAVE_STRDUP
  17.171  #define SDL_strdup     strdup
  17.172  #else
  17.173 -extern DECLSPEC char *SDLCALL SDL_strdup (const char *string);
  17.174 +extern DECLSPEC char *SDLCALL SDL_strdup(const char *string);
  17.175  #endif
  17.176  
  17.177  #ifdef HAVE__STRREV
  17.178  #define SDL_strrev      _strrev
  17.179  #else
  17.180 -extern DECLSPEC char *SDLCALL SDL_strrev (char *string);
  17.181 +extern DECLSPEC char *SDLCALL SDL_strrev(char *string);
  17.182  #endif
  17.183  
  17.184  #ifdef HAVE__STRUPR
  17.185  #define SDL_strupr      _strupr
  17.186  #else
  17.187 -extern DECLSPEC char *SDLCALL SDL_strupr (char *string);
  17.188 +extern DECLSPEC char *SDLCALL SDL_strupr(char *string);
  17.189  #endif
  17.190  
  17.191  #ifdef HAVE__STRLWR
  17.192  #define SDL_strlwr      _strlwr
  17.193  #else
  17.194 -extern DECLSPEC char *SDLCALL SDL_strlwr (char *string);
  17.195 +extern DECLSPEC char *SDLCALL SDL_strlwr(char *string);
  17.196  #endif
  17.197  
  17.198  #ifdef HAVE_STRCHR
  17.199 @@ -454,7 +454,7 @@
  17.200  #elif defined(HAVE_INDEX)
  17.201  #define SDL_strchr      index
  17.202  #else
  17.203 -extern DECLSPEC char *SDLCALL SDL_strchr (const char *string, int c);
  17.204 +extern DECLSPEC char *SDLCALL SDL_strchr(const char *string, int c);
  17.205  #endif
  17.206  
  17.207  #ifdef HAVE_STRRCHR
  17.208 @@ -462,14 +462,14 @@
  17.209  #elif defined(HAVE_RINDEX)
  17.210  #define SDL_strrchr     rindex
  17.211  #else
  17.212 -extern DECLSPEC char *SDLCALL SDL_strrchr (const char *string, int c);
  17.213 +extern DECLSPEC char *SDLCALL SDL_strrchr(const char *string, int c);
  17.214  #endif
  17.215  
  17.216  #ifdef HAVE_STRSTR
  17.217  #define SDL_strstr      strstr
  17.218  #else
  17.219 -extern DECLSPEC char *SDLCALL SDL_strstr (const char *haystack,
  17.220 -                                          const char *needle);
  17.221 +extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack,
  17.222 +                                         const char *needle);
  17.223  #endif
  17.224  
  17.225  #ifdef HAVE_ITOA
  17.226 @@ -481,7 +481,7 @@
  17.227  #ifdef HAVE__LTOA
  17.228  #define SDL_ltoa        _ltoa
  17.229  #else
  17.230 -extern DECLSPEC char *SDLCALL SDL_ltoa (long value, char *string, int radix);
  17.231 +extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *string, int radix);
  17.232  #endif
  17.233  
  17.234  #ifdef HAVE__UITOA
  17.235 @@ -493,22 +493,22 @@
  17.236  #ifdef HAVE__ULTOA
  17.237  #define SDL_ultoa       _ultoa
  17.238  #else
  17.239 -extern DECLSPEC char *SDLCALL SDL_ultoa (unsigned long value, char *string,
  17.240 -                                         int radix);
  17.241 +extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *string,
  17.242 +                                        int radix);
  17.243  #endif
  17.244  
  17.245  #ifdef HAVE_STRTOL
  17.246  #define SDL_strtol      strtol
  17.247  #else
  17.248 -extern DECLSPEC long SDLCALL SDL_strtol (const char *string, char **endp,
  17.249 -                                         int base);
  17.250 +extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp,
  17.251 +                                        int base);
  17.252  #endif
  17.253  
  17.254  #ifdef HAVE_STRTOUL
  17.255  #define SDL_strtoul      strtoul
  17.256  #else
  17.257 -extern DECLSPEC unsigned long SDLCALL SDL_strtoul (const char *string,
  17.258 -                                                   char **endp, int base);
  17.259 +extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string,
  17.260 +                                                  char **endp, int base);
  17.261  #endif
  17.262  
  17.263  #ifdef SDL_HAS_64BIT_TYPE
  17.264 @@ -516,29 +516,29 @@
  17.265  #ifdef HAVE__I64TOA
  17.266  #define SDL_lltoa       _i64toa
  17.267  #else
  17.268 -extern DECLSPEC char *SDLCALL SDL_lltoa (Sint64 value, char *string,
  17.269 -                                         int radix);
  17.270 +extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *string,
  17.271 +                                        int radix);
  17.272  #endif
  17.273  
  17.274  #ifdef HAVE__UI64TOA
  17.275  #define SDL_ulltoa      _ui64toa
  17.276  #else
  17.277 -extern DECLSPEC char *SDLCALL SDL_ulltoa (Uint64 value, char *string,
  17.278 -                                          int radix);
  17.279 +extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *string,
  17.280 +                                         int radix);
  17.281  #endif
  17.282  
  17.283  #ifdef HAVE_STRTOLL
  17.284  #define SDL_strtoll     strtoll
  17.285  #else
  17.286 -extern DECLSPEC Sint64 SDLCALL SDL_strtoll (const char *string, char **endp,
  17.287 -                                            int base);
  17.288 +extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp,
  17.289 +                                           int base);
  17.290  #endif
  17.291  
  17.292  #ifdef HAVE_STRTOULL
  17.293  #define SDL_strtoull     strtoull
  17.294  #else
  17.295 -extern DECLSPEC Uint64 SDLCALL SDL_strtoull (const char *string, char **endp,
  17.296 -                                             int base);
  17.297 +extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp,
  17.298 +                                            int base);
  17.299  #endif
  17.300  
  17.301  #endif /* SDL_HAS_64BIT_TYPE */
  17.302 @@ -546,7 +546,7 @@
  17.303  #ifdef HAVE_STRTOD
  17.304  #define SDL_strtod      strtod
  17.305  #else
  17.306 -extern DECLSPEC double SDLCALL SDL_strtod (const char *string, char **endp);
  17.307 +extern DECLSPEC double SDLCALL SDL_strtod(const char *string, char **endp);
  17.308  #endif
  17.309  
  17.310  #ifdef HAVE_ATOI
  17.311 @@ -564,14 +564,14 @@
  17.312  #ifdef HAVE_STRCMP
  17.313  #define SDL_strcmp      strcmp
  17.314  #else
  17.315 -extern DECLSPEC int SDLCALL SDL_strcmp (const char *str1, const char *str2);
  17.316 +extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
  17.317  #endif
  17.318  
  17.319  #ifdef HAVE_STRNCMP
  17.320  #define SDL_strncmp     strncmp
  17.321  #else
  17.322 -extern DECLSPEC int SDLCALL SDL_strncmp (const char *str1, const char *str2,
  17.323 -                                         size_t maxlen);
  17.324 +extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2,
  17.325 +                                        size_t maxlen);
  17.326  #endif
  17.327  
  17.328  #ifdef HAVE_STRCASECMP
  17.329 @@ -579,8 +579,8 @@
  17.330  #elif defined(HAVE__STRICMP)
  17.331  #define SDL_strcasecmp  _stricmp
  17.332  #else
  17.333 -extern DECLSPEC int SDLCALL SDL_strcasecmp (const char *str1,
  17.334 -                                            const char *str2);
  17.335 +extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1,
  17.336 +                                           const char *str2);
  17.337  #endif
  17.338  
  17.339  #ifdef HAVE_STRNCASECMP
  17.340 @@ -588,29 +588,29 @@
  17.341  #elif defined(HAVE__STRNICMP)
  17.342  #define SDL_strncasecmp _strnicmp
  17.343  #else
  17.344 -extern DECLSPEC int SDLCALL SDL_strncasecmp (const char *str1,
  17.345 -                                             const char *str2, size_t maxlen);
  17.346 +extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1,
  17.347 +                                            const char *str2, size_t maxlen);
  17.348  #endif
  17.349  
  17.350  #ifdef HAVE_SSCANF
  17.351  #define SDL_sscanf      sscanf
  17.352  #else
  17.353 -extern DECLSPEC int SDLCALL SDL_sscanf (const char *text, const char *fmt,
  17.354 -                                        ...);
  17.355 +extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt,
  17.356 +                                       ...);
  17.357  #endif
  17.358  
  17.359  #ifdef HAVE_SNPRINTF
  17.360  #define SDL_snprintf    snprintf
  17.361  #else
  17.362 -extern DECLSPEC int SDLCALL SDL_snprintf (char *text, size_t maxlen,
  17.363 -                                          const char *fmt, ...);
  17.364 +extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen,
  17.365 +                                         const char *fmt, ...);
  17.366  #endif
  17.367  
  17.368  #ifdef HAVE_VSNPRINTF
  17.369  #define SDL_vsnprintf   vsnprintf
  17.370  #else
  17.371 -extern DECLSPEC int SDLCALL SDL_vsnprintf (char *text, size_t maxlen,
  17.372 -                                           const char *fmt, va_list ap);
  17.373 +extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen,
  17.374 +                                          const char *fmt, va_list ap);
  17.375  #endif
  17.376  
  17.377  /* The SDL implementation of iconv() returns these error codes */
  17.378 @@ -623,25 +623,25 @@
  17.379  #define SDL_iconv_t     iconv_t
  17.380  #define SDL_iconv_open  iconv_open
  17.381  #define SDL_iconv_close iconv_close
  17.382 -extern DECLSPEC size_t SDLCALL SDL_iconv (SDL_iconv_t cd, char **inbuf,
  17.383 -                                          size_t * inbytesleft, char **outbuf,
  17.384 -                                          size_t * outbytesleft);
  17.385 +extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf,
  17.386 +                                         size_t * inbytesleft, char **outbuf,
  17.387 +                                         size_t * outbytesleft);
  17.388  #else
  17.389  typedef struct _SDL_iconv_t *SDL_iconv_t;
  17.390 -extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open (const char *tocode,
  17.391 -                                                    const char *fromcode);
  17.392 -extern DECLSPEC int SDLCALL SDL_iconv_close (SDL_iconv_t cd);
  17.393 -extern DECLSPEC size_t SDLCALL SDL_iconv (SDL_iconv_t cd, char **inbuf,
  17.394 -                                          size_t * inbytesleft, char **outbuf,
  17.395 -                                          size_t * outbytesleft);
  17.396 +extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
  17.397 +                                                   const char *fromcode);
  17.398 +extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
  17.399 +extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf,
  17.400 +                                         size_t * inbytesleft, char **outbuf,
  17.401 +                                         size_t * outbytesleft);
  17.402  #endif
  17.403  /* This function converts a string between encodings in one pass, returning a
  17.404     string that must be freed with SDL_free() or NULL on error.
  17.405  */
  17.406 -extern DECLSPEC char *SDLCALL SDL_iconv_string (const char *tocode,
  17.407 -                                                const char *fromcode,
  17.408 -                                                char *inbuf,
  17.409 -                                                size_t inbytesleft);
  17.410 +extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
  17.411 +                                               const char *fromcode,
  17.412 +                                               char *inbuf,
  17.413 +                                               size_t inbytesleft);
  17.414  #define SDL_iconv_utf8_ascii(S)		SDL_iconv_string("ASCII", "UTF-8", S, SDL_strlen(S)+1)
  17.415  #define SDL_iconv_utf8_latin1(S)	SDL_iconv_string("LATIN1", "UTF-8", S, SDL_strlen(S)+1)
  17.416  #define SDL_iconv_utf8_ucs2(S)		(Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)
    18.1 --- a/include/SDL_syswm.h	Mon May 29 03:53:21 2006 +0000
    18.2 +++ b/include/SDL_syswm.h	Mon May 29 04:04:35 2006 +0000
    18.3 @@ -228,8 +228,8 @@
    18.4   * if ( SDL_GetWindowWMInfo(&info) ) { ... }
    18.5   * \endcode
    18.6   */
    18.7 -extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo (SDL_WindowID windowID,
    18.8 -                                                      SDL_SysWMinfo * info);
    18.9 +extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_WindowID windowID,
   18.10 +                                                     SDL_SysWMinfo * info);
   18.11  
   18.12  
   18.13  /* Ends C function definitions when using C++ */
    19.1 --- a/include/SDL_thread.h	Mon May 29 03:53:21 2006 +0000
    19.2 +++ b/include/SDL_thread.h	Mon May 29 04:04:35 2006 +0000
    19.3 @@ -82,21 +82,21 @@
    19.4                                                               *threadID);
    19.5  typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
    19.6  #else
    19.7 -typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
    19.8 -                                                         unsigned (__stdcall *
    19.9 -                                                                   func) (void
   19.10 -                                                                          *),
   19.11 -                                                         void *arg, unsigned,
   19.12 -                                                         unsigned *threadID);
   19.13 +typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
   19.14 +                                                        unsigned (__stdcall *
   19.15 +                                                                  func) (void
   19.16 +                                                                         *),
   19.17 +                                                        void *arg, unsigned,
   19.18 +                                                        unsigned *threadID);
   19.19  typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
   19.20  #endif
   19.21  
   19.22 -extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread (int (*fn) (void *),
   19.23 -                                                      void *data,
   19.24 -                                                      pfnSDL_CurrentBeginThread
   19.25 -                                                      pfnBeginThread,
   19.26 -                                                      pfnSDL_CurrentEndThread
   19.27 -                                                      pfnEndThread);
   19.28 +extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (*fn) (void *),
   19.29 +                                                     void *data,
   19.30 +                                                     pfnSDL_CurrentBeginThread
   19.31 +                                                     pfnBeginThread,
   19.32 +                                                     pfnSDL_CurrentEndThread
   19.33 +                                                     pfnEndThread);
   19.34  
   19.35  #ifdef __OS2__
   19.36  #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthread, _endthread)
   19.37 @@ -107,26 +107,25 @@
   19.38  #endif
   19.39  #else
   19.40  extern DECLSPEC SDL_Thread *SDLCALL
   19.41 -SDL_CreateThread (int (SDLCALL * fn) (void *), void *data);
   19.42 +SDL_CreateThread(int (SDLCALL * fn) (void *), void *data);
   19.43  #endif
   19.44  
   19.45  /* Get the 32-bit thread identifier for the current thread */
   19.46 -extern DECLSPEC Uint32 SDLCALL SDL_ThreadID (void);
   19.47 +extern DECLSPEC Uint32 SDLCALL SDL_ThreadID(void);
   19.48  
   19.49  /* Get the 32-bit thread identifier for the specified thread,
   19.50     equivalent to SDL_ThreadID() if the specified thread is NULL.
   19.51   */
   19.52 -extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID (SDL_Thread * thread);
   19.53 +extern DECLSPEC Uint32 SDLCALL SDL_GetThreadID(SDL_Thread * thread);
   19.54  
   19.55  /* Wait for a thread to finish.
   19.56     The return code for the thread function is placed in the area
   19.57     pointed to by 'status', if 'status' is not NULL.
   19.58   */
   19.59 -extern DECLSPEC void SDLCALL SDL_WaitThread (SDL_Thread * thread,
   19.60 -                                             int *status);
   19.61 +extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
   19.62  
   19.63  /* Forcefully kill a thread without worrying about its state */
   19.64 -extern DECLSPEC void SDLCALL SDL_KillThread (SDL_Thread * thread);
   19.65 +extern DECLSPEC void SDLCALL SDL_KillThread(SDL_Thread * thread);
   19.66  
   19.67  
   19.68  /* Ends C function definitions when using C++ */
    20.1 --- a/include/SDL_timer.h	Mon May 29 03:53:21 2006 +0000
    20.2 +++ b/include/SDL_timer.h	Mon May 29 04:04:35 2006 +0000
    20.3 @@ -49,13 +49,13 @@
    20.4  /* Get the number of milliseconds since the SDL library initialization.
    20.5   * Note that this value wraps if the program runs for more than ~49 days.
    20.6   */
    20.7 -extern DECLSPEC Uint32 SDLCALL SDL_GetTicks (void);
    20.8 +extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
    20.9  
   20.10  /* Wait a specified number of milliseconds before returning */
   20.11 -extern DECLSPEC void SDLCALL SDL_Delay (Uint32 ms);
   20.12 +extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
   20.13  
   20.14  /* Function prototype for the timer callback function */
   20.15 -typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval);
   20.16 +typedef Uint32(SDLCALL * SDL_TimerCallback) (Uint32 interval);
   20.17  
   20.18  /* Set a callback to run after the specified number of milliseconds has
   20.19   * elapsed. The callback function is passed the current timer interval
   20.20 @@ -85,8 +85,8 @@
   20.21   *
   20.22   * This function returns 0 if successful, or -1 if there was an error.
   20.23   */
   20.24 -extern DECLSPEC int SDLCALL SDL_SetTimer (Uint32 interval,
   20.25 -                                          SDL_TimerCallback callback);
   20.26 +extern DECLSPEC int SDLCALL SDL_SetTimer(Uint32 interval,
   20.27 +                                         SDL_TimerCallback callback);
   20.28  
   20.29  /* New timer API, supports multiple timers
   20.30   * Written by Stephane Peter <megastep@lokigames.com>
   20.31 @@ -98,8 +98,7 @@
   20.32   * passed in, the periodic alarm continues, otherwise a new alarm is
   20.33   * scheduled.  If the callback returns 0, the periodic alarm is cancelled.
   20.34   */
   20.35 -typedef Uint32 (SDLCALL * SDL_NewTimerCallback) (Uint32 interval,
   20.36 -                                                 void *param);
   20.37 +typedef Uint32(SDLCALL * SDL_NewTimerCallback) (Uint32 interval, void *param);
   20.38  
   20.39  /* Definition of the timer ID type */
   20.40  typedef struct _SDL_TimerID *SDL_TimerID;
   20.41 @@ -107,14 +106,14 @@
   20.42  /* Add a new timer to the pool of timers already running.
   20.43     Returns a timer ID, or NULL when an error occurs.
   20.44   */
   20.45 -extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer (Uint32 interval,
   20.46 -                                                  SDL_NewTimerCallback
   20.47 -                                                  callback, void *param);
   20.48 +extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
   20.49 +                                                 SDL_NewTimerCallback
   20.50 +                                                 callback, void *param);
   20.51  
   20.52  /* Remove one of the multiple timers knowing its ID.
   20.53   * Returns a boolean value indicating success.
   20.54   */
   20.55 -extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer (SDL_TimerID t);
   20.56 +extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID t);
   20.57  
   20.58  /* Ends C function definitions when using C++ */
   20.59  #ifdef __cplusplus
    21.1 --- a/include/SDL_version.h	Mon May 29 03:53:21 2006 +0000
    21.2 +++ b/include/SDL_version.h	Mon May 29 04:04:35 2006 +0000
    21.3 @@ -129,7 +129,7 @@
    21.4   *
    21.5   * \sa SDL_VERSION
    21.6   */
    21.7 -extern DECLSPEC void SDLCALL SDL_GetVersion (SDL_version * ver);
    21.8 +extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
    21.9  
   21.10  /* Ends C function definitions when using C++ */
   21.11  #ifdef __cplusplus
    22.1 --- a/include/SDL_video.h	Mon May 29 03:53:21 2006 +0000
    22.2 +++ b/include/SDL_video.h	Mon May 29 04:04:35 2006 +0000
    22.3 @@ -285,7 +285,7 @@
    22.4   *
    22.5   * \sa SDL_GetVideoDriver()
    22.6   */
    22.7 -extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers (void);
    22.8 +extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
    22.9  
   22.10  /**
   22.11   * \fn const char *SDL_GetVideoDriver(int index)
   22.12 @@ -297,7 +297,7 @@
   22.13   *
   22.14   * \sa SDL_GetNumVideoDrivers()
   22.15   */
   22.16 -extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver (int index);
   22.17 +extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
   22.18  
   22.19  /**
   22.20   * \fn int SDL_VideoInit(const char *driver_name, Uint32 flags)
   22.21 @@ -315,8 +315,8 @@
   22.22   *
   22.23   * \sa SDL_VideoQuit()
   22.24   */
   22.25 -extern DECLSPEC int SDLCALL SDL_VideoInit (const char *driver_name,
   22.26 -                                           Uint32 flags);
   22.27 +extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name,
   22.28 +                                          Uint32 flags);
   22.29  
   22.30  /**
   22.31   * \fn void SDL_VideoQuit(void)
   22.32 @@ -327,7 +327,7 @@
   22.33   *
   22.34   * \sa SDL_VideoInit()
   22.35   */
   22.36 -extern DECLSPEC void SDLCALL SDL_VideoQuit (void);
   22.37 +extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
   22.38  
   22.39  /**
   22.40   * \fn const char *SDL_GetCurrentVideoDriver(void)
   22.41 @@ -340,7 +340,7 @@
   22.42   * \sa SDL_GetNumVideoDrivers()
   22.43   * \sa SDL_GetVideoDriver()
   22.44   */
   22.45 -extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver (void);
   22.46 +extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
   22.47  
   22.48  /**
   22.49   * \fn const SDL_VideoInfo *SDL_GetVideoInfo(void)
   22.50 @@ -350,7 +350,7 @@
   22.51   * \return A read-only pointer to information about the video hardware,
   22.52   *         or NULL if no video driver has been initialized.
   22.53   */
   22.54 -extern DECLSPEC const SDL_VideoInfo *SDLCALL SDL_GetVideoInfo (void);
   22.55 +extern DECLSPEC const SDL_VideoInfo *SDLCALL SDL_GetVideoInfo(void);
   22.56  
   22.57  /**
   22.58   * \fn int SDL_GetNumVideoDisplays(void)
   22.59 @@ -359,7 +359,7 @@
   22.60   *
   22.61   * \sa SDL_SelectVideoDisplay()
   22.62   */
   22.63 -extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays (void);
   22.64 +extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
   22.65  
   22.66  /**
   22.67   * \fn int SDL_SelectVideoDisplay(int index)
   22.68 @@ -370,7 +370,7 @@
   22.69   *
   22.70   * \sa SDL_GetNumVideoDisplays()
   22.71   */
   22.72 -extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay (int index);
   22.73 +extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay(int index);
   22.74  
   22.75  /**
   22.76   * \fn int SDL_GetNumDisplayModes(void)
   22.77 @@ -379,7 +379,7 @@
   22.78   *
   22.79   * \sa SDL_GetDisplayMode()
   22.80   */
   22.81 -extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes (void);
   22.82 +extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void);
   22.83  
   22.84  /**
   22.85   * \fn const SDL_DisplayMode *SDL_GetDisplayMode(int index)
   22.86 @@ -394,7 +394,7 @@
   22.87   *
   22.88   * \sa SDL_GetNumDisplayModes()
   22.89   */
   22.90 -extern DECLSPEC const SDL_DisplayMode *SDLCALL SDL_GetDisplayMode (int index);
   22.91 +extern DECLSPEC const SDL_DisplayMode *SDLCALL SDL_GetDisplayMode(int index);
   22.92  
   22.93  /**
   22.94   * \fn const SDL_DisplayMode *SDL_GetDesktopDisplayMode(void)
   22.95 @@ -402,7 +402,7 @@
   22.96   * \brief Retrieve information about the desktop display mode for the current display.
   22.97   */
   22.98  extern DECLSPEC const SDL_DisplayMode *SDLCALL
   22.99 -SDL_GetDesktopDisplayMode (void);
  22.100 +SDL_GetDesktopDisplayMode(void);
  22.101  
  22.102  /**
  22.103   * \fn const SDL_DisplayMode *SDL_GetCurrentDisplayMode(void)
  22.104 @@ -410,7 +410,7 @@
  22.105   * \brief Retrieve information about the current display mode.
  22.106   */
  22.107  extern DECLSPEC const SDL_DisplayMode *SDLCALL
  22.108 -SDL_GetCurrentDisplayMode (void);
  22.109 +SDL_GetCurrentDisplayMode(void);
  22.110  
  22.111  /**
  22.112   * \fn SDL_DisplayMode *SDL_GetClosestDisplayMode(const SDL_DisplayMode *mode, SDL_DisplayMode *closest)
  22.113 @@ -427,12 +427,11 @@
  22.114   * \sa SDL_GetNumDisplayModes()
  22.115   * \sa SDL_GetDisplayMode()
  22.116   */
  22.117 -extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode (const
  22.118 -                                                                    SDL_DisplayMode
  22.119 -                                                                    * mode,
  22.120 -                                                                    SDL_DisplayMode
  22.121 -                                                                    *
  22.122 -                                                                    closest);
  22.123 +extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(const
  22.124 +                                                                   SDL_DisplayMode
  22.125 +                                                                   * mode,
  22.126 +                                                                   SDL_DisplayMode
  22.127 +                                                                   * closest);
  22.128  
  22.129  /**
  22.130   * \fn int SDL_SetDisplayMode(const SDL_DisplayMode *mode)
  22.131 @@ -443,7 +442,7 @@
  22.132   *
  22.133   * \return 0 on success, or -1 if setting the display mode failed.
  22.134   */
  22.135 -extern DECLSPEC int SDLCALL SDL_SetDisplayMode (const SDL_DisplayMode * mode);
  22.136 +extern DECLSPEC int SDLCALL SDL_SetDisplayMode(const SDL_DisplayMode * mode);
  22.137  
  22.138  /**
  22.139   * \fn SDL_WindowID SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
  22.140 @@ -463,9 +462,9 @@
  22.141   *
  22.142   * \sa SDL_DestroyWindow()
  22.143   */
  22.144 -extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindow (const char *title,
  22.145 -                                                       int x, int y, int w,
  22.146 -                                                       int h, Uint32 flags);
  22.147 +extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindow(const char *title,
  22.148 +                                                      int x, int y, int w,
  22.149 +                                                      int h, Uint32 flags);
  22.150  
  22.151  /**
  22.152   * \fn SDL_WindowID SDL_CreateWindowFrom(void *data)
  22.153 @@ -480,14 +479,14 @@
  22.154   *
  22.155   * \sa SDL_DestroyWindow()
  22.156   */
  22.157 -extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindowFrom (void *data);
  22.158 +extern DECLSPEC SDL_WindowID SDLCALL SDL_CreateWindowFrom(void *data);
  22.159  
  22.160  /**
  22.161   * \fn Uint32 SDL_GetWindowFlags(SDL_WindowID windowID)
  22.162   *
  22.163   * \brief Get the window flags.
  22.164   */
  22.165 -extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags (SDL_WindowID windowID);
  22.166 +extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_WindowID windowID);
  22.167  
  22.168  /**
  22.169   * \fn void SDL_SetWindowTitle(SDL_WindowID windowID, const char *title)
  22.170 @@ -496,8 +495,8 @@
  22.171   *
  22.172   * \sa SDL_GetWindowTitle()
  22.173   */
  22.174 -extern DECLSPEC void SDLCALL SDL_SetWindowTitle (SDL_WindowID windowID,
  22.175 -                                                 const char *title);
  22.176 +extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_WindowID windowID,
  22.177 +                                                const char *title);
  22.178  
  22.179  /**
  22.180   * \fn const char *SDL_GetWindowTitle(SDL_WindowID windowID)
  22.181 @@ -506,8 +505,7 @@
  22.182   *
  22.183   * \sa SDL_SetWindowTitle()
  22.184   */
  22.185 -extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle (SDL_WindowID
  22.186 -                                                        windowID);
  22.187 +extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_WindowID windowID);
  22.188  
  22.189  /**
  22.190   * \fn void SDL_SetWindowIcon(SDL_Surface *icon)
  22.191 @@ -518,7 +516,7 @@
  22.192   *
  22.193   * FIXME: The icon needs to be set before the window is first shown.  Should some icon representation be part of the window creation data?
  22.194   */
  22.195 -extern DECLSPEC void SDLCALL SDL_SetWindowIcon (SDL_Surface * icon);
  22.196 +extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Surface * icon);
  22.197  
  22.198  /**
  22.199   * \fn void SDL_SetWindowData(SDL_WindowID windowID, void *userdata)
  22.200 @@ -527,8 +525,8 @@
  22.201   *
  22.202   * \sa SDL_GetWindowData()
  22.203   */
  22.204 -extern DECLSPEC void SDLCALL SDL_SetWindowData (SDL_WindowID windowID,
  22.205 -                                                void *userdata);
  22.206 +extern DECLSPEC void SDLCALL SDL_SetWindowData(SDL_WindowID windowID,
  22.207 +                                               void *userdata);
  22.208  
  22.209  /**
  22.210   * \fn void *SDL_GetWindowData(SDL_WindowID windowID)
  22.211 @@ -537,7 +535,7 @@
  22.212   *
  22.213   * \sa SDL_SetWindowData()
  22.214   */
  22.215 -extern DECLSPEC void *SDLCALL SDL_GetWindowData (SDL_WindowID windowID);
  22.216 +extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_WindowID windowID);
  22.217  
  22.218  /**
  22.219   * \fn void SDL_SetWindowPosition(SDL_WindowID windowID, int x, int y)
  22.220 @@ -546,8 +544,8 @@
  22.221   *
  22.222   * \sa SDL_GetWindowPosition()
  22.223   */
  22.224 -extern DECLSPEC void SDLCALL SDL_SetWindowPosition (SDL_WindowID windowID,
  22.225 -                                                    int x, int y);
  22.226 +extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_WindowID windowID,
  22.227 +                                                   int x, int y);
  22.228  
  22.229  /**
  22.230   * \fn void SDL_GetWindowPosition(SDL_WindowID windowID, int *x, int *y)
  22.231 @@ -556,8 +554,8 @@
  22.232   *
  22.233   * \sa SDL_SetWindowPosition()
  22.234   */
  22.235 -extern DECLSPEC void SDLCALL SDL_GetWindowPosition (SDL_WindowID windowID,
  22.236 -                                                    int *x, int *y);
  22.237 +extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_WindowID windowID,
  22.238 +                                                   int *x, int *y);
  22.239  
  22.240  /**
  22.241   * \fn void SDL_SetWindowSize(SDL_WindowID windowID, int w, int w)
  22.242 @@ -569,8 +567,8 @@
  22.243   *
  22.244   * \sa SDL_GetWindowSize()
  22.245   */
  22.246 -extern DECLSPEC void SDLCALL SDL_SetWindowSize (SDL_WindowID windowID, int w,
  22.247 -                                                int h);
  22.248 +extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_WindowID windowID, int w,
  22.249 +                                               int h);
  22.250  
  22.251  /**
  22.252   * \fn void SDL_GetWindowSize(SDL_WindowID windowID, int *w, int *w)
  22.253 @@ -579,8 +577,8 @@
  22.254   *
  22.255   * \sa SDL_SetWindowSize()
  22.256   */
  22.257 -extern DECLSPEC void SDLCALL SDL_GetWindowSize (SDL_WindowID windowID, int *w,
  22.258 -                                                int *h);
  22.259 +extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_WindowID windowID, int *w,
  22.260 +                                               int *h);
  22.261  
  22.262  /**
  22.263   * \fn void SDL_ShowWindow(SDL_WindowID windowID)
  22.264 @@ -589,7 +587,7 @@
  22.265   *
  22.266   * \sa SDL_HideWindow()
  22.267   */
  22.268 -extern DECLSPEC void SDLCALL SDL_ShowWindow (SDL_WindowID windowID);
  22.269 +extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_WindowID windowID);
  22.270  
  22.271  /**
  22.272   * \fn void SDL_HideWindow(SDL_WindowID windowID)
  22.273 @@ -598,14 +596,14 @@
  22.274   *
  22.275   * \sa SDL_ShowWindow()
  22.276   */
  22.277 -extern DECLSPEC void SDLCALL SDL_HideWindow (SDL_WindowID windowID);
  22.278 +extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_WindowID windowID);
  22.279  
  22.280  /**
  22.281   * \fn void SDL_RaiseWindow(SDL_WindowID windowID)
  22.282   *
  22.283   * \brief Raise the window so it's above other windows.
  22.284   */
  22.285 -extern DECLSPEC void SDLCALL SDL_RaiseWindow (SDL_WindowID windowID);
  22.286 +extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_WindowID windowID);
  22.287  
  22.288  /**
  22.289   * \fn void SDL_MaximizeWindow(SDL_WindowID windowID)
  22.290 @@ -614,7 +612,7 @@
  22.291   *
  22.292   * \sa SDL_RestoreWindow()
  22.293   */
  22.294 -extern DECLSPEC void SDLCALL SDL_MaximizeWindow (SDL_WindowID windowID);
  22.295 +extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_WindowID windowID);
  22.296  
  22.297  /**
  22.298   * \fn void SDL_MinimizeWindow(SDL_WindowID windowID)
  22.299 @@ -623,7 +621,7 @@
  22.300   *
  22.301   * \sa SDL_RestoreWindow()
  22.302   */
  22.303 -extern DECLSPEC void SDLCALL SDL_MinimizeWindow (SDL_WindowID windowID);
  22.304 +extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_WindowID windowID);
  22.305  
  22.306  /**
  22.307   * \fn void SDL_RestoreWindow(SDL_WindowID windowID)
  22.308 @@ -633,7 +631,7 @@
  22.309   * \sa SDL_MaximizeWindow()
  22.310   * \sa SDL_MinimizeWindow()
  22.311   */
  22.312 -extern DECLSPEC void SDLCALL SDL_RestoreWindow (SDL_WindowID windowID);
  22.313 +extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_WindowID windowID);
  22.314  
  22.315  /**
  22.316   * \fn void SDL_SetWindowGrab(SDL_WindowID windowID, int mode)
  22.317 @@ -645,8 +643,8 @@
  22.318   * \sa SDL_GrabMode
  22.319   * \sa SDL_GetWindowGrab()
  22.320   */
  22.321 -extern DECLSPEC void SDLCALL SDL_SetWindowGrab (SDL_WindowID windowID,
  22.322 -                                                int mode);
  22.323 +extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_WindowID windowID,
  22.324 +                                               int mode);
  22.325  
  22.326  /**
  22.327   * \fn int SDL_GetWindowGrab(SDL_WindowID windowID)
  22.328 @@ -658,24 +656,24 @@
  22.329   * \sa SDL_GrabMode
  22.330   * \sa SDL_SetWindowGrab()
  22.331   */
  22.332 -extern DECLSPEC int SDLCALL SDL_GetWindowGrab (SDL_WindowID windowID);
  22.333 +extern DECLSPEC int SDLCALL SDL_GetWindowGrab(SDL_WindowID windowID);
  22.334  
  22.335  /**
  22.336   * \fn void SDL_DestroyWindow(SDL_WindowID windowID)
  22.337   *
  22.338   * \brief Destroy a window.
  22.339   */
  22.340 -extern DECLSPEC void SDLCALL SDL_DestroyWindow (SDL_WindowID windowID);
  22.341 +extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_WindowID windowID);
  22.342  
  22.343  /**
  22.344   * \fn SDL_Surface *SDL_CreateWindowSurface (SDL_WindowID windowID, Uint32 format, Uint32 flags)
  22.345   *
  22.346   * \brief Create an SDL_Surface representing the drawing area of the window.
  22.347   */
  22.348 -extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateWindowSurface (SDL_WindowID
  22.349 -                                                              windowID,
  22.350 -                                                              Uint32 format,
  22.351 -                                                              Uint32 flags);
  22.352 +extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateWindowSurface(SDL_WindowID
  22.353 +                                                             windowID,
  22.354 +                                                             Uint32 format,
  22.355 +                                                             Uint32 flags);
  22.356  
  22.357  /*
  22.358   * Makes sure the given list of rectangles is updated on the given screen.
  22.359 @@ -698,7 +696,7 @@
  22.360   * setting the video mode for this function to perform hardware flipping.
  22.361   * This function returns 0 if successful, or -1 if there was an error.
  22.362   */
  22.363 -extern DECLSPEC int SDLCALL SDL_Flip (SDL_Surface * screen);
  22.364 +extern DECLSPEC int SDLCALL SDL_Flip(SDL_Surface * screen);
  22.365  
  22.366  /*
  22.367   * Set the gamma correction for each of the color channels.
  22.368 @@ -708,7 +706,7 @@
  22.369   * be emulated using gamma ramps, if available.  If successful, this
  22.370   * function returns 0, otherwise it returns -1.
  22.371   */
  22.372 -extern DECLSPEC int SDLCALL SDL_SetGamma (float red, float green, float blue);
  22.373 +extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
  22.374  
  22.375  /*
  22.376   * Set the gamma translation table for the red, green, and blue channels
  22.377 @@ -722,9 +720,9 @@
  22.378   * hardware does not support gamma translation, or otherwise fails,
  22.379   * this function will return -1.
  22.380   */
  22.381 -extern DECLSPEC int SDLCALL SDL_SetGammaRamp (const Uint16 * red,
  22.382 -                                              const Uint16 * green,
  22.383 -                                              const Uint16 * blue);
  22.384 +extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red,
  22.385 +                                             const Uint16 * green,
  22.386 +                                             const Uint16 * blue);
  22.387  
  22.388  /*
  22.389   * Retrieve the current values of the gamma translation tables.
  22.390 @@ -735,8 +733,8 @@
  22.391   * hardware does not support gamma translation, or otherwise fails,
  22.392   * this function will return -1.
  22.393   */
  22.394 -extern DECLSPEC int SDLCALL SDL_GetGammaRamp (Uint16 * red, Uint16 * green,
  22.395 -                                              Uint16 * blue);
  22.396 +extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
  22.397 +                                             Uint16 * blue);
  22.398  
  22.399  /*
  22.400   * Sets a portion of the colormap for the given 8-bit surface.  If 'surface'
  22.401 @@ -753,9 +751,9 @@
  22.402   * you desire, even if the window colormap has to be warped or run under
  22.403   * emulation.
  22.404   */
  22.405 -extern DECLSPEC int SDLCALL SDL_SetColors (SDL_Surface * surface,
  22.406 -                                           SDL_Color * colors, int firstcolor,
  22.407 -                                           int ncolors);
  22.408 +extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface * surface,
  22.409 +                                          SDL_Color * colors, int firstcolor,
  22.410 +                                          int ncolors);
  22.411  
  22.412  /*
  22.413   * Maps an RGB triple to an opaque pixel value for a given pixel format
  22.414 @@ -766,22 +764,22 @@
  22.415  /*
  22.416   * Maps an RGBA quadruple to a pixel value for a given pixel format
  22.417   */
  22.418 -extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA (SDL_PixelFormat * format,
  22.419 -                                            Uint8 r, Uint8 g, Uint8 b,
  22.420 -                                            Uint8 a);
  22.421 +extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(SDL_PixelFormat * format,
  22.422 +                                           Uint8 r, Uint8 g, Uint8 b,
  22.423 +                                           Uint8 a);
  22.424  
  22.425  /*
  22.426   * Maps a pixel value into the RGB components for a given pixel format
  22.427   */
  22.428 -extern DECLSPEC void SDLCALL SDL_GetRGB (Uint32 pixel, SDL_PixelFormat * fmt,
  22.429 -                                         Uint8 * r, Uint8 * g, Uint8 * b);
  22.430 +extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel, SDL_PixelFormat * fmt,
  22.431 +                                        Uint8 * r, Uint8 * g, Uint8 * b);
  22.432  
  22.433  /*
  22.434   * Maps a pixel value into the RGBA components for a given pixel format
  22.435   */
  22.436 -extern DECLSPEC void SDLCALL SDL_GetRGBA (Uint32 pixel, SDL_PixelFormat * fmt,
  22.437 -                                          Uint8 * r, Uint8 * g, Uint8 * b,
  22.438 -                                          Uint8 * a);
  22.439 +extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat * fmt,
  22.440 +                                         Uint8 * r, Uint8 * g, Uint8 * b,
  22.441 +                                         Uint8 * a);
  22.442  
  22.443  /*
  22.444   * Allocate and free an RGB surface (must be called after SDL_SetVideoMode)
  22.445 @@ -821,16 +819,16 @@
  22.446  extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
  22.447      (Uint32 flags, int width, int height, int depth,
  22.448       Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
  22.449 -extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom (void *pixels,
  22.450 -                                                               int width,
  22.451 -                                                               int height,
  22.452 -                                                               int depth,
  22.453 -                                                               int pitch,
  22.454 -                                                               Uint32 Rmask,
  22.455 -                                                               Uint32 Gmask,
  22.456 -                                                               Uint32 Bmask,
  22.457 -                                                               Uint32 Amask);
  22.458 -extern DECLSPEC void SDLCALL SDL_FreeSurface (SDL_Surface * surface);
  22.459 +extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
  22.460 +                                                              int width,
  22.461 +                                                              int height,
  22.462 +                                                              int depth,
  22.463 +                                                              int pitch,
  22.464 +                                                              Uint32 Rmask,
  22.465 +                                                              Uint32 Gmask,
  22.466 +                                                              Uint32 Bmask,
  22.467 +                                                              Uint32 Amask);
  22.468 +extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
  22.469  
  22.470  /*
  22.471   * SDL_LockSurface() sets up a surface for directly accessing the pixels.
  22.472 @@ -850,8 +848,8 @@
  22.473   *
  22.474   * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
  22.475   */
  22.476 -extern DECLSPEC int SDLCALL SDL_LockSurface (SDL_Surface * surface);
  22.477 -extern DECLSPEC void SDLCALL SDL_UnlockSurface (SDL_Surface * surface);
  22.478 +extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
  22.479 +extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
  22.480  
  22.481  /*
  22.482   * Load a surface from a seekable SDL data source (memory or file.)
  22.483 @@ -859,8 +857,8 @@
  22.484   * Returns the new surface, or NULL if there was an error.
  22.485   * The new surface should be freed with SDL_FreeSurface().
  22.486   */
  22.487 -extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW (SDL_RWops * src,
  22.488 -                                                     int freesrc);
  22.489 +extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
  22.490 +                                                    int freesrc);
  22.491  
  22.492  /* Convenience macro -- load a surface from a file */
  22.493  #define SDL_LoadBMP(file)	SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
  22.494 @@ -904,8 +902,8 @@
  22.495   *
  22.496   * The 'alpha' parameter is ignored for surfaces that have an alpha channel.
  22.497   */
  22.498 -extern DECLSPEC int SDLCALL SDL_SetAlpha (SDL_Surface * surface, Uint32 flag,
  22.499 -                                          Uint8 alpha);
  22.500 +extern DECLSPEC int SDLCALL SDL_SetAlpha(SDL_Surface * surface, Uint32 flag,
  22.501 +                                         Uint8 alpha);
  22.502  
  22.503  /*
  22.504   * Sets the clipping rectangle for the destination surface in a blit.
  22.505 @@ -919,16 +917,16 @@
  22.506   * Note that blits are automatically clipped to the edges of the source
  22.507   * and destination surfaces.
  22.508   */
  22.509 -extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect (SDL_Surface * surface,
  22.510 -                                                  const SDL_Rect * rect);
  22.511 +extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
  22.512 +                                                 const SDL_Rect * rect);
  22.513  
  22.514  /*
  22.515   * Gets the clipping rectangle for the destination surface in a blit.
  22.516   * 'rect' must be a pointer to a valid rectangle which will be filled
  22.517   * with the correct values.
  22.518   */
  22.519 -extern DECLSPEC void SDLCALL SDL_GetClipRect (SDL_Surface * surface,
  22.520 -                                              SDL_Rect * rect);
  22.521 +extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
  22.522 +                                             SDL_Rect * rect);
  22.523  
  22.524  /*
  22.525   * Creates a new surface of the specified format, and then copies and maps 
  22.526 @@ -1052,8 +1050,7 @@
  22.527   *
  22.528   * If the conversion fails or runs out of memory, it returns NULL
  22.529   */
  22.530 -extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormat (SDL_Surface *
  22.531 -                                                        surface);
  22.532 +extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormat(SDL_Surface * surface);
  22.533  
  22.534  /* 
  22.535   * This function takes a surface and copies it to a new surface of the
  22.536 @@ -1067,8 +1064,8 @@
  22.537   *
  22.538   * If the conversion fails or runs out of memory, it returns NULL
  22.539   */
  22.540 -extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormatAlpha (SDL_Surface *
  22.541 -                                                             surface);
  22.542 +extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormatAlpha(SDL_Surface *
  22.543 +                                                            surface);
  22.544  
  22.545  
  22.546  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  22.547 @@ -1080,15 +1077,15 @@
  22.548     the contents of the display surface underneath the area where the overlay
  22.549     is shown is undefined - it may be overwritten with the converted YUV data.
  22.550  */
  22.551 -extern DECLSPEC SDL_Overlay *SDLCALL SDL_CreateYUVOverlay (int width,
  22.552 -                                                           int height,
  22.553 -                                                           Uint32 format,
  22.554 -                                                           SDL_Surface *
  22.555 -                                                           display);
  22.556 +extern DECLSPEC SDL_Overlay *SDLCALL SDL_CreateYUVOverlay(int width,
  22.557 +                                                          int height,
  22.558 +                                                          Uint32 format,
  22.559 +                                                          SDL_Surface *
  22.560 +                                                          display);
  22.561  
  22.562  /* Lock an overlay for direct access, and unlock it when you are done */
  22.563 -extern DECLSPEC int SDLCALL SDL_LockYUVOverlay (SDL_Overlay * overlay);
  22.564 -extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay (SDL_Overlay * overlay);
  22.565 +extern DECLSPEC int SDLCALL SDL_LockYUVOverlay(SDL_Overlay * overlay);
  22.566 +extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay * overlay);
  22.567  
  22.568  /* Blit a video overlay to the display surface.
  22.569     The contents of the video surface underneath the blit destination are
  22.570 @@ -1096,11 +1093,11 @@
  22.571     The width and height of the destination rectangle may be different from
  22.572     that of the overlay, but currently only 2x scaling is supported.
  22.573  */
  22.574 -extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay (SDL_Overlay * overlay,
  22.575 -                                                   SDL_Rect * dstrect);
  22.576 +extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
  22.577 +                                                  SDL_Rect * dstrect);
  22.578  
  22.579  /* Free a video overlay */
  22.580 -extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay (SDL_Overlay * overlay);
  22.581 +extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay);
  22.582  
  22.583  
  22.584  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  22.585 @@ -1113,17 +1110,17 @@
  22.586   * If you do this, you need to retrieve all of the GL functions used in
  22.587   * your program from the dynamic library using SDL_GL_GetProcAddress().
  22.588   */
  22.589 -extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary (const char *path);
  22.590 +extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
  22.591  
  22.592  /*
  22.593   * Get the address of a GL function
  22.594   */
  22.595 -extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress (const char *proc);
  22.596 +extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
  22.597  
  22.598  /*
  22.599   * Set an attribute of the OpenGL subsystem before window creation.
  22.600   */
  22.601 -extern DECLSPEC int SDLCALL SDL_GL_SetAttribute (SDL_GLattr attr, int value);
  22.602 +extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
  22.603  
  22.604  /*
  22.605   * Get an attribute of the OpenGL subsystem from the windowing
  22.606 @@ -1134,18 +1131,18 @@
  22.607   * Developers should track the values they pass into SDL_GL_SetAttribute
  22.608   * themselves if they want to retrieve these values.
  22.609   */
  22.610 -extern DECLSPEC int SDLCALL SDL_GL_GetAttribute (SDL_GLattr attr, int *value);
  22.611 +extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
  22.612  
  22.613  /*
  22.614   * Swap the OpenGL buffers, if double-buffering is supported.
  22.615   */
  22.616 -extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers (void);
  22.617 +extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
  22.618  
  22.619  /* Not in public API at the moment - do not use! */
  22.620 -extern DECLSPEC int SDLCALL SDL_SoftStretch (SDL_Surface * src,
  22.621 -                                             SDL_Rect * srcrect,
  22.622 -                                             SDL_Surface * dst,
  22.623 -                                             SDL_Rect * dstrect);
  22.624 +extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
  22.625 +                                            SDL_Rect * srcrect,
  22.626 +                                            SDL_Surface * dst,
  22.627 +                                            SDL_Rect * dstrect);
  22.628  
  22.629  /* Ends C function definitions when using C++ */
  22.630  #ifdef __cplusplus
    23.1 --- a/src/SDL.c	Mon May 29 03:53:21 2006 +0000
    23.2 +++ b/src/SDL.c	Mon May 29 04:04:35 2006 +0000
    23.3 @@ -35,17 +35,17 @@
    23.4  
    23.5  /* Initialization/Cleanup routines */
    23.6  #if !SDL_JOYSTICK_DISABLED
    23.7 -extern int SDL_JoystickInit (void);
    23.8 -extern void SDL_JoystickQuit (void);
    23.9 +extern int SDL_JoystickInit(void);
   23.10 +extern void SDL_JoystickQuit(void);
   23.11  #endif
   23.12  #if !SDL_CDROM_DISABLED
   23.13 -extern int SDL_CDROMInit (void);
   23.14 -extern void SDL_CDROMQuit (void);
   23.15 +extern int SDL_CDROMInit(void);
   23.16 +extern void SDL_CDROMQuit(void);
   23.17  #endif
   23.18  #if !SDL_TIMERS_DISABLED
   23.19 -extern void SDL_StartTicks (void);
   23.20 -extern int SDL_TimerInit (void);
   23.21 -extern void SDL_TimerQuit (void);
   23.22 +extern void SDL_StartTicks(void);
   23.23 +extern int SDL_TimerInit(void);
   23.24 +extern void SDL_TimerQuit(void);
   23.25  #endif
   23.26  
   23.27  /* The initialized subsystems */
   23.28 @@ -57,20 +57,20 @@
   23.29  #endif
   23.30  
   23.31  int
   23.32 -SDL_InitSubSystem (Uint32 flags)
   23.33 +SDL_InitSubSystem(Uint32 flags)
   23.34  {
   23.35  #if !SDL_VIDEO_DISABLED
   23.36      /* Initialize the video/event subsystem */
   23.37      if ((flags & SDL_INIT_VIDEO) && !(SDL_initialized & SDL_INIT_VIDEO)) {
   23.38 -        if (SDL_VideoInit (SDL_getenv ("SDL_VIDEODRIVER"),
   23.39 -                           (flags & SDL_INIT_EVENTTHREAD)) < 0) {
   23.40 +        if (SDL_VideoInit(SDL_getenv("SDL_VIDEODRIVER"),
   23.41 +                          (flags & SDL_INIT_EVENTTHREAD)) < 0) {
   23.42              return (-1);
   23.43          }
   23.44          SDL_initialized |= SDL_INIT_VIDEO;
   23.45      }
   23.46  #else
   23.47      if (flags & SDL_INIT_VIDEO) {
   23.48 -        SDL_SetError ("SDL not built with video support");
   23.49 +        SDL_SetError("SDL not built with video support");
   23.50          return (-1);
   23.51      }
   23.52  #endif
   23.53 @@ -78,14 +78,14 @@
   23.54  #if !SDL_AUDIO_DISABLED
   23.55      /* Initialize the audio subsystem */
   23.56      if ((flags & SDL_INIT_AUDIO) && !(SDL_initialized & SDL_INIT_AUDIO)) {
   23.57 -        if (SDL_AudioInit (SDL_getenv ("SDL_AUDIODRIVER")) < 0) {
   23.58 +        if (SDL_AudioInit(SDL_getenv("SDL_AUDIODRIVER")) < 0) {
   23.59              return (-1);
   23.60          }
   23.61          SDL_initialized |= SDL_INIT_AUDIO;
   23.62      }
   23.63  #else
   23.64      if (flags & SDL_INIT_AUDIO) {
   23.65 -        SDL_SetError ("SDL not built with audio support");
   23.66 +        SDL_SetError("SDL not built with audio support");
   23.67          return (-1);
   23.68      }
   23.69  #endif
   23.70 @@ -93,18 +93,18 @@
   23.71  #if !SDL_TIMERS_DISABLED
   23.72      /* Initialize the timer subsystem */
   23.73      if (!ticks_started) {
   23.74 -        SDL_StartTicks ();
   23.75 +        SDL_StartTicks();
   23.76          ticks_started = 1;
   23.77      }
   23.78      if ((flags & SDL_INIT_TIMER) && !(SDL_initialized & SDL_INIT_TIMER)) {
   23.79 -        if (SDL_TimerInit () < 0) {
   23.80 +        if (SDL_TimerInit() < 0) {
   23.81              return (-1);
   23.82          }
   23.83          SDL_initialized |= SDL_INIT_TIMER;
   23.84      }
   23.85  #else
   23.86      if (flags & SDL_INIT_TIMER) {
   23.87 -        SDL_SetError ("SDL not built with timer support");
   23.88 +        SDL_SetError("SDL not built with timer support");
   23.89          return (-1);
   23.90      }
   23.91  #endif
   23.92 @@ -112,14 +112,14 @@
   23.93  #if !SDL_JOYSTICK_DISABLED
   23.94      /* Initialize the joystick subsystem */
   23.95      if ((flags & SDL_INIT_JOYSTICK) && !(SDL_initialized & SDL_INIT_JOYSTICK)) {
   23.96 -        if (SDL_JoystickInit () < 0) {
   23.97 +        if (SDL_JoystickInit() < 0) {
   23.98              return (-1);
   23.99          }
  23.100          SDL_initialized |= SDL_INIT_JOYSTICK;
  23.101      }
  23.102  #else
  23.103      if (flags & SDL_INIT_JOYSTICK) {
  23.104 -        SDL_SetError ("SDL not built with joystick support");
  23.105 +        SDL_SetError("SDL not built with joystick support");
  23.106          return (-1);
  23.107      }
  23.108  #endif
  23.109 @@ -127,14 +127,14 @@
  23.110  #if !SDL_CDROM_DISABLED
  23.111      /* Initialize the CD-ROM subsystem */
  23.112      if ((flags & SDL_INIT_CDROM) && !(SDL_initialized & SDL_INIT_CDROM)) {
  23.113 -        if (SDL_CDROMInit () < 0) {
  23.114 +        if (SDL_CDROMInit() < 0) {
  23.115              return (-1);
  23.116          }
  23.117          SDL_initialized |= SDL_INIT_CDROM;
  23.118      }
  23.119  #else
  23.120      if (flags & SDL_INIT_CDROM) {
  23.121 -        SDL_SetError ("SDL not built with cdrom support");
  23.122 +        SDL_SetError("SDL not built with cdrom support");
  23.123          return (-1);
  23.124      }
  23.125  #endif
  23.126 @@ -142,67 +142,67 @@
  23.127  }
  23.128  
  23.129  int
  23.130 -SDL_Init (Uint32 flags)
  23.131 +SDL_Init(Uint32 flags)
  23.132  {
  23.133  #if !SDL_THREADS_DISABLED && SDL_THREAD_PTH
  23.134 -    if (!pth_init ()) {
  23.135 +    if (!pth_init()) {
  23.136          return -1;
  23.137      }
  23.138  #endif
  23.139  
  23.140      /* Clear the error message */
  23.141 -    SDL_ClearError ();
  23.142 +    SDL_ClearError();
  23.143  
  23.144      /* Initialize the desired subsystems */
  23.145 -    if (SDL_InitSubSystem (flags) < 0) {
  23.146 +    if (SDL_InitSubSystem(flags) < 0) {
  23.147          return (-1);
  23.148      }
  23.149  
  23.150      /* Everything is initialized */
  23.151      if (!(flags & SDL_INIT_NOPARACHUTE)) {
  23.152 -        SDL_InstallParachute ();
  23.153 +        SDL_InstallParachute();
  23.154      }
  23.155      return (0);
  23.156  }
  23.157  
  23.158  void
  23.159 -SDL_QuitSubSystem (Uint32 flags)
  23.160 +SDL_QuitSubSystem(Uint32 flags)
  23.161  {
  23.162      /* Shut down requested initialized subsystems */
  23.163  #if !SDL_CDROM_DISABLED
  23.164      if ((flags & SDL_initialized & SDL_INIT_CDROM)) {
  23.165 -        SDL_CDROMQuit ();
  23.166 +        SDL_CDROMQuit();
  23.167          SDL_initialized &= ~SDL_INIT_CDROM;
  23.168      }
  23.169  #endif
  23.170  #if !SDL_JOYSTICK_DISABLED
  23.171      if ((flags & SDL_initialized & SDL_INIT_JOYSTICK)) {
  23.172 -        SDL_JoystickQuit ();
  23.173 +        SDL_JoystickQuit();
  23.174          SDL_initialized &= ~SDL_INIT_JOYSTICK;
  23.175      }
  23.176  #endif
  23.177  #if !SDL_TIMERS_DISABLED
  23.178      if ((flags & SDL_initialized & SDL_INIT_TIMER)) {
  23.179 -        SDL_TimerQuit ();
  23.180 +        SDL_TimerQuit();
  23.181          SDL_initialized &= ~SDL_INIT_TIMER;
  23.182      }
  23.183  #endif
  23.184  #if !SDL_AUDIO_DISABLED
  23.185      if ((flags & SDL_initialized & SDL_INIT_AUDIO)) {
  23.186 -        SDL_AudioQuit ();
  23.187 +        SDL_AudioQuit();
  23.188          SDL_initialized &= ~SDL_INIT_AUDIO;
  23.189      }
  23.190  #endif
  23.191  #if !SDL_VIDEO_DISABLED
  23.192      if ((flags & SDL_initialized & SDL_INIT_VIDEO)) {
  23.193 -        SDL_VideoQuit ();
  23.194 +        SDL_VideoQuit();
  23.195          SDL_initialized &= ~SDL_INIT_VIDEO;
  23.196      }
  23.197  #endif
  23.198  }
  23.199  
  23.200  Uint32
  23.201 -SDL_WasInit (Uint32 flags)
  23.202 +SDL_WasInit(Uint32 flags)
  23.203  {
  23.204      if (!flags) {
  23.205          flags = SDL_INIT_EVERYTHING;
  23.206 @@ -211,50 +211,50 @@
  23.207  }
  23.208  
  23.209  void
  23.210 -SDL_Quit (void)
  23.211 +SDL_Quit(void)
  23.212  {
  23.213      /* Quit all subsystems */
  23.214  #ifdef DEBUG_BUILD
  23.215 -    printf ("[SDL_Quit] : Enter! Calling QuitSubSystem()\n");
  23.216 -    fflush (stdout);
  23.217 +    printf("[SDL_Quit] : Enter! Calling QuitSubSystem()\n");
  23.218 +    fflush(stdout);
  23.219  #endif
  23.220 -    SDL_QuitSubSystem (SDL_INIT_EVERYTHING);
  23.221 +    SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
  23.222  
  23.223  #ifdef CHECK_LEAKS
  23.224  #ifdef DEBUG_BUILD
  23.225 -    printf ("[SDL_Quit] : CHECK_LEAKS\n");
  23.226 -    fflush (stdout);
  23.227 +    printf("[SDL_Quit] : CHECK_LEAKS\n");
  23.228 +    fflush(stdout);
  23.229  #endif
  23.230  
  23.231      /* Print the number of surfaces not freed */
  23.232      if (surfaces_allocated != 0) {
  23.233 -        fprintf (stderr, "SDL Warning: %d SDL surfaces extant\n",
  23.234 -                 surfaces_allocated);
  23.235 +        fprintf(stderr, "SDL Warning: %d SDL surfaces extant\n",
  23.236 +                surfaces_allocated);
  23.237      }
  23.238  #endif
  23.239  #ifdef DEBUG_BUILD
  23.240 -    printf ("[SDL_Quit] : SDL_UninstallParachute()\n");
  23.241 -    fflush (stdout);
  23.242 +    printf("[SDL_Quit] : SDL_UninstallParachute()\n");
  23.243 +    fflush(stdout);
  23.244  #endif
  23.245  
  23.246      /* Uninstall any parachute signal handlers */
  23.247 -    SDL_UninstallParachute ();
  23.248 +    SDL_UninstallParachute();
  23.249  
  23.250  #if !SDL_THREADS_DISABLED && SDL_THREAD_PTH
  23.251 -    pth_kill ();
  23.252 +    pth_kill();
  23.253  #endif
  23.254  #ifdef DEBUG_BUILD
  23.255 -    printf ("[SDL_Quit] : Returning!\n");
  23.256 -    fflush (stdout);
  23.257 +    printf("[SDL_Quit] : Returning!\n");
  23.258 +    fflush(stdout);
  23.259  #endif
  23.260  
  23.261  }
  23.262  
  23.263  /* Get the library version number */
  23.264  void
  23.265 -SDL_GetVersion (SDL_version * ver)
  23.266 +SDL_GetVersion(SDL_version * ver)
  23.267  {
  23.268 -    SDL_VERSION (ver);
  23.269 +    SDL_VERSION(ver);
  23.270  }
  23.271  
  23.272  #if defined(__OS2__)
  23.273 @@ -267,9 +267,9 @@
  23.274  
  23.275  /* Exception handler to prevent the Audio thread hanging, making a zombie process! */
  23.276  ULONG _System
  23.277 -SDL_Main_ExceptionHandler (PEXCEPTIONREPORTRECORD pERepRec,
  23.278 -                           PEXCEPTIONREGISTRATIONRECORD pERegRec,
  23.279 -                           PCONTEXTRECORD pCtxRec, PVOID p)
  23.280 +SDL_Main_ExceptionHandler(PEXCEPTIONREPORTRECORD pERepRec,
  23.281 +                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
  23.282 +                          PCONTEXTRECORD pCtxRec, PVOID p)
  23.283  {
  23.284      if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
  23.285          return XCPT_CONTINUE_SEARCH;
  23.286 @@ -288,7 +288,7 @@
  23.287              printf
  23.288                  ("[SDL_Main_ExceptionHandler] : Calling SDL_CloseAudio()!\n");
  23.289  #endif
  23.290 -            SDL_CloseAudio ();
  23.291 +            SDL_CloseAudio();
  23.292          }
  23.293      }
  23.294      return (XCPT_CONTINUE_SEARCH);
  23.295 @@ -300,26 +300,26 @@
  23.296  
  23.297  /* The main DLL entry for DLL Initialization and Uninitialization: */
  23.298  unsigned _System
  23.299 -LibMain (unsigned hmod, unsigned termination)
  23.300 +LibMain(unsigned hmod, unsigned termination)
  23.301  {
  23.302      if (termination) {
  23.303  #ifdef DEBUG_BUILD
  23.304  /*    printf("[SDL DLL Unintialization] : Removing exception handler\n"); */
  23.305  #endif
  23.306 -        DosUnsetExceptionHandler (&SDL_Main_xcpthand);
  23.307 +        DosUnsetExceptionHandler(&SDL_Main_xcpthand);
  23.308          return 1;
  23.309      } else {
  23.310  #ifdef DEBUG_BUILD
  23.311          /* Make stdout and stderr unbuffered! */
  23.312 -        setbuf (stdout, NULL);
  23.313 -        setbuf (stderr, NULL);
  23.314 +        setbuf(stdout, NULL);
  23.315 +        setbuf(stderr, NULL);
  23.316  #endif
  23.317          /* Fire up exception handler */
  23.318  #ifdef DEBUG_BUILD
  23.319  /*    printf("[SDL DLL Initialization] : Setting exception handler\n"); */
  23.320  #endif
  23.321          /* Set exception handler */
  23.322 -        DosSetExceptionHandler (&SDL_Main_xcpthand);
  23.323 +        DosSetExceptionHandler(&SDL_Main_xcpthand);
  23.324  
  23.325          return 1;
  23.326      }
  23.327 @@ -334,8 +334,8 @@
  23.328  #include <windows.h>
  23.329  
  23.330  BOOL APIENTRY
  23.331 -_DllMainCRTStartup (HANDLE hModule,
  23.332 -                    DWORD ul_reason_for_call, LPVOID lpReserved)
  23.333 +_DllMainCRTStartup(HANDLE hModule,
  23.334 +                   DWORD ul_reason_for_call, LPVOID lpReserved)
  23.335  {
  23.336      switch (ul_reason_for_call) {
  23.337      case DLL_PROCESS_ATTACH:
    24.1 --- a/src/SDL_compat.c	Mon May 29 03:53:21 2006 +0000
    24.2 +++ b/src/SDL_compat.c	Mon May 29 04:04:35 2006 +0000
    24.3 @@ -32,48 +32,48 @@
    24.4  static char *wm_title;
    24.5  
    24.6  char *
    24.7 -SDL_AudioDriverName (char *namebuf, int maxlen)
    24.8 +SDL_AudioDriverName(char *namebuf, int maxlen)
    24.9  {
   24.10 -    const char *name = SDL_GetCurrentAudioDriver ();
   24.11 +    const char *name = SDL_GetCurrentAudioDriver();
   24.12      if (name) {
   24.13 -        SDL_strlcpy (namebuf, name, maxlen);
   24.14 +        SDL_strlcpy(namebuf, name, maxlen);
   24.15          return namebuf;
   24.16      }
   24.17      return NULL;
   24.18  }
   24.19  
   24.20  char *
   24.21 -SDL_VideoDriverName (char *namebuf, int maxlen)
   24.22 +SDL_VideoDriverName(char *namebuf, int maxlen)
   24.23  {
   24.24 -    const char *name = SDL_GetCurrentVideoDriver ();
   24.25 +    const char *name = SDL_GetCurrentVideoDriver();
   24.26      if (name) {
   24.27 -        SDL_strlcpy (namebuf, name, maxlen);
   24.28 +        SDL_strlcpy(namebuf, name, maxlen);
   24.29          return namebuf;
   24.30      }
   24.31      return NULL;
   24.32  }
   24.33  
   24.34  int
   24.35 -SDL_VideoModeOK (int width, int height, int bpp, Uint32 flags)
   24.36 +SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags)
   24.37  {
   24.38      int i, actual_bpp = 0;
   24.39  
   24.40 -    if (!SDL_GetVideoDevice ()) {
   24.41 +    if (!SDL_GetVideoDevice()) {
   24.42          return 0;
   24.43      }
   24.44  
   24.45      if (!(flags & SDL_FULLSCREEN)) {
   24.46 -        return SDL_BITSPERPIXEL (SDL_GetDesktopDisplayMode ()->format);
   24.47 +        return SDL_BITSPERPIXEL(SDL_GetDesktopDisplayMode()->format);
   24.48      }
   24.49  
   24.50 -    for (i = 0; i < SDL_GetNumDisplayModes (); ++i) {
   24.51 -        const SDL_DisplayMode *mode = SDL_GetDisplayMode (i);
   24.52 +    for (i = 0; i < SDL_GetNumDisplayModes(); ++i) {
   24.53 +        const SDL_DisplayMode *mode = SDL_GetDisplayMode(i);
   24.54          if (!mode->w || !mode->h || (width == mode->w && height == mode->h)) {
   24.55              if (!mode->format) {
   24.56                  return bpp;
   24.57              }
   24.58 -            if (SDL_BITSPERPIXEL (mode->format) >= bpp) {
   24.59 -                actual_bpp = SDL_BITSPERPIXEL (mode->format);
   24.60 +            if (SDL_BITSPERPIXEL(mode->format) >= bpp) {
   24.61 +                actual_bpp = SDL_BITSPERPIXEL(mode->format);
   24.62              }
   24.63          }
   24.64      }
   24.65 @@ -81,12 +81,12 @@
   24.66  }
   24.67  
   24.68  SDL_Rect **
   24.69 -SDL_ListModes (SDL_PixelFormat * format, Uint32 flags)
   24.70 +SDL_ListModes(SDL_PixelFormat * format, Uint32 flags)
   24.71  {
   24.72      int i, nmodes;
   24.73      SDL_Rect **modes;
   24.74  
   24.75 -    if (!SDL_GetVideoDevice ()) {
   24.76 +    if (!SDL_GetVideoDevice()) {
   24.77          return NULL;
   24.78      }
   24.79  
   24.80 @@ -96,12 +96,12 @@
   24.81  
   24.82      /* Memory leak, but this is a compatibility function, who cares? */
   24.83      nmodes = 0;
   24.84 -    for (i = 0; i < SDL_GetNumDisplayModes (); ++i) {
   24.85 -        const SDL_DisplayMode *mode = SDL_GetDisplayMode (i);
   24.86 +    for (i = 0; i < SDL_GetNumDisplayModes(); ++i) {
   24.87 +        const SDL_DisplayMode *mode = SDL_GetDisplayMode(i);
   24.88          if (!mode->w || !mode->h) {
   24.89              return (SDL_Rect **) (-1);
   24.90          }
   24.91 -        if (SDL_BITSPERPIXEL (mode->format) != format->BitsPerPixel) {
   24.92 +        if (SDL_BITSPERPIXEL(mode->format) != format->BitsPerPixel) {
   24.93              continue;
   24.94          }
   24.95          if (nmodes > 0 && modes[nmodes - 1]->w == mode->w
   24.96 @@ -109,11 +109,11 @@
   24.97              continue;
   24.98          }
   24.99  
  24.100 -        modes = SDL_realloc (modes, (nmodes + 2) * sizeof (*modes));
  24.101 +        modes = SDL_realloc(modes, (nmodes + 2) * sizeof(*modes));
  24.102          if (!modes) {
  24.103              return NULL;
  24.104          }
  24.105 -        modes[nmodes] = (SDL_Rect *) SDL_malloc (sizeof (SDL_Rect));
  24.106 +        modes[nmodes] = (SDL_Rect *) SDL_malloc(sizeof(SDL_Rect));
  24.107          if (!modes[nmodes]) {
  24.108              return NULL;
  24.109          }
  24.110 @@ -130,7 +130,7 @@
  24.111  }
  24.112  
  24.113  SDL_Surface *
  24.114 -SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
  24.115 +SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
  24.116  {
  24.117      SDL_DisplayMode mode;
  24.118      int i;
  24.119 @@ -138,14 +138,14 @@
  24.120      Uint32 desktop_format;
  24.121      Uint32 desired_format;
  24.122  
  24.123 -    if (!SDL_GetVideoDevice ()) {
  24.124 -        if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) {
  24.125 +    if (!SDL_GetVideoDevice()) {
  24.126 +        if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0) {
  24.127              return NULL;
  24.128          }
  24.129      }
  24.130  
  24.131      /* Destroy existing window */
  24.132 -    SDL_DestroyWindow (window);
  24.133 +    SDL_DestroyWindow(window);
  24.134  
  24.135      /* Create a new window */
  24.136      window_flags = SDL_WINDOW_SHOWN;
  24.137 @@ -161,13 +161,13 @@
  24.138      if (flags & SDL_NOFRAME) {
  24.139          window_flags |= SDL_WINDOW_BORDERLESS;
  24.140      }
  24.141 -    window = SDL_CreateWindow (wm_title, 0, 0, width, height, window_flags);
  24.142 +    window = SDL_CreateWindow(wm_title, 0, 0, width, height, window_flags);
  24.143      if (!window) {
  24.144          return NULL;
  24.145      }
  24.146  
  24.147      /* Set up the desired display mode */
  24.148 -    desktop_format = SDL_GetDesktopDisplayMode ()->format;
  24.149 +    desktop_format = SDL_GetDesktopDisplayMode()->format;
  24.150      if ((bpp == SDL_BITSPERPIXEL(desktop_format)) ||
  24.151          (desktop_format && (flags & SDL_ANYFORMAT))) {
  24.152          desired_format = desktop_format;
  24.153 @@ -189,7 +189,7 @@
  24.154              desired_format = SDL_PixelFormat_RGB888;
  24.155              break;
  24.156          default:
  24.157 -            SDL_SetError ("Unsupported bpp in SDL_SetVideoMode()");
  24.158 +            SDL_SetError("Unsupported bpp in SDL_SetVideoMode()");
  24.159              return NULL;
  24.160          }
  24.161      }
  24.162 @@ -200,41 +200,41 @@
  24.163  
  24.164      /* Set the desired display mode */
  24.165      if (flags & SDL_FULLSCREEN) {
  24.166 -        if (!SDL_GetClosestDisplayMode (&mode, &mode)) {
  24.167 +        if (!SDL_GetClosestDisplayMode(&mode, &mode)) {
  24.168              return NULL;
  24.169          }
  24.170      } else {
  24.171 -        mode = *SDL_GetDesktopDisplayMode ();
  24.172 +        mode = *SDL_GetDesktopDisplayMode();
  24.173      }
  24.174 -    if (SDL_SetDisplayMode (&mode) < 0) {
  24.175 +    if (SDL_SetDisplayMode(&mode) < 0) {
  24.176          return NULL;
  24.177      }
  24.178  
  24.179      /* Create the display surface */
  24.180 -    return SDL_CreateWindowSurface (window, desired_format, flags);
  24.181 +    return SDL_CreateWindowSurface(window, desired_format, flags);
  24.182  }
  24.183  
  24.184  SDL_Surface *
  24.185 -SDL_GetVideoSurface (void)
  24.186 +SDL_GetVideoSurface(void)
  24.187  {
  24.188 -    SDL_VideoDevice *_this = SDL_GetVideoDevice ();
  24.189 +    SDL_VideoDevice *_this = SDL_GetVideoDevice();
  24.190  
  24.191      return SDL_VideoSurface;
  24.192  }
  24.193  
  24.194  void
  24.195 -SDL_WM_SetCaption (const char *title, const char *icon)
  24.196 +SDL_WM_SetCaption(const char *title, const char *icon)
  24.197  {
  24.198      if (wm_title) {
  24.199 -        SDL_free (wm_title);
  24.200 +        SDL_free(wm_title);
  24.201      } else {
  24.202 -        wm_title = SDL_strdup (title);
  24.203 +        wm_title = SDL_strdup(title);
  24.204      }
  24.205 -    SDL_SetWindowTitle (window, wm_title);
  24.206 +    SDL_SetWindowTitle(window, wm_title);
  24.207  }
  24.208  
  24.209  void
  24.210 -SDL_WM_GetCaption (char **title, char **icon)
  24.211 +SDL_WM_GetCaption(char **title, char **icon)
  24.212  {
  24.213      if (title) {
  24.214          *title = wm_title;
  24.215 @@ -245,39 +245,39 @@
  24.216  }
  24.217  
  24.218  void
  24.219 -SDL_WM_SetIcon (SDL_Surface * icon, Uint8 * mask)
  24.220 +SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask)
  24.221  {
  24.222      /* FIXME */
  24.223  }
  24.224  
  24.225  int
  24.226 -SDL_WM_IconifyWindow (void)
  24.227 +SDL_WM_IconifyWindow(void)
  24.228  {
  24.229 -    SDL_MinimizeWindow (window);
  24.230 +    SDL_MinimizeWindow(window);
  24.231  }
  24.232  
  24.233  int
  24.234 -SDL_WM_ToggleFullScreen (SDL_Surface * surface)
  24.235 +SDL_WM_ToggleFullScreen(SDL_Surface * surface)
  24.236  {
  24.237      return 0;
  24.238  }
  24.239  
  24.240  SDL_GrabMode
  24.241 -SDL_WM_GrabInput (SDL_GrabMode mode)
  24.242 +SDL_WM_GrabInput(SDL_GrabMode mode)
  24.243  {
  24.244      if (mode != SDL_GRAB_QUERY) {
  24.245 -        SDL_SetWindowGrab (window, mode);
  24.246 +        SDL_SetWindowGrab(window, mode);
  24.247      }
  24.248 -    return (SDL_GrabMode) SDL_GetWindowGrab (window);
  24.249 +    return (SDL_GrabMode) SDL_GetWindowGrab(window);
  24.250  }
  24.251  
  24.252  Uint8
  24.253 -SDL_GetAppState (void)
  24.254 +SDL_GetAppState(void)
  24.255  {
  24.256      Uint8 state = 0;
  24.257      Uint32 flags = 0;
  24.258  
  24.259 -    flags = SDL_GetWindowFlags (window);
  24.260 +    flags = SDL_GetWindowFlags(window);
  24.261      if ((flags & SDL_WINDOW_SHOWN) && !(flags & SDL_WINDOW_MINIMIZED)) {
  24.262          state |= SDL_APPACTIVE;
  24.263      }
  24.264 @@ -291,24 +291,24 @@
  24.265  }
  24.266  
  24.267  const SDL_version *
  24.268 -SDL_Linked_Version (void)
  24.269 +SDL_Linked_Version(void)
  24.270  {
  24.271      static SDL_version version;
  24.272 -    SDL_VERSION (&version);
  24.273 +    SDL_VERSION(&version);
  24.274      return &version;
  24.275  }
  24.276  
  24.277  int
  24.278 -SDL_SetPalette (SDL_Surface * surface, int flags, SDL_Color * colors,
  24.279 -                int firstcolor, int ncolors)
  24.280 +SDL_SetPalette(SDL_Surface * surface, int flags, SDL_Color * colors,
  24.281 +               int firstcolor, int ncolors)
  24.282  {
  24.283 -    SDL_SetColors (surface, colors, firstcolor, ncolors);
  24.284 +    SDL_SetColors(surface, colors, firstcolor, ncolors);
  24.285  }
  24.286  
  24.287  int
  24.288 -SDL_GetWMInfo (SDL_SysWMinfo * info)
  24.289 +SDL_GetWMInfo(SDL_SysWMinfo * info)
  24.290  {
  24.291 -    return SDL_GetWindowWMInfo (window, info);
  24.292 +    return SDL_GetWindowWMInfo(window, info);
  24.293  }
  24.294  
  24.295  /* vi: set ts=4 sw=4 expandtab: */
    25.1 --- a/src/SDL_error.c	Mon May 29 03:53:21 2006 +0000
    25.2 +++ b/src/SDL_error.c	Mon May 29 04:04:35 2006 +0000
    25.3 @@ -32,7 +32,7 @@
    25.4  static SDL_error SDL_global_error;
    25.5  #define SDL_GetErrBuf()	(&SDL_global_error)
    25.6  #else
    25.7 -extern SDL_error *SDL_GetErrBuf (void);
    25.8 +extern SDL_error *SDL_GetErrBuf(void);
    25.9  #endif /* SDL_THREADS_DISABLED */
   25.10  
   25.11  #define SDL_ERRBUFIZE	1024
   25.12 @@ -40,7 +40,7 @@
   25.13  /* Private functions */
   25.14  
   25.15  static const char *
   25.16 -SDL_LookupString (const char *key)
   25.17 +SDL_LookupString(const char *key)
   25.18  {
   25.19      /* FIXME: Add code to lookup key in language string hash-table */
   25.20      return key;
   25.21 @@ -49,17 +49,17 @@
   25.22  /* Public functions */
   25.23  
   25.24  void
   25.25 -SDL_SetError (const char *fmt, ...)
   25.26 +SDL_SetError(const char *fmt, ...)
   25.27  {
   25.28      va_list ap;
   25.29      SDL_error *error;
   25.30  
   25.31      /* Copy in the key, mark error as valid */
   25.32 -    error = SDL_GetErrBuf ();
   25.33 +    error = SDL_GetErrBuf();
   25.34      error->error = 1;
   25.35 -    SDL_strlcpy ((char *) error->key, fmt, sizeof (error->key));
   25.36 +    SDL_strlcpy((char *) error->key, fmt, sizeof(error->key));
   25.37  
   25.38 -    va_start (ap, fmt);
   25.39 +    va_start(ap, fmt);
   25.40      error->argc = 0;
   25.41      while (*fmt) {
   25.42          if (*fmt++ == '%') {
   25.43 @@ -77,22 +77,22 @@
   25.44              case 'o':
   25.45              case 'x':
   25.46              case 'X':
   25.47 -                error->args[error->argc++].value_i = va_arg (ap, int);
   25.48 +                error->args[error->argc++].value_i = va_arg(ap, int);
   25.49                  break;
   25.50              case 'f':
   25.51 -                error->args[error->argc++].value_f = va_arg (ap, double);
   25.52 +                error->args[error->argc++].value_f = va_arg(ap, double);
   25.53                  break;
   25.54              case 'p':
   25.55 -                error->args[error->argc++].value_ptr = va_arg (ap, void *);
   25.56 +                error->args[error->argc++].value_ptr = va_arg(ap, void *);
   25.57                  break;
   25.58              case 's':
   25.59                  {
   25.60                      int i = error->argc;
   25.61 -                    const char *str = va_arg (ap, const char *);
   25.62 +                    const char *str = va_arg(ap, const char *);
   25.63                      if (str == NULL)
   25.64                          str = "(null)";
   25.65 -                    SDL_strlcpy ((char *) error->args[i].buf, str,
   25.66 -                                 ERR_MAX_STRLEN);
   25.67 +                    SDL_strlcpy((char *) error->args[i].buf, str,
   25.68 +                                ERR_MAX_STRLEN);
   25.69                      error->argc++;
   25.70                  }
   25.71                  break;
   25.72 @@ -104,11 +104,11 @@
   25.73              }
   25.74          }
   25.75      }
   25.76 -    va_end (ap);
   25.77 +    va_end(ap);
   25.78  
   25.79      /* If we are in debug mode, print out an error message */
   25.80  #ifdef DEBUG_ERROR
   25.81 -    fprintf (stderr, "SDL_SetError: %s\n", SDL_GetError ());
   25.82 +    fprintf(stderr, "SDL_SetError: %s\n", SDL_GetError());
   25.83  #endif
   25.84  }
   25.85  
   25.86 @@ -116,7 +116,7 @@
   25.87     so that it supports internationalization and thread-safe errors.
   25.88  */
   25.89  char *
   25.90 -SDL_GetErrorMsg (char *errstr, unsigned int maxlen)
   25.91 +SDL_GetErrorMsg(char *errstr, unsigned int maxlen)
   25.92  {
   25.93      SDL_error *error;
   25.94  
   25.95 @@ -125,21 +125,21 @@
   25.96      --maxlen;
   25.97  
   25.98      /* Get the thread-safe error, and print it out */
   25.99 -    error = SDL_GetErrBuf ();
  25.100 +    error = SDL_GetErrBuf();
  25.101      if (error->error) {
  25.102          const char *fmt;
  25.103          char *msg = errstr;
  25.104          int len;
  25.105          int argi;
  25.106  
  25.107 -        fmt = SDL_LookupString (error->key);
  25.108 +        fmt = SDL_LookupString(error->key);
  25.109          argi = 0;
  25.110          while (*fmt && (maxlen > 0)) {
  25.111              if (*fmt == '%') {
  25.112                  char tmp[32], *spot = tmp;
  25.113                  *spot++ = *fmt++;
  25.114                  while ((*fmt == '.' || (*fmt >= '0' && *fmt <= '9'))
  25.115 -                       && spot < (tmp + SDL_arraysize (tmp) - 2)) {
  25.116 +                       && spot < (tmp + SDL_arraysize(tmp) - 2)) {
  25.117                      *spot++ = *fmt++;
  25.118                  }
  25.119                  *spot++ = *fmt++;
  25.120 @@ -157,30 +157,30 @@
  25.121                  case 'x':
  25.122                  case 'X':
  25.123                      len =
  25.124 -                        SDL_snprintf (msg, maxlen, tmp,
  25.125 -                                      error->args[argi++].value_i);
  25.126 +                        SDL_snprintf(msg, maxlen, tmp,
  25.127 +                                     error->args[argi++].value_i);
  25.128                      msg += len;
  25.129                      maxlen -= len;
  25.130                      break;
  25.131                  case 'f':
  25.132                      len =
  25.133 -                        SDL_snprintf (msg, maxlen, tmp,
  25.134 -                                      error->args[argi++].value_f);
  25.135 +                        SDL_snprintf(msg, maxlen, tmp,
  25.136 +                                     error->args[argi++].value_f);
  25.137                      msg += len;
  25.138                      maxlen -= len;
  25.139                      break;
  25.140                  case 'p':
  25.141                      len =
  25.142 -                        SDL_snprintf (msg, maxlen, tmp,
  25.143 -                                      error->args[argi++].value_ptr);
  25.144 +                        SDL_snprintf(msg, maxlen, tmp,
  25.145 +                                     error->args[argi++].value_ptr);
  25.146                      msg += len;
  25.147                      maxlen -= len;
  25.148                      break;
  25.149                  case 's':
  25.150                      len =
  25.151 -                        SDL_snprintf (msg, maxlen, tmp,
  25.152 -                                      SDL_LookupString (error->
  25.153 -                                                        args[argi++].buf));
  25.154 +                        SDL_snprintf(msg, maxlen, tmp,
  25.155 +                                     SDL_LookupString(error->
  25.156 +                                                      args[argi++].buf));
  25.157                      msg += len;
  25.158                      maxlen -= len;
  25.159                      break;
  25.160 @@ -197,59 +197,59 @@
  25.161  
  25.162  /* Available for backwards compatibility */
  25.163  char *
  25.164 -SDL_GetError (void)
  25.165 +SDL_GetError(void)
  25.166  {
  25.167      static char errmsg[SDL_ERRBUFIZE];
  25.168  
  25.169 -    return ((char *) SDL_GetErrorMsg (errmsg, SDL_ERRBUFIZE));
  25.170 +    return ((char *) SDL_GetErrorMsg(errmsg, SDL_ERRBUFIZE));
  25.171  }
  25.172  
  25.173  void
  25.174 -SDL_ClearError (void)
  25.175 +SDL_ClearError(void)
  25.176  {
  25.177      SDL_error *error;
  25.178  
  25.179 -    error = SDL_GetErrBuf ();
  25.180 +    error = SDL_GetErrBuf();
  25.181      error->error = 0;
  25.182  }
  25.183  
  25.184  /* Very common errors go here */
  25.185  void
  25.186 -SDL_Error (SDL_errorcode code)
  25.187 +SDL_Error(SDL_errorcode code)
  25.188  {
  25.189      switch (code) {
  25.190      case SDL_ENOMEM:
  25.191 -        SDL_SetError ("Out of memory");
  25.192 +        SDL_SetError("Out of memory");
  25.193          break;
  25.194      case SDL_EFREAD:
  25.195 -        SDL_SetError ("Error reading from datastream");
  25.196 +        SDL_SetError("Error reading from datastream");
  25.197          break;
  25.198      case SDL_EFWRITE:
  25.199 -        SDL_SetError ("Error writing to datastream");
  25.200 +        SDL_SetError("Error writing to datastream");
  25.201          break;
  25.202      case SDL_EFSEEK:
  25.203 -        SDL_SetError ("Error seeking in datastream");
  25.204 +        SDL_SetError("Error seeking in datastream");
  25.205          break;
  25.206      default:
  25.207 -        SDL_SetError ("Unknown SDL error");
  25.208 +        SDL_SetError("Unknown SDL error");
  25.209          break;
  25.210      }
  25.211  }
  25.212  
  25.213  #ifdef TEST_ERROR
  25.214  int
  25.215 -main (int argc, char *argv[])
  25.216 +main(int argc, char *argv[])
  25.217  {
  25.218      char buffer[BUFSIZ + 1];
  25.219  
  25.220 -    SDL_SetError ("Hi there!");
  25.221 -    printf ("Error 1: %s\n", SDL_GetError ());
  25.222 -    SDL_ClearError ();
  25.223 -    SDL_memset (buffer, '1', BUFSIZ);
  25.224 +    SDL_SetError("Hi there!");
  25.225 +    printf("Error 1: %s\n", SDL_GetError());
  25.226 +    SDL_ClearError();
  25.227 +    SDL_memset(buffer, '1', BUFSIZ);
  25.228      buffer[BUFSIZ] = 0;
  25.229 -    SDL_SetError ("This is the error: %s (%f)", buffer, 1.0);
  25.230 -    printf ("Error 2: %s\n", SDL_GetError ());
  25.231 -    exit (0);
  25.232 +    SDL_SetError("This is the error: %s (%f)", buffer, 1.0);
  25.233 +    printf("Error 2: %s\n", SDL_GetError());
  25.234 +    exit(0);
  25.235  }
  25.236  #endif
  25.237  /* vi: set ts=4 sw=4 expandtab: */
    26.1 --- a/src/SDL_fatal.c	Mon May 29 03:53:21 2006 +0000
    26.2 +++ b/src/SDL_fatal.c	Mon May 29 04:04:35 2006 +0000
    26.3 @@ -36,11 +36,11 @@
    26.4  */
    26.5  
    26.6  static void
    26.7 -SDL_Parachute (int sig)
    26.8 +SDL_Parachute(int sig)
    26.9  {
   26.10 -    signal (sig, SIG_DFL);
   26.11 -    SDL_Quit ();
   26.12 -    raise (sig);
   26.13 +    signal(sig, SIG_DFL);
   26.14 +    SDL_Quit();
   26.15 +    raise(sig);
   26.16  }
   26.17  
   26.18  static int SDL_fatal_signals[] = {
   26.19 @@ -58,7 +58,7 @@
   26.20  };
   26.21  
   26.22  void
   26.23 -SDL_InstallParachute (void)
   26.24 +SDL_InstallParachute(void)
   26.25  {
   26.26      /* Set a handler for any fatal signal not already handled */
   26.27      int i;
   26.28 @@ -66,27 +66,27 @@
   26.29      struct sigaction action;
   26.30  
   26.31      for (i = 0; SDL_fatal_signals[i]; ++i) {
   26.32 -        sigaction (SDL_fatal_signals[i], NULL, &action);
   26.33 +        sigaction(SDL_fatal_signals[i], NULL, &action);
   26.34          if (action.sa_handler == SIG_DFL) {
   26.35              action.sa_handler = SDL_Parachute;
   26.36 -            sigaction (SDL_fatal_signals[i], &action, NULL);
   26.37 +            sigaction(SDL_fatal_signals[i], &action, NULL);
   26.38          }
   26.39      }
   26.40  #ifdef SIGALRM
   26.41      /* Set SIGALRM to be ignored -- necessary on Solaris */
   26.42 -    sigaction (SIGALRM, NULL, &action);
   26.43 +    sigaction(SIGALRM, NULL, &action);
   26.44      if (action.sa_handler == SIG_DFL) {
   26.45          action.sa_handler = SIG_IGN;
   26.46 -        sigaction (SIGALRM, &action, NULL);
   26.47 +        sigaction(SIGALRM, &action, NULL);
   26.48      }
   26.49  #endif
   26.50  #else
   26.51      void (*ohandler) (int);
   26.52  
   26.53      for (i = 0; SDL_fatal_signals[i]; ++i) {
   26.54 -        ohandler = signal (SDL_fatal_signals[i], SDL_Parachute);
   26.55 +        ohandler = signal(SDL_fatal_signals[i], SDL_Parachute);
   26.56          if (ohandler != SIG_DFL) {
   26.57 -            signal (SDL_fatal_signals[i], ohandler);
   26.58 +            signal(SDL_fatal_signals[i], ohandler);
   26.59          }
   26.60      }
   26.61  #endif /* HAVE_SIGACTION */
   26.62 @@ -94,7 +94,7 @@
   26.63  }
   26.64  
   26.65  void
   26.66 -SDL_UninstallParachute (void)
   26.67 +SDL_UninstallParachute(void)
   26.68  {
   26.69      /* Remove a handler for any fatal signal handled */
   26.70      int i;
   26.71 @@ -102,19 +102,19 @@
   26.72      struct sigaction action;
   26.73  
   26.74      for (i = 0; SDL_fatal_signals[i]; ++i) {
   26.75 -        sigaction (SDL_fatal_signals[i], NULL, &action);
   26.76 +        sigaction(SDL_fatal_signals[i], NULL, &action);
   26.77          if (action.sa_handler == SDL_Parachute) {
   26.78              action.sa_handler = SIG_DFL;
   26.79 -            sigaction (SDL_fatal_signals[i], &action, NULL);
   26.80 +            sigaction(SDL_fatal_signals[i], &action, NULL);
   26.81          }
   26.82      }
   26.83  #else
   26.84      void (*ohandler) (int);
   26.85  
   26.86      for (i = 0; SDL_fatal_signals[i]; ++i) {
   26.87 -        ohandler = signal (SDL_fatal_signals[i], SIG_DFL);
   26.88 +        ohandler = signal(SDL_fatal_signals[i], SIG_DFL);
   26.89          if (ohandler != SDL_Parachute) {
   26.90 -            signal (SDL_fatal_signals[i], ohandler);
   26.91 +            signal(SDL_fatal_signals[i], ohandler);
   26.92          }
   26.93      }
   26.94  #endif /* HAVE_SIGACTION */
   26.95 @@ -125,13 +125,13 @@
   26.96  /* No signals on this platform, nothing to do.. */
   26.97  
   26.98  void
   26.99 -SDL_InstallParachute (void)
  26.100 +SDL_InstallParachute(void)
  26.101  {
  26.102      return;
  26.103  }
  26.104  
  26.105  void
  26.106 -SDL_UninstallParachute (void)
  26.107 +SDL_UninstallParachute(void)
  26.108  {
  26.109      return;
  26.110  }
    27.1 --- a/src/SDL_fatal.h	Mon May 29 03:53:21 2006 +0000
    27.2 +++ b/src/SDL_fatal.h	Mon May 29 04:04:35 2006 +0000
    27.3 @@ -23,6 +23,6 @@
    27.4  
    27.5  /* General fatal signal handling code for SDL */
    27.6  
    27.7 -extern void SDL_InstallParachute (void);
    27.8 -extern void SDL_UninstallParachute (void);
    27.9 +extern void SDL_InstallParachute(void);
   27.10 +extern void SDL_UninstallParachute(void);
   27.11  /* vi: set ts=4 sw=4 expandtab: */
    28.1 --- a/src/audio/SDL_audio.c	Mon May 29 03:53:21 2006 +0000
    28.2 +++ b/src/audio/SDL_audio.c	Mon May 29 04:04:35 2006 +0000
    28.3 @@ -112,8 +112,8 @@
    28.4  SDL_AudioDevice *current_audio = NULL;
    28.5  
    28.6  /* Various local functions */
    28.7 -int SDL_AudioInit (const char *driver_name);
    28.8 -void SDL_AudioQuit (void);
    28.9 +int SDL_AudioInit(const char *driver_name);
   28.10 +void SDL_AudioQuit(void);
   28.11  
   28.12  #if SDL_AUDIO_DRIVER_AHI
   28.13  static int audio_configured = 0;
   28.14 @@ -121,7 +121,7 @@
   28.15  
   28.16  /* The general mixing thread function */
   28.17  int SDLCALL
   28.18 -SDL_RunAudio (void *audiop)
   28.19 +SDL_RunAudio(void *audiop)
   28.20  {
   28.21      SDL_AudioDevice *audio = (SDL_AudioDevice *) audiop;
   28.22      Uint8 *stream;
   28.23 @@ -134,21 +134,21 @@
   28.24  
   28.25  /* AmigaOS NEEDS that the audio driver is opened in the thread that uses it! */
   28.26  
   28.27 -    D (bug ("Task audio started audio struct:<%lx>...\n", audiop));
   28.28 +    D(bug("Task audio started audio struct:<%lx>...\n", audiop));
   28.29  
   28.30 -    D (bug ("Before Openaudio..."));
   28.31 -    if (audio->OpenAudio (audio, &audio->spec) == -1) {
   28.32 -        D (bug ("Open audio failed...\n"));
   28.33 +    D(bug("Before Openaudio..."));
   28.34 +    if (audio->OpenAudio(audio, &audio->spec) == -1) {
   28.35 +        D(bug("Open audio failed...\n"));
   28.36          return (-1);
   28.37      }
   28.38 -    D (bug ("OpenAudio...OK\n"));
   28.39 +    D(bug("OpenAudio...OK\n"));
   28.40  #endif
   28.41  
   28.42      /* Perform any thread setup */
   28.43      if (audio->ThreadInit) {
   28.44 -        audio->ThreadInit (audio);
   28.45 +        audio->ThreadInit(audio);
   28.46      }
   28.47 -    audio->threadid = SDL_ThreadID ();
   28.48 +    audio->threadid = SDL_ThreadID();
   28.49  
   28.50      /* Set up the mixing function */
   28.51      fill = audio->spec.callback;
   28.52 @@ -157,9 +157,9 @@
   28.53  #if SDL_AUDIO_DRIVER_AHI
   28.54      audio_configured = 1;
   28.55  
   28.56 -    D (bug ("Audio configured... Checking for conversion\n"));
   28.57 -    SDL_mutexP (audio->mixer_lock);
   28.58 -    D (bug ("Semaphore obtained...\n"));
   28.59 +    D(bug("Audio configured... Checking for conversion\n"));
   28.60 +    SDL_mutexP(audio->mixer_lock);
   28.61 +    D(bug("Semaphore obtained...\n"));
   28.62  #endif
   28.63  
   28.64      if (audio->convert.needed) {
   28.65 @@ -175,28 +175,28 @@
   28.66      }
   28.67  
   28.68  #if SDL_AUDIO_DRIVER_AHI
   28.69 -    SDL_mutexV (audio->mixer_lock);
   28.70 -    D (bug ("Entering audio loop...\n"));
   28.71 +    SDL_mutexV(audio->mixer_lock);
   28.72 +    D(bug("Entering audio loop...\n"));
   28.73  #endif
   28.74  
   28.75  #ifdef __OS2__
   28.76      /* Increase the priority of this thread to make sure that
   28.77         the audio will be continuous all the time! */
   28.78  #ifdef USE_DOSSETPRIORITY
   28.79 -    if (SDL_getenv ("SDL_USE_TIMECRITICAL_AUDIO")) {
   28.80 +    if (SDL_getenv("SDL_USE_TIMECRITICAL_AUDIO")) {
   28.81  #ifdef DEBUG_BUILD
   28.82          printf
   28.83              ("[SDL_RunAudio] : Setting priority to TimeCritical+0! (TID%d)\n",
   28.84 -             SDL_ThreadID ());
   28.85 +             SDL_ThreadID());
   28.86  #endif
   28.87 -        DosSetPriority (PRTYS_THREAD, PRTYC_TIMECRITICAL, 0, 0);
   28.88 +        DosSetPriority(PRTYS_THREAD, PRTYC_TIMECRITICAL, 0, 0);
   28.89      } else {
   28.90  #ifdef DEBUG_BUILD
   28.91          printf
   28.92              ("[SDL_RunAudio] : Setting priority to ForegroundServer+0! (TID%d)\n",
   28.93 -             SDL_ThreadID ());
   28.94 +             SDL_ThreadID());
   28.95  #endif
   28.96 -        DosSetPriority (PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
   28.97 +        DosSetPriority(PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
   28.98      }
   28.99  #endif
  28.100  #endif
  28.101 @@ -212,82 +212,82 @@
  28.102                  continue;
  28.103              }
  28.104          } else {
  28.105 -            stream = audio->GetAudioBuf (audio);
  28.106 +            stream = audio->GetAudioBuf(audio);
  28.107              if (stream == NULL) {
  28.108                  stream = audio->fake_stream;
  28.109              }
  28.110          }
  28.111 -        SDL_memset (stream, silence, stream_len);
  28.112 +        SDL_memset(stream, silence, stream_len);
  28.113  
  28.114          if (!audio->paused) {
  28.115 -            SDL_mutexP (audio->mixer_lock);
  28.116 +            SDL_mutexP(audio->mixer_lock);
  28.117              (*fill) (udata, stream, stream_len);
  28.118 -            SDL_mutexV (audio->mixer_lock);
  28.119 +            SDL_mutexV(audio->mixer_lock);
  28.120          }
  28.121  
  28.122          /* Convert the audio if necessary */
  28.123          if (audio->convert.needed) {
  28.124 -            SDL_ConvertAudio (&audio->convert);
  28.125 -            stream = audio->GetAudioBuf (audio);
  28.126 +            SDL_ConvertAudio(&audio->convert);
  28.127 +            stream = audio->GetAudioBuf(audio);
  28.128              if (stream == NULL) {
  28.129                  stream = audio->fake_stream;
  28.130              }
  28.131 -            SDL_memcpy (stream, audio->convert.buf, audio->convert.len_cvt);
  28.132 +            SDL_memcpy(stream, audio->convert.buf, audio->convert.len_cvt);
  28.133          }
  28.134  
  28.135          /* Ready current buffer for play and change current buffer */
  28.136          if (stream != audio->fake_stream) {
  28.137 -            audio->PlayAudio (audio);
  28.138 +            audio->PlayAudio(audio);
  28.139          }
  28.140  
  28.141          /* Wait for an audio buffer to become available */
  28.142          if (stream == audio->fake_stream) {
  28.143 -            SDL_Delay ((audio->spec.samples * 1000) / audio->spec.freq);
  28.144 +            SDL_Delay((audio->spec.samples * 1000) / audio->spec.freq);
  28.145          } else {
  28.146 -            audio->WaitAudio (audio);
  28.147 +            audio->WaitAudio(audio);
  28.148          }
  28.149      }
  28.150  
  28.151      /* Wait for the audio to drain.. */
  28.152      if (audio->WaitDone) {
  28.153 -        audio->WaitDone (audio);
  28.154 +        audio->WaitDone(audio);
  28.155      }
  28.156  #if SDL_AUDIO_DRIVER_AHI
  28.157 -    D (bug ("WaitAudio...Done\n"));
  28.158 +    D(bug("WaitAudio...Done\n"));
  28.159  
  28.160 -    audio->CloseAudio (audio);
  28.161 +    audio->CloseAudio(audio);
  28.162  
  28.163 -    D (bug ("CloseAudio..Done, subtask exiting...\n"));
  28.164 +    D(bug("CloseAudio..Done, subtask exiting...\n"));
  28.165      audio_configured = 0;
  28.166  #endif
  28.167  #ifdef __OS2__
  28.168  #ifdef DEBUG_BUILD
  28.169 -    printf ("[SDL_RunAudio] : Task exiting. (TID%d)\n", SDL_ThreadID ());
  28.170 +    printf("[SDL_RunAudio] : Task exiting. (TID%d)\n", SDL_ThreadID());
  28.171  #endif
  28.172  #endif
  28.173      return (0);
  28.174  }
  28.175  
  28.176  static void
  28.177 -SDL_LockAudio_Default (SDL_AudioDevice * audio)
  28.178 +SDL_LockAudio_Default(SDL_AudioDevice * audio)
  28.179  {
  28.180 -    if (audio->thread && (SDL_ThreadID () == audio->threadid)) {
  28.181 +    if (audio->thread && (SDL_ThreadID() == audio->threadid)) {
  28.182          return;
  28.183      }
  28.184 -    SDL_mutexP (audio->mixer_lock);
  28.185 +    SDL_mutexP(audio->mixer_lock);
  28.186  }
  28.187  
  28.188  static void
  28.189 -SDL_UnlockAudio_Default (SDL_AudioDevice * audio)
  28.190 +SDL_UnlockAudio_Default(SDL_AudioDevice * audio)
  28.191  {
  28.192 -    if (audio->thread && (SDL_ThreadID () == audio->threadid)) {
  28.193 +    if (audio->thread && (SDL_ThreadID() == audio->threadid)) {
  28.194          return;
  28.195      }
  28.196 -    SDL_mutexV (audio->mixer_lock);
  28.197 +    SDL_mutexV(audio->mixer_lock);
  28.198  }
  28.199  
  28.200  static Uint16
  28.201 -SDL_ParseAudioFormat (const char *string)
  28.202 +SDL_ParseAudioFormat(const char *string)
  28.203  {
  28.204      Uint16 format = 0;
  28.205  
  28.206 @@ -303,7 +303,7 @@
  28.207      default:
  28.208          return 0;
  28.209      }
  28.210 -    switch (SDL_atoi (string)) {
  28.211 +    switch (SDL_atoi(string)) {
  28.212      case 8:
  28.213          string += 1;
  28.214          format |= 8;
  28.215 @@ -311,16 +311,16 @@
  28.216      case 16:
  28.217          string += 2;
  28.218          format |= 16;
  28.219 -        if (SDL_strcmp (string, "LSB") == 0
  28.220 +        if (SDL_strcmp(string, "LSB") == 0
  28.221  #if SDL_BYTEORDER == SDL_LIL_ENDIAN
  28.222 -            || SDL_strcmp (string, "SYS") == 0
  28.223 +            || SDL_strcmp(string, "SYS") == 0
  28.224  #endif
  28.225              ) {
  28.226              format |= 0x0000;
  28.227          }
  28.228 -        if (SDL_strcmp (string, "MSB") == 0
  28.229 +        if (SDL_strcmp(string, "MSB") == 0
  28.230  #if SDL_BYTEORDER == SDL_BIG_ENDIAN
  28.231 -            || SDL_strcmp (string, "SYS") == 0
  28.232 +            || SDL_strcmp(string, "SYS") == 0
  28.233  #endif
  28.234              ) {
  28.235              format |= 0x1000;
  28.236 @@ -333,58 +333,58 @@
  28.237  }
  28.238  
  28.239  int
  28.240 -SDL_GetNumAudioDrivers (void)
  28.241 +SDL_GetNumAudioDrivers(void)
  28.242  {
  28.243 -    return (SDL_arraysize (bootstrap) - 1);
  28.244 +    return (SDL_arraysize(bootstrap) - 1);
  28.245  }
  28.246  
  28.247  const char *
  28.248 -SDL_GetAudioDriver (int index)
  28.249 +SDL_GetAudioDriver(int index)
  28.250  {
  28.251 -    if (index >= 0 && index < SDL_GetNumAudioDrivers ()) {
  28.252 +    if (index >= 0 && index < SDL_GetNumAudioDrivers()) {
  28.253          return (bootstrap[index]->name);
  28.254      }
  28.255      return (NULL);
  28.256  }
  28.257  
  28.258  int
  28.259 -SDL_AudioInit (const char *driver_name)
  28.260 +SDL_AudioInit(const char *driver_name)
  28.261  {
  28.262      SDL_AudioDevice *audio;
  28.263      int i = 0, idx;
  28.264  
  28.265      /* Check to make sure we don't overwrite 'current_audio' */
  28.266      if (current_audio != NULL) {
  28.267 -        SDL_AudioQuit ();
  28.268 +        SDL_AudioQuit();
  28.269      }
  28.270  
  28.271      /* Select the proper audio driver */
  28.272      audio = NULL;
  28.273      idx = 0;
  28.274  #if SDL_AUDIO_DRIVER_ESD
  28.275 -    if ((driver_name == NULL) && (SDL_getenv ("ESPEAKER") != NULL)) {
  28.276 +    if ((driver_name == NULL) && (SDL_getenv("ESPEAKER") != NULL)) {
  28.277          /* Ahem, we know that if ESPEAKER is set, user probably wants
  28.278             to use ESD, but don't start it if it's not already running.
  28.279             This probably isn't the place to do this, but... Shh! :)
  28.280           */
  28.281          for (i = 0; bootstrap[i]; ++i) {
  28.282 -            if (SDL_strcmp (bootstrap[i]->name, "esd") == 0) {
  28.283 +            if (SDL_strcmp(bootstrap[i]->name, "esd") == 0) {
  28.284  #ifdef HAVE_PUTENV
  28.285                  const char *esd_no_spawn;
  28.286  
  28.287                  /* Don't start ESD if it's not running */
  28.288 -                esd_no_spawn = getenv ("ESD_NO_SPAWN");
  28.289 +                esd_no_spawn = getenv("ESD_NO_SPAWN");
  28.290                  if (esd_no_spawn == NULL) {
  28.291 -                    putenv ("ESD_NO_SPAWN=1");
  28.292 +                    putenv("ESD_NO_SPAWN=1");
  28.293                  }
  28.294  #endif
  28.295 -                if (bootstrap[i]->available ()) {
  28.296 -                    audio = bootstrap[i]->create (0);
  28.297 +                if (bootstrap[i]->available()) {
  28.298 +                    audio = bootstrap[i]->create(0);
  28.299                      break;
  28.300                  }
  28.301  #ifdef HAVE_UNSETENV
  28.302                  if (esd_no_spawn == NULL) {
  28.303 -                    unsetenv ("ESD_NO_SPAWN");
  28.304 +                    unsetenv("ESD_NO_SPAWN");
  28.305                  }
  28.306  #endif
  28.307              }
  28.308 @@ -394,23 +394,23 @@
  28.309      if (audio == NULL) {
  28.310          if (driver_name != NULL) {
  28.311  #if 0                           /* This will be replaced with a better driver selection API */
  28.312 -            if (SDL_strrchr (driver_name, ':') != NULL) {
  28.313 -                idx = atoi (SDL_strrchr (driver_name, ':') + 1);
  28.314 +            if (SDL_strrchr(driver_name, ':') != NULL) {
  28.315 +                idx = atoi(SDL_strrchr(driver_name, ':') + 1);
  28.316              }
  28.317  #endif
  28.318              for (i = 0; bootstrap[i]; ++i) {
  28.319 -                if (SDL_strncmp (bootstrap[i]->name, driver_name,
  28.320 -                                 SDL_strlen (bootstrap[i]->name)) == 0) {
  28.321 -                    if (bootstrap[i]->available ()) {
  28.322 -                        audio = bootstrap[i]->create (idx);
  28.323 +                if (SDL_strncmp(bootstrap[i]->name, driver_name,
  28.324 +                                SDL_strlen(bootstrap[i]->name)) == 0) {
  28.325 +                    if (bootstrap[i]->available()) {
  28.326 +                        audio = bootstrap[i]->create(idx);
  28.327                      }
  28.328                      break;
  28.329                  }
  28.330              }
  28.331          } else {
  28.332              for (i = 0; bootstrap[i]; ++i) {
  28.333 -                if (bootstrap[i]->available ()) {
  28.334 -                    audio = bootstrap[i]->create (idx);
  28.335 +                if (bootstrap[i]->available()) {
  28.336 +                    audio = bootstrap[i]->create(idx);
  28.337                      if (audio != NULL) {
  28.338                          break;
  28.339                      }
  28.340 @@ -419,9 +419,9 @@
  28.341          }
  28.342          if (audio == NULL) {
  28.343              if (driver_name) {
  28.344 -                SDL_SetError ("%s not available", driver_name);
  28.345 +                SDL_SetError("%s not available", driver_name);
  28.346              } else {
  28.347 -                SDL_SetError ("No available audio device");
  28.348 +                SDL_SetError("No available audio device");
  28.349              }
  28.350  #if 0                           /* Don't fail SDL_Init() if audio isn't available.
  28.351                                     SDL_OpenAudio() will handle it at that point.  *sigh*
  28.352 @@ -445,7 +445,7 @@
  28.353   * Get the current audio driver name
  28.354   */
  28.355  const char *
  28.356 -SDL_GetCurrentAudioDriver ()
  28.357 +SDL_GetCurrentAudioDriver()
  28.358  {
  28.359      if (current_audio) {
  28.360          return current_audio->name;
  28.361 @@ -454,14 +454,14 @@
  28.362  }
  28.363  
  28.364  int
  28.365 -SDL_OpenAudio (SDL_AudioSpec * desired, SDL_AudioSpec * obtained)
  28.366 +SDL_OpenAudio(SDL_AudioSpec * desired, SDL_AudioSpec * obtained)
  28.367  {
  28.368      SDL_AudioDevice *audio;
  28.369      const char *env;
  28.370  
  28.371      /* Start up the audio driver, if necessary */
  28.372      if (!current_audio) {
  28.373 -        if ((SDL_InitSubSystem (SDL_INIT_AUDIO) < 0) ||
  28.374 +        if ((SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) ||
  28.375              (current_audio == NULL)) {
  28.376              return (-1);
  28.377          }
  28.378 @@ -469,15 +469,15 @@
  28.379      audio = current_audio;
  28.380  
  28.381      if (audio->opened) {
  28.382 -        SDL_SetError ("Audio device is already opened");
  28.383 +        SDL_SetError("Audio device is already opened");
  28.384          return (-1);
  28.385      }
  28.386  
  28.387      /* Verify some parameters */
  28.388      if (desired->freq == 0) {
  28.389 -        env = SDL_getenv ("SDL_AUDIO_FREQUENCY");
  28.390 +        env = SDL_getenv("SDL_AUDIO_FREQUENCY");
  28.391          if (env) {
  28.392 -            desired->freq = SDL_atoi (env);
  28.393 +            desired->freq = SDL_atoi(env);
  28.394          }
  28.395      }
  28.396      if (desired->freq == 0) {
  28.397 @@ -485,9 +485,9 @@
  28.398          desired->freq = 22050;
  28.399      }
  28.400      if (desired->format == 0) {
  28.401 -        env = SDL_getenv ("SDL_AUDIO_FORMAT");
  28.402 +        env = SDL_getenv("SDL_AUDIO_FORMAT");
  28.403          if (env) {
  28.404 -            desired->format = SDL_ParseAudioFormat (env);
  28.405 +            desired->format = SDL_ParseAudioFormat(env);
  28.406          }
  28.407      }
  28.408      if (desired->format == 0) {
  28.409 @@ -495,9 +495,9 @@
  28.410          desired->format = AUDIO_S16;
  28.411      }
  28.412      if (desired->channels == 0) {
  28.413 -        env = SDL_getenv ("SDL_AUDIO_CHANNELS");
  28.414 +        env = SDL_getenv("SDL_AUDIO_CHANNELS");
  28.415          if (env) {
  28.416 -            desired->channels = SDL_atoi (env);
  28.417 +            desired->channels = SDL_atoi(env);
  28.418          }
  28.419      }
  28.420      if (desired->channels == 0) {
  28.421 @@ -511,13 +511,13 @@
  28.422      case 6:                    /* surround with center and lfe */
  28.423          break;
  28.424      default:
  28.425 -        SDL_SetError ("1 (mono) and 2 (stereo) channels supported");
  28.426 +        SDL_SetError("1 (mono) and 2 (stereo) channels supported");
  28.427          return (-1);
  28.428      }
  28.429      if (desired->samples == 0) {
  28.430 -        env = SDL_getenv ("SDL_AUDIO_SAMPLES");
  28.431 +        env = SDL_getenv("SDL_AUDIO_SAMPLES");
  28.432          if (env) {
  28.433 -            desired->samples = SDL_atoi (env);
  28.434 +            desired->samples = SDL_atoi(env);
  28.435          }
  28.436      }
  28.437      if (desired->samples == 0) {
  28.438 @@ -530,7 +530,7 @@
  28.439          desired->samples = power2;
  28.440      }
  28.441      if (desired->callback == NULL) {
  28.442 -        SDL_SetError ("SDL_OpenAudio() passed a NULL callback");
  28.443 +        SDL_SetError("SDL_OpenAudio() passed a NULL callback");
  28.444          return (-1);
  28.445      }
  28.446  #if defined(__MACOS__) || (defined(__RISCOS__) && SDL_THREADS_DISABLED)
  28.447 @@ -540,20 +540,20 @@
  28.448      /* Uses interrupt driven audio, without thread */
  28.449  #else
  28.450      /* Create a semaphore for locking the sound buffers */
  28.451 -    audio->mixer_lock = SDL_CreateMutex ();
  28.452 +    audio->mixer_lock = SDL_CreateMutex();
  28.453      if (audio->mixer_lock == NULL) {
  28.454 -        SDL_SetError ("Couldn't create mixer lock");
  28.455 -        SDL_CloseAudio ();
  28.456 +        SDL_SetError("Couldn't create mixer lock");
  28.457 +        SDL_CloseAudio();
  28.458          return (-1);
  28.459      }
  28.460  #endif /* __MINT__ */
  28.461  #endif /* __MACOS__ */
  28.462  
  28.463      /* Calculate the silence and size of the audio specification */
  28.464 -    SDL_CalculateAudioSpec (desired);
  28.465 +    SDL_CalculateAudioSpec(desired);
  28.466  
  28.467      /* Open the audio subsystem */
  28.468 -    SDL_memcpy (&audio->spec, desired, sizeof (audio->spec));
  28.469 +    SDL_memcpy(&audio->spec, desired, sizeof(audio->spec));
  28.470      audio->convert.needed = 0;
  28.471      audio->enabled = 1;
  28.472      audio->paused = 1;
  28.473 @@ -561,68 +561,68 @@
  28.474  #if !SDL_AUDIO_DRIVER_AHI
  28.475  
  28.476  /* AmigaOS opens audio inside the main loop */
  28.477 -    audio->opened = audio->OpenAudio (audio, &audio->spec) + 1;
  28.478 +    audio->opened = audio->OpenAudio(audio, &audio->spec) + 1;
  28.479  
  28.480      if (!audio->opened) {
  28.481 -        SDL_CloseAudio ();
  28.482 +        SDL_CloseAudio();
  28.483          return (-1);
  28.484      }
  28.485  #else
  28.486 -    D (bug ("Locking semaphore..."));
  28.487 -    SDL_mutexP (audio->mixer_lock);
  28.488 +    D(bug("Locking semaphore..."));
  28.489 +    SDL_mutexP(audio->mixer_lock);
  28.490  
  28.491  
  28.492 -    audio->thread = SDL_CreateThread (SDL_RunAudio, audio);
  28.493 -    D (bug ("Created thread...\n"));
  28.494 +    audio->thread = SDL_CreateThread(SDL_RunAudio, audio);
  28.495 +    D(bug("Created thread...\n"));
  28.496  
  28.497      if (audio->thread == NULL) {
  28.498 -        SDL_mutexV (audio->mixer_lock);
  28.499 -        SDL_CloseAudio ();
  28.500 -        SDL_SetError ("Couldn't create audio thread");
  28.501 +        SDL_mutexV(audio->mixer_lock);
  28.502 +        SDL_CloseAudio();
  28.503 +        SDL_SetError("Couldn't create audio thread");
  28.504          return (-1);
  28.505      }
  28.506  
  28.507      while (!audio_configured)
  28.508 -        SDL_Delay (100);
  28.509 +        SDL_Delay(100);
  28.510  #endif
  28.511  
  28.512      /* If the audio driver changes the buffer size, accept it */
  28.513      if (audio->spec.samples != desired->samples) {
  28.514          desired->samples = audio->spec.samples;
  28.515 -        SDL_CalculateAudioSpec (desired);
  28.516 +        SDL_CalculateAudioSpec(desired);
  28.517      }
  28.518  
  28.519      /* Allocate a fake audio memory buffer */
  28.520 -    audio->fake_stream = SDL_AllocAudioMem (audio->spec.size);
  28.521 +    audio->fake_stream = SDL_AllocAudioMem(audio->spec.size);
  28.522      if (audio->fake_stream == NULL) {
  28.523 -        SDL_CloseAudio ();
  28.524 -        SDL_OutOfMemory ();
  28.525 +        SDL_CloseAudio();
  28.526 +        SDL_OutOfMemory();
  28.527          return (-1);
  28.528      }
  28.529  
  28.530      /* See if we need to do any conversion */
  28.531      if (obtained != NULL) {
  28.532 -        SDL_memcpy (obtained, &audio->spec, sizeof (audio->spec));
  28.533 +        SDL_memcpy(obtained, &audio->spec, sizeof(audio->spec));
  28.534      } else if (desired->freq != audio->spec.freq ||
  28.535                 desired->format != audio->spec.format ||
  28.536                 desired->channels != audio->spec.channels) {
  28.537          /* Build an audio conversion block */
  28.538 -        if (SDL_BuildAudioCVT (&audio->convert,
  28.539 -                               desired->format, desired->channels,
  28.540 -                               desired->freq,
  28.541 -                               audio->spec.format, audio->spec.channels,
  28.542 -                               audio->spec.freq) < 0) {
  28.543 -            SDL_CloseAudio ();
  28.544 +        if (SDL_BuildAudioCVT(&audio->convert,
  28.545 +                              desired->format, desired->channels,
  28.546 +                              desired->freq,
  28.547 +                              audio->spec.format, audio->spec.channels,
  28.548 +                              audio->spec.freq) < 0) {
  28.549 +            SDL_CloseAudio();
  28.550              return (-1);
  28.551          }
  28.552          if (audio->convert.needed) {
  28.553              audio->convert.len = desired->size;
  28.554              audio->convert.buf =
  28.555 -                (Uint8 *) SDL_AllocAudioMem (audio->convert.len *
  28.556 -                                             audio->convert.len_mult);
  28.557 +                (Uint8 *) SDL_AllocAudioMem(audio->convert.len *
  28.558 +                                            audio->convert.len_mult);
  28.559              if (audio->convert.buf == NULL) {
  28.560 -                SDL_CloseAudio ();
  28.561 -                SDL_OutOfMemory ();
  28.562 +                SDL_CloseAudio();
  28.563 +                SDL_OutOfMemory();
  28.564                  return (-1);
  28.565              }
  28.566          }
  28.567 @@ -634,13 +634,13 @@
  28.568          /* Start the audio thread */
  28.569  #if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
  28.570  #undef SDL_CreateThread
  28.571 -        audio->thread = SDL_CreateThread (SDL_RunAudio, audio, NULL, NULL);
  28.572 +        audio->thread = SDL_CreateThread(SDL_RunAudio, audio, NULL, NULL);
  28.573  #else
  28.574 -        audio->thread = SDL_CreateThread (SDL_RunAudio, audio);
  28.575 +        audio->thread = SDL_CreateThread(SDL_RunAudio, audio);
  28.576  #endif
  28.577          if (audio->thread == NULL) {
  28.578 -            SDL_CloseAudio ();
  28.579 -            SDL_SetError ("Couldn't create audio thread");
  28.580 +            SDL_CloseAudio();
  28.581 +            SDL_SetError("Couldn't create audio thread");
  28.582              return (-1);
  28.583          }
  28.584          break;
  28.585 @@ -650,8 +650,8 @@
  28.586          break;
  28.587      }
  28.588  #else
  28.589 -    SDL_mutexV (audio->mixer_lock);
  28.590 -    D (bug ("SDL_OpenAudio USCITA...\n"));
  28.591 +    SDL_mutexV(audio->mixer_lock);
  28.592 +    D(bug("SDL_OpenAudio USCITA...\n"));
  28.593  
  28.594  #endif
  28.595  
  28.596 @@ -659,7 +659,7 @@
  28.597  }
  28.598  
  28.599  SDL_audiostatus
  28.600 -SDL_GetAudioStatus (void)
  28.601 +SDL_GetAudioStatus(void)
  28.602  {
  28.603      SDL_AudioDevice *audio = current_audio;
  28.604      SDL_audiostatus status;
  28.605 @@ -676,7 +676,7 @@
  28.606  }
  28.607  
  28.608  void
  28.609 -SDL_PauseAudio (int pause_on)
  28.610 +SDL_PauseAudio(int pause_on)
  28.611  {
  28.612      SDL_AudioDevice *audio = current_audio;
  28.613  
  28.614 @@ -686,61 +686,61 @@
  28.615  }
  28.616  
  28.617  void
  28.618 -SDL_LockAudio (void)
  28.619 +SDL_LockAudio(void)
  28.620  {
  28.621      SDL_AudioDevice *audio = current_audio;
  28.622  
  28.623      /* Obtain a lock on the mixing buffers */
  28.624      if (audio && audio->LockAudio) {
  28.625 -        audio->LockAudio (audio);
  28.626 +        audio->LockAudio(audio);
  28.627      }
  28.628  }
  28.629  
  28.630  void
  28.631 -SDL_UnlockAudio (void)
  28.632 +SDL_UnlockAudio(void)
  28.633  {
  28.634      SDL_AudioDevice *audio = current_audio;
  28.635  
  28.636      /* Release lock on the mixing buffers */
  28.637      if (audio && audio->UnlockAudio) {
  28.638 -        audio->UnlockAudio (audio);
  28.639 +        audio->UnlockAudio(audio);
  28.640      }
  28.641  }
  28.642  
  28.643  void
  28.644 -SDL_CloseAudio (void)
  28.645 +SDL_CloseAudio(void)
  28.646  {
  28.647 -    SDL_QuitSubSystem (SDL_INIT_AUDIO);
  28.648 +    SDL_QuitSubSystem(SDL_INIT_AUDIO);
  28.649  }
  28.650  
  28.651  void
  28.652 -SDL_AudioQuit (void)
  28.653 +SDL_AudioQuit(void)
  28.654  {
  28.655      SDL_AudioDevice *audio = current_audio;
  28.656  
  28.657      if (audio) {
  28.658          audio->enabled = 0;
  28.659          if (audio->thread != NULL) {
  28.660 -            SDL_WaitThread (audio->thread, NULL);
  28.661 +            SDL_WaitThread(audio->thread, NULL);
  28.662          }
  28.663          if (audio->mixer_lock != NULL) {
  28.664 -            SDL_DestroyMutex (audio->mixer_lock);
  28.665 +            SDL_DestroyMutex(audio->mixer_lock);
  28.666          }
  28.667          if (audio->fake_stream != NULL) {
  28.668 -            SDL_FreeAudioMem (audio->fake_stream);
  28.669 +            SDL_FreeAudioMem(audio->fake_stream);
  28.670          }
  28.671          if (audio->convert.needed) {
  28.672 -            SDL_FreeAudioMem (audio->convert.buf);
  28.673 +            SDL_FreeAudioMem(audio->convert.buf);
  28.674  
  28.675          }
  28.676  #if !SDL_AUDIO_DRIVER_AHI
  28.677          if (audio->opened) {
  28.678 -            audio->CloseAudio (audio);
  28.679 +            audio->CloseAudio(audio);
  28.680              audio->opened = 0;
  28.681          }
  28.682  #endif
  28.683          /* Free the driver data */
  28.684 -        audio->free (audio);
  28.685 +        audio->free(audio);
  28.686          current_audio = NULL;
  28.687      }
  28.688  }
  28.689 @@ -764,7 +764,7 @@
  28.690  };
  28.691  
  28.692  Uint16
  28.693 -SDL_FirstAudioFormat (Uint16 format)
  28.694 +SDL_FirstAudioFormat(Uint16 format)
  28.695  {
  28.696      for (format_idx = 0; format_idx < NUM_FORMATS; ++format_idx) {
  28.697          if (format_list[format_idx][0] == format) {
  28.698 @@ -772,11 +772,11 @@
  28.699          }
  28.700      }
  28.701      format_idx_sub = 0;
  28.702 -    return (SDL_NextAudioFormat ());
  28.703 +    return (SDL_NextAudioFormat());
  28.704  }
  28.705  
  28.706  Uint16
  28.707 -SDL_NextAudioFormat (void)
  28.708 +SDL_NextAudioFormat(void)
  28.709  {
  28.710      if ((format_idx == NUM_FORMATS) || (format_idx_sub == NUM_FORMATS)) {
  28.711          return (0);
  28.712 @@ -785,7 +785,7 @@
  28.713  }
  28.714  
  28.715  void
  28.716 -SDL_CalculateAudioSpec (SDL_AudioSpec * spec)
  28.717 +SDL_CalculateAudioSpec(SDL_AudioSpec * spec)
  28.718  {
  28.719      switch (spec->format) {
  28.720      case AUDIO_U8:
    29.1 --- a/src/audio/SDL_audio_c.h	Mon May 29 03:53:21 2006 +0000
    29.2 +++ b/src/audio/SDL_audio_c.h	Mon May 29 04:04:35 2006 +0000
    29.3 @@ -24,12 +24,12 @@
    29.4  /* Functions and variables exported from SDL_audio.c for SDL_sysaudio.c */
    29.5  
    29.6  /* Functions to get a list of "close" audio formats */
    29.7 -extern Uint16 SDL_FirstAudioFormat (Uint16 format);
    29.8 -extern Uint16 SDL_NextAudioFormat (void);
    29.9 +extern Uint16 SDL_FirstAudioFormat(Uint16 format);
   29.10 +extern Uint16 SDL_NextAudioFormat(void);
   29.11  
   29.12  /* Function to calculate the size and silence for a SDL_AudioSpec */
   29.13 -extern void SDL_CalculateAudioSpec (SDL_AudioSpec * spec);
   29.14 +extern void SDL_CalculateAudioSpec(SDL_AudioSpec * spec);
   29.15  
   29.16  /* The actual mixing thread function */
   29.17 -extern int SDLCALL SDL_RunAudio (void *audiop);
   29.18 +extern int SDLCALL SDL_RunAudio(void *audiop);
   29.19  /* vi: set ts=4 sw=4 expandtab: */
    30.1 --- a/src/audio/SDL_audiocvt.c	Mon May 29 03:53:21 2006 +0000
    30.2 +++ b/src/audio/SDL_audiocvt.c	Mon May 29 04:04:35 2006 +0000
    30.3 @@ -28,13 +28,13 @@
    30.4  
    30.5  /* Effectively mix right and left channels into a single channel */
    30.6  void SDLCALL
    30.7 -SDL_ConvertMono (SDL_AudioCVT * cvt, Uint16 format)
    30.8 +SDL_ConvertMono(SDL_AudioCVT * cvt, Uint16 format)
    30.9  {
   30.10      int i;
   30.11      Sint32 sample;
   30.12  
   30.13  #ifdef DEBUG_CONVERT
   30.14 -    fprintf (stderr, "Converting to mono\n");
   30.15 +    fprintf(stderr, "Converting to mono\n");
   30.16  #endif
   30.17      switch (format & 0x8018) {
   30.18  
   30.19 @@ -172,13 +172,13 @@
   30.20  
   30.21  /* Discard top 4 channels */
   30.22  void SDLCALL
   30.23 -SDL_ConvertStrip (SDL_AudioCVT * cvt, Uint16 format)
   30.24 +SDL_ConvertStrip(SDL_AudioCVT * cvt, Uint16 format)
   30.25  {
   30.26      int i;
   30.27      Sint32 lsample, rsample;
   30.28  
   30.29  #ifdef DEBUG_CONVERT
   30.30 -    fprintf (stderr, "Converting down to stereo\n");
   30.31 +    fprintf(stderr, "Converting down to stereo\n");
   30.32  #endif
   30.33      switch (format & 0x8018) {
   30.34  
   30.35 @@ -293,13 +293,13 @@
   30.36  
   30.37  /* Discard top 2 channels of 6 */
   30.38  void SDLCALL
   30.39 -SDL_ConvertStrip_2 (SDL_AudioCVT * cvt, Uint16 format)
   30.40 +SDL_ConvertStrip_2(SDL_AudioCVT * cvt, Uint16 format)
   30.41  {
   30.42      int i;
   30.43      Sint32 lsample, rsample;
   30.44  
   30.45  #ifdef DEBUG_CONVERT
   30.46 -    fprintf (stderr, "Converting 6 down to quad\n");
   30.47 +    fprintf(stderr, "Converting 6 down to quad\n");
   30.48  #endif
   30.49      switch (format & 0x8018) {
   30.50  
   30.51 @@ -413,12 +413,12 @@
   30.52  
   30.53  /* Duplicate a mono channel to both stereo channels */
   30.54  void SDLCALL
   30.55 -SDL_ConvertStereo (SDL_AudioCVT * cvt, Uint16 format)
   30.56 +SDL_ConvertStereo(SDL_AudioCVT * cvt, Uint16 format)
   30.57  {
   30.58      int i;
   30.59  
   30.60  #ifdef DEBUG_CONVERT
   30.61 -    fprintf (stderr, "Converting to stereo\n");
   30.62 +    fprintf(stderr, "Converting to stereo\n");
   30.63  #endif
   30.64      if ((format & 0xFF) == 16) {
   30.65          Uint16 *src, *dst;
   30.66 @@ -452,12 +452,12 @@
   30.67  
   30.68  /* Duplicate a stereo channel to a pseudo-5.1 stream */
   30.69  void SDLCALL
   30.70 -SDL_ConvertSurround (SDL_AudioCVT * cvt, Uint16 format)
   30.71 +SDL_ConvertSurround(SDL_AudioCVT * cvt, Uint16 format)
   30.72  {
   30.73      int i;
   30.74  
   30.75  #ifdef DEBUG_CONVERT
   30.76 -    fprintf (stderr, "Converting stereo to surround\n");
   30.77 +    fprintf(stderr, "Converting stereo to surround\n");
   30.78  #endif
   30.79      switch (format & 0x8018) {
   30.80  
   30.81 @@ -634,12 +634,12 @@
   30.82  
   30.83  /* Duplicate a stereo channel to a pseudo-4.0 stream */
   30.84  void SDLCALL
   30.85 -SDL_ConvertSurround_4 (SDL_AudioCVT * cvt, Uint16 format)
   30.86 +SDL_ConvertSurround_4(SDL_AudioCVT * cvt, Uint16 format)
   30.87  {
   30.88      int i;
   30.89  
   30.90  #ifdef DEBUG_CONVERT
   30.91 -    fprintf (stderr, "Converting stereo to quad\n");
   30.92 +    fprintf(stderr, "Converting stereo to quad\n");
   30.93  #endif
   30.94      switch (format & 0x8018) {
   30.95  
   30.96 @@ -792,13 +792,13 @@
   30.97  
   30.98  /* Convert 8-bit to 16-bit - LSB */
   30.99  void SDLCALL
  30.100 -SDL_Convert16LSB (SDL_AudioCVT * cvt, Uint16 format)
  30.101 +SDL_Convert16LSB(SDL_AudioCVT * cvt, Uint16 format)
  30.102  {
  30.103      int i;
  30.104      Uint8 *src, *dst;
  30.105  
  30.106  #ifdef DEBUG_CONVERT
  30.107 -    fprintf (stderr, "Converting to 16-bit LSB\n");
  30.108 +    fprintf(stderr, "Converting to 16-bit LSB\n");
  30.109  #endif
  30.110      src = cvt->buf + cvt->len_cvt;
  30.111      dst = cvt->buf + cvt->len_cvt * 2;
  30.112 @@ -817,13 +817,13 @@
  30.113  
  30.114  /* Convert 8-bit to 16-bit - MSB */
  30.115  void SDLCALL
  30.116 -SDL_Convert16MSB (SDL_AudioCVT * cvt, Uint16 format)
  30.117 +SDL_Convert16MSB(SDL_AudioCVT * cvt, Uint16 format)
  30.118  {
  30.119      int i;
  30.120      Uint8 *src, *dst;
  30.121  
  30.122  #ifdef DEBUG_CONVERT
  30.123 -    fprintf (stderr, "Converting to 16-bit MSB\n");
  30.124 +    fprintf(stderr, "Converting to 16-bit MSB\n");
  30.125  #endif
  30.126      src = cvt->buf + cvt->len_cvt;
  30.127      dst = cvt->buf + cvt->len_cvt * 2;
  30.128 @@ -842,13 +842,13 @@
  30.129  
  30.130  /* Convert 16-bit to 8-bit */
  30.131  void SDLCALL
  30.132 -SDL_Convert8 (SDL_AudioCVT * cvt, Uint16 format)
  30.133 +SDL_Convert8(SDL_AudioCVT * cvt, Uint16 format)
  30.134  {
  30.135      int i;
  30.136      Uint8 *src, *dst;
  30.137  
  30.138  #ifdef DEBUG_CONVERT
  30.139 -    fprintf (stderr, "Converting to 8-bit\n");
  30.140 +    fprintf(stderr, "Converting to 8-bit\n");
  30.141  #endif
  30.142      src = cvt->buf;
  30.143      dst = cvt->buf;
  30.144 @@ -869,13 +869,13 @@
  30.145  
  30.146  /* Toggle signed/unsigned */
  30.147  void SDLCALL
  30.148 -SDL_ConvertSign (SDL_AudioCVT * cvt, Uint16 format)
  30.149 +SDL_ConvertSign(SDL_AudioCVT * cvt, Uint16 format)
  30.150  {
  30.151      int i;
  30.152      Uint8 *data;
  30.153  
  30.154  #ifdef DEBUG_CONVERT
  30.155 -    fprintf (stderr, "Converting audio signedness\n");
  30.156 +    fprintf(stderr, "Converting audio signedness\n");
  30.157  #endif
  30.158      data = cvt->buf;
  30.159      if ((format & 0xFF) == 16) {
  30.160 @@ -899,13 +899,13 @@
  30.161  
  30.162  /* Toggle endianness */
  30.163  void SDLCALL
  30.164 -SDL_ConvertEndian (SDL_AudioCVT * cvt, Uint16 format)
  30.165 +SDL_ConvertEndian(SDL_AudioCVT * cvt, Uint16 format)
  30.166  {
  30.167      int i;
  30.168      Uint8 *data, tmp;
  30.169  
  30.170  #ifdef DEBUG_CONVERT
  30.171 -    fprintf (stderr, "Converting audio endianness\n");
  30.172 +    fprintf(stderr, "Converting audio endianness\n");
  30.173  #endif
  30.174      data = cvt->buf;
  30.175      for (i = cvt->len_cvt / 2; i; --i) {
  30.176 @@ -922,13 +922,13 @@
  30.177  
  30.178  /* Convert rate up by multiple of 2 */
  30.179  void SDLCALL
  30.180 -SDL_RateMUL2 (SDL_AudioCVT * cvt, Uint16 format)
  30.181 +SDL_RateMUL2(SDL_AudioCVT * cvt, Uint16 format)
  30.182  {
  30.183      int i;
  30.184      Uint8 *src, *dst;
  30.185  
  30.186  #ifdef DEBUG_CONVERT
  30.187 -    fprintf (stderr, "Converting audio rate * 2\n");
  30.188 +    fprintf(stderr, "Converting audio rate * 2\n");
  30.189  #endif
  30.190      src = cvt->buf + cvt->len_cvt;
  30.191      dst = cvt->buf + cvt->len_cvt * 2;
  30.192 @@ -961,13 +961,13 @@
  30.193  
  30.194  /* Convert rate up by multiple of 2, for stereo */
  30.195  void SDLCALL
  30.196 -SDL_RateMUL2_c2 (SDL_AudioCVT * cvt, Uint16 format)
  30.197 +SDL_RateMUL2_c2(SDL_AudioCVT * cvt, Uint16 format)
  30.198  {
  30.199      int i;
  30.200      Uint8 *src, *dst;
  30.201  
  30.202  #ifdef DEBUG_CONVERT
  30.203 -    fprintf (stderr, "Converting audio rate * 2\n");
  30.204 +    fprintf(stderr, "Converting audio rate * 2\n");
  30.205  #endif
  30.206      src = cvt->buf + cvt->len_cvt;
  30.207      dst = cvt->buf + cvt->len_cvt * 2;
  30.208 @@ -1005,13 +1005,13 @@
  30.209  
  30.210  /* Convert rate up by multiple of 2, for quad */
  30.211  void SDLCALL
  30.212 -SDL_RateMUL2_c4 (SDL_AudioCVT * cvt, Uint16 format)
  30.213 +SDL_RateMUL2_c4(SDL_AudioCVT * cvt, Uint16 format)
  30.214  {
  30.215      int i;
  30.216      Uint8 *src, *dst;
  30.217  
  30.218  #ifdef DEBUG_CONVERT
  30.219 -    fprintf (stderr, "Converting audio rate * 2\n");
  30.220 +    fprintf(stderr, "Converting audio rate * 2\n");
  30.221  #endif
  30.222      src = cvt->buf + cvt->len_cvt;
  30.223      dst = cvt->buf + cvt->len_cvt * 2;
  30.224 @@ -1062,13 +1062,13 @@
  30.225  
  30.226  /* Convert rate up by multiple of 2, for 5.1 */
  30.227  void SDLCALL
  30.228 -SDL_RateMUL2_c6 (SDL_AudioCVT * cvt, Uint16 format)
  30.229 +SDL_RateMUL2_c6(SDL_AudioCVT * cvt, Uint16 format)
  30.230  {
  30.231      int i;
  30.232      Uint8 *src, *dst;
  30.233  
  30.234  #ifdef DEBUG_CONVERT
  30.235 -    fprintf (stderr, "Converting audio rate * 2\n");
  30.236 +    fprintf(stderr, "Converting audio rate * 2\n");
  30.237  #endif
  30.238      src = cvt->buf + cvt->len_cvt;
  30.239      dst = cvt->buf + cvt->len_cvt * 2;
  30.240 @@ -1130,13 +1130,13 @@
  30.241  
  30.242  /* Convert rate down by multiple of 2 */
  30.243  void SDLCALL
  30.244 -SDL_RateDIV2 (SDL_AudioCVT * cvt, Uint16 format)
  30.245 +SDL_RateDIV2(SDL_AudioCVT * cvt, Uint16 format)
  30.246  {
  30.247      int i;
  30.248      Uint8 *src, *dst;
  30.249  
  30.250  #ifdef DEBUG_CONVERT
  30.251 -    fprintf (stderr, "Converting audio rate / 2\n");
  30.252 +    fprintf(stderr, "Converting audio rate / 2\n");
  30.253  #endif
  30.254      src = cvt->buf;
  30.255      dst = cvt->buf;
  30.256 @@ -1166,13 +1166,13 @@
  30.257  
  30.258  /* Convert rate down by multiple of 2, for stereo */
  30.259  void SDLCALL
  30.260 -SDL_RateDIV2_c2 (SDL_AudioCVT * cvt, Uint16 format)
  30.261 +SDL_RateDIV2_c2(SDL_AudioCVT * cvt, Uint16 format)
  30.262  {
  30.263      int i;
  30.264      Uint8 *src, *dst;
  30.265  
  30.266  #ifdef DEBUG_CONVERT
  30.267 -    fprintf (stderr, "Converting audio rate / 2\n");
  30.268 +    fprintf(stderr, "Converting audio rate / 2\n");
  30.269  #endif
  30.270      src = cvt->buf;
  30.271      dst = cvt->buf;
  30.272 @@ -1205,13 +1205,13 @@
  30.273  
  30.274  /* Convert rate down by multiple of 2, for quad */
  30.275  void SDLCALL
  30.276 -SDL_RateDIV2_c4 (SDL_AudioCVT * cvt, Uint16 format)
  30.277 +SDL_RateDIV2_c4(SDL_AudioCVT * cvt, Uint16 format)
  30.278  {
  30.279      int i;
  30.280      Uint8 *src, *dst;
  30.281  
  30.282  #ifdef DEBUG_CONVERT
  30.283 -    fprintf (stderr, "Converting audio rate / 2\n");
  30.284 +    fprintf(stderr, "Converting audio rate / 2\n");
  30.285  #endif
  30.286      src = cvt->buf;
  30.287      dst = cvt->buf;
  30.288 @@ -1249,13 +1249,13 @@
  30.289  
  30.290  /* Convert rate down by multiple of 2, for 5.1 */
  30.291  void SDLCALL
  30.292 -SDL_RateDIV2_c6 (SDL_AudioCVT * cvt, Uint16 format)
  30.293 +SDL_RateDIV2_c6(SDL_AudioCVT * cvt, Uint16 format)
  30.294  {
  30.295      int i;
  30.296      Uint8 *src, *dst;
  30.297  
  30.298  #ifdef DEBUG_CONVERT
  30.299 -    fprintf (stderr, "Converting audio rate / 2\n");
  30.300 +    fprintf(stderr, "Converting audio rate / 2\n");
  30.301  #endif
  30.302      src = cvt->buf;
  30.303      dst = cvt->buf;
  30.304 @@ -1299,13 +1299,13 @@
  30.305  
  30.306  /* Very slow rate conversion routine */
  30.307  void SDLCALL
  30.308 -SDL_RateSLOW (SDL_AudioCVT * cvt, Uint16 format)
  30.309 +SDL_RateSLOW(SDL_AudioCVT * cvt, Uint16 format)
  30.310  {
  30.311      double ipos;
  30.312      int i, clen;
  30.313  
  30.314  #ifdef DEBUG_CONVERT
  30.315 -    fprintf (stderr, "Converting audio rate * %4.4f\n", 1.0 / cvt->rate_incr);
  30.316 +    fprintf(stderr, "Converting audio rate * %4.4f\n", 1.0 / cvt->rate_incr);
  30.317  #endif
  30.318      clen = (int) ((double) cvt->len_cvt / cvt->rate_incr);
  30.319      if (cvt->rate_incr > 1.0) {
  30.320 @@ -1378,11 +1378,11 @@
  30.321  }
  30.322  
  30.323  int
  30.324 -SDL_ConvertAudio (SDL_AudioCVT * cvt)
  30.325 +SDL_ConvertAudio(SDL_AudioCVT * cvt)
  30.326  {
  30.327      /* Make sure there's data to convert */
  30.328      if (cvt->buf == NULL) {
  30.329 -        SDL_SetError ("No buffer allocated for conversion");
  30.330 +        SDL_SetError("No buffer allocated for conversion");
  30.331          return (-1);
  30.332      }
  30.333      /* Return okay if no conversion is necessary */
  30.334 @@ -1403,9 +1403,9 @@
  30.335  */
  30.336  
  30.337  int
  30.338 -SDL_BuildAudioCVT (SDL_AudioCVT * cvt,
  30.339 -                   Uint16 src_format, Uint8 src_channels, int src_rate,
  30.340 -                   Uint16 dst_format, Uint8 dst_channels, int dst_rate)
  30.341 +SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
  30.342 +                  Uint16 src_format, Uint8 src_channels, int src_rate,
  30.343 +                  Uint16 dst_format, Uint8 dst_channels, int dst_rate)
  30.344  {
  30.345  /*printf("Build format %04x->%04x, channels %u->%u, rate %d->%d\n",
  30.346  		src_format, dst_format, src_channels, dst_channels, src_rate, dst_rate);*/
    31.1 --- a/src/audio/SDL_audiodev.c	Mon May 29 03:53:21 2006 +0000
    31.2 +++ b/src/audio/SDL_audiodev.c	Mon May 29 04:04:35 2006 +0000
    31.3 @@ -48,52 +48,52 @@
    31.4  
    31.5  
    31.6  int
    31.7 -SDL_OpenAudioPath (char *path, int maxlen, int flags, int classic)
    31.8 +SDL_OpenAudioPath(char *path, int maxlen, int flags, int classic)
    31.9  {
   31.10      const char *audiodev;
   31.11      int audio_fd;
   31.12      char audiopath[1024];
   31.13  
   31.14      /* Figure out what our audio device is */
   31.15 -    if (((audiodev = SDL_getenv ("SDL_PATH_DSP")) == NULL) &&
   31.16 -        ((audiodev = SDL_getenv ("AUDIODEV")) == NULL)) {
   31.17 +    if (((audiodev = SDL_getenv("SDL_PATH_DSP")) == NULL) &&
   31.18 +        ((audiodev = SDL_getenv("AUDIODEV")) == NULL)) {
   31.19          if (classic) {
   31.20              audiodev = _PATH_DEV_AUDIO;
   31.21          } else {
   31.22              struct stat sb;
   31.23  
   31.24              /* Added support for /dev/sound/\* in Linux 2.4 */
   31.25 -            if (((stat ("/dev/sound", &sb) == 0) && S_ISDIR (sb.st_mode))
   31.26 -                && ((stat (_PATH_DEV_DSP24, &sb) == 0)
   31.27 -                    && S_ISCHR (sb.st_mode))) {
   31.28 +            if (((stat("/dev/sound", &sb) == 0) && S_ISDIR(sb.st_mode))
   31.29 +                && ((stat(_PATH_DEV_DSP24, &sb) == 0)
   31.30 +                    && S_ISCHR(sb.st_mode))) {
   31.31                  audiodev = _PATH_DEV_DSP24;
   31.32              } else {
   31.33                  audiodev = _PATH_DEV_DSP;
   31.34              }
   31.35          }
   31.36      }
   31.37 -    audio_fd = open (audiodev, flags, 0);
   31.38 +    audio_fd = open(audiodev, flags, 0);
   31.39  
   31.40      /* If the first open fails, look for other devices */
   31.41 -    if ((audio_fd < 0) && (SDL_strlen (audiodev) < (sizeof (audiopath) - 3))) {
   31.42 +    if ((audio_fd < 0) && (SDL_strlen(audiodev) < (sizeof(audiopath) - 3))) {
   31.43          int exists, instance;
   31.44          struct stat sb;
   31.45  
   31.46          instance = 1;
   31.47          do {                    /* Don't use errno ENOENT - it may not be thread-safe */
   31.48 -            SDL_snprintf (audiopath, SDL_arraysize (audiopath),
   31.49 -                          "%s%d", audiodev, instance++);
   31.50 +            SDL_snprintf(audiopath, SDL_arraysize(audiopath),
   31.51 +                         "%s%d", audiodev, instance++);
   31.52              exists = 0;
   31.53 -            if (stat (audiopath, &sb) == 0) {
   31.54 +            if (stat(audiopath, &sb) == 0) {
   31.55                  exists = 1;
   31.56 -                audio_fd = open (audiopath, flags, 0);
   31.57 +                audio_fd = open(audiopath, flags, 0);
   31.58              }
   31.59          }
   31.60          while (exists && (audio_fd < 0));
   31.61          audiodev = audiopath;
   31.62      }
   31.63      if (path != NULL) {
   31.64 -        SDL_strlcpy (path, audiodev, maxlen);
   31.65 +        SDL_strlcpy(path, audiodev, maxlen);
   31.66          path[maxlen - 1] = '\0';
   31.67      }
   31.68      return (audio_fd);
   31.69 @@ -126,51 +126,51 @@
   31.70  };
   31.71  
   31.72  static int
   31.73 -OpenUserDefinedDevice (char *path, int maxlen, int flags)
   31.74 +OpenUserDefinedDevice(char *path, int maxlen, int flags)
   31.75  {
   31.76      const char *audiodev;
   31.77      int audio_fd;
   31.78  
   31.79      /* Figure out what our audio device is */
   31.80 -    if ((audiodev = SDL_getenv ("SDL_PATH_DSP")) == NULL) {
   31.81 -        audiodev = SDL_getenv ("AUDIODEV");
   31.82 +    if ((audiodev = SDL_getenv("SDL_PATH_DSP")) == NULL) {
   31.83 +        audiodev = SDL_getenv("AUDIODEV");
   31.84      }
   31.85      if (audiodev == NULL) {
   31.86          return -1;
   31.87      }
   31.88 -    audio_fd = open (audiodev, flags, 0);
   31.89 +    audio_fd = open(audiodev, flags, 0);
   31.90      if (path != NULL) {
   31.91 -        SDL_strlcpy (path, audiodev, maxlen);
   31.92 +        SDL_strlcpy(path, audiodev, maxlen);
   31.93          path[maxlen - 1] = '\0';
   31.94      }
   31.95      return audio_fd;
   31.96  }
   31.97  
   31.98  int
   31.99 -SDL_OpenAudioPath (char *path, int maxlen, int flags, int classic)
  31.100 +SDL_OpenAudioPath(char *path, int maxlen, int flags, int classic)
  31.101  {
  31.102      struct stat sb;
  31.103      int audio_fd;
  31.104      char audiopath[1024];
  31.105      int cycle;
  31.106  
  31.107 -    audio_fd = OpenUserDefinedDevice (path, maxlen, flags);
  31.108 +    audio_fd = OpenUserDefinedDevice(path, maxlen, flags);
  31.109      if (audio_fd != -1) {
  31.110          return audio_fd;
  31.111      }
  31.112  
  31.113      cycle = 0;
  31.114      while (devsettings[cycle][0] != '\0') {
  31.115 -        SDL_snprintf (audiopath, SDL_arraysize (audiopath),
  31.116 -                      _PATH_DEV_DSP,
  31.117 -                      devsettings[cycle][0],
  31.118 -                      devsettings[cycle][1], devsettings[cycle][2]);
  31.119 +        SDL_snprintf(audiopath, SDL_arraysize(audiopath),
  31.120 +                     _PATH_DEV_DSP,
  31.121 +                     devsettings[cycle][0],
  31.122 +                     devsettings[cycle][1], devsettings[cycle][2]);
  31.123  
  31.124 -        if (stat (audiopath, &sb) == 0) {
  31.125 -            audio_fd = open (audiopath, flags, 0);
  31.126 +        if (stat(audiopath, &sb) == 0) {
  31.127 +            audio_fd = open(audiopath, flags, 0);
  31.128              if (audio_fd > 0) {
  31.129                  if (path != NULL) {
  31.130 -                    SDL_strlcpy (path, audiopath, maxlen);
  31.131 +                    SDL_strlcpy(path, audiopath, maxlen);
  31.132                  }
  31.133                  return audio_fd;
  31.134              }
    32.1 --- a/src/audio/SDL_audiodev_c.h	Mon May 29 03:53:21 2006 +0000
    32.2 +++ b/src/audio/SDL_audiodev_c.h	Mon May 29 04:04:35 2006 +0000
    32.3 @@ -22,5 +22,5 @@
    32.4  #include "SDL_config.h"
    32.5  
    32.6  /* Open the audio device, storing the pathname in 'path'  */
    32.7 -extern int SDL_OpenAudioPath (char *path, int maxlen, int flags, int classic);
    32.8 +extern int SDL_OpenAudioPath(char *path, int maxlen, int flags, int classic);
    32.9  /* vi: set ts=4 sw=4 expandtab: */
    33.1 --- a/src/audio/SDL_mixer.c	Mon May 29 03:53:21 2006 +0000
    33.2 +++ b/src/audio/SDL_mixer.c	Mon May 29 04:04:35 2006 +0000
    33.3 @@ -90,7 +90,7 @@
    33.4  #define ADJUST_VOLUME_U8(s, v)	(s = (((s-128)*v)/SDL_MIX_MAXVOLUME)+128)
    33.5  
    33.6  void
    33.7 -SDL_MixAudio (Uint8 * dst, const Uint8 * src, Uint32 len, int volume)
    33.8 +SDL_MixAudio(Uint8 * dst, const Uint8 * src, Uint32 len, int volume)
    33.9  {
   33.10      Uint16 format;
   33.11  
   33.12 @@ -113,15 +113,15 @@
   33.13      case AUDIO_U8:
   33.14          {
   33.15  #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
   33.16 -            SDL_MixAudio_m68k_U8 ((char *) dst, (char *) src,
   33.17 -                                  (unsigned long) len, (long) volume,
   33.18 -                                  (char *) mix8);
   33.19 +            SDL_MixAudio_m68k_U8((char *) dst, (char *) src,
   33.20 +                                 (unsigned long) len, (long) volume,
   33.21 +                                 (char *) mix8);
   33.22  #else
   33.23              Uint8 src_sample;
   33.24  
   33.25              while (len--) {
   33.26                  src_sample = *src;
   33.27 -                ADJUST_VOLUME_U8 (src_sample, volume);
   33.28 +                ADJUST_VOLUME_U8(src_sample, volume);
   33.29                  *dst = mix8[*dst + src_sample];
   33.30                  ++dst;
   33.31                  ++src;
   33.32 @@ -133,19 +133,19 @@
   33.33      case AUDIO_S8:
   33.34          {
   33.35  #if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
   33.36 -            if (SDL_HasMMX ()) {
   33.37 -                SDL_MixAudio_MMX_S8 ((char *) dst, (char *) src,
   33.38 -                                     (unsigned int) len, (int) volume);
   33.39 +            if (SDL_HasMMX()) {
   33.40 +                SDL_MixAudio_MMX_S8((char *) dst, (char *) src,
   33.41 +                                    (unsigned int) len, (int) volume);
   33.42              } else
   33.43  #elif ((defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)) && defined(SDL_ASSEMBLY_ROUTINES)
   33.44 -            if (SDL_HasMMX ()) {
   33.45 -                SDL_MixAudio_MMX_S8_VC ((char *) dst, (char *) src,
   33.46 -                                        (unsigned int) len, (int) volume);
   33.47 +            if (SDL_HasMMX()) {
   33.48 +                SDL_MixAudio_MMX_S8_VC((char *) dst, (char *) src,
   33.49 +                                       (unsigned int) len, (int) volume);
   33.50              } else
   33.51  #endif
   33.52  #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
   33.53 -                SDL_MixAudio_m68k_S8 ((char *) dst, (char *) src,
   33.54 -                                      (unsigned long) len, (long) volume);
   33.55 +                SDL_MixAudio_m68k_S8((char *) dst, (char *) src,
   33.56 +                                     (unsigned long) len, (long) volume);
   33.57  #else
   33.58              {
   33.59                  Sint8 *dst8, *src8;
   33.60 @@ -158,7 +158,7 @@
   33.61                  dst8 = (Sint8 *) dst;
   33.62                  while (len--) {
   33.63                      src_sample = *src8;
   33.64 -                    ADJUST_VOLUME (src_sample, volume);
   33.65 +                    ADJUST_VOLUME(src_sample, volume);
   33.66                      dst_sample = *dst8 + src_sample;
   33.67                      if (dst_sample > max_audioval) {
   33.68                          *dst8 = max_audioval;
   33.69 @@ -178,19 +178,19 @@
   33.70      case AUDIO_S16LSB:
   33.71          {
   33.72  #if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
   33.73 -            if (SDL_HasMMX ()) {
   33.74 -                SDL_MixAudio_MMX_S16 ((char *) dst, (char *) src,
   33.75 -                                      (unsigned int) len, (int) volume);
   33.76 +            if (SDL_HasMMX()) {
   33.77 +                SDL_MixAudio_MMX_S16((char *) dst, (char *) src,
   33.78 +                                     (unsigned int) len, (int) volume);
   33.79              } else
   33.80  #elif ((defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__)) && defined(SDL_ASSEMBLY_ROUTINES)
   33.81 -            if (SDL_HasMMX ()) {
   33.82 -                SDL_MixAudio_MMX_S16_VC ((char *) dst, (char *) src,
   33.83 -                                         (unsigned int) len, (int) volume);
   33.84 +            if (SDL_HasMMX()) {
   33.85 +                SDL_MixAudio_MMX_S16_VC((char *) dst, (char *) src,
   33.86 +                                        (unsigned int) len, (int) volume);
   33.87              } else
   33.88  #endif
   33.89  #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
   33.90 -                SDL_MixAudio_m68k_S16LSB ((short *) dst, (short *) src,
   33.91 -                                          (unsigned long) len, (long) volume);
   33.92 +                SDL_MixAudio_m68k_S16LSB((short *) dst, (short *) src,
   33.93 +                                         (unsigned long) len, (long) volume);
   33.94  #else
   33.95              {
   33.96                  Sint16 src1, src2;
   33.97 @@ -201,7 +201,7 @@
   33.98                  len /= 2;
   33.99                  while (len--) {
  33.100                      src1 = ((src[1]) << 8 | src[0]);
  33.101 -                    ADJUST_VOLUME (src1, volume);
  33.102 +                    ADJUST_VOLUME(src1, volume);
  33.103                      src2 = ((dst[1]) << 8 | dst[0]);
  33.104                      src += 2;
  33.105                      dst_sample = src1 + src2;
  33.106 @@ -223,8 +223,8 @@
  33.107      case AUDIO_S16MSB:
  33.108          {
  33.109  #if defined(__GNUC__) && defined(__M68000__) && defined(SDL_ASSEMBLY_ROUTINES)
  33.110 -            SDL_MixAudio_m68k_S16MSB ((short *) dst, (short *) src,
  33.111 -                                      (unsigned long) len, (long) volume);
  33.112 +            SDL_MixAudio_m68k_S16MSB((short *) dst, (short *) src,
  33.113 +                                     (unsigned long) len, (long) volume);
  33.114  #else
  33.115              Sint16 src1, src2;
  33.116              int dst_sample;
  33.117 @@ -234,7 +234,7 @@
  33.118              len /= 2;
  33.119              while (len--) {
  33.120                  src1 = ((src[0]) << 8 | src[1]);
  33.121 -                ADJUST_VOLUME (src1, volume);
  33.122 +                ADJUST_VOLUME(src1, volume);
  33.123                  src2 = ((dst[0]) << 8 | dst[1]);
  33.124                  src += 2;
  33.125                  dst_sample = src1 + src2;
  33.126 @@ -253,7 +253,7 @@
  33.127          break;
  33.128  
  33.129      default:                   /* If this happens... FIXME! */
  33.130 -        SDL_SetError ("SDL_MixAudio(): unknown audio format");
  33.131 +        SDL_SetError("SDL_MixAudio(): unknown audio format");
  33.132          return;
  33.133      }
  33.134  }
    34.1 --- a/src/audio/SDL_mixer_MMX.c	Mon May 29 03:53:21 2006 +0000
    34.2 +++ b/src/audio/SDL_mixer_MMX.c	Mon May 29 04:04:35 2006 +0000
    34.3 @@ -37,49 +37,49 @@
    34.4  
    34.5  #if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
    34.6  void
    34.7 -SDL_MixAudio_MMX_S16 (char *dst, char *src, unsigned int size, int volume)
    34.8 +SDL_MixAudio_MMX_S16(char *dst, char *src, unsigned int size, int volume)
    34.9  {
   34.10 -    __asm__ __volatile__ ("	movl %3,%%eax\n"        /* eax = volume */
   34.11 -                          "	movl %2,%%edx\n"        /* edx = size */
   34.12 -                          "	shrl $4,%%edx\n"        /* process 16 bytes per iteration = 8 samples */
   34.13 -                          "	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 */
   34.14 -                          ".align 8\n" "	.mixloopS16:\n" "	movq (%1),%%mm1\n"      /* mm1 = a|b|c|d */
   34.15 -                          "	movq %%mm1,%%mm2\n"     /* mm2 = a|b|c|d */
   34.16 -                          "	movq 8(%1),%%mm4\n"     /* mm4 = e|f|g|h */
   34.17 -                          /* pré charger le buffer dst dans mm7 */
   34.18 -                          "	movq (%0),%%mm7\n"      /* mm7 = dst[0] */
   34.19 -                          /* multiplier par le volume */
   34.20 -                          "	pmullw %%mm0,%%mm1\n"   /* mm1 = l(a*v)|l(b*v)|l(c*v)|l(d*v) */
   34.21 -                          "	pmulhw %%mm0,%%mm2\n"   /* mm2 = h(a*v)|h(b*v)|h(c*v)|h(d*v) */
   34.22 -                          "	movq %%mm4,%%mm5\n"     /* mm5 = e|f|g|h */
   34.23 -                          "	pmullw %%mm0,%%mm4\n"   /* mm4 = l(e*v)|l(f*v)|l(g*v)|l(h*v) */
   34.24 -                          "	pmulhw %%mm0,%%mm5\n"   /* mm5 = h(e*v)|h(f*v)|h(g*v)|h(h*v) */
   34.25 -                          "	movq %%mm1,%%mm3\n"     /* mm3 = l(a*v)|l(b*v)|l(c*v)|l(d*v) */
   34.26 -                          "	punpckhwd %%mm2,%%mm1\n"        /* mm1 = a*v|b*v */
   34.27 -                          "	movq %%mm4,%%mm6\n"     /* mm6 = l(e*v)|l(f*v)|l(g*v)|l(h*v) */
   34.28 -                          "	punpcklwd %%mm2,%%mm3\n"        /* mm3 = c*v|d*v */
   34.29 -                          "	punpckhwd %%mm5,%%mm4\n"        /* mm4 = e*f|f*v */
   34.30 -                          "	punpcklwd %%mm5,%%mm6\n"        /* mm6 = g*v|h*v */
   34.31 -                          /* pré charger le buffer dst dans mm5 */
   34.32 -                          "	movq 8(%0),%%mm5\n"     /* mm5 = dst[1] */
   34.33 -                          /* diviser par 128 */
   34.34 -                          "	psrad $7,%%mm1\n"       /* mm1 = a*v/128|b*v/128 , 128 = SDL_MIX_MAXVOLUME */
   34.35 -                          "	add $16,%1\n" "	psrad $7,%%mm3\n"       /* mm3 = c*v/128|d*v/128 */
   34.36 -                          "	psrad $7,%%mm4\n"       /* mm4 = e*v/128|f*v/128 */
   34.37 -                          /* mm1 = le sample avec le volume modifié */
   34.38 -                          "	packssdw %%mm1,%%mm3\n" /* mm3 = s(a*v|b*v|c*v|d*v) */
   34.39 -                          "	psrad $7,%%mm6\n"       /* mm6= g*v/128|h*v/128 */
   34.40 -                          "	paddsw %%mm7,%%mm3\n"   /* mm3 = adjust_volume(src)+dst */
   34.41 -                          /* mm4 = le sample avec le volume modifié */
   34.42 -                          "	packssdw %%mm4,%%mm6\n" /* mm6 = s(e*v|f*v|g*v|h*v) */
   34.43 -                          "	movq %%mm3,(%0)\n" "	paddsw %%mm5,%%mm6\n"   /* mm6 = adjust_volume(src)+dst */
   34.44 -                          "	movq %%mm6,8(%0)\n"
   34.45 -                          "	add $16,%0\n"
   34.46 -                          "	dec %%edx\n"
   34.47 -                          "	jnz .mixloopS16\n"
   34.48 -                          "	emms\n"
   34.49 -                          ".endS16:\n"::"r" (dst), "r" (src),
   34.50 -                          "m" (size), "m" (volume):"eax", "edx", "memory");
   34.51 +    __asm__ __volatile__("	movl %3,%%eax\n"        /* eax = volume */
   34.52 +                         "	movl %2,%%edx\n"        /* edx = size */
   34.53 +                         "	shrl $4,%%edx\n"        /* process 16 bytes per iteration = 8 samples */
   34.54 +                         "	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 */
   34.55 +                         ".align 8\n" "	.mixloopS16:\n" "	movq (%1),%%mm1\n"      /* mm1 = a|b|c|d */
   34.56 +                         "	movq %%mm1,%%mm2\n"     /* mm2 = a|b|c|d */
   34.57 +                         "	movq 8(%1),%%mm4\n"     /* mm4 = e|f|g|h */
   34.58 +                         /* pré charger le buffer dst dans mm7 */
   34.59 +                         "	movq (%0),%%mm7\n"      /* mm7 = dst[0] */
   34.60 +                         /* multiplier par le volume */
   34.61 +                         "	pmullw %%mm0,%%mm1\n"   /* mm1 = l(a*v)|l(b*v)|l(c*v)|l(d*v) */
   34.62 +                         "	pmulhw %%mm0,%%mm2\n"   /* mm2 = h(a*v)|h(b*v)|h(c*v)|h(d*v) */
   34.63 +                         "	movq %%mm4,%%mm5\n"     /* mm5 = e|f|g|h */
   34.64 +                         "	pmullw %%mm0,%%mm4\n"   /* mm4 = l(e*v)|l(f*v)|l(g*v)|l(h*v) */
   34.65 +                         "	pmulhw %%mm0,%%mm5\n"   /* mm5 = h(e*v)|h(f*v)|h(g*v)|h(h*v) */
   34.66 +                         "	movq %%mm1,%%mm3\n"     /* mm3 = l(a*v)|l(b*v)|l(c*v)|l(d*v) */
   34.67 +                         "	punpckhwd %%mm2,%%mm1\n"        /* mm1 = a*v|b*v */
   34.68 +                         "	movq %%mm4,%%mm6\n"     /* mm6 = l(e*v)|l(f*v)|l(g*v)|l(h*v) */
   34.69 +                         "	punpcklwd %%mm2,%%mm3\n"        /* mm3 = c*v|d*v */
   34.70 +                         "	punpckhwd %%mm5,%%mm4\n"        /* mm4 = e*f|f*v */
   34.71 +                         "	punpcklwd %%mm5,%%mm6\n"        /* mm6 = g*v|h*v */
   34.72 +                         /* pré charger le buffer dst dans mm5 */
   34.73 +                         "	movq 8(%0),%%mm5\n"     /* mm5 = dst[1] */
   34.74 +                         /* diviser par 128 */
   34.75 +                         "	psrad $7,%%mm1\n"       /* mm1 = a*v/128|b*v/128 , 128 = SDL_MIX_MAXVOLUME */
   34.76 +                         "	add $16,%1\n" "	psrad $7,%%mm3\n"       /* mm3 = c*v/128|d*v/128 */
   34.77 +                         "	psrad $7,%%mm4\n"       /* mm4 = e*v/128|f*v/128 */
   34.78 +                         /* mm1 = le sample avec le volume modifié */
   34.79 +                         "	packssdw %%mm1,%%mm3\n" /* mm3 = s(a*v|b*v|c*v|d*v) */
   34.80 +                         "	psrad $7,%%mm6\n"       /* mm6= g*v/128|h*v/128 */
   34.81 +                         "	paddsw %%mm7,%%mm3\n"   /* mm3 = adjust_volume(src)+dst */
   34.82 +                         /* mm4 = le sample avec le volume modifié */
   34.83 +                         "	packssdw %%mm4,%%mm6\n" /* mm6 = s(e*v|f*v|g*v|h*v) */
   34.84 +                         "	movq %%mm3,(%0)\n" "	paddsw %%mm5,%%mm6\n"   /* mm6 = adjust_volume(src)+dst */
   34.85 +                         "	movq %%mm6,8(%0)\n"
   34.86 +                         "	add $16,%0\n"
   34.87 +                         "	dec %%edx\n"
   34.88 +                         "	jnz .mixloopS16\n"
   34.89 +                         "	emms\n"
   34.90 +                         ".endS16:\n"::"r"(dst), "r"(src),
   34.91 +                         "m"(size), "m"(volume):"eax", "edx", "memory");
   34.92  }
   34.93  
   34.94  
   34.95 @@ -89,32 +89,32 @@
   34.96  /*////////////////////////////////////////////// */
   34.97  
   34.98  void
   34.99 -SDL_MixAudio_MMX_S8 (char *dst, char *src, unsigned int size, int volume)
  34.100 +SDL_MixAudio_MMX_S8(char *dst, char *src, unsigned int size, int volume)
  34.101  {
  34.102 -    __asm__ __volatile__ ("	movl %3,%%eax\n"        /* eax = volume */
  34.103 -                          "	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 */
  34.104 -                          "	shr $3,%%edx\n" /* process 8 bytes per iteration = 8 samples */
  34.105 -                          "	cmp $0,%%edx\n" "	je .endS8\n" ".align 8\n" "	.mixloopS8:\n" "	pxor %%mm2,%%mm2\n"     /* mm2 = 0 */
  34.106 -                          "	movq (%1),%%mm1\n"      /* mm1 = a|b|c|d|e|f|g|h */
  34.107 -                          "	movq %%mm1,%%mm3\n"     /* mm3 = a|b|c|d|e|f|g|h */
  34.108 -                          /* on va faire le "sign extension" en faisant un cmp avec 0 qui retourne 1 si <0, 0 si >0 */
  34.109 -                          "	pcmpgtb %%mm1,%%mm2\n"  /* mm2 = 11111111|00000000|00000000.... */
  34.110 -                          "	punpckhbw %%mm2,%%mm1\n"        /* mm1 = 0|a|0|b|0|c|0|d */
  34.111 -                          "	punpcklbw %%mm2,%%mm3\n"        /* mm3 = 0|e|0|f|0|g|0|h */
  34.112 -                          "	movq (%0),%%mm2\n"      /* mm2 = destination */
  34.113 -                          "	pmullw %%mm0,%%mm1\n"   /* mm1 = v*a|v*b|v*c|v*d */
  34.114 -                          "	add $8,%1\n" "	pmullw %%mm0,%%mm3\n"   /* mm3 = v*e|v*f|v*g|v*h */
  34.115 -                          "	psraw $7,%%mm1\n"       /* mm1 = v*a/128|v*b/128|v*c/128|v*d/128  */
  34.116 -                          "	psraw $7,%%mm3\n"       /* mm3 = v*e/128|v*f/128|v*g/128|v*h/128 */
  34.117 -                          "	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 */
  34.118 -                          "	paddsb %%mm2,%%mm3\n"   /* add to destination buffer */
  34.119 -                          "	movq %%mm3,(%0)\n"      /* store back to ram */
  34.120 -                          "	add $8,%0\n"
  34.121 -                          "	dec %%edx\n"
  34.122 -                          "	jnz .mixloopS8\n"
  34.123 -                          ".endS8:\n"
  34.124 -                          "	emms\n"::"r" (dst), "r" (src), "m" (size),
  34.125 -                          "m" (volume):"eax", "edx", "memory");
  34.126 +    __asm__ __volatile__("	movl %3,%%eax\n"        /* eax = volume */
  34.127 +                         "	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 */
  34.128 +                         "	shr $3,%%edx\n" /* process 8 bytes per iteration = 8 samples */
  34.129 +                         "	cmp $0,%%edx\n" "	je .endS8\n" ".align 8\n" "	.mixloopS8:\n" "	pxor %%mm2,%%mm2\n"     /* mm2 = 0 */
  34.130 +                         "	movq (%1),%%mm1\n"      /* mm1 = a|b|c|d|e|f|g|h */
  34.131 +                         "	movq %%mm1,%%mm3\n"     /* mm3 = a|b|c|d|e|f|g|h */
  34.132 +                         /* on va faire le "sign extension" en faisant un cmp avec 0 qui retourne 1 si <0, 0 si >0 */
  34.133 +                         "	pcmpgtb %%mm1,%%mm2\n"  /* mm2 = 11111111|00000000|00000000.... */
  34.134 +                         "	punpckhbw %%mm2,%%mm1\n"        /* mm1 = 0|a|0|b|0|c|0|d */
  34.135 +                         "	punpcklbw %%mm2,%%mm3\n"        /* mm3 = 0|e|0|f|0|g|0|h */
  34.136 +                         "	movq (%0),%%mm2\n"      /* mm2 = destination */
  34.137 +                         "	pmullw %%mm0,%%mm1\n"   /* mm1 = v*a|v*b|v*c|v*d */
  34.138 +                         "	add $8,%1\n" "	pmullw %%mm0,%%mm3\n"   /* mm3 = v*e|v*f|v*g|v*h */
  34.139 +                         "	psraw $7,%%mm1\n"       /* mm1 = v*a/128|v*b/128|v*c/128|v*d/128  */
  34.140 +                         "	psraw $7,%%mm3\n"       /* mm3 = v*e/128|v*f/128|v*g/128|v*h/128 */
  34.141 +                         "	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 */
  34.142 +                         "	paddsb %%mm2,%%mm3\n"   /* add to destination buffer */
  34.143 +                         "	movq %%mm3,(%0)\n"      /* store back to ram */
  34.144 +                         "	add $8,%0\n"
  34.145 +                         "	dec %%edx\n"
  34.146 +                         "	jnz .mixloopS8\n"
  34.147 +                         ".endS8:\n"
  34.148 +                         "	emms\n"::"r"(dst), "r"(src), "m"(size),
  34.149 +                         "m"(volume):"eax", "edx", "memory");
  34.150  }
  34.151  #endif
  34.152  /* vi: set ts=4 sw=4 expandtab: */
    35.1 --- a/src/audio/SDL_mixer_MMX.h	Mon May 29 03:53:21 2006 +0000
    35.2 +++ b/src/audio/SDL_mixer_MMX.h	Mon May 29 04:04:35 2006 +0000
    35.3 @@ -9,7 +9,7 @@
    35.4  #include "SDL_config.h"
    35.5  
    35.6  #if defined(__GNUC__) && defined(__i386__) && defined(SDL_ASSEMBLY_ROUTINES)
    35.7 -void SDL_MixAudio_MMX_S16 (char *, char *, unsigned int, int);
    35.8 -void SDL_MixAudio_MMX_S8 (char *, char *, unsigned int, int);
    35.9 +void SDL_MixAudio_MMX_S16(char *, char *, unsigned int, int);
   35.10 +void SDL_MixAudio_MMX_S8(char *, char *, unsigned int, int);
   35.11  #endif
   35.12  /* vi: set ts=4 sw=4 expandtab: */
    36.1 --- a/src/audio/SDL_mixer_MMX_VC.c	Mon May 29 03:53:21 2006 +0000
    36.2 +++ b/src/audio/SDL_mixer_MMX_VC.c	Mon May 29 04:04:35 2006 +0000
    36.3 @@ -38,7 +38,7 @@
    36.4  ////////////////////////////////////////////////
    36.5  
    36.6  void
    36.7 -SDL_MixAudio_MMX_S16_VC (char *dst, char *src, unsigned int nSize, int volume)
    36.8 +SDL_MixAudio_MMX_S16_VC(char *dst, char *src, unsigned int nSize, int volume)
    36.9  {
   36.10      __asm {
   36.11  
   36.12 @@ -102,7 +102,7 @@
   36.13  ////////////////////////////////////////////////
   36.14  
   36.15  void
   36.16 -SDL_MixAudio_MMX_S8_VC (char *dst, char *src, unsigned int nSize, int volume)
   36.17 +SDL_MixAudio_MMX_S8_VC(char *dst, char *src, unsigned int nSize, int volume)
   36.18  {
   36.19      _asm {
   36.20  
    37.1 --- a/src/audio/SDL_mixer_MMX_VC.h	Mon May 29 03:53:21 2006 +0000
    37.2 +++ b/src/audio/SDL_mixer_MMX_VC.h	Mon May 29 04:04:35 2006 +0000
    37.3 @@ -31,7 +31,7 @@
    37.4     Assumes buffer size in bytes is a multiple of 16
    37.5     Assumes SDL_MIX_MAXVOLUME = 128
    37.6  */
    37.7 -void SDL_MixAudio_MMX_S16_VC (char *, char *, unsigned int, int);
    37.8 -void SDL_MixAudio_MMX_S8_VC (char *, char *, unsigned int, int);
    37.9 +void SDL_MixAudio_MMX_S16_VC(char *, char *, unsigned int, int);
   37.10 +void SDL_MixAudio_MMX_S8_VC(char *, char *, unsigned int, int);
   37.11  #endif
   37.12  /* vi: set ts=4 sw=4 expandtab: */
    38.1 --- a/src/audio/SDL_mixer_m68k.c	Mon May 29 03:53:21 2006 +0000
    38.2 +++ b/src/audio/SDL_mixer_m68k.c	Mon May 29 04:04:35 2006 +0000
    38.3 @@ -29,112 +29,112 @@
    38.4  
    38.5  #if defined(__M68000__) && defined(__GNUC__)
    38.6  void
    38.7 -SDL_MixAudio_m68k_U8 (char *dst, char *src, long len, long volume, char *mix8)
    38.8 +SDL_MixAudio_m68k_U8(char *dst, char *src, long len, long volume, char *mix8)
    38.9  {
   38.10 -    __asm__ __volatile__ ("tstl	%2\n" "	beqs	stoploop_u8\n" "mixloop_u8:\n"
   38.11 -                          /* Mix a sample */
   38.12 -                          "	moveq	#0,%%d0\n" "	moveq	#0,%%d1\n" "	moveb	%1@+,%%d0\n"    /* d0 = *src++ */
   38.13 -                          "	sub	#128,%%d0\n"    /* d0 -= 128 */
   38.14 -                          "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
   38.15 -                          "	moveb	%0@,%%d1\n"     /* d1 = *dst */
   38.16 -                          "	asr	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
   38.17 -                          "	add	#128,%%d0\n"    /* d0 += 128 */
   38.18 -                          "	add	%%d1,%%d0\n"
   38.19 -                          "	moveb	%4@(%%d0:w),%0@+\n"
   38.20 -                          /* Loop till done */
   38.21 -                          "	subql	#1,%2\n" "	bhis	mixloop_u8\n" "stoploop_u8:\n": /* no return value */
   38.22 -                          :     /* input */
   38.23 -                          "a" (dst), "a" (src), "d" (len), "d" (volume), "a" (mix8):    /* clobbered registers */
   38.24 -                          "d0", "d1", "cc", "memory");
   38.25 +    __asm__ __volatile__("tstl	%2\n" "	beqs	stoploop_u8\n" "mixloop_u8:\n"
   38.26 +                         /* Mix a sample */
   38.27 +                         "	moveq	#0,%%d0\n" "	moveq	#0,%%d1\n" "	moveb	%1@+,%%d0\n"    /* d0 = *src++ */
   38.28 +                         "	sub	#128,%%d0\n"    /* d0 -= 128 */
   38.29 +                         "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
   38.30 +                         "	moveb	%0@,%%d1\n"     /* d1 = *dst */
   38.31 +                         "	asr	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
   38.32 +                         "	add	#128,%%d0\n"    /* d0 += 128 */
   38.33 +                         "	add	%%d1,%%d0\n"
   38.34 +                         "	moveb	%4@(%%d0:w),%0@+\n"
   38.35 +                         /* Loop till done */
   38.36 +                         "	subql	#1,%2\n" "	bhis	mixloop_u8\n" "stoploop_u8:\n": /* no return value */
   38.37 +                         :      /* input */
   38.38 +                         "a"(dst), "a"(src), "d"(len), "d"(volume), "a"(mix8):  /* clobbered registers */
   38.39 +                         "d0", "d1", "cc", "memory");
   38.40  }
   38.41  
   38.42  void
   38.43 -SDL_MixAudio_m68k_S8 (char *dst, char *src, long len, long volume)
   38.44 +SDL_MixAudio_m68k_S8(char *dst, char *src, long len, long volume)
   38.45  {
   38.46 -    __asm__ __volatile__ ("tstl	%2\n"
   38.47 -                          "	beqs	stoploop_s8\n"
   38.48 -                          "	moveq	#-128,%%d2\n"
   38.49 -                          "	moveq	#127,%%d3\n" "mixloop_s8:\n"
   38.50 -                          /* Mix a sample */
   38.51 -                          "	moveq	#0,%%d0\n" "	moveq	#0,%%d1\n" "	moveb	%1@+,%%d0\n"    /* d0 = *src++ */
   38.52 -                          "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
   38.53 -                          "	moveb	%0@,%%d1\n"     /* d1 = *dst */
   38.54 -                          "	asr	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
   38.55 -                          "	add	%%d1,%%d0\n"
   38.56 -                          "	cmp	%%d2,%%d0\n"
   38.57 -                          "	bges	lower_limit_s8\n"
   38.58 -                          "	move	%%d2,%%d0\n"
   38.59 -                          "lower_limit_s8:\n"
   38.60 -                          "	cmp	%%d3,%%d0\n"
   38.61 -                          "	bles	upper_limit_s8\n"
   38.62 -                          "	move	%%d3,%%d0\n"
   38.63 -                          "upper_limit_s8:\n" "	moveb	%%d0,%0@+\n"
   38.64 -                          /* Loop till done */
   38.65 -                          "	subql	#1,%2\n" "	bhis	mixloop_s8\n" "stoploop_s8:\n": /* no return value */
   38.66 -                          :     /* input */
   38.67 -                          "a" (dst), "a" (src), "d" (len), "d" (volume):        /* clobbered registers */
   38.68 -                          "d0", "d1", "d2", "d3", "cc", "memory");
   38.69 +    __asm__ __volatile__("tstl	%2\n"
   38.70 +                         "	beqs	stoploop_s8\n"
   38.71 +                         "	moveq	#-128,%%d2\n"
   38.72 +                         "	moveq	#127,%%d3\n" "mixloop_s8:\n"
   38.73 +                         /* Mix a sample */
   38.74 +                         "	moveq	#0,%%d0\n" "	moveq	#0,%%d1\n" "	moveb	%1@+,%%d0\n"    /* d0 = *src++ */
   38.75 +                         "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
   38.76 +                         "	moveb	%0@,%%d1\n"     /* d1 = *dst */
   38.77 +                         "	asr	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
   38.78 +                         "	add	%%d1,%%d0\n"
   38.79 +                         "	cmp	%%d2,%%d0\n"
   38.80 +                         "	bges	lower_limit_s8\n"
   38.81 +                         "	move	%%d2,%%d0\n"
   38.82 +                         "lower_limit_s8:\n"
   38.83 +                         "	cmp	%%d3,%%d0\n"
   38.84 +                         "	bles	upper_limit_s8\n"
   38.85 +                         "	move	%%d3,%%d0\n"
   38.86 +                         "upper_limit_s8:\n" "	moveb	%%d0,%0@+\n"
   38.87 +                         /* Loop till done */
   38.88 +                         "	subql	#1,%2\n" "	bhis	mixloop_s8\n" "stoploop_s8:\n": /* no return value */
   38.89 +                         :      /* input */
   38.90 +                         "a"(dst), "a"(src), "d"(len), "d"(volume):     /* clobbered registers */
   38.91 +                         "d0", "d1", "d2", "d3", "cc", "memory");
   38.92  }
   38.93  
   38.94  void
   38.95 -SDL_MixAudio_m68k_S16MSB (short *dst, short *src, long len, long volume)
   38.96 +SDL_MixAudio_m68k_S16MSB(short *dst, short *src, long len, long volume)
   38.97  {
   38.98 -    __asm__ __volatile__ ("tstl	%2\n"
   38.99 -                          "	beqs	stoploop_s16msb\n"
  38.100 -                          "	movel	#-32768,%%d2\n"
  38.101 -                          "	movel	#32767,%%d3\n"
  38.102 -                          "	lsrl	#1,%2\n" "mixloop_s16msb:\n"
  38.103 -                          /* Mix a sample */
  38.104 -                          "	move	%1@+,%%d0\n"    /* d0 = *src++ */
  38.105 -                          "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
  38.106 -                          "	move	%0@,%%d1\n"     /* d1 = *dst */
  38.107 -                          "	extl	%%d1\n" /* extend d1 to 32 bits */
  38.108 -                          "	asrl	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
  38.109 -                          "	addl	%%d1,%%d0\n"
  38.110 -                          "	cmpl	%%d2,%%d0\n"
  38.111 -                          "	bges	lower_limit_s16msb\n"
  38.112 -                          "	move	%%d2,%%d0\n"
  38.113 -                          "lower_limit_s16msb:\n"
  38.114 -                          "	cmpl	%%d3,%%d0\n"
  38.115 -                          "	bles	upper_limit_s16msb\n"
  38.116 -                          "	move	%%d3,%%d0\n"
  38.117 -                          "upper_limit_s16msb:\n" "	move	%%d0,%0@+\n"
  38.118 -                          /* Loop till done */
  38.119 -                          "	subql	#1,%2\n" "	bhis	mixloop_s16msb\n" "stoploop_s16msb:\n": /* no return value */
  38.120 -                          :     /* input */
  38.121 -                          "a" (dst), "a" (src), "d" (len), "d" (volume):        /* clobbered registers */
  38.122 -                          "d0", "d1", "d2", "d3", "cc", "memory");
  38.123 +    __asm__ __volatile__("tstl	%2\n"
  38.124 +                         "	beqs	stoploop_s16msb\n"
  38.125 +                         "	movel	#-32768,%%d2\n"
  38.126 +                         "	movel	#32767,%%d3\n"
  38.127 +                         "	lsrl	#1,%2\n" "mixloop_s16msb:\n"
  38.128 +                         /* Mix a sample */
  38.129 +                         "	move	%1@+,%%d0\n"    /* d0 = *src++ */
  38.130 +                         "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
  38.131 +                         "	move	%0@,%%d1\n"     /* d1 = *dst */
  38.132 +                         "	extl	%%d1\n" /* extend d1 to 32 bits */
  38.133 +                         "	asrl	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
  38.134 +                         "	addl	%%d1,%%d0\n"
  38.135 +                         "	cmpl	%%d2,%%d0\n"
  38.136 +                         "	bges	lower_limit_s16msb\n"
  38.137 +                         "	move	%%d2,%%d0\n"
  38.138 +                         "lower_limit_s16msb:\n"
  38.139 +                         "	cmpl	%%d3,%%d0\n"
  38.140 +                         "	bles	upper_limit_s16msb\n"
  38.141 +                         "	move	%%d3,%%d0\n"
  38.142 +                         "upper_limit_s16msb:\n" "	move	%%d0,%0@+\n"
  38.143 +                         /* Loop till done */
  38.144 +                         "	subql	#1,%2\n" "	bhis	mixloop_s16msb\n" "stoploop_s16msb:\n": /* no return value */
  38.145 +                         :      /* input */
  38.146 +                         "a"(dst), "a"(src), "d"(len), "d"(volume):     /* clobbered registers */
  38.147 +                         "d0", "d1", "d2", "d3", "cc", "memory");
  38.148  }
  38.149  
  38.150  void
  38.151 -SDL_MixAudio_m68k_S16LSB (short *dst, short *src, long len, long volume)
  38.152 +SDL_MixAudio_m68k_S16LSB(short *dst, short *src, long len, long volume)
  38.153  {
  38.154 -    __asm__ __volatile__ ("tstl	%2\n"
  38.155 -                          "	beqs	stoploop_s16lsb\n"
  38.156 -                          "	movel	#-32768,%%d2\n"
  38.157 -                          "	movel	#32767,%%d3\n"
  38.158 -                          "	lsrl	#1,%2\n" "mixloop_s16lsb:\n"
  38.159 -                          /* Mix a sample */
  38.160 -                          "	move	%1@+,%%d0\n"    /* d0 = *src++ */
  38.161 -                          "	rorw	#8,%%d0\n" "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
  38.162 -                          "	move	%0@,%%d1\n"     /* d1 = *dst */
  38.163 -                          "	rorw	#8,%%d1\n" "	extl	%%d1\n" /* extend d1 to 32 bits */
  38.164 -                          "	asrl	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
  38.165 -                          "	addl	%%d1,%%d0\n"
  38.166 -                          "	cmpl	%%d2,%%d0\n"
  38.167 -                          "	bges	lower_limit_s16lsb\n"
  38.168 -                          "	move	%%d2,%%d0\n"
  38.169 -                          "lower_limit_s16lsb:\n"
  38.170 -                          "	cmpl	%%d3,%%d0\n"
  38.171 -                          "	bles	upper_limit_s16lsb\n"
  38.172 -                          "	move	%%d3,%%d0\n"
  38.173 -                          "upper_limit_s16lsb:\n"
  38.174 -                          "	rorw	#8,%%d0\n" "	move	%%d0,%0@+\n"
  38.175 -                          /* Loop till done */
  38.176 -                          "	subql	#1,%2\n" "	bhis	mixloop_s16lsb\n" "stoploop_s16lsb:\n": /* no return value */
  38.177 -                          :     /* input */
  38.178 -                          "a" (dst), "a" (src), "d" (len), "d" (volume):        /* clobbered registers */
  38.179 -                          "d0", "d1", "d2", "d3", "cc", "memory");
  38.180 +    __asm__ __volatile__("tstl	%2\n"
  38.181 +                         "	beqs	stoploop_s16lsb\n"
  38.182 +                         "	movel	#-32768,%%d2\n"
  38.183 +                         "	movel	#32767,%%d3\n"
  38.184 +                         "	lsrl	#1,%2\n" "mixloop_s16lsb:\n"
  38.185 +                         /* Mix a sample */
  38.186 +                         "	move	%1@+,%%d0\n"    /* d0 = *src++ */
  38.187 +                         "	rorw	#8,%%d0\n" "	muls	%3,%%d0\n"      /* d0 *= volume (0<=volume<=128) */
  38.188 +                         "	move	%0@,%%d1\n"     /* d1 = *dst */
  38.189 +                         "	rorw	#8,%%d1\n" "	extl	%%d1\n" /* extend d1 to 32 bits */
  38.190 +                         "	asrl	#7,%%d0\n"      /* d0 /= 128 (SDL_MIX_MAXVOLUME) */
  38.191 +                         "	addl	%%d1,%%d0\n"
  38.192 +                         "	cmpl	%%d2,%%d0\n"
  38.193 +                         "	bges	lower_limit_s16lsb\n"
  38.194 +                         "	move	%%d2,%%d0\n"
  38.195 +                         "lower_limit_s16lsb:\n"
  38.196 +                         "	cmpl	%%d3,%%d0\n"
  38.197 +                         "	bles	upper_limit_s16lsb\n"
  38.198 +                         "	move	%%d3,%%d0\n"
  38.199 +                         "upper_limit_s16lsb:\n"
  38.200 +                         "	rorw	#8,%%d0\n" "	move	%%d0,%0@+\n"
  38.201 +                         /* Loop till done */
  38.202 +                         "	subql	#1,%2\n" "	bhis	mixloop_s16lsb\n" "stoploop_s16lsb:\n": /* no return value */
  38.203 +                         :      /* input */
  38.204 +                         "a"(dst), "a"(src), "d"(len), "d"(volume):     /* clobbered registers */
  38.205 +                         "d0", "d1", "d2", "d3", "cc", "memory");
  38.206  }
  38.207  #endif
  38.208  /* vi: set ts=4 sw=4 expandtab: */
    39.1 --- a/src/audio/SDL_mixer_m68k.h	Mon May 29 03:53:21 2006 +0000
    39.2 +++ b/src/audio/SDL_mixer_m68k.h	Mon May 29 04:04:35 2006 +0000
    39.3 @@ -28,11 +28,11 @@
    39.4  */
    39.5  
    39.6  #if defined(__M68000__) && defined(__GNUC__)
    39.7 -void SDL_MixAudio_m68k_U8 (char *dst, char *src, long len, long volume,
    39.8 -                           char *mix8);
    39.9 -void SDL_MixAudio_m68k_S8 (char *dst, char *src, long len, long volume);
   39.10 +void SDL_MixAudio_m68k_U8(char *dst, char *src, long len, long volume,
   39.11 +                          char *mix8);
   39.12 +void SDL_MixAudio_m68k_S8(char *dst, char *src, long len, long volume);
   39.13  
   39.14 -void SDL_MixAudio_m68k_S16MSB (short *dst, short *src, long len, long volume);
   39.15 -void SDL_MixAudio_m68k_S16LSB (short *dst, short *src, long len, long volume);
   39.16 +void SDL_MixAudio_m68k_S16MSB(short *dst, short *src, long len, long volume);
   39.17 +void SDL_MixAudio_m68k_S16LSB(short *dst, short *src, long len, long volume);
   39.18  #endif
   39.19  /* vi: set ts=4 sw=4 expandtab: */
    40.1 --- a/src/audio/SDL_wave.c	Mon May 29 03:53:21 2006 +0000
    40.2 +++ b/src/audio/SDL_wave.c	Mon May 29 04:04:35 2006 +0000
    40.3 @@ -27,7 +27,7 @@
    40.4  #include "SDL_wave.h"
    40.5  
    40.6  
    40.7 -static int ReadChunk (SDL_RWops * src, Chunk * chunk);
    40.8 +static int ReadChunk(SDL_RWops * src, Chunk * chunk);
    40.9  
   40.10  struct MS_ADPCM_decodestate
   40.11  {
   40.12 @@ -47,45 +47,45 @@
   40.13  } MS_ADPCM_state;
   40.14  
   40.15  static int
   40.16 -InitMS_ADPCM (WaveFMT * format)
   40.17 +InitMS_ADPCM(WaveFMT * format)
   40.18  {
   40.19      Uint8 *rogue_feel;
   40.20      Uint16 extra_info;
   40.21      int i;
   40.22  
   40.23      /* Set the rogue pointer to the MS_ADPCM specific data */
   40.24 -    MS_ADPCM_state.wavefmt.encoding = SDL_SwapLE16 (format->encoding);
   40.25 -    MS_ADPCM_state.wavefmt.channels = SDL_SwapLE16 (format->channels);
   40.26 -    MS_ADPCM_state.wavefmt.frequency = SDL_SwapLE32 (format->frequency);
   40.27 -    MS_ADPCM_state.wavefmt.byterate = SDL_SwapLE32 (format->byterate);
   40.28 -    MS_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16 (format->blockalign);
   40.29 +    MS_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
   40.30 +    MS_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
   40.31 +    MS_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
   40.32 +    MS_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate);
   40.33 +    MS_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign);
   40.34      MS_ADPCM_state.wavefmt.bitspersample =
   40.35 -        SDL_SwapLE16 (format->bitspersample);
   40.36 -    rogue_feel = (Uint8 *) format + sizeof (*format);
   40.37 -    if (sizeof (*format) == 16) {
   40.38 +        SDL_SwapLE16(format->bitspersample);
   40.39 +    rogue_feel = (Uint8 *) format + sizeof(*format);
   40.40 +    if (sizeof(*format) == 16) {
   40.41          extra_info = ((rogue_feel[1] << 8) | rogue_feel[0]);
   40.42 -        rogue_feel += sizeof (Uint16);
   40.43 +        rogue_feel += sizeof(Uint16);
   40.44      }
   40.45      MS_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1] << 8) | rogue_feel[0]);
   40.46 -    rogue_feel += sizeof (Uint16);
   40.47 +    rogue_feel += sizeof(Uint16);
   40.48      MS_ADPCM_state.wNumCoef = ((rogue_feel[1] << 8) | rogue_feel[0]);
   40.49 -    rogue_feel += sizeof (Uint16);
   40.50 +    rogue_feel += sizeof(Uint16);
   40.51      if (MS_ADPCM_state.wNumCoef != 7) {
   40.52 -        SDL_SetError ("Unknown set of MS_ADPCM coefficients");
   40.53 +        SDL_SetError("Unknown set of MS_ADPCM coefficients");
   40.54          return (-1);
   40.55      }
   40.56      for (i = 0; i < MS_ADPCM_state.wNumCoef; ++i) {
   40.57          MS_ADPCM_state.aCoeff[i][0] = ((rogue_feel[1] << 8) | rogue_feel[0]);
   40.58 -        rogue_feel += sizeof (Uint16);
   40.59 +        rogue_feel += sizeof(Uint16);
   40.60          MS_ADPCM_state.aCoeff[i][1] = ((rogue_feel[1] << 8) | rogue_feel[0]);
   40.61 -        rogue_feel += sizeof (Uint16);
   40.62 +        rogue_feel += sizeof(Uint16);
   40.63      }
   40.64      return (0);
   40.65  }
   40.66  
   40.67  static Sint32
   40.68 -MS_ADPCM_nibble (struct MS_ADPCM_decodestate *state,
   40.69 -                 Uint8 nybble, Sint16 * coeff)
   40.70 +MS_ADPCM_nibble(struct MS_ADPCM_decodestate *state,
   40.71 +                Uint8 nybble, Sint16 * coeff)
   40.72  {
   40.73      const Sint32 max_audioval = ((1 << (16 - 1)) - 1);
   40.74      const Sint32 min_audioval = -(1 << (16 - 1));
   40.75 @@ -118,7 +118,7 @@
   40.76  }
   40.77  
   40.78  static int
   40.79 -MS_ADPCM_decode (Uint8 ** audio_buf, Uint32 * audio_len)
   40.80 +MS_ADPCM_decode(Uint8 ** audio_buf, Uint32 * audio_len)
   40.81  {
   40.82      struct MS_ADPCM_decodestate *state[2];
   40.83      Uint8 *freeable, *encoded, *decoded;
   40.84 @@ -133,10 +133,10 @@
   40.85      freeable = *audio_buf;
   40.86      *audio_len = (encoded_len / MS_ADPCM_state.wavefmt.blockalign) *
   40.87          MS_ADPCM_state.wSamplesPerBlock *
   40.88 -        MS_ADPCM_state.wavefmt.channels * sizeof (Sint16);
   40.89 -    *audio_buf = (Uint8 *) SDL_malloc (*audio_len);
   40.90 +        MS_ADPCM_state.wavefmt.channels * sizeof(Sint16);
   40.91 +    *audio_buf = (Uint8 *) SDL_malloc(*audio_len);
   40.92      if (*audio_buf == NULL) {
   40.93 -        SDL_Error (SDL_ENOMEM);
   40.94 +        SDL_Error(SDL_ENOMEM);
   40.95          return (-1);
   40.96      }
   40.97      decoded = *audio_buf;
   40.98 @@ -152,22 +152,22 @@
   40.99              state[1]->hPredictor = *encoded++;
  40.100          }
  40.101          state[0]->iDelta = ((encoded[1] << 8) | encoded[0]);
  40.102 -        encoded += sizeof (Sint16);
  40.103 +        encoded += sizeof(Sint16);
  40.104          if (stereo) {
  40.105              state[1]->iDelta = ((encoded[1] << 8) | encoded[0]);
  40.106 -            encoded += sizeof (Sint16);
  40.107 +            encoded += sizeof(Sint16);
  40.108          }
  40.109          state[0]->iSamp1 = ((encoded[1] << 8) | encoded[0]);
  40.110 -        encoded += sizeof (Sint16);
  40.111 +        encoded += sizeof(Sint16);
  40.112          if (stereo) {
  40.113              state[1]->iSamp1 = ((encoded[1] << 8) | encoded[0]);
  40.114 -            encoded += sizeof (Sint16);
  40.115 +            encoded += sizeof(Sint16);
  40.116          }
  40.117          state[0]->iSamp2 = ((encoded[1] << 8) | encoded[0]);
  40.118 -        encoded += sizeof (Sint16);
  40.119 +        encoded += sizeof(Sint16);
  40.120          if (stereo) {
  40.121              state[1]->iSamp2 = ((encoded[1] << 8) | encoded[0]);
  40.122 -            encoded += sizeof (Sint16);
  40.123 +            encoded += sizeof(Sint16);
  40.124          }
  40.125          coeff[0] = MS_ADPCM_state.aCoeff[state[0]->hPredictor];
  40.126          coeff[1] = MS_ADPCM_state.aCoeff[state[1]->hPredictor];
  40.127 @@ -195,14 +195,14 @@
  40.128              MS_ADPCM_state.wavefmt.channels;
  40.129          while (samplesleft > 0) {
  40.130              nybble = (*encoded) >> 4;
  40.131 -            new_sample = MS_ADPCM_nibble (state[0], nybble, coeff[0]);
  40.132 +            new_sample = MS_ADPCM_nibble(state[0], nybble, coeff[0]);
  40.133              decoded[0] = new_sample & 0xFF;
  40.134              new_sample >>= 8;
  40.135              decoded[1] = new_sample & 0xFF;
  40.136              decoded += 2;
  40.137  
  40.138              nybble = (*encoded) & 0x0F;
  40.139 -            new_sample = MS_ADPCM_nibble (state[1], nybble, coeff[1]);
  40.140 +            new_sample = MS_ADPCM_nibble(state[1], nybble, coeff[1]);
  40.141              decoded[0] = new_sample & 0xFF;
  40.142              new_sample >>= 8;
  40.143              decoded[1] = new_sample & 0xFF;
  40.144 @@ -213,7 +213,7 @@
  40.145          }
  40.146          encoded_len -= MS_ADPCM_state.wavefmt.blockalign;
  40.147      }
  40.148 -    SDL_free (freeable);
  40.149 +    SDL_free(freeable);
  40.150      return (0);
  40.151  }
  40.152  
  40.153 @@ -231,30 +231,30 @@
  40.154  } IMA_ADPCM_state;
  40.155  
  40.156  static int
  40.157 -InitIMA_ADPCM (WaveFMT * format)
  40.158 +InitIMA_ADPCM(WaveFMT * format)
  40.159  {
  40.160      Uint8 *rogue_feel;
  40.161      Uint16 extra_info;
  40.162  
  40.163      /* Set the rogue pointer to the IMA_ADPCM specific data */
  40.164 -    IMA_ADPCM_state.wavefmt.encoding = SDL_SwapLE16 (format->encoding);
  40.165 -    IMA_ADPCM_state.wavefmt.channels = SDL_SwapLE16 (format->channels);
  40.166 -    IMA_ADPCM_state.wavefmt.frequency = SDL_SwapLE32 (format->frequency);
  40.167 -    IMA_ADPCM_state.wavefmt.byterate = SDL_SwapLE32 (format->byterate);
  40.168 -    IMA_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16 (format->blockalign);
  40.169 +    IMA_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
  40.170 +    IMA_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
  40.171 +    IMA_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
  40.172 +    IMA_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate);
  40.173 +    IMA_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign);
  40.174      IMA_ADPCM_state.wavefmt.bitspersample =
  40.175 -        SDL_SwapLE16 (format->bitspersample);
  40.176 -    rogue_feel = (Uint8 *) format + sizeof (*format);
  40.177 -    if (sizeof (*format) == 16) {
  40.178 +        SDL_SwapLE16(format->bitspersample);
  40.179 +    rogue_feel = (Uint8 *) format + sizeof(*format);
  40.180 +    if (sizeof(*format) == 16) {
  40.181          extra_info = ((rogue_feel[1] << 8) | rogue_feel[0]);
  40.182 -        rogue_feel += sizeof (Uint16);
  40.183 +        rogue_feel += sizeof(Uint16);
  40.184      }
  40.185      IMA_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1] << 8) | rogue_feel[0]);
  40.186      return (0);
  40.187  }
  40.188  
  40.189  static Sint32
  40.190 -IMA_ADPCM_nibble (struct IMA_ADPCM_decodestate *state, Uint8 nybble)
  40.191 +IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state, Uint8 nybble)
  40.192  {
  40.193      const Sint32 max_audioval = ((1 << (16 - 1)) - 1);
  40.194      const Sint32 min_audioval = -(1 << (16 - 1));
  40.195 @@ -308,9 +308,9 @@
  40.196  
  40.197  /* Fill the decode buffer with a channel block of data (8 samples) */
  40.198  static void
  40.199 -Fill_IMA_ADPCM_block (Uint8 * decoded, Uint8 * encoded,
  40.200 -                      int channel, int numchannels,
  40.201 -                      struct IMA_ADPCM_decodestate *state)
  40.202 +Fill_IMA_ADPCM_block(Uint8 * decoded, Uint8 * encoded,
  40.203 +                     int channel, int numchannels,
  40.204 +                     struct IMA_ADPCM_decodestate *state)
  40.205  {
  40.206      int i;
  40.207      Sint8 nybble;
  40.208 @@ -319,14 +319,14 @@
  40.209      decoded += (channel * 2);
  40.210      for (i = 0; i < 4; ++i) {
  40.211          nybble = (*encoded) & 0x0F;
  40.212 -        new_sample = IMA_ADPCM_nibble (state, nybble);
  40.213 +        new_sample = IMA_ADPCM_nibble(state, nybble);
  40.214          decoded[0] = new_sample & 0xFF;
  40.215          new_sample >>= 8;
  40.216          decoded[1] = new_sample & 0xFF;
  40.217          decoded += 2 * numchannels;
  40.218  
  40.219          nybble = (*encoded) >> 4;
  40.220 -        new_sample = IMA_ADPCM_nibble (state, nybble);
  40.221 +        new_sample = IMA_ADPCM_nibble(state, nybble);
  40.222          decoded[0] = new_sample & 0xFF;
  40.223          new_sample >>= 8;
  40.224          decoded[1] = new_sample & 0xFF;
  40.225 @@ -337,7 +337,7 @@
  40.226  }
  40.227  
  40.228  static int
  40.229 -IMA_ADPCM_decode (Uint8 ** audio_buf, Uint32 * audio_len)
  40.230 +IMA_ADPCM_decode(Uint8 ** audio_buf, Uint32 * audio_len)
  40.231  {
  40.232      struct IMA_ADPCM_decodestate *state;
  40.233      Uint8 *freeable, *encoded, *decoded;
  40.234 @@ -346,9 +346,9 @@
  40.235  
  40.236      /* Check to make sure we have enough variables in the state array */
  40.237      channels = IMA_ADPCM_state.wavefmt.channels;
  40.238 -    if (channels > SDL_arraysize (IMA_ADPCM_state.state)) {
  40.239 -        SDL_SetError ("IMA ADPCM decoder can only handle %d channels",
  40.240 -                      SDL_arraysize (IMA_ADPCM_state.state));
  40.241 +    if (channels > SDL_arraysize(IMA_ADPCM_state.state)) {
  40.242 +        SDL_SetError("IMA ADPCM decoder can only handle %d channels",
  40.243 +                     SDL_arraysize(IMA_ADPCM_state.state));
  40.244          return (-1);
  40.245      }
  40.246      state = IMA_ADPCM_state.state;
  40.247 @@ -359,10 +359,10 @@
  40.248      freeable = *audio_buf;
  40.249      *audio_len = (encoded_len / IMA_ADPCM_state.wavefmt.blockalign) *
  40.250          IMA_ADPCM_state.wSamplesPerBlock *
  40.251 -        IMA_ADPCM_state.wavefmt.channels * sizeof (Sint16);
  40.252 -    *audio_buf = (Uint8 *) SDL_malloc (*audio_len);
  40.253 +        IMA_ADPCM_state.wavefmt.channels * sizeof(Sint16);
  40.254 +    *audio_buf = (Uint8 *) SDL_malloc(*audio_len);
  40.255      if (*audio_buf == NULL) {
  40.256 -        SDL_Error (SDL_ENOMEM);
  40.257 +        SDL_Error(SDL_ENOMEM);
  40.258          return (-1);
  40.259      }
  40.260      decoded = *audio_buf;
  40.261 @@ -393,8 +393,8 @@
  40.262          samplesleft = (IMA_ADPCM_state.wSamplesPerBlock - 1) * channels;
  40.263          while (samplesleft > 0) {
  40.264              for (c = 0; c < channels; ++c) {
  40.265 -                Fill_IMA_ADPCM_block (decoded, encoded,
  40.266 -                                      c, channels, &state[c]);
  40.267 +                Fill_IMA_ADPCM_block(decoded, encoded,
  40.268 +                                     c, channels, &state[c]);
  40.269                  encoded += 4;
  40.270                  samplesleft -= 8;
  40.271              }
  40.272 @@ -402,13 +402,13 @@
  40.273          }
  40.274          encoded_len -= IMA_ADPCM_state.wavefmt.blockalign;
  40.275      }
  40.276 -    SDL_free (freeable);
  40.277 +    SDL_free(freeable);
  40.278      return (0);
  40.279  }
  40.280  
  40.281  SDL_AudioSpec *
  40.282 -SDL_LoadWAV_RW (SDL_RWops * src, int freesrc,
  40.283 -                SDL_AudioSpec * spec, Uint8 ** audio_buf, Uint32 * audio_len)
  40.284 +SDL_LoadWAV_RW(SDL_RWops * src, int freesrc,
  40.285 +               SDL_AudioSpec * spec, Uint8 ** audio_buf, Uint32 * audio_len)
  40.286  {
  40.287      int was_error;
  40.288      Chunk chunk;
  40.289 @@ -433,53 +433,53 @@
  40.290      }
  40.291  
  40.292      /* Check the magic header */
  40.293 -    RIFFchunk = SDL_ReadLE32 (src);
  40.294 -    wavelen = SDL_ReadLE32 (src);
  40.295 +    RIFFchunk = SDL_ReadLE32(src);
  40.296 +    wavelen = SDL_ReadLE32(src);
  40.297      if (wavelen == WAVE) {      /* The RIFFchunk has already been read */
  40.298          WAVEmagic = wavelen;
  40.299          wavelen = RIFFchunk;
  40.300          RIFFchunk = RIFF;
  40.301      } else {
  40.302 -        WAVEmagic = SDL_ReadLE32 (src);
  40.303 +        WAVEmagic = SDL_ReadLE32(src);
  40.304      }
  40.305      if ((RIFFchunk != RIFF) || (WAVEmagic != WAVE)) {
  40.306 -        SDL_SetError ("Unrecognized file type (not WAVE)");
  40.307 +        SDL_SetError("Unrecognized file type (not WAVE)");
  40.308          was_error = 1;
  40.309          goto done;
  40.310      }
  40.311 -    headerDiff += sizeof (Uint32);      /* for WAVE */
  40.312 +    headerDiff += sizeof(Uint32);       /* for WAVE */
  40.313  
  40.314      /* Read the audio data format chunk */
  40.315      chunk.data = NULL;
  40.316      do {
  40.317          if (chunk.data != NULL) {
  40.318 -            SDL_free (chunk.data);
  40.319 +            SDL_free(chunk.data);
  40.320          }
  40.321 -        lenread = ReadChunk (src, &chunk);
  40.322 +        lenread = ReadChunk(src, &chunk);
  40.323          if (lenread < 0) {
  40.324              was_error = 1;
  40.325              goto done;
  40.326          }
  40.327          /* 2 Uint32's for chunk header+len, plus the lenread */
  40.328 -        headerDiff += lenread + 2 * sizeof (Uint32);
  40.329 +        headerDiff += lenread + 2 * sizeof(Uint32);
  40.330      }
  40.331      while ((chunk.magic == FACT) || (chunk.magic == LIST));
  40.332  
  40.333      /* Decode the audio data format */
  40.334      format = (WaveFMT *) chunk.data;
  40.335      if (chunk.magic != FMT) {
  40.336 -        SDL_SetError ("Complex WAVE files not supported");
  40.337 +        SDL_SetError("Complex WAVE files not supported");
  40.338          was_error = 1;
  40.339          goto done;
  40.340      }
  40.341      MS_ADPCM_encoded = IMA_ADPCM_encoded = 0;
  40.342 -    switch (SDL_SwapLE16 (format->encoding)) {
  40.343 +    switch (SDL_SwapLE16(format->encoding)) {
  40.344      case PCM_CODE:
  40.345          /* We can understand this */
  40.346          break;
  40.347      case MS_ADPCM_CODE:
  40.348          /* Try to understand this */
  40.349 -        if (InitMS_ADPCM (format) < 0) {
  40.350 +        if (InitMS_ADPCM(format) < 0) {
  40.351              was_error = 1;
  40.352              goto done;
  40.353          }
  40.354 @@ -487,26 +487,26 @@
  40.355          break;
  40.356      case IMA_ADPCM_CODE:
  40.357          /* Try to understand this */
  40.358 -        if (InitIMA_ADPCM (format) < 0) {
  40.359 +        if (InitIMA_ADPCM(format) < 0) {
  40.360              was_error = 1;
  40.361              goto done;
  40.362          }
  40.363          IMA_ADPCM_encoded = 1;
  40.364          break;
  40.365      case MP3_CODE:
  40.366 -        SDL_SetError ("MPEG Layer 3 data not supported",
  40.367 -                      SDL_SwapLE16 (format->encoding));
  40.368 +        SDL_SetError("MPEG Layer 3 data not supported",
  40.369 +                     SDL_SwapLE16(format->encoding));
  40.370          was_error = 1;
  40.371          goto done;
  40.372      default:
  40.373 -        SDL_SetError ("Unknown WAVE data format: 0x%.4x",
  40.374 -                      SDL_SwapLE16 (format->encoding));
  40.375 +        SDL_SetError("Unknown WAVE data format: 0x%.4x",
  40.376 +                     SDL_SwapLE16(format->encoding));
  40.377          was_error = 1;
  40.378          goto done;
  40.379      }
  40.380 -    SDL_memset (spec, 0, (sizeof *spec));
  40.381 -    spec->freq = SDL_SwapLE32 (format->frequency);
  40.382 -    switch (SDL_SwapLE16 (format->bitspersample)) {
  40.383 +    SDL_memset(spec, 0, (sizeof *spec));
  40.384 +    spec->freq = SDL_SwapLE32(format->frequency);
  40.385 +    switch (SDL_SwapLE16(format->bitspersample)) {
  40.386      case 4:
  40.387          if (MS_ADPCM_encoded || IMA_ADPCM_encoded) {
  40.388              spec->format = AUDIO_S16;
  40.389 @@ -525,20 +525,20 @@
  40.390          break;
  40.391      }
  40.392      if (was_error) {
  40.393 -        SDL_SetError ("Unknown %d-bit PCM data format",
  40.394 -                      SDL_SwapLE16 (format->bitspersample));
  40.395 +        SDL_SetError("Unknown %d-bit PCM data format",
  40.396 +                     SDL_SwapLE16(format->bitspersample));
  40.397          goto done;
  40.398      }
  40.399 -    spec->channels = (Uint8) SDL_SwapLE16 (format->channels);
  40.400 +    spec->channels = (Uint8) SDL_SwapLE16(format->channels);
  40.401      spec->samples = 4096;       /* Good default buffer size */
  40.402  
  40.403      /* Read the audio data chunk */
  40.404      *audio_buf = NULL;
  40.405      do {
  40.406          if (*audio_buf != NULL) {
  40.407 -            SDL_free (*audio_buf);
  40.408 +            SDL_free(*audio_buf);
  40.409          }
  40.410 -        lenread = ReadChunk (src, &chunk);
  40.411 +        lenread = ReadChunk(src, &chunk);
  40.412          if (lenread < 0) {
  40.413              was_error = 1;
  40.414              goto done;
  40.415 @@ -546,19 +546,19 @@
  40.416          *audio_len = lenread;
  40.417          *audio_buf = chunk.data;
  40.418          if (chunk.magic != DATA)
  40.419 -            headerDiff += lenread + 2 * sizeof (Uint32);
  40.420 +            headerDiff += lenread + 2 * sizeof(Uint32);
  40.421      }
  40.422      while (chunk.magic != DATA);
  40.423 -    headerDiff += 2 * sizeof (Uint32);  /* for the data chunk and len */
  40.424 +    headerDiff += 2 * sizeof(Uint32);   /* for the data chunk and len */
  40.425  
  40.426      if (MS_ADPCM_encoded) {
  40.427 -        if (MS_ADPCM_decode (audio_buf, audio_len) < 0) {
  40.428 +        if (MS_ADPCM_decode(audio_buf, audio_len) < 0) {
  40.429              was_error = 1;
  40.430              goto done;
  40.431          }
  40.432      }
  40.433      if (IMA_ADPCM_encoded) {
  40.434 -        if (IMA_ADPCM_decode (audio_buf, audio_len) < 0) {
  40.435 +        if (IMA_ADPCM_decode(audio_buf, audio_len) < 0) {
  40.436              was_error = 1;
  40.437              goto done;
  40.438          }
  40.439 @@ -570,15 +570,14 @@
  40.440  
  40.441    done:
  40.442      if (format != NULL) {
  40.443 -        SDL_free (format);
  40.444 +        SDL_free(format);
  40.445      }
  40.446      if (src) {
  40.447          if (freesrc) {
  40.448 -            SDL_RWclose (src);
  40.449 +            SDL_RWclose(src);
  40.450          } else {
  40.451              /* seek to the end of the file (given by the RIFF chunk) */
  40.452 -            SDL_RWseek (src, wavelen - chunk.length - headerDiff,
  40.453 -                        RW_SEEK_CUR);
  40.454 +            SDL_RWseek(src, wavelen - chunk.length - headerDiff, RW_SEEK_CUR);
  40.455          }
  40.456      }
  40.457      if (was_error) {
  40.458 @@ -591,26 +590,26 @@
  40.459     be freed here.  (Necessary under Win32, VC++)
  40.460   */
  40.461  void
  40.462 -SDL_FreeWAV (Uint8 * audio_buf)
  40.463 +SDL_FreeWAV(Uint8 * audio_buf)
  40.464  {
  40.465      if (audio_buf != NULL) {
  40.466 -        SDL_free (audio_buf);
  40.467 +        SDL_free(audio_buf);
  40.468      }
  40.469  }
  40.470  
  40.471  static int
  40.472 -ReadChunk (SDL_RWops * src, Chunk * chunk)
  40.473 +ReadChunk(SDL_RWops * src, Chunk * chunk)
  40.474  {
  40.475 -    chunk->magic = SDL_ReadLE32 (src);
  40.476 -    chunk->length = SDL_ReadLE32 (src);
  40.477 -    chunk->data = (Uint8 *) SDL_malloc (chunk->length);
  40.478 +    chunk->magic = SDL_ReadLE32(src);
  40.479 +    chunk->length = SDL_ReadLE32(src);
  40.480 +    chunk->data = (Uint8 *) SDL_malloc(chunk->length);
  40.481      if (chunk->data == NULL) {
  40.482 -        SDL_Error (SDL_ENOMEM);
  40.483 +        SDL_Error(SDL_ENOMEM);
  40.484          return (-1);
  40.485      }
  40.486 -    if (SDL_RWread (src, chunk->data, chunk->length, 1) != 1) {
  40.487 -        SDL_Error (SDL_EFREAD);
  40.488 -        SDL_free (chunk->data);
  40.489 +    if (SDL_RWread(src, chunk->data, chunk->length, 1) != 1) {
  40.490 +        SDL_Error(SDL_EFREAD);
  40.491 +        SDL_free(chunk->data);
  40.492          return (-1);
  40.493      }
  40.494      return (chunk->length);
    41.1 --- a/src/audio/alsa/SDL_alsa_audio.c	Mon May 29 03:53:21 2006 +0000
    41.2 +++ b/src/audio/alsa/SDL_alsa_audio.c	Mon May 29 04:04:35 2006 +0000
    41.3 @@ -48,11 +48,11 @@
    41.4  #define DEFAULT_DEVICE	"default"
    41.5  
    41.6  /* Audio driver functions */
    41.7 -static int ALSA_OpenAudio (_THIS, SDL_AudioSpec * spec);
    41.8 -static void ALSA_WaitAudio (_THIS);
    41.9 -static void ALSA_PlayAudio (_THIS);
   41.10 -static Uint8 *ALSA_GetAudioBuf (_THIS);
   41.11 -static void ALSA_CloseAudio (_THIS);
   41.12 +static int ALSA_OpenAudio(_THIS, SDL_AudioSpec * spec);
   41.13 +static void ALSA_WaitAudio(_THIS);
   41.14 +static void ALSA_PlayAudio(_THIS);
   41.15 +static Uint8 *ALSA_GetAudioBuf(_THIS);
   41.16 +static void ALSA_CloseAudio(_THIS);
   41.17  
   41.18  #ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
   41.19  
   41.20 @@ -62,83 +62,81 @@
   41.21  
   41.22  static int (*SDL_snd_pcm_open) (snd_pcm_t ** pcm, const char *name,
   41.23                                  snd_pcm_stream_t stream, int mode);
   41.24 -static int (*SDL_NAME (snd_pcm_open)) (snd_pcm_t ** pcm, const char *name,
   41.25 -                                       snd_pcm_stream_t stream, int mode);
   41.26 -static int (*SDL_NAME (snd_pcm_close)) (snd_pcm_t * pcm);
   41.27 -static snd_pcm_sframes_t (*SDL_NAME (snd_pcm_writei)) (snd_pcm_t * pcm,
   41.28 -                                                       const void *buffer,
   41.29 -                                                       snd_pcm_uframes_t
   41.30 -                                                       size);
   41.31 -static int (*SDL_NAME (snd_pcm_resume)) (snd_pcm_t * pcm);
   41.32 -static int (*SDL_NAME (snd_pcm_prepare)) (snd_pcm_t * pcm);
   41.33 -static int (*SDL_NAME (snd_pcm_drain)) (snd_pcm_t * pcm);
   41.34 -static const char *(*SDL_NAME (snd_strerror)) (int errnum);
   41.35 -static size_t (*SDL_NAME (snd_pcm_hw_params_sizeof)) (void);
   41.36 -static size_t (*SDL_NAME (snd_pcm_sw_params_sizeof)) (void);
   41.37 -static int (*SDL_NAME (snd_pcm_hw_params_any)) (snd_pcm_t * pcm,
   41.38 -                                                snd_pcm_hw_params_t * params);
   41.39 -static int (*SDL_NAME (snd_pcm_hw_params_set_access)) (snd_pcm_t * pcm,
   41.40 -                                                       snd_pcm_hw_params_t *
   41.41 -                                                       params,
   41.42 -                                                       snd_pcm_access_t
   41.43 -                                                       access);
   41.44 -static int (*SDL_NAME (snd_pcm_hw_params_set_format)) (snd_pcm_t * pcm,
   41.45 -                                                       snd_pcm_hw_params_t *
   41.46 -                                                       params,
   41.47 -                                                       snd_pcm_format_t val);
   41.48 -static int (*SDL_NAME (snd_pcm_hw_params_set_channels)) (snd_pcm_t * pcm,
   41.49 -                                                         snd_pcm_hw_params_t *
   41.50 -                                                         params,
   41.51 -                                                         unsigned int val);
   41.52 -static int (*SDL_NAME (snd_pcm_hw_params_get_channels)) (const
   41.53 -                                                         snd_pcm_hw_params_t *
   41.54 -                                                         params);
   41.55 +static int (*SDL_NAME(snd_pcm_open)) (snd_pcm_t ** pcm, const char *name,
   41.56 +                                      snd_pcm_stream_t stream, int mode);
   41.57 +static int (*SDL_NAME(snd_pcm_close)) (snd_pcm_t * pcm);
   41.58 +static snd_pcm_sframes_t(*SDL_NAME(snd_pcm_writei)) (snd_pcm_t * pcm,
   41.59 +                                                     const void *buffer,
   41.60 +                                                     snd_pcm_uframes_t size);
   41.61 +static int (*SDL_NAME(snd_pcm_resume)) (snd_pcm_t * pcm);
   41.62 +static int (*SDL_NAME(snd_pcm_prepare)) (snd_pcm_t * pcm);
   41.63 +static int (*SDL_NAME(snd_pcm_drain)) (snd_pcm_t * pcm);
   41.64 +static const char *(*SDL_NAME(snd_strerror)) (int errnum);
   41.65 +static size_t(*SDL_NAME(snd_pcm_hw_params_sizeof)) (void);
   41.66 +static size_t(*SDL_NAME(snd_pcm_sw_params_sizeof)) (void);
   41.67 +static int (*SDL_NAME(snd_pcm_hw_params_any)) (snd_pcm_t * pcm,
   41.68 +                                               snd_pcm_hw_params_t * params);
   41.69 +static int (*SDL_NAME(snd_pcm_hw_params_set_access)) (snd_pcm_t * pcm,
   41.70 +                                                      snd_pcm_hw_params_t *
   41.71 +                                                      params,
   41.72 +                                                      snd_pcm_access_t
   41.73 +                                                      access);
   41.74 +static int (*SDL_NAME(snd_pcm_hw_params_set_format)) (snd_pcm_t * pcm,
   41.75 +                                                      snd_pcm_hw_params_t *
   41.76 +                                                      params,
   41.77 +                                                      snd_pcm_format_t val);
   41.78 +static int (*SDL_NAME(snd_pcm_hw_params_set_channels)) (snd_pcm_t * pcm,
   41.79 +                                                        snd_pcm_hw_params_t *
   41.80 +                                                        params,
   41.81 +                                                        unsigned int val);
   41.82 +static int (*SDL_NAME(snd_pcm_hw_params_get_channels)) (const
   41.83 +                                                        snd_pcm_hw_params_t *
   41.84 +                                                        params);
   41.85  static unsigned int
   41.86 -    (*SDL_NAME (snd_pcm_hw_params_set_rate_near)) (snd_pcm_t *
   41.87 -                                                   pcm,
   41.88 -                                                   snd_pcm_hw_params_t
   41.89 -                                                   * params,
   41.90 -                                                   unsigned
   41.91 -                                                   int val, int *dir);
   41.92 +    (*SDL_NAME(snd_pcm_hw_params_set_rate_near)) (snd_pcm_t *
   41.93 +                                                  pcm,
   41.94 +                                                  snd_pcm_hw_params_t
   41.95 +                                                  * params,
   41.96 +                                                  unsigned int val, int *dir);
   41.97  static snd_pcm_uframes_t
   41.98 -    (*SDL_NAME (snd_pcm_hw_params_set_period_size_near)) (snd_pcm_t * pcm,
   41.99 -                                                          snd_pcm_hw_params_t
  41.100 -                                                          * params,
  41.101 -                                                          snd_pcm_uframes_t
  41.102 -                                                          val, int *dir);
  41.103 +    (*SDL_NAME(snd_pcm_hw_params_set_period_size_near)) (snd_pcm_t * pcm,
  41.104 +                                                         snd_pcm_hw_params_t
  41.105 +                                                         * params,
  41.106 +                                                         snd_pcm_uframes_t
  41.107 +                                                         val, int *dir);
  41.108  static snd_pcm_sframes_t
  41.109 -    (*SDL_NAME (snd_pcm_hw_params_get_period_size)) (const
  41.110 +    (*SDL_NAME(snd_pcm_hw_params_get_period_size)) (const
  41.111 +                                                    snd_pcm_hw_params_t
  41.112 +                                                    * params);
  41.113 +static unsigned int
  41.114 +    (*SDL_NAME(snd_pcm_hw_params_set_periods_near)) (snd_pcm_t * pcm,
  41.115                                                       snd_pcm_hw_params_t
  41.116 -                                                     * params);
  41.117 -static unsigned int
  41.118 -    (*SDL_NAME (snd_pcm_hw_params_set_periods_near)) (snd_pcm_t * pcm,
  41.119 -                                                      snd_pcm_hw_params_t
  41.120 -                                                      * params,
  41.121 -                                                      unsigned int val,
  41.122 -                                                      int *dir);
  41.123 -static int (*SDL_NAME (snd_pcm_hw_params_get_periods)) (snd_pcm_hw_params_t *
  41.124 -                                                        params);
  41.125 -static int (*SDL_NAME (snd_pcm_hw_params)) (snd_pcm_t * pcm,
  41.126 -                                            snd_pcm_hw_params_t * params);
  41.127 +                                                     * params,
  41.128 +                                                     unsigned int val,
  41.129 +                                                     int *dir);
  41.130 +static int (*SDL_NAME(snd_pcm_hw_params_get_periods)) (snd_pcm_hw_params_t *
  41.131 +                                                       params);
  41.132 +static int (*SDL_NAME(snd_pcm_hw_params)) (snd_pcm_t * pcm,
  41.133 +                                           snd_pcm_hw_params_t * params);
  41.134  /*
  41.135  */
  41.136 -static int (*SDL_NAME (snd_pcm_sw_params_current)) (snd_pcm_t * pcm,
  41.137 -                                                    snd_pcm_sw_params_t *
  41.138 -                                                    swparams);
  41.139 -static int (*SDL_NAME (snd_pcm_sw_params_set_start_threshold)) (snd_pcm_t *
  41.140 -                                                                pcm,
  41.141 -                                                                snd_pcm_sw_params_t
  41.142 -                                                                * params,
  41.143 -                                                                snd_pcm_uframes_t
  41.144 -                                                                val);
  41.145 -static int (*SDL_NAME (snd_pcm_sw_params_set_avail_min)) (snd_pcm_t * pcm,
  41.146 -                                                          snd_pcm_sw_params_t
  41.147 -                                                          * params,
  41.148 -                                                          snd_pcm_uframes_t
  41.149 -                                                          val);
  41.150 -static int (*SDL_NAME (snd_pcm_sw_params)) (snd_pcm_t * pcm,
  41.151 -                                            snd_pcm_sw_params_t * params);
  41.152 -static int (*SDL_NAME (snd_pcm_nonblock)) (snd_pcm_t * pcm, int nonblock);
  41.153 +static int (*SDL_NAME(snd_pcm_sw_params_current)) (snd_pcm_t * pcm,
  41.154 +                                                   snd_pcm_sw_params_t *
  41.155 +                                                   swparams);
  41.156 +static int (*SDL_NAME(snd_pcm_sw_params_set_start_threshold)) (snd_pcm_t *
  41.157 +                                                               pcm,
  41.158 +                                                               snd_pcm_sw_params_t
  41.159 +                                                               * params,
  41.160 +                                                               snd_pcm_uframes_t
  41.161 +                                                               val);
  41.162 +static int (*SDL_NAME(snd_pcm_sw_params_set_avail_min)) (snd_pcm_t * pcm,
  41.163 +                                                         snd_pcm_sw_params_t
  41.164 +                                                         * params,
  41.165 +                                                         snd_pcm_uframes_t
  41.166 +                                                         val);
  41.167 +static int (*SDL_NAME(snd_pcm_sw_params)) (snd_pcm_t * pcm,
  41.168 +                                           snd_pcm_sw_params_t * params);
  41.169 +static int (*SDL_NAME(snd_pcm_nonblock)) (snd_pcm_t * pcm, int nonblock);
  41.170  #define snd_pcm_hw_params_sizeof SDL_NAME(snd_pcm_hw_params_sizeof)
  41.171  #define snd_pcm_sw_params_sizeof SDL_NAME(snd_pcm_sw_params_sizeof)
  41.172  
  41.173 @@ -149,81 +147,81 @@
  41.174      void **func;
  41.175  } alsa_functions[] = {
  41.176      {
  41.177 -    "snd_pcm_open", (void **) (char *) &SDL_NAME (snd_pcm_open)}, {
  41.178 -    "snd_pcm_close", (void **) (char *) &SDL_NAME (snd_pcm_close)}, {
  41.179 -    "snd_pcm_writei", (void **) (char *) &SDL_NAME (snd_pcm_writei)}, {
  41.180 -    "snd_pcm_resume", (void **) (char *) &SDL_NAME (snd_pcm_resume)}, {
  41.181 -    "snd_pcm_prepare", (void **) (char *) &SDL_NAME (snd_pcm_prepare)}, {
  41.182 -    "snd_pcm_drain", (void **) (char *) &SDL_NAME (snd_pcm_drain)}, {
  41.183 -    "snd_strerror", (void **) (char *) &SDL_NAME (snd_strerror)}, {
  41.184 +    "snd_pcm_open", (void **) (char *) &SDL_NAME(snd_pcm_open)}, {
  41.185 +    "snd_pcm_close", (void **) (char *) &SDL_NAME(snd_pcm_close)}, {
  41.186 +    "snd_pcm_writei", (void **) (char *) &SDL_NAME(snd_pcm_writei)}, {
  41.187 +    "snd_pcm_resume", (void **) (char *) &SDL_NAME(snd_pcm_resume)}, {
  41.188 +    "snd_pcm_prepare", (void **) (char *) &SDL_NAME(snd_pcm_prepare)}, {
  41.189 +    "snd_pcm_drain", (void **) (char *) &SDL_NAME(snd_pcm_drain)}, {
  41.190 +    "snd_strerror", (void **) (char *) &SDL_NAME(snd_strerror)}, {
  41.191      "snd_pcm_hw_params_sizeof",
  41.192 -            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_sizeof)}, {
  41.193 +            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_sizeof)}, {
  41.194      "snd_pcm_sw_params_sizeof",
  41.195 -            (void **) (char *) &SDL_NAME (snd_pcm_sw_params_sizeof)}, {
  41.196 +            (void **) (char *) &SDL_NAME(snd_pcm_sw_params_sizeof)}, {
  41.197      "snd_pcm_hw_params_any",
  41.198 -            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_any)}, {
  41.199 +            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_any)}, {
  41.200      "snd_pcm_hw_params_set_access",
  41.201 -            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_set_access)}, {
  41.202 +            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_set_access)}, {
  41.203      "snd_pcm_hw_params_set_format",
  41.204 -            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_set_format)}, {
  41.205 +            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_set_format)}, {
  41.206      "snd_pcm_hw_params_set_channels",
  41.207 -            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_set_channels)}, {
  41.208 +            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_set_channels)}, {
  41.209      "snd_pcm_hw_params_get_channels",
  41.210 -            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_get_channels)}, {
  41.211 +            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_get_channels)}, {
  41.212      "snd_pcm_hw_params_set_rate_near",
  41.213 -            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_set_rate_near)}, {
  41.214 +            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_set_rate_near)}, {
  41.215          "snd_pcm_hw_params_set_period_size_near", (void **) (char *)
  41.216 -    &SDL_NAME (snd_pcm_hw_params_set_period_size_near)}, {
  41.217 +    &SDL_NAME(snd_pcm_hw_params_set_period_size_near)}, {
  41.218      "snd_pcm_hw_params_get_period_size",
  41.219 -            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_get_period_size)},
  41.220 +            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_get_period_size)},
  41.221      {
  41.222          "snd_pcm_hw_params_set_periods_near", (void **) (char *)
  41.223 -    &SDL_NAME (snd_pcm_hw_params_set_periods_near)}, {
  41.224 +    &SDL_NAME(snd_pcm_hw_params_set_periods_near)}, {
  41.225      "snd_pcm_hw_params_get_periods",
  41.226 -            (void **) (char *) &SDL_NAME (snd_pcm_hw_params_get_periods)}, {
  41.227 -    "snd_pcm_hw_params", (void **) (char *) &SDL_NAME (snd_pcm_hw_params)}, {
  41.228 +            (void **) (char *) &SDL_NAME(snd_pcm_hw_params_get_periods)}, {
  41.229 +    "snd_pcm_hw_params", (void **) (char *) &SDL_NAME(snd_pcm_hw_params)}, {
  41.230      "snd_pcm_sw_params_current",
  41.231 -            (void **) (char *) &SDL_NAME (snd_pcm_sw_params_current)}, {
  41.232 +            (void **) (char *) &SDL_NAME(snd_pcm_sw_params_current)}, {
  41.233          "snd_pcm_sw_params_set_start_threshold", (void **) (char *)
  41.234 -    &SDL_NAME (snd_pcm_sw_params_set_start_threshold)}, {
  41.235 +    &SDL_NAME(snd_pcm_sw_params_set_start_threshold)}, {
  41.236      "snd_pcm_sw_params_set_avail_min",
  41.237 -            (void **) (char *) &SDL_NAME (snd_pcm_sw_params_set_avail_min)}, {
  41.238 -    "snd_pcm_sw_params", (void **) (char *) &SDL_NAME (snd_pcm_sw_params)}, {
  41.239 -"snd_pcm_nonblock", (void **) (char *) &SDL_NAME (snd_pcm_nonblock)},};
  41.240 +            (void **) (char *) &SDL_NAME(snd_pcm_sw_params_set_avail_min)}, {
  41.241 +    "snd_pcm_sw_params", (void **) (char *) &SDL_NAME(snd_pcm_sw_params)}, {
  41.242 +"snd_pcm_nonblock", (void **) (char *) &SDL_NAME(snd_pcm_nonblock)},};
  41.243  
  41.244  static void
  41.245 -UnloadALSALibrary (void)
  41.246 +UnloadALSALibrary(void)
  41.247  {
  41.248      if (alsa_loaded) {
  41.249  /*		SDL_UnloadObject(alsa_handle);*/
  41.250 -        dlclose (alsa_handle);
  41.251 +        dlclose(alsa_handle);
  41.252          alsa_handle = NULL;
  41.253          alsa_loaded = 0;
  41.254      }
  41.255  }
  41.256  
  41.257  static int
  41.258 -LoadALSALibrary (void)
  41.259 +LoadALSALibrary(void)
  41.260  {
  41.261      int i, retval = -1;
  41.262  
  41.263  /*	alsa_handle = SDL_LoadObject(alsa_library);*/
  41.264 -    alsa_handle = dlopen (alsa_library, RTLD_NOW);
  41.265 +    alsa_handle = dlopen(alsa_library, RTLD_NOW);
  41.266      if (alsa_handle) {
  41.267          alsa_loaded = 1;
  41.268          retval = 0;
  41.269 -        for (i = 0; i < SDL_arraysize (alsa_functions); i++) {
  41.270 +        for (i = 0; i < SDL_arraysize(alsa_functions); i++) {
  41.271  /*			*alsa_functions[i].func = SDL_LoadFunction(alsa_handle,alsa_functions[i].name);*/
  41.272  #if HAVE_DLVSYM
  41.273              *alsa_functions[i].func =
  41.274 -                dlvsym (alsa_handle, alsa_functions[i].name, "ALSA_0.9");
  41.275 +                dlvsym(alsa_handle, alsa_functions[i].name, "ALSA_0.9");
  41.276              if (!*alsa_functions[i].func)
  41.277  #endif
  41.278                  *alsa_functions[i].func =
  41.279 -                    dlsym (alsa_handle, alsa_functions[i].name);
  41.280 +                    dlsym(alsa_handle, alsa_functions[i].name);
  41.281              if (!*alsa_functions[i].func) {
  41.282                  retval = -1;
  41.283 -                UnloadALSALibrary ();
  41.284 +                UnloadALSALibrary();
  41.285                  break;
  41.286              }
  41.287          }
  41.288 @@ -234,13 +232,13 @@
  41.289  #else
  41.290  
  41.291  static void
  41.292 -UnloadALSALibrary (void)
  41.293 +UnloadALSALibrary(void)
  41.294  {
  41.295      return;
  41.296  }
  41.297  
  41.298  static int
  41.299 -LoadALSALibrary (void)
  41.300 +LoadALSALibrary(void)
  41.301  {
  41.302      return 0;
  41.303  }
  41.304 @@ -248,11 +246,11 @@
  41.305  #endif /* SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
  41.306  
  41.307  static const char *
  41.308 -get_audio_device (int channels)
  41.309 +get_audio_device(int channels)
  41.310  {
  41.311      const char *device;
  41.312  
  41.313 -    device = SDL_getenv ("AUDIODEV");   /* Is there a standard variable name? */
  41.314 +    device = SDL_getenv("AUDIODEV");    /* Is there a standard variable name? */
  41.315      if (device == NULL) {
  41.316          if (channels == 6)
  41.317              device = "surround51";
  41.318 @@ -267,56 +265,56 @@
  41.319  /* Audio driver bootstrap functions */
  41.320  
  41.321  static int
  41.322 -Audio_Available (void)
  41.323 +Audio_Available(void)
  41.324  {
  41.325      int available;
  41.326      int status;
  41.327      snd_pcm_t *handle;
  41.328  
  41.329      available = 0;
  41.330 -    if (LoadALSALibrary () < 0) {
  41.331 +    if (LoadALSALibrary() < 0) {
  41.332          return available;
  41.333      }
  41.334      status =
  41.335 -        SDL_NAME (snd_pcm_open) (&handle, get_audio_device (2),
  41.336 -                                 SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
  41.337 +        SDL_NAME(snd_pcm_open) (&handle, get_audio_device(2),
  41.338 +                                SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
  41.339      if (status >= 0) {
  41.340          available = 1;
  41.341 -        SDL_NAME (snd_pcm_close) (handle);
  41.342 +        SDL_NAME(snd_pcm_close) (handle);
  41.343      }
  41.344 -    UnloadALSALibrary ();
  41.345 +    UnloadALSALibrary();
  41.346      return (available);
  41.347  }
  41.348  
  41.349  static void
  41.350 -Audio_DeleteDevice (SDL_AudioDevice * device)
  41.351 +Audio_DeleteDevice(SDL_AudioDevice * device)
  41.352  {
  41.353 -    SDL_free (device->hidden);
  41.354 -    SDL_free (device);
  41.355 -    UnloadALSALibrary ();
  41.356 +    SDL_free(device->hidden);
  41.357 +    SDL_free(device);
  41.358 +    UnloadALSALibrary();
  41.359  }
  41.360  
  41.361  static SDL_AudioDevice *
  41.362 -Audio_CreateDevice (int devindex)
  41.363 +Audio_CreateDevice(int devindex)
  41.364  {
  41.365      SDL_AudioDevice *this;
  41.366  
  41.367      /* Initialize all variables that we clean on shutdown */
  41.368 -    LoadALSALibrary ();
  41.369 -    this = (SDL_AudioDevice *) SDL_malloc (sizeof (SDL_AudioDevice));
  41.370 +    LoadALSALibrary();
  41.371 +    this = (SDL_AudioDevice *) SDL_malloc(sizeof(SDL_AudioDevice));
  41.372      if (this) {
  41.373 -        SDL_memset (this, 0, (sizeof *this));
  41.374 +        SDL_memset(this, 0, (sizeof *this));
  41.375          this->hidden = (struct SDL_PrivateAudioData *)
  41.376 -            SDL_malloc ((sizeof *this->hidden));
  41.377 +            SDL_malloc((sizeof *this->hidden));
  41.378      }
  41.379      if ((this == NULL) || (this->hidden == NULL)) {
  41.380 -        SDL_OutOfMemory ();
  41.381 +        SDL_OutOfMemory();
  41.382          if (this) {
  41.383 -            SDL_free (this);
  41.384 +            SDL_free(this);
  41.385          }
  41.386          return (0);
  41.387      }
  41.388 -    SDL_memset (this->hidden, 0, (sizeof *this->hidden));
  41.389 +    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
  41.390  
  41.391      /* Set the function pointers */
  41.392      this->OpenAudio = ALSA_OpenAudio;
  41.393 @@ -337,7 +335,7 @@
  41.394  
  41.395  /* This function waits until it is possible to write a full sound buffer */
  41.396  static void
  41.397 -ALSA_WaitAudio (_THIS)
  41.398 +ALSA_WaitAudio(_THIS)
  41.399  {
  41.400      /* Check to see if the thread-parent process is still alive */
  41.401      {
  41.402 @@ -346,7 +344,7 @@
  41.403             that use a different process id for each thread.
  41.404           */
  41.405          if (parent && (((++cnt) % 10) == 0)) {  /* Check every 10 loops */
  41.406 -            if (kill (parent, 0) < 0) {
  41.407 +            if (kill(parent, 0) < 0) {
  41.408                  this->enabled = 0;
  41.409              }
  41.410          }
  41.411 @@ -354,7 +352,7 @@
  41.412  }
  41.413  
  41.414  static void
  41.415 -ALSA_PlayAudio (_THIS)
  41.416 +ALSA_PlayAudio(_THIS)
  41.417  {
  41.418      int status;
  41.419      int sample_len;
  41.420 @@ -364,21 +362,21 @@
  41.421      sample_buf = (signed short *) mixbuf;
  41.422      while (sample_len > 0) {
  41.423          status =
  41.424 -            SDL_NAME (snd_pcm_writei) (pcm_handle, sample_buf, sample_len);