]> git.donarmstrong.com Git - lilypond.git/commitdiff
* gcc-3.4 snapshot: 3.4.0 20040215 (prerelease) compile fixes, and
authorjanneke <janneke>
Mon, 23 Feb 2004 13:58:22 +0000 (13:58 +0000)
committerjanneke <janneke>
Mon, 23 Feb 2004 13:58:22 +0000 (13:58 +0000)
stray style cleanups:

* stepmake/stepmake/c++-vars.make (EXTRA_CXXFLAGS): Remove
-Wmissing-prototypes.

* flower/include/killing-cons.tcc (Killing_cons): Add template
specifier for car_.

* flower/include/parray.hh (binsearchs): Add template specifier
for maxkey.

* flower/include/interval.hh: Declare elem () with template specfier.

33 files changed:
ChangeLog
flower/include/drul-array.hh
flower/include/interval.hh
flower/include/interval.tcc
flower/include/killing-cons.tcc
flower/include/parray.hh
flower/include/virtual-methods.hh
lily/include/event.hh
lily/include/grace-music.hh
lily/include/grob.hh
lily/include/item.hh
lily/include/lyric-combine-music.hh
lily/include/midi-def.hh
lily/include/music-list.hh
lily/include/music-output-def.hh
lily/include/music-sequence.hh
lily/include/music-wrapper.hh
lily/include/music.hh
lily/include/paper-column.hh
lily/include/paper-def.hh
lily/include/performer.hh
lily/include/relative-music.hh
lily/include/relative-octave-check.hh
lily/include/repeated-music.hh
lily/include/spanner.hh
lily/include/system.hh
lily/include/time-scaled-music.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/include/transposed-music.hh
lily/include/un-relativable-music.hh
lily/include/untransposable-music.hh
stepmake/stepmake/c++-vars.make

index 04685d0c07518eddd6e448bb4d18bd906b2cf743..acbcfc5804af0891a9d2bdeba8c64a7c83b30a52 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2004-02-23  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * gcc-3.4 snapshot: 3.4.0 20040215 (prerelease) compile fixes, and
+       stray style cleanups:
+
+       * stepmake/stepmake/c++-vars.make (EXTRA_CXXFLAGS): Remove
+       -Wmissing-prototypes.
+
+       * flower/include/killing-cons.tcc (Killing_cons): Add template
+       specifier for car_.
+
+       * flower/include/parray.hh (binsearchs): Add template specifier
+       for maxkey.
+
+       * flower/include/interval.hh: Declare elem () with template specfier.
+
 2004-02-23  Heikki Junes <hjunes@cc.hut.fi>
 
        * elisp/lilypond-indent.el (get-buffer-size): add customization
@@ -24,7 +40,7 @@
 2004-02-22  Heikki Junes <hjunes@cc.hut.fi>
 
        * elisp/lilypond-mode.el (get-buffer-size): define new function,
-       for Emacs >= 20 (Laurent Martelli).
+       for Emacs <= 20 (Laurent Martelli).
 
 2004-02-21  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
index 8599576f6eaae8eb1a60883151de62251e874a47..d537bcb5a04b1fa7cbfa630830ee0400901e564f 100644 (file)
@@ -26,7 +26,6 @@ struct Drul_array
     {
       assert (d==1 || d== -1);
       return array_[ (d+1)/2];
-
     }
   T &operator[] (Direction d)
   {
@@ -43,7 +42,8 @@ struct Drul_array
     return elem (d);
   }
   Drul_array ()
-    {}
+    {
+    }
   Drul_array (T t1, T t2)
     {
       array_[0] = t1;
index eebe675f37ce45e529545cf66dde81aa6d66b62e..25b05ec01e49947b291ffda1ec75da8fabc5b40c 100644 (file)
 #include "real.hh"
 #include "drul-array.hh"
 
-/** a T interval.  this represents the closed interval [left,right].
-  No invariants. T must be a totally ordered ring (with division, anyway ..)
-  At instantiation, the function infinity () has to be defined explicitely.
-  
-  */
+/* A T interval.  This represents the closed interval [left,right].
+   No invariants.  T must be a totally ordered ring (with division, anyway ..)
+   At instantiation, the function infinity () has to be defined explicitely. */
 template<class T>
-struct Interval_t : public Drul_array<T> {
+struct Interval_t : public Drul_array<T>
+{
+  Drul_array<T>::elem;
 
-  /* ************** */
-    
-  static T infinity () ;
+  static T infinity ();
   static String T_to_string (T arg);
-  T center () const {
+  T center () const
+  {
     assert (!is_empty ());
     return (elem (LEFT) + elem (RIGHT)) / T (2);
   }
@@ -45,21 +44,26 @@ struct Interval_t : public Drul_array<T> {
     */
   void unite (Interval_t<T> h);
   void intersect (Interval_t<T> h);
-  void add_point (T p) {
+  void add_point (T p)
+  {
     elem(LEFT) = elem (LEFT) <? p;
     elem(RIGHT) = elem (RIGHT) >? p;
   }
   T length () const;
   T delta () const;
-  void set_empty () ;
+  void set_empty ();
   void set_full ();
 
   /*
     TODO: strip hungarian suffix.
    */
-  bool is_empty () const { return elem (LEFT) > elem (RIGHT); }
+  bool is_empty () const
+  {
+    return elem (LEFT) > elem (RIGHT);
+  }
   bool superset (Interval_t<T> const&) const;
-  Interval_t () {
+  Interval_t ()
+  {
     set_empty ();
   }
   Interval_t (T m, T M) : Drul_array<T> (m,M)
@@ -87,21 +91,22 @@ struct Interval_t : public Drul_array<T> {
     return *this;
   }
 
-  Real linear_combination (Real x) const {
-    Drul_array<Real> da (elem (LEFT),
-                        elem (RIGHT));
+  Real linear_combination (Real x) const
+  {
+    Drul_array<Real> da (elem (LEFT), elem (RIGHT));
     return ::linear_combination (da, x);
   }
-  String to_string () const;    
+  String to_string () const;
 
   bool contains (T r);
-  void negate () {
+  void negate ()
+  {
     T r = -elem (LEFT);
     T l = -elem (RIGHT);
     elem (LEFT) = l;
     elem (RIGHT) =r;
   }
-  
+
   void swap ()
   {
     T t = elem (LEFT);
index 2060c92ae74f28111964e498d9d1669be6be6ba1..e3d0f36a7471e0608b7473d4b01aa4177160c28f 100644 (file)
@@ -75,7 +75,7 @@ Interval_t<T>::length () const
   if (elem (RIGHT) <= elem (LEFT)) 
     return 0;
   else 
-    return elem (RIGHT)-elem (LEFT);
+    return elem (RIGHT) - elem (LEFT);
 }
 
 template<class T>
@@ -85,32 +85,22 @@ Interval_t<T>::delta () const
   return elem (RIGHT) - elem (LEFT);
 }
 
-/**
-  smallest Interval which includes *this and #h#
- */
+/* smallest Interval which includes *this and #h#  */
 template<class T>
 void
 Interval_t<T>::unite (Interval_t<T> h)
 {
   elem (LEFT) = h.elem (LEFT) <? elem (LEFT);
-  elem (RIGHT) = h.elem (RIGHT) >?elem (RIGHT);
-
-#if 0
-  if (h.elem (LEFT)<elem (LEFT))
-    elem (LEFT) = h.elem (LEFT);
-  if (h.elem (RIGHT)>elem (RIGHT))
-  elem (RIGHT) = h.elem (RIGHT);
-#endif
+  elem (RIGHT) = h.elem (RIGHT) >? elem (RIGHT);
 }
 
-
 template<class T>
 void
 Interval_t<T>::intersect (Interval_t<T> h)
 {
-#if defined (__GNUG__) && ! defined (__STRICT_ANSI__)
+#if defined (__GNUG__) && !defined (__STRICT_ANSI__)
   elem (LEFT) = h.elem (LEFT) >? elem (LEFT);
-  elem (RIGHT) = h.elem (RIGHT) <?elem (RIGHT);
+  elem (RIGHT) = h.elem (RIGHT) <? elem (RIGHT);
 #else
   elem (LEFT) = max (h.elem (LEFT), elem (LEFT));
   elem (RIGHT) = min (h.elem (RIGHT), elem (RIGHT));
@@ -133,7 +123,8 @@ Interval_t<T>::to_string () const
     return "[empty]";
   String s ("[");
  
-  return s + T_to_string (elem (LEFT)) + String ("," ) + T_to_string (elem (RIGHT) ) + String ("]" );
+  return (s + T_to_string (elem (LEFT)) + String ("," )
+         + T_to_string (elem (RIGHT) ) + String ("]" ));
 }
 
 template<class T>
@@ -143,8 +134,7 @@ Interval_t<T>::contains (T r)
   return r >= elem (LEFT) && r <= elem (RIGHT);
 }
 
-
 #define INTERVAL__INSTANTIATE(T) struct Interval_t<T>;\
-template  int Interval__compare (const Interval_t<T>&,Interval_t<T> const&)
+template int Interval__compare (const Interval_t<T>&,Interval_t<T> const&)
 
 #endif // INTERVAL_TCC
index ebf78d66b85714ca6647716f219717fee5974fbf..c02c35ad3bcfa26765c41c81855127282704b0fe 100644 (file)
@@ -15,7 +15,7 @@
 template<class T>
 Killing_cons<T>::~Killing_cons ()
 {
-  delete car_;
+  delete Cons<T>::car_;
 }
 
 template<class T>
index e37a316503cdf6ba5376e3c26f453439ce203f43..f70d2197b29915a938db8709926d2dbe89374683 100644 (file)
@@ -242,7 +242,7 @@ binsearchs (Array<T> const &arr, T t, int (*compare) (T const&,T const&))
   int cmp;
   int result;
   lo = 0;
-  hi = maxkey;
+  hi = Array<T>::maxkey;
 
   /* binary search */
   do
index 6d4d84087941e3074c59775e00464d736d7de4c7..d466eee89f3c782d624ef8306e8a07223e9478a2 100644 (file)
 const char *
 demangle_classname (std::type_info const &);
 
-/**
+/* Virtual copy constructor.  Make up for C++'s lack of a standard
+   factory or clone () function.  Uses a typeof hack.  Usage:
 
-   Virtual copy constructor. Make up for C++'s lack of a standard
-   clone () function.  Uses a typeof hack.  Usage:
+   class Foo : Baseclass
+   {
+      VIRTUAL_COPY_CONSTRUCTOR (Baseclass, Foo);
+   }; */
 
-   class Foo : Baseclass {
-       VIRTUAL_COPY_CONS (Baseclass);
-   };
-   
- */
-
-/*
-  fix constness: gcc-2.95 is correct in defining
-  
-    typeof (*this)
-    
-  in a const member function to be const
-*/
-#define VIRTUAL_COPY_CONS(base) \
+#define VIRTUAL_COPY_CONSTRUCTOR(base, name) \
+  /* Hack to fix constness: gcc >= 2.95 is correct in defining \
+     typeof (*this) in a const member function to be const.  */ \
   virtual base* clone_const_helper () \
     { \
-      return new typeof (*this) (*this); \
+      return new name (*this); \
     } \
-  virtual baseclone () const \
+  virtual base *clone () const \
     { \
-      base* urg = (base*)this; \
+      /* return new name (*this); */ \
+      base *urg = (base*) this; \
       return urg->clone_const_helper (); \
     }
 
-
 #endif /* VIRTUAL_METHODS_HH */
index c8d8795284de688889209d018d84da0e1abc3c12..25e5210adc611bfb58290746d778e438dc2848d6 100644 (file)
 #include "duration.hh"
 #include "pitch.hh"
 
-/** An atom of musical information.  This is an abstract class for any
-  piece of music that does not contain other Music.
-  
-
- */
-class Event : public Music {
+/* An atom of musical information.  This is an abstract class for any
+  piece of music that does not contain other Music.  */
+class Event : public Music
+{
 public:
   Event ();
-  VIRTUAL_COPY_CONS (Music);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Event);
   virtual void compress (Moment);
   virtual void transpose (Pitch);
   virtual Moment get_length () const;
@@ -43,7 +41,7 @@ public:
   SCM pitch_alist ();
   
 protected:
-  VIRTUAL_COPY_CONS (Music);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Key_change_ev);
   void transpose (Pitch  d);
 };
 
index 273fefebe718a441b40bbd16956d0da078e2639c..58548fe4ac23a9d3146b0408ba89edab1ef5324e 100644 (file)
@@ -15,7 +15,7 @@
 class Grace_music : public Music_wrapper
 {
 public:
-  VIRTUAL_COPY_CONS (Music);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Grace_music);
   Grace_music ();
 protected:
   virtual Moment get_length () const;
index ce4c00264a23c18c6807d8cb9dd8b7d1e4e31d04..fbe0211c989dd9d2962ced865c91269a7e2dcac3 100644 (file)
@@ -32,16 +32,16 @@ enum Grob_status {
 typedef void (Grob::*Grob_method_pointer) (void);
 
 
-/*
-   Basic output object.
-*/
-class Grob  {
+/* Basic G[raphical output] O[bject].  */
+class Grob
+{
 protected:
   SCM immutable_property_alist_;
   SCM mutable_property_alist_;
   friend class Spanner;
   
   void substitute_mutable_properties(SCM,SCM);
+
 public:
   Grob *original_;
 
@@ -64,6 +64,8 @@ public:
 
   Grob (SCM basic_props);
   Grob (Grob const&);
+  VIRTUAL_COPY_CONSTRUCTOR (Grob, Grob);
   String name () const;
   
   /*
@@ -88,8 +90,6 @@ public:
   void add_dependency (Grob*);    
   virtual System * get_system () const;
 
-  VIRTUAL_COPY_CONS (Grob);
   /**
      Recursively track all dependencies of this Grob.  The
      status_ field is used as a mark-field.  It is marked with
index d4467732444a1937fb004f95a93591854b6d9a91..3b728beb032c30d0ca9647f13678fa5824baeea0 100644 (file)
@@ -26,9 +26,9 @@ class Item : public Grob
   Drul_array<Item*> broken_to_drul_;
 
 public:
-  VIRTUAL_COPY_CONS (Grob);
   Item (SCM);
   Item (Item const &);
+  VIRTUAL_COPY_CONSTRUCTOR (Grob, Item);
 
   static bool is_breakable (Grob *);
   bool is_broken () const;
index a64f42c69416d542a301d78669d2afa691988439..566dc9a93f735b75eeb836eb27a9ee89badd55ed 100644 (file)
@@ -9,19 +9,18 @@
 
 #ifndef LYRIC_COMBINE_MUSIC_HH
 #define LYRIC_COMBINE_MUSIC_HH
-#include "music.hh"
 
+#include "music.hh"
 
 class Lyric_combine_music : public Music
 {
 public:
-  Music * get_music () const;
-  Music * get_lyrics () const;
-  
   Lyric_combine_music ();
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Lyric_combine_music);
 
-  VIRTUAL_COPY_CONS (Music);
+  Music *get_music () const;
+  Music *get_lyrics () const;
   virtual Moment get_length () const;
 };
-#endif /* LYRIC_COMBINE_MUSIC_HH */
 
+#endif /* LYRIC_COMBINE_MUSIC_HH */
index 514f0cc5850ffe0b80d6805c3344205fbb3ffb9b..c919a8760685dfda5824951e4e4656eb39048889 100644 (file)
 /** 
   definitions for midi output. Rather empty
  */
-class Midi_def : public Music_output_def {
+class Midi_def : public Music_output_def
+{
   static int score_count_;
 
 public:
-  VIRTUAL_COPY_CONS (Music_output_def);
-
   Midi_def ();
+  VIRTUAL_COPY_CONSTRUCTOR (Music_output_def, Midi_def);
 
   int get_tempo (Moment moment);
   void set_tempo (Moment moment, int count_per_minute_i);
 };
 
-#endif // MIDI_DEF_HH
+#endif /* MIDI_DEF_HH */
index e9fc937584a8812e35f2b57210f36a8ff1d9350c..c77cccd70f25f77237b5f9a6e86015d2de80d4a1 100644 (file)
@@ -1,6 +1,5 @@
 /*
-  music-list.hh -- declare Music_sequence,
-  Simultaneous_music and Sequential_music
+  music-list.hh -- declare Simultaneous_music, Sequential_music, Event_chord
 
   source file of the GNU LilyPond music typesetter
 
@@ -8,8 +7,8 @@
 */
 
 
-#ifndef Music_sequence_HH
-#define Music_sequence_HH
+#ifndef MUSIC_LIST_HH
+#define MUSIC_LIST_HH
 
 #include "music-sequence.hh"
 
 class Simultaneous_music : public Music_sequence
 {
 public:
-  VIRTUAL_COPY_CONS (Music);
+  Simultaneous_music ();
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Simultaneous_music);
+
   virtual Pitch to_relative_octave (Pitch);
   virtual Moment get_length () const;
   virtual Moment start_mom () const;
-  Simultaneous_music ();
 };
 
 /*
@@ -32,7 +32,7 @@ public:
 class Event_chord : public Simultaneous_music
 {
 public:
-  VIRTUAL_COPY_CONS (Music);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Event_chord);
   virtual Pitch to_relative_octave (Pitch);
 };
 
@@ -42,11 +42,11 @@ public:
 class Sequential_music : public Music_sequence
 {
 public:
-  VIRTUAL_COPY_CONS (Music);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Sequential_music);
   virtual Moment get_length () const;
   virtual Moment start_mom () const;
   
   Sequential_music ();
 };
 
-#endif // Music_sequence_HH
+#endif /* MUSIC_LIST_HH */
index 9a6e2d48448f63926b6972c5d1cb8eefbd1ce69f..3160e65a4b3243a551a72f82819e29062ec291b7 100644 (file)
@@ -27,17 +27,17 @@ public:
   SCM scope_;
   SCM scaled_fonts_;
   
-  VIRTUAL_COPY_CONS (Music_output_def);
   Music_output_def (Music_output_def const&);
   Music_output_def ();
+  VIRTUAL_COPY_CONSTRUCTOR (Music_output_def, Music_output_def);
 
   Context *get_group_translator (String type) const;
   void assign_translator (SCM transdef);
   SCM find_context_def (SCM name) const;
   String outname_string () ;
   SCM get_scmvar (String id)const;
-  SCM lookup_variable  (SCM sym) const;
-  void set_variable  (SCM, SCM sym);
+  SCM lookup_variable (SCM sym) const;
+  void set_variable (SCM, SCM sym);
   
   DECLARE_SMOBS (Music_output_def,);
 };
index beed7d3ada4ce5c654624b90ee7638727716c685..01753fd41ab6d7d1bfe4965647dabd8fbcad1708 100644 (file)
@@ -18,9 +18,10 @@ class Music_sequence : public Music
 public:
   Music_sequence (SCM h);
   Music_sequence ();
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Music_sequence);
+
   SCM music_list () const;
   void append_music (Music *);
-  VIRTUAL_COPY_CONS (Music);
   
   Pitch do_relative_octave (Pitch p, bool b);
   
index aa7b53937a414bfe3d77fc9c0ee8c889f764cf71..ac7483f0ff803e4568b13151657a2a22942a3912 100644 (file)
@@ -23,15 +23,12 @@ class Music_wrapper : public Music
 {
 public:
   Music_wrapper ();
-  Music * element () const;
-  
-  VIRTUAL_COPY_CONS (Music);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Music_wrapper);
+
+  Music *element () const;
   virtual Moment get_length () const;
   virtual Moment start_mom () const;
 };
 
-
-
-
 #endif /* MUSIC_WRAPPER_HH */
 
index a7e3e804eb1d262023723ff5e78e712f9bf864a8..8d96b195c6f465cba7ef2434792ead22bf1c9478 100644 (file)
 
   TODO: make a equalp function for general music. 
   */
-class Music {
+class Music
+{
 public:
+  Music ();
+  Music (Music const &m);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Music);
+
   Input *origin () const; 
   void set_spot (Input);  
 
@@ -45,7 +50,7 @@ public:
   bool internal_is_music_type (SCM) const;
   
   virtual Pitch to_relative_octave (Pitch);
-  String name ()const;
+  String name () const;
   /// The duration of this piece of music
   virtual Moment get_length () const;
   virtual Moment start_mom () const;
@@ -55,9 +60,7 @@ public:
 
   /// Scale the music in time by #factor#.
   virtual void compress (Moment factor);
-  VIRTUAL_COPY_CONS (Music);
-  Music ();
-  Music (Music const &m);
+  
 protected:
   DECLARE_SMOBS (Music,);
   SCM immutable_property_alist_;
index 7275af9fd94ef13000a3e4b29208541675225db7..935e7b8fe416611711395edf0c00368b0faa48e8 100644 (file)
 class Paper_column : public Item
 { 
 public:
-  VIRTUAL_COPY_CONS (Grob);
+  int  rank_;
+  /// if lines are broken then this column is in #line#
+  System *system_;
+
+  Paper_column (SCM);
+  VIRTUAL_COPY_CONSTRUCTOR (Grob, Paper_column);
 
   static bool has_interface (Grob*);
-  int  rank_;
   virtual void do_break_processing ();
   virtual Paper_column *get_column () const;
   virtual System *get_system () const;
   
-  /// if lines are broken then this column is in #line#
-  System *system_;
-
   static int get_rank (Grob*);
 
-  DECLARE_SCHEME_CALLBACK(print, (SCM));
-  DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM));
+  DECLARE_SCHEME_CALLBACK (print, (SCM));
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
   
-  Paper_column (SCM);
   static bool is_musical (Grob *);
   static Moment when_mom (Grob*);
 
index a95c307c72b6137d25b244ea47fe673ef11f0727..aad477aaf43c3ffa8c0573ba5c7fa9eba15fe0da 100644 (file)
@@ -46,7 +46,7 @@
 class Paper_def : public Music_output_def 
 {
 protected:
-  VIRTUAL_COPY_CONS (Music_output_def);
+  VIRTUAL_COPY_CONSTRUCTOR (Music_output_def, Paper_def);
 
 public:    
   Paper_outputter* get_paper_outputter (String)  const;
index 04ecba2d55ba53000b4de993ee61fd5b827c09c2..40e5695f597d62e309ed05d711cc4afe58802a71 100644 (file)
 #include "grob-info.hh"
 #include "translator.hh"
 
-/**
-  Convert a music definition into a audio representation.
-  A baseclass
- */
+/* Convert a music definition into a audio representation.
+   A baseclass.  */
 class Performer : public virtual Translator
 {
 public:
-  VIRTUAL_COPY_CONS (Translator);
+  VIRTUAL_COPY_CONSTRUCTOR (Translator, Performer);
   friend class Performer_group_performer;  
   Performer_group_performer* get_daddy_performer () const;
 
@@ -34,5 +32,5 @@ protected:
 };
 
 
-#endif // PERFORMER_HH
+#endif /* PERFORMER_HH */
 
index aca53b64ee46453f70ac3e2cc6b9191ee5bbc988..eebc43e4f120af2247072584b95860ca7eac8264 100644 (file)
@@ -16,8 +16,8 @@ class Relative_octave_music : public Music_wrapper
 {
 public:
   Relative_octave_music ();
-  
-  VIRTUAL_COPY_CONS (Music);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Relative_octave_music);
+
   virtual Pitch to_relative_octave (Pitch);
 };
 
index b6ac316523d07d06d13c290ca3fb6ed5ea7f58ae..72cf3e2a1268a2f503cc8bc5f57fc4ad368f16a7 100644 (file)
 class Relative_octave_check : public Music
 {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Relative_octave_check);
+
   virtual Pitch to_relative_octave (Pitch);
 };
 
-
-#endif /* RELATIVE_MUSIC_HH */
+#endif /* RELATIVE_OCTAVE_CHECK_HH */
 
 
index d2d5ae387ebe2c46b8e9cad87da32a929e0645b8..e84b1d2fbc8e9f1be45439e644cc8b587d6bb52b 100644 (file)
@@ -7,8 +7,8 @@
   
  */
 
-#ifndef RepEATED_MUSIC_HH
-#define RepEATED_MUSIC_HH
+#ifndef REPEATED_MUSIC_HH
+#define REPEATED_MUSIC_HH
 
 #include "music.hh"
 
 class Repeated_music : public Music
 {
 public:
-  Music * body () const;
+  Repeated_music ();
+  Repeated_music (SCM);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Repeated_music);
+
+  Music *body () const;
   SCM alternatives () const;
 
-  /// how often do we repeat?
-  int repeat_count ( ) const;
+  /* How often do we repeat? */
+  int repeat_count () const;
   virtual Pitch to_relative_octave (Pitch);
 
   Moment body_get_length () const;
@@ -65,11 +69,7 @@ public:
   DECLARE_SCHEME_CALLBACK (folded_music_length, (SCM));    
   DECLARE_SCHEME_CALLBACK (minimum_start, (SCM));
   DECLARE_SCHEME_CALLBACK (first_start, (SCM));    
-  
-  VIRTUAL_COPY_CONS (Music);
-  Repeated_music ();
-  Repeated_music (SCM);
 };
 
 
-#endif /* RepEATED_MUSIC_HH */
+#endif /* REPEATED_MUSIC_HH */
index f6634e29f3ac6a4fc5d5e58f57efbd03c244a36e..f04c3aca5651dadc4a435469ce13d8ddc1e50c4e 100644 (file)
@@ -59,10 +59,11 @@ public:
   virtual SCM do_derived_mark () const;
   static bool has_interface (Grob*);
   virtual System *get_system () const;
+
 protected:
   void set_my_columns ();
 
-  VIRTUAL_COPY_CONS (Grob);
+  VIRTUAL_COPY_CONSTRUCTOR (Grob, Spanner);
   virtual void do_break_processing ();
 };
 
index 8f1506a78e1f0b787c2fde25bbeb5908e0962efc..a9b24b6f2c4497cb3d6672bb4de615d294f28665 100644 (file)
@@ -42,8 +42,9 @@ public:
   void output_stencil (SCM, Offset);
   void output_scheme (SCM);
   void pre_processing ();
+
 protected:
-  VIRTUAL_COPY_CONS (Grob);
+  VIRTUAL_COPY_CONSTRUCTOR (Grob, System);
 };
 
 #endif /* SYSTEM_HH */
index bb900be40aca1daeb0898973dddc9f39558826f6..efc62bb1bde168a55278a7a2f86c8f38463747c0 100644 (file)
@@ -1,5 +1,5 @@
 /*   
-  compressed-music.hh -- declare Time_scaled_music
+  time-scaled-music.hh -- declare Time_scaled_music
   
   source file of the GNU LilyPond music typesetter
   
@@ -7,8 +7,8 @@
   
  */
 
-#ifndef Time_scaled_music_HH
-#define Time_scaled_music_HH
+#ifndef TIME_SCALED_MUSIC_HH
+#define TIME_SCALED_MUSIC_HH
 
 #include "music-wrapper.hh"
 /**
 class Time_scaled_music : public Music_wrapper
 {
 public:
-  Time_scaled_music (SCM);
   Time_scaled_music ();
-  
-  VIRTUAL_COPY_CONS (Music);
+  Time_scaled_music (SCM);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Time_scaled_music);
 };
 
-#endif /* Time_scaled_music_HH */
+#endif /* TIME_SCALED_MUSIC_HH */
 
index b302aefcdb8cd0a19eed19b5651eafa58710bd63..f0ec7b3e2b4994289a38c4666b00e0cf6562bff3 100644 (file)
 
 typedef void (Translator::*Translator_method) (void);
 
-class Translator_group : public virtual Translator {
-protected:
-  
-public:
-  VIRTUAL_COPY_CONS (Translator);
-
+class Translator_group : public virtual Translator
+{
 public:
+  VIRTUAL_COPY_CONSTRUCTOR (Translator, Translator_group);
   virtual Translator_group* get_daddy_translator ()const;
   virtual SCM get_simple_trans_list ();
   virtual bool try_music (Music* req);       
index 923cf2f639504d651d22f37274298d1fcb6cf97d..de406a3db4c91ca58229bf76336a3e9fedd20427 100644 (file)
@@ -23,8 +23,8 @@
 
 #define TRANSLATOR_DECLARATIONS(NAME)                  \
 public:                                                        \
-  NAME();\
-  VIRTUAL_COPY_CONS (Translator);                              \
+  NAME ();                                             \
+  VIRTUAL_COPY_CONSTRUCTOR (Translator, NAME);         \
   static SCM static_description_;                      \
   virtual SCM static_translator_description () const;  \
   virtual SCM translator_description () const;
@@ -49,9 +49,11 @@ public:
 
 public:
   DECLARE_SMOBS (Translator, dummy);
+
 protected:                     // should be private.
   SCM simple_trans_list_;
   friend class Context_def;
+
 public:
   Score_context * get_score_context () const;
   Global_context * get_global_context () const;
index b5723860f95e3151c947db9e528ad90b6dc5d004..d355fb045a6a8d39a47b2da131bf3b673570846a 100644 (file)
 #ifndef TRANSPOSED_MUSIC_HH
 #define TRANSPOSED_MUSIC_HH
 
-
 #include "music-wrapper.hh"
 
 class Transposed_music : public Music_wrapper
 {
 public:
-  Transposed_music (SCM);
   Transposed_music ();
-  
-  
-  VIRTUAL_COPY_CONS (Music);
+  Transposed_music (SCM);
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Transposed_music);
+
   virtual Pitch to_relative_octave (Pitch);
 };
 
index 8f4eff56b29d68b78f12f0bc5082ba8917d0e816..b927a8a133a5a1094d6aff06fc4a4b53f32bf7ce 100644 (file)
@@ -1,5 +1,5 @@
 /*   
-  un-relativable-music.hh -- declare 
+  un-relativable-music.hh -- declare Un_relativable_music
   
   source file of the GNU LilyPond music typesetter
   
@@ -16,10 +16,10 @@ class Un_relativable_music: public Music_wrapper
 {
 public:
   Un_relativable_music ();
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Un_relativable_music);
+
   Pitch to_relative_octave (Pitch);
-  VIRTUAL_COPY_CONS(Music);
 };
 
-
 #endif /* UN_RELATIVABLE_MUSIC_HH */
 
index 465acc3dc3b1db6acfd16d1017d219e01e6b2f37..f5a4a9f5db9ba3974b17240d02b105e4d2b6a3b5 100644 (file)
@@ -1,24 +1,25 @@
-
 /*   
-untransposable-music.hh -- declare 
+  untransposable-music.hh -- declare Untransposable_music
 
-source file of the GNU LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
 
-(c) 2001--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2001--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
  */
 
 #ifndef UNTRANSPOSABLE_MUSIC_HH
 #define UNTRANSPOSABLE_MUSIC_HH
+
 #include "music-wrapper.hh"
 
 class Untransposable_music : public Music_wrapper
 {
 public:
   Untransposable_music ();
+  VIRTUAL_COPY_CONSTRUCTOR (Music, Untransposable_music);
+
   virtual Pitch to_relative_octave (Pitch);
   virtual void transpose (Pitch); 
-  VIRTUAL_COPY_CONS(Music);
 };
 
 
index 901e041b6bf316bd17e9a58606b3d885140ac721..3f8c5803a69d5a9dfbe2246a5c04a15743c11d87 100644 (file)
@@ -4,9 +4,10 @@ include $(stepdir)/compile-vars.make
 # added two warnings that are treated by cygwin32's gcc 2.7.2 as errors.
 # huh, but still, no warnings even provoced with linux's gcc 2.7.2.1?
 
-# -pipe makes it go faster, but is not supported on all platforms. 
+# -pipe makes it go faster, but is not supported on all platforms.
+# how much faster -- would this warrant configure check?
 # EXTRA_CXXFLAGS= -Wall -Winline -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
-EXTRA_CXXFLAGS= -Wall  -W -Wmissing-prototypes -Wconversion
+EXTRA_CXXFLAGS= -W -Wall -Wconversion
 
 ALL_CXXFLAGS = $(CXXFLAGS) $(ICFLAGS) $(DEFINES) $(addprefix -I,$(INCLUDES)) $(USER_CFLAGS) $(EXTRA_CFLAGS) $(MODULE_CFLAGS) $($(PACKAGE)_CFLAGS) $($(PACKAGE)_CXXFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS)