From d320986038e35262a657abd46cc608a709fb0961 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Sat, 3 Apr 2010 21:35:35 +0200 Subject: [PATCH] screen_lyrics.c: Add function delete_lyr_hd --- src/screen_lyrics.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index 6cb7b46..173fc5a 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -138,6 +138,21 @@ store_lyr_hd(void) return 0; } +static int +delete_lyr_hd(void) +{ + char path[1024]; + + if (!exists_lyr_file(current.artist, current.title)) + return -1; + + path_lyr_file(path, 1024, current.artist, current.title); + if (unlink(path) != 0) + return -2; + + return 0; +} + static void screen_lyrics_set(const GString *str) { -- 2.30.2