Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
042e6fa3
Commit
042e6fa3
authored
Feb 12, 2007
by
Marian Durkovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move __wgetmainargs into VLC's main.
Refs: #900 #920 #1031
parent
1ae081be
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
16 deletions
+22
-16
src/libvlc-common.c
src/libvlc-common.c
+3
-1
src/misc/win32_specific.c
src/misc/win32_specific.c
+0
-15
src/vlc.c
src/vlc.c
+19
-0
No files found.
src/libvlc-common.c
View file @
042e6fa3
...
...
@@ -1215,7 +1215,6 @@ static int GetFilenames( libvlc_int_t *p_vlc, int i_argc, char *ppsz_argv[] )
/* TODO: write an internal function of this one, to avoid
* unnecessary lookups. */
/* FIXME: should we convert options to UTF-8 as well ?? */
#ifdef WIN32
if
(
GetVersion
()
<
0x80000000
)
...
...
@@ -1228,6 +1227,9 @@ static int GetFilenames( libvlc_int_t *p_vlc, int i_argc, char *ppsz_argv[] )
else
#endif
{
/* FIXME: it's too late to call FromLocale here. We should
convert ALL arguments to UTF8 before they get parsed */
psz_target
=
FromLocale
(
ppsz_argv
[
i_opt
]
);
VLC_AddTarget
(
p_vlc
->
i_object_id
,
psz_target
,
(
char
const
**
)(
i_options
?
&
ppsz_argv
[
i_opt
+
1
]
:
...
...
src/misc/win32_specific.c
View file @
042e6fa3
...
...
@@ -39,9 +39,6 @@
#include <winsock.h>
extern
void
__wgetmainargs
(
int
*
argc
,
wchar_t
***
wargv
,
wchar_t
***
wenviron
,
int
expand_wildcards
,
int
*
startupinfo
);
/*****************************************************************************
* system_Init: initialize winsock and misc other things.
*****************************************************************************/
...
...
@@ -86,18 +83,6 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
/* Call mdate() once to make sure it is initialized properly */
mdate
();
/* Replace argv[1..n] with unicode for Windows NT and above */
if
(
GetVersion
()
<
0x80000000
)
{
wchar_t
**
wargv
,
**
wenvp
;
int
i
,
i_wargc
;
int
si
=
{
0
};
__wgetmainargs
(
&
i_wargc
,
&
wargv
,
&
wenvp
,
0
,
&
si
);
for
(
i
=
1
;
i
<
i_wargc
;
i
++
)
ppsz_argv
[
i
]
=
FromWide
(
wargv
[
i
]
);
}
/* WinSock Library Init. */
if
(
!
WSAStartup
(
MAKEWORD
(
2
,
2
),
&
Data
)
)
{
...
...
src/vlc.c
View file @
042e6fa3
...
...
@@ -38,6 +38,11 @@
#include <vlc/vlc.h>
#ifdef WIN32
extern
void
__wgetmainargs
(
int
*
argc
,
wchar_t
***
wargv
,
wchar_t
***
wenviron
,
int
expand_wildcards
,
int
*
startupinfo
);
#endif
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
...
...
@@ -98,6 +103,20 @@ int main( int i_argc, char *ppsz_argv[] )
signal
(
SIGPIPE
,
SIG_IGN
);
#endif
#ifdef WIN32
/* Replace argv[1..n] with unicode for Windows NT and above */
if
(
GetVersion
()
<
0x80000000
)
{
wchar_t
**
wargv
,
**
wenvp
;
int
i
,
i_wargc
;
int
si
=
{
0
};
__wgetmainargs
(
&
i_wargc
,
&
wargv
,
&
wenvp
,
0
,
&
si
);
for
(
i
=
1
;
i
<
i_wargc
;
i
++
)
ppsz_argv
[
i
]
=
FromWide
(
wargv
[
i
]
);
}
#endif
/* Initialize libvlc */
i_ret
=
VLC_Init
(
0
,
i_argc
,
ppsz_argv
);
if
(
i_ret
<
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment