]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.0.1
authorfred <fred>
Sun, 24 Mar 2002 20:12:25 +0000 (20:12 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:12:25 +0000 (20:12 +0000)
199 files changed:
flower/axis.cc
flower/choleski.cc
flower/cpu-timer.cc
flower/data-file.cc
flower/dictionary.cc
flower/directed-graph.cc
flower/dstream.cc
flower/full-storage.cc
flower/include/acursor.hh
flower/include/arithmetic-operator.hh
flower/include/axes.hh
flower/include/cpu-timer.hh
flower/include/cursor.icc
flower/include/data-file.hh
flower/include/dictionary-iter.hh
flower/include/dictionary.hh
flower/include/directed-graph.hh
flower/include/dstream.hh
flower/include/file-path.hh
flower/include/flower-debug.hh
flower/include/full-storage.hh
flower/include/full-storage.icc
flower/include/interval.tcc
flower/include/iterate.hh
flower/include/libc-extension.hh
flower/include/list.tcc
flower/include/matrix-storage.hh
flower/include/matrix.hh
flower/include/nscalar.hh
flower/include/parray.hh
flower/include/plist.tcc
flower/include/pointer.hh
flower/include/pointer.tcc
flower/include/pqueue.hh
flower/include/priorities.hh
flower/include/rational.hh
flower/include/real.hh
flower/include/scalar.hh
flower/include/string-data.hh
flower/include/string-data.icc
flower/include/string-handle.hh
flower/include/string-handle.icc
flower/include/string.icc
flower/include/virtual-methods.hh
flower/interval.cc
flower/matrix-debug.cc
flower/matrix.cc
flower/nscalar.cc
flower/offset.cc
flower/scalar.cc
flower/stringutil.cc
lib/include/duration-convert.hh
lib/include/file-storage.hh
lib/include/input.hh
lib/include/mapped-file-storage.hh
lib/include/plet.hh
lib/include/simple-file-storage.hh
lib/include/warn.hh
lib/input.cc
lib/moment.cc
lib/plet.cc
lib/simple-file-storage.cc
lib/source.cc
lib/template.cc
lily/atom.cc
lily/audio-element.cc
lily/bar-column.cc
lily/beam-swallow-trans.cc
lily/boxes.cc
lily/change-iterator.cc
lily/change-translator.cc
lily/chord-iterator.cc
lily/col-info.cc
lily/colhpos.cc
lily/collision.cc
lily/crescendo.cc
lily/dot-column.cc
lily/dots.cc
lily/engraver.cc
lily/general-script-def.cc
lily/global-translator.cc
lily/gourlay-breaking.cc
lily/idealspacing.cc
lily/identifier.cc
lily/includable-lexer.cc
lily/include/abbrev.hh
lily/include/atom.hh
lily/include/audio-element.hh
lily/include/axis-group-item.hh
lily/include/axis-group-spanner.hh
lily/include/bar-column.hh
lily/include/beam-swallow-trans.hh
lily/include/break-align-item.hh
lily/include/break-caching.hh
lily/include/break.hh
lily/include/change-iterator.hh
lily/include/change-translator.hh
lily/include/chord-iterator.hh
lily/include/col-info.hh
lily/include/colhpos.hh
lily/include/collision.hh
lily/include/crescendo.hh
lily/include/direction.hh
lily/include/dot-column.hh
lily/include/dots.hh
lily/include/drul-array.hh
lily/include/general-script-def.hh
lily/include/global-translator.hh
lily/include/gourlay-breaking.hh
lily/include/header.hh
lily/include/includable-lexer.hh
lily/include/ineq-constrained-qp.hh
lily/include/line-spacer.hh
lily/include/linespace.hh
lily/include/lyric-engraver.hh
lily/include/minterval.hh
lily/include/molecule.hh
lily/include/music-list.hh
lily/include/music-output-def.hh
lily/include/music-output.hh
lily/include/music.hh
lily/include/my-lily-lexer.hh
lily/include/notename-table.hh
lily/include/p-col.hh
lily/include/p-score.hh
lily/include/property-iterator.hh
lily/include/qlp.hh
lily/include/qlpsolve.hh
lily/include/request-iterator.hh
lily/include/request.hh
lily/include/rest-collision.hh
lily/include/rest.hh
lily/include/score-bar.hh
lily/include/score-column.hh
lily/include/score.hh
lily/include/script-column.hh
lily/include/separating-group-spanner.hh
lily/include/single-malt-grouping-item.hh
lily/include/spring-spacer.hh
lily/include/staff-info.hh
lily/include/staff-sym.hh
lily/include/swallow-perf.hh
lily/include/symtable.hh
lily/include/tex-outputter.hh [new file with mode: 0644]
lily/include/tie.hh
lily/include/translation-property.hh
lily/include/translator-change.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/include/voice-iterator.hh
lily/include/word-wrap.hh
lily/ineq-constrained-qp.cc
lily/key.cc
lily/lexerinit.cc
lily/line-spacer.cc
lily/mixed-qp.cc [new file with mode: 0644]
lily/molecule.cc
lily/music-list.cc
lily/music-output-def.cc
lily/music.cc
lily/note-head.cc
lily/notename-table.cc
lily/plet-swallow-engraver.cc
lily/property-iterator.cc
lily/qlpsolve.cc
lily/request.cc
lily/rest-collision.cc
lily/rhythmic-head.cc
lily/score-bar.cc
lily/score-column.cc
lily/scores.cc
lily/script-column.cc
lily/script-def.cc
lily/separating-group-spanner.cc
lily/single-malt-grouping-item.cc
lily/spanner.cc
lily/spring-spacer.cc
lily/staff-info.cc
lily/swallow-perf.cc
lily/symtable.cc
lily/template1.cc
lily/template2.cc
lily/template3.cc
lily/template4.cc
lily/template5.cc
lily/template7.cc
lily/template8.cc
lily/tex-beam.cc
lily/tex-stream.cc
lily/tex.cc
lily/text-item.cc
lily/text-spanner.cc
lily/translation-property.cc
lily/translator-ctors.cc
lily/translator-group.cc
lily/translator.cc
lily/type-swallow-trans.cc
lily/warn.cc
lily/word-wrap.cc

index 92a1dea00132502821aab0de46c46c1dfcab457a..73b8a8ec1a735af8bd147e633f2de9ce56088606 100644 (file)
@@ -3,18 +3,16 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <assert.h>
-
 #include "axes.hh"
-#include "string.hh"
 
 String
 axis_name_str (Axis a)
 {
-  return String (char(a + 'x'));
+  return to_str (char(a + 'x'));
 }
 
 /*
index 5793fceae4e968ef7baa89a53c3268fad8dd3338..8fa18c67f52433881da099ae157871c8cc633701 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "choleski.hh"
index a4d79a37761431289d85258b77a72928c1945923..f0b49b5c72c47a86f611c1aec35bd0a9caba9875 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "cpu-timer.hh"
index 5a273c5dbb6b33b5f022b289a05f3a26d8266169..996752cfce34d48e6f8d6d22f8a1e7a7aab2d291 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the Flower Library
   
-  (c) '95, '96, '97 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) '95, '96, '97 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
   */
 #include <fstream.h>
@@ -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 ()
+{
+}
index d8e50282cb49a19c3fbae7719b1be5955df1a08d..3f46028fa82c2b91ff69252ca12c7fe36e4c9445 100644 (file)
@@ -3,7 +3,9 @@
 
 
 /**
-   neuk. hsearch_* is te dom.
+   Dictionary implementation.  Please fix me.
+
+   (neuk. hsearch_* is te dom.)
  */
 template<class T>
 class Dictionary<T>
index 5c61a41963119a28b6dd1e56c09da66c34c5bf16..b3525e71568529d9fafc7594bf6f01f8182427e0 100644 (file)
@@ -3,7 +3,7 @@
 
   source file FlowerLib
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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)
index 7857d33338a7e36841d430054e82776ec1947b1f..fc15680d92af70110fefa5f34929bea4d0dccdde 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <fstream.h>
@@ -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;
     }
 }
+
index 4fc5605cfb01b5d8f0e706bca174369b9b329362..987a98ec042b147508a50ca8d272d39109638034 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "full-storage.hh"
index d49dbd6b4ef3950f412f0f0cbe4980b7eab5a815..5bb488d4dbbd52c15b8ca5dc595c2596fbc3f107 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 4a472819e3d9507a45bb990e8496c7e9e0a5baff..17e67a47d4cf2af8fc9b92343609a2bb3063c9b8 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the Flower Library
   
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
index 786e5157b76130201ce1396344e756cadf8803c2..1b54089c17aa52a1ddeabcadd93901176844fa68 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 65def573e533f87d465175048a24692a1f3ec8a4..f9d020dc4673a9a9a10ffc20ab2fd466d4d078aa 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index a000736b1e4955bcba29b9b8017c8a78f4832900..416faa52e8494568b06f4ce267b629ae6493017e 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index f371c39092553fc33cb3bbc9577df5585557a391..56894ab50b91b04f964dbd7f03f235cf49b64f0f 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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 << ")"<<flush;    
-  }    
-
-  warning (String s) {
-    message ("warning: " + s);
-  }
-  error (String s){
-    message (s);
-    exit (1);    
-  }
+  Data_file (String);
+  ~Data_file();
+  /**
+     eat complete file
+     @post
+     eof () is true
+  */
+  String gulp ();
+  void warning (String s);
+  void error (String s);
 };
 #endif // DATAFILE_HH
index 414d62b77f51f0d39432df1e374df10528987add..9183c5d585934581b5d0fea755c105bb83fffb81 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 2e16bed20112658b951c65422f225ad664340820..b25fc84b49ac106368bb0d94eb288b66a4df993c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 33c9e4ee236ad8b405c1d65af29ac9688dbe21dd..af898a4028a1504a04f6e44f3e4f00958a6e5348 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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;
index c1c04f39219ca21326269df3a63d63a98bef59f8..a7379268ebcfae2c71f3ae4189ff871155680625 100644 (file)
@@ -3,13 +3,14 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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<String, bool> *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.
   */
index 67d3129f10589ff9176840a795881ca4aadc7bde..d5fed491ff4ff45a895727b164fe1ba8505ae83d 100644 (file)
@@ -3,13 +3,13 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #ifndef PATH_HH
 #define PATH_HH
 #include "string.hh"
-#include "varray.hh"
+#include "array.hh"
 
 
 /**    
index 5c8138e94625e438c288302e3bdcd2908f6179c1..16bc73a00758c7d962cf6164df0c738a34a2d101 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 4d68e128288df554312db85a0556245e956bba05..f9de76979c44bcf8d6bf2d13aeda479cac996f28 100644 (file)
@@ -3,14 +3,14 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef FULL_STORAGE_HH
 #define FULL_STORAGE_HH
 
-#include "varray.hh"
+#include "array.hh"
 #include "real.hh"
 
 #ifndef INLINE
index 008f4169f5c5c58f4814679fe0571b641e7555a4..55cba88472fb07d83c8b60de75f0c486856d151c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index d6c93b48f2e136d73ef6d70700f081a2de5fae32..382ec67523e5f11424213cd75ee869fad79a8f28 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index d68226777fd8b2ee41f63bce0776a866fe212ebc..c8b179e68ccd01ad74b4cb75bfaf1e306efe09b4 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the flowerlib
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 051077b6e771620794a8083e302e721560468b92..a9f04e1e7199391ca3a77c63178ea521cb60382a 100644 (file)
@@ -3,17 +3,17 @@
 
   source file of the flowerlib
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef LIBC_EXTENSION_HH
 #define LIBC_EXTENSION_HH
-#include "fproto.hh"
 
+#include "fproto.hh"
 #include "config.hh"
-
 #include <cstddef>
+#include <stdarg.h>
 
 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
 
 
index 6cba5338489c2a78859a10e5359327ee15d2b9ea..90c150d2c92254e83609674b38ad768e68b623e4 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #ifndef LIST_CC
 #define LIST_CC
index 581e6ee937f5659c897bedc6b8b9e3e33ebbaf1f..2dd51ba9bb70dd23fa381c46591b8dabd4e40077 100644 (file)
@@ -3,14 +3,14 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef MATRIX_STORAGE_HH
 #define MATRIX_STORAGE_HH
 
-#include "varray.hh"
+#include "array.hh"
 #include "real.hh"
 
 /** 
index 64ba718215d17eb38eb6cca4a7c27a7a6c830753..d94601a5ce76fb3290cdfe46e2b92f917a3fb44c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -137,7 +137,7 @@ public:
   Vector row (int) const;
   Vector col (int) const;
 
-  operator String() const;
+  String str () const;
   void print() const;
   ~Matrix ();
 };
index 774f2e7dc1221062edae664739890fcb75817f1a..b2aa4d62839b8220c81052387a51d3b40a53a3de 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index c6caad2c2f0846e32efe2c494ebc74ad8ceccd70..b737d7bb47ce2e4ae8d5b25b7efb1e3b0db27441 100644 (file)
@@ -3,14 +3,14 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef PARRAY_HH
 #define PARRAY_HH
 
-#include "varray.hh"
+#include "array.hh"
 
 /**
   an array of pointers.
index 794e0b0fc1f0a03faf180b2d60b9b7a015116acd..0c2e3888f7cd703f97b56021017512662e85ec2c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 803af25ab91661bfd2dbf8c455894f3fabdb0fa0..48a86e118ada25405866ec4638917f2ca6d551b8 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 4c82e7d27ed5e008c0ee1ffdd7e33feda612cce1..9829d5399cfa12fd2f12dd8147a9e3448c504406 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 67726d47f1feb2ffa71195bb92350dc9021cd27d..ba48993ccb94028f4e24adb171dc2512b8a78733 100644 (file)
@@ -3,13 +3,13 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef PQUEUE_HH
 #define PQUEUE_HH
-#include "varray.hh"
+#include "array.hh"
 
 
 template<class K, class T>
index 4b804ba275ab4b6ec60f571cd16e5ef37564bd20..7a8240b9fc260da6d1144f66465dae14adfc76d2 100644 (file)
@@ -3,14 +3,14 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef PRIORITIES_HH
 #define PRIORITIES_HH
 
-#include "varray.hh"
+#include "array.hh"
 
 /**
   A sorted (uni)set. Should connect with PQueue
index 3c15f76c4f5749c4d9f4e23cf770daac0d9d573f..115d5f85c7555fc34ff59d00f5ac69dab1379d92 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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);
index 05e214ac16d0667379a62707678f4b5d13b6ea06..50459fb57fe1e4818de4534b3015f61264041467 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index e8c58e684e06f106930f219865f8b9c492a4c52e..a963a2fb2a4a620af96ac17bf576841b79efadec 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 
 #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;
index 7695bedde6c8c234be48cdff422aaf2cb19284a2..01de40cab7c6a7aa531f2c26ccefe12b0e9fe678 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 599b9d82a632b01bd62a2e24d16f50eeeaa972de..0626601a35ba37832e48ddd130e7b9df17045aeb 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of Flower lib
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #ifndef STRINGDATA_INL
index 08b957c51f9aae49bec85087077f51e463027849..3e39e6afbeab86347e5dcf50ed2baaec95508388 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 6f9d908f57d3c4dd5a569b1b66c5cba65aa04bfb..74b755b22c414d1f011274f88b4d96bb6713f2e7 100644 (file)
@@ -4,7 +4,7 @@
 
   source file of Flower lib
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #ifndef STRINGHANDLE_INL
index 3bdbb0336e5ff3df41e64d07ae641aa5b6a0f590..7b4985b8c3cd1da14ee9b5d96d3f2ad21e89954f 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the Flower Library
   
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
index 2ce3d4056989ab9af030b5814f126b3be7d40727..27557117e3c84fc2fe18934968ee38c6495863b7 100644 (file)
@@ -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 <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #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); }
 
 
 
index 2a71fea2327574039165014c90910f5aeebbb4d6..571d23f530514c241a11b2ae6b016056a4859fcd 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -22,7 +22,7 @@ Interval_t<Real>::infinity ()
 String
 Interval_t<Real>::T_to_str (Real r)
 {
-  return String (r);
+  return to_str (r);
 }
 
 template INTERVAL__INSTANTIATE (int);
@@ -36,6 +36,6 @@ Interval_t<int>::infinity ()
 String
 Interval_t<int>::T_to_str (int i)
 {
-  return String (i);
+  return to_str (i);
 }
 
index 82080f2a6d8a560930ba15498a5ef22c4bbc99d1..d47d019367a36a833bb73e6df15e91cc05352fac 100644 (file)
@@ -3,24 +3,25 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #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
 }
index 314447220a3ec3ff000205cc54f7df233c03cec4..cdf3eccf7708bfe9422fbd88f4327cd019715675 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "matrix.hh"
index 75bbe6bad468109dbd2ff48d602cb6af17069e8a..2015e3ff239becef73ab6ece5fbda5de9df9eb3e 100644 (file)
@@ -3,6 +3,6 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
index d92c3af31ac0ccaf2ae8414d4d7084005224cdd4..7f0a6949e38054783a3dd17b3804c4bebdd096f0 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include <math.h>
 
@@ -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
index bdd2452ad7b5216ac23afc71f617b621172bb491..c1f69eda6002d6ad4caf797d0ff752358997932e 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the Flower Library
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <assert.h>
index f10adcb623915706ef93aa150515df4a8eb046ba..f3c2906c2797f7eb9f05962125db269378c88e80 100644 (file)
@@ -6,7 +6,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl> */
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl> */
 
 #ifdef STRING_DEBUG 
 #define memmove mymemmove
index 82e102d4c89577474cfb4c5fbd3d19c934961043..fc7ee51d970b69a30e9a4b67cc083e93ba5cc563 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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).
index b2e679bb574bf76b7d658470ef4f3292f1f79d91..4e6fca65ef22d3aa5178077401d1105c2764d079 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index ac0780b21d39f110bf3b03f127561f5dcfc55972..afdf6eff224290617fee9f414a5a8204894436dd 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 506bbc978f8d3ba33dc302dbf221e689de7c239e..50b12f51784cddaf3c0f3f8fe738c7b981312dab 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
index de32eb1753cfa2802e491f51bda933ad40d16587..05b6297704b4aa987f72febc7c191d662a49591c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 4f4bd591999f455c14dc17640d1da1cfa6d1fc5a..1fe0136c508627b9c950e3ffe440b8d6fbc02385 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
index 27bc4ff75953894cd2fad01d8c9b1d5e2d5ede6f..e22d320f334e50eec098124e679c58a00f591897 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 46ddcb2ca60f8073ac7decafe65cf46fd8caf564..4283783f8de03376e105a31ca39fc79402c5caf9 100644 (file)
@@ -3,7 +3,7 @@
 
  source file of the LilyPond music typesetter
 
- (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+ (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #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") + ")";
 }
index d29ce9065bc9d91e1820f39e51525e14586421de..0f49d0aa211f7e267bea220851fd52d0c98507d1 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <iostream.h>
index 9a098cc4c9b7c4ce60fe90f4ac0b1264f66eaf45..b27ecc9c0be7aa5b207defb03b5dad96f043d7d0 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "plet.hh"
index 561ab838c960c30270ee29b1378035b88efa457a..1fd7ea7fc963c7a946fff5c5208e7f875e88dac8 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <stdio.h>
 #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);
index 5d384f757e5bbb1246d441833e0e707bf8cd329c..81423bb1cb95b01a5a4b063628dbcd4f128f1bc1 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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;
index 4ebec57399ddf78d49b899db6be38ad9332a78ca..7b7a3c229a004764aa850903ade94899a56b2697 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "config.hh"
index eba9660c922c8e1fb3cfdeece3e20509e4162363..48b5c737202b1b126d42d32321c13942750ebe57 100644 (file)
@@ -3,14 +3,16 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
+
+
 #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: " <<tex_<<"\n";
+  DOUT << "texstring: " << tex_ << '\n';
 
   DOUT << "dim:";
-    for (Axis i=X_AXIS; i < NO_AXES; incr(i))
-      DOUT << axis_name_str(i) << " = " << dim_[i].str();
+  for (Axis i=X_AXIS; i < NO_AXES; incr(i))
+    DOUT << axis_name_str(i) << " = " << dim_[i].str();
 
   DOUT << "\noffset: " << off_.str ();
 #endif
@@ -80,26 +82,18 @@ Atom::Atom (String s, Box b)
 String
 Atom::str() const
 {
-  return "Atom (\'"+tex_+"\', (" + dim_.x().str () + ", "
+  return String ("Atom (\'") + tex_ + "\', (" + dim_.x().str () + ", "
     + dim_.y ().str () + "))";
 }
 
-
-String
-Atom::TeX_string() const
+Offset
+Atom::offset () const
 {
-  String tex_str = tex_;
-  if (check_infinity_b ())
-    tex_str += "\errormark";
-  
-   // whugh.. Hard coded...
-  String s ("\\placebox{");
-  s += print_dimen (off_[Y_AXIS])+"}{";
-  s += print_dimen (off_[X_AXIS]) + "}{";
-  s += tex_str + "}";
-  return s;
+  return off_;
 }
 
+
+
 void
 Atom::translate_axis (Real r, Axis a)
 {
index 18f265c46edd46915791a0ba6fe0049cd25f3f85..bffe351af4fe60fa0b79d69ae8638fbec18a612d 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "audio-element.hh"
index 57bf47660d8665d62442b41010950fa4bf97fbff..e61c398900b5d1cb9bb36fa580b3133354e6e63c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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;
     }
 }
 
index 38418fc3330dadd1b9a6f3b79b0b5070bf6f1d2b..f6a4194ca7ff27ac1c627b05e72e2b75c978d8f3 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
index 0e9befcad228af92749c6a6523ece36e0ce17c7f..92c8fa6c5aab8f5d7484a2dc2d3d897c4095afce 100644 (file)
@@ -3,11 +3,11 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "boxes.hh"
-#include "varray.hh"
+#include "box.hh"
+#include "array.hh"
 
 void
 Box::translate (Offset o)
index 681ac2ae0fd48c419b84f23d6c4fa51f48987d4d..4f97c77fd78bf52b9a486a776a73b93956bcd395 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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);
index 54bbed8e814a31fd9a7ca43af674a32bb98450d5..771e8d43b1fe0ee098e4a8869f64bba383085e77 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "change-translator.hh"
index 1629d3fb377cebcc44e09eab5bfef08fb219625b..777a9bcb4431e59ca2da1c23035733fa8337f14a 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "translator-group.hh"
index 85287257b0647f6ac480ea90a9db72a010e19fd5..581a9491b74db9a14cee9babe7a2179000cb2e59 100644 (file)
@@ -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 <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "p-col.hh"
 #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 ();
 }
index 1e90ffeb373813a13e43174bf9d75321f1a52e51..8e37871558d60de740afe0d684898cd19a39b6ef 100644 (file)
@@ -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 <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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);
 }
index 2da1e0ddae97e26025df1f96f85ab5d10c9c5975..c63c71747c1f300c1971ff94b6ea3acd0ce846dc 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #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));
 }
index 0dee71825b0d00460808363c74b578cefb0a6974..4b59b529ad24f80403de4308c1ab415de6081f53 100644 (file)
@@ -3,11 +3,11 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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;
 }
 
index 4c44095826f217b81fb5745260afa0d0a6408960..bb1885ca88e5660373978cb81aa139bf4dcc5f5d 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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);
index 20cf87a51508fd23bc007abdc36f056c3915478f..370ea3dbe7ae46272e2fe5efe0564bf8b09a0238 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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);
index 2ccf33506924ee75afc90f7ccff9c9f2ea6985e2..696bedcf2e26b2a2cf039a9975ef8f9b7ca7f3d7 100644 (file)
@@ -3,7 +3,7 @@
 
   Sourcefile of GNU LilyPond musictypesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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);
 }
index 9d7b657880b52566f13350ed907966232c5d7ee2..ba7da733e29d57ecf9db91fd57d86ac2ed3e470c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 3620c52d694457812d6a7de919e55347b5faf173..1c8179441f5dcc95ffa9d10674983b51a5a6f2b0 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "global-translator.hh"
index 58e08b959c4f473e40840ec97d5bb2e26feb24f7..d8fda8415c363d96d14973201049b74e1e4d4178 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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<Col_hpositions>
+Array<Column_x_positions>
 Gourlay_breaking::do_solve () const
 {
   Array<Break_node> optimal_paths;
@@ -60,7 +60,7 @@ Gourlay_breaking::do_solve () const
   for (; break_idx< breaks.size (); break_idx++) 
     {
       Array<int> candidates;
-      Array<Col_hpositions> candidate_lines;
+      Array<Column_x_positions> candidate_lines;
       Pointer_list<Line_spacer*> 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 << "]"<<flush;
+       *mlog << "[" << break_idx << "]" << flush;
     }
 
   if  (break_idx % HAPPY_DOTS_I) 
-    *mlog << "[" << break_idx << "]"<<flush;
+    *mlog << "[" << break_idx << "]" << flush;
 
   Array<int> final_breaks;
 
-  Array<Col_hpositions> lines;
+  Array<Column_x_positions> lines;
 
   /* skip 0-th element, since it is a "dummy" elt*/
   for (int i = optimal_paths.size ()-1; i> 0;) 
index 64c1866fd8b3a95a71ece28c1db826e31d51a873..f2638e0603e13cc6f8a9e6641e2ec1f70cf609a5 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "idealspacing.hh"
@@ -16,7 +16,7 @@ Idealspacing::print() const
 {
 #ifndef NPRINT
   DOUT << "idealspacing {" ;
-  DOUT << "distance "<<space_f_<< " strength " << hooke_f_ ;
+  DOUT << "distance " << space_f_ << " strength " << hooke_f_;
   DOUT << "left " << left_i_ << " right " << right_i_ << "}\n";
 #endif
 }
index 69b3ca1c4030cdba12d4d1cd0269971d32c371d8..71f093fdfef0fa6fdcf59bb2da7ff204eaa5561f 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <assert.h>
@@ -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);
 
index 2d3b45597d2496496b57dc6a0342f8fa63dcf60e..1adf85425d4d6f5eef95fc944d10e19ec41a1083 100644 (file)
@@ -3,16 +3,25 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
+
+#include <strstream.h>
+
 #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<<flush;
+  *mlog << "[" << s<<flush;
   include_stack_.push (sl);
 
   /*
@@ -48,6 +57,21 @@ Includable_lexer::new_input (String s, Sources  * global_sources)
   yy_switch_to_buffer (yy_create_buffer (sl->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 << "]"<<flush;
+  *mlog << "]"<<flush;
   yy_delete_buffer (yy_current_buffer);
   yy_current_buffer = 0;
   if (state_stack_.empty ())
     {
+      yy_current_buffer = 0;
       return false;
     }
   else
index ace2cffa532b72124bb4991714578675c95440d4..f0df714af25cf9be8825d5515fef1dca67fe0fc3 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -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 ();
index b145383d7dc578066fd9c1d310fa34721169dcbb..d7c31ee35ce2589ef87f2bec24fe3c3680c478c5 100644 (file)
@@ -3,14 +3,14 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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
index 6fe2a8e068603903cd89d78f3a48406c474dd78b..db7e4097d3b12780fcd0688f14f0d39a55d55345 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index c61a0810201bc63fbb3c055cddff429c27c761eb..be1a78b6ca0fcf9955b2d8effc5a5ab67a9233c6 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 64c2df98b2cd6bc964774969baf292ff4faa9618..15022e2d800c20110a4bb86b8d068724c7b1cd82 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 84c32113eace328d2898d483459f3bfcb3556504..2db6cbe2640080fd5c32d8aa22363a3a813a8140 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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;
 };
 
index 760704fc50cfce0aa9f22b970f016d842185afdb..9165b6d813e66b5ea5ed96a11965d103d12a50f6 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
index 9d800f8ca6d89f6386fdcd2fa5cb483e40bd2e42..6b5a1e4014b46adc2e539923cfed4f28e816e148 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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
index 188360d0132c20abf74a39ebed9a4c0d84d3e7db..706c5c3dfcfd1ad84b552f9acd25679fc4bea406 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -16,7 +16,7 @@
 struct Break_caching : Break_algorithm
 {
     void do_set_pscore();
-    Array<Col_hpositions> do_solve() const;
+    Array<Column_x_positions> do_solve() const;
 };
 
     
index 4499686f1060e2818e47045fe0d23db0e03a1ab1..f3b3deb18b1b58de4aaa3481494d5e00809df993 100644 (file)
@@ -3,13 +3,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996,  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996,  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #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<Col_hpositions> do_solve() const=0;
+  virtual Array<Column_x_positions> 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<Col_hpositions> solve() const;
+  Array<Column_x_positions> solve() const;
 };
 
 #endif // BREAK_HH
index e4adf804e1944c75c8f1e363ae2ac5587535ffd6..a4d435be5b9b46f59c762b2091871778832f09ac 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 8c759717ed5d55697c04aae650c99f708dcd8d33..b369462ca2b5c1c9c383337e5076e1ea5f7db392 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 0a3c9fa64a7e38f2c516aaed2b0e26de595e09ca..1dea4149614e7f38b2d95057d0350c261247bccc 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 49694352d091316dc5a67626e157925daf0e1942..a01afd3c746d30dbc3f34d6273028fd126590c60 100644 (file)
@@ -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 <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -23,7 +23,7 @@ struct Spacer_rod {
 
 
 /// helper struct for #Spacing_problem#
-struct Colinfo {
+struct Column_info {
   Paper_column *pcol_l_;
   P<Real> fixpos_p_;
 
@@ -35,8 +35,8 @@ struct Colinfo {
   Drul_array< Array<Spacer_rod> > rods_;
   
   /* *************** */
-  Colinfo();
-  Colinfo (Paper_column *,Real const *);
+  Column_info();
+  Column_info (Paper_column *,Real const *);
 
   int rank_i () const;
   void print() const;
index 01a87167ba10fef873a082c095eba138f7949598..e46991dc33f33ad74bab582494d6fb3f5562ae08 100644 (file)
@@ -1,18 +1,18 @@
 /*
   colhpos.hh -- part of GNU LilyPond
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #ifndef COLHPOS_HH
 #define COLHPOS_HH
 
-#include "varray.hh"
+#include "array.hh"
 #include "lily-proto.hh"
 
 typedef Array<Paper_column*>  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;
 };
 
index 9d47efb5139e42c5ec5798440e9f5d243eb44b12..9a7505163bc38867a7cdf46d852e71fb3bbb3c8b 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 */
 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<Note_column> clash_l_arr_;
     DECLARE_MY_RUNTIME_TYPEINFO;
-    void add (Note_column*ncol_l);
+    void add_column (Note_column*ncol_l);
     Collision();
 };
 #endif // COLLISION_HH
index 0b62f658102dde03cd4fb64e3c987c9c8a783ebc..02a311c60efdd1b2366609d3c9691ee9da90b107 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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;
index 416b3fc33f1efc895a960f6df8b392231e422d26..8afa94ce43eefad662952bb06e7dd55a64c8d705 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 9d8d5e552a4a679b8f591742c2b92995d7d3eb13..aa197cd7a327bdb69252f0ef786ef21420e720a9 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -19,13 +19,14 @@ class Dot_column : public Horizontal_group_item
 {
   Link_array<Rhythmic_head> head_l_arr_;
   Link_array<Dots> 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
index 846cf0364f4eafbdf5e936f51fe4a1a4b153969c..4c17ab42c100693e239b1bfb90d36c91907c7424 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 9169a5782876790a23bf02b7931c3da97d1a580f..efc611f76fb1d916757d8dbef443694623b507a3 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 024468e3436a3f4f2486a793a93ee669b7f8eb61..cc6b1e6adcb55c0cea200fd7a39831095a74e75c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index dddfacb0b2d1b4d1a9d451d957340c131ff03a9e..b4381eb70341e3b72a3d54a10ee2601623e94c6b 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index f01df2384885b2bd63adbb3e9f4ddedced21aef7..cc5ed6c38558af9d531fc69f8f038b920b0c7cce 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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<Col_hpositions> do_solve() const;
+    Array<Column_x_positions> do_solve() const;
     Gourlay_breaking();
 };
 #endif // GOURLAY_BREAKING_HH
index 4877f396f61507cd9a8450297559639448025e1c..a6b37dba9f521ae5ca8a8c6facf7e363b8185eb0 100644 (file)
@@ -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 <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #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>
 {
   String lily_id_str_;
   String TeX_string() const;
+  Header ();
 };
 
 #endif // HEADER_HH
index 9cf7087369832046e9946caea707284992c46baf..6837efc1f5fa1b44ae6d57095687062b2be5c500 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -13,7 +13,7 @@
 #include <FlexLexer.h>
 
 #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<YY_BUFFER_STATE> state_stack_;
+
 protected:
   bool  close_input ();
   Array<Source_file*> include_stack_;
   Array<int> char_count_stack_;
+
 public:
+  Includable_lexer ();
+  ~Includable_lexer ();
+
   /// store dependencies for Makefile stuff.
   Array<String> 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 ();
 };
index 3b23cb898f2d4a86df817911859fe1f913ec1c06..5686d9e361efa94fe244457aeeb7ea828647fa37 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 1bc88f52c2df68e8143860e38080825ad9adff4f..a61ac4d9e84e7feb7dd7e38ae1d21b955ba27e83 100644 (file)
@@ -3,14 +3,14 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #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.  */
index a468fad24f1e732fc9884fda408a520d20795c72..8b230ff5161035ef9c9c1518678e5380f814b0ea 100644 (file)
@@ -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 <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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<Idealspacing *> ideal_p_list_;
-    Array<Colinfo> cols;
-    Array<Colinfo> loose_col_arr_;
+    Array<Column_info> cols;
+    Array<Column_info> loose_col_arr_;
     
     /// mark column #i# as being loose.
     void loosen_column (int i);
@@ -81,7 +81,7 @@ public:
     Array<Paper_column*> error_pcol_l_arr() const;
 
     virtual   Array<Real> 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 { 
index 195e4f92dca6fbaf6bdb5a6bf8a05b9cbdd9ad49..ec85670f73ce1b7e65d29454e7dccad2507f1d3c 100644 (file)
@@ -3,14 +3,14 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef LYRIC_ENGRAVER_HH
 #define LYRIC_ENGRAVER_HH
 #include "engraver.hh"
-#include "varray.hh"
+#include "array.hh"
 
 #include "lily-proto.hh"
 
index bb56394a7d40221c63f3c96ffa6ad8266dfaab63..e7f2cf605ae72b7758a158cdb7590f16c2c58580 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 3faccc45f8ec84e2f6a427d1dc145c6c0e691a90..f8edc37c2520b6fa1b1c731eda0949848f35b905 100644 (file)
@@ -3,37 +3,36 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #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<Atom*> ats;     // change to List<Atom>? 
+  Pointer_list<Atom*> atoms_;  // change to List<Atom>? 
 
   /* *************** */
     
   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;
index 018832f7732bce40c27a3cc3cebb86a273ec855a..78a2ac1a6b5fc6b6fc9eec27dc186389198f7668 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index b4cd413412da25941eee67ad3592d71ebc90929e..29f4c11aaeaa225d7a1af7adb9bd3ff7ed342c64 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 6f2807ff2cb5983806ced1cde181c2e8937ffd8e..04a16e5d8d998466b676b81f60ba74f1bec1b5c8 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index b5e85ff184c72d3958e80bf99df9cdd50ca7dca7..083e476f734a9c7c2747cf1f79569037ae411f77 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 42ac85949fc10d6a6bf1eb9730915649e2ee89f3..e4e3d293ed09b1daae8109b1367e5ecae427316b 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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"
index a9181e9d900acb035c456ec8cbd1714f173ae08f..56dd7c3927c9a4dc3e0ad2636237817440f3b7c3 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 5ab02c841037af26c22ee4c99daa6b8e3589ff9c..674139c14973d805a98f2651c85309938798d174 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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<Column_rod> > 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();
 
index 60ebda08cd8be2cb042b76800b703fb62c888b0f..a6b4dc2a9d9c104be18b307faccb8e74fa697d58 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -33,14 +33,14 @@ public:
   Pointer_list<Spanner *> span_p_list_;
 
   /// other elements
-  Pointer_list<Score_elem*> elem_p_list_;
+  Pointer_list<Score_element*> 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<Col_hpositions> const &);
+  void set_breaking (Array<Column_x_positions> 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*);
index f0dfbb5fb9bd9b02a6b638b21e1ed1d74557c650..ac0703dc293e4c95ac14b816f8b9391920ec9fd9 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 82371d363c1377be569b9e4b54eba478ed06775a..2de28843b981a8695dacf3c9db5f80f6bcbf579e 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #ifndef QLP_HH
index dc2aaa5663d6f0d01e41a17f2b6bf75513b4a02e..bf04b55d843de97cd6d7edad9e61bb319e5967d5 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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);
index 8f7a30b4c8960fd66b5fdcb685b16c01beaeb64b..15640ccd74735c26356e3db8bf60c3a7da4808bb 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index a349f5786b859bf4e36717d1ecddf0608607d156..d63a7cd7f18b7c404b255d1b14a03d631baf2de3 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #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&);
 };
 
     
index 4d39f54347ef0166e644704d124661ff9843fc8a..cc6bc84db87570d1f3f63947f1ba113aea8efe45 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -17,13 +17,13 @@ class Rest_collision : public Item {
     Link_array<Note_column> rest_l_arr_;
     Link_array<Note_column> 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
index 65cddc848e6b7eb89d206e91b07dce3e3020547c..493472c0e72caefe697b899dac1ac6e1c08d4d37 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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;
index 298404da5d34bc55be4f2a81786f5edfb82eefc3..83c8e0bbaa81d756627fafdf492e13d3e5c579ab 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -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 ();
 };
index e82b51aa80069f47f8b34bdecec1f8a5e2356207..10d55a798d83287b3c4355420e79db6f752ee7ab 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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<Moment> durations;
     
index 667e44340229c84b99e3110ded8b587e93c92198..7817d7f891a643597d5522e0d7c789b81de02106 100644 (file)
@@ -3,14 +3,14 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #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*);
index 1b7328b1e50ff9a02bff8197a2f96d5aebdba43e..99c053b10a2cb6e26731b8db9efde17cc41e51c2 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -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<Script> script_l_arr_;
     Link_array<Item> support_l_arr_;
     DECLARE_MY_RUNTIME_TYPEINFO;
    
-    virtual void add (Script *);
+    virtual void add_script (Script *);
     void add_support (Item*);
 };
 
index 6ec7d0f8e3053ac9f7c6adf388d405c62d4fb824..b90752479cee9165dc33882aaeefe6894c4ee657 100644 (file)
@@ -3,14 +3,14 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.ruu.nl>
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #ifndef SEPARATING_GROUP_SPANNER_HH
 #define SEPARATING_GROUP_SPANNER_HH
 
-#include "vertical-group-spanner.hh"
+#include "spanner.hh"
 
 
 class Separating_group_spanner : public Spanner
@@ -20,9 +20,9 @@ public:
   DECLARE_MY_RUNTIME_TYPEINFO;
   void add_spacing_unit (Single_malt_grouping_item*);
 protected:
-  SCORE_ELEM_CLONE (Separating_group_spanner);
+  SCORE_ELEMENT_CLONE (Separating_group_spanner);
   virtual Array<Rod> get_rods () const;
-  virtual void do_substitute_dependency (Score_elem*,Score_elem*);
+  virtual void do_substitute_dependency (Score_element*,Score_element*);
 };
 
 #endif /* SEPARATING_GROUP_SPANNER_HH */
index 0e69c49ded3ce2d02e581066736269a47928c4bd..32bfb45e2a94d5eb5d1ef73dbc914fdf03de1f8e 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.ruu.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
    It's 1 30 am.  Naming suggestions appreciated.  */
 class Single_malt_grouping_item : public Item
 {
-  SCORE_ELEM_CLONE (Single_malt_grouping_item);
+  SCORE_ELEMENT_CLONE (Single_malt_grouping_item);
   Link_array<Item> item_l_arr_;
 public:
   Single_malt_grouping_item ();
   Interval my_width () const;
-  void add (Item*);
+  void add_item (Item*);
   DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-  virtual  void do_substitute_dependency (Score_elem*, Score_elem*);
+  virtual  void do_substitute_dependency (Score_element*, Score_element*);
   virtual void do_print () const;
 };
 
index 609fb666d6e6da6d4c18081bd0775678955edc67..defcd15bc3d8cbfe7bdf61d26bd34a68e0682e8c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -48,8 +48,8 @@ class Spring_spacer : public Line_spacer {
   
     
   Pointer_list<Idealspacing *> ideal_p_list_;
-  Array<Colinfo> cols_;
-  Array<Colinfo> loose_col_arr_;
+  Array<Column_info> cols_;
+  Array<Column_info> loose_col_arr_;
   Array<Spacer_rod> rods_;
   
   /// mark column #i# as being loose.
@@ -86,8 +86,8 @@ public:
   static Line_spacer *constructor();
   Real energy_normalisation_f_;
   Spring_spacer ();
-  virtual void solve (Col_hpositions*) const;
-  virtual void lower_bound_solution (Col_hpositions*) const;
+  virtual void solve (Column_x_positions*) const;
+  virtual void lower_bound_solution (Column_x_positions*) const;
   virtual void add_column (Paper_column  *, bool fixed=false, Real fixpos=0.0);
  
 
index 9f03ca73d5181096d4c6714d017118aea7efcb47..8e68983dbe4e256547bc0694c567858c2a4566de 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -14,7 +14,6 @@
 
 /// struct to pass staff info along a Engraver hierarchy.
 struct Staff_info {
-    int *c0_position_i_l_;
     Staff_symbol*staff_sym_l_;
     
     Time_description const *time_C_;
@@ -22,8 +21,6 @@ struct Staff_info {
     Score_column *musical_l_;
     Score_column *command_l_;
 
-    ///
-    bool break_allowed_b_;
     Score * score_l_;
     Score *score_l();
     Paper_column * command_pcol_l();
index 258818db1e6c60f6bde1ed6a569ab7a746d7a5c7..215e41bde97cd541afe89f90c1fe495a259c6e98 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -27,7 +27,7 @@ public:
   Real inter_note_f() const;
   int steps_i() const;
 protected:
-  SCORE_ELEM_CLONE(Staff_symbol);
+  SCORE_ELEMENT_CLONE(Staff_symbol);
   virtual Interval do_height () const;
   virtual Molecule* brew_molecule_p() const;
   virtual void do_print() const;
index 699990c4dbadffe3153dc830f03e625992b0d234..62e14d45f04fc22ed5b119401dda0fd27fe93f61 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 71724eb0ad76f8a11d929bfeb27282ae4e53eb5e..12cf34b11e1fbb18f447b8ee52672781f30fd27a 100644 (file)
@@ -1,9 +1,9 @@
 /*
-  symtable.hh -- declare 
+  symtable.hh -- declare Symtable, Symtables
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
diff --git a/lily/include/tex-outputter.hh b/lily/include/tex-outputter.hh
new file mode 100644 (file)
index 0000000..ce9f772
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+  outputter.hh -- declare Outputter
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef OUTPUTTER_HH
+#define OUTPUTTER_HH
+
+#include "lily-proto.hh"
+#include "array.hh"
+#include "string.hh"
+
+/**
+  Abstract interface for a Score_element to output itself.
+ */
+struct Outputter
+{
+  virtual ~Outputter(){}
+  virtual void start_line ()=0;
+  virtual void output_molecule (Molecule const *, Offset, char const *)=0;
+  virtual void stop_line ()=0;
+};
+
+/**
+  Output a line of score using  TeX strings
+ */
+struct Tex_outputter : Outputter
+{
+  Array<String> font_arr_;
+  String current_font_;
+  
+  Tex_outputter (Tex_stream *);
+  Tex_stream * outstream_l_;
+  void switch_to_font (String);
+  virtual void output_molecule (Molecule const*, Offset, char const*);
+  virtual void start_line ();
+  virtual void stop_line ();
+};
+
+#endif // OUTPUTTER_HH
index d983e164911541245158cfa297d6f9bca5f477b5..a60577109a7d09ee279c5e643442aa1596650f28 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -22,7 +22,7 @@ public:
     void set_head (Direction, Note_head*head_l);
 
     DECLARE_MY_RUNTIME_TYPEINFO;
-    SCORE_ELEM_CLONE(Tie);
+    SCORE_ELEMENT_CLONE(Tie);
 
     bool same_pitch_b_;
     Drul_array<Note_head *> head_l_drul_;
@@ -31,7 +31,7 @@ protected:
     virtual void do_add_processing ();
     virtual void do_post_processing ();
     virtual void set_default_dir();
-    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
+    virtual void do_substitute_dependency (Score_element*,Score_element*);
     Array<Offset> get_controls () const;
 };
 #endif // TIE_HH
index 686f0d938df45c572265993902e192a457784df8..1ddfdffee9c156178d15efe15a24a414da636b5e 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 0220ed70f50527a5f266dd2111720a60158140ee..8de7b806c53b2be89a4ffb1c5c0b94f4d051b102 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 3e00c5b0e108fcc7187fff001f1b5fbd934b2bdf..a1613cba607e62247c3a189fae474d265718c0b8 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 1684809af56aa5eae4511acecaf1aa9b481c9ee8..b96d6807216de8e92d4519bde8c74be92cfa4b3b 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -96,21 +96,27 @@ protected:
   virtual void do_removal_processing() {}
 };
 
+
+template<class T>
+class Translator_adder
+{
+public:
+  static Translator *ctor ()
+    {
+      Translator *t = new T;
+      t->type_str_ = T::static_name ();
+      return t;
+    }
+  Translator_adder () {        
+    add_constructor (ctor);
+  }                            
+};
+
 /**
   A macro to automate administration of translators.
  */
 #define ADD_THIS_TRANSLATOR(c)                         \
-struct c ## init {                                     \
-   static Translator *ctor ()\
-  {\
-        Translator *t = new c;\
-        t-> type_str_ = c::static_name ();\
-        return t;\
-    }\
-    c ## init() {                                      \
-       add_constructor (ctor);\
-    }                                                  \
-} _ ## c ## init;
+  Translator_adder<c> _ ## c ## init;
 
 typedef Translator *(*Translator_ctor) ();
 
index a9fec21204b9649e4994a61e70176d1699419dd3..887999e91225a33e56dbc2d7ee7e10c99816f00b 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 7465c279e64873c3e18e18aedaee07465a6f12d4..0589f4643481923cd57593f136193c033671648f 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -14,7 +14,7 @@
 
 /// wordwrap type algorithm: move to next line if current is optimal.
 struct Word_wrap : Break_algorithm {
-    virtual Array<Col_hpositions> do_solve() const;
+    virtual Array<Column_x_positions> do_solve() const;
     Word_wrap();
 };
 
index 70856b56dc14cb3f1a869e3adff845f7b7f1a6c1..f0e66c0793b5e522f9c966a8c6fead403d3b547b 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include "ineq-constrained-qp.hh"
 #include "qlpsolve.hh"
@@ -17,6 +17,7 @@
 
 const int MAXITER=100;         // qlpsolve.hh
 
+const int MAXDEGEN=5;
 
 /*
   assume x (idx) == value, and adjust constraints, lin and quad accordingly
@@ -119,13 +120,13 @@ Ineq_constrained_qp::constraint_solve (Vector start) const
 
   Vector x (start);
   Vector gradient=quad_*x+lin_;
-  //    Real fvalue = x*quad_*x/2 + lin*x + const_term;
-  // it's no use.
 
+  
+  //    Real fvalue = x*quad_*x/2 + lin*x + const_term;// it's no use.
   Vector last_gradient (gradient);
   int iterations=0;
 
-  while (iterations++ < MAXITER)
+  while (iterations++ < MAXITER && act.degenerate_count_i_ < MAXDEGEN)
     {
       //#ifdef PARANOID
       if (experimental_features_global_b)
@@ -134,7 +135,7 @@ Ineq_constrained_qp::constraint_solve (Vector start) const
       
       Vector direction= - act.find_active_optimum (gradient);
 
-      DOUT << "gradient "<< gradient<< "\ndirection " << direction<<"\n";
+      DOUT << "gradient "<< gradient<< "\ndirection " << direction<< '\n';
 
       if (direction.norm() > EPS)
        {
@@ -162,7 +163,10 @@ Ineq_constrained_qp::constraint_solve (Vector start) const
              if (numerator >= 0)
                {
                  if (numerator > EPS)
-                   warning (String ("Ineq_constrained_qp::solve (): Constraint off by ") + numerator);
+                   {
+                     warning (_f ("Ineq_constrained_qp::solve (): Constraint off by %f", numerator));
+                     act.degenerate_count_i_ ++;
+                   }
                  minalf = -numerator;
                  minidx = ia;
                  break;
@@ -180,23 +184,21 @@ Ineq_constrained_qp::constraint_solve (Vector start) const
 
          Real optimal_step = minalf;
 
-         Vector deltax=direction * optimal_step;
+         Vector deltax = direction * optimal_step;
          x += deltax;
          gradient += optimal_step * (quad_ * deltax);
 
-         DOUT << "step = " << optimal_step<< " (|dx| = " <<
-           deltax.norm() << ")\n";
+         DOUT << "step = " << optimal_step << " (|dx| = " <<
+           to_str (deltax.norm()) << ")\n";
 
          if (minalf < unbounded_alfa)
            {
              /* bumped into an edge. try again, in smaller space. */
-             act.add (minidx.idx());
-             DOUT << "adding cons "<< minidx.idx()<<'\n';
+             act.add_constraint (minidx.idx());
+             DOUT << "adding cons "<< minidx.idx () << '\n';
              continue;
            }
-         /*ASSERT: we are at optimal solution for this "plane"*/
-
-
+         /*ASSERT: we are at the optimal solution for this "plane"*/
        }
 
       Vector lagrange_mult=act.get_lagrange (gradient);
@@ -213,13 +215,14 @@ Ineq_constrained_qp::constraint_solve (Vector start) const
          break;
        }
 
-      DOUT << "dropping cons " << m<<'\n';
-      act.drop (m);
+      DOUT << "dropping cons " << m << '\n';
+      act.drop_constraint (m);
     }
   if (iterations >= MAXITER)
-    WARN<<_("didn't converge!\n");
-
-  DOUT <<  ": found " << x<<" in " << iterations <<" iterations\n";
+    WARN << _ ("didn't converge!") << '\n';
+  if (act.degenerate_count_i_ >= MAXDEGEN)
+    WARN << _ ("Too much degeneracy. ") << '\n';
+  DOUT <<  ": found " << x << " in " << iterations <<" iterations\n";
   assert_solution (x);
   return x;
 }
@@ -246,3 +249,33 @@ Ineq_constrained_qp::dim () const
   return lin_.dim();
 }
 
+
+
+
+void
+Ineq_constrained_qp::assert_solution (Vector sol) const
+{
+  bool sol_b=true;
+
+  for (int i=0; sol_b && i < cons_.size(); i++) 
+    {
+      Real R=cons_[i] * sol- consrhs_[i];
+      if (R> -EPS)
+       sol_b = false;
+    }
+}
+
+void
+Ineq_constrained_qp::print() const
+{
+#ifndef NPRINT
+  DOUT << "Quad " << quad_;
+  DOUT << "lin " << lin_ << '\n'
+       << "const " << const_term_<< '\n';
+  for (int i=0; i < cons_.size(); i++) 
+    {
+      DOUT << "constraint["<<i<<"]: " << cons_[i] << " >= " << consrhs_[i];
+      DOUT << '\n';
+    }
+#endif
+}
index b7d9f22a23e9ef414e4750e051ebea0f43e72f17..e4ca04402c88842c55774a36c76f53e5d176537a 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
   TODO
   transposition.
@@ -21,7 +21,7 @@ void
 Octave_key::print () const
 {
   for (int i= 0; i < 7 ; i++)
-    DOUT << "note " << i << " acc: " << accidental_i_arr_[i] << "\n";
+    DOUT << "note " << i << " acc: " << accidental_i_arr_[i] << '\n';
 }
 
 
@@ -51,12 +51,12 @@ Key::octave_to_index (int o) const
   int i = o + ZEROOCTAVE;
   if (i < 0)
     {
-      warning ("Don't have that many octaves (" + String (o) + ")");
+      warning ("Don't have that many octaves (" + to_str (o) + ")");
       i = 0;
     }
   if (i >= NUMBER_OF_OCTAVES)
     {
-      warning ("Don't have that many octaves (" + String (o) + ")");
+      warning ("Don't have that many octaves (" + to_str (o) + ")");
       i = NUMBER_OF_OCTAVES -1;
     }
   return i;
@@ -74,12 +74,12 @@ Octave_key::set (int i, int a)
 {
   if (a <= -3)
     {
-      warning ("Underdone accidentals (" + String (a)+ ")");
+      warning ("Underdone accidentals (" + to_str (a) + ")");
       a = -2;
     }
   if (a >= 3)
     {
-      warning ("Overdone accidentals (" + String (a) + ")");
+      warning ("Overdone accidentals (" + to_str (a) + ")");
       a = 2;
     }
   accidental_i_arr_[i]=a;
index 8b184bb7add2f6f88dd5598d8ea49160dfb3e20e..ff16209eafa6ed80c2120de2a8dc464b4a3d1b30 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <iostream.h>
index 95b77e24c651abda41254b99827b2cc49c8d094b..ffd65ff34e248bffb6ec5a063ad924179f0f0114 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
diff --git a/lily/mixed-qp.cc b/lily/mixed-qp.cc
new file mode 100644 (file)
index 0000000..33ff245
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+  qlp.cc -- implement Mixed_qp
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "debug.hh"
+#include "qlp.hh"
+
+
+void
+Mixed_qp::add_equality_cons (Vector , double)
+{
+  assert (false);
+}
+
+void
+Mixed_qp::add_fixed_var (int i, Real r)
+{
+  eq_cons.push (i);
+  eq_consrhs.push (r);
+}
+
+
+/**
+  eliminate appropriate variables, until we have a Ineq_constrained_qp
+  then solve that.
+
+  PRE
+  cons should be ascending
+  */
+Vector
+Mixed_qp::solve (Vector start) const 
+{
+  if (!dim())
+    return Vector (0);
+  
+  print();
+  Ineq_constrained_qp pure (*this);
+  
+  for  (int i= eq_cons.size()-1; i>=0; i--) 
+    {
+      pure.eliminate_var (eq_cons[i], eq_consrhs[i]);
+      start.del (eq_cons[i]);
+    }
+  Vector sol = pure.solve (start);
+  for (int i= 0; i < eq_cons.size(); i++) 
+    {
+      sol.insert (eq_consrhs[i],eq_cons[i]);
+    }
+  return sol;
+}
+
+
+Mixed_qp::Mixed_qp (int n)
+  : Ineq_constrained_qp (n)
+{
+}
+
+void
+Mixed_qp::OK() const
+{
+#ifndef NDEBUG
+  Ineq_constrained_qp::OK();
+  assert (eq_consrhs.size() == eq_cons.size ());
+#endif    
+}
+
+void
+Mixed_qp::print() const
+{
+#ifndef NPRINT
+  Ineq_constrained_qp::print();
+  for (int i=0; i < eq_cons.size(); i++) 
+    {
+      DOUT << "eq cons "<<i<<": x["<<eq_cons[i]<<"] == " << eq_consrhs[i]<< '\n';
+    }
+#endif
+}
+
index 613fc0ea1dd5586f8414b9f02222664899dfeba0..032f0742fb037d0e44f2ee94412f602a26c4628f 100644 (file)
@@ -3,31 +3,22 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "interval.hh"
-#include "dimen.hh"
+#include "dimension.hh"
 #include "string.hh"
 #include "molecule.hh"
 #include "atom.hh"
 #include "debug.hh"
 #include "tex.hh"
 
-String
-Molecule::TeX_string() const
-{
-  String s;
-  for (iter_top (ats,c); c.ok(); c++)
-    s+=c->TeX_string();
-  return s;
-}
-
 Box
 Molecule::extent() const
 {
   Box b;
-  for (iter_top (ats,c); c.ok(); c++)
+  for (iter_top (atoms_,c); c.ok(); c++)
     b.unite (c->extent());
   return b;
 }
@@ -35,23 +26,23 @@ Molecule::extent() const
 void
 Molecule::translate (Offset o)
 {
-  for (iter_top (ats,c); c.ok(); c++)
+  for (iter_top (atoms_,c); c.ok(); c++)
     c->translate (o);
 }
 
 void
 Molecule::translate_axis (Real x,Axis a)
 {
-  for (iter_top (ats,c); c.ok(); c++)
+  for (iter_top (atoms_,c); c.ok(); c++)
     c->translate_axis (x,a);
 }
 
 void
-Molecule::add (Molecule const &m)
+Molecule::add_molecule (Molecule const &m)
 {
-  for (iter_top (m.ats,c); c.ok(); c++) 
+  for (iter_top (m.atoms_,c); c.ok(); c++) 
     {
-      add (**c);
+      add_atom (**c);
     }
 }
 
@@ -59,15 +50,15 @@ Molecule::add (Molecule const &m)
 void
 Molecule::add_at_edge (Axis a, Direction d, Molecule const &m)
 {
-  if (!ats.size()) 
+  if (!atoms_.size()) 
     {
-      add (m);
+      add_molecule (m);
       return;
     }
   Real offset = extent ()[a][d] - m.extent ()[a][-d];
   Molecule toadd (m);
   toadd.translate_axis (offset, a);
-  add (toadd);
+  add_molecule (toadd);
 }
 
   
@@ -80,7 +71,7 @@ Molecule::operator = (Molecule const &)
 
 Molecule::Molecule (Molecule const &s)
 {
-  add (s);
+  add_molecule (s);
 }
 
 void
@@ -89,13 +80,18 @@ Molecule::print() const
 #ifndef NPRINT
   if (! check_debug)
     return;
-  for (iter_top (ats,c); c.ok(); c++)
+  for (iter_top (atoms_,c); c.ok(); c++)
     c->print();
 #endif
 }
 
 void
-Molecule::add (Atom const &a)
+Molecule::add_atom (Atom const &a)
+{
+  atoms_.bottom().add (new Atom (a)); 
+}
+
+Molecule::Molecule (Atom const &a)
 {
-  ats.bottom().add (new Atom (a)); 
+  add_atom (a) ;
 }
index e6b652f9872e0f8c3c7c62a34dbb57109045705c..5642127ff3995773a2e5491878481154a27a0484 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -152,10 +152,10 @@ Request_chord::to_relative_octave (Musical_pitch last)
 {
   for (iter (music_p_list_.top(),i); i.ok (); i++)
     {
-      Musical_req *m =((Request*)i.ptr ())->musical ();
-      if (m && m->melodic ())
+      Musical_req *m =((Request*)i.ptr ())->access_Musical_req ();
+      if (m && m->access_Melodic_req ())
        {         
-         Musical_pitch &pit = m->melodic()->pitch_;
+         Musical_pitch &pit = m->access_Melodic_req ()->pitch_;
          pit.to_relative_octave (last);
          return pit;
        }
index 2e9a28786339227261492cd3f373106d97777290..ff1c78ddb9b303262cee6e6a883c440fcce1ecc5 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 5b33f57c54ad4e8b1dcd709992b15ea49685c37b..4ba377fc9157c1c15a7a6a0d3541599ef1a9b863 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
index 3ae349b28bfcef63ecdc2b218ac7e55f4b7010f5..00539b06d072e0e90c7cd85099e09f5756d368ba 100644 (file)
@@ -3,13 +3,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "misc.hh"
 #include "dots.hh"
 #include "note-head.hh"
-#include "dimen.hh" 
+#include "dimension.hh" 
 #include "debug.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
@@ -47,7 +47,7 @@ Note_head::compare (Note_head *const  &a, Note_head * const &b)
 Interval
 Note_head::do_width () const
 {
-  Atom a =  paper ()->lookup_l()->ball (balltype_i_);
+  Atom a =  lookup_l ()->ball (balltype_i_);
   Interval i = a.dim_[X_AXIS];
   i+= x_dir_ * i.length ();
   return i;
@@ -65,14 +65,14 @@ Note_head::brew_molecule_p() const
     ? 0
     : (abs(position_i_) - staff_size_i_/2) /2;
   
-  Atom  s = p->lookup_l()->ball (balltype_i_);
+  Atom  s = lookup_l()->ball (balltype_i_);
   out = new Molecule (Atom (s));
   out->translate_axis (x_dir_ * s.dim_[X_AXIS].length (), X_AXIS);
 
   if (streepjes_i) 
     {
       int dir = sign (position_i_);
-      Atom streepje = p->lookup_l ()->streepje (balltype_i_);
+      Atom streepje = lookup_l ()->streepje (balltype_i_);
       
       int parity =  (position_i_ % 2) ? 1 : 0;
        
@@ -82,7 +82,7 @@ Note_head::brew_molecule_p() const
          Atom s = streepje;
          s.translate_axis (-dir * inter_f * (i*2 + parity),
                           Y_AXIS);
-         out->add (s);
+         out->add_atom (s);
        }
     }
   
index fa86049c65762e317327a5f4940e447b8754428d..9b08369db0b66dc87d0978ac5f485ece35d23b5a 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "notename-table.hh"
index c13957615826e90cbd7192002291f85777513352..0e98605b6c1dcd8802dc14b71f7356f2d95e063c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "musical-request.hh"
@@ -15,7 +15,7 @@ ADD_THIS_TRANSLATOR(Plet_swallow_engraver);
 bool
 Plet_swallow_engraver::do_try_request (Request* req_l)
 {
-  if (req_l && req_l->musical () && req_l->musical ()->plet ())
+  if (req_l && req_l->access_Musical_req () && req_l->access_Musical_req ()->access_Plet_req ())
     return true;
   return false;
 }
index 61a1b933c334ccf03ccea27c1d21407413595912..da30301901a10d06df5aec933a7c76354e6013c4 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "property-iterator.hh"
index 78e07042773efb7ed8b91e7e5025b92d99832a0f..3a249a8a31dcdd6db7f05f7d89cb1c546ba20381 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996,  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996,  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
   TODO:
   try fixed point arithmetic, to speed up lily.
@@ -22,13 +22,13 @@ Active_constraints::status() const
   String s ("Active|Inactive [");
   for (int i=0; i< active.size(); i++)
     {
-      s += String (active[i]) + " ";
+      s += to_str (active[i]) + " ";
     }
 
   s+="| ";
   for (int i=0; i< inactive.size(); i++)
     {
-      s += String (inactive[i]) + " ";
+      s += to_str (inactive[i]) + " ";
     }
   s+="]";
 
@@ -70,78 +70,81 @@ Active_constraints::get_lagrange (Vector gradient)
 }
 
 void
-Active_constraints::add (int k)
+Active_constraints::add_constraint (int k)
 {
   // add indices
   int cidx=inactive[k];
-  active.push (cidx);
-
-  inactive.swap (k,inactive.size()-1);
-  inactive.pop();
 
   Vector a (opt->cons_[cidx]);
   // update of matrices
   Vector Ha = H*a;
   Real aHa = a*Ha;
   Vector addrow (Ha.dim());
-  if (abs (aHa) > EPS)
+  bool degenerate =  (abs (aHa) < EPS);
+
+  if (degenerate)
     {
+      warning (String ("Active_constraints::add ():")
+       + _("degenerate constraints"));
+      DOUT << "Ha = "  << Ha.str () << '\n';
       /*
        a != 0, so if Ha = O(EPS), then
        Ha * aH / aHa = O(EPS^2/EPS)
 
        if H*a == 0, the constraints are dependent.
-         */
-      H -= Matrix (Ha/aHa , Ha);
-
+      */
+      degenerate_count_i_ ++;
+    }
+  if (!degenerate)
+    {
+      active.push (cidx);
+      inactive.swap (k,inactive.size()-1);
+      inactive.pop();
 
-      /*
-         sorry, don't know how to justify this. ..
-         */
+      H -= Matrix (Ha/aHa , Ha);
+      
       addrow=Ha;
-      addrow/= aHa;
+      addrow /= aHa;
       A -= Matrix (A*a, addrow);
       A.insert_row (addrow,A.rows());
-    }else
-      WARN << _("degenerate constraints");
+    }
 }
 
 void
-Active_constraints::drop (int k)
+Active_constraints::drop_constraint (int k)
 {
   int q=active.size()-1;
 
-  // drop indices
-  inactive.push (active[k]);
-  active.swap (k,q);
-  A.swap_rows (k,q);
-  active.pop();
 
   Vector a (A.row (q));
   if (a.norm() > EPS)
     {
+      // drop indices
+      inactive.push (active[k]);
+      active.swap (k,q);
+      A.swap_rows (k,q);
+      active.pop();
       /*
 
        */
-      Real q = a*opt->quad_*a;
-      Matrix aaq (a,a/q);
+      Real aqa = a*opt->quad_*a;
+      Matrix aaq (a,a/aqa);
       H += aaq;
       A -= A*opt->quad_*aaq;
-    }else
-      WARN << _("degenerate constraints");
-#ifndef NDEBUG
-  Vector rem_row (A.row (q));
-  assert (rem_row.norm() < EPS);
-#endif
-
-  A.delete_row (q);
+      A.delete_row (q);
+    }else {
+      degenerate_count_i_ ++;
+      warning (String ("Active_constraints::drop ():")
+       + _("degenerate constraints"));
+    }
 }
 
 
 Active_constraints::Active_constraints (Ineq_constrained_qp const *op)
-  :       A(0,op->dim()),
-         H(op->dim()),
-         opt (op)
+  : A(0,op->dim()),
+    H(op->dim()),
+    opt (op)
 {
   for (int i=0; i < op->cons_.size(); i++)
     inactive.push (i);
@@ -152,6 +155,8 @@ Active_constraints::Active_constraints (Ineq_constrained_qp const *op)
     */
   H=chol.inverse();
   OK();
+
+  degenerate_count_i_ = 0;
 }
 
 /** Find the optimum which is in the planes generated by the active
index 920cc79ca53eb7199f5f6ea7ca77ecc72b2dc07b..bf20a29075e8877ace511833dde9fc88dfdb092f 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "request.hh"
@@ -28,9 +28,9 @@ bool
 Request::equal_b (Request *r) const
 {
   if (is_type_b (r->name()))
-       return r->do_equal_b ((Request*)this);
+    return r->do_equal_b ((Request*)this);
   if (r->is_type_b (name()))
-       return do_equal_b (r);
+    return do_equal_b (r);
         
   return false;
 }
index 38f0a65db84500290e71fdae339441b134a54b48..c8f0d3e78982592ececb394f64abbbbe6e7d4d33 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "debug.hh"
@@ -18,7 +18,7 @@
 IMPLEMENT_IS_TYPE_B1(Rest_collision,Item);
 
 void
-Rest_collision::add (Note_column *nc_l)
+Rest_collision::add_column (Note_column *nc_l)
 {
   add_dependency (nc_l);
   if (nc_l->rest_b ())
@@ -129,14 +129,14 @@ Rest_collision::do_print() const
 }
 
 void
-Rest_collision::do_substitute_dependency (Score_elem*o,Score_elem*n)
+Rest_collision::do_substitute_dependency (Score_element*o,Score_element*n)
 {
-  Item*o_l = o->item();
+  Item*o_l = o->access_Item ();
   
 
   if (o_l&&o_l->is_type_b (Note_column::static_name ()))
     {
-      Note_column *n_l = n?(Note_column*)n->item():0;
+      Note_column *n_l = n?(Note_column*)n->access_Item ():0;
       rest_l_arr_.substitute ((Note_column*)o_l, n_l);
       ncol_l_arr_.substitute ((Note_column*)o_l, n_l);
     }
index 99e2f526804ffef93c3a98c70959f4fa8a440b6f..ab9e7396dc53b2f37cdc66c6c6ff6972f3b393a4 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "rhythmic-head.hh"
@@ -22,7 +22,7 @@ Rhythmic_head::do_add_processing ()
   if (dots_i_ && !dots_l_)
     {
       Dots *d = new Dots;
-      add (d);
+      add_dots (d);
       pscore_l_->typeset_element (d);
       axis_group_l_a_[Y_AXIS]->add_element (d);
       axis_group_l_a_[X_AXIS]->add_element (d);
@@ -34,7 +34,7 @@ Rhythmic_head::do_add_processing ()
 }
 
 void
-Rhythmic_head::add (Dots *dot_l)
+Rhythmic_head::add_dots (Dots *dot_l)
 {
   dots_l_ = dot_l;  
   dot_l->add_dependency (this);  
@@ -49,10 +49,10 @@ Rhythmic_head::Rhythmic_head ()
 }
 
 void
-Rhythmic_head::do_substitute_dependent (Score_elem*o,Score_elem*n)
+Rhythmic_head::do_substitute_dependent (Score_element*o,Score_element*n)
 {
   if (o == dots_l_)
-    dots_l_ = n ? (Dots*)n->item () :0;
+    dots_l_ = n ? (Dots*)n->access_Item () :0;
 }
 
 IMPLEMENT_IS_TYPE_B1(Rhythmic_head, Item);
index 1882347664db6b8fd17766117206f33fe605317d..d276f131029f68c35d721740b4edc42ce5df0130 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
index abe35406c0fbd2c5a174a8bb024f3f6fd145e44d..6481709e27ed14d4f34c568c81c12de2f9800858 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "debug.hh"
@@ -22,7 +22,7 @@ void
 Score_column::do_print() const
 {
 #ifndef NPRINT
-  DOUT << "mus "<< musical_b_ <<" at " <<  when_<< '\n';
+  DOUT << "mus "<< musical_b_ << " at " <<  when_ << '\n';
   if (break_penalty_i_ >= Break_req::FORCE)
     DOUT << "Break forced";
       
@@ -52,8 +52,8 @@ Score_column::add_duration (Moment d)
 {
   if (!d)
     {
-      warning (_("Ignoring zero duration added to column at ")
-              + when_.str ());
+      warning (_f ("ignoring zero duration added to column at %s",
+              when_.str ()));
       return;
     }
   
index b481921c3a88c722fef2d2c3600598297a9a3caf..7f257671acc1abca6d551dccb548e369214f92d6 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include <fstream.h>
 #include "main.hh"
@@ -22,6 +22,7 @@ Sources* source_global_l = 0;
 Array<String> inclusion_global_array;
 Array<String> target_str_global_array;
 Link_array<Score> score_global_array;
+Header * header_global_p;
 
 
 void write_dependency_file (String fn, Array<String> targets,
@@ -30,12 +31,12 @@ void write_dependency_file (String fn, Array<String> targets,
   const int WRAPWIDTH = 65;
 
 
-  cout << "Writing dependency file " << fn << " ...\n";
+  cout << _f ("writing dependency file: `%s\'...", fn) << '\n';
   ofstream f (fn.ch_C ());
   if (!f)
-    warning ( _("Can't open dependency file `" + fn + "\'"));
+    warning (_f ("can't open file: `%s\'", fn));
 
-  f << "# Automatically generated by " << get_version_str ()  << "\n";
+  f << "# Automatically generated by " << get_version_str ()  << '\n';
   String out;
   for (int i=0; i < targets.size (); i ++)
      out += targets[i] + " ";
@@ -66,18 +67,15 @@ do_deps()
 void
 do_scores()
 {
+  if (!header_global_p)
+    header_global_p = new Header;
   for (int i=0; i < score_global_array.size(); i++)
     {
       Score* is_p = score_global_array[i];
-      if (!is_p->header_p_)
-       is_p->header_p_ = new Header;
-      
-                
-      is_p->header_p_->lily_id_str_ = "Lily was here, " +
-       get_version_number_str();
+
       if (is_p->errorlevel_i_)
        {
-         is_p->warning (_("Score contains errors. Will not process it. "));
+         is_p->warning (_("score contains errors; will not process it"));
          exit_status_i_ |= 1;
        }
       else
@@ -97,42 +95,33 @@ clear_scores ()
     }
   score_global_array.clear();
   inclusion_global_array.clear ();
+  delete  header_global_p ;
+  header_global_p =0; 
 }
 
-extern File_path path;
 
 void
 do_one_file (String init_str, String file_str)
 {
-  if (init_str.length_i () && path.find (init_str).empty_b ())
+  if (init_str.length_i () && global_path.find (init_str).empty_b ())
     {
-      warning (_("Can not find `") + init_str +"\'");
-      return ;
+      warning (_f ("can't find file: `%s\'", init_str));
+      return;
     }
-  if (file_str.length_i () && path.find (file_str).empty_b ())
+  if ((file_str != "-") && global_path.find (file_str).empty_b ())
     {
-      warning (_("Can not find `") + file_str + "'");
-      return ;
+      warning (_f ("can't find file: `%s\'", file_str));
+      return;
     }
 
   Sources sources;
   source_global_l = &sources;
-  source_global_l->set_path (&path);
+  source_global_l->set_path (&global_path);
   {
     My_lily_parser parser (source_global_l);
     parser.set_version_check (version_ignore_global_b);
     parser.parse_file (init_str, file_str);
 
-    
-    if (file_str.length_i () && file_str[0] != '-')
-      {
-       String a,b,c,d;
-       split_path (file_str, a, b, c, d);
-       default_outname_base_global = c;
-      }
-    else
-      default_outname_base_global = "lelie";
-  
     if (parser.error_level_i_)
       {
        exit_status_i_  = 1;
@@ -143,3 +132,4 @@ do_one_file (String init_str, String file_str)
   }
   source_global_l = 0;
 }
+
index 7d11acf61e8c1f2a5ab754902a8eb9881c24a311..f67907c8695258398039a4205a9014e73f843907 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "script-column.hh"
@@ -17,7 +17,7 @@ IMPLEMENT_IS_TYPE_B1(Script_column,Horizontal_vertical_group_item);
 
 
 void
-Script_column::add (Script*s_l)
+Script_column::add_script (Script*s_l)
 {
   script_l_arr_.push (s_l);
   add_dependency (s_l);
@@ -53,7 +53,7 @@ Script_column::do_pre_processing()
   for (int i=0; i < script_l_arr_.size(); i++) 
     {
       Script*s_l = script_l_arr_[i];
-      placed_l_arr_a[idx (s_l->specs_l_->inside_b(),
+      placed_l_arr_a[idx (s_l->specs_p_->inside_b(),
                          s_l->dir_) ].push (s_l);
     }
   
@@ -103,11 +103,11 @@ Script_column::add_support (Item*i_l)
 }
 
 void
-Script_column::do_substitute_dependency (Score_elem*o,Score_elem*n)
+Script_column::do_substitute_dependency (Score_element*o,Score_element*n)
 {
-  if (o->item()) 
+  if (o->access_Item ()) 
     {
-      script_l_arr_.substitute ((Script*)o->item(),(Script*) (n?n->item ():0));
-      support_l_arr_.substitute (o->item(), (n?n->item ():0));
+      script_l_arr_.substitute ((Script*)o->access_Item (),(Script*) (n?n->access_Item ():0));
+      support_l_arr_.substitute (o->access_Item (), (n?n->access_Item ():0));
     }
 }
index 5a9c3a65b389b36c73fb3387f6618d0d2142bbea..05074c7107993dd4e4663d4f5aa2cb4e19c2995c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "debug.hh"
@@ -78,7 +78,7 @@ Script_def::get_atom (Paper_def *p , Direction d) const
   if (invertsym_b_)
     preidx_str = (d < 0)? "d" : "u";
 
-  return p->lookup_l()->script (preidx_str + symidx_str_);
+  return p->lookup_l(0)->script (preidx_str + symidx_str_);
 }
 
 
index 7ff3fca4819139019ba59af15b914eeba64e6117..cffc4ee2763b32aecedefc58c5ace8bc62abc8bc 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.ruu.nl>
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -45,7 +45,6 @@ Separating_group_spanner::get_rods () const
          r.distance_f_ += paper ()->interline_f () *1.5;
          a.push (r);
        }
-       
     }
       
   return a;
@@ -61,13 +60,13 @@ Separating_group_spanner::add_spacing_unit (Single_malt_grouping_item*i)
 IMPLEMENT_IS_TYPE_B1(Separating_group_spanner, Spanner);
 
 void
-Separating_group_spanner::do_substitute_dependency (Score_elem*o, Score_elem*n)
+Separating_group_spanner::do_substitute_dependency (Score_element*o, Score_element*n)
 {
   if (o->is_type_b (Single_malt_grouping_item::static_name ()))
     {
       Single_malt_grouping_item*ns = n ?
-       (Single_malt_grouping_item*)n->item () : 0;
-      spacing_unit_l_arr_.substitute ((Single_malt_grouping_item*)o->item (), ns);
+       (Single_malt_grouping_item*)n->access_Item () : 0;
+      spacing_unit_l_arr_.substitute ((Single_malt_grouping_item*)o->access_Item (), ns);
     }
 }
 
index e9fe0a7398c1ca38df2d8e5e297c1decae3bc3e6..284a494d7e85954087d3efa1f38d488538654339 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.ruu.nl>
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -18,7 +18,7 @@ Single_malt_grouping_item ::Single_malt_grouping_item()
 }
 
 void
-Single_malt_grouping_item::add (Item* i)
+Single_malt_grouping_item::add_item (Item* i)
 {
   assert (i);
   item_l_arr_.push (i);
@@ -44,11 +44,11 @@ Single_malt_grouping_item::my_width () const
 IMPLEMENT_IS_TYPE_B1(Single_malt_grouping_item, Item);
 
 void
-Single_malt_grouping_item::do_substitute_dependency (Score_elem*o, Score_elem*n)
+Single_malt_grouping_item::do_substitute_dependency (Score_element*o, Score_element*n)
 {
-  if (o->item ())
+  if (o->access_Item ())
     {
-      item_l_arr_.unordered_substitute (o->item (),  n ? n->item () : 0);
+      item_l_arr_.unordered_substitute (o->access_Item (),  n ? n->access_Item () : 0);
     }
 }
 
index 839cf0d9b47c3111a9000c49488b88a4910cfaef..bc128bef424c9697f8fa85fe4a57a9f31380ca19 100644 (file)
@@ -3,24 +3,30 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "debug.hh"
 #include "spanner.hh"
 #include "p-col.hh"
 #include "p-score.hh"
-#include "outputter.hh"
+#include "tex-outputter.hh"
+#include "molecule.hh"
 
-IMPLEMENT_IS_TYPE_B1(Spanner,Score_elem);
+IMPLEMENT_IS_TYPE_B1(Spanner,Score_element);
 
 void
 Spanner::do_print() const
 {
 #ifndef NPRINT
-  DOUT << "Between col ";
+  DOUT << "Between " << spanned_drul_[LEFT]->name ()
+       << " and " << spanned_drul_[RIGHT]->name() << '\n';
   if (broken_into_l_arr_.size())
-    DOUT << "with broken pieces\n";
+    {
+      DOUT << "with broken pieces:\n";
+      for (int i=0; i < broken_into_l_arr_.size (); i++)
+       broken_into_l_arr_[i]->print ();
+    }  
 #endif
 }
 
@@ -33,6 +39,11 @@ Spanner::break_into_pieces ()
   Item * left = spanned_drul_[LEFT];
   Item * right = spanned_drul_[RIGHT];
   
+  if  (left == right)
+    {
+      warning (_ ("left spanpoint is right spanpoint\n"));
+      return;
+    }
   
   Link_array<Item> break_cols = pscore_l_->broken_col_range (left,right);
   Link_array<Spanner> broken_into_l_arr;
@@ -42,7 +53,7 @@ Spanner::break_into_pieces ()
 
   for (int i=1; i < break_cols.size(); i++) 
     {
-      Spanner* span_p = clone()->spanner ();
+      Spanner* span_p = clone()->access_Spanner ();
       left = break_cols[i-1];
       right = break_cols[i];
       if (!right->line_l())
@@ -50,7 +61,7 @@ Spanner::break_into_pieces ()
       if (!left->line_l())
        left = left->find_prebroken_piece(RIGHT);
 
-            assert (left&&right && left->line_l() == right->line_l());
+      assert (left&&right && left->line_l() == right->line_l());
 
       span_p->set_bounds(LEFT,left);
       span_p->set_bounds(RIGHT,right);
@@ -87,7 +98,7 @@ Spanner::set_bounds(Direction d, Item*i)
 
   if  (spanned_drul_[Direction(-d)] == spanned_drul_[d]
        && i)
-    warning ("Spanner (" + String (name ()) + ") with equal left and right spanpoints.");
+    warning (_f ("Spanner `%s\' with equal left and right spanpoints", name ()));
 }
 
 void
@@ -105,8 +116,13 @@ Spanner::do_break_processing()
     }
 }
 
+Spanner* 
+Spanner::access_Spanner ()
+{
+  return this;
+}
 
-Spanner::Spanner()
+Spanner::Spanner ()
 {
   spanned_drul_[LEFT]=0;
   spanned_drul_[RIGHT]=0;
@@ -120,7 +136,8 @@ Spanner::do_brew_molecule ()
   Molecule *output= brew_molecule_p ();
   Offset left_off (spanned_drul_[LEFT]->absolute_coordinate(X_AXIS), 0);
   Offset o = absolute_offset() + left_off;
-  pscore_l_->outputter_l_->output_molecule (output, o);
+  pscore_l_->outputter_l_->output_molecule (output, o, name ());
+  delete output;
 }
 
 Interval
index 2ce41ae76c06b65e9b14f8cacd1215aed56367e3..22ed79da20aa9759e780a231965a0f59fd407881 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996,  1997--1998, 1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996,  1997--1998, 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -18,9 +18,8 @@
 #include "pointer.tcc"
 #include "score-column.hh"
 #include "paper-def.hh"
-#include "dimen.hh"
+#include "dimension.hh"
 #include "colhpos.hh"
-#include "main.hh"             // experimental_fietsers
 
 Vector
 Spring_spacer::default_solution() const
@@ -80,7 +79,7 @@ Spring_spacer::handle_loose_cols()
     {
       if (! connected.equiv (fixed[0], i))
        {
-         warning (_("unconnected column: ") + String (i));
+         warning (_f ("unconnected column: %d", i));
          loosen_column (i);
        }
     }
@@ -133,7 +132,7 @@ Spring_spacer::position_loose_cols (Vector &sol_vec) const
          int right_rank = (j<sol_vec.dim()) ? cols_[j].rank_i_ : sol_vec.dim ();
 
          int d_r = right_rank - left_rank;
-         Colinfo loose=loose_col_arr_[k++];
+         Column_info loose=loose_col_arr_[k++];
          int r = loose.rank_i_ ;
          assert (r > left_rank && r < right_rank);
 
@@ -165,9 +164,9 @@ Spring_spacer::check_constraints (Vector v) const
          Real diff =v (other) - v (i) ;
          if (COLFUDGE +diff <  rods[j].distance_f_)
            {
-             DOUT << "i, other_i: " << i << "  " << other << "\n";
-             DOUT << "dist, minimal = " << diff <<" "
-                  << rods[j].distance_f_<<'\n';
+             DOUT << "i, other_i: " << i << "  " << other << '\n';
+             DOUT << "dist, minimal = " << diff << " "
+                  << rods[j].distance_f_ << '\n';
              return false;
            }
        }
@@ -184,7 +183,7 @@ Spring_spacer::try_initial_solution() const
   Vector v;
   if (!try_initial_solution_and_tell (v))
     {
-      warning ("I'm too fat; call Oprah");
+      warning (_ ("I'm too fat; call Oprah"));
     }
   return v;
 
@@ -214,7 +213,7 @@ Spring_spacer::try_initial_solution_and_tell (Vector &v) const
          initsol (i)=cols_[i].fixed_position();
          if (initsol (i) < min_x )
            {
-             DOUT << "failing: init, min : " << initsol (i) << " " << min_x << "\n";
+             DOUT << "failing: init, min : " << initsol (i) << " " << min_x << '\n';
              initsol (i) = min_x;
              succeeded = false;
            }
@@ -253,7 +252,7 @@ Spring_spacer::make_matrices (Matrix &quad, Vector &lin, Real &c) const
 
       c += sqr (i->space_f_);
     }
-  // experimental
+
   if (quad.dim() > 10)
     quad.set_band();
   
@@ -301,7 +300,7 @@ Spring_spacer::calculate_energy_f (Vector solution) const
   return e;
 }
 void
-Spring_spacer::lower_bound_solution (Col_hpositions*positions) const
+Spring_spacer::lower_bound_solution (Column_x_positions*positions) const
 {
   Mixed_qp lp (cols_.size());
   make_matrices (lp.quad_,lp.lin_, lp.const_term_);
@@ -323,7 +322,7 @@ Spring_spacer::Spring_spacer ()
 }
 
 void
-Spring_spacer::solve (Col_hpositions*positions) const
+Spring_spacer::solve (Column_x_positions*positions) const
 {
 
   DOUT << "Spring_spacer::solve ()...";
@@ -342,7 +341,7 @@ Spring_spacer::solve (Col_hpositions*positions) const
       positions->satisfies_constraints_b_ = check_constraints (solution_vec);
       if (!positions->satisfies_constraints_b_)
        {
-         WARN << _("solution doesn't satisfy constraints.\n") ;
+         WARN << _ ("solution doesn't satisfy constraints") << '\n' ;
        }
       position_loose_cols (solution_vec);
       positions->energy_f_ = calculate_energy_f (solution_vec);
@@ -362,7 +361,7 @@ Spring_spacer::solve (Col_hpositions*positions) const
 void
 Spring_spacer::add_column (Paper_column  *col, bool fixed, Real fixpos)
 {
-  Colinfo c (col,(fixed)? &fixpos :  0);
+  Column_info c (col,(fixed)? &fixpos :  0);
   int this_rank =  cols_.size();
   c.rank_i_ = this_rank;
   
@@ -407,7 +406,7 @@ Spring_spacer::error_pcol_l_arr() const
 void
 Spring_spacer::loosen_column (int i)
 {
-  Colinfo c=cols_.get (i);
+  Column_info c=cols_.get (i);
   for (PCursor<Idealspacing*> j (ideal_p_list_.top()); j.ok (); j++)
     {
       if (j->left_i_ == i|| j->right_i_ == i)
@@ -433,7 +432,7 @@ Spring_spacer::print() const
 #ifndef NPRINT
   for (int i=0; i < cols_.size(); i++)
     {
-      DOUT << "col " << i<<' ';
+      DOUT << "col " << i << " ";
       cols_[i].print();
     }
   for (PCursor<Idealspacing*> i (ideal_p_list_.top()); i.ok (); i++)
@@ -549,9 +548,13 @@ Spring_spacer::get_ruling_durations(Array<Moment> &shortest_playing_arr,
 /**
   generate springs between columns.
 
-  TODO: This needs rethinking.  Spacing should take optical
+  TODO: This needs rethinking.
+
+  *  Spacing should take optical
   effects into account
 
+  *  Should be decentralised
+  
   The algorithm is taken from :
 
   John S. Gourlay. ``Spacing a Line of Music,'' Technical Report
@@ -589,12 +592,15 @@ Spring_spacer::calc_idealspacing()
          
          Moment delta_t =  scol_l (i+1)->when() - scol_l (i)->when () ;
 
-         Real k=  paper_l()->arithmetic_constant (context_shortest_arr[i]);
+
          /*
            ugh should use shortest_playing distance
          */
          if (delta_t)
-           durational_distance =  paper_l()->duration_to_dist (delta_t,k);
+           {
+             Real k=  paper_l()->arithmetic_constant (context_shortest_arr[i]);
+             durational_distance =  paper_l()->duration_to_dist (delta_t,k);
+           }
          symbol_distance += -cols_[i+1].width_[LEFT];
  
 
@@ -614,14 +620,14 @@ Spring_spacer::calc_idealspacing()
          Moment context_shortest = context_shortest_arr[i];
          if (! shortest_playing_len)
            {
-             warning (_("Can't find a ruling note at ")
-                      +scol_l (i)->when().str ());
+             warning (_f ("can't find a ruling note at %s", 
+               scol_l (i)->when().str ()));
              shortest_playing_len = 1;
            }
          if (! context_shortest)
            {
-             warning(_("No minimum in measure at ")
-                     + scol_l (i)->when().str ());
+             warning (_f ("no minimum in measure at %s", 
+                     scol_l (i)->when().str ()));
              context_shortest = 1;
            }
          Moment delta_t = scol_l (i+1)->when() - scol_l (i)->when ();
@@ -661,7 +667,7 @@ Spring_spacer::calc_idealspacing()
              // fixed: probably should set minimum (rod/spring)?
              cols_[i-1].width_[RIGHT] += interline_f;
              // should adjust dist too?
-             ideal_arr_[i-1] = ideal_arr_[i-1] >? interline_f;
+             ideal_arr_[i-1] = ideal_arr_[i-1] >? (2 * interline_f);
            }
 
          /* 
index 1dbbd8407aacd524233a0714076f10f475a05486..43140d7dcc3c06fd0baee5da4b82f90530465373 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "proto.hh"
@@ -20,10 +20,8 @@ Staff_info::score_l()
 Staff_info::Staff_info()
 {
   score_l_ =0;
-  c0_position_i_l_ = 0;
   time_C_ = 0;
   rhythmic_C_ =0;
-  break_allowed_b_ = 0;
 }
 
 Score_column*
index 5f2cbb2873423a086dc9b7b294f16a44acb8bd34..27b61ba4f17de757d70aa222f1611471cb644eec 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "swallow-perf.hh"
index 52ef9fefc0a716ef5f2f41b18082d623d95157cf..5814d5294aa241920c14f5fae5aaf38767c2d5ca 100644 (file)
@@ -3,11 +3,11 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "misc.hh"
-#include "dimen.hh"
+#include "dimension.hh"
 #include "debug.hh"
 #include "real.hh"
 #include "atom.hh"
@@ -41,10 +41,13 @@ Atom
 Symtable::lookup (String s) const
 {
   if (elt_b (s))
-    return (*this)[s];
+    {
+      Atom a (elem(s));
+      return a;
+    }
   else
     {
-      warning ("Symtable `" + id_str+ _("\': unknown symbol `") +s+"'\n");
+      warning (_f ("Symtable `%s\': unknown symbol: `%s\'", id_str, s));
       Atom sy;
       return sy;
     }
@@ -55,9 +58,9 @@ Symtables::operator()(String s)
 {
   if (!elt_b (s))
     {
-      error ("Symtable `" + s + _("\' unknown"));
+      error (_f ("Symtable `%s\' unknown", s));
       /* 
-        We can't return, because we'll dump core anyway.
+        We can 't return, because we'll dump core anyway.
        */
       return 0;
     }
@@ -69,7 +72,7 @@ Symtables::print() const
 {
   for (Assoc_iter<String, Symtable*>  i (*this); i.ok(); i++)
     {
-      DOUT << "table \'" << i.key() << "\' {\n";
+      DOUT << "table \'" << i.key () << "\' {\n";
       i.val()->print ();
       DOUT << "}\n";
     }
@@ -79,7 +82,7 @@ Symtable::print() const
 {
   for (Assoc_iter<String, Atom>  i (*this); i.ok(); i++)
     {
-      DOUT << "\'" << i.key() << "\'->" << i.val ().str () << "\n";
+      DOUT << "\'" << i.key() << "\'->" << i.val ().str () << '\n';
     }
 }
 
index b4a5dbf20926555687254eb4695a63af26394038..9a5ac4216006d4f42a5f8d9ef0eb1b3df7fd51c0 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "proto.hh"
@@ -20,6 +20,6 @@
 
 #define IPLC_INSTANTIATE(a) POINTERLIST_INSTANTIATE(a)
 
-IPLC_INSTANTIATE(Score_elem);
+IPLC_INSTANTIATE(Score_element);
 IPLC_INSTANTIATE(Spanner);
 IPLC_INSTANTIATE(Idealspacing);
index b9ea8f4ace0d0caf5efe8c42b02ee372a53848da..b60867333dfa5b0d3f7a45fb32d2615859585945 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "line-spacer.hh"
index 5191f663c56f458d35f9e190009cf57bd0ac3e1f..eb9417c5e829238a94b9829425d279ea066cacda 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "atom.hh"
index 8ff8142c7e299287d9a0145f3123cb214b4de50d..65f9617165d7e2382128ed2b8f740d5210c14ce5 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #ifndef __CYGWIN32__
index 98b3dc89fd9d9f6a8babc8ace553044a49f29591..ca2523d47819187a6c4d0de5156ec4daf6747163 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <limits.h>
index c38954bf2d2afec9692e7793b1f53c14a2d8bfc4..e435c672a687debdf4521da797eb8376f9af553b 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "proto.hh"
index 2d24fce40a982e9125d466f8bbd4c09cdd6b7aae..9433757adcce38907d8cb1bee42103b36cea8563 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "proto.hh"
index f2d07eb85554e5ebf6e8d8a7d0cc80e26134bb37..002154acc452e2ae2cd33c08c2621fd66cf17219 100644 (file)
@@ -1,9 +1,9 @@
 /*
-  tex-beam.cc -- implement Lookup::{beam_element, beam, rule_symbol}
+  tex-beam.cc -- implement Lookup::beam
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 /*
@@ -15,7 +15,7 @@
 #include "molecule.hh"
 #include "tex.hh"
 #include "symtable.hh"
-#include "dimen.hh"
+#include "dimension.hh"
 #include "debug.hh"
 #include "lookup.hh"
 #include "misc.hh"
@@ -55,7 +55,7 @@ Atom
 Lookup::ps_beam (Real slope, Real width, Real thick) const
 {
   String ps = "\\embeddedps{\n";
-  ps += String (width) + " "+ String (slope) + " " + String (thick)
+  ps += to_str (width) + " "+ to_str (slope) + " " + to_str (thick)
     + " draw_beam}";
 
   Atom s;
index 91f26921b324cabab8a52ddfdb146937945e53e6..9866c231ad07af68c163e4a13decf0885550b2f2 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 */
 
@@ -19,9 +19,13 @@ const int MAXLINELEN = 200;
 
 Tex_stream::Tex_stream (String filename)
 {
-  os = new ofstream (filename.ch_C ());
+  if (filename.length_i () && (filename != "-"))
+    os = new ofstream (filename.ch_C ());
+  else
+//    os = new ostream (cout.ostreambuf ());
+    os = new ostream (cout._strbuf);
   if (!*os)
-       error (_("can't open `") + filename+"\'");
+    error (_f ("can't open file: `%s\'", filename));
   nest_level = 0;
   line_len_i_ = 0;
   outputting_comment=false;
@@ -30,17 +34,17 @@ Tex_stream::Tex_stream (String filename)
 void
 Tex_stream::header()
 {
-  *os << _("% Creator: ");
+  *os << _ ("% Creator: ");
   if (no_timestamps_global_b)
     *os << "GNU LilyPond\n";
   else
-    *os << get_version_str() << "\n";
-  *os << _("% Automatically generated");
+    *os << get_version_str() << '\n';
+  *os << _ ("% Automatically generated");
   if (no_timestamps_global_b)
     *os << ".\n";
   else
     {
-      *os << _(", at ");
+      *os << _ (", at ");
       time_t t (time (0));
       *os << ctime (&t) << "%\n";
     }
@@ -51,7 +55,7 @@ Tex_stream::~Tex_stream()
   *os << flush;
   if (!*os)
     {
-      warning(_("error syncing file (disk full?)"));
+      warning(_ ("error syncing file (disk full?)"));
       exit_status_i_ = 1;
     }
   delete os;
@@ -59,10 +63,9 @@ Tex_stream::~Tex_stream()
 }
 
 // print string. don't forget indent.
-Tex_stream &
-Tex_stream::operator<<(String s)
+Tex_stream&
+Tex_stream::operator << (Scalar s)
 {
-
   for (char const *cp = s.ch_C (); *cp; cp++)
     {
        if (outputting_comment)
@@ -118,6 +121,7 @@ void
 Tex_stream::break_line()
 {
   *os << "%\n";
-  *os << String (' ', nest_level);
+  *os << to_str (' ', nest_level);
   line_len_i_ = 0;
 }
+
index 04f3e9cf4ace306ec946927dba1226c5414c32f3..635b281aa6e73f0dfd9f628000be6558455eb376 100644 (file)
@@ -3,13 +3,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c) 1996, 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "dimen.hh"
+#include "dimension.hh"
 #include "tex.hh"
 #include "atom.hh"
-#include "varray.hh"
+#include "array.hh"
 
 String
 vstrut (Real h)
index 6384ba2582b7ec80085432ab15e40c3d7628d2a4..c23b63c9a575b69921a157f3beda7351e1ea01de 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -49,7 +49,7 @@ Text_item::get_position_f () const
       return -20;
     }
 
-  Interval v = support_height ();
+  Interval v = support_extent ();
   // add no extra: fingers should be just above note, no?
   return v[dir_];
 }
@@ -72,7 +72,8 @@ Text_item::brew_molecule_p () const
 
   if (dir_<0)          // should do something better anyway.
     mol_p->translate_axis (-mol_p->extent ().y ().left , Y_AXIS);
-  mol_p->translate_axis (y_, Y_AXIS);
+  mol_p->translate_axis (coordinate_offset_f_, Y_AXIS);
+
   
   return mol_p;
 }
index 1e4a53b2fbf0a071f104b91bf55da9e333aec4a1..2bafc76723ffb2e70aacf1f7c9ddb723cc668fae 100644 (file)
@@ -3,11 +3,11 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "molecule.hh"
-#include "boxes.hh"
+#include "box.hh"
 #include "text-spanner.hh"
 #include "text-def.hh"
 #include "debug.hh"
@@ -61,7 +61,7 @@ Text_spanner::brew_molecule_p() const
   tsym.translate (text_off_);
 
   Molecule*output = new Molecule;
-  output->add (tsym);
+  output->add_atom (tsym);
   return output;
 }
 
@@ -78,10 +78,10 @@ Text_spanner::height() const
 }
 
 void
-Text_spanner::do_substitute_dependency (Score_elem* o, Score_elem*n)
+Text_spanner::do_substitute_dependency (Score_element* o, Score_element*n)
 {
   if (support_span_l_ == o) 
-       support_span_l_ = (Directional_spanner*) (n?n->spanner():0);
+       support_span_l_ = (Directional_spanner*) (n?n->access_Spanner ():0);
 }
 
 
index a5bc9d48504afb3bd1e37512fe190ae107282f98..f4a9ab245e4d8262e1164d02a262a4d28355283d 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "translation-property.hh"
@@ -15,6 +15,6 @@ void
 Translation_property::do_print () const
 {
 #ifndef NPRINT
-  DOUT << "." << var_str_ << " = " << String(value_);
+  DOUT << "." << var_str_ << " = " << value_;
 #endif
 }
index 7a65215c810a41a0594d391833237b4c775848dd..1541b32722e9adc12e73c0bd151e61c5b06dcdf4 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "proto.hh"
 #include "dictionary.hh"
 #include "debug.hh"
 
+/*
+  should delete these after exit.
+ */
+
 Dictionary<Translator*> *global_translator_dict_p=0;
 
 void
@@ -28,10 +32,12 @@ get_translator_l (String s)
 {
   if (global_translator_dict_p->elt_b (s))
     {
-      return (*global_translator_dict_p)[s];
+//      return (*global_translator_dict_p)[s];
+       Translator* t = (*global_translator_dict_p)[s];
+       return t;
     }
 
-  error (_("Unknown translator `") + s +"\'");
+  error (_f ("unknown translator `%s\'", s));
   return 0;
 }
 
index 5846c2bb37dac7c543e3449103ee9a551ae0ad24..f1da4dbdf9abbb7559687e3af276a852e07319ad 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "music-output-def.hh"
@@ -146,7 +146,7 @@ Translator_group::find_create_translator_l (String n, String id)
     ret = daddy_trans_l_->find_create_translator_l (n,id);
   else
     {
-      warning (_("Can't find or create `") + n + _("' called `") + id + "'\n");
+      warning (_f ("can't find or create `%s\' called `%s\'", n, id));
       ret =0;
     }
   return ret;
@@ -206,7 +206,7 @@ Translator_group::nongroup_l_arr () const
 void
 Translator_group::terminate_translator (Translator*r_l)
 {
-  DOUT << "Removing " << r_l->name() << " at " << now_moment () << "\n";
+  DOUT << "Removing " << r_l->name() << " at " << now_moment () << '\n';
   r_l->removal_processing();
   Translator * trans_p =remove_translator_p (r_l);
 
@@ -258,6 +258,11 @@ Translator_group::get_default_interpreter()
   if (accepts_str_arr_.size())
     {
       Translator*t = output_def_l ()->find_translator_l (accepts_str_arr_[0]);
+      if (!t)
+       {
+         warning (_f ("can't find or create `%s\'", accepts_str_arr_[0]));
+         t = this;
+       }
       Translator_group * g= t->clone ()->group_l ();
       add (g);
 
@@ -302,7 +307,7 @@ Translator_group::do_print() const
     {
       if (id_str_.length_i ())
        DOUT << "ID: " << id_str_ ;
-      DOUT << " iterators: " << iterator_count_<< "\n";
+      DOUT << " iterators: " << iterator_count_<< '\n';
     }
   each (&Translator::print);
 #endif
@@ -345,7 +350,7 @@ Translator_group::do_add_processing ()
     {
       Translator * t = output_def_l ()->find_translator_l (consists_str_arr_[i]);
       if (!t)
-       warning (_("Could not find `") +consists_str_arr_[i]+ "'");
+       warning (_f ("can't find `%s\'", consists_str_arr_[i]));
       else
        add (t->clone ());
     }
index ae5562579e8d694e530a0f8f21a61629c65cc101..3f00ff928f1b318d396269b73537e921417024ed 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -78,7 +78,7 @@ Translator::print () const
     DOUT << "type = " << type_str_;
   for (Dictionary_iter<Scalar> i (properties_dict_); i.ok (); i++)
     {
-      DOUT << i.key () << "=" << i.val () <<"\n";
+      DOUT << i.key () << "=" << i.val () << '\n';
     }
   do_print ();
   DOUT << "}\n";
index bd85e4051432b0512729c54a29eb2a5bbfa50939..58dceb1b1d554068569e33b6b4772b8c5f0cb36f 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "type-swallow-trans.hh"
index 33261d8f5ac7d2e5388c4f9591f97e1b955f6a7c..24eecc759e2f0eeed15c85432ad610f7fc635b35 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "proto.hh"
@@ -33,6 +33,6 @@ error_t (String const & s, Moment const & r)
 void
 error_t (String const & s, Time_description const &t_tdes)
 {
-  String e=s+ " (at t=" +  String(t_tdes.bars_i_) + ": " +  (t_tdes.whole_in_measure_).str () + ")\n";
+  String e=s+ " (at t=" +  to_str (t_tdes.bars_i_) + ": " +  (t_tdes.whole_in_measure_).str () + ")\n";
   error (e);
 }
index d8c0804788f13f3e6af50d87d3125da891b92e1e..55c683713683b56b3e61dd104519bccdc8ee6b43 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "word-wrap.hh"
    similar to TeX's is in Gourlay_breaking
 
    */
-Array<Col_hpositions>
+Array<Column_x_positions>
 Word_wrap::do_solve() const
 {
   problem_OK();
 
   PCursor<Paper_column*> curcol (pscore_l_->col_p_list_.top());
-  Array<Col_hpositions> breaking;
+  Array<Column_x_positions> breaking;
   Line_of_cols breakpoints (find_breaks());
   assert (breakpoints.size()>=2);
 
@@ -35,14 +35,14 @@ Word_wrap::do_solve() const
   int line_no_i = 0;
   while (break_idx_i < breakpoints.size() -1)
     {
-      Col_hpositions minimum;
-      Col_hpositions current;
+      Column_x_positions minimum;
+      Column_x_positions current;
 
       // do  another line
       line_no_i ++;
       Paper_column *post = breakpoints[break_idx_i]->postbreak_l();
       int start_break_idx = break_idx_i;
-      current.add (post);
+      current.add_paper_column (post);
       curcol++;                // skip the breakable.
       break_idx_i++;
 
@@ -52,10 +52,10 @@ Word_wrap::do_solve() const
          // add another measure.
          while (breakpoints[break_idx_i] != curcol.ptr())
            {
-             current.add (curcol);
+             current.add_paper_column (curcol);
              curcol++;
            }
-         current.add (breakpoints[break_idx_i]->prebreak_l());
+         current.add_paper_column (breakpoints[break_idx_i]->prebreak_l());
 
          current.spacer_l_ = generate_spacing_problem (current.cols, 
            pscore_l_->paper_l_->line_dimensions_int (line_no_i));
@@ -65,9 +65,9 @@ Word_wrap::do_solve() const
            {
              if (!minimum.cols.size())
                {
-                 warning (_("Ugh, this measure is too long, breakpoint: ")
-                          + String (break_idx_i) +
-                          _(" (generating stupido solution)"));
+                 warning (_ ("ugh, this measure is too long") 
+                   + ", " + _f ("breakpoint: %d", break_idx_i) 
+                   + "(" + _ ("generating stupido solution") + ")");
                  current.stupid_solution();
                  current.energy_f_ = - 1; // make sure we break out.
                }
@@ -85,7 +85,7 @@ Word_wrap::do_solve() const
 
          if (!current.satisfies_constraints_b_ && start_break_idx == break_idx_i - 1)
            {
-             warning ( _ ("I don't fit.  Put me on Montignac"));
+             warning ( _ ("I don't fit; put me on Montignac"));
              minimum = current;
              break;
            }
@@ -108,7 +108,7 @@ Word_wrap::do_solve() const
          break_idx_i++;
        }
 
-      *mlog << "[" <<break_idx_i<<"]"<<flush;
+      *mlog << "[" << break_idx_i << "]" << flush;
       breaking.push (minimum);
     }
   return breaking;