2002-07-13 Han-Wen <hanwen@cs.uu.nl>
+ * scripts/ly2dvi.py (run_latex): show latex error log. Ask for
+ bugreport if lilypond is killed.
+
+2002-07-12 Mats Bengtsson <matsb@s3.kth.se>
+
+ * lily/beam.cc (after_line_breaking): Set correct stem lengths
+ also when beam positions are set manually.
+ (consider_auto_knees): Do not use automatic knees if the directions
+ are set manually by the user.
+
+2002-07-13 Han-Wen <hanwen@cs.uu.nl>
+
+ * lily/input-smob.cc (make_input): GUILE 1.7 compatibility fixes.
+
* lily/beam.cc: complete rewrite of multiplicity. This fixes 16th
knees code.
(quanting): add french beaming support (property french-beaming)
+ (stem_beams): removed.
-
-
2002-07-12 Han-Wen <hanwen@cs.uu.nl>
* input/regression/grace-auto-beam.ly: new file
#!/bin/sh
-# WARNING WARNING WARNING
-# do not edit! this is autogen.sh, generated from stepmake/autogen.sh
-#!/bin/sh
# Run this to generate configure and initial GNUmakefiles
srcdir=`dirname $0`
+if [ stepmake/autogen.sh -nt autogen.sh ]; then
+ echo "stepmake/autogen.sh is newer. Copying file."
+ cp -f stepmake/autogen.sh autogen.sh
+ exec ./autogen.sh
+fi
+
# Be paranoid: check for autoconf == 2.13
# Some setups have both autoconf 2.13 and 2.50 available through
# a wrapper script: /usr/bin/autoconf.
# advertises itself as autoconf 2.13.
# If you have such a setup, invoke this script as:
# autoconf=autoconf2.13 ./autogen.sh
-for i in autoconf autoconf2.13 false; do
+for i in autoconf-2.13 autoconf2.13 autoconf false; do
version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'`
if test "0$version" -eq 213; then
autoconf=$i
Real last_width = -1 ;
+ * Determine auto knees based on positions if it's set by the user.
Molecule the_beam;
Real lt = me->paper_l ()->get_var ("linethickness");
{
for (int i=0; i < stems.size (); i++)
{
- if (Stem::invisible_b (stems[i]))
- continue;
Item *s = stems[i];
+ if (Stem::invisible_b (s) ||
+ s->get_grob_property ("dir-forced") == SCM_BOOL_T)
+ continue;
Real y = Stem::extremal_heads (stems[i])[d]
->relative_coordinate (common, Y_AXIS);
SCM s = ly_deep_copy (me->get_grob_property ("positions"));
me->set_grob_property ("positions", s);
- if (ly_car (s) != SCM_BOOL_F)
- return SCM_UNSPECIFIED;
+ if (ly_car (s) == SCM_BOOL_F)
+ {
- // one wonders if such genericity is necessary --hwn.
- SCM callbacks = me->get_grob_property ("position-callbacks");
- for (SCM i = callbacks; gh_pair_p (i); i = ly_cdr (i))
- gh_call1 (ly_car (i), smob);
+ // one wonders if such genericity is necessary --hwn.
+ SCM callbacks = me->get_grob_property ("position-callbacks");
+ for (SCM i = callbacks; gh_pair_p (i); i = ly_cdr (i))
+ gh_call1 (ly_car (i), smob);
+ }
set_stem_lengths (me);
return SCM_UNSPECIFIED;
smobify_cxx_function (Cxx_function cb)
{
SCM z;
-
- SCM_NEWCELL (z);
- SCM_SETCDR (z, (SCM)cb);
- SCM_SETCAR (z, (SCM)callback_tag);
-
+ SCM_NEWSMOB(z,callback_tag, cb) ;
return z;
}
}
IMPLEMENT_SIMPLE_SMOBS (Duration);
-
-
int
Duration::print_smob (SCM s, SCM port, scm_print_state *)
{
{ \
SCM s; \
s = gh_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (this)); \
- scm_done_malloc (sizeof (CL)); \
+ scm_gc_register_collectable_memory ((CL*)this, sizeof (CL), #CL " smob"); \
\
return s; \
} \
CL::free_smob (SCM ses) \
{ \
CL * s = (CL*) SCM_CDR (ses); \
- delete s; \
- return sizeof (CL); \
-} \
+ delete s; \
+ scm_gc_unregister_collectable_memory (s, sizeof (CL), #CL " smob"); \
+ return 0;\
+}\
ADD_SCM_INIT_FUNC (CL, CL::init_smobs)
#define IMPLEMENT_SMOBS(CL) \
deal half-initialized objects: scm_done_malloc ( ) might trigger GC. \
the warning in smobs.hh is just to be doubleplus goodly sure \
*/ \
- SCM s; \
- SCM_NEWCELL (s); \
- SCM_SETCAR (s,CL::smob_tag_); \
- SCM_SETCDR (s, SCM_PACK (this)); \
+ SCM s;\
+ SCM_NEWSMOB (s, CL::smob_tag_, this);\
self_scm_ = s; \
- scm_done_malloc (sizeof (CL)); \
+ scm_gc_register_collectable_memory (this, sizeof (CL), #CL " smob"); \
return s; \
}
Input * nip = new Input (ip);
SCM z;
- SCM_NEWCELL (z);
- SCM_SETCAR (z, (SCM)input_tag);
- SCM_SETCDR (z, (SCM)nip);
- // fixme: done_malloc
+ SCM_NEWSMOB (z, input_tag, nip);
return z;
}
#include "warn.hh"
#include "ly-smobs.icc"
-
IMPLEMENT_SIMPLE_SMOBS (Moment);
IMPLEMENT_TYPE_P (Moment, "moment?");
;; follow-into-staff :: bool
;; dir-relative-to-stem :: int
;; force-dir :: int
-;; priority :: int
-;;TODO? extra padding :: Real (given in staff spaces)
+;; priority :: int -- lower number means closer to the note head.
;; TODO: generate Grob types for this, by prepending appropriate props
;; on top of Script (?)
;; TODO: don't use 2 level indiriection, simply set
-
;; thumb = \script #'((feta . ( . .. ) (follow-staff . #f))
return temp_dir
-def system (cmd, ignore_error = 0):
+def system (cmd, ignore_error = 0, quiet =0):
"""Run CMD. If IGNORE_ERROR is set, don't complain when CMD returns non zero.
RETURN VALUE
name = re.match ('[ \t]*([^ \t]*)', cmd).group (1)
msg = name + ': ' + _ ("command exited with value %d") % st
if ignore_error:
- warning (msg + ' ' + _ ("(ignored)") + ' ')
+ if not quiet:
+ warning (msg + ' ' + _ ("(ignored)") + ' ')
else:
error (msg)
for (k,v) in os.environ.items ():
sys.stderr.write ("%s=\"%s\"\n" % (k,v))
-def quiet_system (cmd, name):
+def quiet_system (cmd, name, ignore_error = 0):
if not verbose_p:
progress ( _("Running %s...") % name)
cmd = cmd + ' 1> /dev/null 2> /dev/null'
- return system (cmd)
+ return system (cmd, ignore_error, quiet = 1)
def run_lilypond (files, outbase, dep_prefix):
# for better debugging!
print_environment ()
- print opts, fs
- system ('lilypond %s %s ' % (opts, fs), 'lilypond')
+
+ cmd = 'lilypond %s %s ' % (opts, fs)
+ if verbose_p:
+ progress ("Invoking `%s'"% cmd)
+ status = os.system (cmd)
+
+ signal = 0x0f & status
+ exit_status = status >> 8
+
+ # 2 == user interrupt.
+ if signal <> 2:
+ error("\n\nLilyPond crashed (signal %d). Please submit a bugreport to bug-lilypond@gnu.org\n" % signal)
+
+ if status:
+ error ("\n\nLilyPond failed on the input file. (exit status %d)\n" % exit_status)
+
def analyse_lilypond_output (filename, extra):
f.close ()
cmd = 'latex \\\\nonstopmode \\\\input %s' % latex_fn
- quiet_system (cmd, 'LaTeX')
+ status = quiet_system (cmd, 'LaTeX', ignore_error = 1)
+
+ signal = 0xf & status
+ exit_stat = status >> 8
+ if exit_stat:
+ logstr = open (outbase + '.log').read()
+ m = re.search ("\n!", logstr)
+ start = m.start (0)
+ logstr = logstr[start:start+200]
+
+ sys.stderr.write(_("""LaTeX failed on the output file.
+The error log is as follows:
+%s...\n""" % logstr))
+ raise 'LaTeX error'
+
if preview_p:
# make a preview by rendering only the 1st line.
preview_fn = outbase + '.preview.tex'
srcdir=`dirname $0`
+if [ stepmake/autogen.sh -nt autogen.sh ]; then
+ echo "stepmake/autogen.sh is newer. Copying file."
+ cp -f stepmake/autogen.sh autogen.sh
+ exec ./autogen.sh
+fi
+
# Be paranoid: check for autoconf == 2.13
# Some setups have both autoconf 2.13 and 2.50 available through
# a wrapper script: /usr/bin/autoconf.
# advertises itself as autoconf 2.13.
# If you have such a setup, invoke this script as:
# autoconf=autoconf2.13 ./autogen.sh
-for i in autoconf autoconf2.13 false; do
+for i in autoconf-2.13 autoconf2.13 autoconf false; do
version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'`
if test "0$version" -eq 213; then
autoconf=$i