]> git.sesse.net Git - vlc/blobdiff - bin/cachegen.c
Upnp: remove trailing space
[vlc] / bin / cachegen.c
index 1772b3dab3ff280d13c225f97dc8df60936d4f72..8e72bf40b27d9638ee9284b49506e2e81788ce21 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
-
 #ifdef HAVE_GETOPT_H
 # include <getopt.h>
 #endif
+#ifdef WIN32
+# include <windows.h>
+#endif
 
 static void version (void)
 {
@@ -45,12 +47,11 @@ static void usage (const char *path)
             path);
 }
 
-/* Explicit HACK */
-extern void LocaleFree (const char *);
-extern char *FromLocale (const char *);
-
 int main (int argc, char *argv[])
 {
+#ifdef WIN32
+    SetErrorMode(SEM_FAILCRITICALERRORS);
+#endif
     static const struct option opts[] =
     {
         { "force",      no_argument,       NULL, 'f' },
@@ -81,8 +82,7 @@ int main (int argc, char *argv[])
 
     for (int i = optind; i < argc; i++)
     {
-        /* Note that FromLocale() can be used before libvlc is initialized */
-        const char *path = FromLocale (argv[i]);
+        const char *path = argv[i];
 
         if (setenv ("VLC_PLUGIN_PATH", path, 1))
             abort ();
@@ -101,7 +101,6 @@ int main (int argc, char *argv[])
             libvlc_release (vlc);
         if (vlc == NULL)
             fprintf (stderr, "No plugins in %s\n", path);
-        LocaleFree (path);
         if (vlc == NULL)
             return 1;
     }