]> git.sesse.net Git - vlc/commitdiff
cleanup : remove useless headers, not used functions, msg_Err when we don't have...
authorRafaël Carré <funman@videolan.org>
Mon, 10 Mar 2008 23:18:30 +0000 (00:18 +0100)
committerRafaël Carré <funman@videolan.org>
Tue, 11 Mar 2008 08:05:24 +0000 (09:05 +0100)
src/config/cmdline.c
src/config/core.c
src/config/file.c

index d0df45822b78e9515b9663b7a708d52918b9a45d..060b7efb1544c68080a4fa1904c4b3130e279888 100644 (file)
 #include <vlc/vlc.h>
 #include "../libvlc.h"
 #include "vlc_keys.h"
-#include "vlc_charset.h"
-
-#include <errno.h>                                                  /* errno */
-#include <limits.h>
-
-#ifdef HAVE_UNISTD_H
-#    include <unistd.h>                                          /* getuid() */
-#endif
 
 #ifdef HAVE_GETOPT_LONG
 #   ifdef HAVE_GETOPT_H
 #   include "../extras/getopt.h"
 #endif
 
-#if defined(HAVE_GETPWUID)
-#   include <pwd.h>                                            /* getpwuid() */
-#endif
-
-#if defined( HAVE_SYS_STAT_H )
-#   include <sys/stat.h>
-#endif
-#if defined( HAVE_SYS_TYPES_H )
-#   include <sys/types.h>
-#endif
-#if defined( WIN32 )
-#   if !defined( UNDER_CE )
-#       include <direct.h>
-#   endif
-#include <tchar.h>
-#endif
-
 #include "configuration.h"
 #include "modules/modules.h"
 
@@ -132,7 +107,6 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
     p_longopts = malloc( sizeof(struct option) * (i_opts + 1) );
     if( p_longopts == NULL )
     {
-        msg_Err( p_this, "out of memory" );
         vlc_list_release( p_list );
         return -1;
     }
@@ -140,7 +114,6 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
     psz_shortopts = malloc( sizeof( char ) * (2 * i_opts + 1) );
     if( psz_shortopts == NULL )
     {
-        msg_Err( p_this, "out of memory" );
         free( p_longopts );
         vlc_list_release( p_list );
         return -1;
@@ -154,7 +127,6 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
         argv_copy = (const char**)malloc( *pi_argc * sizeof(char *) );
         if( argv_copy == NULL )
         {
-            msg_Err( p_this, "out of memory" );
             free( psz_shortopts );
             free( p_longopts );
             vlc_list_release( p_list );
index 116f44257ccddf875460a1df798c55889a423e69..0241713a881251449da6aaa02d1a864b83fb067c 100644 (file)
 #    include <unistd.h>                                          /* getuid() */
 #endif
 
-#ifdef HAVE_GETOPT_LONG
-#   ifdef HAVE_GETOPT_H
-#       include <getopt.h>                                       /* getopt() */
-#   endif
-#else
-#   include "../extras/getopt.h"
-#endif
-
 #if defined(HAVE_GETPWUID)
 #   include <pwd.h>                                            /* getpwuid() */
 #endif
@@ -72,11 +64,6 @@ static inline char *strdupnull (const char *src)
     return src ? strdup (src) : NULL;
 }
 
-static inline char *_strdupnull (const char *src)
-{
-    return src ? strdup (_(src)) : NULL;
-}
-
 /* Item types that use a string value (i.e. serialized in the module cache) */
 int IsConfigStringType (int type)
 {
@@ -729,6 +716,8 @@ char *config_GetHomeDir( void )
  *   - on windows that's the App Data directory;
  *   - on other OSes it's the same as the home directory.
  */
+char *config_GetUserDir( void ); /* XXX why does gcc wants a declaration ?
+                                  * --funman */
 char *config_GetUserDir( void )
 {
     return GetDir( VLC_TRUE );
index 5a1286cf74d948cadb45e23a0cc092278407b360..61ef3564815fac0b7283363121875ca58000d1c7 100644 (file)
@@ -45,12 +45,6 @@ static inline char *strdupnull (const char *src)
     return src ? strdup (src) : NULL;
 }
 
-static inline char *_strdupnull (const char *src)
-{
-    return src ? strdup (_(src)) : NULL;
-}
-
-
 static FILE *config_OpenConfigFile( vlc_object_t *p_obj, const char *mode )
 {
     char *psz_filename = p_obj->p_libvlc->psz_configfile;