summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a56ea3f)
raw | patch | inline | side by side (parent: a56ea3f)
author | Andreas Obergrusberger <tradiaz@yahoo.de> | |
Wed, 3 Jan 2007 21:07:39 +0000 (21:07 +0000) | ||
committer | Andreas Obergrusberger <tradiaz@yahoo.de> | |
Wed, 3 Jan 2007 21:07:39 +0000 (21:07 +0000) |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5219 09075e82-0dd4-0310-85a5-a0d7c8717e4f
plugins/hd/lyrics_hd.c | patch | blob | history | |
src/lyrics_hd.c | patch | blob | history |
diff --git a/plugins/hd/lyrics_hd.c b/plugins/hd/lyrics_hd.c
index a90ee9d4772101d59de61c9f7f4ae678895be8cc..7a3a8b7452028172f69aa57dd2347e93fd2320cb 100644 (file)
--- a/plugins/hd/lyrics_hd.c
+++ b/plugins/hd/lyrics_hd.c
char *check_lyr_hd(char *artist, char *title, int how)
{ //checking whether for lyrics file existence and proper access
- static char path[1024];
- snprintf(path, 1024, "%s/.lyrics/%s/%s.lyric",
- getenv("HOME"), artist, title);
+ result |= 2;
+ static char path[1024];
+ snprintf(path, 1024, "%s/.lyrics/%s/%s.lyric",
+ getenv("HOME"), artist, title);
- if(g_access(path, how) != 0) return NULL;
-
- return path;
+ if(g_access(path, how) != 0) return NULL;
+ return path;
}
FILE *lyr_file;
lyr_file = fopen(path, "r");
if(lyr_file == NULL) return -1;
-
+ result |= 4;
char *buf = NULL;
char **line = &buf;
size_t n = 0;
diff --git a/src/lyrics_hd.c b/src/lyrics_hd.c
index 2d91adc2a90f162b9bf474dbcda8fb26ff47a892..322160c98d465c2770396beb0588a4c9730993f6 100644 (file)
--- a/src/lyrics_hd.c
+++ b/src/lyrics_hd.c
char *check_lyr_hd(char *artist, char *title, int how)
{ //checking whether for lyrics file existence and proper access
- static char path[1024];
- snprintf(path, 1024, "%s/.lyrics/%s/%s.lyric",
- getenv("HOME"), artist, title);
+ result |= 2;
+ static char path[1024];
+ snprintf(path, 1024, "%s/.lyrics/%s/%s.lyric",
+ getenv("HOME"), artist, title);
- if(g_access(path, how) != 0) return NULL;
-
- return path;
+ if(g_access(path, how) != 0) return NULL;
+ return path;
}
FILE *lyr_file;
lyr_file = fopen(path, "r");
if(lyr_file == NULL) return -1;
-
+ result |= 4;
char *buf = NULL;
char **line = &buf;
size_t n = 0;