From: fred Date: Sun, 24 Mar 2002 20:12:25 +0000 (+0000) Subject: lilypond-1.0.1 X-Git-Tag: release/1.5.59~3061 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=09701e2f97d4ad544c7c3b5846b3b080f6378d1d;p=lilypond.git lilypond-1.0.1 --- diff --git a/flower/axis.cc b/flower/axis.cc index 92a1dea001..73b8a8ec1a 100644 --- a/flower/axis.cc +++ b/flower/axis.cc @@ -3,18 +3,16 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include - #include "axes.hh" -#include "string.hh" String axis_name_str (Axis a) { - return String (char(a + 'x')); + return to_str (char(a + 'x')); } /* diff --git a/flower/choleski.cc b/flower/choleski.cc index 5793fceae4..8fa18c67f5 100644 --- a/flower/choleski.cc +++ b/flower/choleski.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "choleski.hh" diff --git a/flower/cpu-timer.cc b/flower/cpu-timer.cc index a4d79a3776..f0b49b5c72 100644 --- a/flower/cpu-timer.cc +++ b/flower/cpu-timer.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "cpu-timer.hh" diff --git a/flower/data-file.cc b/flower/data-file.cc index 5a273c5dbb..996752cfce 100644 --- a/flower/data-file.cc +++ b/flower/data-file.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) '95, '96, '97 Han-Wen Nienhuys + (c) '95, '96, '97 Han-Wen Nienhuys */ #include @@ -18,8 +18,8 @@ Data_file::gobble_white() char c; while ((c=data_get()) == ' ' ||c == '\t') - if (eof()) - break; + if (eof_b()) + return; data_unget (c); } @@ -32,8 +32,11 @@ Data_file::get_word() while (1) { char c = data_get(); + + if (eof_b ()) + break; - if (isspace (c) || eof()) + if (isspace (c)) { data_unget (c); break; @@ -45,16 +48,16 @@ Data_file::get_word() rawmode= true; while ((c = data_get()) != '\"') - if (eof()) - error (_("EOF in a string")); + if (eof_b ()) + error (_ ("EOF in a string")); else - s += c; + s += to_str (c); rawmode= false; } else - s += c; + s += to_str (c); } return s; @@ -64,11 +67,12 @@ Data_file::get_word() Only class member who uses text_file::get */ char -Data_file::data_get() { +Data_file::data_get() +{ char c = get(); if (!rawmode && c == '#') // gobble comment { - while ((c = get()) != '\n' && !eof ()) + while (!eof_b () && (c = get()) != '\n') ; return '\n'; } @@ -77,13 +81,14 @@ Data_file::data_get() { } /// read line, gobble '\n' -String Data_file::get_line() +String +Data_file::get_line() { char c; String s; - while ((c = data_get()) != '\n' && !eof ()) - s += c; + while (!eof_b () && (c = data_get()) != '\n') + s += to_str (c); return s; } @@ -92,7 +97,7 @@ void Data_file::gobble_leading_white() { // eat blank lines. - while (!eof()) + while (!eof_b ()) { char c = data_get(); if (!isspace (c)) @@ -102,3 +107,40 @@ Data_file::gobble_leading_white() } } } + +Data_file::Data_file (String s) + : Text_stream (s) +{ + //*mlog << "(" << s << flush; + rawmode= false; +} + +void +Data_file::warning (String s) +{ + message (_ ("warning: ") + s); +} + +void +Data_file::error (String s) +{ + message (s); + exit (1); +} + +String +Data_file::gulp () +{ + String s; + + while (!eof_b ()) + { + s += to_str (data_get ()); + } + return s; +} + + +Data_file::~Data_file () +{ +} diff --git a/flower/dictionary.cc b/flower/dictionary.cc index d8e50282cb..3f46028fa8 100644 --- a/flower/dictionary.cc +++ b/flower/dictionary.cc @@ -3,7 +3,9 @@ /** - neuk. hsearch_* is te dom. + Dictionary implementation. Please fix me. + + (neuk. hsearch_* is te dom.) */ template class Dictionary diff --git a/flower/directed-graph.cc b/flower/directed-graph.cc index 5c61a41963..b3525e7156 100644 --- a/flower/directed-graph.cc +++ b/flower/directed-graph.cc @@ -3,7 +3,7 @@ source file FlowerLib - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "directed-graph.hh" @@ -38,7 +38,7 @@ void Directed_graph_node::copy_edges_out (Directed_graph_node const &s) { for (int i=0; i < s.edge_out_l_arr_.size(); i++) - add (s.edge_out_l_arr_[i]); + add_edge (s.edge_out_l_arr_[i]); } void @@ -132,12 +132,12 @@ Directed_graph_node::unlink() Directed_graph_node::~Directed_graph_node() { - assert (!linked_b()); + // assert (!linked_b()); // hampered by memfrobbing } void -Directed_graph_node::add (Directed_graph_node* dep_l) +Directed_graph_node::add_edge (Directed_graph_node* dep_l) { PARANOID_OK(); if (!dep_l) diff --git a/flower/dstream.cc b/flower/dstream.cc index 7857d33338..fc15680d92 100644 --- a/flower/dstream.cc +++ b/flower/dstream.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include @@ -13,6 +13,7 @@ #include "text-db.hh" #include "string-convert.hh" #include "assoc-iter.hh" +#include "rational.hh" /// indent of each level const INDTAB = 2; @@ -79,23 +80,23 @@ Dstream::silent_b (String s) const } Dstream & -Dstream::operator<<(String s) +Dstream::operator<<(void const *v_l) { - output (s); + output (String_convert::pointer_str (v_l)); return *this; } Dstream & -Dstream::operator<<(void const *v_l) +Dstream::operator <<(Scalar s) { - output (String_convert::pointer_str (v_l)); + output (s); return *this; } Dstream & -Dstream::operator<<(char const *ch_l) +Dstream::operator <<(const char * s) { - output (ch_l); + output (String (s)); return *this; } @@ -124,7 +125,7 @@ Dstream::output (String s) break; case '\n': - *os_l_ << '\n' << String (' ', indent_level_i_) << flush; + *os_l_ << '\n' << to_str (' ', indent_level_i_) << flush; break; default: *os_l_ << *cp; @@ -145,17 +146,17 @@ Dstream::Dstream (ostream *r, char const * cfg_nm) char const * fn =cfg_nm ? cfg_nm : ".dstreamrc"; { - ifstream ifs (fn); // can't open + ifstream ifs (fn); // can 't open if (!ifs) return; } Text_db cfg (fn); - while (! cfg.eof()){ + while (!cfg.eof_b ()){ Text_record r (cfg++); if (r.size() != 2) { - r.message (_("not enough fields in Dstream init.")); + r.message (_ ("Not enough fields in Dstream init.")); continue; } (*silent_assoc_p_)[r[0]] = (bool)(int)(Scalar (r[1])); @@ -180,3 +181,4 @@ Dstream::clear_silence() i.val() = false; } } + diff --git a/flower/full-storage.cc b/flower/full-storage.cc index 4fc5605cfb..987a98ec04 100644 --- a/flower/full-storage.cc +++ b/flower/full-storage.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "full-storage.hh" diff --git a/flower/include/acursor.hh b/flower/include/acursor.hh index d49dbd6b4e..5bb488d4db 100644 --- a/flower/include/acursor.hh +++ b/flower/include/acursor.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/arithmetic-operator.hh b/flower/include/arithmetic-operator.hh index 4a472819e3..17e67a47d4 100644 --- a/flower/include/arithmetic-operator.hh +++ b/flower/include/arithmetic-operator.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/axes.hh b/flower/include/axes.hh index 786e5157b7..1b54089c17 100644 --- a/flower/include/axes.hh +++ b/flower/include/axes.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/cpu-timer.hh b/flower/include/cpu-timer.hh index 65def573e5..f9d020dc46 100644 --- a/flower/include/cpu-timer.hh +++ b/flower/include/cpu-timer.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/cursor.icc b/flower/include/cursor.icc index a000736b1e..416faa52e8 100644 --- a/flower/include/cursor.icc +++ b/flower/include/cursor.icc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/data-file.hh b/flower/include/data-file.hh index f371c39092..56894ab50b 100644 --- a/flower/include/data-file.hh +++ b/flower/include/data-file.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -20,7 +20,7 @@ public: bool rawmode; Text_stream::line; - Text_stream::eof; + Text_stream::eof_b; Text_stream::get_name; char data_get(); @@ -39,21 +39,15 @@ public: /// gobble empty stuff before first field. void gobble_leading_white(); - Data_file (String s) : Text_stream (s) { - //*mlog << "(" << s << flush; - rawmode= false; - } - - ~Data_file() { - // *mlog << ")"< + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/dictionary.hh b/flower/include/dictionary.hh index 2e16bed201..b25fc84b49 100644 --- a/flower/include/dictionary.hh +++ b/flower/include/dictionary.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/directed-graph.hh b/flower/include/directed-graph.hh index 33c9e4ee23..af898a4028 100644 --- a/flower/include/directed-graph.hh +++ b/flower/include/directed-graph.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -29,7 +29,7 @@ public: bool linked_b() const; void unlink(); void junk_links(); - void add (Directed_graph_node*); + void add_edge (Directed_graph_node*); void remove_edge_in (Directed_graph_node *); void remove_edge_out (Directed_graph_node*); bool contains_b (Directed_graph_node const*) const; diff --git a/flower/include/dstream.hh b/flower/include/dstream.hh index c1c04f3921..a7379268eb 100644 --- a/flower/include/dstream.hh +++ b/flower/include/dstream.hh @@ -3,13 +3,14 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef DSTREAM_HH #define DSTREAM_HH #include "string.hh" +#include "scalar.hh" const char eol= '\n'; @@ -41,6 +42,7 @@ class Dstream String current_classname_str_; void output (String s); Assoc *silent_assoc_p_; + public: void clear_silence(); bool silent_b (String) const; @@ -52,9 +54,12 @@ public: virtual ~Dstream(); Dstream &identify_as (String s); - /** Output a string via the Dstream. This is the only output - interface. It delegates all conversion to String class. */ - Dstream &operator << (String s); + /** + Output a Scalar via the Dstream. This is the only output + interface. It explicitely delegates all implicit conversion + to Scalar class. + */ + Dstream &operator << (Scalar); /** Output memory locations. */ diff --git a/flower/include/file-path.hh b/flower/include/file-path.hh index 67d3129f10..d5fed491ff 100644 --- a/flower/include/file-path.hh +++ b/flower/include/file-path.hh @@ -3,13 +3,13 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef PATH_HH #define PATH_HH #include "string.hh" -#include "varray.hh" +#include "array.hh" /** diff --git a/flower/include/flower-debug.hh b/flower/include/flower-debug.hh index 5c8138e946..16bc73a007 100644 --- a/flower/include/flower-debug.hh +++ b/flower/include/flower-debug.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/full-storage.hh b/flower/include/full-storage.hh index 4d68e12828..f9de76979c 100644 --- a/flower/include/full-storage.hh +++ b/flower/include/full-storage.hh @@ -3,14 +3,14 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef FULL_STORAGE_HH #define FULL_STORAGE_HH -#include "varray.hh" +#include "array.hh" #include "real.hh" #ifndef INLINE diff --git a/flower/include/full-storage.icc b/flower/include/full-storage.icc index 008f4169f5..55cba88472 100644 --- a/flower/include/full-storage.icc +++ b/flower/include/full-storage.icc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/interval.tcc b/flower/include/interval.tcc index d6c93b48f2..382ec67523 100644 --- a/flower/include/interval.tcc +++ b/flower/include/interval.tcc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/iterate.hh b/flower/include/iterate.hh index d68226777f..c8b179e68c 100644 --- a/flower/include/iterate.hh +++ b/flower/include/iterate.hh @@ -3,7 +3,7 @@ source file of the flowerlib - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/libc-extension.hh b/flower/include/libc-extension.hh index 051077b6e7..a9f04e1e71 100644 --- a/flower/include/libc-extension.hh +++ b/flower/include/libc-extension.hh @@ -3,17 +3,17 @@ source file of the flowerlib - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef LIBC_EXTENSION_HH #define LIBC_EXTENSION_HH -#include "fproto.hh" +#include "fproto.hh" #include "config.hh" - #include +#include char* strnlwr (char* start_l ,int n); char* strnupr (char* start_l, int n); @@ -24,8 +24,11 @@ Byte *memmem (Byte const * haystack, int haystack_len, #endif HAVE_MEMMEM #if !HAVE_SNPRINTF // GNU extension. -int snprintf (char *str, size_t n, - char const *format, ...); +int snprintf (char *str, size_t n, char const *format, ...); +#endif + +#if !HAVE_VSNPRINTF // GNU extension. +int vsnprintf (char *str, size_t, char const *format, va_list args); #endif diff --git a/flower/include/list.tcc b/flower/include/list.tcc index 6cba533848..90c150d2c9 100644 --- a/flower/include/list.tcc +++ b/flower/include/list.tcc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef LIST_CC #define LIST_CC diff --git a/flower/include/matrix-storage.hh b/flower/include/matrix-storage.hh index 581e6ee937..2dd51ba9bb 100644 --- a/flower/include/matrix-storage.hh +++ b/flower/include/matrix-storage.hh @@ -3,14 +3,14 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef MATRIX_STORAGE_HH #define MATRIX_STORAGE_HH -#include "varray.hh" +#include "array.hh" #include "real.hh" /** diff --git a/flower/include/matrix.hh b/flower/include/matrix.hh index 64ba718215..d94601a5ce 100644 --- a/flower/include/matrix.hh +++ b/flower/include/matrix.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ @@ -137,7 +137,7 @@ public: Vector row (int) const; Vector col (int) const; - operator String() const; + String str () const; void print() const; ~Matrix (); }; diff --git a/flower/include/nscalar.hh b/flower/include/nscalar.hh index 774f2e7dc1..b2aa4d6283 100644 --- a/flower/include/nscalar.hh +++ b/flower/include/nscalar.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/parray.hh b/flower/include/parray.hh index c6caad2c2f..b737d7bb47 100644 --- a/flower/include/parray.hh +++ b/flower/include/parray.hh @@ -3,14 +3,14 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef PARRAY_HH #define PARRAY_HH -#include "varray.hh" +#include "array.hh" /** an array of pointers. diff --git a/flower/include/plist.tcc b/flower/include/plist.tcc index 794e0b0fc1..0c2e3888f7 100644 --- a/flower/include/plist.tcc +++ b/flower/include/plist.tcc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/pointer.hh b/flower/include/pointer.hh index 803af25ab9..48a86e118a 100644 --- a/flower/include/pointer.hh +++ b/flower/include/pointer.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/pointer.tcc b/flower/include/pointer.tcc index 4c82e7d27e..9829d5399c 100644 --- a/flower/include/pointer.tcc +++ b/flower/include/pointer.tcc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/pqueue.hh b/flower/include/pqueue.hh index 67726d47f1..ba48993ccb 100644 --- a/flower/include/pqueue.hh +++ b/flower/include/pqueue.hh @@ -3,13 +3,13 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef PQUEUE_HH #define PQUEUE_HH -#include "varray.hh" +#include "array.hh" template diff --git a/flower/include/priorities.hh b/flower/include/priorities.hh index 4b804ba275..7a8240b9fc 100644 --- a/flower/include/priorities.hh +++ b/flower/include/priorities.hh @@ -3,14 +3,14 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef PRIORITIES_HH #define PRIORITIES_HH -#include "varray.hh" +#include "array.hh" /** A sorted (uni)set. Should connect with PQueue diff --git a/flower/include/rational.hh b/flower/include/rational.hh index 3c15f76c4f..115d5f85c7 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -25,6 +25,7 @@ class Rational { unsigned int num_, den_; void normalise (); void copy (Rational const &); + public: void set_infinite (int sign); bool infty_b () const; @@ -36,7 +37,6 @@ public: operator bool () const; operator int () const; operator double () const; - operator String () const; Rational operator - () const; Rational (); Rational (int, int =1); diff --git a/flower/include/real.hh b/flower/include/real.hh index 05e214ac16..50459fb57f 100644 --- a/flower/include/real.hh +++ b/flower/include/real.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/scalar.hh b/flower/include/scalar.hh index e8c58e684e..a963a2fb2a 100644 --- a/flower/include/scalar.hh +++ b/flower/include/scalar.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -12,15 +12,16 @@ #include "string.hh" #include "real.hh" +#include "matrix.hh" /// Perl -like scalar type. -struct Scalar : public String { - - Scalar (Real r) : String (r) {} - Scalar (int i) : String (i) {} - Scalar (char c) : String (c) {} +struct Scalar : public String +{ + Scalar (Real r) { *this = to_str (r); } + Scalar (int i) { *this = to_str (i); } + Scalar (char c) { *this = to_str (c); } Scalar (char const *c) : String (c) {} - Scalar (String s):String (s) {} + Scalar (String s) : String (s) {} Scalar (Rational); operator Rational(); Scalar() {} @@ -29,6 +30,13 @@ struct Scalar : public String { operator int(); bool to_bool () const; + /* + urg, these are bit silly; perhaps should make "Print_string" class + (derive from Scalar?) + */ + Scalar (Vector v) { *this = v.str (); } + Scalar (Matrix m) { *this = m.str (); } + /** perl -like string to bool conversion. */ operator bool() const; diff --git a/flower/include/string-data.hh b/flower/include/string-data.hh index 7695bedde6..01de40cab7 100644 --- a/flower/include/string-data.hh +++ b/flower/include/string-data.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/string-data.icc b/flower/include/string-data.icc index 599b9d82a6..0626601a35 100644 --- a/flower/include/string-data.icc +++ b/flower/include/string-data.icc @@ -3,7 +3,7 @@ source file of Flower lib - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef STRINGDATA_INL diff --git a/flower/include/string-handle.hh b/flower/include/string-handle.hh index 08b957c51f..3e39e6afbe 100644 --- a/flower/include/string-handle.hh +++ b/flower/include/string-handle.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/string-handle.icc b/flower/include/string-handle.icc index 6f9d908f57..74b755b22c 100644 --- a/flower/include/string-handle.icc +++ b/flower/include/string-handle.icc @@ -4,7 +4,7 @@ source file of Flower lib - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef STRINGHANDLE_INL diff --git a/flower/include/string.icc b/flower/include/string.icc index 3bdbb0336e..7b4985b8c3 100644 --- a/flower/include/string.icc +++ b/flower/include/string.icc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/virtual-methods.hh b/flower/include/virtual-methods.hh index 2ce3d40569..27557117e3 100644 --- a/flower/include/virtual-methods.hh +++ b/flower/include/virtual-methods.hh @@ -1,28 +1,32 @@ /* - virtual-methods.hh -- declare + virtual-methods.hh -- declare macros for our do-it-yourself RTTI source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef VIRTUAL_METHODS_HH #define VIRTUAL_METHODS_HH -/** a macro to declare the classes name as a static and virtual function. +#include "stdlib.h" // size_t + +/** Declare the classes name as a static and virtual function. The static_name() can *not* be inlined (this might have the effect that s->name() != S::static_name (). Overlapping strings need not be merged in C++ */ #define DECLARE_MY_RUNTIME_TYPEINFO \ -static char const *static_name();\ static bool static_is_type_b (const char*s);\ virtual bool is_type_b (const char *s) const { return static_is_type_b (s); } \ virtual char const *name() const{ return static_name (); } \ -int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out() +virtual size_t class_size () const { return static_class_size (); }\ +static size_t static_class_size (); \ +static char const *static_name() #define IMPLEMENT_STATIC_NAME(c)\ - char const *c::static_name() { return #c; } + char const *c::static_name() { return #c; } \ + size_t c::static_class_size () { return sizeof (c); } diff --git a/flower/interval.cc b/flower/interval.cc index 2a71fea232..571d23f530 100644 --- a/flower/interval.cc +++ b/flower/interval.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -22,7 +22,7 @@ Interval_t::infinity () String Interval_t::T_to_str (Real r) { - return String (r); + return to_str (r); } template INTERVAL__INSTANTIATE (int); @@ -36,6 +36,6 @@ Interval_t::infinity () String Interval_t::T_to_str (int i) { - return String (i); + return to_str (i); } diff --git a/flower/matrix-debug.cc b/flower/matrix-debug.cc index 82080f2a6d..d47d019367 100644 --- a/flower/matrix-debug.cc +++ b/flower/matrix-debug.cc @@ -3,24 +3,25 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "flower-debug.hh" #include "matrix.hh" -Matrix::operator String() const +String +Matrix::str () const { String s; #ifndef NPRINT Full_storage const * stor_c_l = dat_; - s=String ("matrix {"); + s = String ("matrix {"); for (int i=0; i< rows(); i++) { for (int j = 0; j < cols(); j++) { - s+= String (stor_c_l->elem (i,j), "%6f "); + s+= to_str (stor_c_l->elem (i,j), "%6f "); } s+="\n"; } @@ -31,23 +32,24 @@ Matrix::operator String() const void -Matrix::print() const +Matrix::print () const { #ifndef NPRINT fdebug << *this; #endif } -Vector::operator String() const +String +Vector::str () const { String s; #ifndef NPRINT - s=String ("vector (") + dim () + ") ["; + s = String ("vector (") + to_str (dim ()) + ") ["; for (int i=0; i < dim(); i++) { - s += String (dat[i], "%6f") + String (' '); + s += to_str (dat[i], "%6f") + to_str (' '); } - s+="]\n"; + s += "]\n"; #endif return s; } @@ -57,6 +59,6 @@ void Vector::print() const { #ifndef NDEBUG - fdebug << *this<<'\n'; + fdebug << *this << '\n'; #endif } diff --git a/flower/matrix.cc b/flower/matrix.cc index 314447220a..cdf3eccf77 100644 --- a/flower/matrix.cc +++ b/flower/matrix.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "matrix.hh" diff --git a/flower/nscalar.cc b/flower/nscalar.cc index 75bbe6bad4..2015e3ff23 100644 --- a/flower/nscalar.cc +++ b/flower/nscalar.cc @@ -3,6 +3,6 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/offset.cc b/flower/offset.cc index d92c3af31a..7f0a6949e3 100644 --- a/flower/offset.cc +++ b/flower/offset.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include @@ -18,7 +18,8 @@ String Offset::str () const { String s; - s = String("(") + coordinate_a_[X_AXIS] + ", " + coordinate_a_[Y_AXIS] + ")"; + s = String("(") + to_str (coordinate_a_[X_AXIS]) + ", " + + to_str (coordinate_a_[Y_AXIS]) + ")"; return s; } #endif diff --git a/flower/scalar.cc b/flower/scalar.cc index bdd2452ad7..c1f69eda60 100644 --- a/flower/scalar.cc +++ b/flower/scalar.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include diff --git a/flower/stringutil.cc b/flower/stringutil.cc index f10adcb623..f3c2906c27 100644 --- a/flower/stringutil.cc +++ b/flower/stringutil.cc @@ -6,7 +6,7 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys */ + (c) 1997--1998 Han-Wen Nienhuys */ #ifdef STRING_DEBUG #define memmove mymemmove diff --git a/lib/include/duration-convert.hh b/lib/include/duration-convert.hh index 82e102d4c8..fc7ee51d97 100644 --- a/lib/include/duration-convert.hh +++ b/lib/include/duration-convert.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -12,7 +12,7 @@ #include "duration.hh" #include "string.hh" //#include "array.hh" -#include "varray.hh" +#include "array.hh" /** Duration_convert handles all conversions to -n fro Duration (dur). diff --git a/lib/include/file-storage.hh b/lib/include/file-storage.hh index b2e679bb57..4e6fca65ef 100644 --- a/lib/include/file-storage.hh +++ b/lib/include/file-storage.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/include/input.hh b/lib/include/input.hh index ac0780b21d..afdf6eff22 100644 --- a/lib/include/input.hh +++ b/lib/include/input.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/include/mapped-file-storage.hh b/lib/include/mapped-file-storage.hh index 506bbc978f..50b12f5178 100644 --- a/lib/include/mapped-file-storage.hh +++ b/lib/include/mapped-file-storage.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/include/plet.hh b/lib/include/plet.hh index de32eb1753..05b6297704 100644 --- a/lib/include/plet.hh +++ b/lib/include/plet.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/include/simple-file-storage.hh b/lib/include/simple-file-storage.hh index 4f4bd59199..1fe0136c50 100644 --- a/lib/include/simple-file-storage.hh +++ b/lib/include/simple-file-storage.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/include/warn.hh b/lib/include/warn.hh index 27bc4ff759..e22d320f33 100644 --- a/lib/include/warn.hh +++ b/lib/include/warn.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/input.cc b/lib/input.cc index 46ddcb2ca6..4283783f8d 100644 --- a/lib/input.cc +++ b/lib/input.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "proto.hh" #include "input.hh" @@ -94,7 +94,7 @@ Input::error (String s) const void Input::non_fatal_error (String s) const { - message (_ ("Non fatal error: ")+ s); + message (_ ("Non fatal error: ") + s); } String Input::location_str () const @@ -102,5 +102,5 @@ Input::location_str () const if (source_file_l_) return source_file_l_->file_line_column_str (defined_ch_C_); else - return _("(location unknown)"); + return "(" + _ ("position unknown") + ")"; } diff --git a/lib/moment.cc b/lib/moment.cc index d29ce9065b..0f49d0aa21 100644 --- a/lib/moment.cc +++ b/lib/moment.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include diff --git a/lib/plet.cc b/lib/plet.cc index 9a098cc4c9..b27ecc9c0b 100644 --- a/lib/plet.cc +++ b/lib/plet.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "plet.hh" diff --git a/lib/simple-file-storage.cc b/lib/simple-file-storage.cc index 561ab838c9..1fd7ea7fc9 100644 --- a/lib/simple-file-storage.cc +++ b/lib/simple-file-storage.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include @@ -13,14 +13,13 @@ #endif #include "simple-file-storage.hh" -#include "varray.hh" +#include "array.hh" #include "string.hh" #include "warn.hh" void Simple_file_storage::load_stdin () { - int data_len = 0; len_i_ = 0; int c; @@ -42,7 +41,7 @@ Simple_file_storage::load_file (String s) if (!f) { - warning (_ ("can't open file `") + s + "'"); + warning (_f ("can't open file: `%s\'", s)); return ; } @@ -54,8 +53,7 @@ Simple_file_storage::load_file (String s) ret = fread (data_p_, sizeof (char), len_i_, f); if (ret!=len_i_) - warning (_ ("Huh? got ") + String (ret) + _ (", expected ") - + String (len_i_) + _ (" characters")); + warning (_f ("Huh? got %d, expected %d characters", ret, len_i_)); fclose (f); } @@ -80,7 +78,7 @@ Simple_file_storage::Simple_file_storage (String s) data_p_ = 0; len_i_ = 0; - if (!s.length_i ()) + if (!s.length_i () || (s == "-")) load_stdin (); else load_file (s); diff --git a/lib/source.cc b/lib/source.cc index 5d384f757e..81423bb1cb 100644 --- a/lib/source.cc +++ b/lib/source.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -46,14 +46,14 @@ Sources::set_path (File_path *f_C) Source_file* Sources::get_file_l (String &file_str) //UGH { - if (path_C_) + if ((file_str != "-") && path_C_) { String file_str_o = path_C_->find (file_str); if ((file_str_o == "") && (file_str != "")) return 0; file_str = file_str_o; } - Source_file * f_p= (!binary_b_) ? + Source_file * f_p = (!binary_b_) ? new Source_file (file_str) : new Binary_source_file (file_str); add (f_p); return f_p; diff --git a/lib/template.cc b/lib/template.cc index 4ebec57399..7b7a3c229a 100644 --- a/lib/template.cc +++ b/lib/template.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "config.hh" diff --git a/lily/atom.cc b/lily/atom.cc index eba9660c92..48b5c73720 100644 --- a/lily/atom.cc +++ b/lily/atom.cc @@ -3,14 +3,16 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ + + #include "atom.hh" #include "tex.hh" #include "interval.hh" -#include "dimen.hh" +#include "dimension.hh" #include "string.hh" -#include "varray.hh" +#include "array.hh" #include "debug.hh" #include "main.hh" @@ -26,8 +28,8 @@ Atom::check_infinity_b ()const Axis ax = (Axis)a; if (abs (off_[ax]) >= 100 CM) { - warning (_("ridiculous dimension ") + axis_name_str (ax) + ", " - +print_dimen(off_[ax])); + warning (_f ("ridiculous dimension: %s, %s", axis_name_str (ax), + print_dimen(off_[ax]))); if (experimental_features_global_b) assert (false); @@ -45,11 +47,11 @@ void Atom::print() const { #ifndef NPRINT - DOUT << "texstring: " < + (c) 1997--1998 Han-Wen Nienhuys */ #include "audio-element.hh" diff --git a/lily/bar-column.cc b/lily/bar-column.cc index 57bf47660d..e61c398900 100644 --- a/lily/bar-column.cc +++ b/lily/bar-column.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "bar.hh" @@ -23,12 +23,12 @@ Bar_column::set_bar (Bar*b) } void -Bar_column::do_substitute_dependency (Score_elem*o,Score_elem*n) +Bar_column::do_substitute_dependency (Score_element*o,Score_element*n) { Script_column::do_substitute_dependency (o,n); if (o == bar_l_) { - bar_l_ = n ? (Bar*)n->item() : 0; + bar_l_ = n ? (Bar*)n->access_Item () : 0; } } diff --git a/lily/beam-swallow-trans.cc b/lily/beam-swallow-trans.cc index 38418fc333..f6a4194ca7 100644 --- a/lily/beam-swallow-trans.cc +++ b/lily/beam-swallow-trans.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/boxes.cc b/lily/boxes.cc index 0e9befcad2..92c8fa6c5a 100644 --- a/lily/boxes.cc +++ b/lily/boxes.cc @@ -3,11 +3,11 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ -#include "boxes.hh" -#include "varray.hh" +#include "box.hh" +#include "array.hh" void Box::translate (Offset o) diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index 681ac2ae0f..4f97c77fd7 100644 --- a/lily/change-iterator.cc +++ b/lily/change-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "change-iterator.hh" @@ -22,10 +22,10 @@ Change_iterator::error (String reason) String to_type = change_l_->change_to_type_str_; String to_id = change_l_->change_to_id_str_; - String warn1 = - _ ("Can't change ") + to_type - + _(" to ") + "`" + to_id + "\': " + reason; - String warn2= "Change_iterator::process_and_next (): " + report_to_l ()->type_str_ + " = `" + String warn1 = _f ("can't change `%s\' to `%s\'", to_type, to_id) + + ": " + reason; + String warn2= "Change_iterator::process_and_next (): " + + report_to_l ()->type_str_ + " = `" + report_to_l ()->id_str_ + "\': "; warning (warn2); change_l_->warning (warn1); diff --git a/lily/change-translator.cc b/lily/change-translator.cc index 54bbed8e81..771e8d43b1 100644 --- a/lily/change-translator.cc +++ b/lily/change-translator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "change-translator.hh" diff --git a/lily/chord-iterator.cc b/lily/chord-iterator.cc index 1629d3fb37..777a9bcb44 100644 --- a/lily/chord-iterator.cc +++ b/lily/chord-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "translator-group.hh" diff --git a/lily/col-info.cc b/lily/col-info.cc index 85287257b0..581a9491b7 100644 --- a/lily/col-info.cc +++ b/lily/col-info.cc @@ -1,9 +1,9 @@ /* - col-info.cc -- implement Colinfo + col-info.cc -- implement Column_info source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "p-col.hh" @@ -11,12 +11,12 @@ #include "debug.hh" void -Colinfo::print() const +Column_info::print() const { #ifndef NPRINT DOUT << "column { "; if (fixed_b()) - DOUT << "fixed at " << fixed_position()<<", "; + DOUT << "fixed at " << fixed_position() << ", "; assert (pcol_l_); DOUT << width_.str(); Direction d = LEFT; @@ -29,7 +29,7 @@ Colinfo::print() const #endif } -Colinfo::Colinfo (Paper_column *col_l, Real const *fixed_C) +Column_info::Column_info (Paper_column *col_l, Real const *fixed_C) { if (fixed_C) fixpos_p_.set_l (fixed_C); @@ -41,26 +41,26 @@ Colinfo::Colinfo (Paper_column *col_l, Real const *fixed_C) } -Colinfo::Colinfo() +Column_info::Column_info() { ugh_b_ = false; pcol_l_ =0; } bool -Colinfo::fixed_b () const +Column_info::fixed_b () const { return fixpos_p_.get_C(); } Real -Colinfo::fixed_position () const +Column_info::fixed_position () const { return *fixpos_p_; } int -Colinfo::rank_i () const +Column_info::rank_i () const { return pcol_l_->rank_i (); } diff --git a/lily/colhpos.cc b/lily/colhpos.cc index 1e90ffeb37..8e37871558 100644 --- a/lily/colhpos.cc +++ b/lily/colhpos.cc @@ -1,9 +1,9 @@ /* - colhpos.cc -- implement Col_hpositions + colhpos.cc -- implement Column_x_positions source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "colhpos.hh" @@ -12,7 +12,7 @@ #include "vector.hh" #include "line-spacer.hh" -Col_hpositions::Col_hpositions() +Column_x_positions::Column_x_positions() { energy_f_ = infinity_f; ugh_b_ = false; @@ -20,19 +20,19 @@ Col_hpositions::Col_hpositions() spacer_l_ =0; } -Col_hpositions::~Col_hpositions() +Column_x_positions::~Column_x_positions() { } void -Col_hpositions::add (Paper_column*c) +Column_x_positions::add_paper_column (Paper_column*c) { cols.push (c); } void -Col_hpositions::print() const +Column_x_positions::print() const { #ifndef NPRINT DOUT << "energy : " << energy_f_ << '\n'; @@ -43,7 +43,7 @@ Col_hpositions::print() const } void -Col_hpositions::OK() const +Column_x_positions::OK() const { #ifndef NDEBUG assert (config.size() == cols.size ()); @@ -51,7 +51,7 @@ Col_hpositions::OK() const } void -Col_hpositions::set_stupid_solution(Vector v) +Column_x_positions::set_stupid_solution(Vector v) { energy_f_ = infinity_f; ugh_b_ = true; @@ -59,20 +59,20 @@ Col_hpositions::set_stupid_solution(Vector v) } void -Col_hpositions::stupid_solution() +Column_x_positions::stupid_solution() { set_stupid_solution (spacer_l_->default_solution()); } void -Col_hpositions::solve_line() +Column_x_positions::solve_line() { spacer_l_->solve (this); } void -Col_hpositions::approximate_solve_line() +Column_x_positions::approximate_solve_line() { spacer_l_->lower_bound_solution (this); } diff --git a/lily/collision.cc b/lily/collision.cc index 2da1e0ddae..c63c71747c 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" #include "collision.hh" @@ -16,7 +16,7 @@ Collision::Collision() } void -Collision::add (Note_column* ncol_l) +Collision::add_column (Note_column* ncol_l) { clash_l_arr_.push (ncol_l); add_element (ncol_l); @@ -59,7 +59,7 @@ Collision::do_pre_processing() Note_column* c_l = clash_l_arr_[i]; if (! c_l->dir_) { - warning (_("No stem direction set. Ignoring column in clash. ")); + warning (_ ("No stem direction set. Ignoring column in clash.")); continue; } int d = (c_l->dir_); @@ -72,7 +72,7 @@ Collision::do_pre_processing() { if (clash_group_arr_a[j].size() > 1) { - warning (_("Too many clashing notecolumns. Ignoring them.")); + warning (_ ("Too many clashing notecolumns. Ignoring them.")); return; } } @@ -154,7 +154,7 @@ Collision::do_pre_processing() (shaddup) */ Offset o (x_off[j] * wid_f, y_off[j] * inter_f); - ((Score_elem*)col_l_a[j])->translate (o); + ((Score_element*)col_l_a[j])->translate (o); } } } @@ -163,8 +163,8 @@ Collision::do_pre_processing() IMPLEMENT_IS_TYPE_B1(Collision, Item); void -Collision::do_substitute_dependency (Score_elem*o_l,Score_elem*n_l) +Collision::do_substitute_dependency (Score_element*o_l,Score_element*n_l) { - clash_l_arr_.substitute ((Note_column*)o_l->item(), - (Note_column*)(n_l?n_l->item():0)); + clash_l_arr_.substitute ((Note_column*)o_l->access_Item (), + (Note_column*)(n_l?n_l->access_Item ():0)); } diff --git a/lily/crescendo.cc b/lily/crescendo.cc index 0dee71825b..4b59b529ad 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -3,11 +3,11 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "molecule.hh" -#include "dimen.hh" +#include "dimension.hh" #include "crescendo.hh" #include "lookup.hh" #include "paper-def.hh" @@ -44,7 +44,7 @@ Crescendo::get_symbol() const if (w_dim < 0) { - warning (_("Crescendo too small")); + warning (_ ("crescendo") + " " + _("too small")); w_dim = 0; } @@ -57,7 +57,7 @@ Crescendo::get_symbol() const bool continued = broken[(Direction)-grow_dir_]; - return Atom (paper()->lookup_l ()->hairpin (w_dim, grow_dir_ < 0, continued)); + return Atom (lookup_l ()->hairpin (w_dim, grow_dir_ < 0, continued)); } Molecule* @@ -70,8 +70,8 @@ Crescendo::brew_molecule_p() const m_p = new Molecule; Atom s (get_symbol()); - m_p->add (Atom (s)); - m_p->translate (Offset (x_off_dim, y_)); + m_p->add_atom (s); + m_p->translate (Offset (x_off_dim, coordinate_offset_f_)); return m_p; } diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 4c44095826..bb1885ca88 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "dots.hh" @@ -11,7 +11,7 @@ #include "rhythmic-head.hh" void -Dot_column::add (Dots *d) +Dot_column::add_dots (Dots *d) { dot_l_arr_.push (d); add_dependency (d); @@ -19,21 +19,21 @@ Dot_column::add (Dots *d) } void -Dot_column::add (Rhythmic_head *r) +Dot_column::add_head (Rhythmic_head *r) { if (!r->dots_l_) return ; head_l_arr_.push (r); add_dependency (r); - add (r->dots_l_); + add_dots (r->dots_l_); } void -Dot_column::do_substitute_dependency (Score_elem*o,Score_elem*n) +Dot_column::do_substitute_dependency (Score_element*o,Score_element*n) { - Item *oi =o->item (); - Item *ni = n?n->item ():0; + Item *oi =o->access_Item (); + Item *ni = n?n->access_Item ():0; if (oi&&oi->is_type_b (Rhythmic_head::static_name ())) head_l_arr_.substitute ((Rhythmic_head*)oi, (Rhythmic_head*)ni); diff --git a/lily/dots.cc b/lily/dots.cc index 20cf87a515..370ea3dbe7 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "dots.hh" @@ -33,18 +33,18 @@ Molecule* Dots::brew_molecule_p () const { Molecule *out = new Molecule; - Atom fill = paper ()->lookup_l ()->fill (Box (Interval (0,0), + Atom fill = lookup_l ()->fill (Box (Interval (0,0), Interval (0,0))); - out->add(fill); + out->add_atom (fill); - Atom d = paper ()->lookup_l ()->dots (); + Atom d = lookup_l ()->dots (); Real dw = d.dim_[X_AXIS].length (); d.translate_axis (-dw, X_AXIS); for (int i=no_dots_i_; i--; ) { d.translate_axis (2*dw,X_AXIS); - out->add (d); + out->add_atom (d); } Real inter_f = paper ()->internote_f (); out->translate_axis (inter_f * position_i_, Y_AXIS); diff --git a/lily/engraver.cc b/lily/engraver.cc index 2ccf335069..696bedcf2e 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -3,7 +3,7 @@ Sourcefile of GNU LilyPond musictypesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "music-list.hh" @@ -20,7 +20,7 @@ Engraver::fill_staff_info (Staff_info&) void -Engraver::announce_element (Score_elem_info i) +Engraver::announce_element (Score_element_info i) { i.origin_grav_l_arr_.push (this); daddy_grav_l()->announce_element (i); @@ -28,7 +28,7 @@ Engraver::announce_element (Score_elem_info i) void -Engraver::typeset_element (Score_elem*p) +Engraver::typeset_element (Score_element*p) { daddy_grav_l()->typeset_element (p); } diff --git a/lily/general-script-def.cc b/lily/general-script-def.cc index 9d7b657880..ba7da733e2 100644 --- a/lily/general-script-def.cc +++ b/lily/general-script-def.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/global-translator.cc b/lily/global-translator.cc index 3620c52d69..1c8179441f 100644 --- a/lily/global-translator.cc +++ b/lily/global-translator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "global-translator.hh" diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index 58e08b959c..d8fda8415c 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "gourlay-breaking.hh" @@ -27,7 +27,7 @@ struct Break_node { int prev_break_i_; int line_i_; Real energy_f_; - Col_hpositions line_config_; + Column_x_positions line_config_; Break_node () { prev_break_i_ = -1; @@ -39,7 +39,7 @@ struct Break_node { This algorithms is adapted from */ -Array +Array Gourlay_breaking::do_solve () const { Array optimal_paths; @@ -60,7 +60,7 @@ Gourlay_breaking::do_solve () const for (; break_idx< breaks.size (); break_idx++) { Array candidates; - Array candidate_lines; + Array candidate_lines; Pointer_list spacer_p_list; /* @@ -85,7 +85,7 @@ Gourlay_breaking::do_solve () const if (!feasible (line)) break; - Col_hpositions approx; + Column_x_positions approx; approx.cols = line; approx.spacer_l_ = generate_spacing_problem (line, @@ -148,15 +148,15 @@ Gourlay_breaking::do_solve () const } if (! (break_idx % HAPPY_DOTS_I)) - *mlog << "[" << break_idx << "]"< final_breaks; - Array lines; + Array lines; /* skip 0-th element, since it is a "dummy" elt*/ for (int i = optimal_paths.size ()-1; i> 0;) diff --git a/lily/idealspacing.cc b/lily/idealspacing.cc index 64c1866fd8..f2638e0603 100644 --- a/lily/idealspacing.cc +++ b/lily/idealspacing.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "idealspacing.hh" @@ -16,7 +16,7 @@ Idealspacing::print() const { #ifndef NPRINT DOUT << "idealspacing {" ; - DOUT << "distance "< + (c) 1997--1998 Han-Wen Nienhuys */ #include @@ -47,7 +47,7 @@ void Identifier::error (String expect) const { String e (_("Wrong identifier type: ")); - e += String (name()) + _("(expected ") + expect + ")"; + e += _f ("%s expected", expect); ::error (e); } @@ -75,26 +75,24 @@ Identifier::do_print () const } /* ugh. */ -/* UGH MEMORY LEAK! */ -#define DEFAULT_PRINT(Class, accessor) \ +#define DEFAULT_PRINT(Class) \ void \ Class ## _identifier::do_print () const { \ - Class *cl = ((Class ## _identifier *)this)->accessor();\ + Class *cl = ((Class ## _identifier *)this)->access_ ## Class(false);\ cl->print (); \ - delete cl; \ } -DEFAULT_PRINT(General_script_def, script); -DEFAULT_PRINT(Lookup, lookup); -DEFAULT_PRINT(Translator, translator); -DEFAULT_PRINT(Symtables, symtables); -DEFAULT_PRINT(Music, music); -DEFAULT_PRINT(Request, request); -DEFAULT_PRINT(Score, score); -DEFAULT_PRINT(Midi_def, mididef); -DEFAULT_PRINT(Paper_def, paperdef); +DEFAULT_PRINT(General_script_def); +DEFAULT_PRINT(Lookup); +DEFAULT_PRINT(Translator); +DEFAULT_PRINT(Symtables); +DEFAULT_PRINT(Music); +DEFAULT_PRINT(Request); +DEFAULT_PRINT(Score); +DEFAULT_PRINT(Midi_def); +DEFAULT_PRINT(Paper_def); /* ugh. */ #define DUMMY_STR(Class) \ @@ -120,7 +118,7 @@ DUMMY_STR(Duration); void \ Class ## _identifier::do_print () const\ {\ - DOUT << do_str () << "\n";\ + DOUT << do_str () << '\n';\ }\ @@ -133,7 +131,7 @@ STRING_PRINT(String); String \ Class ## _identifier::do_str () const\ {\ - return String (*data_p_);\ + return to_str (*data_p_);\ } DEFAULT_STR(int); @@ -145,57 +143,61 @@ DEFAULT_STR(String); fucking C++ blows me. */ -#define DEFAULT_ACCESSOR(Class, accessor)\ +#define DEFAULT_ACCESSOR(Class)\ Class*\ -Class ## _identifier::accessor () const {\ +Class ## _identifier::access_ ## Class (bool copy_b) const {\ ((Class ## _identifier*)this)->accessed_b_ = true;\ - return new Class (*data_p_);\ + return copy_b ? new Class (*data_p_) : data_p_;\ } -#define VIRTUAL_ACCESSOR(Class, accessor)\ +#define VIRTUAL_ACCESSOR(Class)\ Class*\ -Class ## _identifier::accessor () const{\ +Class ## _identifier::access_ ## Class (bool copy_b) const{\ ((Class ## _identifier*)this)->accessed_b_ = true;\ - return (Class*)data_p_->clone();\ + return copy_b ? (Class*)data_p_->clone() : data_p_;\ } -#define IMPLEMENT_ID_CLASS(Class, accessor) \ +#define IMPLEMENT_ID_CLASS(Class) \ IMPLEMENT_IS_TYPE_B1(Class ## _identifier,Identifier)\ Class ## _identifier::~Class ## _identifier() { delete data_p_; }\ - Class ## _identifier::Class ## _identifier (Class*st, int code):Identifier (code) { data_p_ = st; }\ + Class ## _identifier::Class ## _identifier (Class*st, int code) \ + :Identifier (code)\ + {\ + data_p_ = st;\ + }\ Class ## _identifier::Class ## _identifier (Class ## _identifier const &s) \ -: Identifier (s)\ + : Identifier (s)\ {\ - data_p_ = s.accessor ();\ + data_p_ = s.access_ ## Class (true);\ } -IMPLEMENT_ID_CLASS(Duration, duration); -IMPLEMENT_ID_CLASS(Translator, translator); -IMPLEMENT_ID_CLASS(int, intid); -IMPLEMENT_ID_CLASS(Real, real); -IMPLEMENT_ID_CLASS(String, string); -IMPLEMENT_ID_CLASS(General_script_def, script); -IMPLEMENT_ID_CLASS(Lookup, lookup); -IMPLEMENT_ID_CLASS(Symtables, symtables); -IMPLEMENT_ID_CLASS(Music, music); -IMPLEMENT_ID_CLASS(Score, score); -IMPLEMENT_ID_CLASS(Request, request); -IMPLEMENT_ID_CLASS(Midi_def, mididef); -IMPLEMENT_ID_CLASS(Paper_def, paperdef); - -VIRTUAL_ACCESSOR(Music, music); -VIRTUAL_ACCESSOR(Request, request); -VIRTUAL_ACCESSOR(Translator, translator); -VIRTUAL_ACCESSOR(General_script_def, script); - -DEFAULT_ACCESSOR(Duration, duration); -DEFAULT_ACCESSOR(int, intid); -DEFAULT_ACCESSOR(Real, real); -DEFAULT_ACCESSOR(String, string); -DEFAULT_ACCESSOR(Lookup, lookup); -DEFAULT_ACCESSOR(Symtables, symtables); -DEFAULT_ACCESSOR(Score, score); -DEFAULT_ACCESSOR(Midi_def, mididef); -DEFAULT_ACCESSOR(Paper_def, paperdef); +IMPLEMENT_ID_CLASS(Duration); +IMPLEMENT_ID_CLASS(Translator); +IMPLEMENT_ID_CLASS(int); +IMPLEMENT_ID_CLASS(Real); +IMPLEMENT_ID_CLASS(String); +IMPLEMENT_ID_CLASS(General_script_def); +IMPLEMENT_ID_CLASS(Lookup); +IMPLEMENT_ID_CLASS(Symtables); +IMPLEMENT_ID_CLASS(Music); +IMPLEMENT_ID_CLASS(Score); +IMPLEMENT_ID_CLASS(Request); +IMPLEMENT_ID_CLASS(Midi_def); +IMPLEMENT_ID_CLASS(Paper_def); + +VIRTUAL_ACCESSOR(Music); +VIRTUAL_ACCESSOR(Request); +VIRTUAL_ACCESSOR(Translator); +VIRTUAL_ACCESSOR(General_script_def); + +DEFAULT_ACCESSOR(Duration); +DEFAULT_ACCESSOR(int); +DEFAULT_ACCESSOR(Real); +DEFAULT_ACCESSOR(String); +DEFAULT_ACCESSOR(Lookup); +DEFAULT_ACCESSOR(Symtables); +DEFAULT_ACCESSOR(Score); +DEFAULT_ACCESSOR(Midi_def); +DEFAULT_ACCESSOR(Paper_def); diff --git a/lily/includable-lexer.cc b/lily/includable-lexer.cc index 2d3b45597d..1adf85425d 100644 --- a/lily/includable-lexer.cc +++ b/lily/includable-lexer.cc @@ -3,16 +3,25 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ + +#include + #include "includable-lexer.hh" #include "source-file.hh" #include "source.hh" +#include "debug.hh" #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 #endif +#ifndef YY_START +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START +#endif + Includable_lexer::Includable_lexer () { yy_current_buffer = 0; @@ -26,7 +35,7 @@ Includable_lexer::new_input (String s, Sources * global_sources) Source_file * sl = global_sources->get_file_l (s); if (!sl) { - String msg =_ ("Can't find file `") + s+ "'"; + String msg = _f ("can't find file: `%s\'", s); LexerError (msg.ch_C ()); return; } @@ -35,7 +44,7 @@ Includable_lexer::new_input (String s, Sources * global_sources) char_count_stack_.push (0); if (yy_current_buffer) state_stack_.push (yy_current_buffer); - cout << "[" << s<istream_l (), YY_BUF_SIZE)); } +void +Includable_lexer::new_input (String name, String data, Sources* sources) +{ + Source_file* file = new Source_file (name, data); + sources->add (file); + filename_str_arr_.push (name); + + char_count_stack_.push (0); + if (yy_current_buffer) + state_stack_.push (yy_current_buffer); + *mlog << "[" << name << flush; + include_stack_.push (file); + + yy_switch_to_buffer (yy_create_buffer (file->istream_l (), YY_BUF_SIZE)); +} /** pop the inputstack. conceptually this is a destructor, but it does not destruct the Source_file that Includable_lexer::new_input creates. */ @@ -56,11 +80,12 @@ Includable_lexer::close_input () { include_stack_.pop (); char_count_stack_.pop (); - cout << "]"< + (c) 1997--1998 Han-Wen Nienhuys */ @@ -16,7 +16,7 @@ class Abbreviation : public Item { protected: virtual void do_print () const; virtual Molecule *brew_molecule_p () const; - virtual void do_substitute_dependent (Score_elem*, Score_elem*); + virtual void do_substitute_dependent (Score_element*, Score_element*); public: int abbrev_flags_i_; Abbreviation (); diff --git a/lily/include/atom.hh b/lily/include/atom.hh index b145383d7d..d7c31ee35c 100644 --- a/lily/include/atom.hh +++ b/lily/include/atom.hh @@ -3,14 +3,14 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef ATOM_HH #define ATOM_HH #include "string.hh" -#include "boxes.hh" +#include "box.hh" #include "lily-proto.hh" @@ -19,8 +19,10 @@ class Atom { Offset off_; public: String tex_; + String font_; Box dim_; + Offset offset () const; String str() const; // for printing. Atom (String, Box); Atom (); @@ -29,7 +31,6 @@ public: /// how big is #this#? Box extent() const; void print() const; - String TeX_string() const; bool check_infinity_b () const; }; #endif diff --git a/lily/include/audio-element.hh b/lily/include/audio-element.hh index 6fe2a8e068..db7e4097d3 100644 --- a/lily/include/audio-element.hh +++ b/lily/include/audio-element.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/axis-group-item.hh b/lily/include/axis-group-item.hh index c61a081020..be1a78b6ca 100644 --- a/lily/include/axis-group-item.hh +++ b/lily/include/axis-group-item.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/axis-group-spanner.hh b/lily/include/axis-group-spanner.hh index 64c2df98b2..15022e2d80 100644 --- a/lily/include/axis-group-spanner.hh +++ b/lily/include/axis-group-spanner.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/bar-column.hh b/lily/include/bar-column.hh index 84c32113ea..2db6cbe264 100644 --- a/lily/include/bar-column.hh +++ b/lily/include/bar-column.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -22,8 +22,8 @@ public: Bar_column(); void set_bar (Bar*); protected: - SCORE_ELEM_CLONE(Bar_column); - void do_substitute_dependency (Score_elem*,Score_elem*); + SCORE_ELEMENT_CLONE(Bar_column); + void do_substitute_dependency (Score_element*,Score_element*); DECLARE_MY_RUNTIME_TYPEINFO; }; diff --git a/lily/include/beam-swallow-trans.hh b/lily/include/beam-swallow-trans.hh index 760704fc50..9165b6d813 100644 --- a/lily/include/beam-swallow-trans.hh +++ b/lily/include/beam-swallow-trans.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/break-align-item.hh b/lily/include/break-align-item.hh index 9d800f8ca6..6b5a1e4014 100644 --- a/lily/include/break-align-item.hh +++ b/lily/include/break-align-item.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -19,7 +19,7 @@ protected: virtual void do_pre_processing(); public: DECLARE_MY_RUNTIME_TYPEINFO; - SCORE_ELEM_CLONE(Break_align_item); + SCORE_ELEMENT_CLONE(Break_align_item); }; #endif // BREAK_ALIGN_ITEM_HH diff --git a/lily/include/break-caching.hh b/lily/include/break-caching.hh index 188360d013..706c5c3dfc 100644 --- a/lily/include/break-caching.hh +++ b/lily/include/break-caching.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -16,7 +16,7 @@ struct Break_caching : Break_algorithm { void do_set_pscore(); - Array do_solve() const; + Array do_solve() const; }; diff --git a/lily/include/break.hh b/lily/include/break.hh index 4499686f10..f3b3deb18b 100644 --- a/lily/include/break.hh +++ b/lily/include/break.hh @@ -3,13 +3,13 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #ifndef BREAK_HH #define BREAK_HH -#include "varray.hh" +#include "array.hh" #include "interval.hh" #include "lily-proto.hh" #include "colhpos.hh" @@ -47,10 +47,10 @@ protected: /// helper: solve for the columns in #curline#. - void solve_line (Col_hpositions*) const; + void solve_line (Column_x_positions*) const; /// helper: approximate the energyv - void approximate_solve_line (Col_hpositions*) const; + void approximate_solve_line (Column_x_positions*) const; /// does curline fit on the paper? bool feasible (Line_of_cols) const; @@ -58,7 +58,7 @@ protected: Line_spacer* generate_spacing_problem (Line_of_cols, Interval) const; - virtual Array do_solve() const=0; + virtual Array do_solve() const=0; virtual void do_set_pscore(); public: @@ -73,7 +73,7 @@ public: /// check if the spacing/breaking problem is well-stated void problem_OK() const; void OK() const; - Array solve() const; + Array solve() const; }; #endif // BREAK_HH diff --git a/lily/include/change-iterator.hh b/lily/include/change-iterator.hh index e4adf804e1..a4d435be5b 100644 --- a/lily/include/change-iterator.hh +++ b/lily/include/change-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/change-translator.hh b/lily/include/change-translator.hh index 8c759717ed..b369462ca2 100644 --- a/lily/include/change-translator.hh +++ b/lily/include/change-translator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/chord-iterator.hh b/lily/include/chord-iterator.hh index 0a3c9fa64a..1dea414961 100644 --- a/lily/include/chord-iterator.hh +++ b/lily/include/chord-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/col-info.hh b/lily/include/col-info.hh index 49694352d0..a01afd3c74 100644 --- a/lily/include/col-info.hh +++ b/lily/include/col-info.hh @@ -1,9 +1,9 @@ /* - col-info.hh -- declare Colinfo + col-info.hh -- declare Column_info source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -23,7 +23,7 @@ struct Spacer_rod { /// helper struct for #Spacing_problem# -struct Colinfo { +struct Column_info { Paper_column *pcol_l_; P fixpos_p_; @@ -35,8 +35,8 @@ struct Colinfo { Drul_array< Array > rods_; /* *************** */ - Colinfo(); - Colinfo (Paper_column *,Real const *); + Column_info(); + Column_info (Paper_column *,Real const *); int rank_i () const; void print() const; diff --git a/lily/include/colhpos.hh b/lily/include/colhpos.hh index 01a87167ba..e46991dc33 100644 --- a/lily/include/colhpos.hh +++ b/lily/include/colhpos.hh @@ -1,18 +1,18 @@ /* colhpos.hh -- part of GNU LilyPond - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef COLHPOS_HH #define COLHPOS_HH -#include "varray.hh" +#include "array.hh" #include "lily-proto.hh" typedef Array Line_of_cols; -struct Col_hpositions { +struct Column_x_positions { Line_spacer * spacer_l_; bool ugh_b_; Line_of_cols error_col_l_arr_; @@ -23,15 +23,15 @@ struct Col_hpositions { /* ************** */ void OK() const; - ~Col_hpositions(); + ~Column_x_positions(); void solve_line(); void approximate_solve_line(); /** generate a solution with no regard to idealspacings or constraints. should always work */ void stupid_solution(); void set_stupid_solution (Vector); - Col_hpositions(); - void add (Paper_column*c); + Column_x_positions(); + void add_paper_column (Paper_column*c); void print() const; }; diff --git a/lily/include/collision.hh b/lily/include/collision.hh index 9d47efb513..9a7505163b 100644 --- a/lily/include/collision.hh +++ b/lily/include/collision.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -22,12 +22,12 @@ */ class Collision : public Horizontal_vertical_group_item { protected: - virtual void do_substitute_dependency (Score_elem*,Score_elem*); + virtual void do_substitute_dependency (Score_element*,Score_element*); virtual void do_pre_processing(); public: Link_array clash_l_arr_; DECLARE_MY_RUNTIME_TYPEINFO; - void add (Note_column*ncol_l); + void add_column (Note_column*ncol_l); Collision(); }; #endif // COLLISION_HH diff --git a/lily/include/crescendo.hh b/lily/include/crescendo.hh index 0b62f65810..02a311c60e 100644 --- a/lily/include/crescendo.hh +++ b/lily/include/crescendo.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -24,7 +24,7 @@ public: Crescendo(); protected: - SCORE_ELEM_CLONE(Crescendo); + SCORE_ELEMENT_CLONE(Crescendo); virtual Molecule*brew_molecule_p() const; virtual Interval symbol_height() const; DECLARE_MY_RUNTIME_TYPEINFO; diff --git a/lily/include/direction.hh b/lily/include/direction.hh index 416b3fc33f..8afa94ce43 100644 --- a/lily/include/direction.hh +++ b/lily/include/direction.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/dot-column.hh b/lily/include/dot-column.hh index 9d8d5e552a..aa197cd7a3 100644 --- a/lily/include/dot-column.hh +++ b/lily/include/dot-column.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -19,13 +19,14 @@ class Dot_column : public Horizontal_group_item { Link_array head_l_arr_; Link_array dot_l_arr_; - void add (Dots*); public: DECLARE_MY_RUNTIME_TYPEINFO; - void add (Rhythmic_head*); + void add_head (Rhythmic_head*); + void add_dots (Dots*); + protected: virtual void do_pre_processing (); - virtual void do_substitute_dependency (Score_elem *o, Score_elem*n); + virtual void do_substitute_dependency (Score_element *o, Score_element*n); }; #endif // DOT_COLUMN_HH diff --git a/lily/include/dots.hh b/lily/include/dots.hh index 846cf0364f..4c17ab42c1 100644 --- a/lily/include/dots.hh +++ b/lily/include/dots.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/drul-array.hh b/lily/include/drul-array.hh index 9169a57828..efc611f76f 100644 --- a/lily/include/drul-array.hh +++ b/lily/include/drul-array.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/general-script-def.hh b/lily/include/general-script-def.hh index 024468e343..cc6b1e6adc 100644 --- a/lily/include/general-script-def.hh +++ b/lily/include/general-script-def.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/global-translator.hh b/lily/include/global-translator.hh index dddfacb0b2..b4381eb703 100644 --- a/lily/include/global-translator.hh +++ b/lily/include/global-translator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/gourlay-breaking.hh b/lily/include/gourlay-breaking.hh index f01df23848..cc5ed6c385 100644 --- a/lily/include/gourlay-breaking.hh +++ b/lily/include/gourlay-breaking.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -22,7 +22,7 @@ struct Gourlay_breaking : public Break_algorithm /// maximum number of measures in a line int max_measures_i_; void do_set_pscore(); - Array do_solve() const; + Array do_solve() const; Gourlay_breaking(); }; #endif // GOURLAY_BREAKING_HH diff --git a/lily/include/header.hh b/lily/include/header.hh index 4877f396f6..a6b37dba9f 100644 --- a/lily/include/header.hh +++ b/lily/include/header.hh @@ -1,9 +1,9 @@ /* - header.hh -- declare + header.hh -- declare Header source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -14,10 +14,14 @@ #include "dictionary.hh" +/** Store bibliographical information. The information in the \header + block is read into this struct. Lily does not process this + information. */ struct Header : Dictionary { String lily_id_str_; String TeX_string() const; + Header (); }; #endif // HEADER_HH diff --git a/lily/include/includable-lexer.hh b/lily/include/includable-lexer.hh index 9cf7087369..6837efc1f5 100644 --- a/lily/include/includable-lexer.hh +++ b/lily/include/includable-lexer.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -13,7 +13,7 @@ #include #include "string.hh" -#include "varray.hh" +#include "array.hh" #include "fproto.hh" #include "proto.hh" @@ -23,20 +23,26 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; /** an yyFlexLexer child with provisions for inclusion. */ -class Includable_lexer : public yyFlexLexer { +class Includable_lexer : public yyFlexLexer +{ Array state_stack_; + protected: bool close_input (); Array include_stack_; Array char_count_stack_; + public: + Includable_lexer (); + ~Includable_lexer (); + /// store dependencies for Makefile stuff. Array filename_str_arr_; Source_file* source_file_l () const; - void new_input (String s,Sources*); - Includable_lexer (); - ~Includable_lexer (); + void new_input (String s, Sources*); + void new_input (String name, String data, Sources*); + void add_lexed_char (int); char const * here_ch_C (); }; diff --git a/lily/include/ineq-constrained-qp.hh b/lily/include/ineq-constrained-qp.hh index 3b23cb898f..5686d9e361 100644 --- a/lily/include/ineq-constrained-qp.hh +++ b/lily/include/ineq-constrained-qp.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/line-spacer.hh b/lily/include/line-spacer.hh index 1bc88f52c2..a61ac4d9e8 100644 --- a/lily/include/line-spacer.hh +++ b/lily/include/line-spacer.hh @@ -3,14 +3,14 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef LINE_SPACER_HH #define LINE_SPACER_HH #include "lily-proto.hh" -#include "varray.hh" +#include "array.hh" #include "vector.hh" #include "interval.hh" @@ -31,13 +31,13 @@ public: /** solve the spacing problem */ - virtual void solve (Col_hpositions *) const=0; + virtual void solve (Column_x_positions *) const=0; /** Approximate the spacing problem: return a lower bound on the energy */ - virtual void lower_bound_solution (Col_hpositions *) const=0; + virtual void lower_bound_solution (Column_x_positions *) const=0; /** add a col to the problem. columns have to be added left to right. The column contains info on it's minimum width. */ diff --git a/lily/include/linespace.hh b/lily/include/linespace.hh index a468fad24f..8b230ff516 100644 --- a/lily/include/linespace.hh +++ b/lily/include/linespace.hh @@ -1,9 +1,9 @@ /* - linespace.hh -- declare Colinfo, Spacing_problem + linespace.hh -- declare Spacing_problem source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #error @@ -12,7 +12,7 @@ #define LINESPACE_HH #include "plist.hh" -#include "varray.hh" +#include "array.hh" #include "vector.hh" #include "interval.hh" #include "pointer.hh" @@ -42,8 +42,8 @@ */ class Spacing_problem { PointerList ideal_p_list_; - Array cols; - Array loose_col_arr_; + Array cols; + Array loose_col_arr_; /// mark column #i# as being loose. void loosen_column (int i); @@ -81,7 +81,7 @@ public: Array error_pcol_l_arr() const; virtual Array solve() const; - virtual void add_column (Paper_column *, bool fixed=false, Real fixpos=0.0); + virtual void add_column (Paper_column *, bool fixed=false, Real fixpos=0.0); virtual Vector default_solution() contains { diff --git a/lily/include/lyric-engraver.hh b/lily/include/lyric-engraver.hh index 195e4f92dc..ec85670f73 100644 --- a/lily/include/lyric-engraver.hh +++ b/lily/include/lyric-engraver.hh @@ -3,14 +3,14 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef LYRIC_ENGRAVER_HH #define LYRIC_ENGRAVER_HH #include "engraver.hh" -#include "varray.hh" +#include "array.hh" #include "lily-proto.hh" diff --git a/lily/include/minterval.hh b/lily/include/minterval.hh index bb56394a7d..e7f2cf605a 100644 --- a/lily/include/minterval.hh +++ b/lily/include/minterval.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 3faccc45f8..f8edc37c25 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -3,37 +3,36 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef MOLECULE_HH #define MOLECULE_HH #include "lily-proto.hh" #include "plist.hh" -#include "boxes.hh" +#include "box.hh" #include "axes.hh" #include "direction.hh" /** a group of individually translated symbols. You can add molecules to the top, to the right, etc. */ struct Molecule { - Pointer_list ats; // change to List? + Pointer_list atoms_; // change to List? /* *************** */ Molecule() { } - Molecule (Atom const &a) { add (a) ;} + Molecule (Atom const &a); void add_at_edge (Axis a, Direction d, const Molecule &m); - void add (Molecule const &m); + void add_molecule (Molecule const &m); void translate (Offset); void translate_axis (Real,Axis); - void add (Atom const & a) ; + void add_atom (Atom const & a) ; /// how big is #this#? Box extent() const; - String TeX_string() const; Molecule (const Molecule&s); void print() const; diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index 018832f773..78a2ac1a6b 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index b4cd413412..29f4c11aae 100644 --- a/lily/include/music-output-def.hh +++ b/lily/include/music-output-def.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/music-output.hh b/lily/include/music-output.hh index 6f2807ff2c..04a16e5d8d 100644 --- a/lily/include/music-output.hh +++ b/lily/include/music-output.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/music.hh b/lily/include/music.hh index b5e85ff184..083e476f73 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/my-lily-lexer.hh b/lily/include/my-lily-lexer.hh index 42ac85949f..e4e3d293ed 100644 --- a/lily/include/my-lily-lexer.hh +++ b/lily/include/my-lily-lexer.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef LEXER_HH @@ -15,7 +15,7 @@ #include "lily-proto.hh" #include "lily-proto.hh" #include "fproto.hh" -#include "varray.hh" +#include "array.hh" #include "string.hh" #include "includable-lexer.hh" #include "duration.hh" diff --git a/lily/include/notename-table.hh b/lily/include/notename-table.hh index a9181e9d90..56dd7c3927 100644 --- a/lily/include/notename-table.hh +++ b/lily/include/notename-table.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/p-col.hh b/lily/include/p-col.hh index 5ab02c8410..674139c149 100644 --- a/lily/include/p-col.hh +++ b/lily/include/p-col.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -31,7 +31,7 @@ class Paper_column : public Horizontal_group_item { public: DECLARE_MY_RUNTIME_TYPEINFO; - SCORE_ELEM_CLONE(Paper_column); + SCORE_ELEMENT_CLONE(Paper_column); Drul_array< Array > minimal_dists_arr_drul_; void preprocess (); @@ -64,7 +64,7 @@ public: bool used_b() const; bool breakpoint_b() const; - void add (Item *i); + void add_item (Item *i); Paper_column(); diff --git a/lily/include/p-score.hh b/lily/include/p-score.hh index 60ebda08cd..a6b4dc2a9d 100644 --- a/lily/include/p-score.hh +++ b/lily/include/p-score.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1998 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ @@ -33,14 +33,14 @@ public: Pointer_list span_p_list_; /// other elements - Pointer_list elem_p_list_; + Pointer_list elem_p_list_; Outputter *outputter_l_; Super_elem *super_elem_l_; Paper_score (); /// add a line to the broken stuff. Positions given in #config# - void set_breaking (Array const &); + void set_breaking (Array const &); /// add to bottom of pcols @@ -59,7 +59,7 @@ public: /* STANDARD ROUTINES */ void print() const; - void typeset_element (Score_elem*); + void typeset_element (Score_element*); void typeset_broken_spanner (Spanner*); /// add a Spanner void typeset_unbroken_spanner (Spanner*); diff --git a/lily/include/property-iterator.hh b/lily/include/property-iterator.hh index f0dfbb5fb9..ac0703dc29 100644 --- a/lily/include/property-iterator.hh +++ b/lily/include/property-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/qlp.hh b/lily/include/qlp.hh index 82371d363c..2de28843b9 100644 --- a/lily/include/qlp.hh +++ b/lily/include/qlp.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef QLP_HH diff --git a/lily/include/qlpsolve.hh b/lily/include/qlpsolve.hh index dc2aaa5663..bf04b55d84 100644 --- a/lily/include/qlpsolve.hh +++ b/lily/include/qlpsolve.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -35,6 +35,8 @@ class Active_constraints { Ineq_constrained_qp const *opt; public: + + int degenerate_count_i_; String status() const; Vector vec (int k) const { return opt->cons_[k]; } @@ -45,17 +47,17 @@ public: constraint in #active# */ - void drop (int k); + void drop_constraint (int k); /** add constraint j. add constraint j to the active set j is the index of the constraint in #inactive# */ - void add (int j); + void add_constraint (int j); /// exchange in and out. - void exchange (int in, int out) { add (in); drop (out); } + void exchange (int in, int out) { add_constraint (in); drop_constraint (out); } Vector find_active_optimum (Vector g); diff --git a/lily/include/request-iterator.hh b/lily/include/request-iterator.hh index 8f7a30b4c8..15640ccd74 100644 --- a/lily/include/request-iterator.hh +++ b/lily/include/request-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/request.hh b/lily/include/request.hh index a349f5786b..d63a7cd7f1 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef REQUEST_HH @@ -17,6 +17,9 @@ #include "music.hh" #include "direction.hh" +#define DEFAULTACCESSOR(T) virtual T *access_ ## T () { return 0; } + + /** a voice element wants something printed. Hungarian postfix: req @@ -26,34 +29,36 @@ class Request : public Music { public: - /* *************** */ + /* *************** */ - virtual ~Request(){} + virtual ~Request(){} - DECLARE_MY_RUNTIME_TYPEINFO; - VIRTUAL_COPY_CONS(Request,Music); + DECLARE_MY_RUNTIME_TYPEINFO; + VIRTUAL_COPY_CONS(Request,Music); - virtual MInterval time_int() const; - virtual Moment duration() const { return 0; } - - /* accessors for children - maybe checkout RTTI - */ - virtual Barcheck_req *barcheck() { return 0; } - virtual Script_req *script() { return 0;} - virtual Span_req *span() { return 0; } - virtual Spacing_req * spacing() { return 0; } - virtual Blank_req * blank() { return 0; } - virtual Musical_req *musical() { return 0; } - virtual Command_req * command() { return 0; } - bool equal_b (Request*) const; + virtual MInterval time_int() const; + virtual Moment duration() const { return 0; } + + /* accessors for children + maybe checkout RTTI + */ + + DEFAULTACCESSOR(Barcheck_req) + DEFAULTACCESSOR(Script_req) + DEFAULTACCESSOR(Span_req) + DEFAULTACCESSOR(Spacing_req) + DEFAULTACCESSOR(Musical_req) + DEFAULTACCESSOR(Command_req) + + bool equal_b (Request*) const; protected: - virtual bool do_equal_b (Request*) const; - virtual void do_print() const; + virtual bool do_equal_b (Request*) const; + virtual void do_print() const; }; -#define REQUESTMETHODS(T,accessor) \ -virtual T * accessor() { return this;}\ + +#define REQUESTMETHODS(T) \ +virtual T * access_ ## T() { return this;}\ DECLARE_MY_RUNTIME_TYPEINFO;\ VIRTUAL_COPY_CONS(T, Request);\ virtual void do_print() const @@ -63,18 +68,18 @@ virtual void do_print() const /** Put a script above or below this ``note'' or bar. eg upbow, downbow. Why a request? These symbols may conflict with slurs and brackets, so this also a request */ + class Script_req : public virtual Request { public: - Direction dir_; - General_script_def *scriptdef_p_; - - /* *************** */ - bool do_equal_b (Request*) const; - - Script_req(); - REQUESTMETHODS(Script_req,script); - ~Script_req(); - Script_req (Script_req const&); + Direction dir_; + General_script_def *scriptdef_p_; + + bool do_equal_b (Request*) const; + + Script_req(); + REQUESTMETHODS(Script_req); + ~Script_req(); + Script_req (Script_req const&); }; diff --git a/lily/include/rest-collision.hh b/lily/include/rest-collision.hh index 4d39f54347..cc6bc84db8 100644 --- a/lily/include/rest-collision.hh +++ b/lily/include/rest-collision.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -17,13 +17,13 @@ class Rest_collision : public Item { Link_array rest_l_arr_; Link_array ncol_l_arr_; public: - void add (Note_column*); + void add_column (Note_column*); DECLARE_MY_RUNTIME_TYPEINFO; Rest_collision(); protected: virtual void do_post_processing(); virtual void do_pre_processing(); virtual void do_print() const; - virtual void do_substitute_dependency (Score_elem*,Score_elem*); + virtual void do_substitute_dependency (Score_element*,Score_element*); }; #endif // REST_COLLISION_HH diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 65cddc848e..493472c0e7 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -19,7 +19,7 @@ public: int position_i_; Rest (); - void add (Dots*); + void add_dots (Dots*); protected: virtual void do_add_processing (); virtual Molecule * brew_molecule_p () const; diff --git a/lily/include/score-bar.hh b/lily/include/score-bar.hh index 298404da5d..83c8e0bbaa 100644 --- a/lily/include/score-bar.hh +++ b/lily/include/score-bar.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -19,7 +19,7 @@ class Score_bar : public virtual Bar { public: DECLARE_MY_RUNTIME_TYPEINFO; - SCORE_ELEM_CLONE(Score_bar); + SCORE_ELEMENT_CLONE(Score_bar); protected: void do_pre_processing (); }; diff --git a/lily/include/score-column.hh b/lily/include/score-column.hh index e82b51aa80..10d55a798d 100644 --- a/lily/include/score-column.hh +++ b/lily/include/score-column.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -11,7 +11,7 @@ #define SCORE_COLUMN_HH #include "lily-proto.hh" -#include "varray.hh" +#include "array.hh" #include "moment.hh" #include "p-col.hh" @@ -36,7 +36,7 @@ class Score_column : public Paper_column { public: int break_penalty_i () { return break_penalty_i_; } DECLARE_MY_RUNTIME_TYPEINFO; - SCORE_ELEM_CLONE(Score_column); + SCORE_ELEMENT_CLONE(Score_column); /// length of notes/rests in this column Array durations; diff --git a/lily/include/score.hh b/lily/include/score.hh index 667e443402..7817d7f891 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -3,14 +3,14 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef SCORE_HH #define SCORE_HH -#include "varray.hh" +#include "array.hh" #include "lily-proto.hh" #include "plist.hh" #include "string.hh" @@ -34,7 +34,7 @@ public: ~Score(); void process(); - void add (Music_output_def *def_p); + void add_output (Music_output_def *def_p); void print() const; private: void run_translator (Music_output_def*); diff --git a/lily/include/script-column.hh b/lily/include/script-column.hh index 1b7328b1e5..99c053b10a 100644 --- a/lily/include/script-column.hh +++ b/lily/include/script-column.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1998 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -18,14 +18,14 @@ class Script_column : public Horizontal_vertical_group_item { protected: virtual void do_print() const; - virtual void do_substitute_dependency (Score_elem*, Score_elem*); + virtual void do_substitute_dependency (Score_element*, Score_element*); virtual void do_pre_processing() ; public: Link_array