]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scripts/ly2dvi.py (include_path): print warning if failing anything.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 27 Nov 2002 00:02:50 +0000 (00:02 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 27 Nov 2002 00:02:50 +0000 (00:02 +0000)
* python/lilylib.py (error): add space

ChangeLog
GNUmakefile.in
lily/grob-scheme.cc
lily/paper-outputter.cc
lily/scm-option.cc
ly/generate-documentation.ly
python/lilylib.py
scm/music-functions.scm
scripts/ly2dvi.py

index e735d83733e7a48d2c17d642e92c32c1853918b2..38b675de5ec0e052acd088b435568ee11743183c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2002-11-27  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * scripts/ly2dvi.py (include_path): print warning if failing anything.
+
+       * python/lilylib.py (error): add space
+
+2002-11-25  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * GNUmakefile.in (EXTRA_DIST_FILES): add lilypond.words for
+       distribution.
+
+2002-11-24  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/paper-outputter.cc (Paper_outputter): close port when
+       finishing score.
+
 2002-11-26  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/sodipodi.scm: Fixes.
 
 2002-11-20  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
-       * lily/beam-engraver.cc (stop_translation_timestep): reset now_stop_ev_
+       * lily/beam-engraver.cc (stop_translation_timestep): reset
+       now_stop_ev_
 
        * lily/scm-option.cc: add parse-protect to ly:set-option
 
        * lily/include/ligature-bracket.hh: removed
        * lily/ligature-bracket.cc: removed
 
-       * lilypond-mode.el (LilyPond-expand-alist): set LaTeX extension to .tex
+       * lilypond-mode.el (LilyPond-expand-alist): set LaTeX extension to
+       .tex
 
        * lily/beam.cc (set_beaming): don't change beam count on rests.
        (brew_molecule): always set flag-width > 0.
 
 2002-11-19  Heikki Junes <hjunes@cc.hut.fi>
 
-       * lilypond-mode.el: LilyPond-imenu-generic-re: only alphabetic chars,
-       remove instructions; instead, refer to lilypond-init.el and
+       * lilypond-mode.el: LilyPond-imenu-generic-re: only alphabetic
+       chars, remove instructions; instead, refer to lilypond-init.el and
        Documentation/topdocs/INSTALL.texi.
 
        * lilypond.words: add identifiers and reserved words.
index fb3ad034c90c218f6171f15137e7d9f642a8cba2..242c59b7123424c992e276d0b498f1c5f43e685e 100644 (file)
@@ -20,7 +20,7 @@ SCRIPTS = configure aclocal.m4 autogen.sh
 README_FILES =  ChangeLog  COPYING DEDICATION NEWS README.mandrake ROADMAP THANKS
 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt
 IN_FILES := $(wildcard *.in)
-EXTRA_DIST_FILES = $(wildcard *.el) vimrc VERSION $(README_FILES)  $(SCRIPTS) $(IN_FILES)  emacsclient.patch lexer-gcc-3.0.patch server.el.patch darwin.patch .cvsignore  lexer-gcc-3.1.sh 
+EXTRA_DIST_FILES = $(wildcard *.el) vimrc VERSION $(README_FILES)  $(SCRIPTS) $(IN_FILES)  emacsclient.patch lexer-gcc-3.0.patch server.el.patch darwin.patch .cvsignore  lexer-gcc-3.1.sh  lilypond.words
 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
 INSTALLATION_DIR=$(local_lilypond_datadir)
 INSTALLATION_FILES=$(configuration) VERSION
index 6e36de07d4aa9c901f430a892cc60c5a641d172a..aa3acc99667012052695fe5465557759f8285408 100644 (file)
@@ -23,28 +23,27 @@ LY_DEFINE (ly_set_grob_property,"ly:set-grob-property!", 3, 0, 0,
 
 LY_DEFINE (ly_get_grob_property,
          "ly:get-grob-property", 2, 0, 0, (SCM grob, SCM sym),
-         "Get the value of a value in grob @var{g} of property @var{sym}. It
-will return @code{'()} (end-of-list) if @var{g} doesn't have @var{sym} set.
-
-Grob properties are stored as GUILE association lists, with symbols as
-keys. All lookup functions identify undefined properties with
-end-of-list (i.e. @code{'()} in Scheme or @code{SCM_EOL} in C)
-
-Properties are stored in two ways:
-@itemize @bullet
-@item mutable properties.
-Grob properties that change from object to object. The storage of
-these are private to a grob. For example pointers to other grobs are
-always stored in the mutable properties.
-
-@item immutable properties.
-Grob properties that are shared across different grobs of the same
-type. The storage is shared, and hence it is read-only. Typically, this
-is used to store function callbacks, and default settings. They are
-initially read from @file{scm/grob-description.scm}.
-@end itemize
-
-")
+         "Get the value of a value in grob @var{g} of property @var{sym}. It\n"
+"will return @code{'()} (end-of-list) if @var{g} doesn't have @var{sym} set.\n"
+"\n"
+"Grob properties are stored as GUILE association lists, with symbols as\n"
+"keys. All lookup functions identify undefined properties with\n"
+"end-of-list (i.e. @code{'()} in Scheme or @code{SCM_EOL} in C)\n"
+"\n"
+"Properties are stored in two ways:\n"
+"@itemize @bullet\n"
+"@item mutable properties.\n"
+"Grob properties that change from object to object. The storage of\n"
+"these are private to a grob. For example pointers to other grobs are\n"
+"always stored in the mutable properties.\n"
+"\n"
+"@item immutable properties.\n"
+"Grob properties that are shared across different grobs of the same\n"
+"type. The storage is shared, and hence it is read-only. Typically, this\n"
+"is used to store function callbacks, and default settings. They are\n"
+"initially read from @file{scm/grob-description.scm}.\n"
+"@end itemize\n"
+"\n")
 {
   Grob * sc = unsmob_grob (grob);
   SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
index 45001766d64fe4cf5d1c700a58dae6e205271711..ce4bc59a0bd19346156606c54d60e1ca8629a63d 100644 (file)
@@ -52,7 +52,8 @@ Paper_outputter::Paper_outputter (String name)
 
 Paper_outputter::~Paper_outputter ()
 {
-  
+  scm_close_port (file_);
+  file_ = SCM_EOL;
 }
 
 
index bded4946d7b4e88b18e39cf3ffbf5d1cec88bdbb..ddcfecb6f7c75afacdb491a1301dfefd05653844 100644 (file)
@@ -121,18 +121,14 @@ LY_DEFINE (ly_set_option, "ly:set-option", 2, 0, 0, (SCM var, SCM val),
 
        
       */
-
       ;
     }
   else
     {
       warning (_("Unknown internal option!"));
     }
-  
 
   return SCM_UNSPECIFIED;
 }
 
 
-
-
index d860e60024bee882a9e2222a73bc2b0e8320fe46..2666360e2382b820540114fcbea5932dfcb2258a 100644 (file)
@@ -3,5 +3,5 @@
 %
 % Running LilyPond on this file generates the documentation
 %
-#(ly:set-parse-protect #f)
+#(ly:set-option 'parse-protect #f)
 #(load-from-path "generate-documentation.scm")
index 683585d0a8ec6758e96d762b3f516420afb7d301..2eeb328440e01e3bc5c0b0f903d1540c10bebe2a 100644 (file)
@@ -120,10 +120,10 @@ def progress (s):
        sys.stderr.write (s)
 
 def warning (s):
-       sys.stderr.write (__main__.program_name + ":" + _ ("warning: ") + s + '\n')
+       sys.stderr.write (__main__.program_name + ": " + _ ("warning: ") + s + '\n')
 
 def error (s):
-       sys.stderr.write (__main__.program_name + ":" + _ ("error: ") + s + '\n')
+       sys.stderr.write (__main__.program_name + ": " + _ ("error: ") + s + '\n')
        
 def exit (i):
        if __main__.verbose_p:
index 95b83cb1d6a2f5595756b67ef818f3490a254667..8fba5384cf05f118533ee193fc4ab085314bf083 100644 (file)
@@ -406,6 +406,27 @@ Rest can contain a list of beat groupings
     (not (eq? #f (memq symbol (ly:get-grob-property elt 'interfaces))))))
 
 
+;;
+(define-public (smart-bar-check n)
+  "Make  a bar check that checks for a specific bar number. 
+"
+  (let*
+      (
+       (m (make-music-by-name 'ApplyContext))
+       )
+    
+    (define (checker tr)
+      (let* ((bn (ly:get-context-property tr 'currentBarNumber)))
+       (if (= bn  n)
+           #t
+           (error
+            (format "Bar check failed, we should have reached ~a, instead at ~a\n"
+                    n bn ))
+           )))
+
+    (ly:set-mus-property! m 'procedure checker)
+    m
+    ))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; warn for bare chords at start.
index c614059fda0cd43d845253a5466da028320a27da..ab2e5b0422ef42a2cac5ddba6d1c8878191cbde2 100644 (file)
@@ -530,8 +530,22 @@ None.
        if extra['orientation'] and extra['orientation'][0] == 'landscape':
                opts = opts + ' -tlandscape'
 
+
        if 'PDF' in targets:
-               opts = opts + ' -Ppdf -G0 -u lilypond.map'
+               where = os.popen ('kpsewhich feta20.pfa').read()
+
+               pfa_file  = None
+               if where:
+                       try: 
+                               pfa_file = open (where, 'r')
+                       except IOError:
+                               pass
+
+               if pfa_file:
+                       opts = opts + ' -Ppdf -G0 -u lilypond.map'
+               else:
+                       ly.warning (_ ('''Trying create PDF, but no PFA fonts found.
+Using bitmap fonts instead. This will look poorly.'''))
                
        cmd = 'dvips %s -o%s %s' % (opts, outbase + '.ps', outbase + '.dvi')
        ly.system (cmd)
@@ -737,19 +751,19 @@ if 1:
                try:
                        run_lilypond (files, dep_prefix)
                except:
+                       ### ARGH. This also catches python programming errors.
+                       ### this should only catch lilypond nonzero exit  status
+                       ### --hwn
+
+                       
                        # TODO: friendly message about LilyPond setup/failing?
                        #
-                       # TODO: lilypond should fail with different
-                       # error codes for:
-                       #   - guile setup/startup failure
-                       #   - font setup failure
-                       #   - init.ly setup failure
-                       #   - parse error in .ly
-                       #   - unexpected: assert/core dump
                        targets = []
                        if verbose_p:
                                traceback.print_exc ()
-
+                       else:
+                               ly.warning (_("Running LilyPond failed. Rerun with --verbose for a trace."))
+                               
        # Our LilyPond pseudo filter always outputs to 'lelie'
        # have subsequent stages and use 'lelie' output.
        if pseudo_filter_p:
@@ -779,11 +793,14 @@ if 1:
        if 'PS' in targets:
                try:
                        run_dvips (outbase, extra_init)
+                       
                except: 
                        if 'PS' in targets:
                                targets.remove ('PS')
                        if verbose_p:
                                traceback.print_exc ()
+                       else:
+                               ly.warning (_("Failed to make PS file. Rerun with --verbose for a trace."))
 
        if 'PNG' in  targets:
                ly.make_preview (outbase)
@@ -808,6 +825,9 @@ if 1:
                                targets.remove ('PS')
                        if verbose_p:
                                traceback.print_exc ()
+                       else:
+                               ly.warning (_("Running LaTeX falied. Rerun with --verbose for a trace."))
+                               
 
        # add DEP to targets?
        if track_dependencies_p: