Changeset 0d0f59ac637b318caf578652ea006ce193f7c581

Show
Ignore:
Timestamp:
25/02/08 21:50:49 (8 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1203972649 +0000
git-parent:

[3f48284e78c07e2911b192f38b4650b835f642e9]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1203972649 +0000
Message:

Remove argv/argc from libvlc_t (not really needed here)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/main.h

    r7f42e05 r0d0f59a  
    3737 
    3838    /* Global properties */ 
    39     int                    i_argc;           ///< command line arguments count 
    40     const char **          ppsz_argv;        ///< command line arguments 
    41  
    4239    char *                 psz_homedir;      ///< user's home directory 
    4340    char *                 psz_configdir;    ///< user's configuration directory 
  • modules/video_output/x11/xcommon.c

    r49bcf08 r0d0f59a  
    16821682        if( !p_vout->b_fullscreen ) 
    16831683        { 
     1684            const char *argv[] = { "vlc", NULL }; 
     1685 
    16841686            /* Set window manager hints and properties: size hints, command, 
    16851687             * window's name, and accepted protocols */ 
     
    16871689                               p_win->base_window, &xsize_hints ); 
    16881690            XSetCommand( p_vout->p_sys->p_display, p_win->base_window, 
    1689                          (char**)p_vout->p_libvlc->ppsz_argv, 
    1690                          p_vout->p_libvlc->i_argc ); 
     1691                         (char**)argv, 1 ); 
    16911692 
    16921693            if( !var_GetBool( p_vout, "video-deco") ) 
  • src/config/cmdline.c

    r249229a r0d0f59a  
    8484    struct option *p_longopts; 
    8585    int i_modules_index; 
     86    const char **argv_copy = NULL; 
    8687 
    8788    /* Short options */ 
    8889    module_config_t *pp_shortopts[256]; 
    8990    char *psz_shortopts; 
    90  
    91     /* Set default configuration and copy arguments */ 
    92     p_this->p_libvlc->i_argc    = *pi_argc; 
    93     p_this->p_libvlc->ppsz_argv = ppsz_argv; 
    9491 
    9592#ifdef __APPLE__ 
     
    155152    if( b_ignore_errors ) 
    156153    { 
    157         ppsz_argv = (const char**)malloc( *pi_argc * sizeof(char *) ); 
    158         if( ppsz_argv == NULL ) 
     154        argv_copy = (const char**)malloc( *pi_argc * sizeof(char *) ); 
     155        if( argv_copy == NULL ) 
    159156        { 
    160157            msg_Err( p_this, "out of memory" ); 
     
    164161            return -1; 
    165162        } 
    166         memcpy( ppsz_argv, p_this->p_libvlc->ppsz_argv, 
    167                 *pi_argc * sizeof(char *) )
     163        memcpy( argv_copy, ppsz_argv, *pi_argc * sizeof(char *) ); 
     164        ppsz_argv = argv_copy
    168165    } 
    169166 
     
    423420    free( p_longopts ); 
    424421    free( psz_shortopts ); 
    425     if( b_ignore_errors ) free( ppsz_argv ); 
     422    free( argv_copy ); 
    426423 
    427424    return 0;