* parser.c : OSD import module
*****************************************************************************
* Copyright (C) 2007 M2X
- * $Id: $
+ * $Id$
*
* Authors: Jean-Paul Saman
*
* Preamble
*****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
#include <vlc_vout.h>
#include <vlc_config.h>
msg_Dbg( p_menu, "freeing menu" );
osd_ButtonFree( p_menu, p_menu->p_button );
- if( p_menu->psz_path ) free( p_menu->psz_path );
- if( p_menu->p_state ) free( p_menu->p_state );
+ free( p_menu->psz_path );
+ free( p_menu->p_state );
p_menu->p_button = NULL;
p_menu->p_last_button = NULL;
p_current = p_prev;
if( p_current->p_next )
{
- if( p_current->p_next->psz_name )
- free( p_current->p_next->psz_name );
- if( p_current->p_next->psz_action )
- free( p_current->p_next->psz_action );
- if( p_current->p_next->psz_action_down )
- free( p_current->p_next->psz_action_down );
- if( p_current->p_feedback && p_current->p_feedback->p_data_orig )
- free( p_current->p_feedback->p_data_orig );
+ free( p_current->p_next->psz_name );
+ free( p_current->p_next->psz_action );
+ free( p_current->p_next->psz_action_down );
if( p_current->p_feedback )
+ {
+ free( p_current->p_feedback->p_data_orig );
free( p_current->p_feedback );
-
- p_current->p_feedback = NULL;
+ p_current->p_feedback = NULL;
+ }
/* Free all states first */
if( p_current->p_next->p_states )
if( p_current->p_up )
{
- if( p_current->p_up->psz_name )
- free( p_current->p_up->psz_name );
- if( p_current->p_up->psz_action )
- free( p_current->p_up->psz_action );
- if( p_current->p_up->psz_action_down )
- free( p_current->p_up->psz_action_down );
- if( p_current->p_feedback && p_current->p_feedback->p_data_orig )
- free( p_current->p_feedback->p_data_orig );
+ free( p_current->p_up->psz_name );
+ free( p_current->p_up->psz_action );
+ free( p_current->p_up->psz_action_down );
if( p_current->p_feedback )
+ {
+ free( p_current->p_feedback->p_data_orig );
free( p_current->p_feedback );
+ }
p_current->p_feedback = NULL;
{
msg_Dbg( p_menu, "+ freeing button %s [%p]",
p_button->psz_action, p_button );
- if( p_button->psz_name ) free( p_button->psz_name );
- if( p_button->psz_action ) free( p_button->psz_action );
- if( p_button->psz_action_down ) free( p_button->psz_action_down );
- if( p_current->p_feedback && p_current->p_feedback->p_data_orig )
- free( p_current->p_feedback->p_data_orig );
+ free( p_button->psz_name );
+ free( p_button->psz_action );
+ free( p_button->psz_action_down );
if( p_current->p_feedback )
+ {
+ free( p_current->p_feedback->p_data_orig );
free( p_current->p_feedback );
- p_current->p_feedback = NULL;
+ p_current->p_feedback = NULL;
+ }
if( p_button->p_states )
osd_StatesFree( p_menu, p_button->p_states );
{
if( p_state->p_next->p_pic )
{
- if( p_state->p_next->p_pic->p_data_orig )
- free( p_state->p_next->p_pic->p_data_orig );
+ free( p_state->p_next->p_pic->p_data_orig );
free( p_state->p_next->p_pic );
}
- if( p_state->p_next->psz_state )
- free( p_state->p_next->psz_state );
+ free( p_state->p_next->psz_state );
free( p_state->p_next );
p_state->p_next = NULL;
}
p_state->psz_state, p_states );
if( p_states->p_pic )
{
- if( p_states->p_pic->p_data_orig )
- free( p_states->p_pic->p_data_orig );
+ free( p_states->p_pic->p_data_orig );
free( p_states->p_pic );
}
- if( p_state->psz_state ) free( p_state->psz_state );
+ free( p_state->psz_state );
free( p_states );
p_states = NULL;
}