Changeset 0d0f59ac637b318caf578652ea006ce193f7c581
- 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
| r7f42e05 |
r0d0f59a |
|
| 37 | 37 | |
|---|
| 38 | 38 | /* Global properties */ |
|---|
| 39 | | int i_argc; ///< command line arguments count |
|---|
| 40 | | const char ** ppsz_argv; ///< command line arguments |
|---|
| 41 | | |
|---|
| 42 | 39 | char * psz_homedir; ///< user's home directory |
|---|
| 43 | 40 | char * psz_configdir; ///< user's configuration directory |
|---|
| r49bcf08 |
r0d0f59a |
|
| 1682 | 1682 | if( !p_vout->b_fullscreen ) |
|---|
| 1683 | 1683 | { |
|---|
| | 1684 | const char *argv[] = { "vlc", NULL }; |
|---|
| | 1685 | |
|---|
| 1684 | 1686 | /* Set window manager hints and properties: size hints, command, |
|---|
| 1685 | 1687 | * window's name, and accepted protocols */ |
|---|
| … | … | |
| 1687 | 1689 | p_win->base_window, &xsize_hints ); |
|---|
| 1688 | 1690 | 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 ); |
|---|
| 1691 | 1692 | |
|---|
| 1692 | 1693 | if( !var_GetBool( p_vout, "video-deco") ) |
|---|
| r249229a |
r0d0f59a |
|
| 84 | 84 | struct option *p_longopts; |
|---|
| 85 | 85 | int i_modules_index; |
|---|
| | 86 | const char **argv_copy = NULL; |
|---|
| 86 | 87 | |
|---|
| 87 | 88 | /* Short options */ |
|---|
| 88 | 89 | module_config_t *pp_shortopts[256]; |
|---|
| 89 | 90 | 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; |
|---|
| 94 | 91 | |
|---|
| 95 | 92 | #ifdef __APPLE__ |
|---|
| … | … | |
| 155 | 152 | if( b_ignore_errors ) |
|---|
| 156 | 153 | { |
|---|
| 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 ) |
|---|
| 159 | 156 | { |
|---|
| 160 | 157 | msg_Err( p_this, "out of memory" ); |
|---|
| … | … | |
| 164 | 161 | return -1; |
|---|
| 165 | 162 | } |
|---|
| 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; |
|---|
| 168 | 165 | } |
|---|
| 169 | 166 | |
|---|
| … | … | |
| 423 | 420 | free( p_longopts ); |
|---|
| 424 | 421 | free( psz_shortopts ); |
|---|
| 425 | | if( b_ignore_errors ) free( ppsz_argv ); |
|---|
| | 422 | free( argv_copy ); |
|---|
| 426 | 423 | |
|---|
| 427 | 424 | return 0; |
|---|