]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.C
Add a bunch of c_str() for string stream uses; remove lyxfunc symbol-insert.
[lyx.git] / src / support / filetools.C
index fdd8bef9e82ca60cee7131ea5f2578fb22a751ad..c9605aa7f8f87dd153982a1565b8ca1601130828 100644 (file)
@@ -58,6 +58,13 @@ using std::pair;
 using std::endl;
 using std::ifstream;
 
+#if 0
+using std::getenv;
+using std::isalpha;
+using std::isalnum;
+using std::popen;
+#endif
+
 extern string system_lyxdir;
 extern string build_lyxdir;
 extern string user_lyxdir;
@@ -290,7 +297,7 @@ i18nLibFileSearch(string const & dir, string const & name,
 string const GetEnv(string const & envname)
 {
         // f.ex. what about error checking?
-        char const * const ch = ::getenv(envname.c_str());
+        char const * const ch = getenv(envname.c_str());
         string const envstr = !ch ? "" : ch;
         return envstr;
 }
@@ -539,7 +546,7 @@ string const MakeAbsPath(string const & RelPath, string const & BasePath)
        // checks for already absolute path
        if (AbsolutePath(RelPath))
 #ifdef __EMX__
-               if(RelPath[0]!= '/' && RelPath[0]!= '\\')
+               if (RelPath[0]!= '/' && RelPath[0]!= '\\')
 #endif
                return RelPath;
 
@@ -857,7 +864,7 @@ string const MakeRelPath(string const & abspath0, string const & basepath0)
        string::size_type const baselen = basepath.length();
        
        // Find first different character
-       int i = 0;
+       string::size_type i = 0;
        while (i < abslen && i < baselen && abspath[i] == basepath[i]) ++i;
 
        // Go back to last /
@@ -877,7 +884,7 @@ string const MakeRelPath(string const & abspath0, string const & basepath0)
        // Count how many dirs there are in basepath above match
        // and append as many '..''s into relpath
        string buf;
-       int j = i;
+       string::size_type j = i;
        while (j < baselen) {
                if (basepath[j] == '/') {
                        if (j + 1 == baselen) break;