From 4217d72d01c21fa1fc9a196e162206a72eb182b3 Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Wed, 23 Oct 2002 20:26:32 +0000 Subject: final c++ -> c coding style fixes, libxine compiles now CVS patchset: 2971 CVS date: 2002/10/23 20:26:32 --- src/demuxers/demux_asf.c | 8 ++++---- src/demuxers/demux_avi.c | 11 ++++++----- src/demuxers/demux_mpeg.c | 3 +-- src/demuxers/demux_qt.c | 6 +++++- src/demuxers/qtpalette.h | 8 +++++--- src/input/input_dvd.c | 21 +++++++++++++-------- src/libw32dll/wine/avifmt.h | 2 +- src/libw32dll/wine/windef.h | 2 +- src/xine-utils/memcpy.c | 5 ++++- src/xine-utils/xineutils.h | 26 ++++---------------------- 10 files changed, 44 insertions(+), 48 deletions(-) diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 72e40b0c7..fc6af91df 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_asf.c,v 1.69 2002/10/22 23:39:53 tmattern Exp $ + * $Id: demux_asf.c,v 1.70 2002/10/23 20:26:32 guenter Exp $ * * demultiplexer for asf streams * @@ -1485,9 +1485,9 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, return &this->demux_plugin; } - static char *get_description (demux_class_t *this_gen) { - return "ASF demux plugin"; - } +static char *get_description (demux_class_t *this_gen) { + return "ASF demux plugin"; +} static char *get_identifier (demux_class_t *this_gen) { return "ASF"; diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index d507b3e1e..40cdabce5 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_avi.c,v 1.126 2002/10/22 17:14:47 jkeil Exp $ + * $Id: demux_avi.c,v 1.127 2002/10/23 20:26:32 guenter Exp $ * * demultiplexer for avi streams * @@ -64,10 +64,11 @@ #include "xineutils.h" #include "demux.h" -#define WINE_TYPEDEFS_ONLY -#include "libw32dll/wine/avifmt.h" -#include "libw32dll/wine/windef.h" -#include "libw32dll/wine/vfw.h" +/* + * stolen from wine headers + */ + +#define AVIIF_KEYFRAME 0x00000010L /* #define LOG diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index d2b24a278..d6cc4b031 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg.c,v 1.83 2002/10/23 20:22:42 guenter Exp $ + * $Id: demux_mpeg.c,v 1.84 2002/10/23 20:26:33 guenter Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -1145,7 +1145,6 @@ static int demux_mpeg_get_stream_length (demux_plugin_t *this_gen) { static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *stream, input_plugin_t *input) { demux_mpeg_t *this; - config_values_t *config = ((demux_mpeg_class_t *) class_gen)->config; this = xine_xmalloc (sizeof (demux_mpeg_t)); this->stream = stream; diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 49de24215..8a8519659 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -30,7 +30,7 @@ * build_frame_table * free_qt_info * - * $Id: demux_qt.c,v 1.99 2002/10/23 10:48:17 jkeil Exp $ + * $Id: demux_qt.c,v 1.100 2002/10/23 20:26:33 guenter Exp $ * */ @@ -1658,13 +1658,17 @@ printf ("sending qt headers\n"); */ if( this->qt->video_type == BUF_VIDEO_MSMPEG4_V1 ) this->qt->video_type = BUF_VIDEO_MPEG4; +#if 0 if( !this->qt->video_type && this->qt->video_codec ) xine_report_codec( this->stream, XINE_CODEC_VIDEO, this->bih.biCompression, 0, 0); +#endif this->qt->audio_type = formattag_to_buf_audio(this->qt->audio_codec); +#if 0 if( !this->qt->audio_type && this->qt->audio_codec ) xine_report_codec( this->stream, XINE_CODEC_AUDIO, this->qt->audio_codec, 0, 0); +#endif /* load stream information */ this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = diff --git a/src/demuxers/qtpalette.h b/src/demuxers/qtpalette.h index 9966e8eb8..18b47c697 100644 --- a/src/demuxers/qtpalette.h +++ b/src/demuxers/qtpalette.h @@ -1,6 +1,8 @@ -// Default Palettes for Quicktime Files -// Automatically generated from a utility derived from XAnim: -// http://xanim.va.pubnix.com/home.html +/* + * Default Palettes for Quicktime Files + * Automatically generated from a utility derived from XAnim: + * http://xanim.va.pubnix.com/home.html + */ #ifndef QTPALETTE_H #define QTPALETTE_H diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 5a4dfb226..aee52480b 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.98 2002/10/23 11:59:52 jcdutton Exp $ + * $Id: input_dvd.c,v 1.99 2002/10/23 20:26:34 guenter Exp $ * */ @@ -209,7 +209,7 @@ void read_ahead_cb(void *this_gen, xine_cfg_entry_t *entry) { return; class->read_ahead_flag = entry->num_value; -// dvdnav_set_readahead_flag(this->dvdnav, entry->num_value); + /* dvdnav_set_readahead_flag(this->dvdnav, entry->num_value);*/ } void region_changed_cb (void *this_gen, xine_cfg_entry_t *entry) { @@ -790,7 +790,7 @@ static void dvd_event_listener(void *this_gen, const xine_event_t *event) { dvd_input_class_t *class = (dvd_input_class_t*)this->input_plugin.input_class; config_values_t *config = class->config; /* Pointer to XineRC config file */ printf("input_dvd:dvd_event_listener: EVENT=%d\n", event->type); -// dvd_input_class_t *class = (dvd_input_class_t*)class_gen; + /* dvd_input_class_t *class = (dvd_input_class_t*)class_gen; */ if(!this->dvdnav) { return; } @@ -943,11 +943,13 @@ static void dvd_event_listener(void *this_gen, const xine_event_t *event) { } if (this->stream->spu_decoder_plugin->get_nav_pci(this->stream->spu_decoder_plugin, &nav_pci) ) { /* FIXME Implement mouse move event */ - //xine_input_event_t *input_event = (xine_input_event_t*) event; - /* printf("input_dvd: Mouse move (x,y) = (%i,%i)\n", input_event->x, - input_event->y); */ - //dvdnav_mouse_select(this->dvdnav, &nav_pci, input_event->x, input_event->y); - //xine_dvd_send_button_update(this, 0); +#if 0 + xine_input_event_t *input_event = (xine_input_event_t*) event; + printf("input_dvd: Mouse move (x,y) = (%i,%i)\n", input_event->x, + input_event->y); + dvdnav_mouse_select(this->dvdnav, &nav_pci, input_event->x, input_event->y); + xine_dvd_send_button_update(this, 0); +#endif } } break; @@ -1656,6 +1658,9 @@ static void *init_class (xine_t *xine, void *data) { /* * $Log: input_dvd.c,v $ + * Revision 1.99 2002/10/23 20:26:34 guenter + * final c++ -> c coding style fixes, libxine compiles now + * * Revision 1.98 2002/10/23 11:59:52 jcdutton * Oops...will compile now. * diff --git a/src/libw32dll/wine/avifmt.h b/src/libw32dll/wine/avifmt.h index d7450f270..fad30a1fe 100644 --- a/src/libw32dll/wine/avifmt.h +++ b/src/libw32dll/wine/avifmt.h @@ -218,7 +218,7 @@ typedef struct { } AVIStreamHeader; /* Flags for index */ -#define AVIIF_LIST 0x00000001L // chunk is a 'LIST' +#define AVIIF_LIST 0x00000001L // chunk is a 'LIST' #define AVIIF_KEYFRAME 0x00000010L // this frame is a key frame. #define AVIIF_NOTIME 0x00000100L // this frame doesn't take any time diff --git a/src/libw32dll/wine/windef.h b/src/libw32dll/wine/windef.h index 76966c5da..d0e4cefc5 100644 --- a/src/libw32dll/wine/windef.h +++ b/src/libw32dll/wine/windef.h @@ -323,7 +323,7 @@ typedef HANDLE GLOBALHANDLE; typedef HANDLE LOCALHANDLE; /* Callback function pointers types */ -//WIN_BOOL CALLBACK DATEFMT_ENUMPROCA(LPSTR); +/*WIN_BOOL CALLBACK DATEFMT_ENUMPROCA(LPSTR); */ typedef WIN_BOOL CALLBACK (* DATEFMT_ENUMPROCA)(LPSTR); typedef WIN_BOOL CALLBACK (* DATEFMT_ENUMPROCW)(LPWSTR); diff --git a/src/xine-utils/memcpy.c b/src/xine-utils/memcpy.c index 0b4e28c2c..c86a64b5a 100644 --- a/src/xine-utils/memcpy.c +++ b/src/xine-utils/memcpy.c @@ -123,7 +123,10 @@ __asm__ __volatile__(\ } /* linux kernel __memcpy (from: /include/asm/string.h) */ -static inline void * __memcpy(void * to, const void * from, size_t n) +static __inline__ void * __memcpy ( + void * to, + const void * from, + size_t n) { int d0, d1, d2; diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h index 1da508c61..ea4c45e4f 100644 --- a/src/xine-utils/xineutils.h +++ b/src/xine-utils/xineutils.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xineutils.h,v 1.23 2002/09/16 21:49:35 miguelfreitas Exp $ + * $Id: xineutils.h,v 1.24 2002/10/23 20:26:35 guenter Exp $ * */ #ifndef XINEUTILS_H @@ -563,24 +563,6 @@ void xine_probe_fast_memcpy(config_values_t *config); #endif - - /* Debugging/Monitoring */ - -#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || !defined(__GNUC__)) && !defined(__cplusplus) -#define xlerror(...) do { \ - printf("XINE lib %s:%d:(%s) ", __FILE__, __LINE__, __XINE_FUNCTION__); \ - printf(__VA_ARGS__); \ - printf("\n"); \ -} while (0) -#else -#define xlerror(args...) do { \ - printf("XINE lib %s:%d:(%s) ", __FILE__, __LINE__, __XINE_FUNCTION__); \ - printf(##args); \ - printf("\n"); \ -} while (0) -#endif - - /* * Debug stuff */ @@ -641,7 +623,7 @@ void xine_strdupa(char *dest, char *src); #ifdef HAVE_STRPBRK #define xine_strpbrk strpbrk #else -static inline char *_x_strpbrk(const char *s, const char *accept) { +static __inline__ char *_x_strpbrk(const char *s, const char *accept) { while(*s != '\0') { const char *a = accept; @@ -659,7 +641,7 @@ static inline char *_x_strpbrk(const char *s, const char *accept) { #ifdef HAVE_STRSEP #define xine_strsep strsep #else -static inline char *_x_strsep(char **stringp, const char *delim) { +static __inline__ char *_x_strsep(char **stringp, const char *delim) { char *begin, *end; begin = *stringp; @@ -699,7 +681,7 @@ static inline char *_x_strsep(char **stringp, const char *delim) { #ifdef HAVE_SETENV #define xine_setenv setenv #else -static inline void _x_setenv(const char *name, const char *val, int _xx) +static __inline__ void _x_setenv(const char *name, const char *val, int _xx) { int len = strlen(name) + strlen(val) + 2; char *env; -- cgit v1.2.3