Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-02-06 15:24:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-06 15:24:13 +0400
commit2ea0826e7f8d1677e696df9097cb2322025a3b9a (patch)
tree94974bc2c89c179af7618b88f798fd4a964b50ce /source/blender/blenlib/intern/path_util.c
parent23bf087338204b45e5b72c1269bd013a88cf3f9d (diff)
add more path debug prints when PATH_DEBUG is defined.
Diffstat (limited to 'source/blender/blenlib/intern/path_util.c')
-rw-r--r--source/blender/blenlib/intern/path_util.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 06b1f1f09b1..5265d862ab8 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -848,7 +848,7 @@ const char *BLI_getDefaultDocumentFolder(void)
/* ************************************************************* */
/* ************************************************************* */
-// #define PATH_DEBUG2
+// #define PATH_DEBUG
static char *blender_version_decimal(const int ver)
{
@@ -871,14 +871,14 @@ static int test_path(char *targetpath, const char *path_base, const char *path_s
BLI_strncpy(targetpath, tmppath, sizeof(tmppath));
if (BLI_is_dir(targetpath)) {
-#ifdef PATH_DEBUG2
- printf("\tpath found: %s\n", targetpath);
+#ifdef PATH_DEBUG
+ printf("\t%s found: %s\n", __func__, targetpath);
#endif
return 1;
}
else {
-#ifdef PATH_DEBUG2
- printf("\tpath missing: %s\n", targetpath);
+#ifdef PATH_DEBUG
+ printf("\t%s missing: %s\n", __func__, targetpath);
#endif
//targetpath[0] = '\0';
return 0;
@@ -892,10 +892,16 @@ static int test_env_path(char *path, const char *envvar)
if (BLI_is_dir(env)) {
BLI_strncpy(path, env, FILE_MAX);
+#ifdef PATH_DEBUG
+ printf("\t%s env %s found: %s\n", __func__, envvar, env);
+#endif
return 1;
}
else {
path[0] = '\0';
+#ifdef PATH_DEBUG
+ printf("\t%s env %s missing: %s\n", __func__, envvar, env);
+#endif
return 0;
}
}
@@ -904,8 +910,8 @@ static int get_path_local(char *targetpath, const char *folder_name, const char
{
char relfolder[FILE_MAX];
-#ifdef PATH_DEBUG2
- printf("get_path_local...\n");
+#ifdef PATH_DEBUG
+ printf("%s...\n", __func__);
#endif
if (folder_name) {
@@ -964,8 +970,8 @@ static int get_path_user(char *targetpath, const char *folder_name, const char *
if (!user_path[0])
return 0;
-#ifdef PATH_DEBUG2
- printf("get_path_user: %s\n", user_path);
+#ifdef PATH_DEBUG
+ printf("%s: %s\n", __func__, user_path);
#endif
if (subfolder_name) {
@@ -1034,8 +1040,8 @@ static int get_path_system(char *targetpath, const char *folder_name, const char
if (!system_path[0])
return 0;
-#ifdef PATH_DEBUG2
- printf("get_path_system: %s\n", system_path);
+#ifdef PATH_DEBUG
+ printf("%s: %s\n", __func__, system_path);
#endif
if (subfolder_name) {
@@ -1174,7 +1180,7 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check)
#ifdef PATH_DEBUG
-#undef PATH_DEBUG
+# undef PATH_DEBUG
#endif
void BLI_setenv(const char *env, const char *val)