Code

code style, indent with tabs XI
[ncmpc.git] / src / main.c
index 641b12e35f8d8a1a63eb2701eaa52e381d44fae3..e701712fd871974057e43ee5d8842a580df4e019 100644 (file)
@@ -1,6 +1,4 @@
-/* 
- * $Id$
- *
+/*
  * (c) 2004 by Kalle Wallin <kaw@linux.se>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -21,7 +19,7 @@
 #include "config.h"
 #include "ncmpc.h"
 #include "mpdclient.h"
-#include "support.h"
+#include "charset.h"
 #include "options.h"
 #include "conf.h"
 #include "command.h"
@@ -41,6 +39,9 @@
 #include <signal.h>
 #include <string.h>
 
+/* time between mpd updates [s] */
+static const float MPD_UPDATE_TIME = 0.5;
+
 #define BUFSIZE 1024
 
 static const guint idle_interval = 500;
@@ -320,7 +321,9 @@ int
 main(int argc, const char *argv[])
 {
        struct sigaction act;
+#ifdef HAVE_LOCALE_H
        const char *charset = NULL;
+#endif
        GIOChannel *keyboard_channel;
 
 #ifdef HAVE_LOCALE_H
@@ -331,8 +334,7 @@ main(int argc, const char *argv[])
        /* charset */
        setlocale(LC_CTYPE,"");
        /* initialize charset conversions */
-       charset_init(g_get_charset(&charset));
-#endif
+       charset = charset_init();
 
        /* initialize i18n support */
 #ifdef ENABLE_NLS
@@ -340,6 +342,7 @@ main(int argc, const char *argv[])
        bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
        bind_textdomain_codeset(GETTEXT_PACKAGE, charset);
        textdomain(GETTEXT_PACKAGE);
+#endif
 #endif
 
        /* initialize options */