]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/relocate.cc
Run `make grand-replace'.
[lilypond.git] / lily / relocate.cc
index 2ff9fc44d37e7721780bf791d07d4398ac588f1e..fd6cf85c458f2fbac7dd76ae8c3bae1f8c8b3714 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 */
 
@@ -230,12 +230,8 @@ setup_paths (char const *argv0_ptr)
 
   if (char const *env = getenv ("LILYPOND_DATADIR"))
     {
-#ifdef __MINGW32__
       /* Normalize file name.  */
       lilypond_datadir = File_name (env).to_string ();
-#else
-      lilypond_datadir = env;
-#endif
     }
 
   /* When running from build dir, a full LILYPOND_DATADIR is set-up at
@@ -245,6 +241,9 @@ setup_paths (char const *argv0_ptr)
   if (!is_dir (lilypond_datadir.c_str ())
       && is_dir (build_datadir_current.c_str ()))
     lilypond_datadir = build_datadir_current;
+
+
+  lilypond_datadir = File_name (lilypond_datadir).canonicalized().to_string();
   
   global_path.append ("");
 
@@ -337,7 +336,7 @@ expand_environment_variables (string orig)
   return out;
 }
 
-
+// Ugh - very inefficient, but safer than fgets.
 static string
 read_line (FILE *f)
 {
@@ -345,7 +344,7 @@ read_line (FILE *f)
   
   int c = 0;
   while ((c = fgetc (f)) != EOF && c != '\n')
-    out += c;
+    out += char(c);
 
   return out;
 }