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
This commit is contained in:
Michael Gernoth 2006-12-24 13:53:23 +00:00
parent 84a393eebb
commit 2086e83814
5 changed files with 85 additions and 85 deletions

View File

@ -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 * struct audio_driver *
alsa_register(char *options) 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) if (options)
{ {
pcm_name = xstrdup(options); pcm_name = xstrdup(options);

View File

@ -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 * struct audio_driver *
libao_register(char *options) 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) if (options)
{ {
libao_device = xstrdup(options); libao_device = xstrdup(options);

View File

@ -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 * struct audio_driver *
oss_register(char *options) 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) if (options)
{ {
dsp_dev = xstrdup(options); dsp_dev = xstrdup(options);

View File

@ -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 * struct audio_driver *
sgi_register(char *options) 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) if (options)
{ {
sgi_output_device = xstrdup(options); sgi_output_device = xstrdup(options);

View File

@ -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 * struct audio_driver *
sun_register(char *options) 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) if (options)
{ {
dsp_dev = xstrdup(options); dsp_dev = xstrdup(options);