changeset 21872:adb0b3ac4b50

more kpse.cc cleanups * kpse.cc (kpkpse_expand_kpse_dot, kpse_path_expand): Delete special treatment of leading !! in path elements since we no longer use the ls-R cache.
author John W. Eaton <jwe@octave.org>
date Sat, 11 Jun 2016 19:06:54 -0400
parents cab605836305
children 40195d04b17c
files liboctave/util/kpse.cc
diffstat 1 files changed, 6 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/util/kpse.cc	Sat Jun 11 18:56:14 2016 -0400
+++ b/liboctave/util/kpse.cc	Sat Jun 11 19:06:54 2016 -0400
@@ -541,8 +541,8 @@
             elt = elt.substr (1);
         }
 
-      /* Try ls-R, unless we're searching for texmf.cnf.  Our caller
-         (search), also tests first_search, and does the resetting.  */
+      /* Our caller (search), also tests first_search, and does
+         the resetting.  */
       if (first_search)
         found = std::list<std::string> ();
 
@@ -709,9 +709,8 @@
             {
               std::string name = *it;
 
-              /* Try ls-R, unless we're searching for texmf.cnf.  Our caller
-                 (find_first_of), also tests first_search, and does the
-                 resetting.  */
+              /* Our caller (find_first_of), also tests first_search,
+                 and does the resetting.  */
               if (first_search)
                 found = std::list<std::string> ();
 
@@ -976,13 +975,11 @@
     {
       std::string elt = *pi;
 
-      /* We assume that the !! magic is only used on absolute components.
-         Single "." get special treatment, as does "./" or its equivalent.  */
+      /* Single "." get special treatment, as does "./" or its equivalent.  */
 
       size_t elt_len = elt.length ();
 
-      if (kpse_absolute_p (elt, false)
-          || (elt_len > 1 && elt[0] == '!' && elt[1] == '!'))
+      if (kpse_absolute_p (elt, false))
         ret += elt + ENV_SEP_STRING;
       else if (elt_len == 1 && elt[0] == '.')
         ret += kpse_dot + ENV_SEP_STRING;
@@ -1094,10 +1091,6 @@
 
       std::list<std::string> dirs;
 
-      /* Skip and ignore magic leading chars.  */
-      if (elt.length () > 1 && elt[0] == '!' && elt[1] == '!')
-        elt = elt.substr (2);
-
       /* Do not touch the device if present */
       if (NAME_BEGINS_WITH_DEVICE (elt))
         {