]> git.sesse.net Git - vlc/blobdiff - include/vlc_epg.h
Turkish translation update by Yuksel Yildirim
[vlc] / include / vlc_epg.h
index 3777f2b327d6c3d4acc24cdcfe3e31f14893109a..26141ac158100a0f38114ad7a209d62b4a40ff85 100644 (file)
@@ -2,7 +2,7 @@
  * vlc_epg.h: Electronic Program Guide
  *****************************************************************************
  * Copyright (C) 2007 the VideoLAN team
- * $Id: vlc_meta.h 18214 2006-12-03 13:48:21Z zorglub $
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#if !defined( __LIBVLC__ )
-  #error You are not libvlc or one of its plugins. You cannot include this file
-#endif
-
 #ifndef _VLC_EPG_H
 #define _VLC_EPG_H 1
 
 typedef struct
 {
-       int64_t i_start;        /* Interpreted as a value return by time() */
-       int     i_duration;     /* Duration of the event in second */
+    int64_t i_start;    /* Interpreted as a value return by time() */
+    int     i_duration;    /* Duration of the event in second */
 
-       char    *psz_name;
-       char    *psz_short_description;
-       char    *psz_description;
+    char    *psz_name;
+    char    *psz_short_description;
+    char    *psz_description;
 
 } vlc_epg_event_t;
 
@@ -44,15 +40,15 @@ typedef struct
     char            *psz_name;
     vlc_epg_event_t *p_current; /* Can be null or should be the same than one of pp_event entry */
 
-       int                     i_event;
-       vlc_epg_event_t **pp_event;
+    int             i_event;
+    vlc_epg_event_t **pp_event;
 } vlc_epg_t;
 
 static inline void vlc_epg_Init( vlc_epg_t *p_epg, const char *psz_name )
 {
     p_epg->psz_name = psz_name ? strdup( psz_name ) : NULL;
     p_epg->p_current = NULL;
-       TAB_INIT( p_epg->i_event, p_epg->pp_event );
+    TAB_INIT( p_epg->i_event, p_epg->pp_event );
 }
 static inline void vlc_epg_Clean( vlc_epg_t *p_epg )
 {
@@ -60,17 +56,13 @@ static inline void vlc_epg_Clean( vlc_epg_t *p_epg )
     for( i = 0; i < p_epg->i_event; i++ )
     {
         vlc_epg_event_t *p_evt = p_epg->pp_event[i];
-        if( p_evt->psz_name )
-            free( p_evt->psz_name );
-        if( p_evt->psz_short_description )
-            free( p_evt->psz_short_description );
-        if( p_evt->psz_description )
-            free( p_evt->psz_description );
+        free( p_evt->psz_name );
+        free( p_evt->psz_short_description );
+        free( p_evt->psz_description );
         free( p_evt );
     }
     TAB_CLEAN( p_epg->i_event, p_epg->pp_event );
-    if( p_epg->psz_name )
-        free( p_epg->psz_name );
+    free( p_epg->psz_name );
 }
 static inline void vlc_epg_AddEvent( vlc_epg_t *p_epg, int64_t i_start, int i_duration,
                                 const char *psz_name, const char *psz_short_description, const char *psz_description )
@@ -88,9 +80,9 @@ static inline void vlc_epg_AddEvent( vlc_epg_t *p_epg, int64_t i_start, int i_du
 
 static inline vlc_epg_t *vlc_epg_New( const char *psz_name )
 {
-       vlc_epg_t *p_epg = (vlc_epg_t*)malloc( sizeof(vlc_epg_t) );
-       if( p_epg )
-               vlc_epg_Init( p_epg, psz_name );
+    vlc_epg_t *p_epg = (vlc_epg_t*)malloc( sizeof(vlc_epg_t) );
+    if( p_epg )
+        vlc_epg_Init( p_epg, psz_name );
     return p_epg;
 }
 static inline void vlc_epg_Delete( vlc_epg_t *p_epg )