]> git.sesse.net Git - vlc/commitdiff
Depth is the word
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 12 May 2009 20:46:58 +0000 (23:46 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 12 May 2009 20:46:58 +0000 (23:46 +0300)
src/control/media_list_path.h
src/control/media_list_player.c

index c3e698d06ded674e221f8b48eebf74f10c36b8e8..00216dad432d8e822814ba7f43ecc44214d20830 100644 (file)
@@ -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;
 }
 
index 4c80ae41ef7662251967be40b854e071785b2891..d5865d99c2e6ceb833f1f9938ebdaf2e01baa360 100644 (file)
@@ -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 );