From b1037d87ee9d0517163b22c231ff54e7d0ae33a6 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 13:01:44 +0000 Subject: Clarify which version of the GPL applies to MPlayer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30201 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Copyright | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Copyright b/Copyright index 8d45d26b1a..7a1485a720 100644 --- a/Copyright +++ b/Copyright @@ -1,11 +1,16 @@ MPlayer was originally written by Árpád Gereöffy and has been extended and worked on by many more since then, see the AUTHORS file for an (incomplete) -list. You are free to use it under the terms of the GNU General Public License, -as described in the LICENSE file. +list. MPlayer as a whole is copyrighted by the MPlayer team. Individual +copyright notices can be found in file headers. -MPlayer as a whole is copyrighted by the MPlayer team. Individual copyright -notices can be found in the file headers. Furthermore, MPlayer includes code -from several external sources: +Most files in MPlayer are licensed under the GNU General Public License, +version 2 with an explicit "or later" clause or a compatible license. An +exception is the file libmpdemux/demux_ty_osd.c, which is version 2 only. +Thus MPlayer as a whole can be redistributed under the terms of the GNU +General Public License, version 2, see the LICENSE file for details. + +MPlayer includes code from several external sources. General information and +license details are listed below: Name: FFmpeg Version: Subversion HEAD -- cgit v1.2.3 From 55c7b19ae1ba5fa39f4fb003e36fa6a730f46ae7 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 13:05:05 +0000 Subject: Refer to MatrixView instead of MPlayer in code taken from MatrixView. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30202 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/matrixview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvo/matrixview.c b/libvo/matrixview.c index 5b80984de4..de1e1ccf18 100644 --- a/libvo/matrixview.c +++ b/libvo/matrixview.c @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with MPlayer; if not, write to the Free Software Foundation, Inc., + * with MatrixView; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -- cgit v1.2.3 From 4ae9751ee6f141e6655178afdd19c7fcdf86a24e Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 13:05:52 +0000 Subject: Add missing license headers for vo_matrixview code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30203 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/matrixview.h | 18 ++++++++++++++++++ libvo/matrixview_font.h | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/libvo/matrixview.h b/libvo/matrixview.h index d96597c243..5081aa79e7 100644 --- a/libvo/matrixview.h +++ b/libvo/matrixview.h @@ -1,3 +1,21 @@ +/* + * This file is part of MPlayer. + * + * MPlayer is free software; you can redistribute it and/or modify + * 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. + * + * MPlayer 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 + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef MPLAYER_MATRIXVIEW_H #define MPLAYER_MATRIXVIEW_H diff --git a/libvo/matrixview_font.h b/libvo/matrixview_font.h index 753e9344a2..b12e8bbe8b 100644 --- a/libvo/matrixview_font.h +++ b/libvo/matrixview_font.h @@ -1,3 +1,21 @@ +/* + * This file is part of MPlayer. + * + * MPlayer is free software; you can redistribute it and/or modify + * 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. + * + * MPlayer 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 + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #ifndef MPLAYER_MATRIXVIEW_FONT_H #define MPLAYER_MATRIXVIEW_FONT_H -- cgit v1.2.3 From 0a1e9b2902d623aa616658fd900c5350586c4a0e Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 13:13:10 +0000 Subject: Add missing config.h #include; remove a redundant one. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30204 b3059339-0415-0410-9bf9-f77b7e298cf2 --- gui/cfg.h | 2 ++ gui/mplayer/play.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/cfg.h b/gui/cfg.h index be542b0b8a..82eb36122a 100644 --- a/gui/cfg.h +++ b/gui/cfg.h @@ -19,6 +19,8 @@ #ifndef MPLAYER_GUI_CFG_H #define MPLAYER_GUI_CFG_H +#include "config.h" + extern int gtkEnableAudioEqualizer; extern int gtkVfPP; diff --git a/gui/mplayer/play.h b/gui/mplayer/play.h index a96476e530..9e100f32fc 100644 --- a/gui/mplayer/play.h +++ b/gui/mplayer/play.h @@ -19,8 +19,6 @@ #ifndef MPLAYER_GUI_PLAY_H #define MPLAYER_GUI_PLAY_H -#include "config.h" - extern int mplGotoTheNext; void mplEnd( void ); -- cgit v1.2.3 From 30c98f487734928696963064bb7eb610a7072a1d Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 14:42:59 +0000 Subject: Add multiple inclusion guards to all mp3lib headers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30205 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mp3lib/huffman.h | 5 ++++- mp3lib/l2tables.h | 4 ++++ mp3lib/mp3.h | 4 ++++ mp3lib/mpg123.h | 5 +++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mp3lib/huffman.h b/mp3lib/huffman.h index aa9e7b91fa..190775dbc0 100644 --- a/mp3lib/huffman.h +++ b/mp3lib/huffman.h @@ -6,6 +6,9 @@ * smaller tables are often the part of a bigger table */ +#ifndef MPLAYER_MP3LIB_HUFFMAN_H +#define MPLAYER_MP3LIB_HUFFMAN_H + struct newhuff { unsigned int linbits; @@ -329,4 +332,4 @@ static struct newhuff htc[] = { /* 1 , 1 , */ 0 , tab_c1 } }; - +#endif /* MPLAYER_MP3LIB_HUFFMAN_H */ diff --git a/mp3lib/l2tables.h b/mp3lib/l2tables.h index f62a546088..6be9bc1b82 100644 --- a/mp3lib/l2tables.h +++ b/mp3lib/l2tables.h @@ -4,6 +4,9 @@ * $Id$ */ +#ifndef MPLAYER_MP3LIB_L2TABLES_H +#define MPLAYER_MP3LIB_L2TABLES_H + /* * Layer 2 Alloc tables .. * most other tables are calculated on program start (which is (of course) @@ -158,3 +161,4 @@ static struct al_table alloc_4[] = { {2,0},{5,3},{7,5},{10,9}, {2,0},{5,3},{7,5},{10,9} }; +#endif /* MPLAYER_MP3LIB_L2TABLES_H */ diff --git a/mp3lib/mp3.h b/mp3lib/mp3.h index d43b5f8bcb..3877f0169b 100644 --- a/mp3lib/mp3.h +++ b/mp3lib/mp3.h @@ -1,5 +1,8 @@ /* MP3 Player Library 2.0 (C) 1999 A'rpi/Astral&ESP-team */ +#ifndef MPLAYER_MP3LIB_MP3_H +#define MPLAYER_MP3LIB_MP3_H + /* decoder level: */ #ifdef CONFIG_FAKE_MONO void MP3_Init(int fakemono); @@ -33,3 +36,4 @@ void MP3_Play(void); void MP3_Stop(void); void MP3_CloseDevice(void); +#endif /* MPLAYER_MP3LIB_MP3_H */ diff --git a/mp3lib/mpg123.h b/mp3lib/mpg123.h index 2cbef31bdd..3af6be278a 100644 --- a/mp3lib/mpg123.h +++ b/mp3lib/mpg123.h @@ -9,6 +9,9 @@ * used source: musicout.h from mpegaudio package */ +#ifndef MPLAYER_MP3LIB_MPG123_H +#define MPLAYER_MP3LIB_MPG123_H + #include "config.h" #ifndef M_PI @@ -126,3 +129,5 @@ void dct36_sse(real *, real *, real *, real *, real *); typedef int (*synth_func_t)( real *,int,short * ); typedef void (*dct36_func_t)(real *,real *,real *,real *,real *); + +#endif /* MPLAYER_MP3LIB_MPG123_H */ -- cgit v1.2.3 From ebe968283187d6ef1acab2ef4e511250bef6bc0f Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 15:14:21 +0000 Subject: Remove unused variable; fixes the warning: libvo/csputils.c:67: warning: unused variable 'yuv_tv_level_adjust' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30206 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/csputils.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libvo/csputils.c b/libvo/csputils.c index 6f69ec4212..e842592b1f 100644 --- a/libvo/csputils.c +++ b/libvo/csputils.c @@ -64,7 +64,6 @@ void mp_get_yuv2rgb_coeffs(struct mp_csp_params *params, float yuv2rgb[3][4]) { const float (*uv_coeffs)[3]; const float *level_adjust; static const float yuv_pc_level_adjust[4] = {-16 / 255.0, -128 / 255.0, -128 / 255.0, 1.164}; - static const float yuv_tv_level_adjust[4] = {0, -128 / 255.0, -128 / 255.0, 0}; static const float xyz_level_adjust[4] = {0, 0, 0, 0}; static const float uv_coeffs_table[MP_CSP_COUNT][3][3] = { [MP_CSP_DEFAULT] = { -- cgit v1.2.3 From 00ad5d3fed36de56bb690375a209cdcd31b12ecc Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 18:58:35 +0000 Subject: Add a few missing header #includes and #defines. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30207 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/cdd.h | 1 + stream/dvbin.h | 1 + stream/stream.h | 1 + stream/stream_netstream.h | 1 + stream/stream_radio.h | 1 + stream/vcd_read_darwin.h | 2 ++ stream/vcd_read_fbsd.h | 4 ++++ stream/vcd_read_win32.h | 3 +++ 8 files changed, 14 insertions(+) diff --git a/stream/cdd.h b/stream/cdd.h index 97c039b3d0..9d2ee4d9d0 100644 --- a/stream/cdd.h +++ b/stream/cdd.h @@ -9,6 +9,7 @@ #include #include #endif +#include typedef struct { char cddb_hello[1024]; diff --git a/stream/dvbin.h b/stream/dvbin.h index dcb22ce238..18a37d9522 100644 --- a/stream/dvbin.h +++ b/stream/dvbin.h @@ -8,6 +8,7 @@ #ifndef MPLAYER_DVBIN_H #define MPLAYER_DVBIN_H +#include "config.h" #include "stream.h" #define SLOF (11700*1000UL) diff --git a/stream/stream.h b/stream/stream.h index 4da8a1ae43..1270553a00 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -1,6 +1,7 @@ #ifndef MPLAYER_STREAM_H #define MPLAYER_STREAM_H +#include "config.h" #include "mp_msg.h" #include #include diff --git a/stream/stream_netstream.h b/stream/stream_netstream.h index 52e5cf211e..43d42a0a32 100644 --- a/stream/stream_netstream.h +++ b/stream/stream_netstream.h @@ -10,6 +10,7 @@ #ifndef MPLAYER_NETSTREAM_H #define MPLAYER_NETSTREAM_H +#include "config.h" #include #include #include diff --git a/stream/stream_radio.h b/stream/stream_radio.h index e77f4aa05e..c2de25a5aa 100644 --- a/stream/stream_radio.h +++ b/stream/stream_radio.h @@ -1,6 +1,7 @@ #ifndef MPLAYER_STREAM_RADIO_H #define MPLAYER_STREAM_RADIO_H +#include "config.h" #include "stream.h" #define RADIO_CHANNEL_LOWER 1 diff --git a/stream/vcd_read_darwin.h b/stream/vcd_read_darwin.h index d144b5bc69..e87f46db5a 100644 --- a/stream/vcd_read_darwin.h +++ b/stream/vcd_read_darwin.h @@ -1,6 +1,8 @@ #ifndef MPLAYER_VCD_READ_DARWIN_H #define MPLAYER_VCD_READ_DARWIN_H +#define _XOPEN_SOURCE 500 + #include #include #include diff --git a/stream/vcd_read_fbsd.h b/stream/vcd_read_fbsd.h index 132b6b2994..01e51f7da5 100644 --- a/stream/vcd_read_fbsd.h +++ b/stream/vcd_read_fbsd.h @@ -1,10 +1,14 @@ #ifndef MPLAYER_VCD_READ_FBSD_H #define MPLAYER_VCD_READ_FBSD_H +#define _XOPEN_SOURCE 500 + #include #include +#include #include "libavutil/intreadwrite.h" #include +#include #if defined(__NetBSD__) || defined(__OpenBSD__) #define VCD_NETBSD 1 #endif diff --git a/stream/vcd_read_win32.h b/stream/vcd_read_win32.h index 1d8adf20c3..0df0320bb3 100644 --- a/stream/vcd_read_win32.h +++ b/stream/vcd_read_win32.h @@ -1,6 +1,9 @@ #ifndef MPLAYER_VCD_READ_WIN32_H #define MPLAYER_VCD_READ_WIN32_H +#include +#include +#include #include #include "mp_msg.h" -- cgit v1.2.3 From 620ab707450f76b1c94017109386078817c7e3ff Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 19:04:33 +0000 Subject: Add missing header #includes to fix 'make checkheaders'. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30208 b3059339-0415-0410-9bf9-f77b7e298cf2 --- fmt-conversion.h | 1 + libvo/font_load.h | 2 ++ libvo/x11_common.h | 1 + loader/qt_fv.h | 2 ++ 4 files changed, 6 insertions(+) diff --git a/fmt-conversion.h b/fmt-conversion.h index f1e44ffe2a..a4ee820353 100644 --- a/fmt-conversion.h +++ b/fmt-conversion.h @@ -1,6 +1,7 @@ #ifndef MPLAYER_FMT_CONVERSION_H #define MPLAYER_FMT_CONVERSION_H +#include "config.h" #include "libavutil/avutil.h" enum PixelFormat imgfmt2pixfmt(int fmt); diff --git a/libvo/font_load.h b/libvo/font_load.h index 8dd494b941..ebd03c0963 100644 --- a/libvo/font_load.h +++ b/libvo/font_load.h @@ -19,6 +19,8 @@ #ifndef MPLAYER_FONT_LOAD_H #define MPLAYER_FONT_LOAD_H +#include "config.h" + #ifdef CONFIG_FREETYPE #include #include FT_FREETYPE_H diff --git a/libvo/x11_common.h b/libvo/x11_common.h index bea422e8b5..152e70ff80 100644 --- a/libvo/x11_common.h +++ b/libvo/x11_common.h @@ -19,6 +19,7 @@ #ifndef MPLAYER_X11_COMMON_H #define MPLAYER_X11_COMMON_H +#include #include #include diff --git a/loader/qt_fv.h b/loader/qt_fv.h index 94ae02c867..f5dbd1d589 100644 --- a/loader/qt_fv.h +++ b/loader/qt_fv.h @@ -1,6 +1,8 @@ #ifndef MPLAYER_QT_FV_H #define MPLAYER_QT_FV_H +#include + typedef struct qt_fv_s { unsigned int id; char* name; -- cgit v1.2.3 From 64ff3434c09ea189ebc90df6eb59ac07a8f90e68 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 19:36:18 +0000 Subject: Refactor real --> float #define to a typedef in a common header. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30209 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mp3lib/dct36_3dnow.c | 3 +-- mp3lib/dct64_3dnow.c | 2 +- mp3lib/dct64_altivec.c | 2 -- mp3lib/dct64_k7.c | 2 +- mp3lib/dct64_mmx.c | 2 +- mp3lib/dct64_sse.c | 3 +-- mp3lib/decode_i586.c | 2 +- mp3lib/decode_mmx.c | 2 +- mp3lib/l2tables.h | 2 ++ mp3lib/layer1.c | 2 +- mp3lib/layer2.c | 2 +- mp3lib/layer3.c | 2 ++ mp3lib/mpg123.h | 2 ++ mp3lib/sr1.c | 3 --- mp3lib/tabinit.c | 2 ++ 15 files changed, 17 insertions(+), 16 deletions(-) diff --git a/mp3lib/dct36_3dnow.c b/mp3lib/dct36_3dnow.c index 7f39caacea..8263639149 100644 --- a/mp3lib/dct36_3dnow.c +++ b/mp3lib/dct36_3dnow.c @@ -27,10 +27,9 @@ * 2003/06/21: Moved to GCC inline assembly - Alex Beregszaszi */ -#define real float /* ugly - but only way */ - #include "config.h" #include "mangle.h" +#include "mpg123.h" #ifdef DCT36_OPTIMIZE_FOR_K7 void dct36_3dnowex(real *inbuf, real *o1, diff --git a/mp3lib/dct64_3dnow.c b/mp3lib/dct64_3dnow.c index 919771a91d..55340b0512 100644 --- a/mp3lib/dct64_3dnow.c +++ b/mp3lib/dct64_3dnow.c @@ -7,10 +7,10 @@ * TODO: optimize scalar 3dnow! code * Warning: Phases 7 & 8 are not tested */ -#define real float /* ugly - but only way */ #include "config.h" #include "mangle.h" +#include "mpg123.h" static unsigned long long int attribute_used __attribute__((aligned(8))) x_plus_minus_3dnow = 0x8000000000000000ULL; static float attribute_used plus_1f = 1.0; diff --git a/mp3lib/dct64_altivec.c b/mp3lib/dct64_altivec.c index 21a7b88699..c29e1c4ab0 100644 --- a/mp3lib/dct64_altivec.c +++ b/mp3lib/dct64_altivec.c @@ -7,8 +7,6 @@ * modify it under the terms of the GNU Lesser General Public License */ -#define real float - #include #include "mpg123.h" diff --git a/mp3lib/dct64_k7.c b/mp3lib/dct64_k7.c index 2d79d7a621..edd41bd7a2 100644 --- a/mp3lib/dct64_k7.c +++ b/mp3lib/dct64_k7.c @@ -7,10 +7,10 @@ * TODO: optimize scalar 3dnow! code * Warning: Phases 7 & 8 are not tested */ -#define real float /* ugly - but only way */ #include "config.h" #include "mangle.h" +#include "mpg123.h" static unsigned long long int attribute_used __attribute__((aligned(8))) x_plus_minus_3dnow = 0x8000000000000000ULL; static float attribute_used plus_1f = 1.0; diff --git a/mp3lib/dct64_mmx.c b/mp3lib/dct64_mmx.c index 5dec11cb97..817913a016 100644 --- a/mp3lib/dct64_mmx.c +++ b/mp3lib/dct64_mmx.c @@ -5,7 +5,7 @@ */ #include "config.h" #include "mangle.h" -#define real float /* ugly - but only way */ +#include "mpg123.h" void dct64_MMX(short *a,short *b,real *c) { diff --git a/mp3lib/dct64_sse.c b/mp3lib/dct64_sse.c index 9381b2adf7..46e951cc9a 100644 --- a/mp3lib/dct64_sse.c +++ b/mp3lib/dct64_sse.c @@ -6,8 +6,7 @@ */ #include "libavutil/internal.h" - -typedef float real; +#include "mpg123.h" extern float __attribute__((aligned(16))) costab_mmx[]; diff --git a/mp3lib/decode_i586.c b/mp3lib/decode_i586.c index 8d005735d3..d4cea638c1 100644 --- a/mp3lib/decode_i586.c +++ b/mp3lib/decode_i586.c @@ -31,7 +31,7 @@ */ #include "config.h" #include "mangle.h" -#define real float /* ugly - but only way */ +#include "mpg123.h" static int attribute_used buffs[1088]={0}; static int attribute_used bo=1; diff --git a/mp3lib/decode_mmx.c b/mp3lib/decode_mmx.c index 7afcbd83c1..e850034254 100644 --- a/mp3lib/decode_mmx.c +++ b/mp3lib/decode_mmx.c @@ -9,7 +9,7 @@ */ #include "config.h" #include "mangle.h" -#define real float /* ugly - but only way */ +#include "mpg123.h" extern void (*dct64_MMX_func)(short*, short*, real*); static const unsigned long long attribute_used __attribute__((aligned(8))) null_one = 0x0000ffff0000ffffULL; diff --git a/mp3lib/l2tables.h b/mp3lib/l2tables.h index 6be9bc1b82..cf6299e88d 100644 --- a/mp3lib/l2tables.h +++ b/mp3lib/l2tables.h @@ -7,6 +7,8 @@ #ifndef MPLAYER_MP3LIB_L2TABLES_H #define MPLAYER_MP3LIB_L2TABLES_H +#include "mpg123.h" + /* * Layer 2 Alloc tables .. * most other tables are calculated on program start (which is (of course) diff --git a/mp3lib/layer1.c b/mp3lib/layer1.c index 9a50b5df47..200aa453ba 100644 --- a/mp3lib/layer1.c +++ b/mp3lib/layer1.c @@ -18,7 +18,7 @@ * COPYING: you may use this source under LGPL terms! */ -//#include "mpg123.h" +#include "mpg123.h" static void I_step_one(unsigned int balloc[], unsigned int scale_index[2][SBLIMIT],struct frame *fr) { diff --git a/mp3lib/layer2.c b/mp3lib/layer2.c index f2c134c827..867da2f2dc 100644 --- a/mp3lib/layer2.c +++ b/mp3lib/layer2.c @@ -11,7 +11,7 @@ * */ -//#include "mpg123.h" +#include "mpg123.h" #include "l2tables.h" static int grp_3tab[32 * 3] = { 0, }; /* used: 27 */ diff --git a/mp3lib/layer3.c b/mp3lib/layer3.c index 398e631913..fdac27f781 100644 --- a/mp3lib/layer3.c +++ b/mp3lib/layer3.c @@ -15,6 +15,8 @@ * Length-optimze: unify long and short band code where it is possible */ +#include "mpg123.h" + #if 0 #define L3_DEBUG 1 #endif diff --git a/mp3lib/mpg123.h b/mp3lib/mpg123.h index 3af6be278a..f55fb27e43 100644 --- a/mp3lib/mpg123.h +++ b/mp3lib/mpg123.h @@ -25,6 +25,8 @@ #undef MPG123_REMOTE /* Get rid of this stuff for Win32 */ +typedef float real; + /* # define real float # define real long double diff --git a/mp3lib/sr1.c b/mp3lib/sr1.c index e0e616d955..77ba630453 100644 --- a/mp3lib/sr1.c +++ b/mp3lib/sr1.c @@ -13,9 +13,6 @@ #include #include -#define real float -// #define int long - #include "mpg123.h" #include "huffman.h" #include "mp3.h" diff --git a/mp3lib/tabinit.c b/mp3lib/tabinit.c index 7c6facd2f6..513d268eff 100644 --- a/mp3lib/tabinit.c +++ b/mp3lib/tabinit.c @@ -4,6 +4,8 @@ * $Id$ */ +#include "mpg123.h" + real mp3lib_decwin[(512+32)]; static real cos64[32], cos32[16], cos16[8], cos8[4], cos4[2]; real *mp3lib_pnts[]={ cos64,cos32,cos16,cos8,cos4 }; -- cgit v1.2.3 From 7e2c59fc130a083039c5bcf619d670a7f9ea3f34 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 19:49:42 +0000 Subject: Add missing config.h #include. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30210 b3059339-0415-0410-9bf9-f77b7e298cf2 --- subreader.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subreader.h b/subreader.h index ef94d275c5..18aeed05c9 100644 --- a/subreader.h +++ b/subreader.h @@ -3,6 +3,8 @@ #include +#include "config.h" + extern int suboverlap_enabled; extern int sub_no_text_pp; // disable text post-processing extern int sub_match_fuzziness; -- cgit v1.2.3 From cdcbe65d478491a33cced1fce0fc6dc89ec2d210 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 19:56:28 +0000 Subject: Add loader/wine/ to DIRS; its headers should be part of checkheaders. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30211 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 7b330d7a25..76da792c3a 100644 --- a/Makefile +++ b/Makefile @@ -781,6 +781,7 @@ DIRS = . \ loader \ loader/dshow \ loader/dmo \ + loader/wine \ mp3lib \ osdep \ stream \ -- cgit v1.2.3 From a4ce4a23b7a74229e12930c68d182a698976305a Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 20:32:23 +0000 Subject: Drop -Iloader from CPPFLAGS for the loader subdirectory. Instead use full relative paths in #includes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30212 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 2 +- loader/dmo/DMO_AudioDecoder.c | 4 ++-- loader/dmo/DMO_VideoDecoder.c | 12 ++++++------ loader/dmo/buffer.c | 4 ++-- loader/dmo/dmo.c | 6 +++--- loader/dmo/dmo.h | 4 ++-- loader/dmo/dmo_guids.h | 2 +- loader/dshow/DS_AudioDecoder.c | 2 +- loader/dshow/DS_Filter.c | 6 +++--- loader/dshow/DS_VideoDecoder.c | 6 +++--- loader/dshow/allocator.c | 4 ++-- loader/dshow/cmediasample.c | 2 +- loader/dshow/guids.h | 8 ++++---- loader/dshow/inputpin.c | 2 +- loader/dshow/interfaces.h | 2 +- loader/dshow/libwin32.h | 8 ++++---- loader/dshow/mediatype.c | 4 ++-- loader/dshow/outputpin.c | 4 ++-- loader/qtx/list.c | 2 +- loader/qtx/qtxload.c | 2 +- 20 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Makefile b/Makefile index 76da792c3a..df040880fa 100644 --- a/Makefile +++ b/Makefile @@ -885,7 +885,7 @@ libdvdnav/%: CFLAGS := -Ilibdvdnav -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_ libdvdread4/%: CFLAGS := -Ilibdvdread4 -D__USE_UNIX98 -D_GNU_SOURCE $(CFLAGS_LIBDVDCSS_DVDREAD) $(CFLAGS) libfaad2/%: CFLAGS := -Ilibfaad2 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_FAAD_FIXED) $(CFLAGS) -loader/%: CFLAGS += -Iloader -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER) +loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER) #loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN) diff --git a/loader/dmo/DMO_AudioDecoder.c b/loader/dmo/DMO_AudioDecoder.c index 1b08757349..55a597b2d7 100644 --- a/loader/dmo/DMO_AudioDecoder.c +++ b/loader/dmo/DMO_AudioDecoder.c @@ -5,9 +5,9 @@ *********************************************************/ #include "config.h" -#include "dshow/libwin32.h" +#include "loader/dshow/libwin32.h" #ifdef WIN32_LOADER -#include "ldt_keeper.h" +#include "loader/ldt_keeper.h" #endif #include "DMO_Filter.h" diff --git a/loader/dmo/DMO_VideoDecoder.c b/loader/dmo/DMO_VideoDecoder.c index 334acacedf..3dd7098534 100644 --- a/loader/dmo/DMO_VideoDecoder.c +++ b/loader/dmo/DMO_VideoDecoder.c @@ -5,14 +5,14 @@ *********************************************************/ #include "config.h" -#include "dshow/guids.h" -#include "dshow/interfaces.h" -#include "registry.h" +#include "loader/dshow/guids.h" +#include "loader/dshow/interfaces.h" +#include "loader/registry.h" #ifdef WIN32_LOADER -#include "ldt_keeper.h" +#include "loader/ldt_keeper.h" #endif -#include "dshow/libwin32.h" +#include "loader/dshow/libwin32.h" #include "DMO_Filter.h" #include "DMO_VideoDecoder.h" @@ -33,7 +33,7 @@ struct DMO_VideoDecoder //#include "DMO_VideoDecoder.h" -#include "wine/winerror.h" +#include "loader/wine/winerror.h" #include #include diff --git a/loader/dmo/buffer.c b/loader/dmo/buffer.c index 0a74fe6c8a..70883b9abe 100644 --- a/loader/dmo/buffer.c +++ b/loader/dmo/buffer.c @@ -1,7 +1,7 @@ #include "DMO_Filter.h" -#include "wine/winerror.h" -#include "wine/windef.h" +#include "loader/wine/winerror.h" +#include "loader/wine/windef.h" #include #include diff --git a/loader/dmo/dmo.c b/loader/dmo/dmo.c index 0e4d2a45e4..f8898efcb5 100644 --- a/loader/dmo/dmo.c +++ b/loader/dmo/dmo.c @@ -5,12 +5,12 @@ #include "config.h" #include "DMO_Filter.h" -#include "drv.h" -#include "com.h" +#include "loader/drv.h" +#include "loader/com.h" #include #include #include -#include "win32.h" // printf macro +#include "loader/win32.h" // printf macro void trapbug(void); typedef long STDCALL (*GETCLASS) (const GUID*, const GUID*, void**); diff --git a/loader/dmo/dmo.h b/loader/dmo/dmo.h index b6eeb7410e..dc96bb3326 100644 --- a/loader/dmo/dmo.h +++ b/loader/dmo/dmo.h @@ -9,8 +9,8 @@ * */ -#include "dshow/iunk.h" -#include "dshow/guids.h" +#include "loader/dshow/iunk.h" +#include "loader/dshow/guids.h" typedef AM_MEDIA_TYPE DMO_MEDIA_TYPE; diff --git a/loader/dmo/dmo_guids.h b/loader/dmo/dmo_guids.h index 51e93c9a2c..084c501c5a 100644 --- a/loader/dmo/dmo_guids.h +++ b/loader/dmo/dmo_guids.h @@ -1,7 +1,7 @@ #ifndef MPLAYER_DMO_GUIDS_H #define MPLAYER_DMO_GUIDS_H -#include "dshow/guids.h" +#include "loader/dshow/guids.h" extern const GUID IID_IMediaBuffer; extern const GUID IID_IMediaObject; diff --git a/loader/dshow/DS_AudioDecoder.c b/loader/dshow/DS_AudioDecoder.c index b18b646160..cfa2fcb5a2 100644 --- a/loader/dshow/DS_AudioDecoder.c +++ b/loader/dshow/DS_AudioDecoder.c @@ -21,7 +21,7 @@ struct DS_AudioDecoder #include "DS_AudioDecoder.h" #ifdef WIN32_LOADER -#include "ldt_keeper.h" +#include "loader/ldt_keeper.h" #endif #include diff --git a/loader/dshow/DS_Filter.c b/loader/dshow/DS_Filter.c index 5fb1ec73dc..42b47b8626 100644 --- a/loader/dshow/DS_Filter.c +++ b/loader/dshow/DS_Filter.c @@ -5,12 +5,12 @@ #include "config.h" #include "DS_Filter.h" -#include "drv.h" -#include "com.h" +#include "loader/drv.h" +#include "loader/com.h" #include #include #include -#include "win32.h" // printf macro +#include "loader/win32.h" // printf macro typedef long STDCALL (*GETCLASS) (const GUID*, const GUID*, void**); diff --git a/loader/dshow/DS_VideoDecoder.c b/loader/dshow/DS_VideoDecoder.c index 7f5c8994ad..130e31c07a 100644 --- a/loader/dshow/DS_VideoDecoder.c +++ b/loader/dshow/DS_VideoDecoder.c @@ -7,7 +7,7 @@ #include "config.h" #include "guids.h" #include "interfaces.h" -#include "registry.h" +#include "loader/registry.h" #include "libwin32.h" #include "DS_Filter.h" @@ -30,9 +30,9 @@ static SampleProcUserData sampleProcData; #include "DS_VideoDecoder.h" -#include "wine/winerror.h" +#include "loader/wine/winerror.h" #ifdef WIN32_LOADER -#include "ldt_keeper.h" +#include "loader/ldt_keeper.h" #endif #include diff --git a/loader/dshow/allocator.c b/loader/dshow/allocator.c index 3e0deabceb..8ead279a37 100644 --- a/loader/dshow/allocator.c +++ b/loader/dshow/allocator.c @@ -5,8 +5,8 @@ #include "config.h" #include "allocator.h" -#include "com.h" -#include "wine/winerror.h" +#include "loader/com.h" +#include "loader/wine/winerror.h" #include #include diff --git a/loader/dshow/cmediasample.c b/loader/dshow/cmediasample.c index 98a864b3be..c594bae787 100644 --- a/loader/dshow/cmediasample.c +++ b/loader/dshow/cmediasample.c @@ -5,7 +5,7 @@ #include "cmediasample.h" #include "mediatype.h" -#include "wine/winerror.h" +#include "loader/wine/winerror.h" #include #include #include diff --git a/loader/dshow/guids.h b/loader/dshow/guids.h index 5666ec3041..5bf335f907 100644 --- a/loader/dshow/guids.h +++ b/loader/dshow/guids.h @@ -7,13 +7,13 @@ under MinGW */ #ifndef GUID_DEFINED -#include "com.h" +#include "loader/com.h" #endif #ifndef VFWAPI -#include "wine/module.h" -#include "wine/windef.h" -#include "wine/vfw.h" +#include "loader/wine/module.h" +#include "loader/wine/windef.h" +#include "loader/wine/vfw.h" #endif #include "mediatype.h" diff --git a/loader/dshow/inputpin.c b/loader/dshow/inputpin.c index 37d9f758fa..5c9b832f7a 100644 --- a/loader/dshow/inputpin.c +++ b/loader/dshow/inputpin.c @@ -5,7 +5,7 @@ #include "inputpin.h" #include "mediatype.h" -#include "wine/winerror.h" +#include "loader/wine/winerror.h" #include #include #include diff --git a/loader/dshow/interfaces.h b/loader/dshow/interfaces.h index 8cac9712b8..5c927a55be 100644 --- a/loader/dshow/interfaces.h +++ b/loader/dshow/interfaces.h @@ -8,7 +8,7 @@ */ #include "iunk.h" -#include "com.h" +#include "loader/com.h" /* Sh*t. MSVC++ and g++ use different methods of storing vtables. */ diff --git a/loader/dshow/libwin32.h b/loader/dshow/libwin32.h index 70d5e0f006..dd25c31941 100644 --- a/loader/dshow/libwin32.h +++ b/loader/dshow/libwin32.h @@ -6,10 +6,10 @@ #include //#define FATAL(a) // you don't need exception - if you want - just fill more code -#include "wine/mmreg.h" -#include "wine/winreg.h" -#include "wine/vfw.h" -#include "com.h" +#include "loader/wine/mmreg.h" +#include "loader/wine/winreg.h" +#include "loader/wine/vfw.h" +#include "loader/com.h" typedef uint32_t fourcc_t; diff --git a/loader/dshow/mediatype.c b/loader/dshow/mediatype.c index d6597fa767..873c303477 100644 --- a/loader/dshow/mediatype.c +++ b/loader/dshow/mediatype.c @@ -22,8 +22,8 @@ */ #include "mp_msg.h" #include "libmpcodecs/img_format.h" -#include "wine/winerror.h" -#include "com.h" +#include "loader/wine/winerror.h" +#include "loader/com.h" #include "mediatype.h" #include "libwin32.h" diff --git a/loader/dshow/outputpin.c b/loader/dshow/outputpin.c index d876f4401f..c24c29efb3 100644 --- a/loader/dshow/outputpin.c +++ b/loader/dshow/outputpin.c @@ -3,8 +3,8 @@ * http://svn.mplayerhq.hu/mplayer/trunk/ */ -#include "wine/winerror.h" -#include "wine/windef.h" +#include "loader/wine/winerror.h" +#include "loader/wine/windef.h" #include "outputpin.h" #include "mediatype.h" #include diff --git a/loader/qtx/list.c b/loader/qtx/list.c index 0140f9b954..8c1ea6abe2 100644 --- a/loader/qtx/list.c +++ b/loader/qtx/list.c @@ -8,7 +8,7 @@ #include "qtxsdk/components.h" #include "qtxsdk/select.h" -#include "ldt_keeper.h" +#include "loader/ldt_keeper.h" char* get_path(const char* x){ return strdup(x);} void* LoadLibraryA(char* name); diff --git a/loader/qtx/qtxload.c b/loader/qtx/qtxload.c index fe95ac87a5..029fad2881 100644 --- a/loader/qtx/qtxload.c +++ b/loader/qtx/qtxload.c @@ -4,7 +4,7 @@ #include "qtxsdk/components.h" #include "qtxsdk/select.h" -#include "ldt_keeper.h" +#include "loader/ldt_keeper.h" #include "mp_msg.h" /* this is what a plain component looks like */ -- cgit v1.2.3 From dec1227f1cf98ffb6fc2c8b9fdaac535eda6e496 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 20:36:27 +0000 Subject: Add required header #includes to satisfy 'make checkheaders'. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30213 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/dmo/DMO_AudioDecoder.h | 3 +++ loader/dmo/DMO_VideoDecoder.h | 3 +++ loader/dshow/DS_AudioDecoder.h | 3 +++ loader/dshow/DS_VideoDecoder.h | 3 +++ loader/registry.h | 2 ++ loader/wine/objbase.h | 2 ++ loader/wine/vfw.h | 2 ++ loader/wine/winuser.h | 1 + 8 files changed, 19 insertions(+) diff --git a/loader/dmo/DMO_AudioDecoder.h b/loader/dmo/DMO_AudioDecoder.h index b4b3dc66e9..d7d0035c84 100644 --- a/loader/dmo/DMO_AudioDecoder.h +++ b/loader/dmo/DMO_AudioDecoder.h @@ -1,6 +1,9 @@ #ifndef MPLAYER_DMO_AUDIODECODER_H #define MPLAYER_DMO_AUDIODECODER_H +#include "loader/com.h" +#include "loader/wine/mmreg.h" + typedef struct DMO_AudioDecoder DMO_AudioDecoder; //DMO_AudioDecoder * DMO_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf); diff --git a/loader/dmo/DMO_VideoDecoder.h b/loader/dmo/DMO_VideoDecoder.h index 9e6269be22..77af6ded09 100644 --- a/loader/dmo/DMO_VideoDecoder.h +++ b/loader/dmo/DMO_VideoDecoder.h @@ -1,6 +1,9 @@ #ifndef MPLAYER_DMO_VIDEODECODER_H #define MPLAYER_DMO_VIDEODECODER_H +#include "loader/com.h" +#include "loader/wine/vfw.h" + typedef struct DMO_VideoDecoder DMO_VideoDecoder; int DMO_VideoDecoder_GetCapabilities(DMO_VideoDecoder *this); diff --git a/loader/dshow/DS_AudioDecoder.h b/loader/dshow/DS_AudioDecoder.h index 0b09d3b19c..157993cda3 100644 --- a/loader/dshow/DS_AudioDecoder.h +++ b/loader/dshow/DS_AudioDecoder.h @@ -1,6 +1,9 @@ #ifndef MPLAYER_DS_AUDIODECODER_H #define MPLAYER_DS_AUDIODECODER_H +#include "loader/com.h" +#include "loader/wine/mmreg.h" + typedef struct DS_AudioDecoder DS_AudioDecoder; //DS_AudioDecoder * DS_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf); diff --git a/loader/dshow/DS_VideoDecoder.h b/loader/dshow/DS_VideoDecoder.h index b686554b89..f1a0898868 100644 --- a/loader/dshow/DS_VideoDecoder.h +++ b/loader/dshow/DS_VideoDecoder.h @@ -1,6 +1,9 @@ #ifndef MPLAYER_DS_VIDEODECODER_H #define MPLAYER_DS_VIDEODECODER_H +#include "loader/com.h" +#include "loader/wine/vfw.h" + typedef struct DS_VideoDecoder DS_VideoDecoder; int DS_VideoDecoder_GetCapabilities(DS_VideoDecoder *this); diff --git a/loader/registry.h b/loader/registry.h index 4e5e708f30..4f0d09f53d 100644 --- a/loader/registry.h +++ b/loader/registry.h @@ -17,6 +17,8 @@ extern "C" { #endif +#include "wine/winbase.h" + void free_registry(void); long __stdcall RegOpenKeyExA(long key, const char* subkey, long reserved, diff --git a/loader/wine/objbase.h b/loader/wine/objbase.h index 26d72d76c7..902bbaa32e 100644 --- a/loader/wine/objbase.h +++ b/loader/wine/objbase.h @@ -1,6 +1,8 @@ #ifndef MPLAYER_OBJBASE_H #define MPLAYER_OBJBASE_H +#include "windef.h" + #ifndef STDCALL #define STDCALL __attribute__((__stdcall__)) #endif diff --git a/loader/wine/vfw.h b/loader/wine/vfw.h index a3b05daff3..1cf94b5ac7 100644 --- a/loader/wine/vfw.h +++ b/loader/wine/vfw.h @@ -10,6 +10,8 @@ extern "C" { #endif +#include "windef.h" + typedef struct __attribute__((__packed__)) { short bfType; diff --git a/loader/wine/winuser.h b/loader/wine/winuser.h index bf60f873f0..cda96c4f23 100644 --- a/loader/wine/winuser.h +++ b/loader/wine/winuser.h @@ -9,6 +9,7 @@ extern "C" { #endif +#include "windef.h" #include "pshpack1.h" /* flags for HIGHCONTRAST dwFlags field */ -- cgit v1.2.3 From bf258cb6758553cfc8bdf554572061f612651082 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 20:53:57 +0000 Subject: Remove previous failed attempt at disabling that auto-generation of some C code. This reverts the previous buggy commit, r30094. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30214 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 2 +- vidix/pci_db2c.awk | 54 +++++++++++++++++++++++++++++++++++++++++++++--------- vidix/pci_names.c | 50 -------------------------------------------------- 3 files changed, 46 insertions(+), 60 deletions(-) delete mode 100644 vidix/pci_names.c diff --git a/Makefile b/Makefile index df040880fa..7363000018 100644 --- a/Makefile +++ b/Makefile @@ -897,7 +897,7 @@ tremor/%: CFLAGS += $(CFLAGS_TREMOR_LOW) vidix/%: CFLAGS += $(CFLAGS_DHAHELPER) $(CFLAGS_SVGALIB_HELPER) -VIDIX_PCI_FILES = vidix/pci_dev_ids.c vidix/pci_ids.h vidix/pci_vendor_ids.h \ +VIDIX_PCI_FILES = vidix/pci_dev_ids.c vidix/pci_ids.h vidix/pci_names.c \ vidix/pci_vendors.h $(VIDIX_PCI_FILES): vidix/pci_db2c.awk vidix/pci.db diff --git a/vidix/pci_db2c.awk b/vidix/pci_db2c.awk index 976dd76640..1d577202b3 100755 --- a/vidix/pci_db2c.awk +++ b/vidix/pci_db2c.awk @@ -34,12 +34,12 @@ BEGIN { with_pci_db = ARGV[2]; dev_ids_c_file = "vidix/pci_dev_ids.c" ids_h_file = "vidix/pci_ids.h" - vendor_ids_h_file = "vidix/pci_vendor_ids.h" + names_c_file = "vidix/pci_names.c" vendors_h_file = "vidix/pci_vendors.h"; # print out head lines print_head(vendors_h_file); print_head(ids_h_file); - print_head(vendor_ids_h_file); + print_head(names_c_file); print_head(dev_ids_c_file); print "#include " > dev_ids_c_file; print "#include \"pci_names.h\"" > dev_ids_c_file; @@ -49,12 +49,12 @@ BEGIN { print "#include \"pci_vendors.h\"" > ids_h_file print "" > ids_h_file - print "#include " > vendor_ids_h_file - print "#include \"pci_names.h\"" > vendor_ids_h_file + print "#include " > names_c_file + print "#include \"pci_names.h\"" > names_c_file if (with_pci_db) { - print "#include \"pci_dev_ids.c\"" > vendor_ids_h_file - print "" > vendor_ids_h_file - print "static struct vendor_id_s vendor_ids[] = {" > vendor_ids_h_file + print "#include \"pci_dev_ids.c\"" > names_c_file + print "" > names_c_file + print "static struct vendor_id_s vendor_ids[] = {" > names_c_file } first_pass = 1; init_name_db(); @@ -67,7 +67,7 @@ BEGIN { printf("#define VENDOR_%s\t", svend_name) > vendors_h_file; if (length(svend_name) < 9) printf("\t") > vendors_h_file; printf("0x%s /*%s*/\n", field[2], name_field) > vendors_h_file; - if (with_pci_db) printf("{ 0x%s, \"%s\", dev_lst_%s },\n", field[2], name_field, field[2]) > vendor_ids_h_file; + if (with_pci_db) printf("{ 0x%s, \"%s\", dev_lst_%s },\n", field[2], name_field, field[2]) > names_c_file; printf("/* Vendor: %s: %s */\n", field[2], name_field) > ids_h_file if (first_pass == 1) first_pass = 0; else print "{ 0xFFFF, NULL }\n};" > dev_ids_c_file; @@ -100,9 +100,10 @@ BEGIN { } print_guards_end(vendors_h_file); print_guards_end(ids_h_file); - if (with_pci_db) print "};" > vendor_ids_h_file + if (with_pci_db) print "};" > names_c_file print "{ 0xFFFF, NULL }" > dev_ids_c_file; print "};" > dev_ids_c_file + print_func_bodies(names_c_file); } function construct_guard_name(out_file) @@ -134,6 +135,41 @@ function print_head(out_file) print "" > out_file } +function print_func_bodies(out_file) +{ + print "" > out_file + print "const char *pci_vendor_name(unsigned short id)" > out_file + print "{" > out_file + if (with_pci_db) { + print " unsigned i;" > out_file + print " for (i = 0; i < sizeof(vendor_ids) / sizeof(struct vendor_id_s); i++) {" > out_file + print " if (vendor_ids[i].id == id)" > out_file + print " return vendor_ids[i].name;" > out_file + print " }" > out_file + } + print " return NULL;" > out_file + print "}" > out_file + print "" > out_file + print "const char *pci_device_name(unsigned short vendor_id, unsigned short device_id)" > out_file + print "{" > out_file + if (with_pci_db) { + print " unsigned i, j;" > out_file + print " for (i = 0; i < sizeof(vendor_ids) / sizeof(struct vendor_id_s); i++) {" > out_file + print " if (vendor_ids[i].id == vendor_id) {" > out_file + print " j = 0;" > out_file + print " while (vendor_ids[i].dev_list[j].id != 0xFFFF) {" > out_file + print " if (vendor_ids[i].dev_list[j].id == device_id)" > out_file + print " return vendor_ids[i].dev_list[j].name;" > out_file + print " j++;" > out_file + print " };" > out_file + print " break;" > out_file + print " }" > out_file + print " }" > out_file + } + print " return NULL;" > out_file + print "}" > out_file +} + function kill_double_quoting(fld) { n = split(fld, phrases, "[\"]"); diff --git a/vidix/pci_names.c b/vidix/pci_names.c deleted file mode 100644 index d7348446ac..0000000000 --- a/vidix/pci_names.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * VIDIX - VIDeo Interface for *niX. - * - * This file is part of MPlayer. - * - * MPlayer is free software; you can redistribute it and/or modify - * 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. - * - * MPlayer 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 - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with MPlayer; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include -#include "pci_names.h" -#include "pci_vendor_ids.h" - -const char *pci_vendor_name(unsigned short id) -{ - unsigned i; - for (i = 0; i < sizeof(vendor_ids) / sizeof(struct vendor_id_s); i++) { - if (vendor_ids[i].id == id) - return vendor_ids[i].name; - } - return NULL; -} - -const char *pci_device_name(unsigned short vendor_id, unsigned short device_id) -{ - unsigned i, j; - for (i = 0; i < sizeof(vendor_ids) / sizeof(struct vendor_id_s); i++) { - if (vendor_ids[i].id == vendor_id) { - j = 0; - while (vendor_ids[i].dev_list[j].id != 0xFFFF) { - if (vendor_ids[i].dev_list[j].id == device_id) - return vendor_ids[i].dev_list[j].name; - j++; - }; - break; - } - } - return NULL; -} -- cgit v1.2.3 From 01ced9c82ce292357a083151f278d0b0b0d368fe Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 21:10:15 +0000 Subject: cosmetics: Break multiple statements on one line apart. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30215 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/pci_db2c.awk | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/vidix/pci_db2c.awk b/vidix/pci_db2c.awk index 1d577202b3..8a1cb69cbb 100755 --- a/vidix/pci_db2c.awk +++ b/vidix/pci_db2c.awk @@ -65,13 +65,17 @@ BEGIN { init_device_db() svend_name = get_short_vendor_name(field[3]) printf("#define VENDOR_%s\t", svend_name) > vendors_h_file; - if (length(svend_name) < 9) printf("\t") > vendors_h_file; + if (length(svend_name) < 9) + printf("\t") > vendors_h_file; printf("0x%s /*%s*/\n", field[2], name_field) > vendors_h_file; - if (with_pci_db) printf("{ 0x%s, \"%s\", dev_lst_%s },\n", field[2], name_field, field[2]) > names_c_file; + if (with_pci_db) + printf("{ 0x%s, \"%s\", dev_lst_%s },\n", field[2], name_field, field[2]) > names_c_file; printf("/* Vendor: %s: %s */\n", field[2], name_field) > ids_h_file - if (first_pass == 1) first_pass = 0; - else print "{ 0xFFFF, NULL }\n};" > dev_ids_c_file; - printf("static const struct device_id_s dev_lst_%s[] = {\n", field[2])> dev_ids_c_file + if (first_pass == 1) + first_pass = 0; + else + print "{ 0xFFFF, NULL }\n};" > dev_ids_c_file; + printf("static const struct device_id_s dev_lst_%s[] = {\n", field[2]) > dev_ids_c_file } if (field[1] == "d" && length(field[3]) > 0 && field[4] == "0") { sdev_name = get_short_device_name(field[3]) @@ -100,7 +104,8 @@ BEGIN { } print_guards_end(vendors_h_file); print_guards_end(ids_h_file); - if (with_pci_db) print "};" > names_c_file + if (with_pci_db) + print "};" > names_c_file print "{ 0xFFFF, NULL }" > dev_ids_c_file; print "};" > dev_ids_c_file print_func_bodies(names_c_file); @@ -174,7 +179,8 @@ function kill_double_quoting(fld) { n = split(fld, phrases, "[\"]"); new_fld = phrases[1] - for (i = 2; i <= n; i++) new_fld = sprintf("%s\\\"%s", new_fld, phrases[i]) + for (i = 2; i <= n; i++) + new_fld = sprintf("%s\\\"%s", new_fld, phrases[i]) return new_fld } @@ -186,10 +192,12 @@ function init_name_db() function init_device_db() { # delete device_names - for (i in device_names) delete device_names[i]; + for (i in device_names) + delete device_names[i]; device_names[1] = "" # delete subdevice_names - for (i in subdevice_names) delete subdevice_names[i]; + for (i in subdevice_names) + delete subdevice_names[i]; subdevice_names[1] = "" } @@ -197,10 +205,12 @@ function get_short_vendor_name(from) { n = split(from, name, "[ ]"); new_name = toupper(name[1]); - if (length(new_name) < 3) new_name = sprintf("%s_%s", new_name, toupper(name[2])); + if (length(new_name) < 3) + new_name = sprintf("%s_%s", new_name, toupper(name[2])); n = split(new_name, name, "[^0-9A-Za-z]"); svendor = name[1]; - for (i = 2; i <= n; i++) svendor = sprintf("%s%s%s", svendor, length(name[i]) ? "_" : "", name[i]); + for (i = 2; i <= n; i++) + svendor = sprintf("%s%s%s", svendor, length(name[i]) ? "_" : "", name[i]); new_name = svendor; vend_suffix = 2; # check for unique @@ -217,11 +227,14 @@ function get_short_device_name(from_name) { n = split(from_name, name, "[ ]"); new_name = toupper(name[1]); - if (length(name[2])) new_name = sprintf("%s_%s", new_name, toupper(name[2])); - if (length(name[3])) new_name = sprintf("%s_%s", new_name, toupper(name[3])); + if (length(name[2])) + new_name = sprintf("%s_%s", new_name, toupper(name[2])); + if (length(name[3])) + new_name = sprintf("%s_%s", new_name, toupper(name[3])); n = split(new_name, name, "[^0-9A-Za-z]"); sdevice = name[1]; - for (i = 2; i <= n; i++) sdevice = sprintf("%s%s%s", sdevice, length(name[i]) ? "_" : "", name[i]); + for (i = 2; i <= n; i++) + sdevice = sprintf("%s%s%s", sdevice, length(name[i]) ? "_" : "", name[i]); new_name = sdevice; dev_suffix = 2; # check for unique @@ -238,11 +251,14 @@ function get_short_subdevice_name(from_name) { n = split(from_name, name, "[ ]"); new_name = toupper(name[1]); - if (length(name[2])) new_name = sprintf("%s_%s", new_name, toupper(name[2])); - if (length(name[3])) new_name = sprintf("%s_%s", new_name, toupper(name[3])); + if (length(name[2])) + new_name = sprintf("%s_%s", new_name, toupper(name[2])); + if (length(name[3])) + new_name = sprintf("%s_%s", new_name, toupper(name[3])); n = split(new_name, name, "[^0-9A-Za-z]"); ssdevice = name[1]; - for (i = 2; i <= n; i++) ssdevice = sprintf("%s%s%s", ssdevice, length(name[i]) ? "_" : "", name[i]); + for (i = 2; i <= n; i++) + ssdevice = sprintf("%s%s%s", ssdevice, length(name[i]) ? "_" : "", name[i]); new_name = ssdevice; sdev_suffix = 2; # check for unique -- cgit v1.2.3 From a7a1f395c6b883b34aeaf008c0d22d6fe3dcd1c8 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 4 Jan 2010 21:22:33 +0000 Subject: Invoke pci_db2c.awk as an argument to awk instead of letting the shell run it. The shell looks for awk in /usr/bin, the path from the shebang line. However, there exist systems with awk in /bin, namely archlinux. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30216 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7363000018..46069a7d8b 100644 --- a/Makefile +++ b/Makefile @@ -901,7 +901,7 @@ VIDIX_PCI_FILES = vidix/pci_dev_ids.c vidix/pci_ids.h vidix/pci_names.c \ vidix/pci_vendors.h $(VIDIX_PCI_FILES): vidix/pci_db2c.awk vidix/pci.db - $^ $(VIDIX_PCIDB) + awk -f $^ $(VIDIX_PCIDB) VIDIX_DEPS = $(filter vidix/%,$(SRCS_MPLAYER:.c=.d)) VIDIX_OBJS = $(filter vidix/%,$(SRCS_MPLAYER:.c=.o)) -- cgit v1.2.3