Skip to content

Commit 2d1a998

Browse files
committed
Make the pmode array const
1 parent 49936b3 commit 2d1a998

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct control {
7878
int mixer_type; /* Mixer type (from player) */
7979
};
8080

81-
extern struct player_mode pmode[];
81+
extern const struct player_mode pmode[];
8282

8383
void delay_ms(unsigned int);
8484
#ifdef XMP_AMIGA

src/info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void info_mod(const struct xmp_module_info *mi, int mode)
5252
report("Module type : %s", mi->mod->type);
5353

5454
if (mode != XMP_MODE_AUTO) {
55-
struct player_mode *pm;
55+
const struct player_mode *pm;
5656
for (pm = pmode; pm->name != NULL; pm++) {
5757
if (pm->mode == mode) {
5858
report(" [play as:%s]", pm->desc);

src/options.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ enum {
3131
OPT_NUMVOICES,
3232
};
3333

34-
struct player_mode pmode[] = {
34+
const struct player_mode pmode[] = {
3535
{ "auto", "Autodetect", XMP_MODE_AUTO },
3636
{ "mod", "Generic MOD player", XMP_MODE_MOD },
3737
{ "noisetracker", "Noisetracker", XMP_MODE_NOISETRACKER },
@@ -49,7 +49,7 @@ struct player_mode pmode[] = {
4949
static void usage(char *s, struct options *options)
5050
{
5151
const struct sound_driver *sd;
52-
struct player_mode *pm;
52+
const struct player_mode *pm;
5353
const char *const *hlp;
5454
int i;
5555

@@ -175,7 +175,7 @@ static char *token;
175175

176176
void get_options(int argc, char **argv, struct options *options)
177177
{
178-
struct player_mode *pm;
178+
const struct player_mode *pm;
179179
int optidx = 0;
180180
int o;
181181
char const* driver_guess = NULL;

src/read_config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static void parse_modconf(struct options *o, const char *confname, const unsigne
203203
{
204204
FILE *rc;
205205
char *hash, *var, *val, line[256];
206-
struct player_mode *pm;
206+
const struct player_mode *pm;
207207
int active = 0;
208208
int mono = 0;
209209

0 commit comments

Comments
 (0)