CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Jan Nieuwenhuizen <[EMAIL PROTECTED]>   05/06/08 13:45:29

Modified files:
        lily           : lily-parser-scheme.cc 
        flower         : file-path.cc 
        .              : ChangeLog 

Log message:
        

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/lily-parser-scheme.cc.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/flower/file-path.cc.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3741&tr2=1.3742&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3741 lilypond/ChangeLog:1.3742
--- lilypond/ChangeLog:1.3741   Wed Jun  8 13:10:21 2005
+++ lilypond/ChangeLog  Wed Jun  8 13:45:29 2005
@@ -15,6 +15,12 @@
 
 2005-06-08  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
 
+       * flower/file-path.cc (find): Bugfix.  Append rather than prepend
+       directory part of file name to search directory.
+
+       * lily/lily-parser-scheme.cc (ly:parse-file): Prepend cwd to
+       search path and chdir to DIR if --outname=DIR used.
+
        * lily/main.cc (prepend_env_path): Bugfix: Check directory
        existence before appending original path.
 
Index: lilypond/flower/file-path.cc
diff -u lilypond/flower/file-path.cc:1.37 lilypond/flower/file-path.cc:1.38
--- lilypond/flower/file-path.cc:1.37   Tue Jun  7 07:45:32 2005
+++ lilypond/flower/file-path.cc        Wed Jun  8 13:45:29 2005
@@ -130,8 +130,8 @@
       if (file_name.dir_.is_empty ())
        file_name.dir_ = dir.to_string ();
       else if (!dir.to_string ().is_empty())
-       file_name.dir_ += ::to_string (DIRSEP) + dir.to_string ();
-       
+       file_name.dir_ = dir.to_string ()
+         + ::to_string (DIRSEP) + file_name.dir_;
       if (is_file (file_name.to_string ()))
        return file_name.to_string ();
     }
Index: lilypond/lily/lily-parser-scheme.cc
diff -u lilypond/lily/lily-parser-scheme.cc:1.11 
lilypond/lily/lily-parser-scheme.cc:1.12
--- lilypond/lily/lily-parser-scheme.cc:1.11    Tue May 31 18:50:04 2005
+++ lilypond/lily/lily-parser-scheme.cc Wed Jun  8 13:45:29 2005
@@ -54,7 +54,25 @@
   out_file_name.dir_ = "";
 
   if (!output_name_global.is_empty ())
-    out_file_name = File_name (output_name_global);
+    {
+      if (is_dir (output_name_global))
+       {
+         char cwd[PATH_MAX];
+         getcwd (cwd, PATH_MAX);
+
+         if (output_name_global != cwd)
+           {
+             global_path.prepend (cwd);
+             message (_f ("Changing working directory to `%s'",
+                          output_name_global.to_str0 ()));
+             chdir (output_name_global.to_str0 ());
+             
+           }
+         output_name_global = "";
+       }
+      else      
+       out_file_name = File_name (output_name_global);
+    }
 
   String init;
   if (!init_name_global.is_empty ())


_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to