Changeset 1bbcb9f0db5392f291b31f03db9048e18db4e4bf
- Timestamp:
- 03/11/08 09:05:24
(6 months ago)
- Author:
- Rafaël Carré <funman@videolan.org>
- git-committer:
- Rafaël Carré <funman@videolan.org> 1205222724 +0100
- git-parent:
[13e1b6f48378b9cced92b2b9efb814b34824ea98]
- git-author:
- Rafaël Carré <funman@videolan.org> 1205191110 +0100
- Message:
cleanup : remove useless headers, not used functions, msg_Err when we don't have enough memory, add a declaration
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r0d0f59a |
r1bbcb9f |
|
| 29 | 29 | #include "../libvlc.h" |
|---|
| 30 | 30 | #include "vlc_keys.h" |
|---|
| 31 | | #include "vlc_charset.h" |
|---|
| 32 | | |
|---|
| 33 | | #include <errno.h> /* errno */ |
|---|
| 34 | | #include <limits.h> |
|---|
| 35 | | |
|---|
| 36 | | #ifdef HAVE_UNISTD_H |
|---|
| 37 | | # include <unistd.h> /* getuid() */ |
|---|
| 38 | | #endif |
|---|
| 39 | 31 | |
|---|
| 40 | 32 | #ifdef HAVE_GETOPT_LONG |
|---|
| … | … | |
| 44 | 36 | #else |
|---|
| 45 | 37 | # include "../extras/getopt.h" |
|---|
| 46 | | #endif |
|---|
| 47 | | |
|---|
| 48 | | #if defined(HAVE_GETPWUID) |
|---|
| 49 | | # include <pwd.h> /* getpwuid() */ |
|---|
| 50 | | #endif |
|---|
| 51 | | |
|---|
| 52 | | #if defined( HAVE_SYS_STAT_H ) |
|---|
| 53 | | # include <sys/stat.h> |
|---|
| 54 | | #endif |
|---|
| 55 | | #if defined( HAVE_SYS_TYPES_H ) |
|---|
| 56 | | # include <sys/types.h> |
|---|
| 57 | | #endif |
|---|
| 58 | | #if defined( WIN32 ) |
|---|
| 59 | | # if !defined( UNDER_CE ) |
|---|
| 60 | | # include <direct.h> |
|---|
| 61 | | # endif |
|---|
| 62 | | #include <tchar.h> |
|---|
| 63 | 38 | #endif |
|---|
| 64 | 39 | |
|---|
| … | … | |
| 133 | 108 | if( p_longopts == NULL ) |
|---|
| 134 | 109 | { |
|---|
| 135 | | msg_Err( p_this, "out of memory" ); |
|---|
| 136 | 110 | vlc_list_release( p_list ); |
|---|
| 137 | 111 | return -1; |
|---|
| … | … | |
| 141 | 115 | if( psz_shortopts == NULL ) |
|---|
| 142 | 116 | { |
|---|
| 143 | | msg_Err( p_this, "out of memory" ); |
|---|
| 144 | 117 | free( p_longopts ); |
|---|
| 145 | 118 | vlc_list_release( p_list ); |
|---|
| … | … | |
| 155 | 128 | if( argv_copy == NULL ) |
|---|
| 156 | 129 | { |
|---|
| 157 | | msg_Err( p_this, "out of memory" ); |
|---|
| 158 | 130 | free( psz_shortopts ); |
|---|
| 159 | 131 | free( p_longopts ); |
|---|
| r751d2f1 |
r1bbcb9f |
|
| 40 | 40 | #endif |
|---|
| 41 | 41 | |
|---|
| 42 | | #ifdef HAVE_GETOPT_LONG |
|---|
| 43 | | # ifdef HAVE_GETOPT_H |
|---|
| 44 | | # include <getopt.h> /* getopt() */ |
|---|
| 45 | | # endif |
|---|
| 46 | | #else |
|---|
| 47 | | # include "../extras/getopt.h" |
|---|
| 48 | | #endif |
|---|
| 49 | | |
|---|
| 50 | 42 | #if defined(HAVE_GETPWUID) |
|---|
| 51 | 43 | # include <pwd.h> /* getpwuid() */ |
|---|
| … | … | |
| 71 | 63 | { |
|---|
| 72 | 64 | return src ? strdup (src) : NULL; |
|---|
| 73 | | } |
|---|
| 74 | | |
|---|
| 75 | | static inline char *_strdupnull (const char *src) |
|---|
| 76 | | { |
|---|
| 77 | | return src ? strdup (_(src)) : NULL; |
|---|
| 78 | 65 | } |
|---|
| 79 | 66 | |
|---|
| … | … | |
| 730 | 717 | * - on other OSes it's the same as the home directory. |
|---|
| 731 | 718 | */ |
|---|
| | 719 | char *config_GetUserDir( void ); /* XXX why does gcc wants a declaration ? |
|---|
| | 720 | * --funman */ |
|---|
| 732 | 721 | char *config_GetUserDir( void ) |
|---|
| 733 | 722 | { |
|---|
| r249229a |
r1bbcb9f |
|
| 45 | 45 | return src ? strdup (src) : NULL; |
|---|
| 46 | 46 | } |
|---|
| 47 | | |
|---|
| 48 | | static inline char *_strdupnull (const char *src) |
|---|
| 49 | | { |
|---|
| 50 | | return src ? strdup (_(src)) : NULL; |
|---|
| 51 | | } |
|---|
| 52 | | |
|---|
| 53 | 47 | |
|---|
| 54 | 48 | static FILE *config_OpenConfigFile( vlc_object_t *p_obj, const char *mode ) |
|---|