# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_meta.h>
#include <vlc_charset.h>
static int __vlclua_var_toggle_or_set( lua_State *L, vlc_object_t *p_obj,
const char *psz_name )
{
- vlc_bool_t b_bool;
+ bool b_bool;
if( lua_gettop( L ) > 1 ) return vlclua_error( L );
if( lua_gettop( L ) == 0 )
b_bool = !var_GetBool( p_obj, psz_name );
else /* lua_gettop( L ) == 1 */
{
- b_bool = luaL_checkboolean( L, -1 )?VLC_TRUE:VLC_FALSE;
+ b_bool = luaL_checkboolean( L, -1 )?true:false;
lua_pop( L, 1 );
}
{
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
playlist_Stop( p_playlist ); /* Isn't this already implied by Clear? */
- playlist_Clear( p_playlist, VLC_FALSE );
+ playlist_Clear( p_playlist, false );
vlc_object_release( p_playlist );
return 0;
}
int i_id = luaL_checkint( L, 1 );
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
int i_ret = playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
- VLC_TRUE, NULL,
+ true, NULL,
playlist_ItemGetById( p_playlist, i_id,
- VLC_TRUE ) );
+ true ) );
vlc_object_release( p_playlist );
return vlclua_push_ret( L, i_ret );
}
vlc_object_t *p_this = vlclua_get_this( L );
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
i_count = vlclua_playlist_add_internal( p_this, L, p_playlist,
- NULL, VLC_TRUE );
+ NULL, true );
vlc_object_release( p_playlist );
lua_pushinteger( L, i_count );
return 1;
vlc_object_t *p_this = vlclua_get_this( L );
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
i_count = vlclua_playlist_add_internal( p_this, L, p_playlist,
- NULL, VLC_FALSE );
+ NULL, false );
vlc_object_release( p_playlist );
lua_pushinteger( L, i_count );
return 1;
if( lua_isnumber( L, 1 ) )
{
int i_id = lua_tointeger( L, 1 );
- p_item = playlist_ItemGetById( p_playlist, i_id, VLC_TRUE );
+ p_item = playlist_ItemGetById( p_playlist, i_id, true );
if( !p_item )
{
vlc_object_release( p_playlist );
/* { "http", "http" }, */
{ NULL, NULL } };
-static vlc_bool_t WordInList( const char *psz_list, const char *psz_word )
+static bool WordInList( const char *psz_list, const char *psz_word )
{
const char *psz_str = strstr( psz_list, psz_word );
int i_len = strlen( psz_word );
/* it doesn't start in middle of a word */
/* it doest end in middle of a word */
&& ( psz_str[i_len] == '\0' || psz_str[i_len] == ',' ) )
- return VLC_TRUE;
+ return true;
psz_str = strstr( psz_str, psz_word );
}
- return VLC_FALSE;
+ return false;
}
static const char *GetModuleName( intf_thread_t *p_intf )
return config_GetPsz( p_intf, "lua-intf" );
}
-int E_(Open_LuaIntf)( vlc_object_t *p_this )
+int Open_LuaIntf( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t*)p_this;
intf_sys_t *p_sys;
const char *psz_name = GetModuleName( p_intf );
const char *psz_config;
- vlc_bool_t b_config_set = VLC_FALSE;
+ bool b_config_set = false;
if( !psz_name ) psz_name = "dummy";
p_intf->p_sys = (intf_sys_t*)malloc( sizeof(intf_sys_t*) );
if( lua_istable( L, -1 ) )
{
lua_setglobal( L, "config" );
- b_config_set = VLC_TRUE;
+ b_config_set = true;
}
}
}
}
- if( b_config_set == VLC_FALSE )
+ if( b_config_set == false )
{
lua_newtable( L );
lua_setglobal( L, "config" );
p_sys->L = L;
p_intf->pf_run = Run;
- p_intf->psz_header = strdup( psz_name ); /* Do I need to clean that up myself in E_(Close_LuaIntf)? */
+ p_intf->psz_header = strdup( psz_name ); /* Do I need to clean that up myself in Close_LuaIntf? */
return VLC_SUCCESS;
}
-void E_(Close_LuaIntf)( vlc_object_t *p_this )
+void Close_LuaIntf( vlc_object_t *p_this )
{
intf_thread_t *p_intf = (intf_thread_t*)p_this;
p_intf->p_sys->psz_filename,
lua_tostring( L, lua_gettop( L ) ) );
lua_pop( L, 1 );
- p_intf->b_die = VLC_TRUE;
+ p_intf->b_die = true;
return;
}
- p_intf->b_die = VLC_TRUE;
+ p_intf->b_die = true;
}