source file of the GNU LilyPond music typesetter
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include <time.h>
#include <fstream.h>
+#include <math.h>
#include "dimensions.hh"
#include "dictionary-iter.hh"
{
if (safe_global_b)
{
- // ly_set_x ("security-paranoia", SCM_BOOL_T);
+
gh_define ("security-paranoia", SCM_BOOL_T);
}
String s = String ("(eval (") + output_global_ch + "-scm 'all-definitions))";
output_comment (nm);
}
- for (Cons<Atom> *ptr = m->atom_list_; ptr; ptr = ptr->next_)
+ for (SCM ptr = gh_cdr (m->atom_list_); ptr != SCM_EOL; ptr = gh_cdr (ptr))
{
- Atom * i = ptr->car_;
+ Atom * i = unsmob_atom (gh_car (ptr));
Offset a_off = i->off_;
a_off += o;
if (!i->func_)
continue;
- if (a_off.length () > 100 CM)
+ Axis a = X_AXIS;
+ while (a < NO_AXES)
{
- programming_error ("improbable offset for object");
- Axis a =X_AXIS;
- while (a < NO_AXES)
+ if (abs(a_off[a]) > 30 CM
+ || isinf (a_off[a]) || isnan (a_off[a]))
{
- if (abs(a_off[a]) > 30 CM)
- a_off[a] = 30 CM;
- incr (a);
+ programming_error ("Improbable offset for object: setting to zero");
+ a_off[a] = 0.0;
}
+ incr (a);
}
-
+
+
SCM box_scm
= gh_list (ly_symbol2scm ("placebox"),
gh_double2scm (a_off[X_AXIS]),