Changeset 042e6fa3c8810a67769958f14f840280753cec9c

Show
Ignore:
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
  • src/libvlc-common.c

    r9631abe r042e6fa  
    12161216        /* TODO: write an internal function of this one, to avoid 
    12171217         *       unnecessary lookups. */ 
    1218         /* FIXME: should we convert options to UTF-8 as well ?? */ 
    12191218 
    12201219#ifdef WIN32 
     
    12291228#endif 
    12301229        { 
     1230            /* FIXME: it's too late to call FromLocale here. We should 
     1231               convert ALL arguments to UTF8 before they get parsed */ 
     1232 
    12311233            psz_target = FromLocale( ppsz_argv[ i_opt ] ); 
    12321234            VLC_AddTarget( p_vlc->i_object_id, psz_target, 
  • src/misc/win32_specific.c

    rae32c14 r042e6fa  
    4040#include <winsock.h> 
    4141 
    42 extern void __wgetmainargs(int *argc, wchar_t ***wargv, wchar_t ***wenviron, 
    43                            int expand_wildcards, int *startupinfo); 
    44  
    4542/***************************************************************************** 
    4643 * system_Init: initialize winsock and misc other things. 
     
    8683    /* Call mdate() once to make sure it is initialized properly */ 
    8784    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     } 
    10085 
    10186    /* WinSock Library Init. */ 
  • src/vlc.c

    r4116cd3 r042e6fa  
    3838 
    3939#include <vlc/vlc.h> 
     40 
     41#ifdef WIN32 
     42extern void __wgetmainargs(int *argc, wchar_t ***wargv, wchar_t ***wenviron, 
     43                           int expand_wildcards, int *startupinfo); 
     44#endif 
    4045 
    4146/***************************************************************************** 
     
    99104#endif 
    100105 
     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 
    101120    /* Initialize libvlc */ 
    102121    i_ret = VLC_Init( 0, i_argc, ppsz_argv );