diff options
| author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-07-23 15:47:28 +0200 | 
|---|---|---|
| committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-07-23 15:47:28 +0200 | 
| commit | 5afcd41752602f8c76faab8042a46e6b8c66bbb6 (patch) | |
| tree | 39870e8e903490896b3f617e28b321ac78b4c83a /src/main.c | |
| parent | 95df994be69a49a6e40a105fa349a553dd03a766 (diff) | |
| download | pianobar-5afcd41752602f8c76faab8042a46e6b8c66bbb6.tar.gz pianobar-5afcd41752602f8c76faab8042a46e6b8c66bbb6.tar.bz2 pianobar-5afcd41752602f8c76faab8042a46e6b8c66bbb6.zip | |
Be correct, use "const"
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 22 | 
1 files changed, 12 insertions, 10 deletions
| @@ -40,13 +40,19 @@ THE SOFTWARE.  #include "config.h"  #include "player.h" -inline void BarUiMsg (char *msg); +/*	output message and flush stdout + *	@param message + */ +inline void BarUiMsg (const char *msg) { +	printf ("%s", msg); +	fflush (stdout); +}  /*	check whether complete string is numeric   *	@param the string   *	@return 1 = yes, 0 = not numeric   */ -char BarIsNumericStr (char *str) { +char BarIsNumericStr (const char *str) {  	while (*str != '\0') {  		if (isdigit (*str) == 0) {  			return 0; @@ -61,7 +67,7 @@ char BarIsNumericStr (char *str) {   *	@param returns integer   *	@return 1 = success, 0 = failure (not an integer, ...)   */ -char BarReadlineInt (char *prompt, int *retVal) { +char BarReadlineInt (const char *prompt, int *retVal) {  	char *buf;  	char ret = 0; @@ -80,7 +86,8 @@ char BarReadlineInt (char *prompt, int *retVal) {   *	@param piano handle   *	@return pointer to selected station or NULL   */ -PianoStation_t *BarUiSelectStation (PianoHandle_t *ph, char *prompt) { +PianoStation_t *BarUiSelectStation (PianoHandle_t *ph, +		const char *prompt) {  	PianoStation_t *curStation = NULL;  	int i = 0; @@ -156,7 +163,7 @@ PianoArtist_t *BarUiSelectArtist (PianoArtist_t *startArtist) {   *	@param piano handle   *	@return musicId or NULL on abort/error   */ -char *BarUiSelectMusicId (PianoHandle_t *ph) { +char *BarUiSelectMusicId (const PianoHandle_t *ph) {  	char *musicId = NULL, *lineBuf;  	char yesnoBuf;  	PianoSearchResult_t searchResult; @@ -221,11 +228,6 @@ inline float BarSamplesToSeconds (float samplerate, float channels,  	return channels * 1000.0 * samples / samplerate;  } -inline void BarUiMsg (char *msg) { -	printf ("%s", msg); -	fflush (stdout); -} -  /*	browse genre stations and create shared station   *	@param piano handle   */ | 
