xmp: const annotations

Mark prominent arrays as const.
master
Jan Engelhardt 13 years ago
parent 865ecaf732
commit 665ae482a5
  1. 4
      src/options.c
  2. 4
      src/sound.h
  3. 3
      src/sound_ahi.c
  4. 3
      src/sound_aix.c
  5. 3
      src/sound_alsa.c
  6. 3
      src/sound_alsa05.c
  7. 3
      src/sound_beos.c
  8. 2
      src/sound_bsd.c
  9. 3
      src/sound_dart.c
  10. 2
      src/sound_file.c
  11. 5
      src/sound_hpux.c
  12. 3
      src/sound_netbsd.c
  13. 4
      src/sound_oss.c
  14. 3
      src/sound_qnx.c
  15. 5
      src/sound_sgi.c
  16. 3
      src/sound_solaris.c
  17. 2
      src/sound_win32.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' },

@ -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);

@ -68,8 +68,7 @@ static void onresume()
{
}
static char *help[] = {
static const char *const help[] = {
"buffer=val", "Audio buffer size",
NULL
};

@ -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

@ -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 <name>", "Select sound card to use",

@ -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 <name>", "Select sound card to use",
NULL

@ -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
};

@ -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

@ -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)",

@ -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

@ -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",

@ -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

@ -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=<device_name>", "Audio device to use (default /dev/dsp)",
"nosync", "Don't flush OSS buffers between modules",

@ -105,8 +105,7 @@ static void onresume()
{
}
static char *help[] = {
static const char *const help[] = {
"dev=<device_name>", "Audio device name (default is /dev/dsp)",
"buffer=val", "Audio buffer size (default is 32768)",
NULL

@ -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
};

@ -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)",

@ -163,7 +163,7 @@ static void onresume()
{
}
static char *help[] = {
static const char *const help[] = {
"buffers=val", "Number of buffers (default 10)",
NULL
};

Loading…
Cancel
Save