pass constant pointers
And again, convert arguments to const.
This commit is contained in:
parent
d8a8fa63b4
commit
12bcba8b89
@ -419,7 +419,7 @@ void closeAudioDevice(void)
|
||||
audioOpened = 0;
|
||||
}
|
||||
|
||||
void sendMetadataToAudioDevice(MpdTag * tag)
|
||||
void sendMetadataToAudioDevice(const MpdTag * tag)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -55,7 +55,7 @@ int isAudioDeviceOpen(void);
|
||||
|
||||
int isCurrentAudioFormat(const AudioFormat * audioFormat);
|
||||
|
||||
void sendMetadataToAudioDevice(MpdTag * tag);
|
||||
void sendMetadataToAudioDevice(const MpdTag * tag);
|
||||
|
||||
/* these functions are called in the main parent process while the child
|
||||
process is busy playing to the audio */
|
||||
|
@ -244,7 +244,7 @@ void finishAudioOutput(AudioOutput * audioOutput)
|
||||
free(audioOutput->convBuffer);
|
||||
}
|
||||
|
||||
void sendMetadataToAudioOutput(AudioOutput * audioOutput, MpdTag * tag)
|
||||
void sendMetadataToAudioOutput(AudioOutput * audioOutput, const MpdTag * tag)
|
||||
{
|
||||
if (!audioOutput->sendMetdataFunc)
|
||||
return;
|
||||
|
@ -50,7 +50,7 @@ typedef void (*AudioOutputDropBufferedAudioFunc) (AudioOutput * audioOutput);
|
||||
typedef void (*AudioOutputCloseDeviceFunc) (AudioOutput * audioOutput);
|
||||
|
||||
typedef void (*AudioOutputSendMetadataFunc) (AudioOutput * audioOutput,
|
||||
MpdTag * tag);
|
||||
const MpdTag * tag);
|
||||
|
||||
struct _AudioOutput {
|
||||
int open;
|
||||
@ -104,7 +104,7 @@ void dropBufferedAudioOutput(AudioOutput * audioOutput);
|
||||
void closeAudioOutput(AudioOutput * audioOutput);
|
||||
void finishAudioOutput(AudioOutput * audioOutput);
|
||||
int keepAudioOutputAlive(AudioOutput * audioOutput, int ms);
|
||||
void sendMetadataToAudioOutput(AudioOutput * audioOutput, MpdTag * tag);
|
||||
void sendMetadataToAudioOutput(AudioOutput * audioOutput, const MpdTag * tag);
|
||||
|
||||
void printAllOutputPluginTypes(FILE * fp);
|
||||
|
||||
|
6
src/ls.c
6
src/ls.c
@ -42,10 +42,10 @@ int printRemoteUrlHandlers(int fd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int isValidRemoteUtf8Url(char *utf8url)
|
||||
int isValidRemoteUtf8Url(const char *utf8url)
|
||||
{
|
||||
int ret = 0;
|
||||
char *temp;
|
||||
const char *temp;
|
||||
|
||||
switch (isRemoteUrl(utf8url)) {
|
||||
case 1:
|
||||
@ -82,7 +82,7 @@ int isValidRemoteUtf8Url(char *utf8url)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int isRemoteUrl(char *url)
|
||||
int isRemoteUrl(const char *url)
|
||||
{
|
||||
int count = 0;
|
||||
const char **urlPrefixes = remoteUrlPrefixes;
|
||||
|
4
src/ls.h
4
src/ls.h
@ -25,9 +25,9 @@ int lsPlaylists(int fd, const char *utf8path);
|
||||
|
||||
const char *getSuffix(const char *utf8file);
|
||||
|
||||
int isValidRemoteUtf8Url(char *utf8url);
|
||||
int isValidRemoteUtf8Url(const char *utf8url);
|
||||
|
||||
int isRemoteUrl(char *url);
|
||||
int isRemoteUrl(const char *url);
|
||||
|
||||
int myStat(const char *utf8file, struct stat *st);
|
||||
|
||||
|
@ -106,7 +106,7 @@ void resetVisitedFlagsInTagTracker(int type)
|
||||
}
|
||||
}
|
||||
|
||||
void visitInTagTracker(int type, char *str)
|
||||
void visitInTagTracker(int type, const char *str)
|
||||
{
|
||||
TreeIterator iter;
|
||||
|
||||
|
@ -29,7 +29,7 @@ void printMemorySavedByTagTracker(void);
|
||||
|
||||
void resetVisitedFlagsInTagTracker(int type);
|
||||
|
||||
void visitInTagTracker(int type, char *str);
|
||||
void visitInTagTracker(int type, const char *str);
|
||||
|
||||
void printVisitedInTagTracker(int fd, int type);
|
||||
|
||||
|
@ -71,7 +71,7 @@ _ClearKeyData(TreeKeyData * keyData)
|
||||
|
||||
static
|
||||
int
|
||||
_FindPosition(Tree * tree, TreeNode * node, void * key, int * pos)
|
||||
_FindPosition(Tree * tree, TreeNode * node, const void * key, int * pos)
|
||||
{
|
||||
#ifdef USE_BINARY_SEARCH
|
||||
int low = 0;
|
||||
@ -113,7 +113,7 @@ _FindPosition(Tree * tree, TreeNode * node, void * key, int * pos)
|
||||
|
||||
static
|
||||
int
|
||||
_Find(TreeIterator * iter, void * key)
|
||||
_Find(TreeIterator * iter, const void * key)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
@ -680,7 +680,7 @@ RemoveFromTreeByIterator(Tree * tree, TreeIterator * iter)
|
||||
}
|
||||
|
||||
int
|
||||
FindInTree(Tree * tree, void * key, TreeIterator * iter)
|
||||
FindInTree(Tree * tree, const void * key, TreeIterator * iter)
|
||||
{
|
||||
TreeIterator i;
|
||||
|
||||
|
@ -57,6 +57,7 @@ int InsertInTree(Tree * tree, void * key, void * data);
|
||||
int RemoveFromTreeByKey(Tree * tree, void * key);
|
||||
void RemoveFromTreeByIterator(Tree * tree, TreeIterator * iter);
|
||||
|
||||
int FindInTree(Tree * tree, void * key, TreeIterator * iter /* can be NULL */);
|
||||
int FindInTree(Tree * tree, const void * key,
|
||||
TreeIterator * iter /* can be NULL */);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user