diff --git a/src/options.c b/src/options.c index 9214f08..6ed1764 100644 --- a/src/options.c +++ b/src/options.c @@ -41,7 +41,7 @@ static void usage(char *s) { struct list_head *head; struct sound_driver *sd; - char **hlp; + const char *const *hlp; printf("Usage: %s [options] [modules]\n", s); @@ -100,7 +100,7 @@ static void usage(char *s) " -v --verbose Verbose mode (incremental)\n"); } -static struct option lopt[] = { +static const struct option lopt[] = { { "amplify", 1, 0, 'a' }, { "bits", 1, 0, 'b' }, { "driver", 1, 0, 'd' }, diff --git a/src/sound.h b/src/sound.h index 1d6cdec..bcdc320 100644 --- a/src/sound.h +++ b/src/sound.h @@ -7,9 +7,9 @@ #include "list.h" struct sound_driver { - char *id; + const char *id; char *description; - char **help; + const char *const *help; int (*init)(struct options *); void (*deinit)(void); void (*play)(void *, int); diff --git a/src/sound_ahi.c b/src/sound_ahi.c index 33a7ffb..ebab17c 100644 --- a/src/sound_ahi.c +++ b/src/sound_ahi.c @@ -68,8 +68,7 @@ static void onresume() { } - -static char *help[] = { +static const char *const help[] = { "buffer=val", "Audio buffer size", NULL }; diff --git a/src/sound_aix.c b/src/sound_aix.c index 7cc6094..23f04f7 100644 --- a/src/sound_aix.c +++ b/src/sound_aix.c @@ -118,8 +118,7 @@ static void onresume() { } - -static char *help[] = { +static const char *const help[] = { "gain=val", "Audio output gain (0 to 255)", /* "buffer=val", "Audio buffer size (default is 32768)", */ NULL diff --git a/src/sound_alsa.c b/src/sound_alsa.c index 7981a50..5d5c0fa 100644 --- a/src/sound_alsa.c +++ b/src/sound_alsa.c @@ -109,8 +109,7 @@ static void onresume() { } - -static char *help[] = { +static const char *const help[] = { "buffer=num", "Set the ALSA buffer time in milliseconds", "period=num", "Set the ALSA period time in milliseconds", "card ", "Select sound card to use", diff --git a/src/sound_alsa05.c b/src/sound_alsa05.c index 2419593..cdcb2b5 100644 --- a/src/sound_alsa05.c +++ b/src/sound_alsa05.c @@ -194,8 +194,7 @@ static void flush() prepare_driver(); } - -static char *help[] = { +static const char *const help[] = { "frag=num,size", "Set the number and size (bytes) of fragments", "card ", "Select sound card to use", NULL diff --git a/src/sound_beos.c b/src/sound_beos.c index 6a37bcf..93e6124 100644 --- a/src/sound_beos.c +++ b/src/sound_beos.c @@ -37,8 +37,7 @@ static int chunk_size; static int chunk_num; /* static int packet_size; */ - -static char *help[] = { +static const char *const help[] = { "buffer=num,size", "set the number and size of buffer fragments", NULL }; diff --git a/src/sound_bsd.c b/src/sound_bsd.c index f877067..bc3e8cf 100644 --- a/src/sound_bsd.c +++ b/src/sound_bsd.c @@ -94,7 +94,7 @@ static void onresume() { } -static char *help[] = { +static const char *const help[] = { "gain=val", "Audio output gain (0 to 255)", "buffer=val", "Audio buffer size (default is 32768)", NULL diff --git a/src/sound_dart.c b/src/sound_dart.c index 0129980..1a49359 100644 --- a/src/sound_dart.c +++ b/src/sound_dart.c @@ -210,8 +210,7 @@ static void deinit() } } - -static char *help[] = { +static const char *const help[] = { "sharing={Y,N}", "Device Sharing (default is N)", "device=val", "OS/2 Audio Device (default is 0 auto-detect)", "buffer=val", "Audio buffer size (default is 16)", diff --git a/src/sound_file.c b/src/sound_file.c index ad1fa58..51c3d2f 100644 --- a/src/sound_file.c +++ b/src/sound_file.c @@ -90,7 +90,7 @@ static void onresume() { } -static char *help[] = { +static const char *const help[] = { "big-endian", "Force big-endian 16-bit samples", "little-endian", "Force little-endian 16-bit samples", NULL diff --git a/src/sound_hpux.c b/src/sound_hpux.c index 67e1763..5ebf352 100644 --- a/src/sound_hpux.c +++ b/src/sound_hpux.c @@ -19,7 +19,7 @@ static int audio_fd; /* Standard sampling rates */ -static int srate[] = { +static const int srate[] = { 44100, 32000, 22050, 16000, 11025, 8000, 0 }; @@ -139,8 +139,7 @@ static void onresume() { } - -static char *help[] = { +static const char *const help[] = { "gain=val", "Audio output gain (0 to 255)", "port={s|h|l}", "Audio port (s[peaker], h[eadphones], l[ineout])", "buffer=val", "Audio buffer size", diff --git a/src/sound_netbsd.c b/src/sound_netbsd.c index ec3c81e..770cb59 100644 --- a/src/sound_netbsd.c +++ b/src/sound_netbsd.c @@ -122,8 +122,7 @@ static void onresume() { } - -static char *help[] = { +static const char *const help[] = { "gain=val", "Audio output gain (0 to 255)", "buffer=val", "Audio buffer size (default is 32768)", NULL diff --git a/src/sound_oss.c b/src/sound_oss.c index 7f38153..e728042 100644 --- a/src/sound_oss.c +++ b/src/sound_oss.c @@ -109,7 +109,7 @@ static void setaudio(int *rate, int *format) static int init(struct options *options) { char **parm = options->driver_parm; - char *dev_audio[] = { "/dev/dsp", "/dev/sound/dsp" }; + static const char *dev_audio[] = { "/dev/dsp", "/dev/sound/dsp" }; audio_buf_info info; static char buf[80]; int i; @@ -192,7 +192,7 @@ static void onresume() #endif } -static char *help[] = { +static const char *const help[] = { "frag=num,size", "Set the number and size of fragments", "dev=", "Audio device to use (default /dev/dsp)", "nosync", "Don't flush OSS buffers between modules", diff --git a/src/sound_qnx.c b/src/sound_qnx.c index ede29a0..b6311ee 100644 --- a/src/sound_qnx.c +++ b/src/sound_qnx.c @@ -105,8 +105,7 @@ static void onresume() { } - -static char *help[] = { +static const char *const help[] = { "dev=", "Audio device name (default is /dev/dsp)", "buffer=val", "Audio buffer size (default is 32768)", NULL diff --git a/src/sound_sgi.c b/src/sound_sgi.c index cbe9063..cff8016 100644 --- a/src/sound_sgi.c +++ b/src/sound_sgi.c @@ -23,7 +23,7 @@ static int al_sample_16; * audio port sample rates (these are the only ones supported by the library) */ -static int srate[] = { +static const int srate[] = { 48000, 44100, 32000, @@ -167,8 +167,7 @@ static void onresume() { } - -static char *help[] = { +static const char *const help[] = { "buffer=val", "Audio buffer size", NULL }; diff --git a/src/sound_solaris.c b/src/sound_solaris.c index 6e5b8a1..d8254e7 100644 --- a/src/sound_solaris.c +++ b/src/sound_solaris.c @@ -170,8 +170,7 @@ static void onresume() { } - -static char *help[] = { +static const char *const help[] = { "gain=val", "Audio output gain (0 to 255)", "port={s|h|l}", "Audio port (s[peaker], h[eadphones], l[ineout])", "buffer=val", "Audio buffer size (default is 32768)", diff --git a/src/sound_win32.c b/src/sound_win32.c index 6f60e0a..4edc1f0 100644 --- a/src/sound_win32.c +++ b/src/sound_win32.c @@ -163,7 +163,7 @@ static void onresume() { } -static char *help[] = { +static const char *const help[] = { "buffers=val", "Number of buffers (default 10)", NULL };