diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 4417d138596a9dad125e3b56c9fb8c6c89b80ae7..8943d4f22b75ebeed18561c782ffc8f566349987 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
*
*/
-#define _GNU_SOURCE
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <ncurses.h>
-#include <expat.h>
-#include <unistd.h>
-#include <glib/gstdio.h>
-#include <stdio.h>
-
#include "config.h"
#ifndef DISABLE_LYRICS_SCREEN
#include <sys/stat.h>
#include "strfsong.h"
#include "src_lyrics.h"
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include <ncurses.h>
+#include <expat.h>
+#include <unistd.h>
+#include <glib/gstdio.h>
+#include <stdio.h>
+
int src_selection;
static void lyrics_paint(screen_t *screen, mpdclient_t *c);
-FILE *create_lyr_file(char *artist, char *title)
+static FILE *create_lyr_file(char *artist, char *title)
{
char path[1024];
}
-int store_lyr_hd()
+static int store_lyr_hd(void)
{
char artist[512];
char title[512];
}
-void check_repaint()
+static void check_repaint(void)
{
if(screen_get_id("lyrics") == get_cur_mode_id())lyrics_paint(NULL, NULL);
}
-gpointer get_lyr(void *c)
+static gpointer get_lyr(void *c)
{
mpd_Status *status = ((retrieval_spec*)c)->client->status;
mpd_Song *cur = ((retrieval_spec*)c)->client->song;
}
static const char *
-list_callback(int index, int *highlight, void *data)
+list_callback(int idx, int *highlight, void *data)
{
static char buf[512];
//i think i'ts fine to write it into the 1st line...
- if ((index == lyr_text.lines->len && lyr_text.lines->len > 4) ||
+ if ((idx == lyr_text.lines->len && lyr_text.lines->len > 4) ||
((lyr_text.lines->len == 0 || lyr_text.lines->len == 4) &&
- index == 0)) {
+ idx == 0)) {
*highlight=3;
src_lyr* selected = g_array_index(src_lyr_stack, src_lyr*, src_selection);
if (selected != NULL)
return "";
}
- if (index < 2 && lyr_text.lines->len > 4)
+ if (idx < 2 && lyr_text.lines->len > 4)
*highlight=3;
- else if(index >= lyr_text.lines->len ||
- (index < 4 && index != 0 && lyr_text.lines->len < 5)) {
+ else if(idx >= lyr_text.lines->len ||
+ (idx < 4 && idx != 0 && lyr_text.lines->len < 5)) {
return "";
}
- get_text_line(&lyr_text, index, buf, 512);
+ get_text_line(&lyr_text, idx, buf, 512);
return buf;
}