changeset 10272:7b0bc557987b

renames: DATADIR->MPLAYER_DATADIR, CONFDIR->MPLAYER_CONFDIR, LIBDIR->MPLAYER_LIBDIR
author arpi
date Mon, 09 Jun 2003 12:15:48 +0000
parents f0e14d641160
children 02c2c05b7da6
files Gui/interface.c configure input/input.c libmpcodecs/dec_audio.c libmpcodecs/dec_video.c libmpdemux/cache2.c libmpdvdkit2/ioctl.c libvo/font_load.c libvo/font_load_ft.c libvo/vosub_vidix.c mencoder.c mplayer.c osdep/glob-win.c
diffstat 13 files changed, 22 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/interface.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/Gui/interface.c	Mon Jun 09 12:15:48 2003 +0000
@@ -188,7 +188,7 @@
  wsXInit( (void *)mDisplay );
 // --- load skin
  skinDirInHome=get_path("Skin");
- skinMPlayerDir=DATADIR "/Skin";
+ skinMPlayerDir=MPLAYER_DATADIR "/Skin";
  printf("SKIN dir 1: '%s'\n",skinDirInHome);
  printf("SKIN dir 2: '%s'\n",skinMPlayerDir);
  if ( !skinName ) skinName=strdup( "default" );
@@ -405,7 +405,7 @@
     vo_font=read_font_desc( font_name,font_factor,0 );
     if ( !vo_font )
      {
-      gfree( (void **)&font_name ); font_name=gstrdup( DATADIR"/font/font.desc" );
+      gfree( (void **)&font_name ); font_name=gstrdup(MPLAYER_DATADIR "/font/font.desc" );
       vo_font=read_font_desc( font_name,font_factor,0 );
      }
    }
--- a/configure	Mon Jun 09 12:12:04 2003 +0000
+++ b/configure	Mon Jun 09 12:15:48 2003 +0000
@@ -5432,9 +5432,9 @@
 $_def_stddef
 
 /* Common data directory (for fonts, etc) */
-#define DATADIR "$_datadir"
-#define CONFDIR "$_confdir"
-#define LIBDIR "$_libdir"
+#define MPLAYER_DATADIR "$_datadir"
+#define MPLAYER_CONFDIR "$_confdir"
+#define MPLAYER_LIBDIR "$_libdir"
 
 /* Define this to compile stream-caching support, it can be enabled via
    -cache <kilobytes> */
--- a/input/input.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/input/input.c	Mon Jun 09 12:15:48 2003 +0000
@@ -1464,7 +1464,7 @@
   
   if(! mp_input_parse_config(file)) {
     // Try global conf dir
-    file = CONFDIR"/input.conf";
+    file = MPLAYER_CONFDIR "/input.conf";
     if(! mp_input_parse_config(file))
       mp_msg(MSGT_INPUT,MSGL_WARN,"Falling back on default (hardcoded) input config\n");
   }
--- a/libmpcodecs/dec_audio.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/libmpcodecs/dec_audio.c	Mon Jun 09 12:15:48 2003 +0000
@@ -160,11 +160,11 @@
 	    ad_functions_t *funcs_sym;
 	    ad_info_t *info_sym;
 	    
-	    buf_len = strlen(LIBDIR)+strlen(sh_audio->codec->drv)+16;
+	    buf_len = strlen(MPLAYER_LIBDIR)+strlen(sh_audio->codec->drv)+16;
 	    buf = malloc(buf_len);
 	    if (!buf)
 		break;
-	    snprintf(buf, buf_len, "%s/mplayer/ad_%s.so", LIBDIR, sh_audio->codec->drv);
+	    snprintf(buf, buf_len, "%s/mplayer/ad_%s.so", MPLAYER_LIBDIR, sh_audio->codec->drv);
 	    mp_msg(MSGT_DECAUDIO, MSGL_DBG2, "Trying to open external plugin: %s\n", buf);
 	    sh_audio->dec_handle = dlopen(buf, RTLD_LAZY);
 	    if (!sh_audio->dec_handle)
@@ -181,7 +181,7 @@
 	    free(buf);
 	    mpadec = funcs_sym;
 	    mp_msg(MSGT_DECAUDIO, MSGL_V, "Using external decoder plugin (%s/mplayer/ad_%s.so)!\n",
-		LIBDIR, sh_audio->codec->drv);
+		MPLAYER_LIBDIR, sh_audio->codec->drv);
 	}
 #endif
 	if(!mpadec){ // driver not available (==compiled in)
--- a/libmpcodecs/dec_video.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/libmpcodecs/dec_video.c	Mon Jun 09 12:15:48 2003 +0000
@@ -187,11 +187,11 @@
 	    vd_functions_t *funcs_sym;
 	    vd_info_t *info_sym;
 
-	    buf_len = strlen(LIBDIR)+strlen(sh_video->codec->drv)+16;
+	    buf_len = strlen(MPLAYER_LIBDIR)+strlen(sh_video->codec->drv)+16;
 	    buf = malloc(buf_len);
 	    if (!buf)
 		break;
-	    snprintf(buf, buf_len, "%s/mplayer/vd_%s.so", LIBDIR, sh_video->codec->drv);
+	    snprintf(buf, buf_len, "%s/mplayer/vd_%s.so", MPLAYER_LIBDIR, sh_video->codec->drv);
 	    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Trying to open external plugin: %s\n", buf);
 	    sh_video->dec_handle = dlopen(buf, RTLD_LAZY);
 	    if (!sh_video->dec_handle)
@@ -207,7 +207,7 @@
 	    free(buf);
 	    mpvdec = funcs_sym;
 	    mp_msg(MSGT_DECVIDEO, MSGL_V, "Using external decoder plugin (%s/mplayer/vd_%s.so)!\n",
-		LIBDIR, sh_video->codec->drv);
+		MPLAYER_LIBDIR, sh_video->codec->drv);
 	}
 #endif
 	if(!mpvdec){ // driver not available (==compiled in)
--- a/libmpdemux/cache2.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/libmpdemux/cache2.c	Mon Jun 09 12:15:48 2003 +0000
@@ -22,7 +22,6 @@
 #include <sys/wait.h>
 #include "../osdep/shmem.h"
 #else
-#undef DATADIR
 #include <windows.h>
 static DWORD WINAPI ThreadProc(void* s);
 #endif
--- a/libmpdvdkit2/ioctl.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/libmpdvdkit2/ioctl.c	Mon Jun 09 12:15:48 2003 +0000
@@ -39,7 +39,6 @@
 #include <sys/types.h>
 
 #if defined( WIN32 )
-#   undef DATADIR /* clashes with /usr/include/w32api/objidl.h */
 #   include <windows.h>
 #   include <winioctl.h>
 #elif defined ( SYS_OS2 )
--- a/libvo/font_load.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/libvo/font_load.c	Mon Jun 09 12:15:48 2003 +0000
@@ -157,7 +157,7 @@
   } else    
 
   if(strcmp(section,"[files]")==0){
-      char *default_dir=DATADIR"/font";
+      char *default_dir=MPLAYER_DATADIR "/font";
       if(pdb==2 && strcmp(p[0],"alpha")==0){
     	  char *cp;
 	  if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) return NULL;
--- a/libvo/font_load_ft.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/libvo/font_load_ft.c	Mon Jun 09 12:15:48 2003 +0000
@@ -905,7 +905,7 @@
     if (err) {
 	err = FT_New_Face(library, get_path("subfont.ttf"), 0, face);
 	if (err) {
-	    err = FT_New_Face(library, DATADIR"/subfont.ttf", 0, face);
+	    err = FT_New_Face(library, MPLAYER_DATADIR "/subfont.ttf", 0, face);
 	    if (err) {
 	        mp_msg(MSGT_OSD, MSGL_ERR, "New_Face failed. Maybe the font path is wrong.\nPlease supply the text font file (~/.mplayer/subfont.ttf).\n" );
 		return -1;
--- a/libvo/vosub_vidix.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/libvo/vosub_vidix.c	Mon Jun 09 12:15:48 2003 +0000
@@ -709,7 +709,7 @@
 	  printf("vosub_vidix: You have wrong version of VIDIX library\n");
 	  return -1;
 	}
-	vidix_handler = vdlOpen(LIBDIR"/mplayer/vidix/",
+	vidix_handler = vdlOpen(MPLAYER_LIBDIR "/mplayer/vidix/",
 				drvname ? drvname[0] == ':' ? &drvname[1] : drvname[0] ? drvname : NULL : NULL,
 				TYPE_OUTPUT,
 				verbose);
--- a/mencoder.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/mencoder.c	Mon Jun 09 12:15:48 2003 +0000
@@ -377,7 +377,7 @@
 
 // check codec.conf
 if(!parse_codec_cfg(get_path("codecs.conf"))){
-  if(!parse_codec_cfg(CONFDIR"/codecs.conf")){
+  if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){
     if(!parse_codec_cfg(NULL)){
       mp_msg(MSGT_MENCODER,MSGL_HINT,MSGTR_CopyCodecsConf);
       exit(0);
@@ -443,7 +443,7 @@
       // try default:
        vo_font=read_font_desc(get_path("font/font.desc"),font_factor,verbose>1);
        if(!vo_font)
-       vo_font=read_font_desc(DATADIR"/font/font.desc",font_factor,verbose>1);
+       vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1);
   }
 #endif
 #endif
--- a/mplayer.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/mplayer.c	Mon Jun 09 12:15:48 2003 +0000
@@ -525,7 +525,7 @@
 {
 char *conffile;
 int conffile_fd;
-if (m_config_parse_config_file(conf, CONFDIR"/mplayer.conf") < 0)
+if (m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0)
   exit(1);
 if ((conffile = get_path("")) == NULL) {
   mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoHomeDir);
@@ -866,7 +866,7 @@
 
 // check codec.conf
 if(!parse_codec_cfg(get_path("codecs.conf"))){
-  if(!parse_codec_cfg(CONFDIR"/codecs.conf")){
+  if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){
     if(!parse_codec_cfg(NULL)){
       mp_msg(MSGT_CPLAYER,MSGL_HINT,MSGTR_CopyCodecsConf);
       exit(0);
@@ -1038,7 +1038,7 @@
       // try default:
        vo_font=read_font_desc(get_path("font/font.desc"),font_factor,verbose>1);
        if(!vo_font)
-       vo_font=read_font_desc(DATADIR"/font/font.desc",font_factor,verbose>1);
+       vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1);
   }
 #ifdef HAVE_FREETYPE
   if (!vo_font)
@@ -1117,8 +1117,8 @@
      if(menu_init(menu_cfg))
        mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", menu_cfg);
      else {
-       if(menu_init(CONFDIR"/menu.conf"))
-         mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", CONFDIR"/menu.conf");
+       if(menu_init(MPLAYER_CONFDIR "/menu.conf"))
+         mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", MPLAYER_CONFDIR"/menu.conf");
        else {
          mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu init failed\n");
          use_menu = 0;
--- a/osdep/glob-win.c	Mon Jun 09 12:12:04 2003 +0000
+++ b/osdep/glob-win.c	Mon Jun 09 12:15:48 2003 +0000
@@ -5,7 +5,6 @@
 
 #ifndef HAVE_GLOB
 #ifdef __MINGW32__
-#undef DATADIR
 #include <windows.h>
 #include "glob.h"