Replace obsolete GCC initializers in alsa-lib [1/3]
PATCH 1/1 Replace obsolete GCC initializers in alsa-lib [1/3]
Hi.
This is the first of three patches.
Index: alsa-lib/aserver/aserver.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/aserver/aserver.c,v retrieving revision 1.56
aserver/aserver.c +6 -6
@@ -518,9 +518,9 @@ }transport_ops_t pcm_shm_ops = { - open: pcm_shm_open, - cmd: pcm_shm_cmd, - close: pcm_shm_close, + .open = pcm_shm_open, + .cmd = pcm_shm_cmd, + .close = pcm_shm_close, };static int ctl_handler (waiter_t *waiter,unsigned short events)
@@ -712,9 +712,9 @@ }transport_ops_t ctl_shm_ops = { - open: ctl_shm_open, - cmd: ctl_shm_cmd, - close: ctl_shm_close, + .open = ctl_shm_open, + .cmd = ctl_shm_cmd, + .close = ctl_shm_close, };static int snd_client_open (client_t *client)
Index: alsa-lib/src/input.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/input.c,v
retrieving revision 1.17
src/input.c +10 -10
@@ -158,11 +158,11 @@ }static snd_input_ops_t snd_input_stdio_ops = { - close: snd_input_stdio_close, - scan: snd_input_stdio_scan, - gets: snd_input_stdio_gets, - getch: snd_input_stdio_getc, - ungetch: snd_input_stdio_ungetc, + .close = snd_input_stdio_close, + .scan = snd_input_stdio_scan, + .gets = snd_input_stdio_gets, + .getch = snd_input_stdio_getc, + .ungetch = snd_input_stdio_ungetc, };#endif
@@ -284,11 +284,11 @@ }static snd_input_ops_t snd_input_buffer_ops = { - close: snd_input_buffer_close, - scan: snd_input_buffer_scan, - gets: snd_input_buffer_gets, - getch: snd_input_buffer_getc, - ungetch: snd_input_buffer_ungetc, + .close = snd_input_buffer_close, + .scan = snd_input_buffer_scan, + .gets = snd_input_buffer_gets, + .getch = snd_input_buffer_getc, + .ungetch = snd_input_buffer_ungetc, };#endif
Index: alsa-lib/src/output.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/output.c,v
retrieving revision 1.18
src/output.c +10 -10
@@ -166,11 +166,11 @@ }static snd_output_ops_t snd_output_stdio_ops = { - close: snd_output_stdio_close, - print: snd_output_stdio_print, - puts: snd_output_stdio_puts, - putch: snd_output_stdio_putc, - flush: snd_output_stdio_flush, + .close = snd_output_stdio_close, + .print = snd_output_stdio_print, + .puts = snd_output_stdio_puts, + .putch = snd_output_stdio_putc, + .flush = snd_output_stdio_flush, };#endif
@@ -318,11 +318,11 @@ }static snd_output_ops_t snd_output_buffer_ops = { - close: snd_output_buffer_close, - print: snd_output_buffer_print, - puts: snd_output_buffer_puts, - putch: snd_output_buffer_putc, - flush: snd_output_buffer_flush, + .close = snd_output_buffer_close, + .print = snd_output_buffer_print, + .puts = snd_output_buffer_puts, + .putch = snd_output_buffer_putc, + .flush = snd_output_buffer_flush, };#endif
Index: alsa-lib/src/control/control_hw.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/control/control_hw.c,v retrieving revision 1.37
src/control/control_hw.c +22 -22
50 lines not on this page · raw message
Index: alsa-lib/src/control/control_shm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/control/control_shm.c,v retrieving revision 1.36
src/control/control_shm.c +22 -22
50 lines not on this page · raw message
Index: alsa-lib/src/hwdep/hwdep_hw.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/hwdep/hwdep_hw.c,v retrieving revision 1.9
src/hwdep/hwdep_hw.c +6 -6
@@ -95,12 +95,12 @@ }static snd_hwdep_ops_t snd_hwdep_hw_ops = { - close: snd_hwdep_hw_close, - nonblock: snd_hwdep_hw_nonblock, - info: snd_hwdep_hw_info, - ioctl: snd_hwdep_hw_ioctl, - write: snd_hwdep_hw_write, - read: snd_hwdep_hw_read, + .close = snd_hwdep_hw_close, + .nonblock = snd_hwdep_hw_nonblock, + .info = snd_hwdep_hw_info, + .ioctl = snd_hwdep_hw_ioctl, + .write = snd_hwdep_hw_write, + .read = snd_hwdep_hw_read, };int snd_hwdep_hw_open (snd_hwdep_t **handle,const char *name,int card,int device,int mode)
Index: alsa-lib/src/pcm/pcm_adpcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_adpcm.c,v retrieving revision 1.58
src/pcm/pcm_adpcm.c +13 -13
@@ -517,19 +517,19 @@ }static snd_pcm_ops_t snd_pcm_adpcm_ops = { - close: snd_pcm_plugin_close, - info: snd_pcm_plugin_info, - hw_refine: snd_pcm_adpcm_hw_refine, - hw_params: snd_pcm_adpcm_hw_params, - hw_free: snd_pcm_adpcm_hw_free, - sw_params: snd_pcm_plugin_sw_params, - channel_info: snd_pcm_plugin_channel_info, - dump: snd_pcm_adpcm_dump, - nonblock: snd_pcm_plugin_nonblock, - async: snd_pcm_plugin_async, - poll_revents: snd_pcm_plugin_poll_revents, - mmap: snd_pcm_plugin_mmap, - munmap: snd_pcm_plugin_munmap, + .close = snd_pcm_plugin_close, + .info = snd_pcm_plugin_info, + .hw_refine = snd_pcm_adpcm_hw_refine, + .hw_params = snd_pcm_adpcm_hw_params, + .hw_free = snd_pcm_adpcm_hw_free, + .sw_params = snd_pcm_plugin_sw_params, + .channel_info = snd_pcm_plugin_channel_info, + .dump = snd_pcm_adpcm_dump, + .nonblock = snd_pcm_plugin_nonblock, + .async = snd_pcm_plugin_async, + .poll_revents = snd_pcm_plugin_poll_revents, + .mmap = snd_pcm_plugin_mmap, + .munmap = snd_pcm_plugin_munmap, };/**
Index: alsa-lib/src/pcm/pcm_alaw.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_alaw.c,v retrieving revision 1.56
src/pcm/pcm_alaw.c +12 -13
@@ -390,19 +390,18 @@ }static snd_pcm_ops_t snd_pcm_alaw_ops = { - close: snd_pcm_plugin_close, - info: snd_pcm_plugin_info, - hw_refine: snd_pcm_alaw_hw_refine, - hw_params: snd_pcm_alaw_hw_params, - hw_free: snd_pcm_plugin_hw_free, - sw_params: snd_pcm_plugin_sw_params, - channel_info: snd_pcm_plugin_channel_info, - dump: snd_pcm_alaw_dump, - nonblock: snd_pcm_plugin_nonblock, - async: snd_pcm_plugin_async, - poll_revents: snd_pcm_plugin_poll_revents, - mmap: snd_pcm_plugin_mmap, - munmap: snd_pcm_plugin_munmap, + .close = snd_pcm_plugin_close, + .info = snd_pcm_plugin_info, + .hw_refine = snd_pcm_alaw_hw_refine, + .hw_params = snd_pcm_alaw_hw_params, + .hw_free = snd_pcm_plugin_hw_free, + .sw_params = snd_pcm_plugin_sw_params, + .channel_info = snd_pcm_plugin_channel_info, + .dump = snd_pcm_alaw_dump, + .nonblock = snd_pcm_plugin_nonblock, + .async = snd_pcm_plugin_async, + .mmap = snd_pcm_plugin_mmap, + .munmap = snd_pcm_plugin_munmap, };/**
Index: alsa-lib/src/pcm/pcm_copy.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_copy.c,v retrieving revision 1.36
src/pcm/pcm_copy.c +12 -13
@@ -153,19 +153,18 @@ }static snd_pcm_ops_t snd_pcm_copy_ops = { - close: snd_pcm_plugin_close, - info: snd_pcm_plugin_info, - hw_refine: snd_pcm_copy_hw_refine, - hw_params: snd_pcm_copy_hw_params, - hw_free: snd_pcm_plugin_hw_free, - sw_params: snd_pcm_plugin_sw_params, - channel_info: snd_pcm_plugin_channel_info, - dump: snd_pcm_copy_dump, - nonblock: snd_pcm_plugin_nonblock, - async: snd_pcm_plugin_async, - poll_revents: snd_pcm_plugin_poll_revents, - mmap: snd_pcm_plugin_mmap, - munmap: snd_pcm_plugin_munmap, + .close = snd_pcm_plugin_close, + .info = snd_pcm_plugin_info, + .hw_refine = snd_pcm_copy_hw_refine, + .hw_params = snd_pcm_copy_hw_params, + .hw_free = snd_pcm_plugin_hw_free, + .sw_params = snd_pcm_plugin_sw_params, + .channel_info = snd_pcm_plugin_channel_info, + .dump = snd_pcm_copy_dump, + .nonblock = snd_pcm_plugin_nonblock, + .async = snd_pcm_plugin_async, + .mmap = snd_pcm_plugin_mmap, + .munmap = snd_pcm_plugin_munmap, };/**
Index: alsa-lib/src/pcm/pcm_dmix.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_dmix.c,v retrieving revision 1.38
src/pcm/pcm_dmix.c +32 -32
73 lines not on this page · raw message
Index: alsa-lib/src/pcm/pcm_dshare.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_dshare.c,v retrieving revision 1.5
src/pcm/pcm_dshare.c +32 -32
73 lines not on this page · raw message
Index: alsa-lib/src/pcm/pcm_dsnoop.c
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_dsnoop.c,v retrieving revision 1.5
src/pcm/pcm_dsnoop.c +32 -32
73 lines not on this page · raw message
Signature · 11 lines
Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
At Thu, 17 Jul 2003 07:45:34 -0500,
Quoted 4 lines · Art Haas
Hi.
This is the first of three patches.
thanks!
however, the patch looks not complete.
i noticed that forward is missing in some places.
did you convert them manually?
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
Quoted 5 lines · Takashi Iwai
At Thu, 17 Jul 2003 07:45:34 -0500,
Quoted 3 lines · Art Haas
Hi.
Quoted 9 lines
Quoted 1 line
This is the first of three patches.
thanks!
however, the patch looks not complete.
i noticed that forward is missing in some places.did you convert them manually?
When I created many of these patches several months ago I used a perl script. Then when I got 0.9.5 installed I fixed the files manually.
What I'd done when making the patches was:
$ cvs -z3 diff -u alsa_lib > alsa_lib.diff
I copied the "alsa_lib.diff" file into three separate files and then manually removed some patches that were of other stuff (i.e. libtool version string problems when libtool is version 1.5a. The prescence of the "a" makes problems, but a simple sed command fixes it).
I find these old initializers with my patched GCC compiler. You can spot them if you compile with '-pedantic', but then a bazillion warnings also appear. I patched GCC to warn about the old syntax without needing a command line option.
If you apply the patches I'll update my CVS copy and fix the bits I've missed.
Thanks.
Art Haas
Signature · 11 lines
Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
At Thu, 17 Jul 2003 12:19:43 -0500,
Quoted 11 lines · Art Haas
Quoted 9 lines · Takashi Iwai
At Thu, 17 Jul 2003 07:45:34 -0500,
Quoted 4 lines · Art Haas
Hi.
This is the first of three patches.
thanks!
Quoted 8 lines
Quoted 5 lines
however, the patch looks not complete.
i noticed that forward is missing in some places.did you convert them manually?
When I created many of these patches several months ago I used a perl script. Then when I got 0.9.5 installed I fixed the files manually.
do you still have the script?
i don't want to take a risk to get the current code broken only for the (incomplete) translations. regenerating via the script would be safer in this case, IMO.
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0