CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Jan Nieuwenhuizen <[EMAIL PROTECTED]> 05/06/09 11:52:08
Modified files:
scm : ps-to-png.scm lily.scm editor.scm
lily : lily-parser-scheme.cc
flower : file-name.cc
. : ChangeLog
Log message:
Bugfix: only append DIRSEP if BASE_
or EXT_ components non-empty.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/ps-to-png.scm.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/lily.scm.diff?tr1=1.355&tr2=1.356&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/editor.scm.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/lily-parser-scheme.cc.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/flower/file-name.cc.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3747&tr2=1.3748&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3747 lilypond/ChangeLog:1.3748
--- lilypond/ChangeLog:1.3747 Thu Jun 9 10:45:10 2005
+++ lilypond/ChangeLog Thu Jun 9 11:52:07 2005
@@ -1,3 +1,15 @@
+2005-06-09 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+
+ * flower/file-name.cc: Bugfix: only append DIRSEP if BASE_
+ or EXT_ components non-empty.
+
+2005-06-08 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+
+ * scm/lily.scm (running-from-gui?): Export.
+
+ * lily/lily-parser-scheme.cc (ly:parse-file): Use it to generate
+ output in .ly source directory.
+
2005-06-09 Han-Wen Nienhuys <[EMAIL PROTECTED]>
* ttftool/util.c (surely_lseek): more verbosity.
Index: lilypond/flower/file-name.cc
diff -u lilypond/flower/file-name.cc:1.11 lilypond/flower/file-name.cc:1.12
--- lilypond/flower/file-name.cc:1.11 Thu May 19 22:57:50 2005
+++ lilypond/flower/file-name.cc Thu Jun 9 11:52:07 2005
@@ -68,7 +68,11 @@
if (!root_.is_empty ())
s = root_ + ::to_string (ROOTSEP);
if (!dir_.is_empty ())
- s += dir_ + ::to_string (DIRSEP);
+ {
+ s += dir_;
+ if (!base_.is_empty () || !ext_.is_empty ())
+ s += ::to_string (DIRSEP);
+ }
s += base_;
if (!ext_.is_empty ())
s += ::to_string (EXTSEP) + ext_;
Index: lilypond/lily/lily-parser-scheme.cc
diff -u lilypond/lily/lily-parser-scheme.cc:1.13
lilypond/lily/lily-parser-scheme.cc:1.14
--- lilypond/lily/lily-parser-scheme.cc:1.13 Wed Jun 8 22:44:24 2005
+++ lilypond/lily/lily-parser-scheme.cc Thu Jun 9 11:52:07 2005
@@ -55,8 +55,19 @@
out_file_name.root_ = "";
out_file_name.dir_ = "";
+ /* When running from gui, generate output in .ly source directory. */
+ if (output_name_global.is_empty ()
+ && scm_call_0 (ly_lily_module_constant ("running-from-gui?")) ==
SCM_BOOL_T)
+ {
+ File_name f (file);
+ f.base_ = "";
+ f.ext_ = "";
+ output_name_global = f.to_string ();
+ }
+
if (!output_name_global.is_empty ())
{
+ /* Interpret --output=DIR to mean --output=DIR/BASE. */
if (is_dir (output_name_global))
{
char cwd[PATH_MAX];
Index: lilypond/scm/editor.scm
diff -u lilypond/scm/editor.scm:1.12 lilypond/scm/editor.scm:1.13
--- lilypond/scm/editor.scm:1.12 Wed Jun 8 13:10:21 2005
+++ lilypond/scm/editor.scm Thu Jun 9 11:52:06 2005
@@ -9,8 +9,8 @@
;; Also for standalone use, so cannot include any lily modules.
(use-modules
(ice-9 regex)
- (srfi srfi-13)
- (srfi srfi-14))
+ (srfi srfi-13)
+ (srfi srfi-14))
(define PLATFORM
(string->symbol
Index: lilypond/scm/lily.scm
diff -u lilypond/scm/lily.scm:1.355 lilypond/scm/lily.scm:1.356
--- lilypond/scm/lily.scm:1.355 Wed Jun 8 13:10:21 2005
+++ lilypond/scm/lily.scm Thu Jun 9 11:52:06 2005
@@ -336,7 +336,7 @@
(use-modules (scm editor))
-(define (running-from-gui?)
+(define-public (running-from-gui?)
(let ((have-tty? (isatty? (current-input-port))))
;; If no TTY and not using safe, assume running from GUI.
(cond
Index: lilypond/scm/ps-to-png.scm
diff -u lilypond/scm/ps-to-png.scm:1.4 lilypond/scm/ps-to-png.scm:1.5
--- lilypond/scm/ps-to-png.scm:1.4 Tue Jun 7 10:39:58 2005
+++ lilypond/scm/ps-to-png.scm Thu Jun 9 11:52:05 2005
@@ -10,13 +10,20 @@
(ice-9 optargs)
(ice-9 regex)
(ice-9 rw)
- (srfi srfi-1))
+ (srfi srfi-1)
+ (srfi srfi-13)
+ (srfi srfi-14))
;; gettext wrapper for guile < 1.7.2
(if (defined? 'gettext)
(define-public _ gettext)
(define-public (_ x) x))
+(define PLATFORM
+ (string->symbol
+ (string-downcase
+ (car (string-tokenize (vector-ref (uname) 0) char-set:letter)))))
+
(define (re-sub re sub string)
(regexp-substitute/global #f re string 'pre sub 'post))
@@ -105,6 +112,13 @@
(begin
(format (current-error-port) (_ "Invoking `~a'...") cmd)
(newline (current-error-port)))))
+ (baz
+ ;; The wrapper on windows cannot handle `=' signs,
+ ;; gs has a workaround with #.
+ (if (eq? PLATFORM 'windows)
+ (begin
+ (set! cmd (re-sub "=" "#" cmd))
+ (set! cmd (re-sub "-dSAFER " "" cmd)))))
(status (system cmd)))
(if (not (= status 0))
(begin
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs