]> git.sesse.net Git - vlc/blobdiff - modules/codec/cmml/history.c
Fix live detection on win32
[vlc] / modules / codec / cmml / history.c
index 58f59507b895e05486e2ff41125b984f180cb99d..ff29847bd2a4607116f094bbfc4a741c58893621 100644 (file)
@@ -28,7 +28,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_input.h>
 
 #include "history.h"
@@ -81,7 +81,7 @@ history_t *history_New( void )
    return p_new_history;
 }
 
-vlc_bool_t history_GoBackSavingCurrentItem ( history_t *p_history,
+bool history_GoBackSavingCurrentItem ( history_t *p_history,
                                              history_item_t *p_item )
 {
     history_PruneAndInsert( p_history, p_item );
@@ -95,7 +95,7 @@ vlc_bool_t history_GoBackSavingCurrentItem ( history_t *p_history,
 #ifdef HISTORY_DEBUG
     history_Dump( p_history );
 #endif
-    return VLC_TRUE;
+    return true;
 }
 
 static void history_Dump( history_t *p_history )
@@ -119,15 +119,13 @@ static void history_Dump( history_t *p_history )
             fprintf( stderr, "HISTORY: [%d] NULL\n", i );
         else
         {
-            char *psz_uri = input_item_GetURI( p_item );
             fprintf( stderr, "HISTORY: [%d] %p (%p->%s)\n", i, p_item,
-                     psz_uri, psz_uri );
-            free( psz_uri );
+                     p_item->psz_uri, p_item->psz_uri );
         }
     }
 }
 
-vlc_bool_t history_GoForwardSavingCurrentItem ( history_t *p_history,
+bool history_GoForwardSavingCurrentItem ( history_t *p_history,
                                                 history_item_t *p_item )
 {
 #ifdef HISTORY_DEBUG
@@ -138,33 +136,33 @@ vlc_bool_t history_GoForwardSavingCurrentItem ( history_t *p_history,
         == XARRAY_SUCCESS )
     {
         p_history->i_index++;
-        return VLC_TRUE;
+        return true;
     }
     else
     {
-        return VLC_FALSE;
+        return false;
     }
 }
 
-vlc_bool_t history_CanGoBack( history_t *p_history )
+bool history_CanGoBack( history_t *p_history )
 {
     if( p_history->i_index > 0 )
-        return VLC_TRUE;
+        return true;
     else
-        return VLC_FALSE;
+        return false;
 }
 
-vlc_bool_t history_CanGoForward( history_t *p_history )
+bool history_CanGoForward( history_t *p_history )
 {
     unsigned int i_count;
 
     if( xarray_Count( p_history->p_xarray, &i_count ) != XARRAY_SUCCESS )
-        return VLC_FALSE;
+        return false;
 
     if( p_history->i_index < i_count )
-        return VLC_TRUE;
+        return true;
     else
-        return VLC_FALSE;
+        return false;
 }
 
 history_item_t *history_Item( history_t *p_history )