[MPlayer-cvslog] r27425 - in trunk: cfg-common-opts.h cfg-mplayer.h command.c configure gui/cfg.c gui/interface.c gui/mplayer/gtk/fs.c gui/mplayer/gtk/opts.c libass/ass.c libass/ass_font.c libass/ass_fontconfig.c libass/ass_fontconfig.h libass/ass_mp.c libmenu/menu.c libmenu/vf_menu.c libmpdemux/demux_ogg.c libvo/font_load.h libvo/font_load_ft.c libvo/sub.c libvo/vo_aa.c libvo/vo_dxr3.c libvo/vo_gl.c mencoder.c mp_msg.c mplayer.c osdep/getch2-os2.c osdep/getch2-win.c osdep/getch2.c stream/asf_mmst_streaming.c subreader.c subreader.h
diego
subversion at mplayerhq.hu
Thu Aug 7 12:36:07 CEST 2008
Author: diego
Date: Thu Aug 7 12:36:07 2008
New Revision: 27425
Log:
Rename font-related preprocessor directives.
Switch them from a HAVE_ to a CONFIG_ prefix.
Modified:
trunk/cfg-common-opts.h
trunk/cfg-mplayer.h
trunk/command.c
trunk/configure
trunk/gui/cfg.c
trunk/gui/interface.c
trunk/gui/mplayer/gtk/fs.c
trunk/gui/mplayer/gtk/opts.c
trunk/libass/ass.c
trunk/libass/ass_font.c
trunk/libass/ass_fontconfig.c
trunk/libass/ass_fontconfig.h
trunk/libass/ass_mp.c
trunk/libmenu/menu.c
trunk/libmenu/vf_menu.c
trunk/libmpdemux/demux_ogg.c
trunk/libvo/font_load.h
trunk/libvo/font_load_ft.c
trunk/libvo/sub.c
trunk/libvo/vo_aa.c
trunk/libvo/vo_dxr3.c
trunk/libvo/vo_gl.c
trunk/mencoder.c
trunk/mp_msg.c
trunk/mplayer.c
trunk/osdep/getch2-os2.c
trunk/osdep/getch2-win.c
trunk/osdep/getch2.c
trunk/stream/asf_mmst_streaming.c
trunk/subreader.c
trunk/subreader.h
Modified: trunk/cfg-common-opts.h
==============================================================================
--- trunk/cfg-common-opts.h (original)
+++ trunk/cfg-common-opts.h Thu Aug 7 12:36:07 2008
@@ -11,7 +11,7 @@
{"msglevel", msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
{"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"msgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
{"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
#endif
{"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL},
@@ -264,7 +264,7 @@
// ------------------------- subtitles options --------------------
{"sub", &sub_name, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
{"fribidi-charset", &fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"flip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"noflip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
@@ -276,8 +276,8 @@
{"noflip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
{"flip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
{"noflip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-#endif /* HAVE_FRIBIDI */
-#ifdef HAVE_ICONV
+#endif /* CONFIG_FRIBIDI */
+#ifdef CONFIG_ICONV
{"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL},
#endif
{"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
@@ -309,7 +309,7 @@
{"spualign", &spu_alignment, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL},
{"spuaa", &spu_aamode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
{"spugauss", &spu_gaussvar, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 3.0, NULL},
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
{"subfont-encoding", &subtitle_font_encoding, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"subfont-text-scale", &text_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
{"subfont-osd-scale", &osd_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
@@ -334,12 +334,12 @@
{"ass-styles", &ass_styles_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"ass-hinting", &ass_hinting, CONF_TYPE_INT, CONF_RANGE, 0, 7, NULL},
#endif
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
{"fontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, -1, 1, NULL},
{"nofontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, 1, -1, NULL},
#else
{"fontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
{"nofontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-#endif /* HAVE_FONTCONFIG */
+#endif /* CONFIG_FONTCONFIG */
#endif /* MPLAYER_CFG_COMMON_OPTS_H */
Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h (original)
+++ trunk/cfg-mplayer.h Thu Aug 7 12:36:07 2008
@@ -259,13 +259,13 @@ const m_option_t mplayer_opts[]={
{"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"menu-keepdir", &menu_keepdir, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"menu-chroot", &menu_chroot, CONF_TYPE_STRING, 0, 0, 0, NULL},
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
{"menu-fribidi-charset", &menu_fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"menu-flip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"menu-noflip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"menu-flip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"menu-noflip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-#endif /* HAVE_FRIBIDI */
+#endif /* CONFIG_FRIBIDI */
#else
{"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL},
#endif /* CONFIG_MENU */
Modified: trunk/command.c
==============================================================================
--- trunk/command.c (original)
+++ trunk/command.c Thu Aug 7 12:36:07 2008
@@ -1776,7 +1776,7 @@ static int mp_property_sub_forced_only(m
}
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
/// Subtitle scale (RW)
static int mp_property_sub_scale(m_option_t * prop, int action, void *arg,
MPContext * mpctx)
@@ -2076,7 +2076,7 @@ static const m_option_t mp_properties[]
M_OPT_RANGE, 0, 1, NULL },
{ "sub_forced_only", mp_property_sub_forced_only, CONF_TYPE_FLAG,
M_OPT_RANGE, 0, 1, NULL },
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
{ "sub_scale", mp_property_sub_scale, CONF_TYPE_FLOAT,
M_OPT_RANGE, 0, 100, NULL },
#endif
@@ -2209,7 +2209,7 @@ static struct {
{ "sub_delay", MP_CMD_SUB_DELAY, 0, 0, OSD_MSG_SUB_DELAY, MSGTR_SubDelayStatus },
{ "sub_visibility", MP_CMD_SUB_VISIBILITY, 1, 0, -1, MSGTR_SubVisibleStatus },
{ "sub_forced_only", MP_CMD_SUB_FORCED_ONLY, 1, 0, -1, MSGTR_SubForcedOnlyStatus },
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
{ "sub_scale", MP_CMD_SUB_SCALE, 0, 0, -1, MSGTR_SubScale},
#endif
#ifdef CONFIG_ASS
Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Thu Aug 7 12:36:07 2008
@@ -3173,9 +3173,9 @@ EOF
done
fi
if test "$_iconv" = yes ; then
- _def_iconv='#define HAVE_ICONV 1'
+ _def_iconv='#define CONFIG_ICONV 1'
else
- _def_iconv='#undef HAVE_ICONV'
+ _def_iconv='#undef CONFIG_ICONV'
fi
echores "$_iconv"
@@ -5647,11 +5647,11 @@ EOF
fi
fi
if test "$_freetype" = yes ; then
- _def_freetype='#define HAVE_FREETYPE'
+ _def_freetype='#define CONFIG_FREETYPE'
_inc_extra="$_inc_extra `$_freetypeconfig --cflags`"
_ld_extra="$_ld_extra `$_freetypeconfig --libs`"
else
- _def_freetype='#undef HAVE_FREETYPE'
+ _def_freetype='#undef CONFIG_FREETYPE'
fi
echores "$_freetype"
@@ -5687,9 +5687,9 @@ EOF
fi
fi
if test "$_fontconfig" = yes ; then
- _def_fontconfig='#define HAVE_FONTCONFIG'
+ _def_fontconfig='#define CONFIG_FONTCONFIG'
else
- _def_fontconfig='#undef HAVE_FONTCONFIG'
+ _def_fontconfig='#undef CONFIG_FONTCONFIG'
fi
echores "$_fontconfig"
@@ -5747,11 +5747,11 @@ EOF
fi
fi
if test "$_fribidi" = yes ; then
- _def_fribidi='#define HAVE_FRIBIDI'
+ _def_fribidi='#define CONFIG_FRIBIDI'
_inc_extra="$_inc_extra `$_fribidiconfig --cflags`"
_ld_extra="$_ld_extra `$_fribidiconfig --libs`"
else
- _def_fribidi='#undef HAVE_FRIBIDI'
+ _def_fribidi='#undef CONFIG_FRIBIDI'
fi
echores "$_fribidi"
@@ -5772,10 +5772,10 @@ EOF
cc_check -lenca $_ld_lm && _enca=yes
fi
if test "$_enca" = yes ; then
- _def_enca='#define HAVE_ENCA 1'
+ _def_enca='#define CONFIG_ENCA 1'
_ld_extra="$_ld_extra -lenca"
else
- _def_enca='#undef HAVE_ENCA'
+ _def_enca='#undef CONFIG_ENCA'
fi
echores "$_enca"
Modified: trunk/gui/cfg.c
==============================================================================
--- trunk/gui/cfg.c (original)
+++ trunk/gui/cfg.c Thu Aug 7 12:36:07 2008
@@ -165,12 +165,12 @@ static const m_option_t gui_opts[] =
#endif
{ "sub_pos",&sub_pos,CONF_TYPE_INT,CONF_RANGE,0,200,NULL },
{ "sub_overlap",&suboverlap_enabled,CONF_TYPE_FLAG,0,0,0,NULL },
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
{ "sub_cp",&sub_cp,CONF_TYPE_STRING,0,0,0,NULL },
#endif
{ "font_factor",&font_factor,CONF_TYPE_FLOAT,CONF_RANGE,0.0,10.0,NULL },
{ "font_name",&font_name,CONF_TYPE_STRING,0,0,0,NULL },
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
{ "font_encoding",&subtitle_font_encoding,CONF_TYPE_STRING,0,0,0,NULL },
{ "font_text_scale",&text_font_scale_factor,CONF_TYPE_FLOAT,CONF_RANGE,0,100,NULL },
{ "font_osd_scale",&osd_font_scale_factor,CONF_TYPE_FLOAT,CONF_RANGE,0,100,NULL },
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c (original)
+++ trunk/gui/interface.c Thu Aug 7 12:36:07 2008
@@ -51,7 +51,7 @@
extern af_cfg_t af_cfg;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
#include <iconv.h>
#endif
@@ -400,7 +400,7 @@ extern m_obj_settings_t * vf_settings;
void guiLoadFont( void )
{
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
load_font_ft(vo_image_width, vo_image_height, &vo_font, font_name, osd_font_scale_factor);
#else
if ( vo_font )
@@ -1075,7 +1075,7 @@ void * gtkSet( int cmd,float fparam, voi
} else { url_item->next=NULL; URLList=url_item; }
return NULL;
// --- subtitle
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
case gtkSetFontFactor:
font_factor=fparam;
guiLoadFont();
@@ -1107,7 +1107,7 @@ void * gtkSet( int cmd,float fparam, voi
guiLoadFont();
return NULL;
#endif
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
case gtkSetSubEncoding:
gfree( (void **)&sub_cp );
sub_cp=gstrdup( (char *)vparam );
Modified: trunk/gui/mplayer/gtk/fs.c
==============================================================================
--- trunk/gui/mplayer/gtk/fs.c (original)
+++ trunk/gui/mplayer/gtk/fs.c Thu Aug 7 12:36:07 2008
@@ -116,7 +116,7 @@ int fsLastAudioFilterSelected = -1;
char * fsFontFileNames[][2] =
{
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
{ "True Type fonts (*.ttf)", "*.ttf" },
{ "Type1 fonts (*.pfb)", "*.pfb" },
{ "All fonts", "*.ttf,*.pfb" },
Modified: trunk/gui/mplayer/gtk/opts.c
==============================================================================
--- trunk/gui/mplayer/gtk/opts.c (original)
+++ trunk/gui/mplayer/gtk/opts.c Thu Aug 7 12:36:07 2008
@@ -122,7 +122,7 @@ static GtkWidget * HSFPS;
static GtkAdjustment * HSExtraStereoMuladj, * HSAudioDelayadj, * HSPanscanadj, * HSSubDelayadj;
static GtkAdjustment * HSSubPositionadj, * HSSubFPSadj, * HSPPQualityadj, * HSFPSadj;
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
static GtkWidget * HSFontFactor;
static GtkAdjustment * HSFontFactoradj;
#else
@@ -133,11 +133,11 @@ static GtkWidget * RBFontNoAutoScale
//static GtkWidget * AutoScale;
#endif
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
static GtkWidget * CBSubEncoding, * ESubEncoding;
#endif
-#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV)
+#if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV)
static struct
{
char * name;
@@ -188,7 +188,7 @@ static int old_video_driver = 0;
static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data );
static void prToggled( GtkToggleButton * togglebutton,gpointer user_data );
static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data );
-#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV)
+#if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV)
static void prEntry( GtkContainer * container,gpointer user_data );
#endif
@@ -312,7 +312,7 @@ void ShowPreferences( void )
if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename );
#endif
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
if ( sub_cp )
{
int i;
@@ -326,7 +326,7 @@ void ShowPreferences( void )
// --- 4. page
// font ...
if ( font_name ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),font_name );
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
gtk_adjustment_set_value( HSFontFactoradj,font_factor );
#else
gtk_adjustment_set_value( HSFontBluradj,( subtitle_font_radius / 8.0f ) * 100.0f );
@@ -434,7 +434,7 @@ void ShowPreferences( void )
gtk_signal_connect( GTK_OBJECT( CBSoftwareMixer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)1 );
gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)2 );
gtk_signal_connect( GTK_OBJECT( CBShowVideoWindow ),"toggled",GTK_SIGNAL_FUNC( prToggled ), (void*)3 );
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
gtk_signal_connect( GTK_OBJECT( RBFontNoAutoScale ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)4 );
gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleHeight ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)5 );
gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleWidth ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)6 );
@@ -451,7 +451,7 @@ void ShowPreferences( void )
gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)2 );
gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)3 );
gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)4 );
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)5 );
#else
gtk_signal_connect( GTK_OBJECT( HSFontBlur ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)6 );
@@ -460,7 +460,7 @@ void ShowPreferences( void )
gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 );
gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)0 );
#endif
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 );
#endif
gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 );
@@ -492,7 +492,7 @@ void HidePreferences( void )
#endif
}
-#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV)
+#if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV)
static void prEntry( GtkContainer * container,gpointer user_data )
{
const char * comment;
@@ -500,7 +500,7 @@ static void prEntry( GtkContainer * cont
switch( (int)user_data )
{
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
case 0: // font encoding
comment=gtk_entry_get_text( GTK_ENTRY( EFontEncoding ) );
for ( i=0;lEncoding[i].name;i++ )
@@ -508,7 +508,7 @@ static void prEntry( GtkContainer * cont
if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name );
break;
#endif
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
case 1: // sub encoding
comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) );
for ( i=0;lEncoding[i].name;i++ )
@@ -580,7 +580,7 @@ void prButton( GtkButton * button,gpoint
// --- 4. page
guiSetFilename( font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) );
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL );
#else
gtkSet( gtkSetFontBlur,HSFontBluradj->value,NULL );
@@ -684,7 +684,7 @@ static gboolean prHScaler( GtkWidget * w
case 4: // sub position
sub_pos=(int)HSSubPositionadj->value;
break;
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
case 5: // font factor
gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL );
break;
@@ -827,7 +827,7 @@ GtkWidget * create_Preferences( void )
GtkWidget * vbox603;
GtkWidget * hbox6;
GtkWidget * hbuttonbox5;
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
GtkWidget * hbox7;
#endif
GtkWidget * vbox601;
@@ -1030,7 +1030,7 @@ GtkWidget * create_Preferences( void )
label=AddLabel( MSGTR_PREFERENCES_SUB_FPS,NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL );
gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
#endif
@@ -1051,7 +1051,7 @@ GtkWidget * create_Preferences( void )
gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSSubFPS ),TRUE );
gtk_table_attach( GTK_TABLE( table1 ),HSSubFPS,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
CBSubEncoding=gtk_combo_new();
gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" );
gtk_widget_show( CBSubEncoding );
@@ -1117,7 +1117,7 @@ GtkWidget * create_Preferences( void )
gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox5 ),3 );
BLoadFont=AddButton( MSGTR_Browse,hbuttonbox5 );
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
hbox7=AddHBox( vbox603,1 );
AddLabel( MSGTR_PREFERENCES_FontFactor,hbox7 );
HSFontFactoradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10,0.05,0,0 ) );
Modified: trunk/libass/ass.c
==============================================================================
--- trunk/libass/ass.c (original)
+++ trunk/libass/ass.c Thu Aug 7 12:36:07 2008
@@ -32,7 +32,7 @@
#include <unistd.h>
#include <inttypes.h>
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
#include <iconv.h>
#endif
@@ -810,7 +810,7 @@ void ass_process_chunk(ass_track_t* trac
free(str);
}
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
/** \brief recode buffer to utf-8
* constraint: codepage != 0
* \param data pointer to text buffer
@@ -826,7 +826,7 @@ static char* sub_recode(char* data, size
{
const char* cp_tmp = codepage;
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ENCA
char enca_lang[3], enca_fallback[100];
if (sscanf(codepage, "enca:%2s:%99s", enca_lang, enca_fallback) == 2
|| sscanf(codepage, "ENCA:%2s:%99s", enca_lang, enca_fallback) == 2) {
@@ -991,7 +991,7 @@ ass_track_t* ass_read_memory(ass_library
if (!buf)
return 0;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
if (codepage)
buf = sub_recode(buf, bufsize, codepage);
if (!buf)
@@ -1017,7 +1017,7 @@ char* read_file_recode(char* fname, char
buf = read_file(fname, &bufsize);
if (!buf)
return 0;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
if (codepage) {
char* tmpbuf = sub_recode(buf, bufsize, codepage);
free(buf);
@@ -1071,7 +1071,7 @@ int ass_read_styles(ass_track_t* track,
buf = read_file(fname, &sz);
if (!buf)
return 1;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
if (codepage) {
char* tmpbuf;
tmpbuf = sub_recode(buf, sz, codepage);
Modified: trunk/libass/ass_font.c
==============================================================================
--- trunk/libass/ass_font.c (original)
+++ trunk/libass/ass_font.c Thu Aug 7 12:36:07 2008
@@ -284,7 +284,7 @@ FT_Glyph ass_font_get_glyph(void* fontco
break;
}
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
if (index == 0) {
int face_idx;
mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_GlyphNotFoundReselectingFont,
Modified: trunk/libass/ass_fontconfig.c
==============================================================================
--- trunk/libass/ass_fontconfig.c (original)
+++ trunk/libass/ass_fontconfig.c Thu Aug 7 12:36:07 2008
@@ -37,13 +37,13 @@
#include "ass_library.h"
#include "ass_fontconfig.h"
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
#include <fontconfig/fontconfig.h>
#include <fontconfig/fcfreetype.h>
#endif
struct fc_instance_s {
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
FcConfig* config;
#endif
char* family_default;
@@ -51,7 +51,7 @@ struct fc_instance_s {
int index_default;
};
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
// 4yo fontconfig does not have these.
// They are only needed for debug output, anyway.
@@ -474,7 +474,7 @@ fc_instance_t* fontconfig_init(ass_libra
return priv;
}
-#else // HAVE_FONTCONFIG
+#else /* CONFIG_FONTCONFIG */
char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index,
uint32_t code)
Modified: trunk/libass/ass_fontconfig.h
==============================================================================
--- trunk/libass/ass_fontconfig.h (original)
+++ trunk/libass/ass_fontconfig.h Thu Aug 7 12:36:07 2008
@@ -28,7 +28,7 @@
#include <ft2build.h>
#include FT_FREETYPE_H
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
#include <fontconfig/fontconfig.h>
#endif
Modified: trunk/libass/ass_mp.c
==============================================================================
--- trunk/libass/ass_mp.c (original)
+++ trunk/libass/ass_mp.c Thu Aug 7 12:36:07 2008
@@ -32,7 +32,7 @@
#include "ass_mp.h"
#include "ass_library.h"
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
#include <fontconfig/fontconfig.h>
#endif
@@ -55,7 +55,7 @@ char* ass_border_color = NULL;
char* ass_styles_file = NULL;
int ass_hinting = ASS_HINTING_NATIVE + 4; // native hinting for unscaled osd
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
extern int font_fontconfig;
#else
static int font_fontconfig = -1;
@@ -65,7 +65,7 @@ extern char* sub_font_name;
extern float text_font_scale_factor;
extern int subtitle_autoscale;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
extern char* sub_cp;
#else
static char* sub_cp = 0;
Modified: trunk/libmenu/menu.c
==============================================================================
--- trunk/libmenu/menu.c (original)
+++ trunk/libmenu/menu.c Thu Aug 7 12:36:07 2008
@@ -215,7 +215,7 @@ int menu_init(struct MPContext *mpctx, c
char* buffer = NULL;
int bl = BUF_STEP, br = 0;
int f, fd;
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
if(vo_font == NULL)
return 0;
#endif
@@ -403,7 +403,7 @@ static void render_txt(char *txt)
}
}
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
#include <fribidi/fribidi.h>
#include "libavutil/common.h"
char *menu_fribidi_charset = NULL;
@@ -459,7 +459,7 @@ void menu_draw_text(mp_image_t* mpi,char
return;
}
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
txt = menu_fribidi(txt);
#endif
render_txt(txt);
@@ -493,7 +493,7 @@ void menu_draw_text_full(mp_image_t* mpi
return;
}
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
txt = menu_fribidi(txt);
#endif
render_txt(txt);
Modified: trunk/libmenu/vf_menu.c
==============================================================================
--- trunk/libmenu/vf_menu.c (original)
+++ trunk/libmenu/vf_menu.c Thu Aug 7 12:36:07 2008
@@ -202,7 +202,7 @@ static void uninit(vf_instance_t *vf) {
static int config(struct vf_instance_s* vf, int width, int height, int d_width, int d_height,
unsigned int flags, unsigned int outfmt) {
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
// here is the right place to get screen dimensions
if (force_load_font) {
force_load_font = 0;
Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c (original)
+++ trunk/libmpdemux/demux_ogg.c Thu Aug 7 12:36:07 2008
@@ -196,7 +196,7 @@ void demux_ogg_add_sub (ogg_stream_t* os
mp_msg(MSGT_DEMUX,MSGL_DBG2,"Ogg sub lines: %d first: '%s'\n",
ogg_sub.lines, ogg_sub.text[0]);
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
subcp_recode(&ogg_sub);
#endif
vo_sub = &ogg_sub;
@@ -745,7 +745,7 @@ int demux_ogg_open(demuxer_t* demuxer) {
sh_audio_t* sh_a;
sh_video_t* sh_v;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
subcp_open(NULL);
#endif
@@ -1486,7 +1486,7 @@ static void demux_close_ogg(demuxer_t* d
if(!ogg_d)
return;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
subcp_close();
#endif
Modified: trunk/libvo/font_load.h
==============================================================================
--- trunk/libvo/font_load.h (original)
+++ trunk/libvo/font_load.h Thu Aug 7 12:36:07 2008
@@ -1,7 +1,7 @@
#ifndef MPLAYER_FONT_LOAD_H
#define MPLAYER_FONT_LOAD_H
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
#include <ft2build.h>
#include FT_FREETYPE_H
#endif
@@ -10,14 +10,14 @@ typedef struct {
unsigned char *bmp;
unsigned char *pal;
int w,h,c;
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
int charwidth,charheight,pen,baseline,padding;
int current_count, current_alloc;
#endif
} raw_file;
typedef struct font_desc {
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
int dynamic;
#endif
char *name;
@@ -34,7 +34,7 @@ typedef struct font_desc {
short width[65536];
int freetype;
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
int face_cnt;
FT_Face faces[16];
@@ -64,7 +64,7 @@ typedef struct font_desc {
extern font_desc_t* vo_font;
extern font_desc_t* sub_font;
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
extern char *subtitle_font_encoding;
extern float text_font_scale_factor;
Modified: trunk/libvo/font_load_ft.c
==============================================================================
--- trunk/libvo/font_load_ft.c (original)
+++ trunk/libvo/font_load_ft.c Thu Aug 7 12:36:07 2008
@@ -16,7 +16,7 @@
#include <math.h>
#include <string.h>
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
#include <iconv.h>
#endif
@@ -24,7 +24,7 @@
#include FT_FREETYPE_H
#include FT_GLYPH_H
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
#include <fontconfig/fontconfig.h>
#endif
@@ -716,7 +716,7 @@ static int generate_tables(font_desc_t *
return 0;
}
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
/* decode from 'encoding' to unicode */
static FT_ULong decode_char(iconv_t *cd, char c) {
FT_ULong o;
@@ -1009,7 +1009,7 @@ font_desc_t* read_font_desc_ft(const cha
}
desc->face_cnt++;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
if (unicode) {
charset_size = prepare_charset_unicode(face, my_charset, my_charcodes);
} else {
@@ -1124,7 +1124,7 @@ int done_freetype(void)
void load_font_ft(int width, int height, font_desc_t** fontp, const char *font_name, float font_scale_factor)
{
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
FcPattern *fc_pattern;
FcPattern *fc_pattern2;
FcChar8 *s;
@@ -1139,7 +1139,7 @@ void load_font_ft(int width, int height,
if (vo_font) free_font_desc(vo_font);
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
if (font_fontconfig > 0)
{
if (!font_name)
Modified: trunk/libvo/sub.c
==============================================================================
--- trunk/libvo/sub.c (original)
+++ trunk/libvo/sub.c Thu Aug 7 12:36:07 2008
@@ -1065,11 +1065,11 @@ void free_osd_list(void){
int vo_update_osd(int dxs,int dys){
mp_osd_obj_t* obj=vo_osd_list;
int chg=0;
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
static int defer_counter = 0, prev_dxs = 0, prev_dys = 0;
#endif
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
// here is the right place to get screen dimensions
if (((dxs != vo_image_width)
&& (subtitle_autoscale == 2 || subtitle_autoscale == 3))
@@ -1198,7 +1198,7 @@ void vo_init_osd(void){
#if CONFIG_TV_TELETEXT
new_osd_obj(OSDTYPE_TELETEXT);
#endif
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
force_load_font = 1;
#endif
}
Modified: trunk/libvo/vo_aa.c
==============================================================================
--- trunk/libvo/vo_aa.c (original)
+++ trunk/libvo/vo_aa.c Thu Aug 7 12:36:07 2008
@@ -247,7 +247,7 @@ config(uint32_t width, uint32_t height,
vo_font->pic_b[0]=malloc(sizeof(raw_file));
memset(vo_font->pic_b[0],0,sizeof(raw_file));
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
vo_font->dynamic = 0;
#endif
Modified: trunk/libvo/vo_dxr3.c
==============================================================================
--- trunk/libvo/vo_dxr3.c (original)
+++ trunk/libvo/vo_dxr3.c Thu Aug 7 12:36:07 2008
@@ -429,7 +429,7 @@ static int config(uint32_t width, uint32
ioctl(fd_control, EM8300_IOCTL_SET_ASPECTRATIO, &ioval);
#ifdef SPU_SUPPORT
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
if (ioval == EM8300_ASPECTRATIO_16_9) {
s_width *= d_height*1.78/s_height*(d_width*1.0/d_height)/2.35;
} else {
Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c (original)
+++ trunk/libvo/vo_gl.c Thu Aug 7 12:36:07 2008
@@ -149,7 +149,7 @@ static void resize(int x,int y){
glLoadIdentity();
if (!scaled_osd) {
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
// adjust font size to display size
force_load_font = 1;
#endif
Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c (original)
+++ trunk/mencoder.c Thu Aug 7 12:36:07 2008
@@ -530,10 +530,10 @@ if (frameno_filename) {
#endif
// check font
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
init_freetype();
#endif
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
if(font_fontconfig <= 0)
{
#endif
@@ -548,7 +548,7 @@ if (frameno_filename) {
vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1);
}
#endif
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
}
#endif
Modified: trunk/mp_msg.c
==============================================================================
--- trunk/mp_msg.c (original)
+++ trunk/mp_msg.c Thu Aug 7 12:36:07 2008
@@ -5,7 +5,7 @@
#include "config.h"
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
#include <iconv.h>
#include <errno.h>
extern char* get_term_charset(void);
@@ -29,7 +29,7 @@ int mp_msg_level_all = MSGL_STATUS;
int verbose = 0;
int mp_msg_color = 0;
int mp_msg_module = 0;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
char *mp_msg_charset = NULL;
static char *old_charset = NULL;
static iconv_t msgiconv;
@@ -37,7 +37,7 @@ static iconv_t msgiconv;
const char* filename_recode(const char* filename)
{
-#if !defined(HAVE_ICONV) || !defined(MSG_CHARSET)
+#if !defined(CONFIG_ICONV) || !defined(MSG_CHARSET)
return filename;
#else
static iconv_t inv_msgiconv = (iconv_t)(-1);
@@ -73,7 +73,7 @@ void mp_msg_init(void){
verbose = atoi(env);
for(i=0;i<MSGT_MAX;i++) mp_msg_levels[i] = -2;
mp_msg_levels[MSGT_IDENTIFY] = -1; // no -identify output by default
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
mp_msg_charset = getenv("MPLAYER_CHARSET");
if (!mp_msg_charset)
mp_msg_charset = get_term_charset();
@@ -184,7 +184,7 @@ void mp_msg(int mod, int lev, const char
guiMessageBox(lev, tmp);
#endif
-#if defined(HAVE_ICONV) && defined(MSG_CHARSET)
+#if defined(CONFIG_ICONV) && defined(MSG_CHARSET)
if (mp_msg_charset && strcasecmp(mp_msg_charset, "noconv")) {
char tmp2[MSGSIZE_MAX];
size_t inlen = strlen(tmp), outlen = MSGSIZE_MAX;
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c (original)
+++ trunk/mplayer.c Thu Aug 7 12:36:07 2008
@@ -698,7 +698,7 @@ void exit_player_with_rc(const char* how
vo_uninit(); // Close the X11 connection (if any is open).
#endif
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
current_module="uninit_font";
if (sub_font && sub_font != vo_font) free_font_desc(sub_font);
sub_font = NULL;
@@ -1027,7 +1027,7 @@ void add_subtitles(char *filename, float
subd = sub_read_file(filename, fps);
#ifdef CONFIG_ASS
if (ass_enabled)
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
asst = ass_read_file(ass_library, filename, sub_cp);
#else
asst = ass_read_file(ass_library, filename, 0);
@@ -2782,10 +2782,10 @@ if(!codecs_file || !parse_codec_cfg(code
//------ load global data first ------
// check font
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
init_freetype();
#endif
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
if(font_fontconfig <= 0)
{
#endif
@@ -2806,7 +2806,7 @@ if(!codecs_file || !parse_codec_cfg(code
else
sub_font = vo_font;
#endif
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
}
#endif
@@ -3543,7 +3543,7 @@ if(!reinit_video_chain()) {
if(vo_flags & 0x08 && vo_spudec)
spudec_set_hw_spu(vo_spudec,mpctx->video_out);
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
force_load_font = 1;
#endif
Modified: trunk/osdep/getch2-os2.c
==============================================================================
--- trunk/osdep/getch2-os2.c (original)
+++ trunk/osdep/getch2-os2.c Thu Aug 7 12:36:07 2008
@@ -32,7 +32,7 @@
#include "input/input.h"
#include "mp_fifo.h"
-#if defined(HAVE_LANGINFO) && defined(HAVE_ICONV)
+#if defined(HAVE_LANGINFO) && defined(CONFIG_ICONV)
#include <locale.h>
#include <langinfo.h>
#endif
@@ -182,7 +182,7 @@ void getch2_disable( void )
getch2_status = 0;
}
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
char *get_term_charset( void )
{
char *charset = NULL;
Modified: trunk/osdep/getch2-win.c
==============================================================================
--- trunk/osdep/getch2-win.c (original)
+++ trunk/osdep/getch2-win.c Thu Aug 7 12:36:07 2008
@@ -142,7 +142,7 @@ void getch2_disable(){
getch2_status=0;
}
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
static const struct {
unsigned cp;
char* alias;
Modified: trunk/osdep/getch2.c
==============================================================================
--- trunk/osdep/getch2.c (original)
+++ trunk/osdep/getch2.c Thu Aug 7 12:36:07 2008
@@ -28,7 +28,7 @@
#endif
#endif
-#if defined(HAVE_LANGINFO) && defined(HAVE_ICONV)
+#if defined(HAVE_LANGINFO) && defined(CONFIG_ICONV)
#include <locale.h>
#include <langinfo.h>
#endif
@@ -270,7 +270,7 @@ void getch2_disable(void){
getch2_status=0;
}
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
char* get_term_charset(void)
{
char* charset = NULL;
Modified: trunk/stream/asf_mmst_streaming.c
==============================================================================
--- trunk/stream/asf_mmst_streaming.c (original)
+++ trunk/stream/asf_mmst_streaming.c Thu Aug 7 12:36:07 2008
@@ -46,10 +46,10 @@
#endif
#ifndef CONFIG_SETLOCALE
-#undef HAVE_ICONV
+#undef CONFIG_ICONV
#endif
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
#include <iconv.h>
#ifdef HAVE_LANGINFO
#include <langinfo.h>
@@ -143,13 +143,13 @@ static void send_command (int s, int com
}
}
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
static iconv_t url_conv;
#endif
static void string_utf16(char *dest, char *src, int len) {
int i;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
size_t len1, len2;
char *ip, *op;
@@ -172,7 +172,7 @@ static void string_utf16(char *dest, cha
/* trailing zeroes */
dest[i*2] = 0;
dest[i*2+1] = 0;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
}
#endif
}
@@ -575,7 +575,7 @@ int asf_mmst_streaming_start(stream_t *s
* */
/* prepare for the url encoding conversion */
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
#ifdef HAVE_LANGINFO
url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET));
#else
@@ -690,7 +690,7 @@ int asf_mmst_streaming_start(stream_t *s
packet_length1 = packet_length;
mp_msg(MSGT_NETWORK,MSGL_INFO,"mmst packet_length = %d\n", packet_length);
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
if (url_conv != (iconv_t)(-1))
iconv_close(url_conv);
#endif
Modified: trunk/subreader.c
==============================================================================
--- trunk/subreader.c (original)
+++ trunk/subreader.c Thu Aug 7 12:36:07 2008
@@ -20,17 +20,17 @@
#include "subreader.h"
#include "stream/stream.h"
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ENCA
#include <enca.h>
#endif
#define ERR ((void *) -1)
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
#include <iconv.h>
char *sub_cp=NULL;
#endif
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
#include <fribidi/fribidi.h>
char *fribidi_charset = NULL; ///character set that will be passed to FriBiDi
int flip_hebrew = 1; ///flip subtitles using fribidi
@@ -1071,7 +1071,7 @@ int sub_utf8_prev=0;
extern float sub_delay;
extern float sub_fps;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
static iconv_t icdsc = (iconv_t)(-1);
void subcp_open (stream_t *st)
@@ -1080,7 +1080,7 @@ void subcp_open (stream_t *st)
if (sub_cp){
const char *cp_tmp = sub_cp;
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ENCA
char enca_lang[3], enca_fallback[100];
if (sscanf(sub_cp, "enca:%2s:%99s", enca_lang, enca_fallback) == 2
|| sscanf(sub_cp, "ENCA:%2s:%99s", enca_lang, enca_fallback) == 2) {
@@ -1146,7 +1146,7 @@ subtitle* subcp_recode (subtitle *sub)
}
#endif
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
#ifndef max
#define max(a,b) (((a)>(b))?(a):(b))
#endif
@@ -1270,7 +1270,7 @@ struct subreader {
const char *name;
};
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ENCA
const char* guess_buffer_cp(unsigned char* buffer, int buflen, const char *preferred_language, const char *fallback)
{
const char **languages;
@@ -1369,7 +1369,7 @@ sub_data* sub_read_file (char *filename,
stream_reset(fd);
stream_seek(fd,0);
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
sub_utf8_prev=sub_utf8;
{
int l,k;
@@ -1389,7 +1389,7 @@ sub_data* sub_read_file (char *filename,
sub_num=0;n_max=32;
first=malloc(n_max*sizeof(subtitle));
if(!first){
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
subcp_close();
sub_utf8=sub_utf8_prev;
#endif
@@ -1413,15 +1413,15 @@ sub_data* sub_read_file (char *filename,
memset(sub, '\0', sizeof(subtitle));
sub=srp->read(fd,sub);
if(!sub) break; // EOF
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
if ((sub!=ERR) && (sub_utf8 & 2)) sub=subcp_recode(sub);
#endif
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
if (sub!=ERR) sub=sub_fribidi(sub,sub_utf8);
#endif
if ( sub == ERR )
{
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
subcp_close();
#endif
if ( first ) free(first);
@@ -1474,7 +1474,7 @@ sub_data* sub_read_file (char *filename,
free_stream(fd);
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
subcp_close();
#endif
@@ -1876,8 +1876,8 @@ char** sub_filenames(const char* path, c
// does it end with a subtitle extension?
found = 0;
-#ifdef HAVE_ICONV
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ICONV
+#ifdef CONFIG_ENCA
for (i = ((sub_cp && strncasecmp(sub_cp, "enca", 4) != 0) ? 3 : 0); sub_exts[i]; i++) {
#else
for (i = (sub_cp ? 3 : 0); sub_exts[i]; i++) {
@@ -1931,7 +1931,7 @@ char** sub_filenames(const char* path, c
if (prio) {
prio += prio;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
if (i<3){ // prefer UTF-8 coded
prio++;
}
Modified: trunk/subreader.h
==============================================================================
--- trunk/subreader.h (original)
+++ trunk/subreader.h Thu Aug 7 12:36:07 2008
@@ -71,7 +71,7 @@ subtitle* subcp_recode (subtitle *sub);
struct stream_st;
void subcp_open (struct stream_st *st); /* for demux_ogg.c */
void subcp_close (void); /* for demux_ogg.c */
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ENCA
const char* guess_buffer_cp(unsigned char* buffer, int buflen, const char *preferred_language, const char *fallback);
const char* guess_cp(struct stream_st *st, const char *preferred_language, const char *fallback);
#endif
More information about the MPlayer-cvslog
mailing list