[MPlayer-cvslog] r27391 - in trunk: 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

diego subversion at mplayerhq.hu
Fri Aug 1 22:28:59 CEST 2008


Author: diego
Date: Fri Aug  1 22:28:58 2008
New Revision: 27391

Log:
Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;
CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff.


Modified:
   trunk/cfg-common-opts.h
   trunk/cfg-mplayer.h
   trunk/configure
   trunk/gui/cfg.c
   trunk/gui/interface.c
   trunk/gui/mplayer/gtk/opts.c
   trunk/libass/ass.c
   trunk/libass/ass_mp.c
   trunk/libmenu/menu.c
   trunk/libmpdemux/demux_ogg.c
   trunk/libvo/font_load_ft.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/stream/librtsp/rtsp_rtp.c
   trunk/stream/tcp.c
   trunk/stream/udp.c
   trunk/subreader.c

Modified: trunk/cfg-common-opts.h
==============================================================================
--- trunk/cfg-common-opts.h	(original)
+++ trunk/cfg-common-opts.h	Fri Aug  1 22:28:58 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 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},

Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h	(original)
+++ trunk/cfg-mplayer.h	Fri Aug  1 22:28:58 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 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 */

Modified: trunk/configure
==============================================================================
--- trunk/configure	(original)
+++ trunk/configure	Fri Aug  1 22:28:58 2008
@@ -2598,9 +2598,9 @@ EOF
   cc_check && _langinfo=yes
 fi
 if test "$_langinfo" = yes ; then
-  _def_langinfo='#define CONFIG_LANGINFO 1'
+  _def_langinfo='#define HAVE_LANGINFO 1'
 else
-  _def_langinfo='#undef CONFIG_LANGINFO'
+  _def_langinfo='#undef HAVE_LANGINFO'
 fi
 echores "$_langinfo"
 
@@ -2859,9 +2859,9 @@ EOF
   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 @@ EOF
   done
 fi
 if test "$_iconv" = yes ; then
-  _def_iconv='#define CONFIG_ICONV 1'
+  _def_iconv='#define HAVE_ICONV 1'
 else
-  _def_iconv='#undef CONFIG_ICONV'
+  _def_iconv='#undef HAVE_ICONV'
 fi
 echores "$_iconv"
 
@@ -3330,10 +3330,10 @@ EOF
   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 @@ EOF
     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"
 

Modified: trunk/gui/cfg.c
==============================================================================
--- trunk/gui/cfg.c	(original)
+++ trunk/gui/cfg.c	Fri Aug  1 22:28:58 2008
@@ -165,7 +165,7 @@ 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 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 },

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	(original)
+++ trunk/gui/interface.c	Fri Aug  1 22:28:58 2008
@@ -51,7 +51,7 @@
 
 extern af_cfg_t af_cfg;
 
-#ifdef CONFIG_ICONV
+#ifdef HAVE_ICONV
 #include <iconv.h>
 #endif
 
@@ -1107,7 +1107,7 @@ void * gtkSet( int cmd,float fparam, voi
 	guiLoadFont();
 	return NULL;
 #endif
-#ifdef CONFIG_ICONV
+#ifdef HAVE_ICONV
    case gtkSetSubEncoding:
 	gfree( (void **)&sub_cp );
 	sub_cp=gstrdup( (char *)vparam );

Modified: trunk/gui/mplayer/gtk/opts.c
==============================================================================
--- trunk/gui/mplayer/gtk/opts.c	(original)
+++ trunk/gui/mplayer/gtk/opts.c	Fri Aug  1 22:28:58 2008
@@ -133,11 +133,11 @@ static GtkWidget     * RBFontNoAutoScale
 //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 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(CONFIG_ICONV)
+#if defined(HAVE_FREETYPE) || defined(HAVE_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 CONFIG_ICONV
+#ifdef HAVE_ICONV
  if ( sub_cp )
   {
    int i;
@@ -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 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 @@ void HidePreferences( void )
 #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 @@ static void prEntry( GtkContainer * cont
 	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 @@ 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 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 @@ 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 CONFIG_ICONV
+#ifdef HAVE_ICONV
   CBSubEncoding=gtk_combo_new();
   gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" );
   gtk_widget_show( CBSubEncoding );

Modified: trunk/libass/ass.c
==============================================================================
--- trunk/libass/ass.c	(original)
+++ trunk/libass/ass.c	Fri Aug  1 22:28:58 2008
@@ -32,7 +32,7 @@
 #include <unistd.h>
 #include <inttypes.h>
 
-#ifdef CONFIG_ICONV
+#ifdef HAVE_ICONV
 #include <iconv.h>
 #endif
 
@@ -810,7 +810,7 @@ void ass_process_chunk(ass_track_t* trac
 	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 @@ ass_track_t* ass_read_memory(ass_library
 	if (!buf)
 		return 0;
 	
-#ifdef CONFIG_ICONV
+#ifdef HAVE_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 CONFIG_ICONV
+#ifdef HAVE_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 CONFIG_ICONV
+#ifdef HAVE_ICONV
 	if (codepage) {
 		char* tmpbuf;
 		tmpbuf = sub_recode(buf, sz, codepage);

Modified: trunk/libass/ass_mp.c
==============================================================================
--- trunk/libass/ass_mp.c	(original)
+++ trunk/libass/ass_mp.c	Fri Aug  1 22:28:58 2008
@@ -65,7 +65,7 @@ extern char* sub_font_name;
 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;

Modified: trunk/libmenu/menu.c
==============================================================================
--- trunk/libmenu/menu.c	(original)
+++ trunk/libmenu/menu.c	Fri Aug  1 22:28:58 2008
@@ -403,7 +403,7 @@ static void render_txt(char *txt)
   }
 }
 
-#ifdef CONFIG_FRIBIDI
+#ifdef HAVE_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 CONFIG_FRIBIDI
+#ifdef HAVE_FRIBIDI
   txt = menu_fribidi(txt);
 #endif
   render_txt(txt);
@@ -493,7 +493,7 @@ void menu_draw_text_full(mp_image_t* mpi
     return;
   }
 
-#ifdef CONFIG_FRIBIDI
+#ifdef HAVE_FRIBIDI
   txt = menu_fribidi(txt);
 #endif
   render_txt(txt);

Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c	(original)
+++ trunk/libmpdemux/demux_ogg.c	Fri Aug  1 22:28:58 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 CONFIG_ICONV
+#ifdef HAVE_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 CONFIG_ICONV
+#ifdef HAVE_ICONV
   subcp_open(NULL);
 #endif
 
@@ -1486,7 +1486,7 @@ static void demux_close_ogg(demuxer_t* d
   if(!ogg_d)
     return;
 
-#ifdef CONFIG_ICONV
+#ifdef HAVE_ICONV
   subcp_close();
 #endif
 

Modified: trunk/libvo/font_load_ft.c
==============================================================================
--- trunk/libvo/font_load_ft.c	(original)
+++ trunk/libvo/font_load_ft.c	Fri Aug  1 22:28:58 2008
@@ -16,7 +16,7 @@
 #include <math.h>
 #include <string.h>
 
-#ifdef CONFIG_ICONV
+#ifdef HAVE_ICONV
 #include <iconv.h>
 #endif
 
@@ -716,7 +716,7 @@ static int generate_tables(font_desc_t *
     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 @@ font_desc_t* read_font_desc_ft(const cha
     }
     desc->face_cnt++;
 
-#ifdef CONFIG_ICONV
+#ifdef HAVE_ICONV
     if (unicode) {
 	charset_size = prepare_charset_unicode(face, my_charset, my_charcodes);
     } else {

Modified: trunk/mp_msg.c
==============================================================================
--- trunk/mp_msg.c	(original)
+++ trunk/mp_msg.c	Fri Aug  1 22:28:58 2008
@@ -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 mp_msg_level_all = MSGL_STATUS;
 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 @@ static iconv_t msgiconv;
 
 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 @@ 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 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 @@ void mp_msg(int mod, int lev, const char
         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;

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Fri Aug  1 22:28:58 2008
@@ -1027,7 +1027,7 @@ void add_subtitles(char *filename, float
     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 @@ if(!codecs_file || !parse_codec_cfg(code
       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
 

Modified: trunk/osdep/getch2-os2.c
==============================================================================
--- trunk/osdep/getch2-os2.c	(original)
+++ trunk/osdep/getch2-os2.c	Fri Aug  1 22:28:58 2008
@@ -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 @@ void getch2_disable( void )
     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");

Modified: trunk/osdep/getch2-win.c
==============================================================================
--- trunk/osdep/getch2-win.c	(original)
+++ trunk/osdep/getch2-win.c	Fri Aug  1 22:28:58 2008
@@ -142,7 +142,7 @@ void getch2_disable(){
     getch2_status=0;
 }
 
-#ifdef CONFIG_ICONV
+#ifdef HAVE_ICONV
 static const struct {
     unsigned cp;
     char* alias;

Modified: trunk/osdep/getch2.c
==============================================================================
--- trunk/osdep/getch2.c	(original)
+++ trunk/osdep/getch2.c	Fri Aug  1 22:28:58 2008
@@ -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 @@ typedef struct {
 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 @@ void getch2_disable(void){
     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");

Modified: trunk/stream/asf_mmst_streaming.c
==============================================================================
--- trunk/stream/asf_mmst_streaming.c	(original)
+++ trunk/stream/asf_mmst_streaming.c	Fri Aug  1 22:28:58 2008
@@ -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 @@ static void send_command (int s, int com
   }
 }
 
-#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 @@ static void string_utf16(char *dest, cha
 	/* trailing zeroes */
 	dest[i*2] = 0;
 	dest[i*2+1] = 0;
-#ifdef CONFIG_ICONV
+#ifdef HAVE_ICONV
     }
 #endif
 }
@@ -575,8 +575,8 @@ int asf_mmst_streaming_start(stream_t *s
   * */
 
   /* 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 @@ 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 CONFIG_ICONV
+#ifdef HAVE_ICONV
   if (url_conv != (iconv_t)(-1))
     iconv_close(url_conv);
 #endif

Modified: trunk/stream/librtsp/rtsp_rtp.c
==============================================================================
--- trunk/stream/librtsp/rtsp_rtp.c	(original)
+++ trunk/stream/librtsp/rtsp_rtp.c	Fri Aug  1 22:28:58 2008
@@ -297,7 +297,7 @@ rtp_connect (char *hostname, int port)
     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 @@ is_multicast_address (char *addr)
   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);

Modified: trunk/stream/tcp.c
==============================================================================
--- trunk/stream/tcp.c	(original)
+++ trunk/stream/tcp.c	Fri Aug  1 22:28:58 2008
@@ -116,7 +116,7 @@ connect2Server_with_af(char *host, int p
 	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 @@ connect2Server_with_af(char *host, int p
 			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);

Modified: trunk/stream/udp.c
==============================================================================
--- trunk/stream/udp.c	(original)
+++ trunk/stream/udp.c	Fri Aug  1 22:28:58 2008
@@ -92,11 +92,11 @@ udp_open_socket (URL_t *url)
   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 */

Modified: trunk/subreader.c
==============================================================================
--- trunk/subreader.c	(original)
+++ trunk/subreader.c	Fri Aug  1 22:28:58 2008
@@ -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 @@ int sub_utf8_prev=0;
 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 @@ subtitle* subcp_recode (subtitle *sub)
 }
 #endif
 
-#ifdef CONFIG_FRIBIDI
+#ifdef HAVE_FRIBIDI
 #ifndef max
 #define max(a,b)  (((a)>(b))?(a):(b))
 #endif
@@ -1369,7 +1369,7 @@ sub_data* sub_read_file (char *filename,
     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_data* sub_read_file (char *filename,
     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 @@ sub_data* sub_read_file (char *filename,
 	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 @@ sub_data* sub_read_file (char *filename,
     
     free_stream(fd);
 
-#ifdef CONFIG_ICONV
+#ifdef HAVE_ICONV
     subcp_close();
 #endif
 
@@ -1876,7 +1876,7 @@ char** sub_filenames(const char* path, c
 
 		// 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 @@ char** sub_filenames(const char* path, c
 
 		    if (prio) {
 			prio += prio;
-#ifdef CONFIG_ICONV
+#ifdef HAVE_ICONV
 			if (i<3){ // prefer UTF-8 coded
 			    prio++;
 			}



More information about the MPlayer-cvslog mailing list