* lily/laissez-vibrer-tie.cc: new file.
* lily/tie-column.cc (set_tie_config_directions): new function
(final_shape_adjustment): new function.
(shift_small_ties): new function.
* lily/tie-column.cc (set_chord_outline): new function.
2005-09-08 Jan Nieuwenhuizen <janneke@gnu.org>
+ * Documentation/user/lilypond.tely: Spell Baßtuba in UTF-8 (Werner).
+
+ * lily, flower: Include C++ iso C headers. Import namespace std
+ throughout.
+
+ * lily/side-position-interface.cc:
+ * lily/scm-hash.cc:
+ * lily/note-head.cc:
+ * lily/include/includable-lexer.hh:
+ * flower/include/string-data.icc: Remove using std::*.
+
+ * lily, flower: Include C++ iso C headers. Import namespace std
+ throughout.
+
+ * lily/side-position-interface.cc:
+ * lily/scm-hash.cc:
+ * lily/note-head.cc:
+ * lily/include/includable-lexer.hh:
+ * flower/include/string-data.icc: Remove using std::*.
+
* Documentation/user/instrument-notation.itely (Entering lyrics):
Multiple latin-1->utf-8 conversion fix.
-\input texinfo @c -*-texinfo-*-
+\input texinfo @c -*- coding: utf-8; mode: texinfo; -*-
@setfilename NEWS.info
@settitle NEWS
This improvement has been sponsored by Bertalan Fodor, Jay Hamilton,
Kieren MacMillan, Steve Doonan, Trevor Baca, and Vicente Solsona
-Dellá.
+Dell¡.
@item
Formatting of isolated, single ties has been improved. Now, ties avoid
This improvement has been sponsored by Bertalan Fodor, Jay Hamilton,
Kieren MacMillan, Steve Doonan, Trevor Baca, and Vicente Solsona
-Dellá.
+Dell¡.
@item @textanchor{repeat-counter}
}
@end lilypond
-This feature was sponsored by Trevor Baca.
+@c This feature was sponsored by Trevor Baca.
+@c where does this fail?
+This feature was sponsored by Trevor Bača.
@item
Music expressions can be displayed, in LilyPond notation, using the
MAJOR_VERSION=2
MINOR_VERSION=7
PATCH_LEVEL=10
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=namespace
-#include <assert.h>
+#include <cassert>
#include <cstdio>
+using namespace std;
#include "memory-stream.hh"
#include <cstdio>
#include <cerrno>
+using namespace std;
#include "config.hh"
#include <cstdio>
#include <cerrno>
+using namespace std;
#include "config.hh"
#if HAVE_SYS_STAT_H
#include <cstdlib>
#include <iostream>
+using namespace std;
#include "config.hh"
#include "string-convert.hh"
Distributed under GNU GPL
*/
-
#ifndef ARRAY_H
#define ARRAY_H
+
#include <cassert>
+using namespace std;
#ifndef INLINE
#define INLINE inline
Array<T>::OK () const
{
assert (max_ >= size_ && size_ >= 0);
- if (max_) assert (array_);
+ if (max_)
+ assert (array_);
}
template<class T> INLINE
#define AXES_HH
#include <cassert>
+using namespace std;
enum Axis
{
prefix ONE_OPERATOR (type, function, !=) \
prefix ONE_OPERATOR (type, function, <) \
prefix ONE_OPERATOR (type, function, <=) \
+ /* namespace std { */ \
prefix inline type max (type t1, type t2) { return (t1 > t2) ? t1 : t2; } \
- prefix inline type min (type t1, type t2) { return (t1 < t2) ? t1 : t2; } \
- \
- prefix bool operator < (type t1, type t2) /* stupid fix to allow ; */
+ prefix inline type min (type t1, type t2) { return (t1 < t2) ? t1 : t2; } \
+ /* } */ \
+ /* stupid fix to allow ; */ \
+ prefix bool operator < (type t1, type t2)
#define INSTANTIATE_COMPARE(type, func) TEMPLATE_INSTANTIATE_COMPARE (type, func,)
#define CONS_HH
#include <cassert>
+using namespace std;
template<class T>
class Cons
#define CPU_TIMER_HH
#include <ctime>
+using namespace std;
#include "real.hh"
extern "C" {
#endif
-#include <stdio.h>
#include <unistd.h>
+#include <cstdio>
+using namespace std;
+
+
#if (! defined (__off64_t) && ! defined (__off64_t_defined)) || ! defined (__cplusplus)
#define off64_t unsigned long long
#endif
(c) 1996--2005 Han-Wen Nienhuys
*/
-#ifndef FPROTO_HH
-#define FPROTO_HH
+#ifndef FLOWER_PROTO_HH
+#define FLOWER_PROTO_HH
char const *flower_version_str0 ();
struct Mapped_file_storage;
struct Simple_file_storage;
-#endif // FPROTO_HH
-
+#endif /* FLOWER_PROTO_HH */
#define GETOPT_LONG_HH
#include <cstdio>
+using namespace std;
#include "string.hh"
#include <cassert>
#include <cmath>
+using namespace std;
#include "interval.hh"
#include "string.hh"
#ifndef LIBC_EXTENSION_HH
#define LIBC_EXTENSION_HH
-#include <stddef.h>
-#include <stdarg.h>
+#include <cstddef>
+#include <cstdarg>
+using namespace std;
#include "config.hh"
void const *needle, int needle_len);
#endif /* HAVE_MEMMEM */
+#if ! HAVE_MEMRCHR
+unsigned char *memrchr (unsigned char const *p, int n, char c);
+#endif
+
+#if ! HAVE_MEMREV
+unsigned char *memrev (unsigned char *byte, int length_i);
+#endif
+
+double my_round (double);
+
+/* namespace std { */
+
#if ! HAVE_SNPRINTF /* GNU extension. */
int snprintf (char *str, size_t n, char const *format, ...);
#endif
#endif
#endif
-#if ! HAVE_MEMRCHR
-unsigned char *memrchr (unsigned char const *p, int n, char c);
-#endif
-
-#if ! HAVE_MEMREV
-unsigned char *memrev (unsigned char *byte, int length_i);
-#endif
-
-double my_round (double);
+/* }; */
#endif /* LIBC_EXTENSION_HH */
#ifndef MEMORY_STREAM_HH
#define MEMORY_STREAM_HH
-#include <stdio.h>
+#include <cstdio>
#include <unistd.h>
+using namespace std;
#include "libc-extension.hh"
#include "file-cookie.hh"
*/
#include <cstdio>
+using namespace std;
#define BOOL int
#define FLAGS int
#include <algorithm>
#include <climits>
#include <cmath>
+using namespace std;
+
typedef double Real;
extern const Real infinity_f;
-using namespace std;
-using std::isnan;
-using std::isinf;
-using std::fabs;
+/* namespace std { */
+
template<class T> inline T abs (T x)
{
return x > 0 ? x : -x;
}
+/* } namespace std */
+
+inline Real
+distance (Real x, Real y)
+{
+ return abs (x - y);
+}
+
template<class T> inline int sign (T x)
{
if (x)
return x * x;
}
-inline Real
-distance (Real x, Real y)
-{
- return abs (x - y);
-}
-
#endif
#define STRING_CONVERT_HH
#include <cstdarg>
+using namespace std;
#include "string.hh"
#include <algorithm>
#include <cassert>
#include <cstring>
-#include <memory.h>
-
+#include <memory>
using namespace std;
const int INITIALMAX = 8;
#define STRINGHANDLE_INL
#include <cassert>
-
-#include <memory.h>
+#include <memory>
+using namespace std;
#include "string-data.hh"
#include "string-handle.hh"
class ostream;
#endif
#endif
+using namespace std;
#include "arithmetic-operator.hh"
#include "string-handle.hh"
*/
#include "international.hh"
-
#include "compare.hh"
+
INSTANTIATE_COMPARE (String const &, String::compare);
#ifdef STRING_UTILS_INLINED
#define VIRTUAL_METHODS_HH
#include <typeinfo>
+using namespace std;
#define classname(class_ptr) demangle_classname (typeid (* (class_ptr)))
char const *
-demangle_classname (std::type_info const &);
+demangle_classname (type_info const &);
/* Virtual copy constructor. Make up for C++'s lack of a standard
factory or clone () function. Uses a typeof hack. Usage:
#include <cstdio>
#include <cstring>
#include <cctype>
+using namespace std;
#include "libc-extension.hh"
return start;
}
-/*
- There are some strange problems with round() on early glibcs.
-*/
-double
-my_round (double x)
-{
- return floor (x -0.5)+ 1.0;
-}
-
-#ifndef isinf
-#if !HAVE_ISINF
-int
-isinf (double x)
-{
- return x && (x == x/ 2);
-}
-#endif
-#endif
-
#if !HAVE_MEMMEM
/** locate a substring. #memmem# finds the first occurrence of
return byte;
}
+/*
+ There are some strange problems with round() on early glibcs.
+*/
+double
+my_round (double x)
+{
+ return floor (x -0.5)+ 1.0;
+}
+
+/* namespace std { */
+
+#ifndef isinf
+#if !HAVE_ISINF
+int
+isinf (double x)
+{
+ return x && (x == x/ 2);
+}
+#endif
+#endif
+
#if ! HAVE_SNPRINTF
int
snprintf (char *str, size_t n, char const *format, ...)
}
#endif
+/* } namespace std */
(c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cstring>
+#include <cstdlib>
+using namespace std;
#include "memory-stream.hh"
Real
Offset::length () const
{
- return sqrt (sqr (coordinate_a_[X_AXIS]) + sqr (coordinate_a_[Y_AXIS]));
+ return sqrt (sqr (coordinate_a_[X_AXIS])
+ + sqr (coordinate_a_[Y_AXIS]));
}
bool
#include <cerrno>
#include <cmath>
#include <cstring>
+using namespace std;
#include <sys/file.h>
#include "polynomial.hh"
#include <cmath>
+using namespace std;
/*
Een beter milieu begint bij uzelf. Hergebruik!
*/
Real
-Polynomial::eval (Real x)const
+Polynomial::eval (Real x) const
{
Real p = 0.0;
We only do relative comparisons. Absolute comparisons break down in
degenerate cases. */
while (degree () > 0
- && (fabs (coefs_.top ()) < FUDGE *fabs (coefs_.top (1))
+ && (fabs (coefs_.top ()) < FUDGE * fabs (coefs_.top (1))
|| !coefs_.top ()))
coefs_.pop ();
}
return pow (x, 1.0 / 3.0);
else if (x < 0.0)
return -pow (-x, 1.0 / 3.0);
- else
- return 0.0;
+ return 0.0;
}
static bool
sol.push (-u);
}
}
- else if (D < 0) { /* Casus irreducibilis: three real solutions */
- Real phi = 1.0 / 3 * acos (-q / sqrt (-cb));
- Real t = 2 * sqrt (-p);
-
- sol.push (t * cos (phi));
- sol.push (-t * cos (phi + M_PI / 3));
- sol.push (-t * cos (phi - M_PI / 3));
- }
- else { /* one real solution */
- Real sqrt_D = sqrt (D);
- Real u = cubic_root (sqrt_D - q);
- Real v = -cubic_root (sqrt_D + q);
-
- sol.push (u + v);
- }
+ else if (D < 0)
+ {
+ /* Casus irreducibilis: three real solutions */
+ Real phi = 1.0 / 3 * acos (-q / sqrt (-cb));
+ Real t = 2 * sqrt (-p);
+
+ sol.push (t * cos (phi));
+ sol.push (-t * cos (phi + M_PI / 3));
+ sol.push (-t * cos (phi - M_PI / 3));
+ }
+ else
+ {
+ /* one real solution */
+ Real sqrt_D = sqrt (D);
+ Real u = cubic_root (sqrt_D - q);
+ Real v = -cubic_root (sqrt_D + q);
+
+ sol.push (u + v);
+ }
/* resubstitute */
Real sub = 1.0 / 3 * A;
#include <cmath>
#include <cstdlib>
+using namespace std;
#include "string-convert.hh"
#include "libc-extension.hh"
#include "real.hh"
#include <cmath>
+using namespace std;
const Real infinity_f = HUGE_VAL;
#include <cctype>
+using namespace std;
#include "virtual-methods.hh"
char const *
-demangle_classname (std::type_info const &t)
+demangle_classname (type_info const &t)
{
char const *s = t.name ();
while (isdigit (*s))
#include <cstring>
#include <cstdio>
+using namespace std;
#include "libc-extension.hh"
#include "rational.hh"
#include <cstring>
#include <iostream>
+using namespace std;
#include "libc-extension.hh"
#include "string-convert.hh"
{
char const *me = strh_.to_str0 ();
- char const *p = (char const *)
- memmem (me, length (), searchfor.to_str0 (), searchfor.length ());
+ char const *p
+ = (char const *) memmem (me, length (),
+ searchfor.to_str0 (), searchfor.length ());
if (p)
return p - me;
#ifdef STRING_DEBUG
#include <sys/types.h>
-#include <memory.h>
+#include <memory>
+using namespace std;
+
void *
mymemmove (void *dest, void const *src, size_t n)
{
#include <cstdlib>
#include <cstdio>
+using namespace std;
/* Is progress indication at NEWLINE? */
static bool progress_newline = true;
if (alter == prev)
num = 0;
- else if ((abs (alter) < abs (prev) || prev * alter < 0) && alter != 0)
+ else if ((abs (alter) < abs (prev)
+ || prev * alter < 0) && alter != 0)
num = 2;
*different = (alter != prev);
}
(c) 2002--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "accidental-placement.hh"
#include "skyline.hh"
#include "afm.hh"
#include <cstring>
+using namespace std;
#include "warn.hh"
#include "libc-extension.hh"
int
Adobe_font_metric::name_to_index (String name) const
{
- std::map<String, int>::const_iterator ai = name_to_metric_dict_.find (name);
+ map<String, int>::const_iterator ai = name_to_metric_dict_.find (name);
if (ai == name_to_metric_dict_.end ())
return -1;
return (*ai).second;
*/
dy *= stacking_dir;
if (j)
- {
- dy = min (max (dy, threshold[SMALLER]),
- threshold[BIGGER]);
- }
+ dy = min (max (dy, threshold[SMALLER]), threshold[BIGGER]);
where_f += stacking_dir * dy;
total.unite (dims[j] + where_f);
#include "bar-line.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "all-font-metrics.hh"
#include "font-interface.hh"
Determine whether a beam is concave.
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "pointer-group-interface.hh"
#include "array.hh"
#include "beam.hh"
#include <algorithm>
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "warn.hh"
#include "staff-symbol-referencer.hh"
&& sign (dy_damp) != sign (dy))
dem += parameters->DAMPING_DIRECTION_PENALTY;
- dem += parameters->MUSICAL_DIRECTION_FACTOR *max (0.0, (fabs (dy) - fabs (dy_mus)));
+ dem += parameters->MUSICAL_DIRECTION_FACTOR
+ * max (0.0, (fabs (dy) - fabs (dy_mus)));
Real slope_penalty = parameters->IDEAL_SLOPE_FACTOR;
- beam_translation is the offset between Y centers of the beam.
*/
-#include <math.h> // tanh.
+#include <cmath> // tanh.
+using namespace std;
#include "beam.hh"
#include "interval-set.hh"
Real hang = 1.0 - (thickness - slt) / 2;
*dy = sign (*dy) * max (fabs (*dy),
- min (min (sit, inter), hang));
+ min (min (sit, inter), hang));
}
}
ADD_INTERFACE (Beam, "beam-interface",
"A beam. \n\n"
- "The @code{thickness} property is the weight of beams, and is measured "
- "in staffspace",
- "knee positioning-done position-callbacks "
- "concaveness dir-function quant-score auto-knee-gap gap "
- "gap-count chord-tremolo beamed-stem-shorten shorten least-squares-dy "
- "details damping inspect-quants flag-width-function "
- "neutral-direction positions space-function break-overshoot "
- "thickness");
-
+ "The @code{thickness} property is the weight of beams, "
+ "measured in staffspace",
+ "auto-knee-gap "
+ "beamed-stem-shorten "
+ "break-overshoot "
+ "chord-tremolo "
+ "concaveness "
+ "damping "
+ "details "
+ "dir-function "
+ "flag-width-function "
+ "gap "
+ "gap-count "
+ "inspect-quants "
+ "knee "
+ "least-squares-dy "
+ "neutral-direction "
+ "position-callbacks "
+ "positioning-done "
+ "positions "
+ "quant-score "
+ "shorten "
+ "space-function "
+ "thickness "
+ );
(c) 1998--2005 Jan Nieuwenhuizen <janneke@gnu.org>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "misc.hh"
#include "bezier.hh"
*height = slur_height (width, h_inf, r_0);
Real q = 2 * h_inf / max_fraction;
- *indent
- = 2 * h_inf - sqr (q) * max_fraction / (width + q);
+ *indent = 2 * h_inf - sqr (q) * max_fraction / (width + q);
}
Bezier
(c) 1998--2005 Jan Nieuwenhuizen <janneke@gnu.org>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "bezier.hh"
#include "warn.hh"
*/
#include <climits> // INT_MAX
+using namespace std;
#include "binary-source-file.hh"
#include "string-convert.hh"
#include "book.hh"
#include <cstdio>
+using namespace std;
#include "lilypond-key.hh"
#include "global-context.hh"
(c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "break-align-interface.hh"
#include <cstdio>
#include <cstdlib>
+using namespace std;
#include "grob-array.hh"
#include "item.hh"
*/
#include <cctype>
+using namespace std;
#include "context.hh"
#include "bar-line.hh"
#include "cluster.hh"
#include <cstdio>
+using namespace std;
#include "spanner.hh"
#include "item.hh"
*/
#include <cctype>
+using namespace std;
#include "rhythmic-head.hh"
#include "output-def.hh"
*/
#include <cstdio>
-#include <math.h> // rint
+#include <cmath> // rint
+using namespace std;
#include "custos.hh"
#include "direction.hh"
(c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "dimension-cache.hh"
#include "warn.hh"
#include "dot-column.hh"
#include <cstdio>
-#include <math.h>
+#include <cmath>
#include <map>
+using namespace std;
#include "dots.hh"
#include "rhythmic-head.hh"
}
};
-typedef std::map<int, Dot_position> Dot_configuration;
+typedef map<int, Dot_position> Dot_configuration;
/*
Value CFG according.
*/
#include <cctype>
+using namespace std;
#include "rhythmic-head.hh"
#include "engraver.hh"
#include "note-head.hh"
+#include <cctype>
+using namespace std;
+
#include "text-interface.hh"
#include "grob.hh"
#include "output-def.hh"
#include "font-interface.hh"
#include "staff-symbol-referencer.hh"
#include "stem.hh"
-#include <cctype>
MAKE_SCHEME_CALLBACK (Note_head, brew_ez_stencil, 1);
SCM
*/
#include <map>
+using namespace std;
#include "file-name-map.hh"
#include "lily-guile.hh"
-std::map<String, String> file_name_map_global;
+map<String, String> file_name_map_global;
String
map_file_name (String s)
#include "font-metric.hh"
-#include <math.h>
+#include <cmath>
#include <cctype>
+using namespace std;
#include "dimensions.hh"
#include "modified-font-metric.hh"
(c) 2003--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "dimensions.hh"
#include "all-font-metrics.hh"
*/
#include <cstring>
+using namespace std;
#include "protected-scm.hh"
#include "string.hh"
#include "config.hh"
-#include <math.h> /* isinf */
-#include <stdio.h>
-#include <string.h> /* memset */
+#include <cmath> /* isinf */
+#include <cstdio>
+#include <cstring> /* memset */
+using namespace std;
#include "international.hh"
#include "libc-extension.hh"
#include "global-context.hh"
#include <cstdio>
+using namespace std;
#include "warn.hh"
#include "music.hh"
#include "gourlay-breaking.hh"
-#include <math.h> // rint
+#include <cmath> // rint
#include <cstdio>
+using namespace std;
#include "warn.hh"
#include "main.hh"
*/
#include <cstring>
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "main.hh"
#include "input-smob.hh"
#include "grob.hh"
#include <cstring>
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "main.hh"
#include "input-smob.hh"
#include "includable-lexer.hh"
#include <sstream>
+using namespace std;
#include "config.hh"
#include "file-path.hh"
#define AFM_HH
#include <map>
+using namespace std;
#include "array.hh"
#include "font-metric.hh"
AFM_CharMetricInfo const *find_ascii_metric (int) const;
Array<int> ascii_to_metric_idx_;
- std::map<String, int> name_to_metric_dict_;
+ map<String, int> name_to_metric_dict_;
Adobe_font_metric (AFM_Font_info *);
};
#define CONTEXT_HH
#include <map>
+using namespace std;
#include "moment.hh"
#include "lily-proto.hh"
int iterator_count_;
bool init_;
- std::map<String, int> grob_counts_;
- std::map<String, int> context_counts_;
+ map<String, int> grob_counts_;
+ map<String, int> context_counts_;
protected:
Object_key const *key_;
#define INCLUDABLE_LEXER_HH
#ifndef LEXER_CC
-using namespace std;
#include <FlexLexer.h>
#endif
#define MIDI_STREAM_HH
#include <cstdio>
+using namespace std;
#include "string.hh"
#define MISC_HH
#include <cstdlib>
+using namespace std;
#include "array.hh"
#include "interval.hh"
Moment robust_scm2moment (SCM, Moment);
#ifdef STREAM_SUPPORT
-std::ostream &operator << (std::ostream &, Moment const &);
+ostream &operator << (ostream &, Moment const &);
#endif
bool moment_less (SCM a, SCM b);
#define OBJECT_KEY_DUMPER_HH
#include <map>
+using namespace std;
#include "object-key.hh"
-typedef std::map<Object_key const *, Object_key const *, Object_key_less> Key_to_key_map;
-typedef std::map<Object_key const *, int> Pointer_to_int_map;
-typedef std::map<int, Object_key const *> Int_to_key_map;
+typedef map<Object_key const *, Object_key const *, Object_key_less> Key_to_key_map;
+typedef map<Object_key const *, int> Pointer_to_int_map;
+typedef map<int, Object_key const *> Int_to_key_map;
class Object_key_dumper
{
#define OBJECT_KEY_UNDUMPER_HH
#include <map>
+using namespace std;
+
#include "object-key.hh"
-typedef std::map<int, Object_key const *> Int_to_key_map;
+typedef map<int, Object_key const *> Int_to_key_map;
struct Object_key_undumper
{
#define OPEN_TYPE_FONT_HH
#include <map>
+using namespace std;
+
#include "freetype.hh"
#include "font-metric.hh"
-typedef std::map<FT_UInt, FT_ULong> Index_to_charcode_map;
+typedef map<FT_UInt, FT_ULong> Index_to_charcode_map;
Index_to_charcode_map make_index_to_charcode_map (FT_Face face);
class Open_type_font : public Font_metric
#define SOURCE_FILE_HH
#include <iostream>
+using namespace std;
#include "string.hh"
#include "protected-scm.hh"
char const *to_str0 () const;
virtual String quote_input (char const *pos_str0) const;
- std::istream *get_istream ();
+ istream *get_istream ();
bool contains (char const *pos_str0) const;
int length () const;
virtual int get_line (char const *pos_str0) const;
private:
Link_array<char> newline_locations_;
- std::istream *istream_;
+ istream *istream_;
char *contents_str0_;
int length_;
void load_stdin ();
#define STENCIL_HH
#include <cstdlib> // size_t
+using namespace std;
#include "lily-proto.hh"
#include "box.hh"
#include <iostream>
#include <sstream>
+using namespace std;
#include "string.hh"
#if __GNUC__ > 2
-std::ostream *open_file_stream (String file_name,
- std::ios_base::openmode mode = std::ios::out);
+ostream *open_file_stream (String file_name,
+ ios_base::openmode mode = ios::out);
#else
-std::ostream *open_file_stream (String file_name, int mode = ios::out);
+ostream *open_file_stream (String file_name, int mode = ios::out);
#endif
-void close_file_stream (std::ostream *os);
+void close_file_stream (ostream *os);
#endif /* STREAM_HH */
#define TWEAK_REGISTRATION_HH
#include <map>
+using namespace std;
#include "lily-proto.hh"
#include "object-key.hh"
-typedef std::map<Object_key const *, SCM, Object_key_less> Tweak_map;
+typedef map<Object_key const *, SCM, Object_key_less> Tweak_map;
class Tweak_registry
{
#include "input.hh"
#include <cstdio>
+using namespace std;
#include "source.hh"
#include "source-file.hh"
#include <cstring>
#include <cstdlib>
+using namespace std;
/* for qsort */
int tabcmp (Keyword_ent const &p1, Keyword_ent const &p2)
*coef = 0.0;
*offset = 0.;
- Real den = (N *sqx - sqr (sx));
+ Real den = (N * sqx - sqr (sx));
if (!N || !den)
{
programming_error ("minimise_least_squares (): Nothing to minimise");
*/
#include <map>
+using namespace std;
#include "item.hh"
#include "note-head.hh"
}
};
-typedef std::map < int, Drul_array<Ledger_request> > Ledger_requests;
+typedef map < int, Drul_array<Ledger_request> > Ledger_requests;
/*
TODO: ledger share a lot of info. Lots of room to optimize away
*/
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
+
+#include <cstdio>
+#include <cctype>
+#include <cerrno>
/* Flex >= 2.5.29 fix; FlexLexer.h's multiple include bracing breaks
when building the actual lexer. */
#define LEXER_CC
#include <iostream>
-
using namespace std;
#include "music-function.hh"
return MUSIC_FUNCTION_SCM;
}
+
+/* Shut up lexer warnings. */
+#if YY_STACK_USED
+
+static void
+yy_push_state (int)
+{
+}
+
+static void
+yy_pop_state ()
+{
+}
+
+static int
+yy_top_state ()
+{
+ return 0;
+}
+
+static void
+silence_lexer_warnings ()
+{
+ (void) yy_start_stack_ptr;
+ (void) yy_start_stack_depth;
+ (void) yy_start_stack;
+ (void) yy_push_state;
+ (void) yy_pop_state;
+ (void) yy_top_state;
+ (void) silence_lexer_warnings;
+}
+#endif
#include <cstdlib>
#include <cstring> /* strdup, strchr */
#include <cctype>
+using namespace std;
#include "config.hh"
#include <cctype>
#include <sstream>
+using namespace std;
#include "scm-hash.hh"
#include "interval.hh"
#include "line-spanner.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "spanner.hh"
#include "output-def.hh"
#include "lookup.hh"
-#include <math.h>
+#include <cmath>
#include <cctype>
+using namespace std;
#include "line-interface.hh"
#include "warn.hh"
#include "lyric-extender.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "warn.hh"
#include "lookup.hh"
#include "lyric-hyphen.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "lookup.hh"
#include "output-def.hh"
#include <cassert>
#include <clocale>
#include <cstring>
+#include <cerrno>
+using namespace std;
+
#include <unistd.h>
-#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
*/
#include <cctype>
+using namespace std;
#include "bar-line.hh"
#include "context.hh"
Pal Benko <benkop@freestart.hu>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "mensural-ligature.hh"
#include "item.hh"
*/
#include <cctype>
+using namespace std;
#include "engraver.hh"
(c) 1997--2005 Jan Nieuwenhuizen <janneke@gnu.org>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "misc.hh"
#include "output-def.hh"
#include "midi-stream.hh"
-#include <errno.h>
+#include <cerrno>
+using namespace std;
#include "stream.hh"
#include "string-convert.hh"
Jan Nieuwenhuizen <janneke@gnu.org>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "misc.hh"
#include "string.hh"
(c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include <cctype>
+using namespace std;
#include "modified-font-metric.hh"
#include "pango-font.hh"
}
#ifdef STREAM_SUPPORT
-std::ostream &
-operator << (std::ostream &os, Moment const &m)
+ostream &
+operator << (ostream &os, Moment const &m)
{
os << m.to_string ();
return os;
#include "music-iterator.hh"
#include <cstdio>
+using namespace std;
#include "warn.hh"
#include "context.hh"
#include "note-collision.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "warn.hh"
#include "note-column.hh"
#include "note-column.hh"
-#include <math.h> // ceil
+#include <cmath> // ceil
+using namespace std;
#include "axis-group-interface.hh"
#include "stem.hh"
#include "note-head.hh"
-#include <math.h>
+#include <cmath>
#include <cctype>
#include <algorithm> // min, max
-
using namespace std;
#include "directional-element-interface.hh"
#include "engraver.hh"
#include <cctype>
+using namespace std;
#include "rhythmic-head.hh"
#include "output-def.hh"
#include "open-type-font.hh"
+#include <cstdio>
+using namespace std;
+
#include <freetype/tttables.h>
-#include <stdio.h>
#include "dimensions.hh"
#include "modified-font-metric.hh"
(c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "dimensions.hh"
#include "all-font-metrics.hh"
#include "paper-outputter.hh"
-#include <math.h>
+#include <cmath>
#include <ctime>
+using namespace std;
#include "dimensions.hh"
#include "file-name.hh"
#include "parse-scm.hh"
#include <cstdio>
+using namespace std;
#include "main.hh"
#include "paper-book.hh"
#include "config.hh"
-#include <ctype.h>
-#include <stdlib.h>
-#include <stdio.h>
-
+#include <cctype>
+#include <cstdlib>
+#include <cstdio>
+using namespace std;
#include "book.hh"
#include "context-def.hh"
#include "percent-repeat-item.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "lookup.hh"
#include "font-interface.hh"
#include "performance.hh"
#include <ctime>
+using namespace std;
#include "audio-column.hh"
#include "audio-staff.hh"
#include <cstdlib>
#include <cstdio>
#include <cstring>
+using namespace std;
#include "program-option.hh"
#include "source-file.hh"
#include "program-option.hh"
#include <cstdio>
-#include <string.h>
+#include <cstring>
+using namespace std;
#include "string-convert.hh"
#include "protected-scm.hh"
#include "rest-collision.hh"
-#include <math.h> // ceil.
+#include <cmath> // ceil.
+using namespace std;
#include "warn.hh"
#include "note-column.hh"
#include <cstdio>
#include <algorithm>
+using namespace std;
#include "ly-smobs.icc"
-using namespace std;
-
/*
Return: number of objects.
*/
}
bool
-Scheme_hash_table::try_retrieve (SCM k, SCM *v)
-{
+Scheme_hash_table::try_retrieve (SCM k, SCM *v){
+
SCM handle = scm_hashq_get_handle (hash_tab_, k);
if (scm_is_pair (handle))
{
#include "score.hh"
#include <cstdio>
+using namespace std;
#include "book.hh"
#include "cpu-timer.hh"
#include "side-position-interface.hh"
-#include <math.h> // ceil.
+#include <cmath> // ceil.
#include <algorithm>
+using namespace std;
#include "note-head.hh"
#include "warn.hh"
#include "staff-symbol-referencer.hh"
#include "string-convert.hh"
-using namespace std;
-
void
Side_position_interface::add_support (Grob *me, Grob *e)
{
*/
#include <cstdio>
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "paper-column.hh"
#include "spring.hh"
*/
#include <cstdio>
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "libc-extension.hh" // isinf
#include "simple-spacer.hh"
#include "slur-configuration.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "stem.hh"
#include "warn.hh"
Jan Nieuwenhuizen <janneke@gnu.org>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "slur-scoring.hh"
#include "libc-extension.hh"
if (extremes_[d].note_column_)
{
end_ys[d] = dir_
- * max (max (dir_ * (base_attachments_[d][Y_AXIS] + parameters_.region_size_ * dir_),
+ * max (max (dir_ * (base_attachments_[d][Y_AXIS]
+ + parameters_.region_size_ * dir_),
dir_ * (dir_ + extremes_[d].note_column_->extent (common_[Y_AXIS], Y_AXIS)[dir_])),
dir_ * base_attachments_[-d][Y_AXIS]);
}
#include "slur.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "beam.hh"
#include "bezier.hh"
#if HAVE_UTF8_WCHAR_H
#include <utf8/wchar.h> /* mbrtowc */
#else
-#include <wchar.h> /* mbrtowc */
+#include <cwchar> /* mbrtowc */
#endif
#include <cstdio>
#include <strstream>
#define istringstream(x) istrstream (x, length ())
#endif
+using namespace std;
#include "warn.hh"
#include "file-name-map.hh"
return pos_str0_ - contents_str0_;
}
-std::istream *
+istream *
Source_file::get_istream ()
{
if (!istream_)
{
if (length ()) // can-t this be done without such a hack?
- istream_ = new std::istringstream (to_str0 ());
+ istream_ = new istringstream (to_str0 ());
else
{
- istream_ = new std::istringstream ("");
- istream_->setstate (std::ios::eofbit);
+ istream_ = new istringstream ("");
+ istream_->setstate (ios::eofbit);
// istream_->set (ios::eofbit);
}
}
#include "spaceable-grob.hh"
#include <cstdio>
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "warn.hh"
#include "spring.hh"
(c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include <math.h>
+#include <cmath>
#include <cstdio>
+using namespace std;
#include "spacing-spanner.hh"
#include "paper-column.hh"
#include "spanner.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "pointer-group-interface.hh"
#include "libc-extension.hh"
#include "staff-spacing.hh"
#include <cstdio>
+using namespace std;
#include "paper-column.hh"
#include "separation-item.hh"
stem_posns.intersect (bar_size);
Real corr = min (abs (stem_posns.length () / 7.0), 1.0);
- corr
- *= robust_scm2double (me->get_property ("stem-spacing-correction"), 1);
+ corr *= robust_scm2double (me->get_property ("stem-spacing-correction"), 1);
if (d != DOWN)
corr = 0.0;
#include "staff-symbol-referencer.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "staff-symbol.hh"
#include "output-def.hh"
#include "stem.hh"
-#include <math.h> // rint
+#include <cmath> // rint
+using namespace std;
#include "lookup.hh"
#include "directional-element-interface.hh"
if (is_invisible (me))
r.set_empty ();
- else if (unsmob_grob (me->get_object ("beam")) || abs (duration_log (me)) <= 2)
+ else if (unsmob_grob (me->get_object ("beam"))
+ || abs (duration_log (me)) <= 2)
{
r = Interval (-1, 1);
r *= thickness (me) / 2;
(c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "font-metric.hh"
#include "libc-extension.hh"
#include "stencil.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "dimensions.hh"
#include "font-metric.hh"
#include "system-start-delimiter.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "spanner.hh"
#include "axis-group-interface.hh"
#include "system.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "align-interface.hh"
#include "axis-group-interface.hh"
#include <cctype>
#include <cstdio>
+using namespace std;
#include "rhythmic-head.hh"
#include "output-def.hh"
#include "text-interface.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "main.hh"
#include "config.hh"
#include "tie-column.hh"
-#include <math.h>
-#include <map>
+#include <cmath>
#include "skyline.hh"
#include "warn.hh"
#include "directional-element-interface.hh"
#include "tie-column-format.hh"
+using namespace std;
+
void
Tie_column::add_tie (Grob *me, Grob *tie)
{
if (ties.size() == 1)
{
Tie::set_default_control_points (ties[0]);
- return ;
+ return;
}
ties.sort (&Tie::compare);
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "tie.hh"
#include "bezier.hh"
#include "tie.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "spanner.hh"
#include "lookup.hh"
todo: handle breaking elegantly.
*/
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "tuplet-bracket.hh"
#include "line-interface.hh"
#include "vaticana-ligature.hh"
-#include <math.h>
+#include <cmath>
+using namespace std;
#include "item.hh"
#include "font-interface.hh"
*/
#include <cstring>
+using namespace std;
#include "warn.hh"
#include "font-interface.hh"
static PyObject *
midi_error (char const *func, char *s)
{
- char*dest = (char*) malloc (sizeof (char) * (strlen (func) + strlen (s) + 1));
+ char *dest = (char*) malloc (sizeof (char) * (strlen (func) + strlen (s) + 1));
strcpy (dest, func);
strcat (dest, s);
PyErr_SetString (Midi_error, dest);
include $(stepdir)/compile-vars.make
EXTRA_CXXFLAGS= -W -Wall -Wconversion
+#ifeq ($(MY_PATCH_LEVEL),)
+EXTRA_CXXFLAGS += -Werror
+#endif
ALL_CXXFLAGS = $(CXXFLAGS) $(ICFLAGS) $(DEFINES) $(addprefix -I,$(INCLUDES)) $(USER_CFLAGS) $(EXTRA_CFLAGS) $(MODULE_CFLAGS) $($(PACKAGE)_CFLAGS) $($(PACKAGE)_CXXFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS)