]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.52
authorfred <fred>
Tue, 26 Mar 2002 22:14:38 +0000 (22:14 +0000)
committerfred <fred>
Tue, 26 Mar 2002 22:14:38 +0000 (22:14 +0000)
flower/include/string.hh
lily/bar.cc
lily/break.cc
lily/graphical-axis-group.cc
lily/include/graphical-axis-group.hh
lily/paper-outputter.cc
lily/span-score-bar-engraver.cc

index e9d7cd10e7be24d251542f94d220ec7a3446ad0c..24b975949a48e54b950f55cd485238807608a7db 100644 (file)
@@ -139,7 +139,6 @@ public:
   /// index of rightmost element of string  (???)
   int index_last_i (char const* string) const;
 
-  /// index of leftmost #c#
   int index_i (char c) const;
 
   /// index of leftmost occurance of STRING
index dd4e90efb81164966c4406a0ba3d8e9460e672a0..31ff0b9c2583125e6ce9542aaf5a53facbbb39d5 100644 (file)
@@ -25,10 +25,6 @@ Bar::do_print () const
 {
 #ifndef NPRINT
   String s = type_str_;
-  if (s  == "{")
-    s = "brace";
-  if (s == "[")
-    s = "bracket";
   DOUT << "type = " << s;
 #endif
 }
@@ -62,8 +58,8 @@ static char const *bar_breaks[][3] ={
   {"||", "||", ""},
   {".|.", ".|.", ""},
   {"", "scorebar", "scorepostbreak"},
-  {"", "{", "{"},
-  {"", "[", "["},  
+  {"", "brace", "brace"},
+  {"", "bracket", "bracket"},  
   {0,0,0}
 };
 
index afe439cd5d9d2d6a552ebd93daf6cb92dbbb4fea..f362ef5ff1f773df9a4dbd30828431aab8b86824 100644 (file)
@@ -65,7 +65,7 @@ Break_algorithm::find_break_indices () const
   return retval;
 }
 
-///  return all breakable columns
+
 Line_of_cols
 Break_algorithm::find_breaks () const
 {
index 05b70e5cf12657a4e7b301030224bf85c19c99c2..484b25368d38973615f3549058e45176689a3246 100644 (file)
@@ -13,8 +13,8 @@
 #include "debug.hh"
 
 /** don't copy anything: an element can only be in one
-  Graphical_axis_group at one time.  */
-Graphical_axis_group::Graphical_axis_group (Graphical_axis_group const&s)
+  Graphical_axis_group at one time. */
+Graphical_axis_group::Graphical_axis_group(Graphical_axis_group const&s)
 {
   axes_ = s.axes_;
   ordered_b_ = s.ordered_b_;
index c21995c39c1ee509ed6a3332bdc1640469614b46..eacf5ff1adcf16227313a8a780d0715155855472 100644 (file)
@@ -29,7 +29,7 @@ public:
     
   Interval extent (Axis) const;
   virtual void do_print() const;
-  Graphical_axis_group (Graphical_axis_group const&);
+  Graphical_axis_group(Graphical_axis_group const&s);
   Graphical_axis_group ();
   virtual void set_axes (Axis,Axis);
   void remove_all ();
index 1df5d85a38a85637893ab26dd1dc40063e5fe05a..bc926f42d31954f608c7f179e9646de44a9c17db 100644 (file)
@@ -30,6 +30,26 @@ Paper_outputter::Paper_outputter (Paper_stream *s)
 {
   outstream_l_ = s;
   output_header ();
+
+#ifdef __powerpc__
+  if (output_global_ch == String ("scm"))
+    {
+      int fd = 1;
+      ofstream * of = dynamic_cast<ofstream*> (outstream_l_->os);
+      if (of)
+       fd = of->rdbuf()->fd();
+      FILE *file = fdopen (fd, "a");
+      port_ = scm_standard_stream_to_port (file, "a", "");
+      scm_display (gh_str02scm (
+       "(primitive-load-path 'lily.scm)\n"
+       "(eval (tex-scm 'all-definitions))\n"
+       ";(eval (ps-scm 'all-definitions))\n"
+       "(display (map (lambda (x) (string-append (eval x) \"%\\n\")) '(\n"
+       ), port_);
+
+      scm_fflush (port_);
+    }
+#else
   if (output_global_ch == String ("scm"))
     *outstream_l_->os << ""
       "(primitive-load-path 'lily.scm)\n"
@@ -37,6 +57,7 @@ Paper_outputter::Paper_outputter (Paper_stream *s)
       ";(eval (ps-scm 'all-definitions))\n"
       "(display (map (lambda (x) (string-append (eval x) \"\\n\")) '(\n"
     ;
+#endif
 }
 
 Paper_outputter::~Paper_outputter ()
@@ -44,10 +65,18 @@ Paper_outputter::~Paper_outputter ()
   SCM scm = gh_list (ly_symbol ("end-output"), SCM_UNDEFINED);
   output_scheme (scm);
 
+#ifdef __powerpc__
   if (String (output_global_ch) == "scm")
     {
-      *outstream_l_->os << ")";
+      scm_display (gh_str02scm (")))\n"), port_);
+      scm_fflush (port_);
     }
+#else
+  if (String (output_global_ch) == "scm")
+    {
+      *outstream_l_->os << ")))";
+    }
+#endif
 }
 
 void
@@ -115,6 +144,9 @@ Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm)
     {
       Atom * i = ptr->car_;
 #endif
+#if 0
+    }
+#endif      
       Offset a_off = i->off_;
       a_off += o;
 
@@ -168,11 +200,20 @@ Paper_outputter::output_comment (String str)
 void
 Paper_outputter::output_scheme (SCM scm)
 {
+#ifdef __powerpc__
+  if (String (output_global_ch) == "scm")
+    {
+      scm_write (scm, port_);
+      scm_display (gh_str02scm ("\n"), port_);
+      scm_fflush (port_);
+    }
+#else
   if (String (output_global_ch) == "scm")
     {
       SCM result =  scm_eval (scm_listify (ly_symbol ("scm->string"), ly_quote_scm (scm), SCM_UNDEFINED));
     *outstream_l_->os << ly_scm2string (result)        << endl;
     }
+#endif
   else
     {
       SCM result = scm_eval (scm);
index d494cdd204afd772f9db2e93599072fdb970b442..048e752936b9176ea2e52daa25da5561790f42bb 100644 (file)
@@ -34,7 +34,7 @@ Piano_bar_engraver::get_span_bar_p () const
 {
   Span_bar *s= new Span_bar;
   s->dim_cache_[X_AXIS]->set_empty (true);
-  s->type_str_ = "{";
+  s->type_str_ = "brace";
   return s;
 }
 
@@ -43,7 +43,7 @@ Staff_group_bar_engraver::get_span_bar_p () const
 {
   Span_bar *s= new Span_bar;
   s->dim_cache_[X_AXIS]->set_empty (true);
-  s->type_str_ = "[";
+  s->type_str_ = "bracket";
   return s;
 }
 
@@ -53,7 +53,7 @@ Staff_group_bar_engraver::acknowledge_element (Score_element_info i)
   Base_span_bar_engraver::acknowledge_element (i);
   if (Span_bar * b = dynamic_cast<Span_bar *> (i.elem_l_))
     {
-      if (b->type_str_ == "{")
+      if (b->type_str_ == "brace")
        b->translate_axis ( -paper_l ()->get_realvar (interline_scm_sym),
                            X_AXIS); // ugh
     }