From 1b7ce2697e98a3fcff4f78d1610f7f0268cd47c1 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 6 Dec 2002 10:10:40 +0000 Subject: [PATCH] * ./src/*, ./include/*: fixed a bunch of badly initialized structures, a few signed/unsigned comparisons, and removed trailing spaces here and there. --- include/aout_internal.h | 6 +++--- include/audio_output.h | 16 +++++++-------- include/configuration.h | 38 +++++++++++++++++------------------ include/input_ext-intf.h | 7 +++---- include/modules_inner.h | 6 ++++-- src/audio_output/common.c | 21 ++++++++++--------- src/audio_output/dec.c | 4 ++-- src/audio_output/filters.c | 30 +++++++++++++-------------- src/audio_output/input.c | 4 ++-- src/audio_output/intf.c | 6 +++--- src/audio_output/mixer.c | 13 ++++++------ src/audio_output/output.c | 11 +++++----- src/input/input.c | 6 ++---- src/input/input_clock.c | 18 ++++++++--------- src/input/input_ext-dec.c | 4 ++-- src/input/input_ext-plugins.c | 14 +++++++------ src/libvlc.h | 20 +++++++++++------- src/misc/modules_plugin.h.in | 14 ++++++------- src/misc/objects.c | 8 ++++---- src/misc/threads.c | 24 +++++++++++----------- src/misc/variables.c | 36 ++++++++++++++++----------------- src/playlist/playlist.c | 6 +++--- src/video_output/video_text.c | 6 ++++-- 23 files changed, 163 insertions(+), 155 deletions(-) diff --git a/include/aout_internal.h b/include/aout_internal.h index a2ff0c6c7b..f0cb59ebc5 100644 --- a/include/aout_internal.h +++ b/include/aout_internal.h @@ -2,7 +2,7 @@ * aout_internal.h : internal defines for audio output ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: aout_internal.h,v 1.34 2002/11/14 22:38:46 massiot Exp $ + * $Id: aout_internal.h,v 1.35 2002/12/06 10:10:40 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -275,7 +275,7 @@ void aout_OutputDelete( aout_instance_t * p_aout ); VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, vlc_bool_t ) ); /* From common.c : */ -VLC_EXPORT( int, aout_FormatNbChannels, ( const audio_sample_format_t * p_format ) ); +VLC_EXPORT( unsigned int, aout_FormatNbChannels, ( const audio_sample_format_t * p_format ) ); VLC_EXPORT( void, aout_FormatPrepare, ( audio_sample_format_t * p_format ) ); VLC_EXPORT( void, aout_FormatPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format ) ); VLC_EXPORT( void, aout_FormatsPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format1, const audio_sample_format_t * p_format2 ) ); diff --git a/include/audio_output.h b/include/audio_output.h index 4a5d2bb8e4..c4b11ad4f0 100644 --- a/include/audio_output.h +++ b/include/audio_output.h @@ -2,7 +2,7 @@ * audio_output.h : audio output interface ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: audio_output.h,v 1.72 2002/11/28 23:24:14 massiot Exp $ + * $Id: audio_output.h,v 1.73 2002/12/06 10:10:40 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -32,10 +32,10 @@ struct audio_sample_format_t unsigned int i_rate; /* Describes the channels configuration of the samples (ie. number of * channels which are available in the buffer, and positions). */ - u32 i_physical_channels; + uint32_t i_physical_channels; /* Describes from which original channels, before downmixing, the * buffer is derived. */ - u32 i_original_channels; + uint32_t i_original_channels; /* Optional - for A/52, SPDIF and DTS types : */ /* Bytes used by one compressed frame, depends on bitrate. */ unsigned int i_bytes_per_frame; @@ -77,7 +77,7 @@ struct audio_sample_format_t /* * Fixed-point format: 0xABBBBBBB * A == whole part (sign + 3 bits) - * B == fractional part (28 bits) + * B == fractional part (28 bits) * * Values are signed two's complement, so the effective range is: * 0x80000000 to 0x7fffffff @@ -88,7 +88,7 @@ struct audio_sample_format_t * * 28 bits of fractional accuracy represent about * 8.6 digits of decimal accuracy. - * + * * Fixed-point numbers can be added or subtracted as normal * integers, but multiplication requires shifting the 64-bit result * from 56 fractional bits back to 28 (and rounding.) @@ -130,7 +130,7 @@ struct aout_buffer_t /* i_size is the real size of the buffer (used for debug ONLY), i_nb_bytes * is the number of significative bytes in it. */ size_t i_size, i_nb_bytes; - int i_nb_samples; + unsigned int i_nb_samples; mtime_t start_date, end_date; struct aout_buffer_t * p_next; @@ -140,7 +140,7 @@ struct aout_buffer_t #define AOUT_SPDIF_SIZE 6144 /* Number of samples in an A/52 frame. */ -#define A52_FRAME_NB 1536 +#define A52_FRAME_NB 1536 /***************************************************************************** * audio_date_t : date incrementation without long-term rounding errors diff --git a/include/configuration.h b/include/configuration.h index 43a079bff9..881e3b106a 100644 --- a/include/configuration.h +++ b/include/configuration.h @@ -4,7 +4,7 @@ * It includes functions allowing to declare, get or set configuration options. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: configuration.h,v 1.18 2002/07/31 22:54:21 sam Exp $ + * $Id: configuration.h,v 1.19 2002/12/06 10:10:40 sam Exp $ * * Authors: Gildas Bazin * @@ -12,7 +12,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -115,42 +115,42 @@ VLC_EXPORT( void, config_UnsetCallbacks, ( module_config_t * ) ); *****************************************************************************/ #define add_category_hint( text, longtext ) \ - { module_config_t tmp = { CONFIG_HINT_CATEGORY, NULL, NULL, '\0', text, longtext }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_HINT_CATEGORY, NULL, NULL, '\0', text, longtext, NULL, 0, 0.0, NULL, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_subcategory_hint( text, longtext ) \ - { module_config_t tmp = { CONFIG_HINT_SUBCATEGORY, NULL, NULL, '\0', text, longtext }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_HINT_SUBCATEGORY, NULL, NULL, '\0', text, longtext, NULL, 0, 0.0, NULL, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define end_subcategory_hint \ - { module_config_t tmp = { CONFIG_HINT_SUBCATEGORY_END, NULL, NULL, '\0' }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_HINT_SUBCATEGORY_END, NULL, NULL, '\0', NULL, NULL, NULL, 0, 0.0, NULL, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_usage_hint( text ) \ - { module_config_t tmp = { CONFIG_HINT_USAGE, NULL, NULL, '\0', text }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_HINT_USAGE, NULL, NULL, '\0', text, NULL, NULL, 0, 0.0, NULL, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_string( name, psz_value, p_callback, text, longtext ) \ - { module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_string_from_list( name, psz_value, ppsz_list, p_callback, text, \ longtext ) \ - { module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback, ppsz_list }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback, ppsz_list, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_file( name, psz_value, p_callback, text, longtext ) \ - { module_config_t tmp = { CONFIG_ITEM_FILE, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_FILE, NULL, name, '\0', text, longtext, psz_value, 0, 0, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_module( name, psz_caps, psz_value, p_callback, text, longtext ) \ - { module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, '\0', text, longtext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, '\0', text, longtext, psz_value, 0, 0, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_integer( name, i_value, p_callback, text, longtext ) \ - { module_config_t tmp = { CONFIG_ITEM_INTEGER, NULL, name, '\0', text, longtext, NULL, i_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_INTEGER, NULL, name, '\0', text, longtext, NULL, i_value, 0, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_float( name, f_value, p_callback, text, longtext ) \ - { module_config_t tmp = { CONFIG_ITEM_FLOAT, NULL, name, '\0', text, longtext, NULL, 0, f_value, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_FLOAT, NULL, name, '\0', text, longtext, NULL, 0, f_value, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_bool( name, b_value, p_callback, text, longtext ) \ - { module_config_t tmp = { CONFIG_ITEM_BOOL, NULL, name, '\0', text, longtext, NULL, b_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_BOOL, NULL, name, '\0', text, longtext, NULL, b_value, 0, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ /* These should be seldom used. They were added just to provide easy shortcuts * for the command line interface */ #define add_string_with_short( name, ch, psz_value, p_callback, text, ltext ) \ - { module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, ch, text, ltext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, ch, text, ltext, psz_value, 0, 0, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_file_with_short( name, ch, psz_value, p_callback, text, ltext ) \ - { module_config_t tmp = { CONFIG_ITEM_FILE, NULL, name, ch, text, ltext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_FILE, NULL, name, ch, text, ltext, psz_value, 0, 0, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_module_with_short( name, ch, psz_caps, psz_value, p_callback, \ text, ltext) \ - { module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, ch, text, ltext, psz_value, 0, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_MODULE, psz_caps, name, ch, text, ltext, psz_value, 0, 0, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_integer_with_short( name, ch, i_value, p_callback, text, ltext ) \ - { module_config_t tmp = { CONFIG_ITEM_INTEGER, NULL, name, ch, text, ltext, NULL, i_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_INTEGER, NULL, name, ch, text, ltext, NULL, i_value, 0, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_float_with_short( name, ch, f_value, p_callback, text, ltext ) \ - { module_config_t tmp = { CONFIG_ITEM_FLOAT, NULL, name, ch, text, ltext, NULL, 0, f_value, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_FLOAT, NULL, name, ch, text, ltext, NULL, 0, f_value, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ #define add_bool_with_short( name, ch, b_value, p_callback, text, ltext ) \ - { module_config_t tmp = { CONFIG_ITEM_BOOL, NULL, name, ch, text, ltext, NULL, b_value, 0, p_callback }; p_config[ i_config ] = tmp; } i_config++ + { module_config_t tmp = { CONFIG_ITEM_BOOL, NULL, name, ch, text, ltext, NULL, b_value, 0, p_callback, NULL, NULL, VLC_FALSE }; p_config[ i_config ] = tmp; } i_config++ diff --git a/include/input_ext-intf.h b/include/input_ext-intf.h index 28be956d17..0288182ea6 100644 --- a/include/input_ext-intf.h +++ b/include/input_ext-intf.h @@ -4,7 +4,7 @@ * control the pace of reading. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: input_ext-intf.h,v 1.78 2002/11/11 14:39:11 sam Exp $ + * $Id: input_ext-intf.h,v 1.79 2002/12/06 10:10:40 sam Exp $ * * Authors: Christophe Massiot * @@ -367,9 +367,8 @@ struct input_thread_t /***************************************************************************** * Prototypes *****************************************************************************/ -#define input_CreateThread(a,b,c) __input_CreateThread(VLC_OBJECT(a),b,c) -input_thread_t * __input_CreateThread ( vlc_object_t *, - playlist_item_t *, int * ); +#define input_CreateThread(a,b) __input_CreateThread(VLC_OBJECT(a),b) +input_thread_t * __input_CreateThread ( vlc_object_t *, playlist_item_t * ); void input_StopThread ( input_thread_t * ); void input_DestroyThread ( input_thread_t * ); diff --git a/include/modules_inner.h b/include/modules_inner.h index 91e42f261e..4aef11f423 100644 --- a/include/modules_inner.h +++ b/include/modules_inner.h @@ -2,7 +2,7 @@ * modules_inner.h : Macros used from within a module. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: modules_inner.h,v 1.33 2002/11/18 18:05:13 sam Exp $ + * $Id: modules_inner.h,v 1.34 2002/12/06 10:10:40 sam Exp $ * * Authors: Samuel Hocevar * @@ -113,7 +113,9 @@ p_submodule->pp_shortcuts[ i_shortcut ] = NULL; \ } \ { \ - module_config_t tmp = { CONFIG_HINT_END, NULL, NULL, '\0' }; \ + module_config_t tmp = { CONFIG_HINT_END, NULL, NULL, '\0', \ + NULL, NULL, NULL, 0, 0.0, NULL, \ + NULL, NULL, VLC_FALSE }; \ p_config[ i_config ] = tmp; \ } \ config_Duplicate( p_module, p_config ); \ diff --git a/src/audio_output/common.c b/src/audio_output/common.c index 39990c2c56..5f528b2764 100644 --- a/src/audio_output/common.c +++ b/src/audio_output/common.c @@ -2,7 +2,7 @@ * common.c : audio output management of common data structures ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: common.c,v 1.9 2002/11/14 22:38:48 massiot Exp $ + * $Id: common.c,v 1.10 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -95,15 +95,15 @@ void aout_Delete( aout_instance_t * p_aout ) /***************************************************************************** * aout_FormatNbChannels : return the number of channels *****************************************************************************/ -int aout_FormatNbChannels( const audio_sample_format_t * p_format ) +unsigned int aout_FormatNbChannels( const audio_sample_format_t * p_format ) { - static const u32 pi_channels[] = + static const uint32_t pi_channels[] = { AOUT_CHAN_CENTER, AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT, AOUT_CHAN_REARCENTER, AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_LFE }; - int i_nb = 0, i; + unsigned int i_nb = 0, i; - for ( i = 0; i < sizeof(pi_channels)/sizeof(u32); i++ ) + for ( i = 0; i < sizeof(pi_channels)/sizeof(uint32_t); i++ ) { if ( p_format->i_physical_channels & pi_channels[i] ) i_nb++; } @@ -263,7 +263,7 @@ void aout_FormatsPrint( aout_instance_t * p_aout, const char * psz_text, * aout_FifoInit : initialize the members of a FIFO *****************************************************************************/ void aout_FifoInit( aout_instance_t * p_aout, aout_fifo_t * p_fifo, - u32 i_rate ) + uint32_t i_rate ) { p_fifo->p_first = NULL; p_fifo->pp_last = &p_fifo->p_first; @@ -284,7 +284,7 @@ void aout_FifoPush( aout_instance_t * p_aout, aout_fifo_t * p_fifo, { p_buffer->start_date = aout_DateGet( &p_fifo->end_date ); p_buffer->end_date = aout_DateIncrement( &p_fifo->end_date, - p_buffer->i_nb_samples ); + p_buffer->i_nb_samples ); } else { @@ -354,6 +354,7 @@ mtime_t aout_FifoFirstDate( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) aout_buffer_t * aout_FifoPop( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) { aout_buffer_t * p_buffer; + p_buffer = p_fifo->p_first; if ( p_buffer == NULL ) return NULL; p_fifo->p_first = p_buffer->p_next; @@ -389,7 +390,7 @@ void aout_FifoDestroy( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) /***************************************************************************** * aout_DateInit : set the divider of an audio_date_t *****************************************************************************/ -void aout_DateInit( audio_date_t * p_date, u32 i_divider ) +void aout_DateInit( audio_date_t * p_date, uint32_t i_divider ) { p_date->date = 0; p_date->i_divider = i_divider; @@ -425,7 +426,7 @@ mtime_t aout_DateGet( const audio_date_t * p_date ) * aout_DateIncrement : increment the date and return the result, taking * into account rounding errors *****************************************************************************/ -mtime_t aout_DateIncrement( audio_date_t * p_date, u32 i_nb_samples ) +mtime_t aout_DateIncrement( audio_date_t * p_date, uint32_t i_nb_samples ) { mtime_t i_dividend = (mtime_t)i_nb_samples * 1000000; p_date->date += i_dividend / p_date->i_divider; diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c index 6dba1437e3..8a5d9277df 100644 --- a/src/audio_output/dec.c +++ b/src/audio_output/dec.c @@ -2,7 +2,7 @@ * dec.c : audio output API towards decoders ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: dec.c,v 1.2 2002/11/14 22:38:48 massiot Exp $ + * $Id: dec.c,v 1.3 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c index aca27b7014..673eb8184b 100644 --- a/src/audio_output/filters.c +++ b/src/audio_output/filters.c @@ -2,7 +2,7 @@ * filters.c : audio output filters management ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: filters.c,v 1.14 2002/11/14 22:38:48 massiot Exp $ + * $Id: filters.c,v 1.15 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -30,7 +30,7 @@ #include #ifdef HAVE_ALLOCA_H -# include +# include #endif #include "audio_output.h" @@ -66,7 +66,7 @@ static aout_filter_t * FindFilter( aout_instance_t * p_aout, } /***************************************************************************** - * SplitConversion: split a conversion in two parts + * SplitConversion: split a conversion in two parts ***************************************************************************** * Returns the number of conversions required by the first part - 0 if only * one conversion was asked. @@ -74,10 +74,9 @@ static aout_filter_t * FindFilter( aout_instance_t * p_aout, * developer passed SplitConversion( toto, titi, titi, ... ). That is legal. * SplitConversion( toto, titi, toto, ... ) isn't. *****************************************************************************/ -static int SplitConversion( aout_instance_t * p_aout, - const audio_sample_format_t * p_input_format, - const audio_sample_format_t * p_output_format, - audio_sample_format_t * p_middle_format ) +static int SplitConversion( const audio_sample_format_t * p_input_format, + const audio_sample_format_t * p_output_format, + audio_sample_format_t * p_middle_format ) { vlc_bool_t b_format = (p_input_format->i_format != p_output_format->i_format); @@ -150,7 +149,7 @@ int aout_FiltersCreatePipeline( aout_instance_t * p_aout, /* We'll have to split the conversion. We always do the downmixing * before the resampling, because the audio decoder can probably do it * for us. */ - i_nb_conversions = SplitConversion( p_aout, p_input_format, + i_nb_conversions = SplitConversion( p_input_format, p_output_format, &temp_format ); if ( !i_nb_conversions ) { @@ -163,10 +162,8 @@ int aout_FiltersCreatePipeline( aout_instance_t * p_aout, if ( pp_filters[0] == NULL && i_nb_conversions == 2 ) { /* Try with only one conversion. */ - SplitConversion( p_aout, p_input_format, &temp_format, - &temp_format ); - pp_filters[0] = FindFilter( p_aout, p_input_format, - &temp_format ); + SplitConversion( p_input_format, &temp_format, &temp_format ); + pp_filters[0] = FindFilter( p_aout, p_input_format, &temp_format ); } if ( pp_filters[0] == NULL ) { @@ -182,9 +179,8 @@ int aout_FiltersCreatePipeline( aout_instance_t * p_aout, if ( pp_filters[1] == NULL ) { /* Try to split the conversion. */ - i_nb_conversions = SplitConversion( p_aout, - &pp_filters[0]->output, - p_output_format, &temp_format ); + i_nb_conversions = SplitConversion( &pp_filters[0]->output, + p_output_format, &temp_format ); if ( !i_nb_conversions ) { vlc_object_detach( pp_filters[0] ); @@ -254,6 +250,8 @@ void aout_FiltersHintBuffers( aout_instance_t * p_aout, { int i; + (void)p_aout; /* unused */ + for ( i = i_nb_filters - 1; i >= 0; i-- ) { aout_filter_t * p_filter = pp_filters[i]; diff --git a/src/audio_output/input.c b/src/audio_output/input.c index ed3164ce58..c44266ccf9 100644 --- a/src/audio_output/input.c +++ b/src/audio_output/input.c @@ -2,7 +2,7 @@ * input.c : internal management of input streams for the audio output ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: input.c,v 1.25 2002/11/26 12:09:20 massiot Exp $ + * $Id: input.c,v 1.26 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c index 6ddc1fe512..8bbc3a53fe 100644 --- a/src/audio_output/intf.c +++ b/src/audio_output/intf.c @@ -2,7 +2,7 @@ * intf.c : audio output API towards the interface modules ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: intf.c,v 1.8 2002/11/14 22:38:48 massiot Exp $ + * $Id: intf.c,v 1.9 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -41,7 +41,7 @@ * mixer is running, so we need the mixer lock (too). * * Here is a schematic of the i_volume range : - * + * * |------------------------------+---------------------------------------| * 0 pi_soft 1024 * diff --git a/src/audio_output/mixer.c b/src/audio_output/mixer.c index e251cc2932..88c4ceab35 100644 --- a/src/audio_output/mixer.c +++ b/src/audio_output/mixer.c @@ -2,7 +2,7 @@ * mixer.c : audio output mixing operations ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: mixer.c,v 1.20 2002/11/13 20:51:04 sam Exp $ + * $Id: mixer.c,v 1.21 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -30,7 +30,7 @@ #include #ifdef HAVE_ALLOCA_H -# include +# include #endif #include "audio_output.h" @@ -118,7 +118,7 @@ static int MixBuffer( aout_instance_t * p_aout ) aout_FifoSet( p_aout, &p_aout->output.fifo, 0 ); aout_DateSet( &exact_start_date, 0 ); start_date = 0; - } + } vlc_mutex_unlock( &p_aout->output_fifo_lock ); @@ -140,7 +140,8 @@ static int MixBuffer( aout_instance_t * p_aout ) { msg_Warn( p_aout, "input PTS is out of range ("I64Fd"), " "trashing", mdate() - p_buffer->start_date ); - aout_BufferFree( aout_FifoPop( p_aout, p_fifo ) ); + p_buffer = aout_FifoPop( p_aout, p_fifo ); + aout_BufferFree( p_buffer ); p_buffer = p_fifo->p_first; } @@ -288,7 +289,7 @@ static int MixBuffer( aout_instance_t * p_aout ) /* Run the mixer. */ aout_BufferAlloc( &p_aout->mixer.output_alloc, - ((u64)p_aout->output.i_nb_samples * 1000000) + ((uint64_t)p_aout->output.i_nb_samples * 1000000) / p_aout->output.output.i_rate, /* This is a bit kludgy, but is actually only used * for the S/PDIF dummy mixer : */ diff --git a/src/audio_output/output.c b/src/audio_output/output.c index 025338c7cc..6d68d8dd56 100644 --- a/src/audio_output/output.c +++ b/src/audio_output/output.c @@ -2,7 +2,7 @@ * output.c : internal management of output streams for the audio output ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: output.c,v 1.24 2002/11/14 22:38:48 massiot Exp $ + * $Id: output.c,v 1.25 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -111,9 +111,9 @@ int aout_OutputNew( aout_instance_t * p_aout, var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart, NULL ); } - else if ( p_aout->output.output.i_physical_channels == + else if ( p_aout->output.output.i_physical_channels == (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT) - && p_aout->output.output.i_original_channels == + && p_aout->output.output.i_original_channels == (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT) ) { /* Stereo - create the audio-channels variable. */ @@ -138,7 +138,8 @@ int aout_OutputNew( aout_instance_t * p_aout, aout_FormatPrepare( &p_aout->output.output ); /* Prepare FIFO. */ - aout_FifoInit( p_aout, &p_aout->output.fifo, p_aout->output.output.i_rate ); + aout_FifoInit( p_aout, &p_aout->output.fifo, + p_aout->output.output.i_rate ); vlc_mutex_unlock( &p_aout->output_fifo_lock ); diff --git a/src/input/input.c b/src/input/input.c index ed39114e7b..57b7acfb0e 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -4,7 +4,7 @@ * decoders. ***************************************************************************** * Copyright (C) 1998-2002 VideoLAN - * $Id: input.c,v 1.216 2002/12/03 23:36:41 gitan Exp $ + * $Id: input.c,v 1.217 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -61,11 +61,9 @@ static void EndThread ( input_thread_t *p_input ); ***************************************************************************** * This function creates a new input, and returns a pointer * to its description. On error, it returns NULL. - * If pi_status is NULL, then the function will block until the thread is ready. - * If not, it will be updated using one of the THREAD_* constants. *****************************************************************************/ input_thread_t *__input_CreateThread( vlc_object_t *p_parent, - playlist_item_t *p_item, int *pi_status ) + playlist_item_t *p_item ) { input_thread_t * p_input; /* thread descriptor */ input_info_category_t * p_info; diff --git a/src/input/input_clock.c b/src/input/input_clock.c index 1b9f7e2647..f7e679d081 100644 --- a/src/input/input_clock.c +++ b/src/input/input_clock.c @@ -2,7 +2,7 @@ * input_clock.c: Clock/System date convertions, stream management ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: input_clock.c,v 1.34 2002/11/11 14:39:12 sam Exp $ + * $Id: input_clock.c,v 1.35 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -77,8 +77,6 @@ /***************************************************************************** * ClockToSysdate: converts a movie clock to system date *****************************************************************************/ -static void ClockNewRef( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm, - mtime_t i_clock, mtime_t i_sysdate ); static mtime_t ClockToSysdate( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm, mtime_t i_clock ) { @@ -113,7 +111,7 @@ static mtime_t ClockCurrent( input_thread_t * p_input, /***************************************************************************** * ClockNewRef: writes a new clock reference *****************************************************************************/ -static void ClockNewRef( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm, +static void ClockNewRef( pgrm_descriptor_t * p_pgrm, mtime_t i_clock, mtime_t i_sysdate ) { p_pgrm->cr_ref = i_clock; @@ -159,19 +157,19 @@ int input_ClockManageControl( input_thread_t * p_input, i_old_status = p_input->stream.control.i_status; p_input->stream.control.i_status = PAUSE_S; vlc_mutex_unlock( &p_input->stream.control.control_lock ); - + vlc_cond_wait( &p_input->stream.stream_wait, &p_input->stream.stream_lock ); p_pgrm->last_syscr = 0; - ClockNewRef( p_input, p_pgrm, i_clock, mdate() ); + ClockNewRef( p_pgrm, i_clock, mdate() ); if( p_input->stream.i_new_status == PAUSE_S ) - { + { /* PAUSE_S undoes the pause state: Return to old state. */ vlc_mutex_lock( &p_input->stream.control.control_lock ); p_input->stream.control.i_status = i_old_status; vlc_mutex_unlock( &p_input->stream.control.control_lock ); - + p_input->stream.i_new_status = UNDEF_S; p_input->stream.i_new_rate = UNDEF_S; } @@ -187,7 +185,7 @@ int input_ClockManageControl( input_thread_t * p_input, p_input->stream.control.i_status = p_input->stream.i_new_status; - ClockNewRef( p_input, p_pgrm, i_clock, + ClockNewRef( p_pgrm, i_clock, ClockToSysdate( p_input, p_pgrm, i_clock ) ); if( p_input->stream.control.i_status == PLAYING_S ) @@ -231,7 +229,7 @@ void input_ClockManageRef( input_thread_t * p_input, if( ( p_pgrm->i_synchro_state != SYNCHRO_OK ) || ( i_clock == 0 ) ) { /* Feed synchro with a new reference point. */ - ClockNewRef( p_input, p_pgrm, i_clock, mdate() ); + ClockNewRef( p_pgrm, i_clock, mdate() ); p_pgrm->i_synchro_state = SYNCHRO_OK; if( p_input->stream.b_pace_control diff --git a/src/input/input_ext-dec.c b/src/input/input_ext-dec.c index 9cf09e075c..81bed62d2d 100644 --- a/src/input/input_ext-dec.c +++ b/src/input/input_ext-dec.c @@ -2,7 +2,7 @@ * input_ext-dec.c: services to the decoders ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: input_ext-dec.c,v 1.42 2002/11/13 20:51:05 sam Exp $ + * $Id: input_ext-dec.c,v 1.43 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -234,7 +234,7 @@ u32 UnalignedShowBits( bit_stream_t * p_bit_stream, unsigned int i_bits ) p_bit_stream->i_showbits_buffer = 0; - for( j = i = 0 ; i < sizeof(WORD_TYPE) ; i++ ) + for( j = i = 0 ; i < (int)sizeof(WORD_TYPE) ; i++ ) { if( p_bit_stream->p_byte >= p_bit_stream->p_end ) { diff --git a/src/input/input_ext-plugins.c b/src/input/input_ext-plugins.c index 07e1b64c85..fe86ed3eeb 100644 --- a/src/input/input_ext-plugins.c +++ b/src/input/input_ext-plugins.c @@ -2,7 +2,7 @@ * input_ext-plugins.c: useful functions for access and demux plug-ins ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: input_ext-plugins.c,v 1.24 2002/11/13 20:51:05 sam Exp $ + * $Id: input_ext-plugins.c,v 1.25 2002/12/06 10:10:39 sam Exp $ * * Authors: Christophe Massiot * @@ -521,13 +521,14 @@ ssize_t input_Peek( input_thread_t * p_input, byte_t ** pp_byte, size_t i_size ) if( p_input->p_last_data - p_input->p_current_data < (ptrdiff_t)i_size ) { /* Go to the next buffer */ - size_t i_ret = input_FillBuffer( p_input ); + ssize_t i_ret = input_FillBuffer( p_input ); - if( i_size == -1 ) + if( i_ret == -1 ) { return -1; } - else if( i_ret < i_size ) + + if( i_ret < (ssize_t)i_size ) { i_size = i_ret; } @@ -546,13 +547,14 @@ ssize_t input_SplitBuffer( input_thread_t * p_input, if( p_input->p_last_data - p_input->p_current_data < (ptrdiff_t)i_size ) { /* Go to the next buffer */ - size_t i_ret = input_FillBuffer( p_input ); + ssize_t i_ret = input_FillBuffer( p_input ); if( i_ret == -1 ) { return -1; } - else if( i_ret < i_size ) + + if( i_ret < (ssize_t)i_size ) { i_size = i_ret; } diff --git a/src/libvlc.h b/src/libvlc.h index cfbb9be627..48e841c013 100644 --- a/src/libvlc.h +++ b/src/libvlc.h @@ -2,7 +2,7 @@ * libvlc.h: main libvlc header ***************************************************************************** * Copyright (C) 1998-2002 VideoLAN - * $Id: libvlc.h,v 1.25 2002/12/03 16:29:04 gitan Exp $ + * $Id: libvlc.h,v 1.26 2002/12/06 10:10:39 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -499,14 +499,20 @@ vlc_module_end(); static module_config_t p_help_config[] = { - { CONFIG_ITEM_BOOL, NULL, "help", 'h', N_("print help") }, - { CONFIG_ITEM_BOOL, NULL, "longhelp", 'H', N_("print detailed help") }, + { CONFIG_ITEM_BOOL, NULL, "help", 'h', N_("print help"), + NULL, NULL, 0, 0.0, NULL, NULL, NULL, VLC_FALSE }, + { CONFIG_ITEM_BOOL, NULL, "longhelp", 'H', N_("print detailed help"), + NULL, NULL, 0, 0.0, NULL, NULL, NULL, VLC_FALSE }, { CONFIG_ITEM_BOOL, NULL, "list", 'l', - N_("print a list of available modules") }, - { CONFIG_ITEM_STRING, NULL, "module", 'p', N_("print help on module") }, + N_("print a list of available modules"), + NULL, NULL, 0, 0.0, NULL, NULL, NULL, VLC_FALSE }, + { CONFIG_ITEM_STRING, NULL, "module", 'p', N_("print help on module"), + NULL, NULL, 0, 0.0, NULL, NULL, NULL, VLC_FALSE }, { CONFIG_ITEM_BOOL, NULL, "version", '\0', - N_("print version information") }, - { CONFIG_HINT_END, NULL, NULL, '\0' } + N_("print version information"), + NULL, NULL, 0, 0.0, NULL, NULL, NULL, VLC_FALSE }, + { CONFIG_HINT_END, NULL, NULL, '\0', NULL, + NULL, NULL, 0, 0.0, NULL, NULL, NULL, VLC_FALSE } }; /***************************************************************************** diff --git a/src/misc/modules_plugin.h.in b/src/misc/modules_plugin.h.in index 11eb5a7073..192b53ddd0 100644 --- a/src/misc/modules_plugin.h.in +++ b/src/misc/modules_plugin.h.in @@ -2,7 +2,7 @@ * modules_plugin.h : Plugin management functions used by the core application. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: modules_plugin.h.in,v 1.7 2002/11/18 18:05:13 sam Exp $ + * $Id: modules_plugin.h.in,v 1.8 2002/12/06 10:10:39 sam Exp $ * * Authors: Samuel Hocevar * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -39,7 +39,7 @@ static int module_load( const MYCHAR * psz_filename, module_handle_t * handle ) #elif defined(WIN32) || defined(UNDER_CE) *handle = LoadLibrary( psz_filename ); - return( *handle == NULL ); + return( *handle == NULL ); #elif defined(RTLD_NOW) # if defined(SYS_LINUX) @@ -153,7 +153,7 @@ static void * module_getsymbol( module_handle_t handle, static const char * module_error( char *psz_buffer ) { #if defined(SYS_BEOS) - return( "failed" ); + return "failed"; #elif defined(UNDER_CE) wchar_t psz_tmp[256]; @@ -174,7 +174,7 @@ static const char * module_error( char *psz_buffer ) swprintf( psz_tmp + i, L" (error %i)", i_error ); psz_tmp[ 255 ] = L'\0'; } - + WideCharToMultiByte( CP_ACP, WC_DEFAULTCHAR, psz_tmp, -1, psz_buffer, 256, NULL, NULL ); @@ -197,11 +197,11 @@ static const char * module_error( char *psz_buffer ) snprintf( psz_buffer + i, 256 - i, " (error %i)", i_error ); psz_buffer[ 255 ] = '\0'; } - + return psz_buffer; #else - return( dlerror() ); + return dlerror(); #endif } diff --git a/src/misc/objects.c b/src/misc/objects.c index a22d79ea56..daf1e800fa 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -2,7 +2,7 @@ * objects.c: vlc_object_t handling ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: objects.c,v 1.29 2002/11/17 06:46:56 fenrir Exp $ + * $Id: objects.c,v 1.30 2002/12/06 10:10:39 sam Exp $ * * Authors: Samuel Hocevar * @@ -121,9 +121,9 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type ) break; default: i_size = i_type > 0 - ? i_type > sizeof(vlc_object_t) - ? i_type : sizeof(vlc_object_t) - : sizeof(vlc_object_t); + ? i_type > (int)sizeof(vlc_object_t) + ? i_type : (int)sizeof(vlc_object_t) + : (int)sizeof(vlc_object_t); i_type = VLC_OBJECT_GENERIC; psz_type = "generic"; break; diff --git a/src/misc/threads.c b/src/misc/threads.c index cc130d1744..9ff9b4ecfb 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -2,7 +2,7 @@ * threads.c : threads implementation for the VideoLAN client ***************************************************************************** * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN - * $Id: threads.c,v 1.26 2002/11/11 14:39:12 sam Exp $ + * $Id: threads.c,v 1.27 2002/12/06 10:10:40 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -12,7 +12,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -227,7 +227,7 @@ struct itimerval { struct timeval it_value; struct timeval it_interval; -}; +}; int setitimer(int kind, const struct itimerval* itnew, struct itimerval* itold); # endif /* WIN32 && !UNDER_CE */ @@ -237,14 +237,14 @@ typedef struct wrapper_t /* Data lock access */ vlc_mutex_t lock; vlc_cond_t wait; - + /* Data used to spawn the real thread */ vlc_thread_func_t func; void *p_data; - + /* Profiling timer passed to the thread */ struct itimerval itimer; - + } wrapper_t; #endif /* GPROF */ @@ -361,7 +361,7 @@ int __vlc_mutex_destroy( char * psz_file, int i_line, vlc_mutex_t *p_mutex ) } return 0; -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) +#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) i_result = pthread_mutex_destroy( &p_mutex->mutex ); if ( i_result ) { @@ -380,7 +380,7 @@ int __vlc_mutex_destroy( char * psz_file, int i_line, vlc_mutex_t *p_mutex ) p_mutex->init = 0; return B_OK; -#endif +#endif if( i_result ) { @@ -573,7 +573,7 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line, #elif defined( ST_INIT_IN_ST_H ) p_this->thread_id = st_thread_create( func, (void *)p_this, 1, 0 ); i_ret = 0; - + #elif defined( WIN32 ) || defined( UNDER_CE ) { unsigned threadID; @@ -583,10 +583,10 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line, * Knowledge Base, article 104641) */ p_this->thread_id = #if defined( UNDER_CE ) - (HANDLE)CreateThread( NULL, 0, (PTHREAD_START) func, + (HANDLE)CreateThread( NULL, 0, (PTHREAD_START) func, (void *)p_this, 0, &threadID ); #else - (HANDLE)_beginthreadex( NULL, 0, (PTHREAD_START) func, + (HANDLE)_beginthreadex( NULL, 0, (PTHREAD_START) func, (void *)p_this, 0, &threadID ); #endif } @@ -692,7 +692,7 @@ void __vlc_thread_join( vlc_object_t *p_this, char * psz_file, int i_line ) #elif defined( ST_INIT_IN_ST_H ) i_ret = st_thread_join( p_this->thread_id, NULL ); - + #elif defined( UNDER_CE ) WaitForSingleObject( p_this->thread_id, INFINITE ); diff --git a/src/misc/variables.c b/src/misc/variables.c index 7d4914c168..60905adc5c 100644 --- a/src/misc/variables.c +++ b/src/misc/variables.c @@ -2,7 +2,7 @@ * variables.c: routines for object variables handling ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: variables.c,v 1.13 2002/10/31 11:16:30 sam Exp $ + * $Id: variables.c,v 1.14 2002/12/06 10:10:40 sam Exp $ * * Authors: Samuel Hocevar * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -51,23 +51,23 @@ static int CmpAddress( vlc_value_t v, vlc_value_t w ) { return v.p_address == w. /***************************************************************************** * Local duplication functions, and local deallocation functions *****************************************************************************/ -static void DupDummy( vlc_value_t *p_val ) { ; } +static void DupDummy( vlc_value_t *p_val ) { (void)p_val; /* unused */ } static void DupString( vlc_value_t *p_val ) { p_val->psz_string = strdup( p_val->psz_string ); } -static void FreeDummy( vlc_value_t *p_val ) { ; } +static void FreeDummy( vlc_value_t *p_val ) { (void)p_val; /* unused */ } static void FreeString( vlc_value_t *p_val ) { free( p_val->psz_string ); } /***************************************************************************** * Local prototypes *****************************************************************************/ -static int GetUnused ( vlc_object_t *, const char * ); -static u32 HashString ( const char * ); -static int Insert ( variable_t *, int, const char * ); -static int InsertInner ( variable_t *, int, u32 ); -static int Lookup ( variable_t *, int, const char * ); -static int LookupInner ( variable_t *, int, u32 ); +static int GetUnused ( vlc_object_t *, const char * ); +static uint32_t HashString ( const char * ); +static int Insert ( variable_t *, int, const char * ); +static int InsertInner ( variable_t *, int, uint32_t ); +static int Lookup ( variable_t *, int, const char * ); +static int LookupInner ( variable_t *, int, uint32_t ); -static void CheckValue ( variable_t *, vlc_value_t * ); +static void CheckValue ( variable_t *, vlc_value_t * ); /***************************************************************************** * var_Create: initialize a vlc variable @@ -265,7 +265,7 @@ int __var_Destroy( vlc_object_t *p_this, const char *psz_name ) /***************************************************************************** * var_Change: perform an action on a variable ***************************************************************************** - * + * *****************************************************************************/ int __var_Change( vlc_object_t *p_this, const char *psz_name, int i_action, vlc_value_t *p_val ) @@ -593,7 +593,7 @@ int __var_AddCallback( vlc_object_t *p_this, const char *psz_name, entry.pf_callback = pf_callback; entry.p_data = p_data; - + vlc_mutex_lock( &p_this->var_lock ); i_var = GetUnused( p_this, psz_name ); @@ -704,9 +704,9 @@ static int GetUnused( vlc_object_t *p_this, const char *psz_name ) * fast and not suck too much. This one is pretty fast and did 0 collisions * in wenglish's dictionary. *****************************************************************************/ -static u32 HashString( const char *psz_string ) +static uint32_t HashString( const char *psz_string ) { - u32 i_hash = 0; + uint32_t i_hash = 0; while( *psz_string ) { @@ -736,7 +736,7 @@ static int Insert( variable_t *p_vars, int i_count, const char *psz_name ) return InsertInner( p_vars, i_count, HashString( psz_name ) ); } -static int InsertInner( variable_t *p_vars, int i_count, u32 i_hash ) +static int InsertInner( variable_t *p_vars, int i_count, uint32_t i_hash ) { int i_middle; @@ -778,7 +778,7 @@ static int InsertInner( variable_t *p_vars, int i_count, u32 i_hash ) *****************************************************************************/ static int Lookup( variable_t *p_vars, int i_count, const char *psz_name ) { - u32 i_hash; + uint32_t i_hash; int i, i_pos; if( i_count == 0 ) @@ -825,7 +825,7 @@ static int Lookup( variable_t *p_vars, int i_count, const char *psz_name ) return -1; } -static int LookupInner( variable_t *p_vars, int i_count, u32 i_hash ) +static int LookupInner( variable_t *p_vars, int i_count, uint32_t i_hash ) { int i_middle; diff --git a/src/playlist/playlist.c b/src/playlist/playlist.c index 42b7ef3e95..4c1e1c3df9 100644 --- a/src/playlist/playlist.c +++ b/src/playlist/playlist.c @@ -2,7 +2,7 @@ * playlist.c : Playlist management functions ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: playlist.c,v 1.26 2002/12/06 06:42:24 babal Exp $ + * $Id: playlist.c,v 1.27 2002/12/06 10:10:40 sam Exp $ * * Authors: Samuel Hocevar * @@ -522,7 +522,7 @@ static void PlayItem( playlist_t *p_playlist ) msg_Dbg( p_playlist, "creating new input thread" ); p_playlist->p_input = input_CreateThread( p_playlist, - p_playlist->pp_items[p_playlist->i_index], NULL ); + p_playlist->pp_items[p_playlist->i_index] ); } /***************************************************************************** @@ -532,6 +532,6 @@ static void PlayItem( playlist_t *p_playlist ) *****************************************************************************/ static void Poubellize ( playlist_t *p_playlist, input_thread_t *p_input ) { - + msg_Dbg( p_playlist, "poubellizing input %i\n", p_input->i_object_id ); } diff --git a/src/video_output/video_text.c b/src/video_output/video_text.c index b0716c1107..438e0e1bb4 100644 --- a/src/video_output/video_text.c +++ b/src/video_output/video_text.c @@ -2,7 +2,7 @@ * video_text.c : text manipulation functions ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: video_text.c,v 1.40 2002/11/13 20:51:05 sam Exp $ + * $Id: video_text.c,v 1.41 2002/12/06 10:10:40 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -22,6 +22,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. *****************************************************************************/ +/* XXX: unused */ +#if 0 /***************************************************************************** * Preamble *****************************************************************************/ @@ -603,4 +605,4 @@ static void PutByte32( u32 *p_pic, int i_byte, byte_t i_char, byte_t i_border, b PUT_BYTE_MASK(i_border, i_border_color); PUT_BYTE_MASK(i_bg, i_bg_color); } - +#endif -- 2.39.2