# HG changeset patch # User diego # Date 1217622538 0 # Node ID d788e177a35eb3eb803f69dcbca317dd96ccbd16 # Parent e736897cf006aee1f2e5b3ebeb0c2ce7c99e219e Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate; CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff. diff -r e736897cf006 -r d788e177a35e cfg-common-opts.h --- a/cfg-common-opts.h Fri Aug 01 18:10:01 2008 +0000 +++ b/cfg-common-opts.h Fri Aug 01 20:28:58 2008 +0000 @@ -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 CONFIG_ICONV +#ifdef HAVE_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 CONFIG_FRIBIDI +#ifdef HAVE_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 /* CONFIG_FRIBIDI */ -#ifdef CONFIG_ICONV +#endif /* HAVE_FRIBIDI */ +#ifdef HAVE_ICONV {"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif {"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL}, diff -r e736897cf006 -r d788e177a35e cfg-mplayer.h --- a/cfg-mplayer.h Fri Aug 01 18:10:01 2008 +0000 +++ b/cfg-mplayer.h Fri Aug 01 20:28:58 2008 +0000 @@ -259,13 +259,13 @@ {"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 CONFIG_FRIBIDI +#ifdef HAVE_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 /* CONFIG_FRIBIDI */ +#endif /* HAVE_FRIBIDI */ #else {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL}, #endif /* CONFIG_MENU */ diff -r e736897cf006 -r d788e177a35e configure --- a/configure Fri Aug 01 18:10:01 2008 +0000 +++ b/configure Fri Aug 01 20:28:58 2008 +0000 @@ -2598,9 +2598,9 @@ cc_check && _langinfo=yes fi if test "$_langinfo" = yes ; then - _def_langinfo='#define CONFIG_LANGINFO 1' -else - _def_langinfo='#undef CONFIG_LANGINFO' + _def_langinfo='#define HAVE_LANGINFO 1' +else + _def_langinfo='#undef HAVE_LANGINFO' fi echores "$_langinfo" @@ -2859,9 +2859,9 @@ echores "$_use_aton" fi -_def_use_aton='#undef CONFIG_ATON' +_def_use_aton='#undef HAVE_ATON' if test "$_use_aton" = yes; then - _def_use_aton='#define CONFIG_ATON 1' + _def_use_aton='#define HAVE_ATON 1' fi @@ -3169,9 +3169,9 @@ done fi if test "$_iconv" = yes ; then - _def_iconv='#define CONFIG_ICONV 1' -else - _def_iconv='#undef CONFIG_ICONV' + _def_iconv='#define HAVE_ICONV 1' +else + _def_iconv='#undef HAVE_ICONV' fi echores "$_iconv" @@ -3330,10 +3330,10 @@ done fi if test "$_termcap" = yes ; then - _def_termcap='#define CONFIG_TERMCAP 1' + _def_termcap='#define HAVE_TERMCAP 1' _res_comment="using $_ld_tmp" else - _def_termcap='#undef CONFIG_TERMCAP' + _def_termcap='#undef HAVE_TERMCAP' fi echores "$_termcap" @@ -5725,11 +5725,11 @@ fi fi if test "$_fribidi" = yes ; then - _def_fribidi='#define CONFIG_FRIBIDI' + _def_fribidi='#define HAVE_FRIBIDI' _inc_extra="$_inc_extra `$_fribidiconfig --cflags`" _ld_extra="$_ld_extra `$_fribidiconfig --libs`" else - _def_fribidi='#undef CONFIG_FRIBIDI' + _def_fribidi='#undef HAVE_FRIBIDI' fi echores "$_fribidi" diff -r e736897cf006 -r d788e177a35e gui/cfg.c --- a/gui/cfg.c Fri Aug 01 18:10:01 2008 +0000 +++ b/gui/cfg.c Fri Aug 01 20:28:58 2008 +0000 @@ -165,7 +165,7 @@ #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 CONFIG_ICONV +#ifdef HAVE_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 }, diff -r e736897cf006 -r d788e177a35e gui/interface.c --- a/gui/interface.c Fri Aug 01 18:10:01 2008 +0000 +++ b/gui/interface.c Fri Aug 01 20:28:58 2008 +0000 @@ -51,7 +51,7 @@ extern af_cfg_t af_cfg; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include #endif @@ -1107,7 +1107,7 @@ guiLoadFont(); return NULL; #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV case gtkSetSubEncoding: gfree( (void **)&sub_cp ); sub_cp=gstrdup( (char *)vparam ); diff -r e736897cf006 -r d788e177a35e gui/mplayer/gtk/opts.c --- a/gui/mplayer/gtk/opts.c Fri Aug 01 18:10:01 2008 +0000 +++ b/gui/mplayer/gtk/opts.c Fri Aug 01 20:28:58 2008 +0000 @@ -133,11 +133,11 @@ //static GtkWidget * AutoScale; #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static GtkWidget * CBSubEncoding, * ESubEncoding; #endif -#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV) +#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV) static struct { char * name; @@ -188,7 +188,7 @@ 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(CONFIG_ICONV) +#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV) static void prEntry( GtkContainer * container,gpointer user_data ); #endif @@ -312,7 +312,7 @@ if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename ); #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if ( sub_cp ) { int i; @@ -460,7 +460,7 @@ 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 CONFIG_ICONV +#ifdef HAVE_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 @@ #endif } -#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV) +#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV) static void prEntry( GtkContainer * container,gpointer user_data ) { const char * comment; @@ -508,7 +508,7 @@ if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name ); break; #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV case 1: // sub encoding comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) ); for ( i=0;lEncoding[i].name;i++ ) @@ -1030,7 +1030,7 @@ 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 CONFIG_ICONV +#ifdef HAVE_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 @@ 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 CONFIG_ICONV +#ifdef HAVE_ICONV CBSubEncoding=gtk_combo_new(); gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" ); gtk_widget_show( CBSubEncoding ); diff -r e736897cf006 -r d788e177a35e libass/ass.c --- a/libass/ass.c Fri Aug 01 18:10:01 2008 +0000 +++ b/libass/ass.c Fri Aug 01 20:28:58 2008 +0000 @@ -32,7 +32,7 @@ #include #include -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include #endif @@ -810,7 +810,7 @@ free(str); } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV /** \brief recode buffer to utf-8 * constraint: codepage != 0 * \param data pointer to text buffer @@ -991,7 +991,7 @@ if (!buf) return 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (codepage) buf = sub_recode(buf, bufsize, codepage); if (!buf) @@ -1017,7 +1017,7 @@ buf = read_file(fname, &bufsize); if (!buf) return 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (codepage) { char* tmpbuf = sub_recode(buf, bufsize, codepage); free(buf); @@ -1071,7 +1071,7 @@ buf = read_file(fname, &sz); if (!buf) return 1; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (codepage) { char* tmpbuf; tmpbuf = sub_recode(buf, sz, codepage); diff -r e736897cf006 -r d788e177a35e libass/ass_mp.c --- a/libass/ass_mp.c Fri Aug 01 18:10:01 2008 +0000 +++ b/libass/ass_mp.c Fri Aug 01 20:28:58 2008 +0000 @@ -65,7 +65,7 @@ extern float text_font_scale_factor; extern int subtitle_autoscale; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV extern char* sub_cp; #else static char* sub_cp = 0; diff -r e736897cf006 -r d788e177a35e libmenu/menu.c --- a/libmenu/menu.c Fri Aug 01 18:10:01 2008 +0000 +++ b/libmenu/menu.c Fri Aug 01 20:28:58 2008 +0000 @@ -403,7 +403,7 @@ } } -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI #include #include "libavutil/common.h" char *menu_fribidi_charset = NULL; @@ -459,7 +459,7 @@ return; } -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI txt = menu_fribidi(txt); #endif render_txt(txt); @@ -493,7 +493,7 @@ return; } -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI txt = menu_fribidi(txt); #endif render_txt(txt); diff -r e736897cf006 -r d788e177a35e libmpdemux/demux_ogg.c --- a/libmpdemux/demux_ogg.c Fri Aug 01 18:10:01 2008 +0000 +++ b/libmpdemux/demux_ogg.c Fri Aug 01 20:28:58 2008 +0000 @@ -196,7 +196,7 @@ mp_msg(MSGT_DEMUX,MSGL_DBG2,"Ogg sub lines: %d first: '%s'\n", ogg_sub.lines, ogg_sub.text[0]); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_recode(&ogg_sub); #endif vo_sub = &ogg_sub; @@ -745,7 +745,7 @@ sh_audio_t* sh_a; sh_video_t* sh_v; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_open(NULL); #endif @@ -1486,7 +1486,7 @@ if(!ogg_d) return; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); #endif diff -r e736897cf006 -r d788e177a35e libvo/font_load_ft.c --- a/libvo/font_load_ft.c Fri Aug 01 18:10:01 2008 +0000 +++ b/libvo/font_load_ft.c Fri Aug 01 20:28:58 2008 +0000 @@ -16,7 +16,7 @@ #include #include -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include #endif @@ -716,7 +716,7 @@ return 0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV /* decode from 'encoding' to unicode */ static FT_ULong decode_char(iconv_t *cd, char c) { FT_ULong o; @@ -1009,7 +1009,7 @@ } desc->face_cnt++; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (unicode) { charset_size = prepare_charset_unicode(face, my_charset, my_charcodes); } else { diff -r e736897cf006 -r d788e177a35e mp_msg.c --- a/mp_msg.c Fri Aug 01 18:10:01 2008 +0000 +++ b/mp_msg.c Fri Aug 01 20:28:58 2008 +0000 @@ -5,7 +5,7 @@ #include "config.h" -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include #include extern char* get_term_charset(void); @@ -29,7 +29,7 @@ int verbose = 0; int mp_msg_color = 0; int mp_msg_module = 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV char *mp_msg_charset = NULL; static char *old_charset = NULL; static iconv_t msgiconv; @@ -37,7 +37,7 @@ const char* filename_recode(const char* filename) { -#if !defined(CONFIG_ICONV) || !defined(MSG_CHARSET) +#if !defined(HAVE_ICONV) || !defined(MSG_CHARSET) return filename; #else static iconv_t inv_msgiconv = (iconv_t)(-1); @@ -73,7 +73,7 @@ verbose = atoi(env); for(i=0;i #include #endif @@ -182,12 +182,12 @@ getch2_status = 0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV char *get_term_charset( void ) { char *charset = NULL; -#ifdef CONFIG_LANGINFO +#ifdef HAVE_LANGINFO setlocale( LC_CTYPE, ""); charset = nl_langinfo( CODESET ); setlocale( LC_CTYPE, "C"); diff -r e736897cf006 -r d788e177a35e osdep/getch2-win.c --- a/osdep/getch2-win.c Fri Aug 01 18:10:01 2008 +0000 +++ b/osdep/getch2-win.c Fri Aug 01 20:28:58 2008 +0000 @@ -142,7 +142,7 @@ getch2_status=0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static const struct { unsigned cp; char* alias; diff -r e736897cf006 -r d788e177a35e osdep/getch2.c --- a/osdep/getch2.c Fri Aug 01 18:10:01 2008 +0000 +++ b/osdep/getch2.c Fri Aug 01 20:28:58 2008 +0000 @@ -2,7 +2,7 @@ #include "config.h" -//#define CONFIG_TERMCAP +//#define HAVE_TERMCAP #if !defined(__OS2__) && !defined(__MORPHOS__) #define CONFIG_IOCTL #endif @@ -28,7 +28,7 @@ #endif #endif -#if defined(CONFIG_LANGINFO) && defined(CONFIG_ICONV) +#if defined(HAVE_LANGINFO) && defined(HAVE_ICONV) #include #include #endif @@ -56,7 +56,7 @@ static keycode_st getch2_keys[MAX_KEYS]; static int getch2_key_db=0; -#ifdef CONFIG_TERMCAP +#ifdef HAVE_TERMCAP #if 0 #include @@ -270,11 +270,11 @@ getch2_status=0; } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV char* get_term_charset(void) { char* charset = NULL; -#ifdef CONFIG_LANGINFO +#ifdef HAVE_LANGINFO setlocale(LC_CTYPE, ""); charset = nl_langinfo(CODESET); setlocale(LC_CTYPE, "C"); diff -r e736897cf006 -r d788e177a35e stream/asf_mmst_streaming.c --- a/stream/asf_mmst_streaming.c Fri Aug 01 18:10:01 2008 +0000 +++ b/stream/asf_mmst_streaming.c Fri Aug 01 20:28:58 2008 +0000 @@ -46,12 +46,12 @@ #endif #ifndef CONFIG_SETLOCALE -#undef CONFIG_ICONV +#undef HAVE_ICONV #endif -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include -#ifdef CONFIG_LANGINFO +#ifdef HAVE_LANGINFO #include #endif #endif @@ -143,13 +143,13 @@ } } -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static iconv_t url_conv; #endif static void string_utf16(char *dest, char *src, int len) { int i; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV size_t len1, len2; char *ip, *op; @@ -172,7 +172,7 @@ /* trailing zeroes */ dest[i*2] = 0; dest[i*2+1] = 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV } #endif } @@ -575,8 +575,8 @@ * */ /* prepare for the url encoding conversion */ -#ifdef CONFIG_ICONV -#ifdef CONFIG_LANGINFO +#ifdef HAVE_ICONV +#ifdef HAVE_LANGINFO url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET)); #else url_conv = iconv_open("UTF-16LE", NULL); @@ -690,7 +690,7 @@ packet_length1 = packet_length; mp_msg(MSGT_NETWORK,MSGL_INFO,"mmst packet_length = %d\n", packet_length); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (url_conv != (iconv_t)(-1)) iconv_close(url_conv); #endif diff -r e736897cf006 -r d788e177a35e stream/librtsp/rtsp_rtp.c --- a/stream/librtsp/rtsp_rtp.c Fri Aug 01 18:10:01 2008 +0000 +++ b/stream/librtsp/rtsp_rtp.c Fri Aug 01 20:28:58 2008 +0000 @@ -297,7 +297,7 @@ sin.sin_addr.s_addr = htonl (INADDR_ANY); else #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON inet_aton (hostname, &sin.sin_addr); #else inet_pton (AF_INET, hostname, &sin.sin_addr); @@ -386,7 +386,7 @@ sin.sin_family = AF_INET; #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON inet_aton (addr, &sin.sin_addr); #else inet_pton (AF_INET, addr, &sin.sin_addr); diff -r e736897cf006 -r d788e177a35e stream/tcp.c --- a/stream/tcp.c Fri Aug 01 18:10:01 2008 +0000 +++ b/stream/tcp.c Fri Aug 01 20:28:58 2008 +0000 @@ -116,7 +116,7 @@ memset(&server_address, 0, sizeof(server_address)); #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON if (inet_aton(host, our_s_addr)!=1) #else if (inet_pton(af, host, our_s_addr)!=1) @@ -164,7 +164,7 @@ return TCP_ERROR_FATAL; } -#if defined(CONFIG_ATON) || defined(HAVE_WINSOCK2) +#if defined(HAVE_ATON) || defined(HAVE_WINSOCK2) strncpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255); #else inet_ntop(af, our_s_addr, buf, 255); diff -r e736897cf006 -r d788e177a35e stream/udp.c --- a/stream/udp.c Fri Aug 01 18:10:01 2008 +0000 +++ b/stream/udp.c Fri Aug 01 20:28:58 2008 +0000 @@ -92,11 +92,11 @@ else { #ifndef HAVE_WINSOCK2 -#ifdef CONFIG_ATON +#ifdef HAVE_ATON inet_aton (url->hostname, &server_address.sin_addr); #else inet_pton (AF_INET, url->hostname, &server_address.sin_addr); -#endif /* CONFIG_ATON */ +#endif /* HAVE_ATON */ #else server_address.sin_addr.s_addr = htonl(INADDR_ANY); #endif /* HAVE_WINSOCK2 */ diff -r e736897cf006 -r d788e177a35e subreader.c --- a/subreader.c Fri Aug 01 18:10:01 2008 +0000 +++ b/subreader.c Fri Aug 01 20:28:58 2008 +0000 @@ -26,11 +26,11 @@ #define ERR ((void *) -1) -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include char *sub_cp=NULL; #endif -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI #include char *fribidi_charset = NULL; ///character set that will be passed to FriBiDi int flip_hebrew = 1; ///flip subtitles using fribidi @@ -1071,7 +1071,7 @@ extern float sub_delay; extern float sub_fps; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV static iconv_t icdsc = (iconv_t)(-1); void subcp_open (stream_t *st) @@ -1146,7 +1146,7 @@ } #endif -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI #ifndef max #define max(a,b) (((a)>(b))?(a):(b)) #endif @@ -1369,7 +1369,7 @@ stream_reset(fd); stream_seek(fd,0); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV sub_utf8_prev=sub_utf8; { int l,k; @@ -1389,7 +1389,7 @@ sub_num=0;n_max=32; first=malloc(n_max*sizeof(subtitle)); if(!first){ -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); sub_utf8=sub_utf8_prev; #endif @@ -1413,15 +1413,15 @@ memset(sub, '\0', sizeof(subtitle)); sub=srp->read(fd,sub); if(!sub) break; // EOF -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if ((sub!=ERR) && (sub_utf8 & 2)) sub=subcp_recode(sub); #endif -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_FRIBIDI if (sub!=ERR) sub=sub_fribidi(sub,sub_utf8); #endif if ( sub == ERR ) { -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); #endif if ( first ) free(first); @@ -1474,7 +1474,7 @@ free_stream(fd); -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV subcp_close(); #endif @@ -1876,7 +1876,7 @@ // does it end with a subtitle extension? found = 0; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #ifdef HAVE_ENCA for (i = ((sub_cp && strncasecmp(sub_cp, "enca", 4) != 0) ? 3 : 0); sub_exts[i]; i++) { #else @@ -1931,7 +1931,7 @@ if (prio) { prio += prio; -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV if (i<3){ // prefer UTF-8 coded prio++; }