X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=include%2Fvlc_common.h;h=a231d8343602e79eec4f0cbaf67b8a8cc206999b;hb=2f7f4a7456878a16c0b37df916be545c9ef22273;hp=d0efdf047b9e301c2c99e22861cf54bfc17035ec;hpb=e3d6b0ba195ffbdf2b5eee1df90bb5240da60c2c;p=vlc diff --git a/include/vlc_common.h b/include/vlc_common.h index d0efdf047b..a231d83436 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -139,14 +139,10 @@ static inline void __vlc_fourcc_to_char( vlc_fourcc_t fcc, char *psz_fourcc ) typedef struct vlc_list_t vlc_list_t; typedef struct vlc_object_t vlc_object_t; typedef struct libvlc_int_t libvlc_int_t; -typedef struct variable_t variable_t; typedef struct date_t date_t; typedef struct dict_entry_t dict_entry_t; typedef struct dict_t dict_t; -/* Messages */ -typedef struct msg_subscription_t msg_subscription_t; - /* Playlist */ /* FIXME */ @@ -183,7 +179,6 @@ typedef struct config_category_t config_category_t; /* Interface */ typedef struct intf_thread_t intf_thread_t; typedef struct intf_sys_t intf_sys_t; -typedef struct intf_console_t intf_console_t; typedef struct intf_msg_t intf_msg_t; typedef struct interaction_t interaction_t; typedef struct interaction_dialog_t interaction_dialog_t; @@ -377,18 +372,14 @@ typedef struct meta_engine_t meta_engine_t; /* stat/lstat/fstat */ #ifdef WIN32 -# ifdef UNDER_CE -# undef _STAT_DEFINED -# endif #include + # ifndef UNDER_CE struct _stati64; #define stat _stati64 #define fstat _fstati64 -# else -# define stat _stat -# define fstat _fstat -# endif +#endif + /* You should otherwise use utf8_stat and utf8_lstat. */ #else struct stat; @@ -503,11 +494,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ #if defined( WIN32 ) || defined( UNDER_CE ) # define WIN32_LEAN_AND_MEAN # include -# if defined( UNDER_CE ) -# define IS_WINNT 0 -# else -# define IS_WINNT ( GetVersion() < 0x80000000 ) -# endif #endif #include "vlc_mtime.h" @@ -523,8 +509,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ * these members are common for all vlc objects \ */ \ /**@{*/ \ - int i_object_id; \ - int i_object_type; \ const char *psz_object_type; \ char *psz_object_name; \ \ @@ -535,7 +519,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ /* Object properties */ \ volatile bool b_error; /**< set by the object */ \ volatile bool b_die; /**< set by the outside */ \ - bool b_force; /**< set by the outside (eg. module_Need()) */ \ + bool b_force; /**< set by the outside (eg. module_need()) */ \ \ /** Just a reminder so that people don't cast garbage */ \ bool be_sure_to_add_VLC_COMMON_MEMBERS_to_struct; \ @@ -617,22 +601,7 @@ static inline uint8_t clip_uint8_vlc( int32_t a ) else return a; } -/* Malloc with automatic error */ -#define MALLOC_VOID( var, type ) do { var = (type*)malloc( sizeof( type) ); \ - if( !var ) return; } while(0) -#define MALLOC_NULL( var, type ) do { var = (type*)malloc( sizeof( type) ); \ - if( !var ) return NULL; } while(0) -#define MALLOC_ERR( var, type ) do { var = (type*)malloc( sizeof( type) ); \ - if( !var ) return VLC_ENOMEM; } while(0) -#define MALLOC_GOTOERR( var, type ) do { var = (type*)malloc( sizeof( type) ); \ - if( !var ) goto error; } while(0) -#define DECMALLOC_VOID( var, type ) type* var = (type*)malloc( sizeof(type) );\ - if( !var ) return; -#define DECMALLOC_ERR( var, type ) type* var = (type*)malloc( sizeof(type) );\ - if( !var ) return VLC_ENOMEM; -#define DECMALLOC_NULL( var, type ) type* var = (type*)malloc( sizeof(type) );\ - if( !var ) return NULL; - +/* Free and set set the variable to NULL */ #define FREENULL(a) do { free( a ); a = NULL; } while(0) #define EMPTY_STR(str) (!str || !*str) @@ -769,7 +738,6 @@ VLC_EXPORT( size_t, vlc_strlcpy, ( char *, const char *, size_t ) ); VLC_EXPORT( long long, vlc_strtoll, ( const char *nptr, char **endptr, int base ) LIBVLC_USED ); VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) LIBVLC_USED ); -char *vlc_strsep( char **, const char * ); #if defined(WIN32) || defined(UNDER_CE) /* win32, cl and icl support */