xmp: match function heads with prototypes and use (void)

In cases where no prototype is present, this changes the function from
taking an unspecified number of arguments to taking exactly zero.
master
Jan Engelhardt 13 years ago
parent 665ae482a5
commit 663cb91e4e
  1. 4
      src/commands.c
  2. 2
      src/info.c
  3. 8
      src/main-old.c
  4. 2
      src/sound.c
  5. 2
      src/sound.h
  6. 8
      src/sound_ahi.c
  7. 8
      src/sound_aix.c
  8. 8
      src/sound_alsa.c
  9. 4
      src/sound_alsa05.c
  10. 20
      src/sound_beos.c
  11. 8
      src/sound_bsd.c
  12. 12
      src/sound_coreaudio.c
  13. 2
      src/sound_dart.c
  14. 8
      src/sound_file.c
  15. 8
      src/sound_hpux.c
  16. 8
      src/sound_netbsd.c
  17. 8
      src/sound_null.c
  18. 8
      src/sound_oss.c
  19. 8
      src/sound_pulseaudio.c
  20. 8
      src/sound_qnx.c
  21. 8
      src/sound_sgi.c
  22. 8
      src/sound_sndio.c
  23. 8
      src/sound_solaris.c
  24. 8
      src/sound_wav.c
  25. 8
      src/sound_win32.c
  26. 4
      src/terminal.c

@ -32,7 +32,7 @@
* This makes Cygwin builds work out of the box with no fiddling around,
* but does impose a neglectible cpu overhead (for Cygwin builds only).
*/
static int stdin_ready_for_reading()
static int stdin_ready_for_reading(void)
{
fd_set fds;
struct timeval tv;
@ -53,7 +53,7 @@ static int stdin_ready_for_reading()
}
#endif
static int read_key()
static int read_key(void)
{
char key;
int ret;

@ -87,7 +87,7 @@ void info_mod(struct xmp_module_info *mi)
}
}
void info_frame_init()
void info_frame_init(void)
{
max_channels = 0;
}

@ -106,7 +106,7 @@ static xmp_context ctx;
static int paused;
static int set_tty()
static int set_tty(void)
{
#ifdef HAVE_TERMIOS_H
struct termios t;
@ -129,7 +129,7 @@ static int set_tty()
}
static int reset_tty()
static int reset_tty(void)
{
#ifdef HAVE_TERMIOS_H
if (background)
@ -235,7 +235,7 @@ static void cleanup(int s)
* This makes Cygwin builds work out of the box with no fiddling around,
* but does impose a neglectible cpu overhead (for Cygwin builds only).
*/
static int stdin_ready_for_reading()
static int stdin_ready_for_reading(void)
{
fd_set fds;
struct timeval tv;
@ -256,7 +256,7 @@ static int stdin_ready_for_reading()
}
#endif
void read_keyboard()
void read_keyboard(void)
{
unsigned char cmd;
int k;

@ -37,7 +37,7 @@ static void register_sound_driver(struct sound_driver *sd)
list_add_tail(&sd->list, &sound_driver_list);
}
void init_sound_drivers()
void init_sound_drivers(void)
{
#ifdef SOUND_AHI
register_sound_driver(&sound_ahi);

@ -35,7 +35,7 @@ struct sound_driver {
#define chkparm2(x,y,z,w) { if (!strcmp(s, x)) { \
if (2 > sscanf(token, y, z, w)) parm_error(); } }
static inline int is_big_endian() {
static inline int is_big_endian(void) {
unsigned short w = 0x00ff;
return (*(char *)&w == 0x00);
}

@ -51,20 +51,20 @@ static void play(void *b, int i)
}
}
static void deinit()
static void deinit(void)
{
close(fd);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -99,22 +99,22 @@ static void play(void *b, int i)
};
}
static void deinit()
static void deinit(void)
{
control.ioctl_request = AUDIO_STOP;
ioctl(audio_fd, AUDIO_CONTROL, &control);
close(audio_fd);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -91,21 +91,21 @@ static void play(void *b, int i)
}
}
static void deinit()
static void deinit(void)
{
snd_pcm_close(pcm_handle);
}
static void flush()
static void flush(void)
{
snd_pcm_drain(pcm_handle);
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -182,13 +182,13 @@ static void play(void *b, int i)
}
}
static void deinit()
static void deinit(void)
{
snd_pcm_close(pcm_handle);
free(mybuffer);
}
static void flush()
static void flush(void)
{
snd_pcm_plugin_flush(pcm_handle, SND_PCM_CHANNEL_PLAYBACK);
prepare_driver();

@ -43,11 +43,11 @@ static const char *const help[] = {
};
static int init(struct options *options);
static void deinit();
static void deinit(void);
static void play(void *b, int i);
static void flush();
static void onpause();
static void onresume();
static void flush(void);
static void onpause(void);
static void onresume(void);
struct sound_driver sound_beos = {
"beos",
@ -64,7 +64,7 @@ struct sound_driver sound_beos = {
/* return minimum number of free bytes in buffer, value may change between
* two immediately following calls, and the real number of free bytes
* might actually be larger! */
static int buf_free()
static int buf_free(void)
{
int free = buf_read_pos - buf_write_pos - chunk_size;
if (free < 0)
@ -75,7 +75,7 @@ static int buf_free()
/* return minimum number of buffered bytes, value may change between
* two immediately following calls, and the real number of buffered bytes
* might actually be larger! */
static int buf_used()
static int buf_used(void)
{
int used = buf_write_pos - buf_read_pos;
if (used < 0)
@ -205,22 +205,22 @@ static void play(void *b, int i)
}
}
static void deinit()
static void deinit(void)
{
player->Stop();
be_app->Lock();
be_app->Quit();
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -77,20 +77,20 @@ static void play(void *b, int i)
}
}
static void deinit()
static void deinit(void)
{
close(audio_fd);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -33,7 +33,7 @@ static int packet_size;
/* return minimum number of free bytes in buffer, value may change between
* two immediately following calls, and the real number of free bytes
* might actually be larger! */
static int buf_free()
static int buf_free(void)
{
int free = buf_read_pos - buf_write_pos - chunk_size;
if (free < 0)
@ -44,7 +44,7 @@ static int buf_free()
/* return minimum number of buffered bytes, value may change between
* two immediately following calls, and the real number of buffered bytes
* might actually be larger! */
static int buf_used()
static int buf_used(void)
{
int used = buf_write_pos - buf_read_pos;
if (used < 0)
@ -246,7 +246,7 @@ static void play(void *b, int i)
}
static void deinit()
static void deinit(void)
{
AudioOutputUnitStop(au);
AudioUnitUninitialize(au);
@ -254,15 +254,15 @@ static void deinit()
free(buffer);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -195,7 +195,7 @@ static void play(void *b, int i)
}
static void deinit()
static void deinit(void)
{
if (MixBuffers[0].pBuffer) {
mciSendCommand(DeviceID, MCI_BUFFER,

@ -73,20 +73,20 @@ static void play(void *b, int len)
size += len;
}
static void deinit()
static void deinit(void)
{
free(sound_file.description);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -122,20 +122,20 @@ static void play(void *b, int i)
}
}
static void deinit()
static void deinit(void)
{
close(audio_fd);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -105,20 +105,20 @@ static void play(void *b, int i)
}
}
static void deinit()
static void deinit(void)
{
close(audio_fd);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -18,19 +18,19 @@ static void play(void *b, int i)
{
}
static void deinit()
static void deinit(void)
{
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -161,17 +161,17 @@ static void play(void *b, int i)
};
}
static void deinit()
static void deinit(void)
{
ioctl(audio_fd, SNDCTL_DSP_RESET, NULL);
close(audio_fd);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
#ifdef SNDCTL_DSP_SETTRIGGER
int trig = 0;
@ -184,7 +184,7 @@ static void onpause()
ioctl(audio_fd, SNDCTL_DSP_SYNC, NULL);
}
static void onresume()
static void onresume(void)
{
#ifdef SNDCTL_DSP_SETTRIGGER
int trig = PCM_ENABLE_OUTPUT;

@ -60,12 +60,12 @@ static void play(void *b, int i)
}
}
static void deinit()
static void deinit(void)
{
pa_simple_free(s);
}
static void flush()
static void flush(void)
{
int error;
@ -74,11 +74,11 @@ static void flush()
}
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -87,21 +87,21 @@ static void play(void *b, int i)
} while (i);
}
static void deinit()
static void deinit(void)
{
close(fd_audio);
}
static void flush()
static void flush(void)
{
ioctl(fd, SNDCTL_DSP_SYNC, NULL);
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -150,20 +150,20 @@ static void play(void *b, int i)
ALwritesamps(audio_port, b, i);
}
static void deinit()
static void deinit(void)
{
ALcloseport(audio_port);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -76,7 +76,7 @@ static int init(struct options *options)
return -1;
}
static void deinit()
static void deinit(void)
{
sio_close(hdl);
hdl = NULL;
@ -89,15 +89,15 @@ static void play(void *buf, int len)
}
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -153,20 +153,20 @@ static void play(void *b, int i)
}
}
static void deinit()
static void deinit(void)
{
close(audio_fd);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -134,7 +134,7 @@ static void play(void *b, int len)
size += len;
}
static void deinit()
static void deinit(void)
{
lseek(fd, 40, SEEK_SET);
write_32l(fd, size);
@ -149,15 +149,15 @@ static void deinit()
free(sound_wav.description);
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -134,7 +134,7 @@ static void play(void *b, int len)
nextbuffer %= num_buffers;
}
static void deinit()
static void deinit(void)
{
int i;
@ -151,15 +151,15 @@ static void deinit()
}
}
static void flush()
static void flush(void)
{
}
static void onpause()
static void onpause(void)
{
}
static void onresume()
static void onresume(void)
{
}

@ -17,7 +17,7 @@
static struct termios term;
#endif
int set_tty()
int set_tty(void)
{
#ifdef HAVE_TERMIOS_H
struct termios t;
@ -38,7 +38,7 @@ int set_tty()
return 0;
}
int reset_tty()
int reset_tty(void)
{
#ifdef HAVE_TERMIOS_H
if (!isatty(STDIN_FILENO))

Loading…
Cancel
Save