summaryrefslogtreecommitdiff
path: root/libpiano/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-08-04 15:24:23 +0200
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-08-04 15:24:23 +0200
commit3d7998a44299c69e7d721c4c5a20ddc32cec562b (patch)
tree1cfae4f8e9e95a5ceaab8cbea96fef2afd9b62bf /libpiano/src
parent98071f0c542a89379c21ba69ea14a5c3f4b88b61 (diff)
downloadpianobar-3d7998a44299c69e7d721c4c5a20ddc32cec562b.tar.gz
pianobar-3d7998a44299c69e7d721c4c5a20ddc32cec562b.tar.bz2
pianobar-3d7998a44299c69e7d721c4c5a20ddc32cec562b.zip
Use "static" keyword for functions
Diffstat (limited to 'libpiano/src')
-rw-r--r--libpiano/src/main.c4
-rw-r--r--libpiano/src/xml.c29
2 files changed, 17 insertions, 16 deletions
diff --git a/libpiano/src/main.c b/libpiano/src/main.c
index 29ef542..01e055b 100644
--- a/libpiano/src/main.c
+++ b/libpiano/src/main.c
@@ -42,7 +42,7 @@ THE SOFTWARE.
#define PIANO_RECV_BUFFER 100*1024
/* prototypes */
-PianoReturn_t PianoAddFeedback (PianoHandle_t *, const char *, const char *,
+static PianoReturn_t PianoAddFeedback (PianoHandle_t *, const char *, const char *,
const char *, const char *, const char *, PianoSongRating_t);
const char *PianoAudioFormatToString (PianoAudioFormat_t);
@@ -335,7 +335,7 @@ PianoReturn_t PianoMoveSong (PianoHandle_t *ph,
* @param song focus trait id or NULL
* @param rating
*/
-PianoReturn_t PianoAddFeedback (PianoHandle_t *ph, const char *stationId,
+static PianoReturn_t PianoAddFeedback (PianoHandle_t *ph, const char *stationId,
const char *songMusicId, const char *songMatchingSeed,
const char *songUserSeed, const char *songFocusTraitId,
PianoSongRating_t rating) {
diff --git a/libpiano/src/xml.c b/libpiano/src/xml.c
index b9b9a96..463caa7 100644
--- a/libpiano/src/xml.c
+++ b/libpiano/src/xml.c
@@ -31,9 +31,9 @@ THE SOFTWARE.
#include "config.h"
#include "main.h"
-void PianoXmlStructParser (const ezxml_t structRoot,
- void (*callback) (const char *, const ezxml_t, void *), void *data);
-char *PianoXmlGetNodeText (const ezxml_t node);
+static void PianoXmlStructParser (const ezxml_t,
+ void (*callback) (const char *, const ezxml_t, void *), void *);
+static char *PianoXmlGetNodeText (const ezxml_t);
/* parse fault and get fault type
* @param xml <name> content
@@ -41,7 +41,8 @@ char *PianoXmlGetNodeText (const ezxml_t node);
* @param return error string
* @return nothing
*/
-void PianoXmlIsFaultCb (const char *key, const ezxml_t value, void *data) {
+static void PianoXmlIsFaultCb (const char *key, const ezxml_t value,
+ void *data) {
PianoReturn_t *ret = data;
char *valueStr = PianoXmlGetNodeText (value);
char *matchStart, *matchEnd, *matchStr;
@@ -101,7 +102,7 @@ void PianoXmlIsFaultCb (const char *key, const ezxml_t value, void *data) {
* @param document root of xml doc
* @return _RET_OK or fault code (_RET_*)
*/
-PianoReturn_t PianoXmlIsFault (ezxml_t xmlDoc) {
+static PianoReturn_t PianoXmlIsFault (ezxml_t xmlDoc) {
PianoReturn_t ret;
if ((xmlDoc = ezxml_child (xmlDoc, "fault")) != NULL) {
@@ -128,7 +129,7 @@ PianoReturn_t PianoXmlIsFault (ezxml_t xmlDoc) {
* freed soon
* @param extra data for callback
*/
-void PianoXmlStructParser (const ezxml_t structRoot,
+static void PianoXmlStructParser (const ezxml_t structRoot,
void (*callback) (const char *, const ezxml_t, void *), void *data) {
ezxml_t curNode, keyNode, valueNode;
char *key;
@@ -158,7 +159,7 @@ void PianoXmlStructParser (const ezxml_t structRoot,
* @param returns document root
* @return _OK or error
*/
-PianoReturn_t PianoXmlInitDoc (char *xmlStr, ezxml_t *xmlDoc) {
+static PianoReturn_t PianoXmlInitDoc (char *xmlStr, ezxml_t *xmlDoc) {
PianoReturn_t ret;
if ((*xmlDoc = ezxml_parse_str (xmlStr, strlen (xmlStr))) == NULL) {
@@ -177,7 +178,7 @@ PianoReturn_t PianoXmlInitDoc (char *xmlStr, ezxml_t *xmlDoc) {
* or <int> subnodes, just ignore them
* @param xml node <value>
*/
-char *PianoXmlGetNodeText (const ezxml_t node) {
+static char *PianoXmlGetNodeText (const ezxml_t node) {
char *retTxt = NULL;
retTxt = ezxml_txt (node);
@@ -194,7 +195,7 @@ char *PianoXmlGetNodeText (const ezxml_t node) {
* @param pointer to userinfo structure
* @return nothing
*/
-void PianoXmlParseUserinfoCb (const char *key, const ezxml_t value,
+static void PianoXmlParseUserinfoCb (const char *key, const ezxml_t value,
void *data) {
PianoUserInfo_t *user = data;
char *valueStr = PianoXmlGetNodeText (value);
@@ -208,7 +209,7 @@ void PianoXmlParseUserinfoCb (const char *key, const ezxml_t value,
}
}
-void PianoXmlParseStationsCb (const char *key, const ezxml_t value,
+static void PianoXmlParseStationsCb (const char *key, const ezxml_t value,
void *data) {
PianoStation_t *station = data;
char *valueStr = PianoXmlGetNodeText (value);
@@ -224,7 +225,7 @@ void PianoXmlParseStationsCb (const char *key, const ezxml_t value,
}
}
-void PianoXmlParsePlaylistCb (const char *key, const ezxml_t value,
+static void PianoXmlParsePlaylistCb (const char *key, const ezxml_t value,
void *data) {
PianoSong_t *song = data;
char *valueStr = PianoXmlGetNodeText (value);
@@ -302,7 +303,7 @@ PianoReturn_t PianoXmlParseUserinfo (PianoHandle_t *ph, char *xml) {
return PIANO_RET_OK;
}
-void PianoXmlParseQuickMixStationsCb (const char *key, const ezxml_t value,
+static void PianoXmlParseQuickMixStationsCb (const char *key, const ezxml_t value,
void *data) {
char ***retIds = data;
char **ids = NULL;
@@ -513,7 +514,7 @@ PianoReturn_t PianoXmlParseSimple (char *xml) {
/* xml struct parser callback, used in PianoXmlParseSearchCb
*/
-void PianoXmlParseSearchArtistCb (const char *key, const ezxml_t value,
+static void PianoXmlParseSearchArtistCb (const char *key, const ezxml_t value,
void *data) {
PianoArtist_t *artist = data;
char *valueStr = PianoXmlGetNodeText (value);
@@ -528,7 +529,7 @@ void PianoXmlParseSearchArtistCb (const char *key, const ezxml_t value,
/* callback for xml struct parser used in PianoXmlParseSearch, "switch" for
* PianoXmlParseSearchArtistCb and PianoXmlParsePlaylistCb
*/
-void PianoXmlParseSearchCb (const char *key, const ezxml_t value,
+static void PianoXmlParseSearchCb (const char *key, const ezxml_t value,
void *data) {
PianoSearchResult_t *searchResult = data;
ezxml_t curNode;