aboutsummaryrefslogtreecommitdiffstats
path: root/src/strfsong.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-03 12:57:30 +0200
committerMax Kellermann <max@duempel.org>2008-10-03 12:57:30 +0200
commitf81333daa0bb652a5c1296941057eef82a12e12f (patch)
treeb616f9bfc73941e0c570cbebab9949ae5b483621 /src/strfsong.c
parent547b0c5f28be1e830c00ac167806ffba641855c6 (diff)
downloadmpd-f81333daa0bb652a5c1296941057eef82a12e12f.tar.gz
mpd-f81333daa0bb652a5c1296941057eef82a12e12f.tar.xz
mpd-f81333daa0bb652a5c1296941057eef82a12e12f.zip
code style, indent with tabs XI
Follow the same code style als MPD itself.
Diffstat (limited to '')
-rw-r--r--src/strfsong.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/strfsong.c b/src/strfsong.c
index cef2056c8..ed3e20f98 100644
--- a/src/strfsong.c
+++ b/src/strfsong.c
@@ -1,6 +1,4 @@
-/*
- * $Id$
- *
+/*
* Based on mpc's songToFormatedString modified for glib and ncmpc
*
*
@@ -33,11 +31,12 @@ skip(const gchar * p)
gint stack = 0;
while (*p != '\0') {
- if(*p == '[') stack++;
- if(*p == '#' && p[1] != '\0') {
+ if (*p == '[')
+ stack++;
+ if (*p == '#' && p[1] != '\0') {
/* skip escaped stuff */
++p;
- } else if(stack) {
+ } else if (stack) {
if(*p == ']') stack--;
} else {
if(*p == '&' || *p == '|' || *p == ']') {
@@ -63,7 +62,7 @@ _strfsong(gchar *s,
gboolean found = FALSE;
memset(s, 0, max);
- if( song==NULL )
+ if (song == NULL)
return 0;
for (p = format; *p != '\0' && length<max;) {
@@ -219,6 +218,6 @@ gsize
strfsong(gchar *s, gsize max, const gchar *format,
const struct mpd_song *song)
{
- return _strfsong(s, max, format, song, NULL);
+ return _strfsong(s, max, format, song, NULL);
}
-
+