Mercurial > mplayer.hg
comparison get_path.c @ 27397:d47744b95b78
Give a CONFIG_ prefix to preprocessor directives that lacked one and
change arbitrary prefixes to CONFIG_.
author | diego |
---|---|
date | Thu, 07 Aug 2008 12:20:50 +0000 |
parents | e7c989f7a7c9 |
children | a593f936d330 |
comparison
equal
deleted
inserted
replaced
27396:51438cb89305 | 27397:d47744b95b78 |
---|---|
11 #include <stdlib.h> | 11 #include <stdlib.h> |
12 #include <string.h> | 12 #include <string.h> |
13 #include "mp_msg.h" | 13 #include "mp_msg.h" |
14 #include "get_path.h" | 14 #include "get_path.h" |
15 | 15 |
16 #ifdef MACOSX_BUNDLE | 16 #ifdef CONFIG_MACOSX_BUNDLE |
17 #include <CoreFoundation/CoreFoundation.h> | 17 #include <CoreFoundation/CoreFoundation.h> |
18 #include <sys/types.h> | 18 #include <sys/types.h> |
19 #include <sys/stat.h> | 19 #include <sys/stat.h> |
20 #include <unistd.h> | 20 #include <unistd.h> |
21 #endif | 21 #endif |
36 static char *config_dir = "/mplayer"; | 36 static char *config_dir = "/mplayer"; |
37 #else | 37 #else |
38 static char *config_dir = "/.mplayer"; | 38 static char *config_dir = "/.mplayer"; |
39 #endif | 39 #endif |
40 int len; | 40 int len; |
41 #ifdef MACOSX_BUNDLE | 41 #ifdef CONFIG_MACOSX_BUNDLE |
42 struct stat dummy; | 42 struct stat dummy; |
43 CFIndex maxlen=256; | 43 CFIndex maxlen=256; |
44 CFURLRef res_url_ref=NULL; | 44 CFURLRef res_url_ref=NULL; |
45 CFURLRef bdl_url_ref=NULL; | 45 CFURLRef bdl_url_ref=NULL; |
46 char *res_url_path = NULL; | 46 char *res_url_path = NULL; |
94 if ((buff = malloc(len)) == NULL) | 94 if ((buff = malloc(len)) == NULL) |
95 return NULL; | 95 return NULL; |
96 sprintf(buff, "%s%s/%s", homedir, config_dir, filename); | 96 sprintf(buff, "%s%s/%s", homedir, config_dir, filename); |
97 } | 97 } |
98 | 98 |
99 #ifdef MACOSX_BUNDLE | 99 #ifdef CONFIG_MACOSX_BUNDLE |
100 if (stat(buff, &dummy)) { | 100 if (stat(buff, &dummy)) { |
101 | 101 |
102 res_url_ref=CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle()); | 102 res_url_ref=CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle()); |
103 bdl_url_ref=CFBundleCopyBundleURL(CFBundleGetMainBundle()); | 103 bdl_url_ref=CFBundleCopyBundleURL(CFBundleGetMainBundle()); |
104 | 104 |