[MPlayer-cvslog] r19392 - trunk/libvo/font_load.c
reimar
subversion at mplayerhq.hu
Mon Aug 14 16:13:53 CEST 2006
Author: reimar
Date: Mon Aug 14 16:13:53 2006
New Revision: 19392
Modified:
trunk/libvo/font_load.c
Log:
Make path separator for font path a define and set it to a better value for AMIGAOS
Modified: trunk/libvo/font_load.c
==============================================================================
--- trunk/libvo/font_load.c (original)
+++ trunk/libvo/font_load.c Mon Aug 14 16:13:53 2006
@@ -160,19 +160,26 @@
}
} else
+#ifdef SYS_AMIGAOS4
+#define FONT_PATH_SEP ""
+#else
+//! path seperator for font paths, may not be more than one character
+#define FONT_PATH_SEP "/"
+#endif
+
if(strcmp(section,"[files]")==0){
- char *default_dir=MPLAYER_DATADIR "/font";
+ char *default_dir=MPLAYER_DATADIR FONT_PATH_SEP "font";
if(pdb==2 && strcmp(p[0],"alpha")==0){
char *cp;
if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) goto fail_out;
- snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s",
+ snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s" FONT_PATH_SEP "%s",
desc->fpath,p[1]);
if(!((desc->pic_a[fontdb]=load_raw(cp,verbose)))){
free(cp);
if (!(cp=malloc(strlen(default_dir)+strlen(p[1])+2)))
goto fail_out;
- snprintf(cp,strlen(default_dir)+strlen(p[1])+2,"%s/%s",
+ snprintf(cp,strlen(default_dir)+strlen(p[1])+2,"%s" FONT_PATH_SEP "%s",
default_dir,p[1]);
if (!((desc->pic_a[fontdb]=load_raw(cp,verbose)))){
mp_msg(MSGT_OSD, MSGL_ERR, "Can't load font bitmap: %s\n",p[1]);
@@ -187,13 +194,13 @@
char *cp;
if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) goto fail_out;
- snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s",
+ snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s" FONT_PATH_SEP "%s",
desc->fpath,p[1]);
if(!((desc->pic_b[fontdb]=load_raw(cp,verbose)))){
free(cp);
if (!(cp=malloc(strlen(default_dir)+strlen(p[1])+2)))
goto fail_out;
- snprintf(cp,strlen(default_dir)+strlen(p[1])+2,"%s/%s",
+ snprintf(cp,strlen(default_dir)+strlen(p[1])+2,"%s" FONT_PATH_SEP "%s",
default_dir,p[1]);
if (!((desc->pic_b[fontdb]=load_raw(cp,verbose)))){
mp_msg(MSGT_OSD, MSGL_ERR, "Can't load font bitmap: %s\n",p[1]);
More information about the MPlayer-cvslog
mailing list