Mercurial > mplayer.hg
changeset 27359:d788e177a35e
Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;
CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff.
author | diego |
---|---|
date | Fri, 01 Aug 2008 20:28:58 +0000 |
parents | e736897cf006 |
children | 4787919c418a |
files | cfg-common-opts.h cfg-mplayer.h configure gui/cfg.c gui/interface.c gui/mplayer/gtk/opts.c libass/ass.c libass/ass_mp.c libmenu/menu.c libmpdemux/demux_ogg.c libvo/font_load_ft.c mp_msg.c mplayer.c osdep/getch2-os2.c osdep/getch2-win.c osdep/getch2.c stream/asf_mmst_streaming.c stream/librtsp/rtsp_rtp.c stream/tcp.c stream/udp.c subreader.c |
diffstat | 21 files changed, 88 insertions(+), 88 deletions(-) [+] |
line wrap: on
line diff
--- 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},
--- 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 */
--- 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"
--- 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 },
--- 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 <iconv.h> #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 );
--- 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 );
--- 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 <unistd.h> #include <inttypes.h> -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include <iconv.h> #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);
--- 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;
--- 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 <fribidi/fribidi.h> #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);
--- 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
--- 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 <math.h> #include <string.h> -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV #include <iconv.h> #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 {
--- 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 <iconv.h> #include <errno.h> 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<MSGT_MAX;i++) mp_msg_levels[i] = -2; mp_msg_levels[MSGT_IDENTIFY] = -1; // no -identify output by default -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV mp_msg_charset = getenv("MPLAYER_CHARSET"); if (!mp_msg_charset) mp_msg_charset = get_term_charset(); @@ -184,7 +184,7 @@ guiMessageBox(lev, tmp); #endif -#if defined(CONFIG_ICONV) && defined(MSG_CHARSET) +#if defined(HAVE_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;
--- a/mplayer.c Fri Aug 01 18:10:01 2008 +0000 +++ b/mplayer.c Fri Aug 01 20:28:58 2008 +0000 @@ -1027,7 +1027,7 @@ subd = sub_read_file(filename, fps); #ifdef CONFIG_ASS if (ass_enabled) -#ifdef CONFIG_ICONV +#ifdef HAVE_ICONV asst = ass_read_file(ass_library, filename, sub_cp); #else asst = ass_read_file(ass_library, filename, 0); @@ -2850,7 +2850,7 @@ mp_msg(MSGT_CPLAYER, MSGL_V, "Using %s timing\n", softsleep?"software":timer_name); -#ifdef CONFIG_TERMCAP +#ifdef HAVE_TERMCAP if ( !use_gui ) load_termcap(NULL); // load key-codes #endif
--- a/osdep/getch2-os2.c Fri Aug 01 18:10:01 2008 +0000 +++ b/osdep/getch2-os2.c Fri Aug 01 20:28:58 2008 +0000 @@ -32,7 +32,7 @@ #include "input/input.h" #include "mp_fifo.h" -#if defined(CONFIG_LANGINFO) && defined(CONFIG_ICONV) +#if defined(HAVE_LANGINFO) && defined(HAVE_ICONV) #include <locale.h> #include <langinfo.h> #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");
--- 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;
--- 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 <locale.h> #include <langinfo.h> #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 <termcap.h> @@ -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");
--- 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 <iconv.h> -#ifdef CONFIG_LANGINFO +#ifdef HAVE_LANGINFO #include <langinfo.h> #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
--- 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);
--- 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);
--- 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 */
--- 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 <iconv.h> char *sub_cp=NULL; #endif -#ifdef CONFIG_FRIBIDI +#ifdef HAVE_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 @@ 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++; }