Changeset 042e6fa3c8810a67769958f14f840280753cec9c
- Timestamp:
- 12/02/07 08:12:11
(2 years ago)
- Author:
- Marian Durkovic <md@videolan.org>
- git-committer:
- Marian Durkovic <md@videolan.org> 1171264331 +0000
- git-parent:
[1ae081bee36ca43ae68e814494800764ff8eaae8]
- git-author:
- Marian Durkovic <md@videolan.org> 1171264331 +0000
- Message:
Move wgetmainargs into VLC's main.
Refs: #900 #920 #1031
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r9631abe |
r042e6fa |
|
| 1216 | 1216 | /* TODO: write an internal function of this one, to avoid |
|---|
| 1217 | 1217 | * unnecessary lookups. */ |
|---|
| 1218 | | /* FIXME: should we convert options to UTF-8 as well ?? */ |
|---|
| 1219 | 1218 | |
|---|
| 1220 | 1219 | #ifdef WIN32 |
|---|
| … | … | |
| 1229 | 1228 | #endif |
|---|
| 1230 | 1229 | { |
|---|
| | 1230 | /* FIXME: it's too late to call FromLocale here. We should |
|---|
| | 1231 | convert ALL arguments to UTF8 before they get parsed */ |
|---|
| | 1232 | |
|---|
| 1231 | 1233 | psz_target = FromLocale( ppsz_argv[ i_opt ] ); |
|---|
| 1232 | 1234 | VLC_AddTarget( p_vlc->i_object_id, psz_target, |
|---|
| rae32c14 |
r042e6fa |
|
| 40 | 40 | #include <winsock.h> |
|---|
| 41 | 41 | |
|---|
| 42 | | extern void __wgetmainargs(int *argc, wchar_t ***wargv, wchar_t ***wenviron, |
|---|
| 43 | | int expand_wildcards, int *startupinfo); |
|---|
| 44 | | |
|---|
| 45 | 42 | /***************************************************************************** |
|---|
| 46 | 43 | * system_Init: initialize winsock and misc other things. |
|---|
| … | … | |
| 86 | 83 | /* Call mdate() once to make sure it is initialized properly */ |
|---|
| 87 | 84 | mdate(); |
|---|
| 88 | | |
|---|
| 89 | | /* Replace argv[1..n] with unicode for Windows NT and above */ |
|---|
| 90 | | if( GetVersion() < 0x80000000 ) |
|---|
| 91 | | { |
|---|
| 92 | | wchar_t **wargv, **wenvp; |
|---|
| 93 | | int i,i_wargc; |
|---|
| 94 | | int si = { 0 }; |
|---|
| 95 | | __wgetmainargs(&i_wargc, &wargv, &wenvp, 0, &si); |
|---|
| 96 | | |
|---|
| 97 | | for( i = 1; i < i_wargc; i++ ) |
|---|
| 98 | | ppsz_argv[i] = FromWide( wargv[i] ); |
|---|
| 99 | | } |
|---|
| 100 | 85 | |
|---|
| 101 | 86 | /* WinSock Library Init. */ |
|---|
| r4116cd3 |
r042e6fa |
|
| 38 | 38 | |
|---|
| 39 | 39 | #include <vlc/vlc.h> |
|---|
| | 40 | |
|---|
| | 41 | #ifdef WIN32 |
|---|
| | 42 | extern void __wgetmainargs(int *argc, wchar_t ***wargv, wchar_t ***wenviron, |
|---|
| | 43 | int expand_wildcards, int *startupinfo); |
|---|
| | 44 | #endif |
|---|
| 40 | 45 | |
|---|
| 41 | 46 | /***************************************************************************** |
|---|
| … | … | |
| 99 | 104 | #endif |
|---|
| 100 | 105 | |
|---|
| | 106 | #ifdef WIN32 |
|---|
| | 107 | /* Replace argv[1..n] with unicode for Windows NT and above */ |
|---|
| | 108 | if( GetVersion() < 0x80000000 ) |
|---|
| | 109 | { |
|---|
| | 110 | wchar_t **wargv, **wenvp; |
|---|
| | 111 | int i,i_wargc; |
|---|
| | 112 | int si = { 0 }; |
|---|
| | 113 | __wgetmainargs(&i_wargc, &wargv, &wenvp, 0, &si); |
|---|
| | 114 | |
|---|
| | 115 | for( i = 1; i < i_wargc; i++ ) |
|---|
| | 116 | ppsz_argv[i] = FromWide( wargv[i] ); |
|---|
| | 117 | } |
|---|
| | 118 | #endif |
|---|
| | 119 | |
|---|
| 101 | 120 | /* Initialize libvlc */ |
|---|
| 102 | 121 | i_ret = VLC_Init( 0, i_argc, ppsz_argv ); |
|---|