]> git.donarmstrong.com Git - lilypond.git/commitdiff
(make-ps-images): Bugfix: `Pages: 1\n' is not
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 7 Jun 2005 07:45:32 +0000 (07:45 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 7 Jun 2005 07:45:32 +0000 (07:45 +0000)
multi-page.  Fix .eps regular expression.

ChangeLog
flower/file-path.cc
lily/main.cc
scm/framework-ps.scm
scm/ps-to-png.scm

index f1ee7606d86c75a3873e893380b15f6521a8e528..4dd738ef475be060ed6024a28e3848bbfe8a934b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-07  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * scm/ps-to-png.scm (make-ps-images): Bugfix: `Pages: 1\n' is not
+       multi-page.  Fix .eps regular expression.
+
 2005-06-07  Graham Percival  <gperlist@shaw.ca>
 
        * Documentation/user/putting.itely: add info on modifying templates.
 
 2005-06-07  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * lily/main.cc (prepend_env_path): Do not append /, that does not
+       work.  Localedir lives in datadir, not in prefix.
+
+       * scm/framework-ps.scm (write-preamble): Remove load-font-via-GS
+       hack for windows.
+
        * flower/include/file-cookie.hh: Compile fix.
 
 2005-06-06  Han-Wen Nienhuys  <hanwen@xs4all.nl>
index 727ea046caa07bb32a09f7bb0a7c0eb4a4fcdccd..1df873325fb7f6db6613ce1b70e8320376ef34bb 100644 (file)
@@ -68,13 +68,11 @@ is_file (String file_name)
   return !S_ISDIR (sbuf.st_mode);
 #endif
 
-
   if (FILE *f = fopen (file_name.to_str0 (), "r"))
     {
       fclose (f);
       return true;
     }
-
   
   return false;
 }
index f8b0343eeffb7923f279884242af564eb369bc58..80edfc07ed312fdedafd6c40501fd7b2f981e807 100644 (file)
@@ -284,7 +284,7 @@ prepend_env_path (char const *key, String value)
 {
   if (char const* cur = getenv (key))
     value += to_string (PATHSEP) + cur;
-  if (is_dir (value + "/"))
+  if (is_dir (value))
     return sane_putenv (key, value.to_str0 ());
   else if (be_verbose_global)
     warning (_f ("no such directory: %s", value));
@@ -324,7 +324,7 @@ setup_paths (char const* argv0)
                     prefix_directory));
       String datadir = argv0_prefix + "/share";
       String libdir = argv0_prefix + "/lib";
-      String localedir = argv0_prefix + "/locale";
+      String localedir = datadir + "/locale";
       String sysconfdir = argv0_prefix + "/etc";
       String argv0_lilypond_datadir = datadir + "/lilypond/" TOPLEVEL_VERSION;
 
index 7a6584ba0bbd9ffd14e6639490161a480fc533df..358eecfa6a023b0295c616dd69c75c510e66e9d8 100644 (file)
                   (lambda (x y) (string<? (cadr x) (cadr y))))))
           ;; ttftool/fopencookie is broken on Windows,
           ;; possibly a stack corruption bug.
-          (pfas (map (if
-                      (eq? PLATFORM 'windows) load-font-via-GS load-font)
-                     font-names)))
+          (pfas (map load-font font-names)))
       pfas))
 
   (if load-fonts?
index eab59e54043b1244bac00bb79a355a118e9bb335..8efbeea37a55f1c3301bfcc9f6adc1fe3ae8e17b 100644 (file)
 (define (re-sub re sub string)
   (regexp-substitute/global #f re string 'pre sub 'post))
 
-(define (gulp-port port how-much)
-  (let*
-      ((str (make-string how-much)))
-
+(define (gulp-port port max-length)
+  (let ((str (make-string max-length)))
     (read-string!/partial str port)
     str))
 
         (paper-size "a4")
         (rename-page-1? #f)
         (verbose? #f))
-   (let* ((base (basename (re-sub "\.e?ps" "" ps-name)))
+   (let* ((base (basename (re-sub "[.]e?ps" "" ps-name)))
          (header (gulp-port (open-file ps-name "r") 10240))
          (png1 (string-append base ".png"))
          (pngn (string-append base "-page%d.png"))
          (pngn-re (re-sub "%d" "[0-9]*" pngn))
-         (multi-page? (string-match "\n%%Pages: " header))
+         (multi-page? (and (string-match "\n%%Pages: " header)
+                           (not (string-match "\n%%Pages: 1\n" header))))
          (output-file (if multi-page? pngn png1))
          ;;png16m is because Lily produces color nowadays.
          (cmd (format #f (if multi-page?