From de4e5cbc53859edf5a2e75331988e9e39d1253d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 7 May 2008 14:48:57 +0200 Subject: Mark internal functions and data structures static. Functions and data structures that are not exported and are only ever used in the same unit they are defined should be marked static to improve compiler's ability to optimise them. This applies to xine_dispose_internal() function for xine-lib, the extended_to_int() function in the AIFF demuxer, the bandwidths array in QuickTime demuxer, the wc_pal_lookup table in the WC3 movie demuxer, and the rm_header and pnm_data_header arrays in pnm input plugin. --- src/demuxers/demux_aiff.c | 2 +- src/demuxers/demux_qt.c | 2 +- src/demuxers/demux_wc3movie.c | 2 +- src/input/pnm.c | 4 ++-- src/xine-engine/xine.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c index 8a2811ac6..b33b649a5 100644 --- a/src/demuxers/demux_aiff.c +++ b/src/demuxers/demux_aiff.c @@ -85,7 +85,7 @@ typedef struct { } demux_aiff_class_t; /* converts IEEE 80bit extended into int, based on FFMPEG code */ -int extended_to_int(const unsigned char p[10]) +static int extended_to_int(const unsigned char p[10]) { uint64_t m = 0; int e, i; diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 0988c1dff..fe3727176 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -134,7 +134,7 @@ typedef unsigned int qt_atom; #define MAX_PTS_DIFF 100000 /* network bandwidth, cribbed from src/input/input_mms.c */ -const int64_t bandwidths[]={14400,19200,28800,33600,34430,57600, +static const int64_t bandwidths[]={14400,19200,28800,33600,34430,57600, 115200,262200,393216,524300,1544000,10485800}; /* these are things that can go wrong */ diff --git a/src/demuxers/demux_wc3movie.c b/src/demuxers/demux_wc3movie.c index b3dcb775f..61811c193 100644 --- a/src/demuxers/demux_wc3movie.c +++ b/src/demuxers/demux_wc3movie.c @@ -102,7 +102,7 @@ typedef struct { } demux_mve_class_t; /* bizarre palette lookup table */ -const unsigned char wc3_pal_lookup[] = { +static const unsigned char wc3_pal_lookup[] = { 0x00, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0E, 0x10, 0x12, 0x13, 0x15, 0x16, 0x18, 0x19, 0x1A, 0x1C, 0x1D, 0x1F, 0x20, 0x21, 0x23, 0x24, 0x25, 0x27, 0x28, 0x29, 0x2A, 0x2C, diff --git a/src/input/pnm.c b/src/input/pnm.c index 38d65b850..3516ab262 100644 --- a/src/input/pnm.c +++ b/src/input/pnm.c @@ -90,7 +90,7 @@ struct pnm_s { /* header of rm files */ #define RM_HEADER_SIZE 0x12 -const unsigned char rm_header[]={ +static const unsigned char rm_header[]={ 0x2e, 0x52, 0x4d, 0x46, /* object_id ".RMF" */ 0x00, 0x00, 0x00, 0x12, /* header_size 0x12 */ 0x00, 0x00, /* object_version 0x00 */ @@ -100,7 +100,7 @@ const unsigned char rm_header[]={ /* data chunk header */ #define PNM_DATA_HEADER_SIZE 18 -const unsigned char pnm_data_header[]={ +static const unsigned char pnm_data_header[]={ 'D','A','T','A', 0,0,0,0, /* data chunk size */ 0,0, /* object version */ diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 4b228304c..9cd5e8d5b 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -553,7 +553,7 @@ static int stream_rewire_video(xine_post_out_t *output, void *data) return 1; } -void xine_dispose_internal (xine_stream_t *stream); +static void xine_dispose_internal (xine_stream_t *stream); xine_stream_t *xine_stream_new (xine_t *this, xine_audio_port_t *ao, xine_video_port_t *vo) { @@ -1437,7 +1437,7 @@ int xine_eject (xine_stream_t *stream) { return status; } -void xine_dispose_internal (xine_stream_t *stream) { +static void xine_dispose_internal (xine_stream_t *stream) { xine_list_iterator_t *ite; -- cgit v1.2.3