Code

options: added constant option_table_size
[ncmpc.git] / src / strfsong.c
index 27eadb236686055d594c113b05eb6af21f26ffc0..523c30da25a42319322e13e1365ecae4a3b0fbbc 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "strfsong.h"
+#include "support.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
-#include <glib.h>
-
-#include "config.h"
-#include "libmpdclient.h"
-#include "support.h"
-#include "strfsong.h"
 
-static gchar *
-skip(gchar * p)
+static const gchar *
+skip(const gchar * p)
 {
        gint stack = 0;
 
@@ -62,9 +55,9 @@ _strfsong(gchar *s,
          gsize max,
          const gchar *format,
          mpd_Song *song,
-         gchar **last)
+         const gchar **last)
 {
-       gchar *p, *end;
+       const gchar *p, *end;
        gchar *temp;
        gsize n, length = 0;
        gboolean found = FALSE;
@@ -73,7 +66,7 @@ _strfsong(gchar *s,
        if( song==NULL )
                return 0;
 
-       for (p = (gchar *)format; *p != '\0' && length<max;) {
+       for (p = format; *p != '\0' && length<max;) {
                /* OR */
                if (p[0] == '|') {
                        ++p;