indent is evil
authorSam Lantinga <slouken@libsdl.org>
Sat, 28 Oct 2006 16:48:03 +0000
changeset 2060866052b01ee5
parent 2059 4685ccd33d0e
child 2061 6051761b5934
indent is evil
include/SDL_thread.h
src/audio/SDL_audio.c
src/audio/SDL_audiodev.c
src/audio/SDL_audiodev_c.h
src/audio/SDL_sysaudio.h
src/audio/alsa/SDL_alsa_audio.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/disk/SDL_diskaudio.c
src/audio/dma/SDL_dmaaudio.c
src/audio/dmedia/SDL_irixaudio.c
src/audio/dmedia/SDL_irixaudio.h
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_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/windib/SDL_dibaudio.c
src/audio/windx5/SDL_dx5audio.c
src/timer/os2/SDL_systimer.c
test/testaudioinfo.c
test/testmultiaudio.c
test/testwm.c
     1.1 --- a/include/SDL_thread.h	Sat Oct 28 16:41:54 2006 +0000
     1.2 +++ b/include/SDL_thread.h	Sat Oct 28 16:48:03 2006 +0000
     1.3 @@ -91,12 +91,10 @@
     1.4  typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
     1.5  #endif
     1.6  
     1.7 -extern DECLSPEC SDL_Thread *SDLCALL SDL_CreateThread(int (SDLCALL * f) (void *),
     1.8 -                                                     void *data,
     1.9 -                                                     pfnSDL_CurrentBeginThread
    1.10 -                                                     pfnBeginThread,
    1.11 -                                                     pfnSDL_CurrentEndThread
    1.12 -                                                     pfnEndThread);
    1.13 +extern DECLSPEC SDL_Thread *SDLCALL
    1.14 +SDL_CreateThread(int (SDLCALL * f) (void *), void *data,
    1.15 +                 pfnSDL_CurrentBeginThread pfnBeginThread,
    1.16 +                 pfnSDL_CurrentEndThread pfnEndThread);
    1.17  
    1.18  #ifdef __OS2__
    1.19  #define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthread, _endthread)
     2.1 --- a/src/audio/SDL_audio.c	Sat Oct 28 16:41:54 2006 +0000
     2.2 +++ b/src/audio/SDL_audio.c	Sat Oct 28 16:48:03 2006 +0000
     2.3 @@ -144,10 +144,11 @@
     2.4      NULL
     2.5  };
     2.6  
     2.7 -static SDL_AudioDevice *get_audio_device(SDL_AudioDeviceID id)
     2.8 +static SDL_AudioDevice *
     2.9 +get_audio_device(SDL_AudioDeviceID id)
    2.10  {
    2.11      id--;
    2.12 -    if ( (id >= SDL_arraysize(open_devices)) || (open_devices[id] == NULL) ) {
    2.13 +    if ((id >= SDL_arraysize(open_devices)) || (open_devices[id] == NULL)) {
    2.14          SDL_SetError("Invalid audio device ID");
    2.15          return NULL;
    2.16      }
    2.17 @@ -157,14 +158,40 @@
    2.18  
    2.19  
    2.20  /* stubs for audio drivers that don't need a specific entry point... */
    2.21 -static int SDL_AudioDetectDevices_Default(int iscapture) { return -1; }
    2.22 -static void SDL_AudioThreadInit_Default(_THIS) { /* no-op. */ }
    2.23 -static void SDL_AudioWaitDevice_Default(_THIS) { /* no-op. */ }
    2.24 -static void SDL_AudioPlayDevice_Default(_THIS) { /* no-op. */ }
    2.25 -static Uint8 *SDL_AudioGetDeviceBuf_Default(_THIS) { return NULL; }
    2.26 -static void SDL_AudioWaitDone_Default(_THIS) { /* no-op. */ }
    2.27 -static void SDL_AudioCloseDevice_Default(_THIS) { /* no-op. */ }
    2.28 -static void SDL_AudioDeinitialize_Default(void) { /* no-op. */ }
    2.29 +static int
    2.30 +SDL_AudioDetectDevices_Default(int iscapture)
    2.31 +{
    2.32 +    return -1;
    2.33 +}
    2.34 +static void
    2.35 +SDL_AudioThreadInit_Default(_THIS)
    2.36 +{                               /* no-op. */
    2.37 +}
    2.38 +static void
    2.39 +SDL_AudioWaitDevice_Default(_THIS)
    2.40 +{                               /* no-op. */
    2.41 +}
    2.42 +static void
    2.43 +SDL_AudioPlayDevice_Default(_THIS)
    2.44 +{                               /* no-op. */
    2.45 +}
    2.46 +static Uint8 *
    2.47 +SDL_AudioGetDeviceBuf_Default(_THIS)
    2.48 +{
    2.49 +    return NULL;
    2.50 +}
    2.51 +static void
    2.52 +SDL_AudioWaitDone_Default(_THIS)
    2.53 +{                               /* no-op. */
    2.54 +}
    2.55 +static void
    2.56 +SDL_AudioCloseDevice_Default(_THIS)
    2.57 +{                               /* no-op. */
    2.58 +}
    2.59 +static void
    2.60 +SDL_AudioDeinitialize_Default(void)
    2.61 +{                               /* no-op. */
    2.62 +}
    2.63  
    2.64  static int
    2.65  SDL_AudioOpenDevice_Default(_THIS, const char *devname, int iscapture)
    2.66 @@ -172,7 +199,8 @@
    2.67      return 0;
    2.68  }
    2.69  
    2.70 -static const char *SDL_AudioGetDeviceName_Default(int index, int iscapture)
    2.71 +static const char *
    2.72 +SDL_AudioGetDeviceName_Default(int index, int iscapture)
    2.73  {
    2.74      SDL_SetError("No such device");
    2.75      return NULL;
    2.76 @@ -197,14 +225,15 @@
    2.77  }
    2.78  
    2.79  
    2.80 -static void finalize_audio_entry_points(void)
    2.81 +static void
    2.82 +finalize_audio_entry_points(void)
    2.83  {
    2.84      /*
    2.85       * Fill in stub functions for unused driver entry points. This lets us
    2.86       *  blindly call them without having to check for validity first.
    2.87       */
    2.88  
    2.89 -    #define FILL_STUB(x) \
    2.90 +#define FILL_STUB(x) \
    2.91          if (current_audio.impl.x == NULL) { \
    2.92              current_audio.impl.x = SDL_Audio##x##_Default; \
    2.93          }
    2.94 @@ -220,7 +249,7 @@
    2.95      FILL_STUB(LockDevice);
    2.96      FILL_STUB(UnlockDevice);
    2.97      FILL_STUB(Deinitialize);
    2.98 -    #undef FILL_STUB
    2.99 +#undef FILL_STUB
   2.100  }
   2.101  
   2.102  
   2.103 @@ -317,7 +346,7 @@
   2.104  static SDL_AudioFormat
   2.105  SDL_ParseAudioFormat(const char *string)
   2.106  {
   2.107 -    #define CHECK_FMT_STRING(x) if (strcmp(string, #x) == 0) return AUDIO_##x
   2.108 +#define CHECK_FMT_STRING(x) if (strcmp(string, #x) == 0) return AUDIO_##x
   2.109      CHECK_FMT_STRING(U8);
   2.110      CHECK_FMT_STRING(S8);
   2.111      CHECK_FMT_STRING(U16LSB);
   2.112 @@ -336,7 +365,7 @@
   2.113      CHECK_FMT_STRING(F32MSB);
   2.114      CHECK_FMT_STRING(F32SYS);
   2.115      CHECK_FMT_STRING(F32);
   2.116 -    #undef CHECK_FMT_STRING
   2.117 +#undef CHECK_FMT_STRING
   2.118      return 0;
   2.119  }
   2.120  
   2.121 @@ -363,11 +392,11 @@
   2.122      int tried_to_init = 0;
   2.123  
   2.124      if (SDL_WasInit(SDL_INIT_AUDIO)) {
   2.125 -        SDL_AudioQuit();  /* shutdown driver if already running. */
   2.126 +        SDL_AudioQuit();        /* shutdown driver if already running. */
   2.127      }
   2.128  
   2.129 -    SDL_memset(&current_audio, '\0', sizeof (current_audio));
   2.130 -    SDL_memset(open_devices, '\0', sizeof (open_devices));
   2.131 +    SDL_memset(&current_audio, '\0', sizeof(current_audio));
   2.132 +    SDL_memset(open_devices, '\0', sizeof(open_devices));
   2.133  
   2.134      /* Select the proper audio driver */
   2.135      if (driver_name == NULL) {
   2.136 @@ -377,13 +406,13 @@
   2.137      for (i = 0; (!initialized) && (bootstrap[i]); ++i) {
   2.138          /* make sure we should even try this driver before doing so... */
   2.139          const AudioBootStrap *backend = bootstrap[i];
   2.140 -        if ( ((driver_name) && (SDL_strcasecmp(backend->name, driver_name))) ||
   2.141 -             ((!driver_name) && (backend->demand_only)) ) {
   2.142 +        if (((driver_name) && (SDL_strcasecmp(backend->name, driver_name))) ||
   2.143 +            ((!driver_name) && (backend->demand_only))) {
   2.144              continue;
   2.145          }
   2.146  
   2.147          tried_to_init = 1;
   2.148 -        SDL_memset(&current_audio, 0, sizeof (current_audio));
   2.149 +        SDL_memset(&current_audio, 0, sizeof(current_audio));
   2.150          current_audio.name = backend->name;
   2.151          current_audio.desc = backend->desc;
   2.152          initialized = backend->init(&current_audio.impl);
   2.153 @@ -399,8 +428,8 @@
   2.154              }
   2.155          }
   2.156  
   2.157 -        SDL_memset(&current_audio, 0, sizeof (current_audio));
   2.158 -        return (-1);  /* No driver was available, so fail. */
   2.159 +        SDL_memset(&current_audio, 0, sizeof(current_audio));
   2.160 +        return (-1);            /* No driver was available, so fail. */
   2.161      }
   2.162  
   2.163      finalize_audio_entry_points();
   2.164 @@ -471,7 +500,7 @@
   2.165  
   2.166  
   2.167  static void
   2.168 -close_audio_device(SDL_AudioDevice *device)
   2.169 +close_audio_device(SDL_AudioDevice * device)
   2.170  {
   2.171      device->enabled = 0;
   2.172      if (device->thread != NULL) {
   2.173 @@ -500,9 +529,9 @@
   2.174   *  Returns non-zero if okay, zero on fatal parameters in (orig).
   2.175   */
   2.176  static int
   2.177 -prepare_audiospec(const SDL_AudioSpec *orig, SDL_AudioSpec *prepared)
   2.178 +prepare_audiospec(const SDL_AudioSpec * orig, SDL_AudioSpec * prepared)
   2.179  {
   2.180 -    SDL_memcpy(prepared, orig, sizeof (SDL_AudioSpec));
   2.181 +    SDL_memcpy(prepared, orig, sizeof(SDL_AudioSpec));
   2.182  
   2.183      if (orig->callback == NULL) {
   2.184          SDL_SetError("SDL_OpenAudio() passed a NULL callback");
   2.185 @@ -511,26 +540,26 @@
   2.186  
   2.187      if (orig->freq == 0) {
   2.188          const char *env = SDL_getenv("SDL_AUDIO_FREQUENCY");
   2.189 -        if ( (!env) || ((prepared->freq = SDL_atoi(env)) == 0) ) {
   2.190 -            prepared->freq = 22050;  /* a reasonable default */
   2.191 +        if ((!env) || ((prepared->freq = SDL_atoi(env)) == 0)) {
   2.192 +            prepared->freq = 22050;     /* a reasonable default */
   2.193          }
   2.194      }
   2.195  
   2.196      if (orig->format == 0) {
   2.197          const char *env = SDL_getenv("SDL_AUDIO_FORMAT");
   2.198          if ((!env) || ((prepared->format = SDL_ParseAudioFormat(env)) == 0)) {
   2.199 -            prepared->format = AUDIO_S16;  /* a reasonable default */
   2.200 +            prepared->format = AUDIO_S16;       /* a reasonable default */
   2.201          }
   2.202      }
   2.203  
   2.204      switch (orig->channels) {
   2.205 -    case 0: {
   2.206 -        const char *env = SDL_getenv("SDL_AUDIO_CHANNELS");
   2.207 -        if ( (!env) || ((prepared->channels = SDL_atoi(env)) == 0) ) {
   2.208 -            prepared->channels = 2;  /* a reasonable default */
   2.209 +    case 0:{
   2.210 +            const char *env = SDL_getenv("SDL_AUDIO_CHANNELS");
   2.211 +            if ((!env) || ((prepared->channels = SDL_atoi(env)) == 0)) {
   2.212 +                prepared->channels = 2; /* a reasonable default */
   2.213 +            }
   2.214 +            break;
   2.215          }
   2.216 -        break;
   2.217 -    }
   2.218      case 1:                    /* Mono */
   2.219      case 2:                    /* Stereo */
   2.220      case 4:                    /* surround */
   2.221 @@ -543,7 +572,7 @@
   2.222  
   2.223      if (orig->samples == 0) {
   2.224          const char *env = SDL_getenv("SDL_AUDIO_SAMPLES");
   2.225 -        if ( (!env) || ((prepared->samples = (Uint16) SDL_atoi(env)) == 0) ) {
   2.226 +        if ((!env) || ((prepared->samples = (Uint16) SDL_atoi(env)) == 0)) {
   2.227              /* Pick a default of ~46 ms at desired frequency */
   2.228              /* !!! FIXME: remove this when the non-Po2 resampling is in. */
   2.229              const int samples = (prepared->freq / 1000) * 46;
   2.230 @@ -564,8 +593,8 @@
   2.231  
   2.232  static SDL_AudioDeviceID
   2.233  open_audio_device(const char *devname, int iscapture,
   2.234 -                    const SDL_AudioSpec *_desired, SDL_AudioSpec *obtained,
   2.235 -                    int min_id)
   2.236 +                  const SDL_AudioSpec * _desired, SDL_AudioSpec * obtained,
   2.237 +                  int min_id)
   2.238  {
   2.239      SDL_AudioDeviceID id = 0;
   2.240      SDL_AudioSpec desired;
   2.241 @@ -631,13 +660,13 @@
   2.242          }
   2.243      }
   2.244  
   2.245 -    device = (SDL_AudioDevice *) SDL_AllocAudioMem(sizeof (SDL_AudioDevice));
   2.246 +    device = (SDL_AudioDevice *) SDL_AllocAudioMem(sizeof(SDL_AudioDevice));
   2.247      if (device == NULL) {
   2.248          SDL_OutOfMemory();
   2.249          return 0;
   2.250      }
   2.251 -    SDL_memset(device, '\0', sizeof (SDL_AudioDevice));
   2.252 -    SDL_memcpy(&device->spec, &desired, sizeof (SDL_AudioSpec));
   2.253 +    SDL_memset(device, '\0', sizeof(SDL_AudioDevice));
   2.254 +    SDL_memcpy(&device->spec, &desired, sizeof(SDL_AudioSpec));
   2.255      device->enabled = 1;
   2.256      device->paused = 1;
   2.257      device->iscapture = iscapture;
   2.258 @@ -688,8 +717,8 @@
   2.259              return 0;
   2.260          }
   2.261          if (device->convert.needed) {
   2.262 -            device->convert.len = (int) ( ((double) desired.size) /
   2.263 -                                          device->convert.len_ratio );
   2.264 +            device->convert.len = (int) (((double) desired.size) /
   2.265 +                                         device->convert.len_ratio);
   2.266  
   2.267              device->convert.buf =
   2.268                  (Uint8 *) SDL_AllocAudioMem(device->convert.len *
   2.269 @@ -703,7 +732,7 @@
   2.270      }
   2.271  
   2.272      /* Find an available device ID and store the structure... */
   2.273 -    for (id = min_id-1; id < SDL_arraysize(open_devices); id++) {
   2.274 +    for (id = min_id - 1; id < SDL_arraysize(open_devices); id++) {
   2.275          if (open_devices[id] == NULL) {
   2.276              open_devices[id] = device;
   2.277              break;
   2.278 @@ -727,13 +756,13 @@
   2.279          device->thread = SDL_CreateThread(SDL_RunAudio, device);
   2.280  #endif
   2.281          if (device->thread == NULL) {
   2.282 -            SDL_CloseAudioDevice(id+1);
   2.283 +            SDL_CloseAudioDevice(id + 1);
   2.284              SDL_SetError("Couldn't create audio thread");
   2.285              return 0;
   2.286          }
   2.287      }
   2.288  
   2.289 -    return id+1;
   2.290 +    return id + 1;
   2.291  }
   2.292  
   2.293  
   2.294 @@ -756,9 +785,9 @@
   2.295      }
   2.296  
   2.297      id = open_audio_device(NULL, 0, desired, obtained, 1);
   2.298 -    if (id > 1) {  /* this should never happen in theory... */
   2.299 +    if (id > 1) {               /* this should never happen in theory... */
   2.300          SDL_CloseAudioDevice(id);
   2.301 -        SDL_SetError("Internal error");  /* MUST be Device ID #1! */
   2.302 +        SDL_SetError("Internal error"); /* MUST be Device ID #1! */
   2.303          return (-1);
   2.304      }
   2.305  
   2.306 @@ -767,7 +796,7 @@
   2.307  
   2.308  SDL_AudioDeviceID
   2.309  SDL_OpenAudioDevice(const char *device, int iscapture,
   2.310 -                    const SDL_AudioSpec *desired, SDL_AudioSpec *obtained)
   2.311 +                    const SDL_AudioSpec * desired, SDL_AudioSpec * obtained)
   2.312  {
   2.313      return open_audio_device(device, iscapture, desired, obtained, 2);
   2.314  }
   2.315 @@ -848,7 +877,7 @@
   2.316      SDL_AudioDevice *device = get_audio_device(devid);
   2.317      if (device) {
   2.318          close_audio_device(device);
   2.319 -        open_devices[devid-1] = NULL;
   2.320 +        open_devices[devid - 1] = NULL;
   2.321      }
   2.322  }
   2.323  
   2.324 @@ -868,8 +897,8 @@
   2.325  
   2.326      /* Free the driver data */
   2.327      current_audio.impl.Deinitialize();
   2.328 -    SDL_memset(&current_audio, '\0', sizeof (current_audio));
   2.329 -    SDL_memset(open_devices, '\0', sizeof (open_devices));
   2.330 +    SDL_memset(&current_audio, '\0', sizeof(current_audio));
   2.331 +    SDL_memset(open_devices, '\0', sizeof(open_devices));
   2.332  }
   2.333  
   2.334  #define NUM_FORMATS 10
     3.1 --- a/src/audio/SDL_audiodev.c	Sat Oct 28 16:41:54 2006 +0000
     3.2 +++ b/src/audio/SDL_audiodev.c	Sat Oct 28 16:48:03 2006 +0000
     3.3 @@ -47,14 +47,15 @@
     3.4  #endif
     3.5  
     3.6  static inline void
     3.7 -test_device(const char *fname, int flags, int (*test)(int fd),
     3.8 +test_device(const char *fname, int flags, int (*test) (int fd),
     3.9              char ***devices, int *devCount)
    3.10  {
    3.11      struct stat sb;
    3.12 -    if ( (stat(fname, &sb) == 0) && (S_ISCHR(sb.st_mode)) ) {
    3.13 +    if ((stat(fname, &sb) == 0) && (S_ISCHR(sb.st_mode))) {
    3.14          int audio_fd = open(fname, flags, 0);
    3.15 -        if ( (audio_fd >= 0) && (test(audio_fd)) ) {
    3.16 -            void *p = SDL_realloc(*devices, ((*devCount)+1) * sizeof (char *));
    3.17 +        if ((audio_fd >= 0) && (test(audio_fd))) {
    3.18 +            void *p =
    3.19 +                SDL_realloc(*devices, ((*devCount) + 1) * sizeof(char *));
    3.20              if (p != NULL) {
    3.21                  size_t len = strlen(fname) + 1;
    3.22                  char *str = (char *) SDL_malloc(len);
    3.23 @@ -75,7 +76,7 @@
    3.24      int i = *devCount;
    3.25      if ((i > 0) && (*devices != NULL)) {
    3.26          while (i--) {
    3.27 -            SDL_free( (*devices)[*devCount] );
    3.28 +            SDL_free((*devices)[*devCount]);
    3.29          }
    3.30      }
    3.31  
    3.32 @@ -94,7 +95,7 @@
    3.33  }
    3.34  
    3.35  void
    3.36 -SDL_EnumUnixAudioDevices(int flags, int classic, int (*test)(int fd),
    3.37 +SDL_EnumUnixAudioDevices(int flags, int classic, int (*test) (int fd),
    3.38                           char ***devices, int *devCount)
    3.39  {
    3.40      const char *audiodev;
     4.1 --- a/src/audio/SDL_audiodev_c.h	Sat Oct 28 16:41:54 2006 +0000
     4.2 +++ b/src/audio/SDL_audiodev_c.h	Sat Oct 28 16:48:03 2006 +0000
     4.3 @@ -21,7 +21,7 @@
     4.4  */
     4.5  #include "SDL_config.h"
     4.6  
     4.7 -void SDL_EnumUnixAudioDevices(int flags, int classic, int (*test)(int fd),
     4.8 +void SDL_EnumUnixAudioDevices(int flags, int classic, int (*test) (int fd),
     4.9                                char ***devs, int *count);
    4.10  void SDL_FreeUnixAudioDevices(char ***devices, int *devCount);
    4.11  
     5.1 --- a/src/audio/SDL_sysaudio.h	Sat Oct 28 16:41:54 2006 +0000
     5.2 +++ b/src/audio/SDL_sysaudio.h	Sat Oct 28 16:48:03 2006 +0000
     5.3 @@ -33,8 +33,8 @@
     5.4  
     5.5  typedef struct SDL_AudioDriverImpl
     5.6  {
     5.7 -    int (*DetectDevices)(int iscapture);
     5.8 -    const char *(*GetDeviceName)(int index, int iscapture);
     5.9 +    int (*DetectDevices) (int iscapture);
    5.10 +    const char *(*GetDeviceName) (int index, int iscapture);
    5.11      int (*OpenDevice) (_THIS, const char *devname, int iscapture);
    5.12      void (*ThreadInit) (_THIS); /* Called by audio thread at start */
    5.13      void (*WaitDevice) (_THIS);
    5.14 @@ -107,8 +107,8 @@
    5.15  {
    5.16      const char *name;
    5.17      const char *desc;
    5.18 -    int (*init) (SDL_AudioDriverImpl *impl);
    5.19 -    int demand_only:1;  /* 1==request explicitly, or it won't be available. */
    5.20 +    int (*init) (SDL_AudioDriverImpl * impl);
    5.21 +    int demand_only:1;          /* 1==request explicitly, or it won't be available. */
    5.22  } AudioBootStrap;
    5.23  
    5.24  #endif /* _SDL_sysaudio_h */
     6.1 --- a/src/audio/alsa/SDL_alsa_audio.c	Sat Oct 28 16:41:54 2006 +0000
     6.2 +++ b/src/audio/alsa/SDL_alsa_audio.c	Sat Oct 28 16:48:03 2006 +0000
     6.3 @@ -43,41 +43,43 @@
     6.4  #define DEFAULT_DEVICE	"default"
     6.5  
     6.6  static int (*ALSA_snd_pcm_open)
     6.7 -                (snd_pcm_t **, const char *, snd_pcm_stream_t, int);
     6.8 -static int (*ALSA_snd_pcm_close)(snd_pcm_t * pcm);
     6.9 +  (snd_pcm_t **, const char *, snd_pcm_stream_t, int);
    6.10 +static int (*ALSA_snd_pcm_close) (snd_pcm_t * pcm);
    6.11  static snd_pcm_sframes_t(*ALSA_snd_pcm_writei)
    6.12 -                (snd_pcm_t *,const void *, snd_pcm_uframes_t);
    6.13 -static int (*ALSA_snd_pcm_resume)(snd_pcm_t *);
    6.14 -static int (*ALSA_snd_pcm_prepare)(snd_pcm_t *);
    6.15 -static int (*ALSA_snd_pcm_drain)(snd_pcm_t *);
    6.16 -static const char *(*ALSA_snd_strerror)(int);
    6.17 -static size_t(*ALSA_snd_pcm_hw_params_sizeof)(void);
    6.18 -static size_t(*ALSA_snd_pcm_sw_params_sizeof)(void);
    6.19 -static int (*ALSA_snd_pcm_hw_params_any)(snd_pcm_t *, snd_pcm_hw_params_t *);
    6.20 +  (snd_pcm_t *, const void *, snd_pcm_uframes_t);
    6.21 +static int (*ALSA_snd_pcm_resume) (snd_pcm_t *);
    6.22 +static int (*ALSA_snd_pcm_prepare) (snd_pcm_t *);
    6.23 +static int (*ALSA_snd_pcm_drain) (snd_pcm_t *);
    6.24 +static const char *(*ALSA_snd_strerror) (int);
    6.25 +static size_t(*ALSA_snd_pcm_hw_params_sizeof) (void);
    6.26 +static size_t(*ALSA_snd_pcm_sw_params_sizeof) (void);
    6.27 +static int (*ALSA_snd_pcm_hw_params_any) (snd_pcm_t *, snd_pcm_hw_params_t *);
    6.28  static int (*ALSA_snd_pcm_hw_params_set_access)
    6.29 -                (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_access_t);
    6.30 +  (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_access_t);
    6.31  static int (*ALSA_snd_pcm_hw_params_set_format)
    6.32 -                (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_format_t);
    6.33 +  (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_format_t);
    6.34  static int (*ALSA_snd_pcm_hw_params_set_channels)
    6.35 -                (snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int);
    6.36 -static int (*ALSA_snd_pcm_hw_params_get_channels)(const snd_pcm_hw_params_t *);
    6.37 +  (snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int);
    6.38 +static int (*ALSA_snd_pcm_hw_params_get_channels) (const snd_pcm_hw_params_t
    6.39 +                                                   *);
    6.40  static unsigned int (*ALSA_snd_pcm_hw_params_set_rate_near)
    6.41 -                (snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int, int *);
    6.42 -static snd_pcm_uframes_t (*ALSA_snd_pcm_hw_params_set_period_size_near)
    6.43 -                (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_uframes_t, int *);
    6.44 -static snd_pcm_sframes_t (*ALSA_snd_pcm_hw_params_get_period_size)
    6.45 -                (const snd_pcm_hw_params_t *);
    6.46 +  (snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int, int *);
    6.47 +static snd_pcm_uframes_t(*ALSA_snd_pcm_hw_params_set_period_size_near)
    6.48 +  (snd_pcm_t *, snd_pcm_hw_params_t *, snd_pcm_uframes_t, int *);
    6.49 +static snd_pcm_sframes_t(*ALSA_snd_pcm_hw_params_get_period_size)
    6.50 +  (const snd_pcm_hw_params_t *);
    6.51  static unsigned int (*ALSA_snd_pcm_hw_params_set_periods_near)
    6.52 -                (snd_pcm_t *,snd_pcm_hw_params_t *, unsigned int, int *);
    6.53 -static int (*ALSA_snd_pcm_hw_params_get_periods)(snd_pcm_hw_params_t *);
    6.54 -static int (*ALSA_snd_pcm_hw_params)(snd_pcm_t *, snd_pcm_hw_params_t *);
    6.55 -static int (*ALSA_snd_pcm_sw_params_current)(snd_pcm_t*, snd_pcm_sw_params_t*);
    6.56 +  (snd_pcm_t *, snd_pcm_hw_params_t *, unsigned int, int *);
    6.57 +static int (*ALSA_snd_pcm_hw_params_get_periods) (snd_pcm_hw_params_t *);
    6.58 +static int (*ALSA_snd_pcm_hw_params) (snd_pcm_t *, snd_pcm_hw_params_t *);
    6.59 +static int (*ALSA_snd_pcm_sw_params_current) (snd_pcm_t *,
    6.60 +                                              snd_pcm_sw_params_t *);
    6.61  static int (*ALSA_snd_pcm_sw_params_set_start_threshold)
    6.62 -                (snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t);
    6.63 +  (snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t);
    6.64  static int (*ALSA_snd_pcm_sw_params_set_avail_min)
    6.65 -                (snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t);
    6.66 -static int (*ALSA_snd_pcm_sw_params)(snd_pcm_t *, snd_pcm_sw_params_t *);
    6.67 -static int (*ALSA_snd_pcm_nonblock)(snd_pcm_t *, int);
    6.68 +  (snd_pcm_t *, snd_pcm_sw_params_t *, snd_pcm_uframes_t);
    6.69 +static int (*ALSA_snd_pcm_sw_params) (snd_pcm_t *, snd_pcm_sw_params_t *);
    6.70 +static int (*ALSA_snd_pcm_nonblock) (snd_pcm_t *, int);
    6.71  #define snd_pcm_hw_params_sizeof ALSA_snd_pcm_hw_params_sizeof
    6.72  #define snd_pcm_sw_params_sizeof ALSA_snd_pcm_sw_params_sizeof
    6.73  
    6.74 @@ -118,7 +120,8 @@
    6.75  #define SDL_ALSA_SYM(x) ALSA_##x = x
    6.76  #endif
    6.77  
    6.78 -static int load_alsa_syms(void)
    6.79 +static int
    6.80 +load_alsa_syms(void)
    6.81  {
    6.82      SDL_ALSA_SYM(snd_pcm_open);
    6.83      SDL_ALSA_SYM(snd_pcm_close);
    6.84 @@ -147,6 +150,7 @@
    6.85      SDL_ALSA_SYM(snd_pcm_nonblock);
    6.86      return 0;
    6.87  }
    6.88 +
    6.89  #undef SDL_ALSA_SYM
    6.90  
    6.91  #ifdef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
    6.92 @@ -169,7 +173,7 @@
    6.93          if (alsa_handle == NULL) {
    6.94              retval = -1;
    6.95              SDL_SetError("ALSA: dlopen('%s') failed: %s\n",
    6.96 -                          alsa_library, strerror(errno));
    6.97 +                         alsa_library, strerror(errno));
    6.98          } else {
    6.99              retval = load_alsa_syms();
   6.100              if (retval < 0) {
   6.101 @@ -376,7 +380,7 @@
   6.102  
   6.103      /* Initialize all variables that we clean on shutdown */
   6.104      this->hidden = (struct SDL_PrivateAudioData *)
   6.105 -                        SDL_malloc((sizeof *this->hidden));
   6.106 +        SDL_malloc((sizeof *this->hidden));
   6.107      if (this->hidden == NULL) {
   6.108          SDL_OutOfMemory();
   6.109          return 0;
   6.110 @@ -422,7 +426,7 @@
   6.111      status = -1;
   6.112      for (test_format = SDL_FirstAudioFormat(this->spec.format);
   6.113           test_format && (status < 0);) {
   6.114 -        status = 0;      /* if we can't support a format, it'll become -1. */
   6.115 +        status = 0;             /* if we can't support a format, it'll become -1. */
   6.116          switch (test_format) {
   6.117          case AUDIO_U8:
   6.118              format = SND_PCM_FORMAT_U8;
   6.119 @@ -512,15 +516,15 @@
   6.120                       ALSA_snd_strerror(status));
   6.121          return 0;
   6.122      }
   6.123 -
   6.124  #if AUDIO_DEBUG
   6.125 -{
   6.126 -    snd_pcm_sframes_t bufsize;
   6.127 -    int fragments;
   6.128 -    bufsize = ALSA_snd_pcm_hw_params_get_period_size(hwparams);
   6.129 -    fragments = ALSA_snd_pcm_hw_params_get_periods(hwparams);
   6.130 -    fprintf(stderr,"ALSA: bufsize = %ld, fragments = %d\n",bufsize,fragments);
   6.131 -}
   6.132 +    {
   6.133 +        snd_pcm_sframes_t bufsize;
   6.134 +        int fragments;
   6.135 +        bufsize = ALSA_snd_pcm_hw_params_get_period_size(hwparams);
   6.136 +        fragments = ALSA_snd_pcm_hw_params_get_periods(hwparams);
   6.137 +        fprintf(stderr, "ALSA: bufsize = %ld, fragments = %d\n", bufsize,
   6.138 +                fragments);
   6.139 +    }
   6.140  #endif
   6.141  
   6.142      /* Set the software parameters */
   6.143 @@ -532,14 +536,16 @@
   6.144                       ALSA_snd_strerror(status));
   6.145          return 0;
   6.146      }
   6.147 -    status = ALSA_snd_pcm_sw_params_set_start_threshold(pcm_handle,swparams,0);
   6.148 +    status =
   6.149 +        ALSA_snd_pcm_sw_params_set_start_threshold(pcm_handle, swparams, 0);
   6.150      if (status < 0) {
   6.151          ALSA_CloseDevice(this);
   6.152          SDL_SetError("ALSA: Couldn't set start threshold: %s",
   6.153                       ALSA_snd_strerror(status));
   6.154          return 0;
   6.155      }
   6.156 -    status = ALSA_snd_pcm_sw_params_set_avail_min(pcm_handle, swparams, frames);
   6.157 +    status =
   6.158 +        ALSA_snd_pcm_sw_params_set_avail_min(pcm_handle, swparams, frames);
   6.159      if (status < 0) {
   6.160          ALSA_CloseDevice(this);
   6.161          SDL_SetError("Couldn't set avail min: %s", ALSA_snd_strerror(status));
   6.162 @@ -583,7 +589,7 @@
   6.163  }
   6.164  
   6.165  static int
   6.166 -ALSA_Init(SDL_AudioDriverImpl *impl)
   6.167 +ALSA_Init(SDL_AudioDriverImpl * impl)
   6.168  {
   6.169      if (LoadALSALibrary() < 0) {
   6.170          return 0;
   6.171 @@ -596,7 +602,7 @@
   6.172      impl->PlayDevice = ALSA_PlayDevice;
   6.173      impl->CloseDevice = ALSA_CloseDevice;
   6.174      impl->Deinitialize = ALSA_Deinitialize;
   6.175 -    impl->OnlyHasDefaultOutputDevice = 1;  /* !!! FIXME: Add device enum! */
   6.176 +    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: Add device enum! */
   6.177  
   6.178      return 1;
   6.179  }
     7.1 --- a/src/audio/arts/SDL_artsaudio.c	Sat Oct 28 16:41:54 2006 +0000
     7.2 +++ b/src/audio/arts/SDL_artsaudio.c	Sat Oct 28 16:48:03 2006 +0000
     7.3 @@ -66,15 +66,13 @@
     7.4      const char *name;
     7.5      void **func;
     7.6  } arts_functions[] = {
     7.7 -    SDL_ARTS_SYM(arts_init),
     7.8 -    SDL_ARTS_SYM(arts_free),
     7.9 -    SDL_ARTS_SYM(arts_play_stream),
    7.10 -    SDL_ARTS_SYM(arts_stream_set),
    7.11 -    SDL_ARTS_SYM(arts_stream_get),
    7.12 -    SDL_ARTS_SYM(arts_write),
    7.13 -    SDL_ARTS_SYM(arts_close_stream),
    7.14 -    SDL_ARTS_SYM(arts_error_text),
    7.15 -};
    7.16 +SDL_ARTS_SYM(arts_init),
    7.17 +        SDL_ARTS_SYM(arts_free),
    7.18 +        SDL_ARTS_SYM(arts_play_stream),
    7.19 +        SDL_ARTS_SYM(arts_stream_set),
    7.20 +        SDL_ARTS_SYM(arts_stream_get),
    7.21 +        SDL_ARTS_SYM(arts_write),
    7.22 +        SDL_ARTS_SYM(arts_close_stream), SDL_ARTS_SYM(arts_error_text),};
    7.23  #undef SDL_ARTS_SYM
    7.24  
    7.25  static void
    7.26 @@ -147,7 +145,8 @@
    7.27      }
    7.28  
    7.29      /* Use timer for general audio synchronization */
    7.30 -    ticks = ((Sint32) (this->hidden->next_frame-SDL_GetTicks())) - FUDGE_TICKS;
    7.31 +    ticks =
    7.32 +        ((Sint32) (this->hidden->next_frame - SDL_GetTicks())) - FUDGE_TICKS;
    7.33      if (ticks > 0) {
    7.34          SDL_Delay(ticks);
    7.35      }
    7.36 @@ -157,10 +156,9 @@
    7.37  ARTS_PlayDevice(_THIS)
    7.38  {
    7.39      /* Write the audio data */
    7.40 -    int written = SDL_NAME(arts_write) (
    7.41 -                        this->hidden->stream,
    7.42 -                        this->hidden->mixbuf,
    7.43 -                        this->hidden->mixlen);
    7.44 +    int written = SDL_NAME(arts_write) (this->hidden->stream,
    7.45 +                                        this->hidden->mixbuf,
    7.46 +                                        this->hidden->mixlen);
    7.47  
    7.48      /* If timer synchronization is enabled, set the next write frame */
    7.49      if (this->hidden->frame_ticks) {
    7.50 @@ -218,7 +216,7 @@
    7.51  
    7.52      /* Initialize all variables that we clean on shutdown */
    7.53      this->hidden = (struct SDL_PrivateAudioData *)
    7.54 -                        SDL_malloc((sizeof *this->hidden));
    7.55 +        SDL_malloc((sizeof *this->hidden));
    7.56      if (this->hidden == NULL) {
    7.57          SDL_OutOfMemory();
    7.58          return 0;
    7.59 @@ -257,14 +255,14 @@
    7.60  
    7.61      if ((rc = SDL_NAME(arts_init) ()) != 0) {
    7.62          ARTS_CloseDevice(this);
    7.63 -        SDL_SetError( "Unable to initialize ARTS: %s",
    7.64 -                      SDL_NAME(arts_error_text)(rc) );
    7.65 +        SDL_SetError("Unable to initialize ARTS: %s",
    7.66 +                     SDL_NAME(arts_error_text) (rc));
    7.67          return 0;
    7.68      }
    7.69 -    this->hidden->stream = SDL_NAME(arts_play_stream) (
    7.70 -                                            this->spec.freq,
    7.71 -                                            bits, this->spec.channels,
    7.72 -                                            "SDL");
    7.73 +    this->hidden->stream = SDL_NAME(arts_play_stream) (this->spec.freq,
    7.74 +                                                       bits,
    7.75 +                                                       this->spec.channels,
    7.76 +                                                       "SDL");
    7.77  
    7.78      /* Calculate the final parameters for this audio specification */
    7.79      SDL_CalculateAudioSpec(&this->spec);
    7.80 @@ -280,7 +278,7 @@
    7.81  
    7.82  #ifdef ARTS_P_PACKET_SETTINGS
    7.83      SDL_NAME(arts_stream_set) (this->hidden->stream,
    7.84 -                                ARTS_P_PACKET_SETTINGS, frag_spec);
    7.85 +                               ARTS_P_PACKET_SETTINGS, frag_spec);
    7.86  #else
    7.87      SDL_NAME(arts_stream_set) (this->hidden->stream, ARTS_P_PACKET_SIZE,
    7.88                                 frag_spec & 0xffff);
    7.89 @@ -316,7 +314,7 @@
    7.90  
    7.91  
    7.92  static int
    7.93 -ARTS_Init(SDL_AudioDriverImpl *impl)
    7.94 +ARTS_Init(SDL_AudioDriverImpl * impl)
    7.95  {
    7.96      if (LoadARTSLibrary() < 0) {
    7.97          return 0;
     8.1 --- a/src/audio/baudio/SDL_beaudio.cc	Sat Oct 28 16:41:54 2006 +0000
     8.2 +++ b/src/audio/baudio/SDL_beaudio.cc	Sat Oct 28 16:48:03 2006 +0000
     8.3 @@ -58,15 +58,15 @@
     8.4          if (audio->convert.needed) {
     8.5              SDL_mutexP(audio->mixer_lock);
     8.6              (*audio->spec.callback) (audio->spec.userdata,
     8.7 -                                         (Uint8 *) audio->convert.buf,
     8.8 -                                         audio->convert.len);
     8.9 +                                     (Uint8 *) audio->convert.buf,
    8.10 +                                     audio->convert.len);
    8.11              SDL_mutexV(audio->mixer_lock);
    8.12              SDL_ConvertAudio(&audio->convert);
    8.13              SDL_memcpy(stream, audio->convert.buf, audio->convert.len_cvt);
    8.14          } else {
    8.15              SDL_mutexP(audio->mixer_lock);
    8.16              (*audio->spec.callback) (audio->spec.userdata,
    8.17 -                                        (Uint8 *) stream, len);
    8.18 +                                     (Uint8 *) stream, len);
    8.19              SDL_mutexV(audio->mixer_lock);
    8.20          }
    8.21      }
    8.22 @@ -106,56 +106,56 @@
    8.23      SDL_memset(&format, '\0', sizeof(media_raw_audio_format));
    8.24      format.byte_order = B_MEDIA_LITTLE_ENDIAN;
    8.25      format.frame_rate = (float) _this->spec.freq;
    8.26 -    format.channel_count = _this->spec.channels;  /* !!! FIXME: support > 2? */
    8.27 +    format.channel_count = _this->spec.channels;        /* !!! FIXME: support > 2? */
    8.28      while ((!valid_datatype) && (test_format)) {
    8.29          valid_datatype = 1;
    8.30          _this->spec.format = test_format;
    8.31          switch (test_format) {
    8.32 -            case AUDIO_S8:
    8.33 -                format.format = media_raw_audio_format::B_AUDIO_CHAR;
    8.34 -                break;
    8.35 +        case AUDIO_S8:
    8.36 +            format.format = media_raw_audio_format::B_AUDIO_CHAR;
    8.37 +            break;
    8.38  
    8.39 -            case AUDIO_U8:
    8.40 -                format.format = media_raw_audio_format::B_AUDIO_UCHAR;
    8.41 -                break;
    8.42 +        case AUDIO_U8:
    8.43 +            format.format = media_raw_audio_format::B_AUDIO_UCHAR;
    8.44 +            break;
    8.45  
    8.46 -            case AUDIO_S16LSB:
    8.47 -                format.format = media_raw_audio_format::B_AUDIO_SHORT;
    8.48 -                break;
    8.49 +        case AUDIO_S16LSB:
    8.50 +            format.format = media_raw_audio_format::B_AUDIO_SHORT;
    8.51 +            break;
    8.52  
    8.53 -            case AUDIO_S16MSB:
    8.54 -                format.format = media_raw_audio_format::B_AUDIO_SHORT;
    8.55 -                format.byte_order = B_MEDIA_BIG_ENDIAN;
    8.56 -                break;
    8.57 +        case AUDIO_S16MSB:
    8.58 +            format.format = media_raw_audio_format::B_AUDIO_SHORT;
    8.59 +            format.byte_order = B_MEDIA_BIG_ENDIAN;
    8.60 +            break;
    8.61  
    8.62 -            case AUDIO_S32LSB:
    8.63 -                format.format = media_raw_audio_format::B_AUDIO_INT;
    8.64 -                break;
    8.65 +        case AUDIO_S32LSB:
    8.66 +            format.format = media_raw_audio_format::B_AUDIO_INT;
    8.67 +            break;
    8.68  
    8.69 -            case AUDIO_S32MSB:
    8.70 -                format.format = media_raw_audio_format::B_AUDIO_INT;
    8.71 -                format.byte_order = B_MEDIA_BIG_ENDIAN;
    8.72 -                break;
    8.73 +        case AUDIO_S32MSB:
    8.74 +            format.format = media_raw_audio_format::B_AUDIO_INT;
    8.75 +            format.byte_order = B_MEDIA_BIG_ENDIAN;
    8.76 +            break;
    8.77  
    8.78 -            case AUDIO_F32LSB:
    8.79 -                format.format = media_raw_audio_format::B_AUDIO_FLOAT;
    8.80 -                break;
    8.81 +        case AUDIO_F32LSB:
    8.82 +            format.format = media_raw_audio_format::B_AUDIO_FLOAT;
    8.83 +            break;
    8.84  
    8.85 -            case AUDIO_F32MSB:
    8.86 -                format.format = media_raw_audio_format::B_AUDIO_FLOAT;
    8.87 -                format.byte_order = B_MEDIA_BIG_ENDIAN;
    8.88 -                break;
    8.89 +        case AUDIO_F32MSB:
    8.90 +            format.format = media_raw_audio_format::B_AUDIO_FLOAT;
    8.91 +            format.byte_order = B_MEDIA_BIG_ENDIAN;
    8.92 +            break;
    8.93  
    8.94 -            default:
    8.95 -                valid_datatype = 0;
    8.96 -                test_format = SDL_NextAudioFormat();
    8.97 -                break;
    8.98 +        default:
    8.99 +            valid_datatype = 0;
   8.100 +            test_format = SDL_NextAudioFormat();
   8.101 +            break;
   8.102          }
   8.103      }
   8.104  
   8.105      format.buffer_size = _this->spec.samples;
   8.106  
   8.107 -    if (!valid_datatype) {  /* shouldn't happen, but just in case... */
   8.108 +    if (!valid_datatype) {      /* shouldn't happen, but just in case... */
   8.109          BEOSAUDIO_CloseDevice(_this);
   8.110          SDL_SetError("Unsupported audio format");
   8.111          return 0;
   8.112 @@ -190,7 +190,7 @@
   8.113  }
   8.114  
   8.115  static int
   8.116 -BEOSAUDIO_Init(SDL_AudioDriverImpl *impl)
   8.117 +BEOSAUDIO_Init(SDL_AudioDriverImpl * impl)
   8.118  {
   8.119      /* Initialize the Be Application, if it's not already started */
   8.120      if (SDL_InitBeApp() < 0) {
   8.121 @@ -207,10 +207,12 @@
   8.122      return 1;
   8.123  }
   8.124  
   8.125 -extern "C" { extern AudioBootStrap BEOSAUDIO_bootstrap; }
   8.126 +extern "C"
   8.127 +{
   8.128 +    extern AudioBootStrap BEOSAUDIO_bootstrap;
   8.129 +}
   8.130  AudioBootStrap BEOSAUDIO_bootstrap = {
   8.131      "baudio", "BeOS BSoundPlayer", BEOSAUDIO_Init, 0
   8.132  };
   8.133  
   8.134  /* vi: set ts=4 sw=4 expandtab: */
   8.135 -
     9.1 --- a/src/audio/bsd/SDL_bsdaudio.c	Sat Oct 28 16:41:54 2006 +0000
     9.2 +++ b/src/audio/bsd/SDL_bsdaudio.c	Sat Oct 28 16:48:03 2006 +0000
     9.3 @@ -122,7 +122,7 @@
     9.4          return outputDeviceCount;
     9.5      }
     9.6  
     9.7 -    return 0;  /* shouldn't ever hit this. */
     9.8 +    return 0;                   /* shouldn't ever hit this. */
     9.9  }
    9.10  
    9.11  static const char *
    9.12 @@ -149,7 +149,7 @@
    9.13          fprintf(stderr, "AUDIO_GETINFO failed.\n");
    9.14          return;
    9.15      }
    9.16 -
    9.17 +    /* *INDENT-OFF* */
    9.18      fprintf(stderr, "\n"
    9.19              "[play/record info]\n"
    9.20              "buffer size	:   %d bytes\n"
    9.21 @@ -177,7 +177,9 @@
    9.22              info.play.error ? "yes" : "no",
    9.23              info.play.waiting ? "yes" : "no",
    9.24              info.play.active ? "yes" : "no");
    9.25 +    /* *INDENT-ON* */
    9.26  
    9.27 +    /* *INDENT-OFF* */
    9.28      fprintf(stderr, "\n"
    9.29              "[audio info]\n"
    9.30              "monitor_gain	:   %i\n"
    9.31 @@ -192,6 +194,7 @@
    9.32              (info.mode == AUMODE_PLAY) ? "PLAY"
    9.33              : (info.mode = AUMODE_RECORD) ? "RECORD"
    9.34              : (info.mode == AUMODE_PLAY_ALL ? "PLAY_ALL" : "?"));
    9.35 +    /* *INDENT-ON* */
    9.36  #endif /* DEBUG_AUDIO */
    9.37  }
    9.38  
    9.39 @@ -206,7 +209,9 @@
    9.40          /* Use timer for general audio synchronization */
    9.41          Sint32 ticks;
    9.42  
    9.43 -        ticks = ((Sint32)(this->hidden->next_frame-SDL_GetTicks()))-FUDGE_TICKS;
    9.44 +        ticks =
    9.45 +            ((Sint32) (this->hidden->next_frame - SDL_GetTicks())) -
    9.46 +            FUDGE_TICKS;
    9.47          if (ticks > 0) {
    9.48              SDL_Delay(ticks);
    9.49          }
    9.50 @@ -222,7 +227,8 @@
    9.51  #ifdef DEBUG_AUDIO
    9.52          fprintf(stderr, "Waiting for audio to get ready\n");
    9.53  #endif
    9.54 -        if (select(this->hidden->audio_fd+1,NULL,&fdset,NULL,&timeout) <= 0) {
    9.55 +        if (select(this->hidden->audio_fd + 1, NULL, &fdset, NULL, &timeout)
    9.56 +            <= 0) {
    9.57              const char *message =
    9.58                  "Audio timeout - buggy audio driver? (disabled)";
    9.59              /* In general we should never print to the screen,
    9.60 @@ -252,8 +258,7 @@
    9.61      /* Write the audio data, checking for EAGAIN on broken audio drivers */
    9.62      do {
    9.63          written = write(this->hidden->audio_fd,
    9.64 -                        &this->hidden->mixbuf[p],
    9.65 -                        this->hidden->mixlen - p);
    9.66 +                        &this->hidden->mixbuf[p], this->hidden->mixlen - p);
    9.67  
    9.68          if (written > 0)
    9.69              p += written;
    9.70 @@ -317,8 +322,8 @@
    9.71      /* We don't care what the devname is...we'll try to open anything. */
    9.72      /*  ...but default to first name in the list... */
    9.73      if (devname == NULL) {
    9.74 -        if ( ((iscapture) && (inputDeviceCount == 0)) ||
    9.75 -             ((!iscapture) && (outputDeviceCount == 0)) ) {
    9.76 +        if (((iscapture) && (inputDeviceCount == 0)) ||
    9.77 +            ((!iscapture) && (outputDeviceCount == 0))) {
    9.78              SDL_SetError("No such audio device");
    9.79              return 0;
    9.80          }
    9.81 @@ -327,7 +332,7 @@
    9.82  
    9.83      /* Initialize all variables that we clean on shutdown */
    9.84      this->hidden = (struct SDL_PrivateAudioData *)
    9.85 -                        SDL_malloc((sizeof *this->hidden));
    9.86 +        SDL_malloc((sizeof *this->hidden));
    9.87      if (this->hidden == NULL) {
    9.88          SDL_OutOfMemory();
    9.89          return 0;
    9.90 @@ -429,7 +434,7 @@
    9.91  }
    9.92  
    9.93  static int
    9.94 -BSDAUDIO_Init(SDL_AudioDriverImpl *impl)
    9.95 +BSDAUDIO_Init(SDL_AudioDriverImpl * impl)
    9.96  {
    9.97      /* Set the function pointers */
    9.98      impl->DetectDevices = BSDAUDIO_DetectDevices;
    10.1 --- a/src/audio/dart/SDL_dart.c	Sat Oct 28 16:41:54 2006 +0000
    10.2 +++ b/src/audio/dart/SDL_dart.c	Sat Oct 28 16:48:03 2006 +0000
    10.3 @@ -90,7 +90,7 @@
    10.4  
    10.5      /* Initialize all variables that we clean on shutdown */
    10.6      _this->hidden = (struct SDL_PrivateAudioData *)
    10.7 -                        SDL_malloc((sizeof *_this->hidden));
    10.8 +        SDL_malloc((sizeof *_this->hidden));
    10.9      if (_this->hidden == NULL) {
   10.10          SDL_OutOfMemory();
   10.11          return 0;
   10.12 @@ -108,12 +108,11 @@
   10.13          iOpenMode |= MCI_OPEN_SHAREABLE;
   10.14  
   10.15      rc = mciSendCommand(0, MCI_OPEN, iOpenMode, (PVOID) & AmpOpenParms, 0);
   10.16 -    if (rc != MCIERR_SUCCESS) {  // No audio available??
   10.17 +    if (rc != MCIERR_SUCCESS) { // No audio available??
   10.18          DART_CloseDevice(_this);
   10.19          SDL_SetError("DART: Couldn't open audio device.");
   10.20          return 0;
   10.21      }
   10.22 -
   10.23      // Save the device ID we got from DART!
   10.24      // We will use this in the next calls!
   10.25      _this->hidden->iCurrDeviceOrd = iDeviceOrd = AmpOpenParms.usDeviceID;
   10.26 @@ -361,7 +360,7 @@
   10.27      APIRET rc = NO_ERROR;
   10.28  
   10.29      pBufDesc = (pMixBufferDesc)
   10.30 -          _this->hidden->pMixBuffers[_this->hidden->iLastPlayedBuf].ulUserParm;
   10.31 +        _this->hidden->pMixBuffers[_this->hidden->iLastPlayedBuf].ulUserParm;
   10.32  
   10.33      while ((pBufDesc->iBufferUsage != BUFFER_EMPTY) && (rc == NO_ERROR)) {
   10.34          DosResetEventSem(_this->hidden->hevAudioBufferPlayed, &ulPostCount);
   10.35 @@ -388,13 +387,11 @@
   10.36              }
   10.37  #endif
   10.38          }
   10.39 -
   10.40          // Close event semaphore
   10.41          if (_this->hidden->hevAudioBufferPlayed) {
   10.42              DosCloseEventSem(_this->hidden->hevAudioBufferPlayed);
   10.43              _this->hidden->hevAudioBufferPlayed = 0;
   10.44          }
   10.45 -
   10.46          // Free memory of buffer descriptions
   10.47          for (i = 0; i < _this->hidden->iCurrNumBufs; i++) {
   10.48              SDL_free((void *) (_this->hidden->pMixBuffers[i].ulUserParm));
   10.49 @@ -408,13 +405,11 @@
   10.50                                  MCI_WAIT | MCI_DEALLOCATE_MEMORY,
   10.51                                  &(_this->hidden->BufferParms), 0);
   10.52          }
   10.53 -
   10.54          // Free bufferlist
   10.55          if (_this->hidden->pMixBuffers != NULL) {
   10.56              SDL_free(_this->hidden->pMixBuffers);
   10.57              _this->hidden->pMixBuffers = NULL;
   10.58          }
   10.59 -
   10.60          // Close dart
   10.61          if (_this->hidden->iCurrDeviceOrd) {
   10.62              rc = mciSendCommand(_this->hidden->iCurrDeviceOrd, MCI_CLOSE,
   10.63 @@ -429,7 +424,7 @@
   10.64  
   10.65  
   10.66  static int
   10.67 -DART_Init(SDL_AudioDriverImpl *impl)
   10.68 +DART_Init(SDL_AudioDriverImpl * impl)
   10.69  {
   10.70      /* Set the function pointers */
   10.71      impl->OpenDevice = DART_OpenDevice;
   10.72 @@ -439,7 +434,7 @@
   10.73      impl->PlayDevice = DART_PlayDevice;
   10.74      impl->WaitDone = DART_WaitDone;
   10.75      impl->CloseDevice = DART_CloseDevice;
   10.76 -    impl->OnlyHasDefaultOutputDevice = 1;  /* !!! FIXME: is this right? */
   10.77 +    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: is this right? */
   10.78  
   10.79      return 1;
   10.80  }
    11.1 --- a/src/audio/dc/SDL_dcaudio.c	Sat Oct 28 16:41:54 2006 +0000
    11.2 +++ b/src/audio/dc/SDL_dcaudio.c	Sat Oct 28 16:48:03 2006 +0000
    11.3 @@ -170,7 +170,7 @@
    11.4  
    11.5      /* Initialize all variables that we clean on shutdown */
    11.6      this->hidden = (struct SDL_PrivateAudioData *)
    11.7 -                        SDL_malloc((sizeof *this->hidden));
    11.8 +        SDL_malloc((sizeof *this->hidden));
    11.9      if (this->hidden == NULL) {
   11.10          SDL_OutOfMemory();
   11.11          return 0;
   11.12 @@ -225,7 +225,7 @@
   11.13  }
   11.14  
   11.15  static int
   11.16 -DCAUD_Init(SDL_AudioDriverImpl *impl)
   11.17 +DCAUD_Init(SDL_AudioDriverImpl * impl)
   11.18  {
   11.19      /* Set the function pointers */
   11.20      impl->OpenDevice = DCAUD_OpenDevice;
    12.1 --- a/src/audio/disk/SDL_diskaudio.c	Sat Oct 28 16:41:54 2006 +0000
    12.2 +++ b/src/audio/disk/SDL_diskaudio.c	Sat Oct 28 16:48:03 2006 +0000
    12.3 @@ -112,12 +112,12 @@
    12.4      const char *fname = DISKAUD_GetOutputFilename(devname);
    12.5  
    12.6      this->hidden = (struct SDL_PrivateAudioData *)
    12.7 -            SDL_malloc(sizeof (*this->hidden));
    12.8 +        SDL_malloc(sizeof(*this->hidden));
    12.9      if (this->hidden == NULL) {
   12.10          SDL_OutOfMemory();
   12.11          return 0;
   12.12      }
   12.13 -    SDL_memset(this->hidden, 0, sizeof (*this->hidden));
   12.14 +    SDL_memset(this->hidden, 0, sizeof(*this->hidden));
   12.15  
   12.16      /* Open the audio device */
   12.17      this->hidden->output = SDL_RWFromFile(fname, "wb");
   12.18 @@ -149,7 +149,7 @@
   12.19  }
   12.20  
   12.21  static int
   12.22 -DISKAUD_Init(SDL_AudioDriverImpl *impl)
   12.23 +DISKAUD_Init(SDL_AudioDriverImpl * impl)
   12.24  {
   12.25      /* Set the function pointers */
   12.26      impl->OpenDevice = DISKAUD_OpenDevice;
    13.1 --- a/src/audio/dma/SDL_dmaaudio.c	Sat Oct 28 16:41:54 2006 +0000
    13.2 +++ b/src/audio/dma/SDL_dmaaudio.c	Sat Oct 28 16:48:03 2006 +0000
    13.3 @@ -74,8 +74,7 @@
    13.4      struct audio_buf_info info;
    13.5      if ((ioctl(fd, SNDCTL_DSP_GETCAPS, &caps) == 0) &&
    13.6          (caps & DSP_CAP_TRIGGER) && (caps & DSP_CAP_MMAP) &&
    13.7 -        (ioctl(fd, SNDCTL_DSP_GETOSPACE, &info) == 0))
    13.8 -    {
    13.9 +        (ioctl(fd, SNDCTL_DSP_GETOSPACE, &info) == 0)) {
   13.10          size_t len = info.fragstotal * info.fragsize;
   13.11          Uint8 *buf = (Uint8 *) mmap(NULL, len, PROT_WRITE, MAP_SHARED, fd, 0);
   13.12          if (buf != MAP_FAILED) {
   13.13 @@ -117,7 +116,8 @@
   13.14  }
   13.15  
   13.16  
   13.17 -static void DMA_Deinitialize(void)
   13.18 +static void
   13.19 +DMA_Deinitialize(void)
   13.20  {
   13.21      free_device_lists();
   13.22  }
   13.23 @@ -133,7 +133,7 @@
   13.24          return outputDeviceCount;
   13.25      }
   13.26  
   13.27 -    return 0;  /* shouldn't ever hit this. */
   13.28 +    return 0;                   /* shouldn't ever hit this. */
   13.29  }
   13.30  
   13.31  
   13.32 @@ -240,8 +240,8 @@
   13.33      /* We don't care what the devname is...we'll try to open anything. */
   13.34      /*  ...but default to first name in the list... */
   13.35      if (devname == NULL) {
   13.36 -        if ( ((iscapture) && (inputDeviceCount == 0)) ||
   13.37 -             ((!iscapture) && (outputDeviceCount == 0)) ) {
   13.38 +        if (((iscapture) && (inputDeviceCount == 0)) ||
   13.39 +            ((!iscapture) && (outputDeviceCount == 0))) {
   13.40              SDL_SetError("No such audio device");
   13.41              return 0;
   13.42          }
   13.43 @@ -250,7 +250,7 @@
   13.44  
   13.45      /* Initialize all variables that we clean on shutdown */
   13.46      this->hidden = (struct SDL_PrivateAudioData *)
   13.47 -                        SDL_malloc((sizeof *this->hidden));
   13.48 +        SDL_malloc((sizeof *this->hidden));
   13.49      if (this->hidden == NULL) {
   13.50          SDL_OutOfMemory();
   13.51          return 0;
   13.52 @@ -380,7 +380,8 @@
   13.53          char *workaround;
   13.54          workaround = SDL_getenv("SDL_DSP_NOSELECT");
   13.55          if (workaround) {
   13.56 -            frame_ticks = (float) (this->spec.samples*1000) / this->spec.freq;
   13.57 +            frame_ticks =
   13.58 +                (float) (this->spec.samples * 1000) / this->spec.freq;
   13.59              next_frame = SDL_GetTicks() + frame_ticks;
   13.60          }
   13.61      }
   13.62 @@ -511,7 +512,7 @@
   13.63  
   13.64  
   13.65  static int
   13.66 -DMA_Init(SDL_AudioDriverImpl *impl)
   13.67 +DMA_Init(SDL_AudioDriverImpl * impl)
   13.68  {
   13.69      /* Set the function pointers */
   13.70      impl->DetectDevices = DMA_DetectDevices;
    14.1 --- a/src/audio/dmedia/SDL_irixaudio.c	Sat Oct 28 16:41:54 2006 +0000
    14.2 +++ b/src/audio/dmedia/SDL_irixaudio.c	Sat Oct 28 16:48:03 2006 +0000
    14.3 @@ -104,7 +104,7 @@
    14.4  
    14.5      /* Initialize all variables that we clean on shutdown */
    14.6      this->hidden = (struct SDL_PrivateAudioData *)
    14.7 -                        SDL_malloc((sizeof *this->hidden));
    14.8 +        SDL_malloc((sizeof *this->hidden));
    14.9      if (this->hidden == NULL) {
   14.10          SDL_OutOfMemory();
   14.11          return 0;
   14.12 @@ -160,15 +160,17 @@
   14.13              valid = 0;
   14.14              if (audio_config) {
   14.15                  if (alSetChannels(audio_config, this->spec.channels) < 0) {
   14.16 -                    if (this->spec.channels > 2) { /* can't handle > stereo? */
   14.17 -                        this->spec.channels = 2;   /* try again below. */
   14.18 +                    if (this->spec.channels > 2) {      /* can't handle > stereo? */
   14.19 +                        this->spec.channels = 2;        /* try again below. */
   14.20                      }
   14.21                  }
   14.22  
   14.23                  if ((alSetSampFmt(audio_config, fmt) >= 0) &&
   14.24                      ((!width) || (alSetWidth(audio_config, width) >= 0)) &&
   14.25 -                    (alSetQueueSize(audio_config,this->spec.samples*2) >= 0) &&
   14.26 -                    (alSetChannels(audio_config, this->spec.channels) >= 0)) {
   14.27 +                    (alSetQueueSize(audio_config, this->spec.samples * 2) >=
   14.28 +                     0)
   14.29 +                    && (alSetChannels(audio_config, this->spec.channels) >=
   14.30 +                        0)) {
   14.31  
   14.32                      this->hidden->audio_port = alOpenPort("SDL audio", "w",
   14.33                                                            audio_config);
   14.34 @@ -178,8 +180,8 @@
   14.35                          if (err == AL_BAD_CHANNELS) {
   14.36                              this->spec.channels = 2;
   14.37                              alSetChannels(audio_config, this->spec.channels);
   14.38 -                            this->hidden->audio_port = alOpenPort("SDL audio", "w",
   14.39 -                                                                 audio_config);
   14.40 +                            this->hidden->audio_port =
   14.41 +                                alOpenPort("SDL audio", "w", audio_config);
   14.42                          }
   14.43                      }
   14.44  
   14.45 @@ -216,7 +218,7 @@
   14.46  }
   14.47  
   14.48  static int
   14.49 -IRIXAUDIO_Init(SDL_AudioDriverImpl *impl)
   14.50 +IRIXAUDIO_Init(SDL_AudioDriverImpl * impl)
   14.51  {
   14.52      /* Set the function pointers */
   14.53      impl->OpenDevice = DSP_OpenDevice;
   14.54 @@ -224,7 +226,7 @@
   14.55      impl->WaitDevice = DSP_WaitDevice;
   14.56      impl->GetDeviceBuf = DSP_GetDeviceBuf;
   14.57      impl->CloseDevice = DSP_CloseDevice;
   14.58 -    impl->OnlyHasDefaultOutputDevice = 1;  /* !!! FIXME: not true, I think. */
   14.59 +    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: not true, I think. */
   14.60  
   14.61      return 1;
   14.62  }
    15.1 --- a/src/audio/dmedia/SDL_irixaudio.h	Sat Oct 28 16:41:54 2006 +0000
    15.2 +++ b/src/audio/dmedia/SDL_irixaudio.h	Sat Oct 28 16:48:03 2006 +0000
    15.3 @@ -33,8 +33,8 @@
    15.4  
    15.5  struct SDL_PrivateAudioData
    15.6  {
    15.7 -    ALport audio_port;    /* The handle for the audio device */
    15.8 -    Uint8 *mixbuf;        /* The app mixing buffer */
    15.9 +    ALport audio_port;          /* The handle for the audio device */
   15.10 +    Uint8 *mixbuf;              /* The app mixing buffer */
   15.11  };
   15.12  
   15.13  #endif /* _SDL_irixaudio_h */
    16.1 --- a/src/audio/dsp/SDL_dspaudio.c	Sat Oct 28 16:41:54 2006 +0000
    16.2 +++ b/src/audio/dsp/SDL_dspaudio.c	Sat Oct 28 16:48:03 2006 +0000
    16.3 @@ -111,7 +111,7 @@
    16.4          return outputDeviceCount;
    16.5      }
    16.6  
    16.7 -    return 0;  /* shouldn't ever hit this. */
    16.8 +    return 0;                   /* shouldn't ever hit this. */
    16.9  }
   16.10  
   16.11  static const char *
   16.12 @@ -158,8 +158,8 @@
   16.13      /* We don't care what the devname is...we'll try to open anything. */
   16.14      /*  ...but default to first name in the list... */
   16.15      if (devname == NULL) {
   16.16 -        if ( ((iscapture) && (inputDeviceCount == 0)) ||
   16.17 -             ((!iscapture) && (outputDeviceCount == 0)) ) {
   16.18 +        if (((iscapture) && (inputDeviceCount == 0)) ||
   16.19 +            ((!iscapture) && (outputDeviceCount == 0))) {
   16.20              SDL_SetError("No such audio device");
   16.21              return 0;
   16.22          }
   16.23 @@ -168,7 +168,7 @@
   16.24  
   16.25      /* Initialize all variables that we clean on shutdown */
   16.26      this->hidden = (struct SDL_PrivateAudioData *)
   16.27 -                        SDL_malloc((sizeof *this->hidden));
   16.28 +        SDL_malloc((sizeof *this->hidden));
   16.29      if (this->hidden == NULL) {
   16.30          SDL_OutOfMemory();
   16.31          return 0;
   16.32 @@ -265,8 +265,8 @@
   16.33  
   16.34      /* Set the audio format */
   16.35      value = format;
   16.36 -    if ( (ioctl(this->hidden->audio_fd, SNDCTL_DSP_SETFMT, &value) < 0) ||
   16.37 -         (value != format) ) {
   16.38 +    if ((ioctl(this->hidden->audio_fd, SNDCTL_DSP_SETFMT, &value) < 0) ||
   16.39 +        (value != format)) {
   16.40          perror("SNDCTL_DSP_SETFMT");
   16.41          DSP_CloseDevice(this);
   16.42          SDL_SetError("Couldn't set audio format");
   16.43 @@ -360,7 +360,7 @@
   16.44  }
   16.45  
   16.46  static int
   16.47 -DSP_Init(SDL_AudioDriverImpl *impl)
   16.48 +DSP_Init(SDL_AudioDriverImpl * impl)
   16.49  {
   16.50      /* Set the function pointers */
   16.51      impl->DetectDevices = DSP_DetectDevices;
    17.1 --- a/src/audio/dummy/SDL_dummyaudio.c	Sat Oct 28 16:41:54 2006 +0000
    17.2 +++ b/src/audio/dummy/SDL_dummyaudio.c	Sat Oct 28 16:48:03 2006 +0000
    17.3 @@ -32,11 +32,11 @@
    17.4  static int
    17.5  DUMMYAUD_OpenDevice(_THIS, const char *devname, int iscapture)
    17.6  {
    17.7 -    return 1;   /* always succeeds. */
    17.8 +    return 1;                   /* always succeeds. */
    17.9  }
   17.10  
   17.11  static int
   17.12 -DUMMYAUD_Init(SDL_AudioDriverImpl *impl)
   17.13 +DUMMYAUD_Init(SDL_AudioDriverImpl * impl)
   17.14  {
   17.15      /* Set the function pointers */
   17.16      impl->OpenDevice = DUMMYAUD_OpenDevice;
    18.1 --- a/src/audio/esd/SDL_esdaudio.c	Sat Oct 28 16:41:54 2006 +0000
    18.2 +++ b/src/audio/esd/SDL_esdaudio.c	Sat Oct 28 16:48:03 2006 +0000
    18.3 @@ -61,10 +61,8 @@
    18.4      const char *name;
    18.5      void **func;
    18.6  } esd_functions[] = {
    18.7 -    SDL_ESD_SYM(esd_open_sound),
    18.8 -    SDL_ESD_SYM(esd_close),
    18.9 -    SDL_ESD_SYM(esd_play_stream),
   18.10 -};
   18.11 +SDL_ESD_SYM(esd_open_sound),
   18.12 +        SDL_ESD_SYM(esd_close), SDL_ESD_SYM(esd_play_stream),};
   18.13  #undef SDL_ESD_SYM
   18.14  
   18.15  static void
   18.16 @@ -137,7 +135,8 @@
   18.17      }
   18.18  
   18.19      /* Use timer for general audio synchronization */
   18.20 -    ticks = ((Sint32) (this->hidden->next_frame-SDL_GetTicks())) - FUDGE_TICKS;
   18.21 +    ticks =
   18.22 +        ((Sint32) (this->hidden->next_frame - SDL_GetTicks())) - FUDGE_TICKS;
   18.23      if (ticks > 0) {
   18.24          SDL_Delay(ticks);
   18.25      }
   18.26 @@ -151,8 +150,7 @@
   18.27      /* Write the audio data, checking for EAGAIN on broken audio drivers */
   18.28      do {
   18.29          written = write(this->hidden->audio_fd,
   18.30 -                        this->hidden->mixbuf,
   18.31 -                        this->hidden->mixlen);
   18.32 +                        this->hidden->mixbuf, this->hidden->mixlen);
   18.33          if ((written < 0) && ((errno == 0) || (errno == EAGAIN))) {
   18.34              SDL_Delay(1);       /* Let a little CPU time go by */
   18.35          }
   18.36 @@ -229,7 +227,7 @@
   18.37  
   18.38      /* Initialize all variables that we clean on shutdown */
   18.39      this->hidden = (struct SDL_PrivateAudioData *)
   18.40 -                        SDL_malloc((sizeof *this->hidden));
   18.41 +        SDL_malloc((sizeof *this->hidden));
   18.42      if (this->hidden == NULL) {
   18.43          SDL_OutOfMemory();
   18.44          return 0;
   18.45 @@ -246,15 +244,15 @@
   18.46  #endif
   18.47          found = 1;
   18.48          switch (test_format) {
   18.49 -            case AUDIO_U8:
   18.50 -                format |= ESD_BITS8;
   18.51 -                break;
   18.52 -            case AUDIO_S16SYS:
   18.53 -                format |= ESD_BITS16;
   18.54 -                break;
   18.55 -            default:
   18.56 -                found = 0;
   18.57 -                break;
   18.58 +        case AUDIO_U8:
   18.59 +            format |= ESD_BITS8;
   18.60 +            break;
   18.61 +        case AUDIO_S16SYS:
   18.62 +            format |= ESD_BITS16;
   18.63 +            break;
   18.64 +        default:
   18.65 +            found = 0;
   18.66 +            break;
   18.67          }
   18.68      }
   18.69  
   18.70 @@ -270,12 +268,13 @@
   18.71          format |= ESD_STEREO;
   18.72      }
   18.73  #if 0
   18.74 -    this->spec.samples = ESD_BUF_SIZE;   /* Darn, no way to change this yet */
   18.75 +    this->spec.samples = ESD_BUF_SIZE;  /* Darn, no way to change this yet */
   18.76  #endif
   18.77  
   18.78      /* Open a connection to the ESD audio server */
   18.79      this->hidden->audio_fd =
   18.80 -        SDL_NAME(esd_play_stream)(format,this->spec.freq,NULL,get_progname());
   18.81 +        SDL_NAME(esd_play_stream) (format, this->spec.freq, NULL,
   18.82 +                                   get_progname());
   18.83  
   18.84      if (this->hidden->audio_fd < 0) {
   18.85          ESD_CloseDevice(this);
   18.86 @@ -285,7 +284,8 @@
   18.87  
   18.88      /* Calculate the final parameters for this audio specification */
   18.89      SDL_CalculateAudioSpec(&this->spec);
   18.90 -    this->hidden->frame_ticks = (float) (this->spec.samples*1000) / this->spec.freq;
   18.91 +    this->hidden->frame_ticks =
   18.92 +        (float) (this->spec.samples * 1000) / this->spec.freq;
   18.93      this->hidden->next_frame = SDL_GetTicks() + this->hidden->frame_ticks;
   18.94  
   18.95      /* Allocate mixing buffer */
   18.96 @@ -312,7 +312,7 @@
   18.97  }
   18.98  
   18.99  static int
  18.100 -ESD_Init(SDL_AudioDriverImpl *impl)
  18.101 +ESD_Init(SDL_AudioDriverImpl * impl)
  18.102  {
  18.103      if (LoadESDLibrary() < 0) {
  18.104          return 0;
    19.1 --- a/src/audio/macosx/SDL_coreaudio.c	Sat Oct 28 16:41:54 2006 +0000
    19.2 +++ b/src/audio/macosx/SDL_coreaudio.c	Sat Oct 28 16:48:03 2006 +0000
    19.3 @@ -43,7 +43,7 @@
    19.4  static int outputDeviceCount = 0;
    19.5  
    19.6  static void
    19.7 -free_device_list(COREAUDIO_DeviceList **devices, int *devCount)
    19.8 +free_device_list(COREAUDIO_DeviceList ** devices, int *devCount)
    19.9  {
   19.10      if (*devices) {
   19.11          int i = *devCount;
   19.12 @@ -57,7 +57,8 @@
   19.13  
   19.14  
   19.15  static void
   19.16 -build_device_list(int iscapture, COREAUDIO_DeviceList **devices, int *devCount)
   19.17 +build_device_list(int iscapture, COREAUDIO_DeviceList ** devices,
   19.18 +                  int *devCount)
   19.19  {
   19.20      Boolean outWritable = 0;
   19.21      OSStatus result = noErr;
   19.22 @@ -69,7 +70,7 @@
   19.23      free_device_list(devices, devCount);
   19.24  
   19.25      result = AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices,
   19.26 -                                         &size, &outWritable);
   19.27 +                                          &size, &outWritable);
   19.28  
   19.29      if (result != kAudioHardwareNoError)
   19.30          return;
   19.31 @@ -78,13 +79,13 @@
   19.32      if (devs == NULL)
   19.33          return;
   19.34  
   19.35 -    max = size / sizeof (AudioDeviceID);
   19.36 -    *devices = (COREAUDIO_DeviceList *) SDL_malloc(max * sizeof (**devices));
   19.37 +    max = size / sizeof(AudioDeviceID);
   19.38 +    *devices = (COREAUDIO_DeviceList *) SDL_malloc(max * sizeof(**devices));
   19.39      if (*devices == NULL)
   19.40          return;
   19.41  
   19.42      result = AudioHardwareGetProperty(kAudioHardwarePropertyDevices,
   19.43 -                                     &size, devs);
   19.44 +                                      &size, devs);
   19.45      if (result != kAudioHardwareNoError)
   19.46          return;
   19.47  
   19.48 @@ -97,8 +98,8 @@
   19.49          CFIndex len = 0;
   19.50  
   19.51          result = AudioDeviceGetPropertyInfo(dev, 0, iscapture,
   19.52 -                                      kAudioDevicePropertyStreamConfiguration,
   19.53 -                                      &size, &outWritable);
   19.54 +                                            kAudioDevicePropertyStreamConfiguration,
   19.55 +                                            &size, &outWritable);
   19.56          if (result != noErr)
   19.57              continue;
   19.58  
   19.59 @@ -107,8 +108,8 @@
   19.60              continue;
   19.61  
   19.62          result = AudioDeviceGetProperty(dev, 0, iscapture,
   19.63 -                                      kAudioDevicePropertyStreamConfiguration,
   19.64 -                                      &size, buflist);
   19.65 +                                        kAudioDevicePropertyStreamConfiguration,
   19.66 +                                        &size, buflist);
   19.67  
   19.68          if (result == noErr) {
   19.69              UInt32 j;
   19.70 @@ -125,7 +126,7 @@
   19.71          if (!usable)
   19.72              continue;
   19.73  
   19.74 -        size = sizeof (CFStringRef);
   19.75 +        size = sizeof(CFStringRef);
   19.76          result = AudioDeviceGetProperty(dev, 0, iscapture,
   19.77                                          kAudioObjectPropertyName,
   19.78                                          &size, &cfstr);
   19.79 @@ -137,15 +138,16 @@
   19.80                                                  kCFStringEncodingUTF8);
   19.81  
   19.82          ptr = (char *) SDL_malloc(len + 1);
   19.83 -        usable = ( (ptr != NULL) &&
   19.84 -                (CFStringGetCString(cfstr,ptr,len+1,kCFStringEncodingUTF8)) );
   19.85 +        usable = ((ptr != NULL) &&
   19.86 +                  (CFStringGetCString
   19.87 +                   (cfstr, ptr, len + 1, kCFStringEncodingUTF8)));
   19.88  
   19.89          CFRelease(cfstr);
   19.90  
   19.91          if (usable) {
   19.92              len = strlen(ptr);
   19.93              /* Some devices have whitespace at the end...trim it. */
   19.94 -            while ((len > 0) && (ptr[len-1] == ' ')) {
   19.95 +            while ((len > 0) && (ptr[len - 1] == ' ')) {
   19.96                  len--;
   19.97              }
   19.98              usable = (len > 0);
   19.99 @@ -156,11 +158,11 @@
  19.100          } else {
  19.101              ptr[len] = '\0';
  19.102  
  19.103 -            #if DEBUG_COREAUDIO
  19.104 +#if DEBUG_COREAUDIO
  19.105              printf("COREAUDIO: Found %s device #%d: '%s' (devid %d)\n",
  19.106 -                    ((iscapture) ? "capture" : "output"),
  19.107 -                    (int) *devCount, ptr, (int) dev);
  19.108 -            #endif
  19.109 +                   ((iscapture) ? "capture" : "output"),
  19.110 +                   (int) *devCount, ptr, (int) dev);
  19.111 +#endif
  19.112  
  19.113              (*devices)[*devCount].id = dev;
  19.114              (*devices)[*devCount].name = ptr;
  19.115 @@ -186,7 +188,7 @@
  19.116  
  19.117  
  19.118  static int
  19.119 -find_device_id(const char *devname, int iscapture, AudioDeviceID *id)
  19.120 +find_device_id(const char *devname, int iscapture, AudioDeviceID * id)
  19.121  {
  19.122      int i = ((iscapture) ? inputDeviceCount : outputDeviceCount);
  19.123      COREAUDIO_DeviceList *devs = ((iscapture) ? inputDevices : outputDevices);
  19.124 @@ -213,7 +215,7 @@
  19.125          return outputDeviceCount;
  19.126      }
  19.127  
  19.128 -    return 0;  /* shouldn't ever hit this. */
  19.129 +    return 0;                   /* shouldn't ever hit this. */
  19.130  }
  19.131  
  19.132  
  19.133 @@ -241,10 +243,10 @@
  19.134  /* The CoreAudio callback */
  19.135  static OSStatus
  19.136  outputCallback(void *inRefCon,
  19.137 -              AudioUnitRenderActionFlags *ioActionFlags,
  19.138 -              const AudioTimeStamp * inTimeStamp,
  19.139 -              UInt32 inBusNumber, UInt32 inNumberFrames,
  19.140 -              AudioBufferList *ioDataList)
  19.141 +               AudioUnitRenderActionFlags * ioActionFlags,
  19.142 +               const AudioTimeStamp * inTimeStamp,
  19.143 +               UInt32 inBusNumber, UInt32 inNumberFrames,
  19.144 +               AudioBufferList * ioDataList)
  19.145  {
  19.146      SDL_AudioDevice *this = (SDL_AudioDevice *) inRefCon;
  19.147      AudioBuffer *ioData = &ioDataList->mBuffers[0];
  19.148 @@ -288,8 +290,8 @@
  19.149          if (len > remaining)
  19.150              len = remaining;
  19.151          SDL_memcpy(ptr,
  19.152 -                    (char *) this->hidden->buffer + this->hidden->bufferOffset,
  19.153 -                    len);
  19.154 +                   (char *) this->hidden->buffer + this->hidden->bufferOffset,
  19.155 +                   len);
  19.156          ptr = (char *) ptr + len;
  19.157          remaining -= len;
  19.158          this->hidden->bufferOffset += len;
  19.159 @@ -300,10 +302,10 @@
  19.160  
  19.161  static OSStatus
  19.162  inputCallback(void *inRefCon,
  19.163 -              AudioUnitRenderActionFlags *ioActionFlags,
  19.164 +              AudioUnitRenderActionFlags * ioActionFlags,
  19.165                const AudioTimeStamp * inTimeStamp,
  19.166                UInt32 inBusNumber, UInt32 inNumberFrames,
  19.167 -              AudioBufferList *ioData)
  19.168 +              AudioBufferList * ioData)
  19.169  {
  19.170      //err = AudioUnitRender(afr->fAudioUnit, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, afr->fAudioBuffer);
  19.171      // !!! FIXME: write me!
  19.172 @@ -321,19 +323,21 @@
  19.173              const AudioUnitElement output_bus = 0;
  19.174              const AudioUnitElement input_bus = 1;
  19.175              const int iscapture = this->iscapture;
  19.176 -            const AudioUnitElement bus = ((iscapture) ? input_bus : output_bus);
  19.177 -            const AudioUnitScope scope = ((iscapture) ? kAudioUnitScope_Output :
  19.178 -                                                        kAudioUnitScope_Input);
  19.179 +            const AudioUnitElement bus =
  19.180 +                ((iscapture) ? input_bus : output_bus);
  19.181 +            const AudioUnitScope scope =
  19.182 +                ((iscapture) ? kAudioUnitScope_Output :
  19.183 +                 kAudioUnitScope_Input);
  19.184  
  19.185              /* stop processing the audio unit */
  19.186              result = AudioOutputUnitStop(this->hidden->audioUnit);
  19.187  
  19.188              /* Remove the input callback */
  19.189 -            SDL_memset(&callback, '\0', sizeof (AURenderCallbackStruct));
  19.190 +            SDL_memset(&callback, '\0', sizeof(AURenderCallbackStruct));
  19.191              result = AudioUnitSetProperty(this->hidden->audioUnit,
  19.192                                            kAudioUnitProperty_SetRenderCallback,
  19.193                                            scope, bus, &callback,
  19.194 -                                          sizeof (callback));
  19.195 +                                          sizeof(callback));
  19.196  
  19.197              CloseComponent(this->hidden->audioUnit);
  19.198              this->hidden->audioUnitOpened = 0;
  19.199 @@ -362,10 +366,10 @@
  19.200      pid_t pid = 0;
  19.201  
  19.202      if (devname == NULL) {
  19.203 -        size = sizeof (AudioDeviceID);
  19.204 +        size = sizeof(AudioDeviceID);
  19.205          const AudioHardwarePropertyID propid =
  19.206 -                    ((iscapture) ? kAudioHardwarePropertyDefaultInputDevice :
  19.207 -                                   kAudioHardwarePropertyDefaultOutputDevice);
  19.208 +            ((iscapture) ? kAudioHardwarePropertyDefaultInputDevice :
  19.209 +             kAudioHardwarePropertyDefaultOutputDevice);
  19.210  
  19.211          result = AudioHardwareGetProperty(propid, &size, &devid);
  19.212          CHECK_RESULT("AudioHardwareGetProperty (default device)");
  19.213 @@ -376,18 +380,19 @@
  19.214          }
  19.215      }
  19.216  
  19.217 -    size = sizeof (alive);
  19.218 +    size = sizeof(alive);
  19.219      result = AudioDeviceGetProperty(devid, 0, iscapture,
  19.220                                      kAudioDevicePropertyDeviceIsAlive,
  19.221                                      &size, &alive);
  19.222 -    CHECK_RESULT("AudioDeviceGetProperty (kAudioDevicePropertyDeviceIsAlive)");
  19.223 +    CHECK_RESULT
  19.224 +        ("AudioDeviceGetProperty (kAudioDevicePropertyDeviceIsAlive)");
  19.225  
  19.226      if (!alive) {
  19.227          SDL_SetError("CoreAudio: requested device exists, but isn't alive.");
  19.228          return 0;
  19.229      }
  19.230  
  19.231 -    size = sizeof (pid);
  19.232 +    size = sizeof(pid);
  19.233      result = AudioDeviceGetProperty(devid, 0, iscapture,
  19.234                                      kAudioDevicePropertyHogMode, &size, &pid);
  19.235  
  19.236 @@ -404,7 +409,7 @@
  19.237  
  19.238  static int
  19.239  prepare_audiounit(_THIS, const char *devname, int iscapture,
  19.240 -                  const AudioStreamBasicDescription *strdesc)
  19.241 +                  const AudioStreamBasicDescription * strdesc)
  19.242  {
  19.243      OSStatus result = noErr;
  19.244      AURenderCallbackStruct callback;
  19.245 @@ -416,7 +421,7 @@
  19.246      const AudioUnitElement input_bus = 1;
  19.247      const AudioUnitElement bus = ((iscapture) ? input_bus : output_bus);
  19.248      const AudioUnitScope scope = ((iscapture) ? kAudioUnitScope_Output :
  19.249 -                                                kAudioUnitScope_Input);
  19.250 +                                  kAudioUnitScope_Input);
  19.251  
  19.252      if (!find_device_by_name(this, devname, iscapture)) {
  19.253          SDL_SetError("Couldn't find requested CoreAudio device");
  19.254 @@ -445,7 +450,7 @@
  19.255      result = AudioUnitSetProperty(this->hidden->audioUnit,
  19.256                                    kAudioOutputUnitProperty_EnableIO,
  19.257                                    kAudioUnitScope_Input, input_bus,
  19.258 -                                  &enableIO, sizeof (enableIO));
  19.259 +                                  &enableIO, sizeof(enableIO));
  19.260      CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_EnableIO input)");
  19.261  
  19.262      // !!! FIXME: this is wrong?
  19.263 @@ -453,30 +458,32 @@
  19.264      result = AudioUnitSetProperty(this->hidden->audioUnit,
  19.265                                    kAudioOutputUnitProperty_EnableIO,
  19.266                                    kAudioUnitScope_Output, output_bus,
  19.267 -                                  &enableIO, sizeof (enableIO));
  19.268 +                                  &enableIO, sizeof(enableIO));
  19.269      CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_EnableIO output)");
  19.270  
  19.271      result = AudioUnitSetProperty(this->hidden->audioUnit,
  19.272                                    kAudioOutputUnitProperty_CurrentDevice,
  19.273                                    kAudioUnitScope_Global, 0,
  19.274                                    &this->hidden->deviceID,
  19.275 -                                  sizeof (AudioDeviceID));
  19.276 -    CHECK_RESULT("AudioUnitSetProperty (kAudioOutputUnitProperty_CurrentDevice)");
  19.277 +                                  sizeof(AudioDeviceID));
  19.278 +    CHECK_RESULT
  19.279 +        ("AudioUnitSetProperty (kAudioOutputUnitProperty_CurrentDevice)");
  19.280  
  19.281      /* Set the data format of the audio unit. */
  19.282      result = AudioUnitSetProperty(this->hidden->audioUnit,
  19.283                                    kAudioUnitProperty_StreamFormat,
  19.284 -                                  scope, bus, strdesc, sizeof (*strdesc));
  19.285 +                                  scope, bus, strdesc, sizeof(*strdesc));
  19.286      CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_StreamFormat)");
  19.287  
  19.288      /* Set the audio callback */
  19.289 -    SDL_memset(&callback, '\0', sizeof (AURenderCallbackStruct));
  19.290 +    SDL_memset(&callback, '\0', sizeof(AURenderCallbackStruct));
  19.291      callback.inputProc = ((iscapture) ? inputCallback : outputCallback);
  19.292      callback.inputProcRefCon = this;
  19.293      result = AudioUnitSetProperty(this->hidden->audioUnit,
  19.294                                    kAudioUnitProperty_SetRenderCallback,
  19.295 -                                  scope, bus, &callback, sizeof (callback));
  19.296 -    CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_SetInputCallback)");
  19.297 +                                  scope, bus, &callback, sizeof(callback));
  19.298 +    CHECK_RESULT
  19.299 +        ("AudioUnitSetProperty (kAudioUnitProperty_SetInputCallback)");
  19.300  
  19.301      /* Calculate the final parameters for this audio specification */
  19.302      SDL_CalculateAudioSpec(&this->spec);
  19.303 @@ -506,7 +513,7 @@
  19.304  
  19.305      /* Initialize all variables that we clean on shutdown */
  19.306      this->hidden = (struct SDL_PrivateAudioData *)
  19.307 -                        SDL_malloc((sizeof *this->hidden));
  19.308 +        SDL_malloc((sizeof *this->hidden));
  19.309      if (this->hidden == NULL) {
  19.310          SDL_OutOfMemory();
  19.311          return (0);
  19.312 @@ -561,14 +568,14 @@
  19.313  
  19.314      if (!prepare_audiounit(this, devname, iscapture, &strdesc)) {
  19.315          COREAUDIO_CloseDevice(this);
  19.316 -        return 0;  /* prepare_audiounit() will call SDL_SetError()... */
  19.317 +        return 0;               /* prepare_audiounit() will call SDL_SetError()... */
  19.318      }
  19.319  
  19.320 -    return 1;  /* good to go. */
  19.321 +    return 1;                   /* good to go. */
  19.322  }
  19.323  
  19.324  static int
  19.325 -COREAUDIO_Init(SDL_AudioDriverImpl *impl)
  19.326 +COREAUDIO_Init(SDL_AudioDriverImpl * impl)
  19.327  {
  19.328      /* Set the function pointers */
  19.329      impl->DetectDevices = COREAUDIO_DetectDevices;
  19.330 @@ -578,7 +585,7 @@
  19.331      impl->Deinitialize = COREAUDIO_Deinitialize;
  19.332      impl->ProvidesOwnCallbackThread = 1;
  19.333  
  19.334 -    build_device_lists();  /* do an initial check for devices... */
  19.335 +    build_device_lists();       /* do an initial check for devices... */
  19.336  
  19.337      return 1;
  19.338  }
    20.1 --- a/src/audio/macrom/SDL_romaudio.c	Sat Oct 28 16:41:54 2006 +0000
    20.2 +++ b/src/audio/macrom/SDL_romaudio.c	Sat Oct 28 16:48:03 2006 +0000
    20.3 @@ -190,7 +190,7 @@
    20.4  
    20.5      /* Initialize all variables that we clean on shutdown */
    20.6      this->hidden = (struct SDL_PrivateAudioData *)
    20.7 -                        SDL_malloc((sizeof *this->hidden));
    20.8 +        SDL_malloc((sizeof *this->hidden));
    20.9      if (this->hidden == NULL) {
   20.10          SDL_OutOfMemory();
   20.11          return 0;
   20.12 @@ -292,7 +292,7 @@
   20.13  }
   20.14  
   20.15  static int
   20.16 -SNDMGR_Init(SDL_AudioDriverImpl *impl)
   20.17 +SNDMGR_Init(SDL_AudioDriverImpl * impl)
   20.18  {
   20.19      /* Set the function pointers */
   20.20      impl->OpenDevice = SNDMGR_OpenDevice;
    21.1 --- a/src/audio/mint/SDL_mintaudio_dma8.c	Sat Oct 28 16:41:54 2006 +0000
    21.2 +++ b/src/audio/mint/SDL_mintaudio_dma8.c	Sat Oct 28 16:48:03 2006 +0000
    21.3 @@ -101,7 +101,8 @@
    21.4          DEBUG_PRINT((DEBUG_NAME "closeaudio: interrupt disabled\n"));
    21.5  
    21.6          /* Wait if currently playing sound */
    21.7 -        while (SDL_MintAudio_mutex != 0) {}
    21.8 +        while (SDL_MintAudio_mutex != 0) {
    21.9 +        }
   21.10  
   21.11          DEBUG_PRINT((DEBUG_NAME "closeaudio: no more interrupt running\n"));
   21.12  
   21.13 @@ -127,12 +128,13 @@
   21.14                   SDL_AUDIO_BITSIZE(this->spec.format)));
   21.15      DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
   21.16      DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
   21.17 -    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   21.18 +    DEBUG_PRINT(("big endian=%d, ",
   21.19 +                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   21.20      DEBUG_PRINT(("channels=%d, ", this->spec.channels));
   21.21      DEBUG_PRINT(("freq=%d\n", this->spec.freq));
   21.22  
   21.23      if (this->spec.channels > 2) {
   21.24 -        this->spec.channels = 2;     /* no more than stereo! */
   21.25 +        this->spec.channels = 2;        /* no more than stereo! */
   21.26      }
   21.27  
   21.28      /* Check formats available */
   21.29 @@ -184,7 +186,8 @@
   21.30                   SDL_AUDIO_BITSIZE(this->spec.format)));
   21.31      DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
   21.32      DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
   21.33 -    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   21.34 +    DEBUG_PRINT(("big endian=%d, ",
   21.35 +                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   21.36      DEBUG_PRINT(("channels=%d, ", this->spec.channels));
   21.37      DEBUG_PRINT(("freq=%d\n", this->spec.freq));
   21.38  
   21.39 @@ -255,7 +258,7 @@
   21.40  
   21.41      /* Initialize all variables that we clean on shutdown */
   21.42      this->hidden = (struct SDL_PrivateAudioData *)
   21.43 -                        SDL_malloc((sizeof *this->hidden));
   21.44 +        SDL_malloc((sizeof *this->hidden));
   21.45      if (this->hidden == NULL) {
   21.46          SDL_OutOfMemory();
   21.47          return 0;
   21.48 @@ -267,7 +270,8 @@
   21.49      /* Allocate memory for audio buffers in DMA-able RAM */
   21.50      DEBUG_PRINT((DEBUG_NAME "buffer size=%d\n", this->spec.size));
   21.51  
   21.52 -    SDL_MintAudio_audiobuf[0] = Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
   21.53 +    SDL_MintAudio_audiobuf[0] =
   21.54 +        Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
   21.55      if (SDL_MintAudio_audiobuf[0] == NULL) {
   21.56          SDL_free(this->hidden);
   21.57          this->hidden = NULL;
   21.58 @@ -276,7 +280,8 @@
   21.59      }
   21.60      SDL_MintAudio_audiobuf[1] = SDL_MintAudio_audiobuf[0] + this->spec.size;
   21.61      SDL_MintAudio_numbuf = 0;
   21.62 -    SDL_memset(SDL_MintAudio_audiobuf[0],this->spec.silence,this->spec.size*2);
   21.63 +    SDL_memset(SDL_MintAudio_audiobuf[0], this->spec.silence,
   21.64 +               this->spec.size * 2);
   21.65      SDL_MintAudio_audiosize = this->spec.size;
   21.66      SDL_MintAudio_mutex = 0;
   21.67  
   21.68 @@ -290,11 +295,11 @@
   21.69      /* Setup audio hardware */
   21.70      MINTDMA8_InitAudio(this);
   21.71  
   21.72 -    return 1;  /* good to go. */
   21.73 +    return 1;                   /* good to go. */
   21.74  }
   21.75  
   21.76  static int
   21.77 -MINTDMA8_Init(SDL_AudioDriverImpl *impl)
   21.78 +MINTDMA8_Init(SDL_AudioDriverImpl * impl)
   21.79  {
   21.80      /* Cookie _MCH present ? if not, assume ST machine */
   21.81      if (Getcookie(C__MCH, &cookie_mch) == C_NOTFOUND) {
    22.1 --- a/src/audio/mint/SDL_mintaudio_gsxb.c	Sat Oct 28 16:41:54 2006 +0000
    22.2 +++ b/src/audio/mint/SDL_mintaudio_gsxb.c	Sat Oct 28 16:48:03 2006 +0000
    22.3 @@ -94,7 +94,8 @@
    22.4          }
    22.5  
    22.6          /* Wait if currently playing sound */
    22.7 -        while (SDL_MintAudio_mutex != 0) {}
    22.8 +        while (SDL_MintAudio_mutex != 0) {
    22.9 +        }
   22.10  
   22.11          /* Clear buffers */
   22.12          if (SDL_MintAudio_audiobuf[0]) {
   22.13 @@ -130,7 +131,7 @@
   22.14      DEBUG_PRINT(("freq=%d\n", this->spec.freq));
   22.15  
   22.16      if (this->spec.channels > 2) {
   22.17 -        this->spec.channels = 2;     /* no more than stereo! */
   22.18 +        this->spec.channels = 2;        /* no more than stereo! */
   22.19      }
   22.20  
   22.21      while ((!valid_datatype) && (test_format)) {
   22.22 @@ -141,37 +142,37 @@
   22.23          format_signed = SDL_AUDIO_ISSIGNED(this->spec.format);
   22.24          format_bigendian = SDL_AUDIO_ISBIGENDIAN(this->spec.format);
   22.25          switch (test_format) {
   22.26 -            case AUDIO_U8:
   22.27 -            case AUDIO_S8:
   22.28 -                if (snd_format & SND_FORMAT8) {
   22.29 -                    valid_datatype = 1;
   22.30 -                    snd_format = Sndstatus(SND_QUERY8BIT);
   22.31 -                }
   22.32 -                break;
   22.33 +        case AUDIO_U8:
   22.34 +        case AUDIO_S8:
   22.35 +            if (snd_format & SND_FORMAT8) {
   22.36 +                valid_datatype = 1;
   22.37 +                snd_format = Sndstatus(SND_QUERY8BIT);
   22.38 +            }
   22.39 +            break;
   22.40  
   22.41 -            case AUDIO_U16LSB:
   22.42 -            case AUDIO_S16LSB:
   22.43 -            case AUDIO_U16MSB:
   22.44 -            case AUDIO_S16MSB:
   22.45 -                if (snd_format & SND_FORMAT16) {
   22.46 -                    valid_datatype = 1;
   22.47 -                    snd_format = Sndstatus(SND_QUERY16BIT);
   22.48 -                }
   22.49 -                break;
   22.50 +        case AUDIO_U16LSB:
   22.51 +        case AUDIO_S16LSB:
   22.52 +        case AUDIO_U16MSB:
   22.53 +        case AUDIO_S16MSB:
   22.54 +            if (snd_format & SND_FORMAT16) {
   22.55 +                valid_datatype = 1;
   22.56 +                snd_format = Sndstatus(SND_QUERY16BIT);
   22.57 +            }
   22.58 +            break;
   22.59  
   22.60 -            case AUDIO_S32LSB:
   22.61 -            case AUDIO_S32MSB:
   22.62 -                if (snd_format & SND_FORMAT32) {
   22.63 -                    valid_datatype = 1;
   22.64 -                    snd_format = Sndstatus(SND_QUERY32BIT);
   22.65 -                }
   22.66 -                break;
   22.67 +        case AUDIO_S32LSB:
   22.68 +        case AUDIO_S32MSB:
   22.69 +            if (snd_format & SND_FORMAT32) {
   22.70 +                valid_datatype = 1;
   22.71 +                snd_format = Sndstatus(SND_QUERY32BIT);
   22.72 +            }
   22.73 +            break;
   22.74  
   22.75              /* no float support... */
   22.76  
   22.77 -            default:
   22.78 -                test_format = SDL_NextAudioFormat();
   22.79 -                break;
   22.80 +        default:
   22.81 +            test_format = SDL_NextAudioFormat();
   22.82 +            break;
   22.83          }
   22.84      }
   22.85  
   22.86 @@ -238,7 +239,8 @@
   22.87                   SDL_AUDIO_BITSIZE(this->spec.format)));
   22.88      DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
   22.89      DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
   22.90 -    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   22.91 +    DEBUG_PRINT(("big endian=%d, ",
   22.92 +                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   22.93      DEBUG_PRINT(("channels=%d, ", this->spec.channels));
   22.94      DEBUG_PRINT(("freq=%d\n", this->spec.freq));
   22.95  
   22.96 @@ -326,7 +328,7 @@
   22.97  
   22.98      /* Initialize all variables that we clean on shutdown */
   22.99      this->hidden = (struct SDL_PrivateAudioData *)
  22.100 -                        SDL_malloc((sizeof *this->hidden));
  22.101 +        SDL_malloc((sizeof *this->hidden));
  22.102      if (this->hidden == NULL) {
  22.103          SDL_OutOfMemory();
  22.104          return 0;
  22.105 @@ -338,7 +340,8 @@
  22.106      /* Allocate memory for audio buffers in DMA-able RAM */
  22.107      DEBUG_PRINT((DEBUG_NAME "buffer size=%d\n", this->spec.size));
  22.108  
  22.109 -    SDL_MintAudio_audiobuf[0] = Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
  22.110 +    SDL_MintAudio_audiobuf[0] =
  22.111 +        Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
  22.112      if (SDL_MintAudio_audiobuf[0] == NULL) {
  22.113          SDL_free(this->hidden);
  22.114          this->hidden = NULL;
  22.115 @@ -347,7 +350,8 @@
  22.116      }
  22.117      SDL_MintAudio_audiobuf[1] = SDL_MintAudio_audiobuf[0] + this->spec.size;
  22.118      SDL_MintAudio_numbuf = 0;
  22.119 -    SDL_memset(SDL_MintAudio_audiobuf[0],this->spec.silence,this->spec.size*2);
  22.120 +    SDL_memset(SDL_MintAudio_audiobuf[0], this->spec.silence,
  22.121 +               this->spec.size * 2);
  22.122      SDL_MintAudio_audiosize = this->spec.size;
  22.123      SDL_MintAudio_mutex = 0;
  22.124  
  22.125 @@ -361,7 +365,7 @@
  22.126      /* Setup audio hardware */
  22.127      MINTGSXB_InitAudio(this);
  22.128  
  22.129 -    return 1;  /* good to go. */
  22.130 +    return 1;                   /* good to go. */
  22.131  }
  22.132  
  22.133  static void
  22.134 @@ -388,7 +392,7 @@
  22.135  }
  22.136  
  22.137  static int
  22.138 -MINTGSXB_Init(SDL_AudioDriverImpl *impl)
  22.139 +MINTGSXB_Init(SDL_AudioDriverImpl * impl)
  22.140  {
  22.141      /* Cookie _SND present ? if not, assume ST machine */
  22.142      if (Getcookie(C__SND, &cookie_snd) == C_NOTFOUND) {
    23.1 --- a/src/audio/mint/SDL_mintaudio_mcsn.c	Sat Oct 28 16:41:54 2006 +0000
    23.2 +++ b/src/audio/mint/SDL_mintaudio_mcsn.c	Sat Oct 28 16:48:03 2006 +0000
    23.3 @@ -93,7 +93,8 @@
    23.4          }
    23.5  
    23.6          /* Wait if currently playing sound */
    23.7 -        while (SDL_MintAudio_mutex != 0) {}
    23.8 +        while (SDL_MintAudio_mutex != 0) {
    23.9 +        }
   23.10  
   23.11          /* Clear buffers */
   23.12          if (SDL_MintAudio_audiobuf[0]) {
   23.13 @@ -119,12 +120,13 @@
   23.14                   SDL_AUDIO_BITSIZE(this->spec.format)));
   23.15      DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
   23.16      DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
   23.17 -    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   23.18 +    DEBUG_PRINT(("big endian=%d, ",
   23.19 +                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   23.20      DEBUG_PRINT(("channels=%d, ", this->spec.channels));
   23.21      DEBUG_PRINT(("freq=%d\n", this->spec.freq));
   23.22  
   23.23      if (this->spec.channels > 2) {
   23.24 -        this->spec.channels = 2;     /* no more than stereo! */
   23.25 +        this->spec.channels = 2;        /* no more than stereo! */
   23.26      }
   23.27  
   23.28      /* Check formats available */
   23.29 @@ -132,7 +134,7 @@
   23.30      switch (cookie_mcsn->play) {
   23.31      case MCSN_ST:
   23.32          this->spec.channels = 1;
   23.33 -        this->spec.format = AUDIO_S8;  /* FIXME: is it signed or unsigned ? */
   23.34 +        this->spec.format = AUDIO_S8;   /* FIXME: is it signed or unsigned ? */
   23.35          SDL_MintAudio_AddFrequency(this, 12500, 0, 0, -1);
   23.36          break;
   23.37      case MCSN_TT:              /* Also STE, Mega STE */
   23.38 @@ -170,10 +172,10 @@
   23.39                                             (1 << i) - 1, -1);
   23.40              }
   23.41          }
   23.42 -        this->spec.format |= SDL_AUDIO_MASK_SIGNED;  /* Audio is always signed */
   23.43 +        this->spec.format |= SDL_AUDIO_MASK_SIGNED;     /* Audio is always signed */
   23.44          if ((SDL_AUDIO_BITSIZE(this->spec.format)) == 16) {
   23.45 -            this->spec.format |= SDL_AUDIO_MASK_ENDIAN;      /* Audio is always big endian */
   23.46 -            this->spec.channels = 2; /* 16 bits always stereo */
   23.47 +            this->spec.format |= SDL_AUDIO_MASK_ENDIAN; /* Audio is always big endian */
   23.48 +            this->spec.channels = 2;    /* 16 bits always stereo */
   23.49          }
   23.50          break;
   23.51      }
   23.52 @@ -194,7 +196,8 @@
   23.53                   SDL_AUDIO_BITSIZE(this->spec.format)));
   23.54      DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
   23.55      DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
   23.56 -    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   23.57 +    DEBUG_PRINT(("big endian=%d, ",
   23.58 +                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   23.59      DEBUG_PRINT(("channels=%d, ", this->spec.channels));
   23.60      DEBUG_PRINT(("freq=%d\n", this->spec.freq));
   23.61  
   23.62 @@ -288,7 +291,7 @@
   23.63  
   23.64      /* Initialize all variables that we clean on shutdown */
   23.65      this->hidden = (struct SDL_PrivateAudioData *)
   23.66 -                        SDL_malloc((sizeof *this->hidden));
   23.67 +        SDL_malloc((sizeof *this->hidden));
   23.68      if (this->hidden == NULL) {
   23.69          SDL_OutOfMemory();
   23.70          return 0;
   23.71 @@ -300,7 +303,8 @@
   23.72      /* Allocate memory for audio buffers in DMA-able RAM */
   23.73      DEBUG_PRINT((DEBUG_NAME "buffer size=%d\n", this->spec.size));
   23.74  
   23.75 -    SDL_MintAudio_audiobuf[0] = Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
   23.76 +    SDL_MintAudio_audiobuf[0] =
   23.77 +        Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
   23.78      if (SDL_MintAudio_audiobuf[0] == NULL) {
   23.79          SDL_free(this->hidden);
   23.80          this->hidden = NULL;
   23.81 @@ -309,7 +313,8 @@
   23.82      }
   23.83      SDL_MintAudio_audiobuf[1] = SDL_MintAudio_audiobuf[0] + this->spec.size;
   23.84      SDL_MintAudio_numbuf = 0;
   23.85 -    SDL_memset(SDL_MintAudio_audiobuf[0],this->spec.silence,this->spec.size*2);
   23.86 +    SDL_memset(SDL_MintAudio_audiobuf[0], this->spec.silence,
   23.87 +               this->spec.size * 2);
   23.88      SDL_MintAudio_audiosize = this->spec.size;
   23.89      SDL_MintAudio_mutex = 0;
   23.90  
   23.91 @@ -323,11 +328,11 @@
   23.92      /* Setup audio hardware */
   23.93      MINTMCSN_InitAudio(this);
   23.94  
   23.95 -    return 1;  /* good to go. */
   23.96 +    return 1;                   /* good to go. */
   23.97  }
   23.98  
   23.99  static int
  23.100 -MINTMCSN_Init(SDL_AudioDriverImpl *impl)
  23.101 +MINTMCSN_Init(SDL_AudioDriverImpl * impl)
  23.102  {
  23.103      unsigned long dummy = 0;
  23.104  
    24.1 --- a/src/audio/mint/SDL_mintaudio_stfa.c	Sat Oct 28 16:41:54 2006 +0000
    24.2 +++ b/src/audio/mint/SDL_mintaudio_stfa.c	Sat Oct 28 16:48:03 2006 +0000
    24.3 @@ -98,7 +98,8 @@
    24.4          Super(oldpile);
    24.5  
    24.6          /* Wait if currently playing sound */
    24.7 -        while (SDL_MintAudio_mutex != 0) {}
    24.8 +        while (SDL_MintAudio_mutex != 0) {
    24.9 +        }
   24.10  
   24.11          /* Clear buffers */
   24.12          if (SDL_MintAudio_audiobuf[0]) {
   24.13 @@ -120,16 +121,17 @@
   24.14                   SDL_AUDIO_BITSIZE(this->spec.format)));
   24.15      DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
   24.16      DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
   24.17 -    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   24.18 +    DEBUG_PRINT(("big endian=%d, ",
   24.19 +                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   24.20      DEBUG_PRINT(("channels=%d, ", this->spec.channels));
   24.21      DEBUG_PRINT(("freq=%d\n", this->spec.freq));
   24.22  
   24.23      if (SDL_AUDIO_BITSIZE(this->spec.format) > 16) {
   24.24 -        this->spec.format = AUDIO_S16SYS;    /* clamp out int32/float32 ... */
   24.25 +        this->spec.format = AUDIO_S16SYS;       /* clamp out int32/float32 ... */
   24.26      }
   24.27  
   24.28      if (this->spec.channels > 2) {
   24.29 -        this->spec.channels = 2;     /* no more than stereo! */
   24.30 +        this->spec.channels = 2;        /* no more than stereo! */
   24.31      }
   24.32  
   24.33      /* Check formats available */
   24.34 @@ -154,7 +156,8 @@
   24.35                   SDL_AUDIO_BITSIZE(this->spec.format)));
   24.36      DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
   24.37      DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
   24.38 -    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   24.39 +    DEBUG_PRINT(("big endian=%d, ",
   24.40 +                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   24.41      DEBUG_PRINT(("channels=%d, ", this->spec.channels));
   24.42      DEBUG_PRINT(("freq=%d\n", this->spec.freq));
   24.43  
   24.44 @@ -221,7 +224,7 @@
   24.45  
   24.46      /* Initialize all variables that we clean on shutdown */
   24.47      this->hidden = (struct SDL_PrivateAudioData *)
   24.48 -                        SDL_malloc((sizeof *this->hidden));
   24.49 +        SDL_malloc((sizeof *this->hidden));
   24.50      if (this->hidden == NULL) {
   24.51          SDL_OutOfMemory();
   24.52          return 0;
   24.53 @@ -233,16 +236,18 @@
   24.54      /* Allocate memory for audio buffers in DMA-able RAM */
   24.55      DEBUG_PRINT((DEBUG_NAME "buffer size=%d\n", this->spec.size));
   24.56  
   24.57 -    SDL_MintAudio_audiobuf[0] = Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
   24.58 +    SDL_MintAudio_audiobuf[0] =
   24.59 +        Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
   24.60      if (SDL_MintAudio_audiobuf[0] == NULL) {
   24.61          SDL_OutOfMemory()
   24.62 -        SDL_free(this->hidden);
   24.63 +            SDL_free(this->hidden);
   24.64          this->hidden = NULL;
   24.65          return 0;
   24.66      }
   24.67      SDL_MintAudio_audiobuf[1] = SDL_MintAudio_audiobuf[0] + this->spec.size;
   24.68      SDL_MintAudio_numbuf = 0;
   24.69 -    SDL_memset(SDL_MintAudio_audiobuf[0],this->spec.silence,this->spec.size*2);
   24.70 +    SDL_memset(SDL_MintAudio_audiobuf[0], this->spec.silence,
   24.71 +               this->spec.size * 2);
   24.72      SDL_MintAudio_audiosize = this->spec.size;
   24.73      SDL_MintAudio_mutex = 0;
   24.74  
   24.75 @@ -256,12 +261,12 @@
   24.76      /* Setup audio hardware */
   24.77      MINTSTFA_InitAudio(this);
   24.78  
   24.79 -    return 1;  /* good to go. */
   24.80 +    return 1;                   /* good to go. */
   24.81  }
   24.82  
   24.83  
   24.84  static int
   24.85 -MINTSTFA_Init(SDL_AudioDriverImpl *impl)
   24.86 +MINTSTFA_Init(SDL_AudioDriverImpl * impl)
   24.87  {
   24.88      /* Cookie _MCH present ? if not, assume ST machine */
   24.89      if (Getcookie(C__MCH, &cookie_mch) == C_NOTFOUND) {
    25.1 --- a/src/audio/mint/SDL_mintaudio_xbios.c	Sat Oct 28 16:41:54 2006 +0000
    25.2 +++ b/src/audio/mint/SDL_mintaudio_xbios.c	Sat Oct 28 16:48:03 2006 +0000
    25.3 @@ -90,7 +90,8 @@
    25.4          }
    25.5  
    25.6          /* Wait if currently playing sound */
    25.7 -        while (SDL_MintAudio_mutex != 0) {}
    25.8 +        while (SDL_MintAudio_mutex != 0) {
    25.9 +        }
   25.10  
   25.11          /* Clear buffers */
   25.12          if (SDL_MintAudio_audiobuf[0]) {
   25.13 @@ -267,18 +268,19 @@
   25.14                   SDL_AUDIO_BITSIZE(this->spec.format)));
   25.15      DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
   25.16      DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
   25.17 -    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   25.18 +    DEBUG_PRINT(("big endian=%d, ",
   25.19 +                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   25.20      DEBUG_PRINT(("channels=%d, ", this->spec.channels));
   25.21      DEBUG_PRINT(("freq=%d\n", this->spec.freq));
   25.22  
   25.23 -    this->spec.format |= SDL_AUDIO_MASK_SIGNED;   /* Audio is always signed */
   25.24 +    this->spec.format |= SDL_AUDIO_MASK_SIGNED; /* Audio is always signed */
   25.25  
   25.26      /* clamp out int32/float32 */
   25.27      if (SDL_AUDIO_BITSIZE(this->spec.format) >= 16) {
   25.28 -        this->spec.format = AUDIO_S16MSB;    /* Audio is always big endian */
   25.29 -        this->spec.channels = 2;     /* 16 bits always stereo */
   25.30 +        this->spec.format = AUDIO_S16MSB;       /* Audio is always big endian */
   25.31 +        this->spec.channels = 2;        /* 16 bits always stereo */
   25.32      } else if (this->spec.channels > 2) {
   25.33 -        this->spec.channels = 2;     /* no more than stereo! */
   25.34 +        this->spec.channels = 2;        /* no more than stereo! */
   25.35      }
   25.36  
   25.37      MINTAUDIO_freqcount = 0;
   25.38 @@ -314,7 +316,8 @@
   25.39                   SDL_AUDIO_BITSIZE(this->spec.format)));
   25.40      DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(this->spec.format)));
   25.41      DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(this->spec.format)));
   25.42 -    DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   25.43 +    DEBUG_PRINT(("big endian=%d, ",
   25.44 +                 SDL_AUDIO_ISBIGENDIAN(this->spec.format)));
   25.45      DEBUG_PRINT(("channels=%d, ", this->spec.channels));
   25.46      DEBUG_PRINT(("freq=%d\n", this->spec.freq));
   25.47  
   25.48 @@ -405,7 +408,7 @@
   25.49  
   25.50      /* Initialize all variables that we clean on shutdown */
   25.51      this->hidden = (struct SDL_PrivateAudioData *)
   25.52 -                        SDL_malloc((sizeof *this->hidden));
   25.53 +        SDL_malloc((sizeof *this->hidden));
   25.54      if (this->hidden == NULL) {
   25.55          SDL_OutOfMemory();
   25.56          return 0;
   25.57 @@ -417,7 +420,8 @@
   25.58      /* Allocate memory for audio buffers in DMA-able RAM */
   25.59      DEBUG_PRINT((DEBUG_NAME "buffer size=%d\n", this->spec.size));
   25.60  
   25.61 -    SDL_MintAudio_audiobuf[0] = Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
   25.62 +    SDL_MintAudio_audiobuf[0] =
   25.63 +        Atari_SysMalloc(this->spec.size * 2, MX_STRAM);
   25.64      if (SDL_MintAudio_audiobuf[0] == NULL) {
   25.65          SDL_free(this->hidden);
   25.66          this->hidden = NULL;
   25.67 @@ -426,7 +430,8 @@
   25.68      }
   25.69      SDL_MintAudio_audiobuf[1] = SDL_MintAudio_audiobuf[0] + this->spec.size;
   25.70      SDL_MintAudio_numbuf = 0;
   25.71 -    SDL_memset(SDL_MintAudio_audiobuf[0],this->spec.silence,this->spec.size*2);
   25.72 +    SDL_memset(SDL_MintAudio_audiobuf[0], this->spec.silence,
   25.73 +               this->spec.size * 2);
   25.74      SDL_MintAudio_audiosize = this->spec.size;
   25.75      SDL_MintAudio_mutex = 0;
   25.76  
   25.77 @@ -440,11 +445,11 @@
   25.78      /* Setup audio hardware */
   25.79      MINTXBIOS_InitAudio(this);
   25.80  
   25.81 -    return 1;  /* good to go. */
   25.82 +    return 1;                   /* good to go. */
   25.83  }
   25.84  
   25.85  static int
   25.86 -MINTXBIOS_Init(SDL_AudioDriverImpl *impl)
   25.87 +MINTXBIOS_Init(SDL_AudioDriverImpl * impl)
   25.88  {
   25.89      unsigned long dummy = 0;
   25.90      /*SDL_MintAudio_mint_present = (Getcookie(C_MiNT, &dummy) == C_FOUND); */
    26.1 --- a/src/audio/mme/SDL_mmeaudio.c	Sat Oct 28 16:41:54 2006 +0000
    26.2 +++ b/src/audio/mme/SDL_mmeaudio.c	Sat Oct 28 16:48:03 2006 +0000
    26.3 @@ -63,7 +63,7 @@
    26.4  
    26.5      /* Initialize all variables that we clean on shutdown */
    26.6      this->hidden = (struct SDL_PrivateAudioData *)
    26.7 -                        SDL_malloc((sizeof *this->hidden));
    26.8 +        SDL_malloc((sizeof *this->hidden));
    26.9      if (this->hidden == NULL) {
   26.10          SDL_OutOfMemory();
   26.11          return 0;
   26.12 @@ -78,7 +78,7 @@
   26.13          return 0;
   26.14      }
   26.15  
   26.16 -    SDL_memset(this->hidden->shm, '\0', sizeof (*this->hidden->shm));
   26.17 +    SDL_memset(this->hidden->shm, '\0', sizeof(*this->hidden->shm));
   26.18      this->hidden->shm->sound = 0;
   26.19      this->hidden->shm->wFmt.wf.wFormatTag = WAVE_FORMAT_PCM;
   26.20  
   26.21 @@ -88,13 +88,13 @@
   26.22           !valid_format && test_format;) {
   26.23          valid_format = 1;
   26.24          switch (test_format) {
   26.25 -            case AUDIO_U8:
   26.26 -            case AUDIO_S16:
   26.27 -            case AUDIO_S32:
   26.28 -                break;
   26.29 -            default:
   26.30 -                valid_format = 0;
   26.31 -                test_format = SDL_NextAudioFormat();
   26.32 +        case AUDIO_U8:
   26.33 +        case AUDIO_S16:
   26.34 +        case AUDIO_S32:
   26.35 +            break;
   26.36 +        default:
   26.37 +            valid_format = 0;
   26.38 +            test_format = SDL_NextAudioFormat();
   26.39          }
   26.40      }
   26.41  
   26.42 @@ -111,11 +111,11 @@
   26.43      this->hidden->shm->wFmt.wf.nChannels = this->spec.channels;
   26.44      this->hidden->shm->wFmt.wf.nSamplesPerSec = this->spec.freq;
   26.45      this->hidden->shm->wFmt.wf.nBlockAlign =
   26.46 -                                this->hidden->shm->wFmt.wf.nChannels *
   26.47 -                                this->hidden->shm->wFmt.wBitsPerSample / 8;
   26.48 +        this->hidden->shm->wFmt.wf.nChannels *
   26.49 +        this->hidden->shm->wFmt.wBitsPerSample / 8;
   26.50      this->hidden->shm->wFmt.wf.nAvgBytesPerSec =
   26.51 -                                this->hidden->shm->wFmt.wf.nSamplesPerSec *
   26.52 -                                this->hidden->shm->wFmt.wf.nBlockAlign;
   26.53 +        this->hidden->shm->wFmt.wf.nSamplesPerSec *
   26.54 +        this->hidden->shm->wFmt.wf.nBlockAlign;
   26.55  
   26.56      /* Check the buffer size -- minimum of 1/4 second (word aligned) */
   26.57      if (this->spec.samples < (this->spec.freq / 4))
   26.58 @@ -150,8 +150,8 @@
   26.59          this->hidden->shm->wHdr[i].dwBufferLength = this->spec.size;
   26.60          this->hidden->shm->wHdr[i].dwFlags = 0;
   26.61          this->hidden->shm->wHdr[i].dwUser = i;
   26.62 -        this->hidden->shm->wHdr[i].dwLoops = 0;    /* loop control counter */
   26.63 -        this->hidden->shm->wHdr[i].lpNext = NULL;  /* reserved for driver */
   26.64 +        this->hidden->shm->wHdr[i].dwLoops = 0; /* loop control counter */
   26.65 +        this->hidden->shm->wHdr[i].lpNext = NULL;       /* reserved for driver */
   26.66          this->hidden->shm->wHdr[i].reserved = 0;
   26.67          inUse[i] = FALSE;
   26.68      }
   26.69 @@ -183,7 +183,7 @@
   26.70      /* Queue it up */
   26.71      waveOutWrite(this->hidden->shm->sound,
   26.72                   &(this->hidden->shm->wHdr[this->hidden->next_buffer]),
   26.73 -                 sizeof (WAVEHDR));
   26.74 +                 sizeof(WAVEHDR));
   26.75      this->hidden->next_buffer = (this->hidden->next_buffer + 1) % NUM_BUFFERS;
   26.76  }
   26.77  
   26.78 @@ -238,7 +238,7 @@
   26.79  }
   26.80  
   26.81  static int
   26.82 -MME_Init(SDL_AudioDriverImpl *impl)
   26.83 +MME_Init(SDL_AudioDriverImpl * impl)
   26.84  {
   26.85      /* Set the function pointers */
   26.86      impl->OpenDevice = MME_OpenDevice;
    27.1 --- a/src/audio/nas/SDL_nasaudio.c	Sat Oct 28 16:41:54 2006 +0000
    27.2 +++ b/src/audio/nas/SDL_nasaudio.c	Sat Oct 28 16:48:03 2006 +0000
    27.3 @@ -43,19 +43,19 @@
    27.4  static struct SDL_PrivateAudioData *this2 = NULL;
    27.5  
    27.6  
    27.7 -static void (*NAS_AuCloseServer)(AuServer *);
    27.8 -static void (*NAS_AuNextEvent)(AuServer *, AuBool, AuEvent *);
    27.9 -static AuBool (*NAS_AuDispatchEvent)(AuServer *, AuEvent *);
   27.10 -static AuFlowID (*NAS_AuCreateFlow)(AuServer *, AuStatus *);
   27.11 -static void (*NAS_AuStartFlow)(AuServer *, AuFlowID, AuStatus *);
   27.12 +static void (*NAS_AuCloseServer) (AuServer *);
   27.13 +static void (*NAS_AuNextEvent) (AuServer *, AuBool, AuEvent *);
   27.14 +static AuBool(*NAS_AuDispatchEvent) (AuServer *, AuEvent *);
   27.15 +static AuFlowID(*NAS_AuCreateFlow) (AuServer *, AuStatus *);
   27.16 +static void (*NAS_AuStartFlow) (AuServer *, AuFlowID, AuStatus *);
   27.17  static void (*NAS_AuSetElements)
   27.18 -    (AuServer *, AuFlowID, AuBool, int, AuElement *, AuStatus *);
   27.19 +  (AuServer *, AuFlowID, AuBool, int, AuElement *, AuStatus *);
   27.20  static void (*NAS_AuWriteElement)
   27.21 -    (AuServer *, AuFlowID, int, AuUint32, AuPointer, AuBool, AuStatus *);
   27.22 +  (AuServer *, AuFlowID, int, AuUint32, AuPointer, AuBool, AuStatus *);
   27.23  static AuServer *(*NAS_AuOpenServer)
   27.24 -    (_AuConst char *, int, _AuConst char *, int, _AuConst char *, char **);
   27.25 +  (_AuConst char *, int, _AuConst char *, int, _AuConst char *, char **);
   27.26  static AuEventHandlerRec *(*NAS_AuRegisterEventHandler)
   27.27 -    (AuServer *, AuMask, int, AuID, AuEventHandlerCallback, AuPointer);
   27.28 +  (AuServer *, AuMask, int, AuID, AuEventHandlerCallback, AuPointer);
   27.29  
   27.30  
   27.31  #ifdef SDL_AUDIO_DRIVER_NAS_DYNAMIC
   27.32 @@ -80,7 +80,8 @@
   27.33  #define SDL_NAS_SYM(x) NAS_##x = x
   27.34  #endif
   27.35  
   27.36 -static int load_nas_syms(void)
   27.37 +static int
   27.38 +load_nas_syms(void)
   27.39  {
   27.40      SDL_NAS_SYM(AuCloseServer);
   27.41      SDL_NAS_SYM(AuNextEvent);
   27.42 @@ -93,6 +94,7 @@
   27.43      SDL_NAS_SYM(AuRegisterEventHandler);
   27.44      return 0;
   27.45  }
   27.46 +
   27.47  #undef SDL_NAS_SYM
   27.48  
   27.49  #ifdef SDL_AUDIO_DRIVER_NAS_DYNAMIC
   27.50 @@ -120,7 +122,7 @@
   27.51              SDL_strlcpy(err, origerr, len);
   27.52              retval = -1;
   27.53              SDL_SetError("NAS: SDL_LoadObject('%s') failed: %s\n",
   27.54 -                          nas_library, err);
   27.55 +                         nas_library, err);
   27.56          } else {
   27.57              retval = load_nas_syms();
   27.58              if (retval < 0) {
   27.59 @@ -175,7 +177,8 @@
   27.60  
   27.61      /* Write the audio data */
   27.62      NAS_AuWriteElement(this->hidden->aud, this->hidden->flow, 0,
   27.63 -                   this->hidden->mixlen, this->hidden->mixbuf, AuFalse, NULL);
   27.64 +                       this->hidden->mixlen, this->hidden->mixbuf, AuFalse,
   27.65 +                       NULL);
   27.66  
   27.67      this->hidden->written += this->hidden->mixlen;
   27.68  
   27.69 @@ -289,7 +292,7 @@
   27.70  
   27.71      /* Initialize all variables that we clean on shutdown */
   27.72      this->hidden = (struct SDL_PrivateAudioData *)
   27.73 -                        SDL_malloc((sizeof *this->hidden));
   27.74 +        SDL_malloc((sizeof *this->hidden));
   27.75      if (this->hidden == NULL) {
   27.76          SDL_OutOfMemory();
   27.77          return 0;
   27.78 @@ -339,12 +342,13 @@
   27.79  
   27.80      this2 = this->hidden;
   27.81  
   27.82 -    AuMakeElementImportClient(elms,this->spec.freq,format,this->spec.channels,
   27.83 -                              AuTrue, buffer_size, buffer_size / 4, 0, NULL);
   27.84 +    AuMakeElementImportClient(elms, this->spec.freq, format,
   27.85 +                              this->spec.channels, AuTrue, buffer_size,
   27.86 +                              buffer_size / 4, 0, NULL);
   27.87      AuMakeElementExportDevice(elms + 1, 0, this->hidden->dev, this->spec.freq,
   27.88                                AuUnlimitedSamples, 0, NULL);
   27.89 -    NAS_AuSetElements(this->hidden->aud, this->hidden->flow,
   27.90 -                      AuTrue, 2, elms, NULL);
   27.91 +    NAS_AuSetElements(this->hidden->aud, this->hidden->flow, AuTrue, 2, elms,
   27.92 +                      NULL);
   27.93      NAS_AuRegisterEventHandler(this->hidden->aud, AuEventHandlerIDMask, 0,
   27.94                                 this->hidden->flow, event_handler,
   27.95                                 (AuPointer) NULL);
   27.96 @@ -372,7 +376,7 @@
   27.97  }
   27.98  
   27.99  static int
  27.100 -NAS_Init(SDL_AudioDriverImpl *impl)
  27.101 +NAS_Init(SDL_AudioDriverImpl * impl)
  27.102  {
  27.103      if (LoadNASLibrary() < 0) {
  27.104          return 0;
  27.105 @@ -392,7 +396,7 @@
  27.106      impl->GetDeviceBuf = NAS_GetDeviceBuf;
  27.107      impl->CloseDevice = NAS_CloseDevice;
  27.108      impl->Deinitialize = NAS_Deinitialize;
  27.109 -    impl->OnlyHasDefaultOutputDevice = 1;  /* !!! FIXME: is this true? */
  27.110 +    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: is this true? */
  27.111  
  27.112      return 1;
  27.113  }
    28.1 --- a/src/audio/nto/SDL_nto_audio.c	Sat Oct 28 16:41:54 2006 +0000
    28.2 +++ b/src/audio/nto/SDL_nto_audio.c	Sat Oct 28 16:48:03 2006 +0000
    28.3 @@ -141,7 +141,8 @@
    28.4      FD_SET(this->hidden->audio_fd, &wfds);
    28.5  
    28.6      do {
    28.7 -        selectret = select(this->hidden->audio_fd+1, NULL, &wfds, NULL, NULL);
    28.8 +        selectret =
    28.9 +            select(this->hidden->audio_fd + 1, NULL, &wfds, NULL, NULL);
   28.10          switch (selectret) {
   28.11          case -1:
   28.12          case 0:
   28.13 @@ -185,7 +186,7 @@
   28.14                  pcmbuffer += written * this->spec.channels;
   28.15                  continue;
   28.16              } else if ((errno == EINVAL) || (errno == EIO)) {
   28.17 -                SDL_memset(&cstatus, 0, sizeof (cstatus));
   28.18 +                SDL_memset(&cstatus, 0, sizeof(cstatus));
   28.19                  cstatus.channel = SND_PCM_CHANNEL_PLAYBACK;
   28.20                  rval = snd_pcm_plugin_status(this->hidden->audio_handle,
   28.21                                               &cstatus);
   28.22 @@ -194,10 +195,10 @@
   28.23                      return;
   28.24                  }
   28.25  
   28.26 -                if ( (cstatus.status == SND_PCM_STATUS_UNDERRUN) ||
   28.27 -                     (cstatus.status == SND_PCM_STATUS_READY)) {
   28.28 +                if ((cstatus.status == SND_PCM_STATUS_UNDERRUN) ||
   28.29 +                    (cstatus.status == SND_PCM_STATUS_READY)) {
   28.30                      rval = snd_pcm_plugin_prepare(this->hidden->audio_handle,
   28.31 -                                                   SND_PCM_CHANNEL_PLAYBACK);
   28.32 +                                                  SND_PCM_CHANNEL_PLAYBACK);
   28.33                      if (rval < 0) {
   28.34                          NTO_SetError("snd_pcm_plugin_prepare", rval);
   28.35                          return;
   28.36 @@ -258,7 +259,7 @@
   28.37  
   28.38      /* Initialize all variables that we clean on shutdown */
   28.39      this->hidden = (struct SDL_PrivateAudioData *)
   28.40 -                        SDL_malloc((sizeof *this->hidden));
   28.41 +        SDL_malloc((sizeof *this->hidden));
   28.42      if (this->hidden == NULL) {
   28.43          SDL_OutOfMemory();
   28.44          return 0;
   28.45 @@ -374,7 +375,7 @@
   28.46      }
   28.47  
   28.48      /* Make sure channel is setup right one last time */
   28.49 -    SDL_memset(&csetup, '\0', sizeof (csetup));
   28.50 +    SDL_memset(&csetup, '\0', sizeof(csetup));
   28.51      csetup.channel = SND_PCM_CHANNEL_PLAYBACK;
   28.52      if (snd_pcm_plugin_setup(this->hidden->audio_handle, &csetup) < 0) {
   28.53          NTO_CloseDevice(this);
   28.54 @@ -398,17 +399,20 @@
   28.55       *  (Note that buffer size must be a multiple of fragment size, so find
   28.56       *  closest multiple)
   28.57       */
   28.58 -    this->hidden->pcm_buf = (Uint8 *) SDL_AllocAudioMem(this->hidden->pcm_len);
   28.59 +    this->hidden->pcm_buf =
   28.60 +        (Uint8 *) SDL_AllocAudioMem(this->hidden->pcm_len);
   28.61      if (this->hidden->pcm_buf == NULL) {
   28.62          NTO_CloseDevice(this);
   28.63          SDL_OutOfMemory();
   28.64          return 0;
   28.65      }
   28.66 -    SDL_memset(this->hidden->pcm_buf,this->spec.silence,this->hidden->pcm_len);
   28.67 +    SDL_memset(this->hidden->pcm_buf, this->spec.silence,
   28.68 +               this->hidden->pcm_len);
   28.69  
   28.70      /* get the file descriptor */
   28.71 -    this->hidden->audio_fd = snd_pcm_file_descriptor(this->hidden->audio_handle,
   28.72 -                                                     SND_PCM_CHANNEL_PLAYBACK);
   28.73 +    this->hidden->audio_fd =
   28.74 +        snd_pcm_file_descriptor(this->hidden->audio_handle,
   28.75 +                                SND_PCM_CHANNEL_PLAYBACK);
   28.76      if (this->hidden->audio_fd < 0) {
   28.77          NTO_CloseDevice(this);
   28.78          NTO_SetError("snd_pcm_file_descriptor", rval);
   28.79 @@ -430,7 +434,7 @@
   28.80  
   28.81  
   28.82  static int
   28.83 -NTO_Init(SDL_AudioDriverImpl *impl)
   28.84 +NTO_Init(SDL_AudioDriverImpl * impl)
   28.85  {
   28.86      /*  See if we can open a nonblocking channel. */
   28.87      snd_pcm_t *handle = NULL;
   28.88 @@ -451,7 +455,7 @@
   28.89      impl->PlayDevice = NTO_PlayDevice;
   28.90      impl->GetDeviceBuf = NTO_GetDeviceBuf;
   28.91      impl->CloseDevice = NTO_CloseDevice;
   28.92 -    impl->OnlyHasDefaultOutputDevice = 1;  /* !!! FIXME: add device enum! */
   28.93 +    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: add device enum! */
   28.94  
   28.95      return 1;
   28.96  }
    29.1 --- a/src/audio/paudio/SDL_paudio.c	Sat Oct 28 16:41:54 2006 +0000
    29.2 +++ b/src/audio/paudio/SDL_paudio.c	Sat Oct 28 16:48:03 2006 +0000
    29.3 @@ -137,7 +137,9 @@
    29.4          /* Use timer for general audio synchronization */
    29.5          Sint32 ticks;
    29.6  
    29.7 -        ticks = ((Sint32)(this->hidden->next_frame-SDL_GetTicks()))-FUDGE_TICKS;
    29.8 +        ticks =
    29.9 +            ((Sint32) (this->hidden->next_frame - SDL_GetTicks())) -
   29.10 +            FUDGE_TICKS;
   29.11          if (ticks > 0) {
   29.12              SDL_Delay(ticks);
   29.13          }
   29.14 @@ -170,7 +172,8 @@
   29.15  #ifdef DEBUG_AUDIO
   29.16          fprintf(stderr, "Waiting for audio to get ready\n");
   29.17  #endif
   29.18 -        if (select(this->hidden->audio_fd+1,NULL,&fdset,NULL,&timeout) <= 0) {
   29.19 +        if (select(this->hidden->audio_fd + 1, NULL, &fdset, NULL, &timeout)
   29.20 +            <= 0) {
   29.21              const char *message =
   29.22                  "Audio timeout - buggy audio driver? (disabled)";
   29.23              /*
   29.24 @@ -264,7 +267,7 @@
   29.25  
   29.26      /* Initialize all variables that we clean on shutdown */
   29.27      this->hidden = (struct SDL_PrivateAudioData *)
   29.28 -                        SDL_malloc((sizeof *this->hidden));
   29.29 +        SDL_malloc((sizeof *this->hidden));
   29.30      if (this->hidden == NULL) {
   29.31          SDL_OutOfMemory();
   29.32          return 0;
   29.33 @@ -515,7 +518,7 @@
   29.34      /* Check to see if we need to use select() workaround */
   29.35      if (workaround != NULL) {
   29.36          this->hidden->frame_ticks = (float) (this->spec.samples * 1000) /
   29.37 -                                                this->spec.freq;
   29.38 +            this->spec.freq;
   29.39          this->hidden->next_frame = SDL_GetTicks() + this->hidden->frame_ticks;
   29.40      }
   29.41  
   29.42 @@ -524,7 +527,7 @@
   29.43  }
   29.44  
   29.45  static int
   29.46 -PAUDIO_Init(SDL_AudioDriverImpl *impl)
   29.47 +PAUDIO_Init(SDL_AudioDriverImpl * impl)
   29.48  {
   29.49      int fd = OpenAudioPath(NULL, 0, OPEN_FLAGS, 0);
   29.50      if (fd < 0) {
   29.51 @@ -539,7 +542,7 @@
   29.52      impl->PlayDevice = DSP_WaitDevice;
   29.53      impl->GetDeviceBuf = DSP_GetDeviceBuf;
   29.54      impl->CloseDevice = DSP_CloseDevice;
   29.55 -    impl->OnlyHasDefaultOutputDevice = 1;  /* !!! FIXME: add device enum! */
   29.56 +    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: add device enum! */
   29.57  
   29.58      return 1;
   29.59  }
    30.1 --- a/src/audio/windib/SDL_dibaudio.c	Sat Oct 28 16:41:54 2006 +0000
    30.2 +++ b/src/audio/windib/SDL_dibaudio.c	Sat Oct 28 16:48:03 2006 +0000
    30.3 @@ -107,7 +107,8 @@
    30.4  Uint8 *
    30.5  WINWAVEOUT_GetDeviceBuf(_THIS)
    30.6  {
    30.7 -    return (Uint8 *) (this->hidden->wavebuf[this->hidden->next_buffer].lpData);
    30.8 +    return (Uint8 *) (this->hidden->wavebuf[this->hidden->next_buffer].
    30.9 +                      lpData);
   30.10  }
   30.11  
   30.12  void
   30.13 @@ -116,7 +117,7 @@
   30.14      /* Queue it up */
   30.15      waveOutWrite(this->hidden->sound,
   30.16                   &this->hidden->wavebuf[this->hidden->next_buffer],
   30.17 -                 sizeof (this->hidden->wavebuf[0]));
   30.18 +                 sizeof(this->hidden->wavebuf[0]));
   30.19      this->hidden->next_buffer = (this->hidden->next_buffer + 1) % NUM_BUFFERS;
   30.20  }
   30.21  
   30.22 @@ -165,7 +166,7 @@
   30.23              if (this->hidden->wavebuf[i].dwUser != 0xFFFF) {
   30.24                  waveOutUnprepareHeader(this->hidden->sound,
   30.25                                         &this->hidden->wavebuf[i],
   30.26 -                                       sizeof (this->hidden->wavebuf[i]));
   30.27 +                                       sizeof(this->hidden->wavebuf[i]));
   30.28                  this->hidden->wavebuf[i].dwUser = 0xFFFF;
   30.29              }
   30.30          }
   30.31 @@ -192,7 +193,7 @@
   30.32  
   30.33      /* Initialize all variables that we clean on shutdown */
   30.34      this->hidden = (struct SDL_PrivateAudioData *)
   30.35 -                        SDL_malloc((sizeof *this->hidden));
   30.36 +        SDL_malloc((sizeof *this->hidden));
   30.37      if (this->hidden == NULL) {
   30.38          SDL_OutOfMemory();
   30.39          return 0;
   30.40 @@ -207,15 +208,15 @@
   30.41          valid_datatype = 1;
   30.42          this->spec.format = test_format;
   30.43          switch (test_format) {
   30.44 -            case AUDIO_U8:
   30.45 -            case AUDIO_S16:
   30.46 -            case AUDIO_S32:
   30.47 -                break;  /* valid. */
   30.48 +        case AUDIO_U8:
   30.49 +        case AUDIO_S16:
   30.50 +        case AUDIO_S32:
   30.51 +            break;              /* valid. */
   30.52  
   30.53 -            default:
   30.54 -                valid_datatype = 0;
   30.55 -                test_format = SDL_NextAudioFormat();
   30.56 -                break;
   30.57 +        default:
   30.58 +            valid_datatype = 0;
   30.59 +            test_format = SDL_NextAudioFormat();
   30.60 +            break;
   30.61          }
   30.62      }
   30.63  
   30.64 @@ -226,12 +227,12 @@
   30.65      }
   30.66  
   30.67      /* Set basic WAVE format parameters */
   30.68 -    SDL_memset(&waveformat, '\0', sizeof (waveformat));
   30.69 +    SDL_memset(&waveformat, '\0', sizeof(waveformat));
   30.70      waveformat.wFormatTag = WAVE_FORMAT_PCM;
   30.71      waveformat.wBitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format);
   30.72  
   30.73      if (this->spec.channels > 2)
   30.74 -        this->spec.channels = 2;  /* !!! FIXME: is this right? */
   30.75 +        this->spec.channels = 2;        /* !!! FIXME: is this right? */
   30.76  
   30.77      waveformat.nChannels = this->spec.channels;
   30.78      waveformat.nSamplesPerSec = this->spec.freq;
   30.79 @@ -273,11 +274,11 @@
   30.80  #endif
   30.81  
   30.82      /* Create the audio buffer semaphore */
   30.83 -    this->hidden->audio_sem = 
   30.84 +    this->hidden->audio_sem =
   30.85  #if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   30.86 -            CreateSemaphoreCE(NULL, NUM_BUFFERS - 1, NUM_BUFFERS, NULL);
   30.87 +        CreateSemaphoreCE(NULL, NUM_BUFFERS - 1, NUM_BUFFERS, NULL);
   30.88  #else
   30.89 -            CreateSemaphore(NULL, NUM_BUFFERS - 1, NUM_BUFFERS, NULL);
   30.90 +        CreateSemaphore(NULL, NUM_BUFFERS - 1, NUM_BUFFERS, NULL);
   30.91  #endif
   30.92      if (this->hidden->audio_sem == NULL) {
   30.93          WINWAVEOUT_CloseDevice(this);
   30.94 @@ -286,7 +287,8 @@
   30.95      }
   30.96  
   30.97      /* Create the sound buffers */
   30.98 -    this->hidden->mixbuf = (Uint8 *) SDL_malloc(NUM_BUFFERS * this->spec.size);
   30.99 +    this->hidden->mixbuf =
  30.100 +        (Uint8 *) SDL_malloc(NUM_BUFFERS * this->spec.size);
  30.101      if (this->hidden->mixbuf == NULL) {
  30.102          WINWAVEOUT_CloseDevice(this);
  30.103          SDL_OutOfMemory();
  30.104 @@ -294,14 +296,14 @@
  30.105      }
  30.106      for (i = 0; i < NUM_BUFFERS; ++i) {
  30.107          SDL_memset(&this->hidden->wavebuf[i], '\0',
  30.108 -                    sizeof (this->hidden->wavebuf[i]));
  30.109 +                   sizeof(this->hidden->wavebuf[i]));
  30.110          this->hidden->wavebuf[i].dwBufferLength = this->spec.size;
  30.111          this->hidden->wavebuf[i].dwFlags = WHDR_DONE;
  30.112          this->hidden->wavebuf[i].lpData =
  30.113 -                            (LPSTR) &this->hidden->mixbuf[i * this->spec.size];
  30.114 +            (LPSTR) & this->hidden->mixbuf[i * this->spec.size];
  30.115          result = waveOutPrepareHeader(this->hidden->sound,
  30.116                                        &this->hidden->wavebuf[i],
  30.117 -                                      sizeof (this->hidden->wavebuf[i]));
  30.118 +                                      sizeof(this->hidden->wavebuf[i]));
  30.119          if (result != MMSYSERR_NOERROR) {
  30.120              WINWAVEOUT_CloseDevice(this);
  30.121              SetMMerror("waveOutPrepareHeader()", result);
  30.122 @@ -309,12 +311,12 @@
  30.123          }
  30.124      }
  30.125  
  30.126 -    return 1;   /* Ready to go! */
  30.127 +    return 1;                   /* Ready to go! */
  30.128  }
  30.129  
  30.130  
  30.131  static int
  30.132 -WINWAVEOUT_Init(SDL_AudioDriverImpl *impl)
  30.133 +WINWAVEOUT_Init(SDL_AudioDriverImpl * impl)
  30.134  {
  30.135      /* Set the function pointers */
  30.136      impl->OpenDevice = WINWAVEOUT_OpenDevice;
  30.137 @@ -324,7 +326,7 @@
  30.138      impl->WaitDone = WINWAVEOUT_WaitDone;
  30.139      impl->GetDeviceBuf = WINWAVEOUT_GetDeviceBuf;
  30.140      impl->CloseDevice = WINWAVEOUT_CloseDevice;
  30.141 -    impl->OnlyHasDefaultOutputDevice = 1;  /* !!! FIXME: Is this true? */
  30.142 +    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: Is this true? */
  30.143  
  30.144      return 1;
  30.145  }
    31.1 --- a/src/audio/windx5/SDL_dx5audio.c	Sat Oct 28 16:41:54 2006 +0000
    31.2 +++ b/src/audio/windx5/SDL_dx5audio.c	Sat Oct 28 16:48:03 2006 +0000
    31.3 @@ -39,7 +39,8 @@
    31.4  
    31.5  /* DirectX function pointers for audio */
    31.6  static HINSTANCE DSoundDLL = NULL;
    31.7 -static HRESULT (WINAPI *DSoundCreate)(LPGUID,LPDIRECTSOUND*,LPUNKNOWN) = NULL;
    31.8 +static HRESULT(WINAPI * DSoundCreate) (LPGUID, LPDIRECTSOUND *, LPUNKNOWN) =
    31.9 +    NULL;
   31.10  
   31.11  static void
   31.12  DSOUND_Unload(void)
   31.13 @@ -70,7 +71,7 @@
   31.14              SDL_SetError("DirectSound: System doesn't appear to have DX5.");
   31.15          } else {
   31.16              DSoundCreate = (void *) GetProcAddress(DSoundDLL,
   31.17 -                                               TEXT("DirectSoundCreate"));
   31.18 +                                                   TEXT("DirectSoundCreate"));
   31.19          }
   31.20  
   31.21          if (!DSoundCreate) {
   31.22 @@ -271,14 +272,14 @@
   31.23      /* Lock the audio buffer */
   31.24      result = IDirectSoundBuffer_Lock(this->hidden->mixbuf, cursor,
   31.25                                       this->hidden->mixlen,
   31.26 -                                     (LPVOID *) &this->hidden->locked_buf,
   31.27 +                                     (LPVOID *) & this->hidden->locked_buf,
   31.28                                       &rawlen, NULL, &junk, 0);
   31.29      if (result == DSERR_BUFFERLOST) {
   31.30          IDirectSoundBuffer_Restore(this->hidden->mixbuf);
   31.31          result = IDirectSoundBuffer_Lock(this->hidden->mixbuf, cursor,
   31.32                                           this->hidden->mixlen,
   31.33 -                                         (LPVOID *) &this->hidden->locked_buf,
   31.34 -                                         &rawlen, NULL, &junk, 0);
   31.35 +                                         (LPVOID *) & this->hidden->
   31.36 +                                         locked_buf, &rawlen, NULL, &junk, 0);
   31.37      }
   31.38      if (result != DS_OK) {
   31.39          SetDSerror("DirectSound Lock", result);
   31.40 @@ -326,7 +327,7 @@
   31.41     number of audio chunks available in the created buffer.
   31.42  */
   31.43  static int
   31.44 -CreateSecondary(_THIS, HWND focus, WAVEFORMATEX *wavefmt)
   31.45 +CreateSecondary(_THIS, HWND focus, WAVEFORMATEX * wavefmt)
   31.46  {
   31.47      LPDIRECTSOUND sndObj = this->hidden->sound;
   31.48      LPDIRECTSOUNDBUFFER *sndbuf = &this->hidden->mixbuf;
   31.49 @@ -405,7 +406,7 @@
   31.50  
   31.51      /* Initialize all variables that we clean on shutdown */
   31.52      this->hidden = (struct SDL_PrivateAudioData *)
   31.53 -                        SDL_malloc((sizeof *this->hidden));
   31.54 +        SDL_malloc((sizeof *this->hidden));
   31.55      if (this->hidden == NULL) {
   31.56          SDL_OutOfMemory();
   31.57          return 0;
   31.58 @@ -414,12 +415,12 @@
   31.59  
   31.60      while ((!valid_format) && (test_format)) {
   31.61          switch (test_format) {
   31.62 -            case AUDIO_U8:
   31.63 -            case AUDIO_S16:
   31.64 -            case AUDIO_S32:
   31.65 -                this->spec.format = test_format;
   31.66 -                valid_format = 1;
   31.67 -                break;
   31.68 +        case AUDIO_U8:
   31.69 +        case AUDIO_S16:
   31.70 +        case AUDIO_S32:
   31.71 +            this->spec.format = test_format;
   31.72 +            valid_format = 1;
   31.73 +            break;
   31.74          }
   31.75          test_format = SDL_NextAudioFormat();
   31.76      }
   31.77 @@ -461,7 +462,7 @@
   31.78      /* The buffer will auto-start playing in DSOUND_WaitDevice() */
   31.79      this->hidden->mixlen = this->spec.size;
   31.80  
   31.81 -    return 1;  /* good to go. */
   31.82 +    return 1;                   /* good to go. */
   31.83  }
   31.84  
   31.85  
   31.86 @@ -473,7 +474,7 @@
   31.87  
   31.88  
   31.89  static int
   31.90 -DSOUND_Init(SDL_AudioDriverImpl *impl)
   31.91 +DSOUND_Init(SDL_AudioDriverImpl * impl)
   31.92  {
   31.93      OSVERSIONINFO ver;
   31.94  
   31.95 @@ -482,12 +483,12 @@
   31.96       *  audio buffers used by many SDL applications, so there are gaps in the
   31.97       *  audio - it sounds terrible.  Punt for now.
   31.98       */
   31.99 -    SDL_memset(&ver, '\0', sizeof (OSVERSIONINFO));
  31.100 +    SDL_memset(&ver, '\0', sizeof(OSVERSIONINFO));
  31.101      ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
  31.102      GetVersionEx(&ver);
  31.103      if (ver.dwPlatformId == VER_PLATFORM_WIN32_NT) {
  31.104          if (ver.dwMajorVersion <= 4) {
  31.105 -            return 0;  /* NT4.0 or earlier. Disable dsound support. */
  31.106 +            return 0;           /* NT4.0 or earlier. Disable dsound support. */
  31.107          }
  31.108      }
  31.109  
  31.110 @@ -504,7 +505,7 @@
  31.111      impl->GetDeviceBuf = DSOUND_GetDeviceBuf;
  31.112      impl->CloseDevice = DSOUND_CloseDevice;
  31.113      impl->Deinitialize = DSOUND_Deinitialize;
  31.114 -    impl->OnlyHasDefaultOutputDevice = 1;  /* !!! FIXME */
  31.115 +    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME */
  31.116  
  31.117      return 1;
  31.118  }
    32.1 --- a/src/timer/os2/SDL_systimer.c	Sat Oct 28 16:41:54 2006 +0000
    32.2 +++ b/src/timer/os2/SDL_systimer.c	Sat Oct 28 16:48:03 2006 +0000
    32.3 @@ -64,6 +64,7 @@
    32.4          hires_now /= hires_ticks_per_second;
    32.5  */
    32.6      /* inline asm to avoid runtime inclusion */
    32.7 +    /* *INDENT-OFF* */
    32.8      _asm {
    32.9          push edx
   32.10          push eax
   32.11 @@ -87,6 +88,7 @@
   32.12          pop edx
   32.13          pop eax
   32.14      }
   32.15 +    /* *INDENT-ON* */
   32.16  
   32.17      return ticks;
   32.18  
    33.1 --- a/test/testaudioinfo.c	Sat Oct 28 16:41:54 2006 +0000
    33.2 +++ b/test/testaudioinfo.c	Sat Oct 28 16:48:03 2006 +0000
    33.3 @@ -1,6 +1,7 @@
    33.4  #include "SDL.h"
    33.5  
    33.6 -static void print_devices(int iscapture)
    33.7 +static void
    33.8 +print_devices(int iscapture)
    33.9  {
   33.10      const char *typestr = ((iscapture) ? "capture" : "output");
   33.11      int n = SDL_GetNumAudioDevices(iscapture);
   33.12 @@ -11,8 +12,7 @@
   33.13          printf("  Driver can't detect specific devices.\n\n", typestr);
   33.14      else if (n == 0)
   33.15          printf("  No %s devices found.\n\n", typestr);
   33.16 -    else
   33.17 -    {
   33.18 +    else {
   33.19          int i;
   33.20          for (i = 0; i < n; i++) {
   33.21              printf("  %s\n", SDL_GetAudioDeviceName(i, iscapture));
   33.22 @@ -21,7 +21,8 @@
   33.23      }
   33.24  }
   33.25  
   33.26 -int main(int argc, char **argv)
   33.27 +int
   33.28 +main(int argc, char **argv)
   33.29  {
   33.30      /* Print available audio drivers */
   33.31      int n = SDL_GetNumAudioDrivers();
   33.32 @@ -50,4 +51,3 @@
   33.33      SDL_Quit();
   33.34      return 0;
   33.35  }
   33.36 -
    34.1 --- a/test/testmultiaudio.c	Sat Oct 28 16:41:54 2006 +0000
    34.2 +++ b/test/testmultiaudio.c	Sat Oct 28 16:48:03 2006 +0000
    34.3 @@ -1,8 +1,8 @@
    34.4  #include "SDL.h"
    34.5  
    34.6  static SDL_AudioSpec spec;
    34.7 -static Uint8 *sound = NULL;            /* Pointer to wave data */
    34.8 -static Uint32 soundlen = 0;            /* Length of wave data */
    34.9 +static Uint8 *sound = NULL;     /* Pointer to wave data */
   34.10 +static Uint32 soundlen = 0;     /* Length of wave data */
   34.11  
   34.12  typedef struct
   34.13  {
   34.14 @@ -11,7 +11,8 @@
   34.15      volatile int done;
   34.16  } callback_data;
   34.17  
   34.18 -void SDLCALL play_through_once(void *arg, Uint8 * stream, int len)
   34.19 +void SDLCALL
   34.20 +play_through_once(void *arg, Uint8 * stream, int len)
   34.21  {
   34.22      callback_data *cbd = (callback_data *) arg;
   34.23      Uint8 *waveptr = sound + cbd->soundpos;
   34.24 @@ -30,14 +31,16 @@
   34.25      }
   34.26  }
   34.27  
   34.28 -static void test_multi_audio(int devcount)
   34.29 +static void
   34.30 +test_multi_audio(int devcount)
   34.31  {
   34.32      callback_data cbd[64];
   34.33      int keep_going = 1;
   34.34      int i;
   34.35  
   34.36      if (devcount > 64) {
   34.37 -        fprintf(stderr, "Too many devices (%d), clamping to 64...\n", devcount);
   34.38 +        fprintf(stderr, "Too many devices (%d), clamping to 64...\n",
   34.39 +                devcount);
   34.40          devcount = 64;
   34.41      }
   34.42  
   34.43 @@ -48,7 +51,7 @@
   34.44          printf("playing on device #%d: ('%s')...", i, devname);
   34.45          fflush(stdout);
   34.46  
   34.47 -        memset(&cbd[0], '\0', sizeof (callback_data));
   34.48 +        memset(&cbd[0], '\0', sizeof(callback_data));
   34.49          spec.userdata = &cbd[0];
   34.50          cbd[0].dev = SDL_OpenAudioDevice(devname, 0, &spec, NULL);
   34.51          if (cbd[0].dev == 0) {
   34.52 @@ -63,7 +66,7 @@
   34.53          }
   34.54      }
   34.55  
   34.56 -    memset(cbd, '\0', sizeof (cbd));
   34.57 +    memset(cbd, '\0', sizeof(cbd));
   34.58  
   34.59      printf("playing on all devices...\n");
   34.60      for (i = 0; i < devcount; i++) {
   34.61 @@ -102,7 +105,8 @@
   34.62  }
   34.63  
   34.64  
   34.65 -int main(int argc, char **argv)
   34.66 +int
   34.67 +main(int argc, char **argv)
   34.68  {
   34.69      int devcount = 0;
   34.70  
   34.71 @@ -124,7 +128,8 @@
   34.72  
   34.73          /* Load the wave file into memory */
   34.74          if (SDL_LoadWAV(argv[1], &spec, &sound, &soundlen) == NULL) {
   34.75 -            fprintf(stderr, "Couldn't load %s: %s\n", argv[1], SDL_GetError());
   34.76 +            fprintf(stderr, "Couldn't load %s: %s\n", argv[1],
   34.77 +                    SDL_GetError());
   34.78          } else {
   34.79              test_multi_audio(devcount);
   34.80              SDL_FreeWAV(sound);
    35.1 --- a/test/testwm.c	Sat Oct 28 16:41:54 2006 +0000
    35.2 +++ b/test/testwm.c	Sat Oct 28 16:48:03 2006 +0000
    35.3 @@ -276,7 +276,7 @@
    35.4  main(int argc, char *argv[])
    35.5  {
    35.6      SDL_Event event;
    35.7 -    char *title;
    35.8 +    const char *title;
    35.9      SDL_Surface *icon;
   35.10      Uint8 *icon_mask;
   35.11      int parsed;