[vlc-devel] commit: Depth is the word ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue May 12 22:47:40 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue May 12 23:46:58 2009 +0300| [e86b51d040e7a95d6f15cc17db8f24c6155568b3] | committer: Rémi Denis-Courmont
Depth is the word
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e86b51d040e7a95d6f15cc17db8f24c6155568b3
---
src/control/media_list_path.h | 28 ++++++++++++++--------------
src/control/media_list_player.c | 14 +++++++-------
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/src/control/media_list_path.h b/src/control/media_list_path.h
index c3e698d..00216da 100644
--- a/src/control/media_list_path.h
+++ b/src/control/media_list_path.h
@@ -47,9 +47,9 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_with_root_index( i
}
/**************************************************************************
- * path_deepness (Media List Player Internal)
+ * path_depth (Media List Player Internal)
**************************************************************************/
-static inline int libvlc_media_list_path_deepness( libvlc_media_list_path_t path )
+static inline int libvlc_media_list_path_depth( libvlc_media_list_path_t path )
{
int i;
for( i = 0; path[i] != -1; i++ );
@@ -61,10 +61,10 @@ static inline int libvlc_media_list_path_deepness( libvlc_media_list_path_t path
**************************************************************************/
static inline void libvlc_media_list_path_append( libvlc_media_list_path_t * p_path, int index )
{
- int old_deepness = libvlc_media_list_path_deepness( *p_path );
- *p_path = realloc( *p_path, sizeof(int)*(old_deepness+2));
- *p_path[old_deepness] = index;
- *p_path[old_deepness+1] = -1;
+ int old_depth = libvlc_media_list_path_depth( *p_path );
+ *p_path = realloc( *p_path, sizeof(int)*(old_depth+2));
+ *p_path[old_depth] = index;
+ *p_path[old_depth+1] = -1;
}
/**************************************************************************
@@ -73,11 +73,11 @@ static inline void libvlc_media_list_path_append( libvlc_media_list_path_t * p_p
static inline libvlc_media_list_path_t libvlc_media_list_path_copy_by_appending( libvlc_media_list_path_t path, int index )
{
libvlc_media_list_path_t ret;
- int old_deepness = libvlc_media_list_path_deepness( path );
- ret = malloc( sizeof(int)*(old_deepness+2) );
- memcpy( ret, path, sizeof(int)*(old_deepness+2) );
- ret[old_deepness] = index;
- ret[old_deepness+1] = -1;
+ int old_depth = libvlc_media_list_path_depth( path );
+ ret = malloc( sizeof(int)*(old_depth+2) );
+ memcpy( ret, path, sizeof(int)*(old_depth+2) );
+ ret[old_depth] = index;
+ ret[old_depth+1] = -1;
return ret;
}
@@ -87,9 +87,9 @@ static inline libvlc_media_list_path_t libvlc_media_list_path_copy_by_appending(
static inline libvlc_media_list_path_t libvlc_media_list_path_copy( libvlc_media_list_path_t path )
{
libvlc_media_list_path_t ret;
- int deepness = libvlc_media_list_path_deepness( path );
- ret = malloc( sizeof(int)*(deepness+1) );
- memcpy( ret, path, sizeof(int)*(deepness+1) );
+ int depth = libvlc_media_list_path_depth( path );
+ ret = malloc( sizeof(int)*(depth+1) );
+ memcpy( ret, path, sizeof(int)*(depth+1) );
return ret;
}
diff --git a/src/control/media_list_player.c b/src/control/media_list_player.c
index 4c80ae4..d5865d9 100644
--- a/src/control/media_list_player.c
+++ b/src/control/media_list_player.c
@@ -64,23 +64,23 @@ get_next_path( libvlc_media_list_player_t * p_mlp )
p_mlp->p_mlist,
p_mlp->current_playing_item_path );
- int deepness = libvlc_media_list_path_deepness( p_mlp->current_playing_item_path );
- if( deepness < 1 || !p_parent_of_playing_item )
+ int depth = libvlc_media_list_path_depth( p_mlp->current_playing_item_path );
+ if( depth < 1 || !p_parent_of_playing_item )
return NULL;
ret = libvlc_media_list_path_copy( p_mlp->current_playing_item_path );
- while( ret[deepness-1] >= libvlc_media_list_count( p_parent_of_playing_item, NULL ) )
+ while( ret[depth-1] >= libvlc_media_list_count( p_parent_of_playing_item, NULL ) )
{
- deepness--;
- if( deepness <= 0 )
+ depth--;
+ if( depth <= 0 )
{
free( ret );
libvlc_media_list_release( p_parent_of_playing_item );
return NULL;
}
- ret[deepness] = -1;
- ret[deepness-1]++;
+ ret[depth] = -1;
+ ret[depth-1]++;
p_parent_of_playing_item = libvlc_media_list_parentlist_at_path(
p_mlp->p_mlist,
ret );
More information about the vlc-devel
mailing list