From d957ea1df219223d365c61c18df296391f1e314f Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Mon, 21 Jan 2008 09:12:41 +0100 Subject: [PATCH] Use const in ss_output.c where possible. --- ahxm.h | 6 +++--- ss_output.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ahxm.h b/ahxm.h index b644c90..d4751ea 100644 --- a/ahxm.h +++ b/ahxm.h @@ -232,7 +232,7 @@ extern int ss_page_size; extern sample_t ss_master_volume; extern int ss_output_clipped; extern sample_t ss_optimal_volume; -extern char * ss_cue_file_name; +extern const char * ss_cue_file_name; /* in song.c */ @@ -302,11 +302,11 @@ int ss_ins_frame(struct ss_ins * i, sample_t frame[]); /* in ss_output.c */ -int ss_output_open(char * drvname, char * filename); +int ss_output_open(const char * drvname, const char * filename); void ss_output_init_frame(sample_t frame[]); int ss_output_write(sample_t frame[]); void ss_output_close(void); -int cue_file_song_info(int frame, char * author, char * name); +int cue_file_song_info(int frame, const char * author, const char * name); /* in ss_input.c */ diff --git a/ss_output.c b/ss_output.c index 25285f3..ce4b619 100644 --- a/ss_output.c +++ b/ss_output.c @@ -69,17 +69,17 @@ static void *outdev; */ /* a copy of the output file name */ -static char *ss_output_file_name = NULL; +static const char *ss_output_file_name = NULL; /* cue file name and track */ -char *ss_cue_file_name = NULL; +const char *ss_cue_file_name = NULL; static int ss_cue_file_track = -1; /******************* Code ********************/ -void *ss_outdev_open(char *drvname, char *file, int freq, int n_channels); +void *ss_outdev_open(const char *drvname, char *file, int freq, int n_channels); void ss_outdev_write(void *drv, short int *frame); void *ss_outdev_close(void *drv); @@ -113,7 +113,7 @@ static void close_on_signal(int sig_num) * Returns zero if the output device was correctly open, or * nonzero otherwise. */ -int ss_output_open(char *drvname, char *filename) +int ss_output_open(const char *drvname, const char *filename) { if (strcmp(drvname, "default") == 0) drvname = NULL; @@ -236,7 +236,7 @@ static int cue_file_init(void) } -int cue_file_song_info(int frame, char *author, char *name) +int cue_file_song_info(int frame, const char *author, const char *name) { int s; FILE *f; -- 2.11.4.GIT