]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.11
authorfred <fred>
Sun, 24 Mar 2002 19:56:03 +0000 (19:56 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:56:03 +0000 (19:56 +0000)
23 files changed:
lib/mapped-file-storage.cc [new file with mode: 0644]
lib/simple-file-storage.cc
lily/VERSION
lily/bow.cc
lily/collision.cc
lily/include/beam-grav.hh [new file with mode: 0644]
lily/include/crescendo.hh
lily/include/directional-spanner.hh
lily/include/dynamic-grav.hh
lily/include/head-column.hh
lily/include/horizontal-group-item.hh
lily/include/note-column-grav.hh
lily/include/request.hh
lily/include/slur-grav.hh
lily/include/stem-grav.hh [new file with mode: 0644]
lily/include/text-grav.hh
lily/include/tie-grav.hh
lily/include/translator.hh
lily/include/voice-group-gravs.hh
lily/note.cc
lily/rest-collision.cc
lily/script-column.cc
lily/script-grav.cc

diff --git a/lib/mapped-file-storage.cc b/lib/mapped-file-storage.cc
new file mode 100644 (file)
index 0000000..2267164
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+  file-storage.cc -- implement Mapped_file_storage
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  Jan Nieuwenhuizen <jan@digicash.com>
+*/
+#include <sys/types.h>         // open, mmap
+#include <sys/stat.h>          // open
+#include <sys/mman.h>          // mmap
+#include <limits.h>            // INT_MAX
+#include <fcntl.h>             // open 
+#include <unistd.h>            // close, stat
+#include <stdio.h>             // fdopen
+#include <string.h>            // strerror
+#include <errno.h>             // errno
+
+
+
+#include "string.hh"
+#include "proto.hh"
+#include "warn.hh"
+#include "file-storage.hh"
+
+Mapped_file_storage::Mapped_file_storage(String s)
+{
+  data_caddr_ = 0;
+  fildes_i_ = 0;
+  size_off_ = 0;
+  open(s);
+}
+
+char const*
+Mapped_file_storage::ch_C() const
+{
+  return (char const*)data_caddr_;
+}
+
+void
+Mapped_file_storage::map()
+{
+  if (fildes_i_ == -1)
+    return;
+
+  data_caddr_ = (caddr_t)mmap((void*)0, size_off_, PROT_READ, MAP_SHARED, fildes_i_, 0);
+
+  if ((int)data_caddr_ == -1)
+    warning(String("can't map: error no: ") + strerror(errno));
+}
+
+
+void
+Mapped_file_storage::open(String name_str)
+{
+  fildes_i_ = ::open(name_str, O_RDONLY);      
+           
+  if (fildes_i_ == -1) 
+    {
+      warning(String("can't open: ") + name_str + String(": ") + strerror(errno)); 
+      return;
+    }
+
+  struct stat file_stat;
+  fstat(fildes_i_, &file_stat);
+  size_off_ = file_stat.st_size;
+  map();
+}
+
+void
+Mapped_file_storage::unmap()
+{
+  if (data_caddr_) 
+    {
+      munmap(data_caddr_, size_off_);
+      data_caddr_ = 0;
+      size_off_ = 0;
+    }
+}
+
+void
+Mapped_file_storage::close()
+{
+  unmap();
+  if (fildes_i_) 
+    {
+      ::close(fildes_i_);
+      fildes_i_ = 0;
+    }
+}
+
+int
+Mapped_file_storage::length_i() const
+{
+  return size_off_;
+}
+
+Mapped_file_storage::~Mapped_file_storage()
+{
+  close();
+}
index d66c2c2d9b1b34dfd6c254d628d88eadfa90d387..ed1784ba63963abdafee6ef40746eb0ac7eba55e 100644 (file)
   Stupid but foolproof way of opening files.
 
   TODO 
-  Should use obstack. Should check IO status
+  Should check IO status
 
   This is of course a build it yourself version of mmap, so we should
   have been using that... (see Mapped_file_storage) But we noticed
   some problems with this (unexplained lexer crashes)
   
-  */
+  [Some versions later] The crashes aren't caused by the mmap
+  code. But no reason to take it out, is there?  */
 
 Simple_file_storage::Simple_file_storage(String s)
 {
-    data_p_ =0;
-    FILE * f = fopen ( s.ch_C(), "r");
-    if ( !f ) 
-      {
-       warning("can't open file\n");
-       return ;
-      }
+  data_p_ =0;
+  /*
+    let's hope that "b" opens anything binary, and does not apply 
+    CR/LF translation
+    */
+  FILE * f = fopen (s.ch_C(), "rb");
+  if (!f) 
+    {
+      warning("can't open file\n");
+      return ;
+    }
 
-    int ret = fseek( f, 0, SEEK_END);
-    len_i_ = ftell(f);
-    rewind(f);
-    data_p_ = new char[len_i_+1];
-    data_p_[len_i_] = 0;
-    ret = fread(data_p_, sizeof(char), len_i_, f);
-    assert (ret==len_i_);
-    fclose(f);
+  int ret = fseek(f, 0, SEEK_END);
+  len_i_ = ftell(f);
+  rewind(f);
+  data_p_ = new char[len_i_+1];
+  data_p_[len_i_] = 0;
+  ret = fread(data_p_, sizeof(char), len_i_, f);
+
+     
+#if 1 // ugh, \r\n -> \n translation
+  assert (ret==len_i_);
+#endif
+  fclose(f);
 }
 
 char const*
 Simple_file_storage::ch_C() const
 {
-    return data_p_;
+  return data_p_;
 }
 
 int
-Simple_file_storage::length_i()const
+Simple_file_storage::length_i() const
 {
-    return len_i_;
+  return len_i_;
 }
     
 
 Simple_file_storage::~Simple_file_storage()
 {
-    delete []data_p_;
+  delete []data_p_;
 }
index 7b9611af008e0cdef86459ab4dfe6f2488c7d913..7ce3b25fba45817016afc781083b8857de531bcd 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 1
-PATCH_LEVEL = 9
+PATCH_LEVEL = 11
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index 1ef733c61a7705f2827b62702a0ec24f66bb5741..1bd0a0076208bc0c2fd95f268321c85e329ecf54 100644 (file)
 
 Bow::Bow()
 {
-  left_pos_i_ = right_pos_i_ = 0;
-  left_dx_f_ = right_dx_f_ = 0.0;
+  pos_i_drul_[LEFT] = pos_i_drul_[RIGHT] = 0;
+  dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0;
 }
 
 
 Offset
 Bow::center() const
 {
-  int dy =  right_pos_i_-left_pos_i_;
+  int dy =  pos_i_drul_[RIGHT]-pos_i_drul_[LEFT];
 
   Real w = width().length ();
 
@@ -35,22 +35,22 @@ Bow::brew_molecule_p() const
   Molecule*output = new Molecule;
   Real w = width().length ();
   
-  int dy = right_pos_i_ - left_pos_i_;
+  int dy = pos_i_drul_[RIGHT] - pos_i_drul_[LEFT];
   
   Real nw_f = paper()->note_width ();
   Real nh_f = paper()->internote_f ();
 
   
-  w+= (right_dx_f_ - left_dx_f_) * nw_f ;
+  w+= (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]) * nw_f ;
   Real round_w = w;            // slur lookup rounds the slurwidth .
   
-  Symbol sl = paper()->lookup_l ()->slur (dy , round_w, dir_i_);
+  Symbol sl = paper()->lookup_l ()->slur (dy , round_w, dir_);
 
   Real error = w-round_w;
   
   Atom a (sl);
-  a.translate (Offset ((left_dx_f_ + 0.5)*nw_f + error/2,
-                      left_pos_i_ * nh_f));
+  a.translate (Offset ((dx_f_drul_[LEFT] + 0.5)*nw_f + error/2,
+                      pos_i_drul_[LEFT] * nh_f));
   output->add (a);
   return output;
 }
index a5fd6aee0b3df972fc52f7b131f98e5bc37a001c..881c561e9592601a9c796b48cc557300d8758a08 100644 (file)
@@ -30,7 +30,7 @@ int idx (int dir, bool h_shift_b)
 {
   assert (abs (dir) == 1);
   int j = dir > 0 ? 0 : 3;
-  if ( h_shift_b) 
+  if (h_shift_b) 
        j += dir;
   return j;
 }
@@ -57,12 +57,12 @@ Collision::do_pre_processing()
   for (int i=0; i < clash_l_arr_.size(); i++) 
     {
        Note_column* c_l = clash_l_arr_[i];
-       if (! c_l->dir_i_
+       if (! c_l->dir_) 
          {
            warning ("No stem direction set. Ignoring column in clash. ");
            continue;
          }
-       int d = (c_l->dir_i_);
+       int d = (c_l->dir_);
        
        clash_group_arr_a[idx (d, c_l->h_shift_b_)].push (c_l);
     }
diff --git a/lily/include/beam-grav.hh b/lily/include/beam-grav.hh
new file mode 100644 (file)
index 0000000..3db08fc
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+  beam-grav.hh -- declare Beam_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef BEAM_GRAV_HH
+#define BEAM_GRAV_HH
+
+#include "engraver.hh"
+#include "drul-array.hh"
+
+/**
+  Generate a beam. Eats stems.
+ */
+class Beam_engraver : public Engraver
+{
+  Drul_array<Beam_req *> span_reqs_drul_;
+  Beam *beam_p_;
+  Rhythmic_grouping *current_grouping_p_;
+
+public:
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Beam_engraver();
+protected:
+  virtual void do_removal_processing();
+  virtual void do_process_requests();
+  virtual bool do_try_request (Request*);
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing();
+};
+
+#endif // BEAM_GRAV_HH
index 4539ac209c22fed87eb6f821cf367b5936cfce63..99e0e287ccacd7a89aa16d1a08b8360623d60a99 100644 (file)
  */
 class Crescendo : public Spanner , public Staff_side {
 public:
-    int grow_dir_i_;
+  int grow_dir_;
     
-/// if there is a dynamic at the end, make the sign smaller.
-    bool right_dyn_b_;
+  /// if there is a dynamic at the end, make the sign smaller.
+  Drul_array<bool> dyn_b_drul_;
 
-    /// if there is a dynamic at the end, make the sign smaller.
-    bool left_dyn_b_;
-    Crescendo();
+  Crescendo();
 protected:
-    SCORE_ELEM_CLONE(Crescendo);
-    virtual Molecule*brew_molecule_p()const;
-    virtual Interval symbol_height()const;
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  SCORE_ELEM_CLONE(Crescendo);
+  virtual Molecule*brew_molecule_p() const;
+  virtual Interval symbol_height() const;
+  DECLARE_MY_RUNTIME_TYPEINFO;
     
 private:
-    Symbol get_symbol()const;
-    
+  Symbol get_symbol() const;
 };
 
 #endif // CRESCENDO_HH
index abff328b59000f7424925be93a558a595a96c4cd..7854a348cea4184797ef3a0c5ef637401636825d 100644 (file)
@@ -14,7 +14,7 @@ class Directional_spanner : public Spanner{
 public:
     
     /// -1 below heads, +1 above heads.
-    int dir_i_;
+    Direction dir_;
     Directional_spanner();
     
     /// offset of "center" relative to left-column/0-pos of staff
index 26556edf9dfd356df0993240d0396013509f6703..bf71902245faac2e42464a9e849c5c3352674694 100644 (file)
@@ -13,7 +13,7 @@
 #include "engraver.hh"
 
 class Dynamic_engraver : public Engraver {
-    int dir_i_;
+    Direction dir_;
     Text_item * dynamic_p_;
     Crescendo * to_end_cresc_p_;
     Crescendo * cresc_p_;
index 57c560b18b6eee3f8a7dccb112821785d47fd1f9..ab38222b1a88d15086ba0e6bae58c8dfe96a892e 100644 (file)
 class Head_column : public Script_column
 { 
 public:
-    Link_array<Note_head> head_l_arr_;
-    /** The relative position of the "voice" containing this
-      chord. Normally this would be the same as the stem direction,
-      but rests do not have stems.  
-
-      Hmm. outdated.. Rests *do* have stems.
-      */
-
-    int dir_i_;
-    Stem* stem_l_;
-
-    void add (Note_head*);
-    virtual void add (Script*s);
-    virtual void set (Stem*);
-    Head_column();
-    DECLARE_MY_RUNTIME_TYPEINFO;
+  Link_array<Note_head> head_l_arr_;
+  /** The relative position of the "voice" containing this
+    chord. Normally this would be the same as the stem direction,
+    but rests do not have stems.  
+
+    Hmm. outdated.. Rests *do* have stems.
+    */
+
+  Direction dir_;
+  Stem* stem_l_;
+
+  void add (Note_head*);
+  virtual void add (Script*s);
+  void set (Stem*);
+  Head_column();
+  DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
 
 
-    virtual void do_pre_processing();
-    virtual void do_print()const;
-    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
+  virtual void do_pre_processing();
+  virtual void do_print() const;
+  virtual void do_substitute_dependency (Score_elem*,Score_elem*);
 };
 #endif // HEAD_COLUMN_HH
index b9045a4bdb5e520e551e2af3229ad0e79fde65e1..35918c95706313a092d1e2b7b042c4a14a74ae94 100644 (file)
 #include "elem-group.hh"
 #include "axis-group-item.hh"
 
+/**
+  Group stuff in horizontal sense. Example: Paper_column
+ */
 class Horizontal_group_item : public Axis_group_item, public Horizontal_group_element {
 protected:
-    virtual void remove_all() { Horizontal_group_element::remove_all (); }
-    virtual void do_print() const;
+  virtual void remove_all() { Horizontal_group_element::remove_all (); }
+  virtual void do_unlink () { 
+    Axis_group_item::do_unlink ();
+  }
+  virtual void do_junk_links() {
+    Axis_group_item::do_junk_links();
+  }
+  virtual void do_print() const;
 public:
-    virtual void add_element (Score_elem*e) { Horizontal_group_element::add_element (e); }
-    virtual void remove_element (Score_elem*e) { Horizontal_group_element::remove_element (e); }
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    SCORE_ELEM_CLONE(Horizontal_group_item);
-  
-
+  virtual void add_element (Score_elem*e) { Horizontal_group_element::add_element (e); }
+  virtual void remove_element (Score_elem*e) { Horizontal_group_element::remove_element (e); }
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  SCORE_ELEM_CLONE(Horizontal_group_item);
 };
 
 #endif // HORIZONTAL_GROUP_ITEM_HH
index 43784776f9cae929c884131bf319c7151258d07a..9c68248eb12dea2bdbb6766752d16e91d7422117 100644 (file)
@@ -21,10 +21,10 @@ class Note_column_engraver :public Engraver {
     Note_column *ncol_p_;
     Rest_column *restcol_p_;
     bool h_shift_b_;
-    int dir_i_;
+    Direction dir_;
     
 
-    bool acceptable_elem_b (Score_elem const*)const;
+    bool acceptable_elem_b (Score_elem const*) const;
 protected:
     virtual void set_feature (Feature);
     virtual void acknowledge_element (Score_elem_info);
index 3dc1eb9ba22d06171611b95b7fbd73a715a52fc0..e93f493176cc8f08f78c8888bc47a8acf92269b7 100644 (file)
@@ -15,6 +15,7 @@
 #include "virtual-methods.hh"
 #include "input.hh"
 #include "music.hh"
+#include "direction.hh"
 
 /**
  a voice element wants something printed.
@@ -49,7 +50,7 @@ public:
     bool equal_b (Request*) const;
 protected:
     virtual bool do_equal_b (Request*) const;
-    virtual void do_print()const;
+    virtual void do_print() const;
 };
 
 #define REQUESTMETHODS(T,accessor)     \
@@ -65,11 +66,11 @@ virtual void do_print() const
   this also a request */
 class Script_req  : public virtual Request { 
 public:
-    int dir_i_;
+    Direction dir_;
     General_script_def *scriptdef_p_;
 
     /* *************** */
-    bool do_equal_b (Request*)const;
+    bool do_equal_b (Request*) const;
 
     Script_req();
     REQUESTMETHODS(Script_req,script);
index 35b2ca0df3c3b46797a4467952e57471d35ce822..6662399cc7b86348b7d987d95ca05d3954a4ef6e 100644 (file)
@@ -15,7 +15,7 @@ class Slur_engraver :public Engraver {
     Array<Slur_req*> new_slur_req_l_arr_;
     Array<Slur *> slur_l_stack_;
     Array<Slur*> end_slur_l_arr_;
-    int dir_i_;
+    Direction dir_;
     /* *************** */
 protected:
     virtual ~Slur_engraver();
diff --git a/lily/include/stem-grav.hh b/lily/include/stem-grav.hh
new file mode 100644 (file)
index 0000000..c5807f7
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  stem-grav.hh -- declare Stem_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef STEM_GRAV_HH
+#define STEM_GRAV_HH
+
+#include "engraver.hh"
+
+/**
+  Make stems upon receiving noteheads.
+ */
+class Stem_engraver : public Engraver
+{
+  Direction dir_;
+  Stem *stem_p_;
+  Rhythmic_req *rhythmic_req_l_;
+protected:
+  virtual void acknowledge_element (Score_elem_info);
+  virtual void do_pre_move_processing ();
+  virtual void set_feature (Feature dir_i_);
+
+public:
+  Stem_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+
+#endif // STEM_GRAV_HH
index 80540bae26a2d1f7deb36938767560fa9a8fe055..8bc0bb44a9d6fc4489d12dd264476778c905ee64 100644 (file)
@@ -12,7 +12,7 @@
 class Text_engraver : public Engraver{
     Text_item * text_p_;
     Text_req * text_req_l_;
-    int dir_i_;
+    Direction dir_;
     /* *************** */
 protected:
     virtual void set_feature (Feature);
index 63f472e3d8295ce70c4d648d919ba30c6d0292f6..ecdfd4fea7d26ef4942877a35a0d1365dc0b2b94 100644 (file)
@@ -17,7 +17,7 @@ class Tie_engraver : public Engraver {
     Tie * tie_p_;
     Moment end_mom_;
     Tie_req * req_l_;
-    int dir_i_;
+    Direction dir_;
     Tie_req *end_req_l_;
     Melodic_req * end_melodic_req_l_;
     Melodic_req  * melodic_req_l_;
index 17088c668fed2625a991bbf5a4772a0b6e0ff9b4..bfcf734e307007a63cf610844bc29637e9048edb 100644 (file)
 #include "lily-proto.hh"
 #include "virtual-methods.hh"
 
+/** Make some kind of #Element#s from Requests. Elements are made by
+  hierarchically grouped #Translator#s
+  */
 class Translator {
 public:
-    String id_str_;
+  String id_str_;
     
-    int iterator_count_;
+  int iterator_count_;
     
-    virtual Global_translator *global_l() { return 0; }
-
-    /// Score_register = 0, Staff_registers = 1, etc)
-    virtual void print()const;
-    virtual int depth_i()const=0;
-    virtual bool is_bottom_engraver_b() const { return false; }
-    virtual bool try_request (Request*);
-    virtual Translator *find_get_translator_l (String name, String id)=0;
-    virtual Translator *ancestor_l (int l=1)=0;
-    virtual ~Translator(){}
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Translator();
-    virtual Translator *get_default_interpreter()=0;
+  virtual Global_translator *global_l() { return 0; }
+
+  virtual void print() const;
+    
+  /// Score_register = 0, Staff_registers = 1, etc)
+  virtual int depth_i() const=0;
+  virtual bool is_bottom_engraver_b() const { return false; }
+  virtual bool try_request (Request*);
+  virtual Translator *find_get_translator_l (String name, String id)=0;
+  virtual Translator *ancestor_l (int l=1)=0;
+  virtual ~Translator(){}
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Translator();
+  virtual Translator *get_default_interpreter()=0;
 };
 
 #endif // TRANSLATOR_HH
index 38f57d574db6085b927b5292d1a03426541176ce..e6b9a3de84f019609f98e5adee90faac89059d05 100644 (file)
@@ -17,7 +17,7 @@
  */
 class Voice_group_engravers  : public Engraver_group_engraver {
     Moment termination_mom_;
-    int dir_i_;
+    Direction dir_;
 
 protected:
     virtual void do_print() const;
index ec84dbba52762626257c223bc5a9935d77c0bd60..6bb466a5af0f085a2dd93a8ad96845d8f461939d 100644 (file)
@@ -49,7 +49,7 @@ Request*
 get_script_req (int d , General_script_def*def)
 {
   Musical_script_req* script_req_p = new Musical_script_req;
-  script_req_p->dir_i_ =d;
+  script_req_p->dir_ =d;
   script_req_p->scriptdef_p_=def;
   return script_req_p;
 }
index d5b4217f7eceabfc2ac45061fcb9bed79deb1fb0..3e66ec751300ef138689e08880c616324f6d2ce0 100644 (file)
@@ -56,13 +56,13 @@ Rest_collision::do_post_processing()
   if (!(stem_l->beams_left_i_ || stem_l->beams_right_i_))
        return;
 
-  int dir_i = rest_l_arr_[0]->dir_i_;
+  int dir_i = rest_l_arr_[0]->dir_;
   int midpos = 4;
 #if 1
   // ugh
   int stem_length_i = 7 - 2;
   // ugh, Stem::stem_start vs Stem::stem_end
-  int pos = (stem_l->stem_end_f() - midpos) - dir_i * stem_length_i;
+  int pos = (int)(stem_l->stem_end_f() - midpos) - dir_i * stem_length_i;
 #else // nogo: stem_start not set for rests?
   int pos = (stem_l->stem_start_f() - midpos) + dir_i * 2;
 #endif
@@ -92,9 +92,9 @@ Rest_collision::do_pre_processing()
     {
        int dy = rest_l_arr_.size() > 2 ? 6 : 4;
        
-       rest_l_arr_[0]->translate_heads (rest_l_arr_[0]->dir_i_ *dy);   
+       rest_l_arr_[0]->translate_heads (rest_l_arr_[0]->dir_ *dy);     
        // top is last element...
-       rest_l_arr_.top()->translate_heads (rest_l_arr_.top ()->dir_i_* dy);    
+       rest_l_arr_.top()->translate_heads (rest_l_arr_.top ()->dir_* dy);      
     }
   // meisjes met jongetjes
   else 
@@ -104,8 +104,8 @@ Rest_collision::do_pre_processing()
        int dir_i = -1;
        rest_l_arr_[0]->translate_heads (dir_i * 3);    
 #else
-       // int dir_i = - ncol_l_arr_[0]->dir_i_;
-       int dir_i = rest_l_arr_[0]->dir_i_;
+       // int dir_i = - ncol_l_arr_[0]->dir_;
+       int dir_i = rest_l_arr_[0]->dir_;
        // hope it's 4: if it works->doco
        int midpos = 4;
        
@@ -121,7 +121,7 @@ Rest_collision::do_pre_processing()
          {
            // how to know whether to sort?
            ncol_l_arr_[i]->sort();
-           for ( int j = 0; j < ncol_l_arr_[i]->head_l_arr_.size(); j++)
+           for (int j = 0; j < ncol_l_arr_[i]->head_l_arr_.size(); j++)
                minpos = minpos >? dir_i * 
                    (ncol_l_arr_[i]->head_l_arr_[j]->position_i_ -midpos) + sep_i;
          }
index 836541ce16c9726950321c21b589abad779a66be..6f9359aef7c46fce45dd5b706746c304097dc62a 100644 (file)
@@ -26,7 +26,7 @@ Script_column::add (Script*s_l)
 
 
 void
-Script_column::do_print()const
+Script_column::do_print() const
 {
 #ifndef NPRINT
   DOUT << "scripts: " << script_l_arr_.size() << '\n'; 
@@ -37,8 +37,8 @@ static int
 idx (bool inside, int dir)
 {
   int j = (dir+1);
-  if ( !inside)
-       j ++;
+  if (!inside)
+    j ++;
   return j;
 }
 
@@ -46,49 +46,49 @@ void
 Script_column::do_pre_processing()
 {
   if (!script_l_arr_.size()) 
-       return;
+    return;
   
   /* up+inside, up+outside, down+inside, down+outside */
   Array<Script*> placed_l_arr_a[4];
   for (int i=0; i < script_l_arr_.size(); i++) 
     {
-       Script*s_l = script_l_arr_[i];
-       placed_l_arr_a[idx (s_l->inside_staff_b_ , s_l->dir_i_) ].push (s_l);
+      Script*s_l = script_l_arr_[i];
+      placed_l_arr_a[idx (s_l->inside_staff_b_ , s_l->dir_) ].push (s_l);
     }
   
   for (int j =0; j <4; j++) 
     {
-       placed_l_arr_a[j].sort (Script::compare);
+      placed_l_arr_a[j].sort (Script::compare);
     }
 
 
   for (int j =0; j < 4; j++) 
     {
-       if (placed_l_arr_a[j].size())
-           for (int i=0; i  < support_l_arr_.size(); i++)
-               placed_l_arr_a[j][0]->add_support (support_l_arr_[i]);
+      if (placed_l_arr_a[j].size())
+       for (int i=0; i  < support_l_arr_.size(); i++)
+         placed_l_arr_a[j][0]->add_support (support_l_arr_[i]);
     }
   
   Item * support_l=0;
   int j = 0;
   for (; j < 2; j++) 
     {
-       for (int i=0; i < placed_l_arr_a[j].size(); i++) 
-         {
-           if (support_l)
-               placed_l_arr_a[j][i]->add_support (support_l);
-           support_l = placed_l_arr_a[j][i];
-         }
+      for (int i=0; i < placed_l_arr_a[j].size(); i++) 
+       {
+         if (support_l)
+           placed_l_arr_a[j][i]->add_support (support_l);
+         support_l = placed_l_arr_a[j][i];
+       }
     }
   support_l = 0;
   for (; j < 4; j++) 
     {
-       for (int i=0; i < placed_l_arr_a[j].size(); i++) 
-         {
-           if (support_l)
-               placed_l_arr_a[j][i]->add_support (support_l);
-           support_l = placed_l_arr_a[j][i];
-         }
+      for (int i=0; i < placed_l_arr_a[j].size(); i++) 
+       {
+         if (support_l)
+           placed_l_arr_a[j][i]->add_support (support_l);
+         support_l = placed_l_arr_a[j][i];
+       }
     }
 }
 
@@ -106,7 +106,7 @@ Script_column::do_substitute_dependency (Score_elem*o,Score_elem*n)
 {
   if (o->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->item(),(Script*) (n?n->item ():0));
+      support_l_arr_.substitute (o->item(), (n?n->item ():0));
     }
 }
index f66b2eb3b168e55e606bb7644639020405eb44bb..c9c1585612c6a97bc24e1cade0de10b5517615d0 100644 (file)
@@ -19,12 +19,12 @@ bool
 Script_engraver::do_try_request (Request *r_l)
 {
   if (!r_l->musical() || ! r_l->musical ()->musicalscript ())
-       return false ;
+    return false ;
   
   for (int i=0; i < script_req_l_arr_.size(); i++) 
     {
-       if ( r_l->equal_b (script_req_l_arr_[i]))
-           return true;
+      if (r_l->equal_b (script_req_l_arr_[i]))
+       return true;
        
     }
   script_req_l_arr_.push (r_l->script());
@@ -37,12 +37,12 @@ Script_engraver::do_process_requests()
 {
   for (int i=0; i < script_req_l_arr_.size(); i++)
     {
-       Script_req* l=script_req_l_arr_[i];
-       Script *p =new Script;
-       p->dir_i_ = l->dir_i_;
-       p->specs_l_ = l->scriptdef_p_;
-       script_p_arr_.push (p);
-       announce_element (Score_elem_info (p, l));
+      Script_req* l=script_req_l_arr_[i];
+      Script *p =new Script;
+      p->dir_ = l->dir_;
+      p->specs_l_ = l->scriptdef_p_;
+      script_p_arr_.push (p);
+      announce_element (Score_elem_info (p, l));
     }
 }
 
@@ -52,9 +52,9 @@ Script_engraver::do_pre_move_processing()
   Staff_symbol* s_l = get_staff_info().staff_sym_l_;
   for (int i=0; i < script_p_arr_.size(); i++) 
     {
-       Script*script_p = script_p_arr_[i];
-       script_p->set_staffsym (s_l);
-       typeset_element (script_p);
+      Script*script_p = script_p_arr_[i];
+      script_p->set_staffsym (s_l);
+      typeset_element (script_p);
     }
   script_p_arr_.clear();
 }