From 2086e83814793b5831f186fa93d4ec7821f4c61d Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sun, 24 Dec 2006 13:53:23 +0000 Subject: [PATCH] Make code compile with C89 compilers again git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1350 423420c4-83ab-492f-b58f-81f9feb106b5 --- rdpsnd_alsa.c | 34 +++++++++++++++++----------------- rdpsnd_libao.c | 34 +++++++++++++++++----------------- rdpsnd_oss.c | 33 ++++++++++++++++----------------- rdpsnd_sgi.c | 34 +++++++++++++++++----------------- rdpsnd_sun.c | 35 ++++++++++++++++++----------------- 5 files changed, 85 insertions(+), 85 deletions(-) diff --git a/rdpsnd_alsa.c b/rdpsnd_alsa.c index 854a32b..da3fc42 100644 --- a/rdpsnd_alsa.c +++ b/rdpsnd_alsa.c @@ -337,26 +337,26 @@ alsa_play(void) } } -static struct audio_driver alsa_driver = { - .name = "alsa", - .description = "ALSA output driver, default device: " DEFAULTDEVICE, - - .add_fds = alsa_add_fds, - .check_fds = alsa_check_fds, - - .wave_out_open = alsa_open, - .wave_out_close = alsa_close, - .wave_out_format_supported = alsa_format_supported, - .wave_out_set_format = alsa_set_format, - .wave_out_volume = rdpsnd_dsp_softvol_set, - - .need_byteswap_on_be = 0, - .need_resampling = 0, -}; - struct audio_driver * alsa_register(char *options) { + static struct audio_driver alsa_driver; + + alsa_driver.name = xstrdup("alsa"); + alsa_driver.description = xstrdup("ALSA output driver, default device: " DEFAULTDEVICE); + + alsa_driver.add_fds = alsa_add_fds; + alsa_driver.check_fds = alsa_check_fds; + + alsa_driver.wave_out_open = alsa_open; + alsa_driver.wave_out_close = alsa_close; + alsa_driver.wave_out_format_supported = alsa_format_supported; + alsa_driver.wave_out_set_format = alsa_set_format; + alsa_driver.wave_out_volume = rdpsnd_dsp_softvol_set; + + alsa_driver.need_byteswap_on_be = 0; + alsa_driver.need_resampling = 0; + if (options) { pcm_name = xstrdup(options); diff --git a/rdpsnd_libao.c b/rdpsnd_libao.c index 2f808f1..15a150e 100644 --- a/rdpsnd_libao.c +++ b/rdpsnd_libao.c @@ -187,26 +187,26 @@ libao_play(void) } } -static struct audio_driver libao_driver = { - .name = "libao", - .description = "libao output driver, default device: system dependent", - - .add_fds = libao_add_fds, - .check_fds = libao_check_fds, - - .wave_out_open = libao_open, - .wave_out_close = libao_close, - .wave_out_format_supported = rdpsnd_dsp_resample_supported, - .wave_out_set_format = libao_set_format, - .wave_out_volume = rdpsnd_dsp_softvol_set, - - .need_byteswap_on_be = 1, - .need_resampling = 1, -}; - struct audio_driver * libao_register(char *options) { + static struct audio_driver libao_driver; + + libao_driver.name = xstrdup("libao"); + libao_driver.description = xstrdup("libao output driver, default device: system dependent"); + + libao_driver.add_fds = libao_add_fds; + libao_driver.check_fds = libao_check_fds; + + libao_driver.wave_out_open = libao_open; + libao_driver.wave_out_close = libao_close; + libao_driver.wave_out_format_supported = rdpsnd_dsp_resample_supported; + libao_driver.wave_out_set_format = libao_set_format; + libao_driver.wave_out_volume = rdpsnd_dsp_softvol_set; + + libao_driver.need_byteswap_on_be = 1; + libao_driver.need_resampling = 1; + if (options) { libao_device = xstrdup(options); diff --git a/rdpsnd_oss.c b/rdpsnd_oss.c index 1a3ec37..a54d5de 100644 --- a/rdpsnd_oss.c +++ b/rdpsnd_oss.c @@ -316,26 +316,25 @@ oss_play(void) } } -static struct audio_driver oss_driver = { - .name = "oss", - .description = "OSS output driver, default device: " DEFAULTDEVICE " or $AUDIODEV", - - .add_fds = oss_add_fds, - .check_fds = oss_check_fds, - - .wave_out_open = oss_open, - .wave_out_close = oss_close, - .wave_out_format_supported = oss_format_supported, - .wave_out_set_format = oss_set_format, - .wave_out_volume = oss_volume, - - .need_byteswap_on_be = 0, - .need_resampling = 0, -}; - struct audio_driver * oss_register(char *options) { + oss_driver.name = xstrdup("oss"); + oss_driver.description = + xstrdup("OSS output driver, default device: " DEFAULTDEVICE " or $AUDIODEV"); + + oss_driver.add_fds = oss_add_fds; + oss_driver.check_fds = oss_check_fds; + + oss_driver.wave_out_open = oss_open; + oss_driver.wave_out_close = oss_close; + oss_driver.wave_out_format_supported = oss_format_supported; + oss_driver.wave_out_set_format = oss_set_format; + oss_driver.wave_out_volume = oss_volume; + + oss_driver.need_byteswap_on_be = 0; + oss_driver.need_resampling = 0; + if (options) { dsp_dev = xstrdup(options); diff --git a/rdpsnd_sgi.c b/rdpsnd_sgi.c index 912d9a8..47cd3c5 100644 --- a/rdpsnd_sgi.c +++ b/rdpsnd_sgi.c @@ -287,26 +287,26 @@ sgi_play(void) } } -static struct audio_driver sgi_driver = { - .name = "sgi", - .description = "SGI output driver", - - .add_fds = sgi_add_fds, - .check_fds = sgi_check_fds, - - .wave_out_open = sgi_open, - .wave_out_close = sgi_close, - .wave_out_format_supported = sgi_format_supported, - .wave_out_set_format = sgi_set_format, - .wave_out_volume = sgi_volume, - - .need_byteswap_on_be = 1, - .need_resampling = 0, -}; - struct audio_driver * sgi_register(char *options) { + static struct audio_driver sgi_driver; + + sgi_driver.name = xstrdup("sgi"); + sgi_driver.description = xstrdup("SGI output driver"); + + sgi_driver.add_fds = sgi_add_fds; + sgi_driver.check_fds = sgi_check_fds; + + sgi_driver.wave_out_open = sgi_open; + sgi_driver.wave_out_close = sgi_close; + sgi_driver.wave_out_format_supported = sgi_format_supported; + sgi_driver.wave_out_set_format = sgi_set_format; + sgi_driver.wave_out_volume = sgi_volume; + + sgi_driver.need_byteswap_on_be = 1; + sgi_driver.need_resampling = 0; + if (options) { sgi_output_device = xstrdup(options); diff --git a/rdpsnd_sun.c b/rdpsnd_sun.c index c8ca9d7..f582dd0 100644 --- a/rdpsnd_sun.c +++ b/rdpsnd_sun.c @@ -264,26 +264,27 @@ sun_play(void) } } -static struct audio_driver sun_driver = { - .name = "sun", - .description = "SUN/BSD output driver, default device: " DEFAULTDEVICE " or $AUDIODEV", - - .add_fds = sun_add_fds, - .check_fds = sun_check_fds, - - .wave_out_open = sun_open, - .wave_out_close = sun_close, - .wave_out_format_supported = sun_format_supported, - .wave_out_set_format = sun_set_format, - .wave_out_volume = sun_volume, - - .need_byteswap_on_be = 1, - .need_resampling = 0, -}; - struct audio_driver * sun_register(char *options) { + static struct audio_driver sun_driver; + + sun_driver.name = xstrdup("sun"); + sun_driver.description = + xstrdup("SUN/BSD output driver, default device: " DEFAULTDEVICE " or $AUDIODEV"); + + sun_driver.add_fds = sun_add_fds; + sun_driver.check_fds = sun_check_fds; + + sun_driver.wave_out_open = sun_open; + sun_driver.wave_out_close = sun_close; + sun_driver.wave_out_format_supported = sun_format_supported; + sun_driver.wave_out_set_format = sun_set_format; + sun_driver.wave_out_volume = sun_volume; + + sun_driver.need_byteswap_on_be = 1; + sun_driver.need_resampling = 0; + if (options) { dsp_dev = xstrdup(options);