diff options
author | Karl Berry <karl@freefriends.org> | 2008-05-31 16:21:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-05-31 16:21:47 +0000 |
commit | 2e270ec3196dbd55506f949083fc28607b99683b (patch) | |
tree | 317640f2afa0f62383787dde1512e0078ca45df2 /Build | |
parent | eacea0ed9c1286ed3b3b6f3ca06df932e64c569f (diff) |
reduce useless debugging output
git-svn-id: svn://tug.org/texlive/trunk@8432 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 3 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/elt-dirs.c | 44 |
2 files changed, 26 insertions, 21 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index e0bdd161b9a..33f0750316a 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,5 +1,8 @@ 2008-05-31 Karl Berry <karl@tug.org> + * elt-dirs.c (kpse_normalize_path): only output debug line if + value is not 1. Reformat. + * tex-file.c (INIT_FORMAT): construct human-formatted list of envvars that are considered for each format, as requested by Nelson Beebe and others over the years. diff --git a/Build/source/texk/kpathsea/elt-dirs.c b/Build/source/texk/kpathsea/elt-dirs.c index 0243b305ae8..820ccce87f2 100644 --- a/Build/source/texk/kpathsea/elt-dirs.c +++ b/Build/source/texk/kpathsea/elt-dirs.c @@ -345,8 +345,8 @@ expand_elt P3C(str_llist_type *, str_list_ptr, const_string, elt, /* The first bits of a path element can be problematic because they look like a request to expand a whole disk, rather than a subtree. - It can contain a drive specification. - - It can be a UNC path (win32, but they are part of the single - UNIX specification as well). + - It can be a UNC path (w32, but they are part of the single + Unix specification as well). The argument is a string as the function can diddle into the argument to canonicalize it, which tends to matter on windows platforms. - Always lower-case drive letters a-z, even those filesystem that @@ -357,8 +357,8 @@ expand_elt P3C(str_llist_type *, str_list_ptr, const_string, elt, The resulting name will always be shorter than the one passed, so no problem. - If possible, we merely skip multiple leading slashes to prevent - expanding from the root of a UNIX filesystem tree. -*/ + expanding from the root of a UNIX filesystem tree. */ + unsigned kpse_normalize_path P1C(string, elt) { @@ -366,27 +366,29 @@ kpse_normalize_path P1C(string, elt) unsigned i; if (NAME_BEGINS_WITH_DEVICE(elt)) { - if (*elt >= 'A' && *elt <= 'Z') - *elt += 'a' - 'A'; - for (i = 2; IS_DIR_SEP(elt[i]); ++i) - ; - if (i > 3) - memmove(elt+3, elt+i, strlen(elt+i) + 1); - ret = 2; + if (*elt >= 'A' && *elt <= 'Z') + *elt += 'a' - 'A'; + for (i = 2; IS_DIR_SEP(elt[i]); ++i) + ; + if (i > 3) + memmove (elt+3, elt+i, strlen(elt+i) + 1); + ret = 2; + } else if (IS_UNC_NAME(elt)) { - for (ret = 2; elt[ret] && !IS_DIR_SEP(elt[ret]); ++ret) - ; - for (i = ret; elt[i] && IS_DIR_SEP(elt[i]); ++i) - ; - if (i > ret+1) - memmove(elt+ret+1, elt+i, strlen(elt+i) + 1); + for (ret = 2; elt[ret] && !IS_DIR_SEP(elt[ret]); ++ret) + ; + for (i = ret; elt[i] && IS_DIR_SEP(elt[i]); ++i) + ; + if (i > ret+1) + memmove (elt+ret+1, elt+i, strlen(elt+i) + 1); + } else { - for (ret = 0; IS_DIR_SEP(elt[ret]); ++ret) - ; + for (ret = 0; IS_DIR_SEP(elt[ret]); ++ret) + ; } - if (KPSE_DEBUG_P (KPSE_DEBUG_STAT)) - DEBUGF2 ("kpse_normalize_path (%s) => %u\n", elt, ret); + if (KPSE_DEBUG_P (KPSE_DEBUG_STAT) && ret != 1) + DEBUGF2 ("kpse_normalize_path (%s) => %u\n", elt, ret); return ret; } |