commit 1c463eb40559cc28dbcc582616834caaa735b649
parent aab3e1e36c8ceeea1777d0114845a66280eb494c
Author: Louis Burda <quent.burda@gmail.com>
Date: Thu, 31 Mar 2022 20:33:33 +0200
Added missing prototypes
Diffstat:
6 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,5 +1,5 @@
CFLAGS = -I src -g $(shell pkg-config --cflags glib-2.0 dbus-1)
-CFLAGS += -I lib/liblist/include -Wunused-variable
+CFLAGS += -I lib/liblist/include -Wunused-variable -Wmissing-prototypes
LDLIBS = -lcurses -lmpdclient $(shell pkg-config --libs glib-2.0 dbus-1)
DEPFLAGS = -MT $@ -MMD -MP -MF build/$*.d
diff --git a/src/data.c b/src/data.c
@@ -569,7 +569,7 @@ track_rename(struct track *track, const char *name)
}
bool
-aquire_lock(const char *datadir)
+acquire_lock(const char *datadir)
{
char *lockpath, *procpath;
char linebuf[512];
@@ -643,7 +643,7 @@ data_load(void)
datadir = getenv("TMUS_DATA");
if (!datadir) ERROR("TMUS_DATA not set!\n");
- if (!aquire_lock(datadir))
+ if (!acquire_lock(datadir))
ERROR("Failed to acquire lock\n");
dir = opendir(datadir);
diff --git a/src/data.h b/src/data.h
@@ -25,6 +25,7 @@ struct track {
bool path_exists(const char *path);
bool make_dir(const char *path);
+bool move_dir(const char *dst, const char *src);
bool rm_dir(const char *path, bool recursive);
bool rm_file(const char *path);
bool copy_file(const char *dst, const char *src);
diff --git a/src/player.c b/src/player.c
@@ -3,6 +3,10 @@
#include "list.h"
#include "data.h"
+static bool player_history_contains(struct track *cmp, int depth);
+static struct track *playlist_track_next_unused(struct link *start);
+static struct track *player_next_from_playlist(void);
+
bool
player_history_contains(struct track *cmp, int depth)
{
diff --git a/src/player.h b/src/player.h
@@ -79,8 +79,5 @@ int player_stop(void);
int player_set_volume(unsigned int vol);
-bool player_history_contains(struct track *track, int depth);
-struct track *playlist_track_next_unused(struct link *link);
-
extern struct player player;
diff --git a/src/player_mpd.c b/src/player_mpd.c
@@ -39,6 +39,7 @@ struct mpd_player mpd;
static void player_clear_status(void);
static bool mpd_handle_status(int status);
+static char *mpd_loaded_track_name(struct mpd_song *song);
static void player_add_history(struct track *track);