]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.8
authorfred <fred>
Sun, 24 Mar 2002 19:55:16 +0000 (19:55 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:55:16 +0000 (19:55 +0000)
200 files changed:
flower/choleski.cc
flower/data-file.cc
flower/diagonal-storage.cc
flower/directed-graph.cc
flower/dstream.cc
flower/flower-version.cc
flower/full-storage.cc
flower/include/acursor.hh
flower/include/assoc-iter.hh
flower/include/assoc.hh
flower/include/choleski.hh
flower/include/compare.hh
flower/include/cursor.hh
flower/include/cursor.icc
flower/include/cursor.tcc
flower/include/data-file.hh
flower/include/diagonal-storage.hh
flower/include/directed-graph.hh
flower/include/dstream.hh
flower/include/flower-debug.hh
flower/include/full-storage.hh
flower/include/full-storage.icc
flower/include/handle.hh
flower/include/iterate.hh
flower/include/lgetopt.hh
flower/include/libc-extension.hh
flower/include/link.hh
flower/include/link.icc
flower/include/list.hh
flower/include/list.icc
flower/include/matrix-storage.hh
flower/include/matrix.hh
flower/include/parray.hh
flower/include/path.hh
flower/include/pcursor.hh
flower/include/pcursor.tcc
flower/include/plist.hh
flower/include/plist.icc
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.hh
flower/include/text-db.hh
flower/include/text-stream.hh
flower/include/unionfind.hh
flower/include/varray.hh
flower/include/vector.hh
flower/include/virtual-methods.hh
flower/lgetopt.cc
flower/libc-extension.cc
flower/matrix-debug.cc
flower/matrix-storage.cc
flower/matrix.cc
flower/rational.cc
flower/scalar.cc
flower/string-convert.cc
flower/string.cc
flower/stringtest.cc
flower/stringutil.cc
flower/text-db.cc
flower/text-stream.cc
flower/unionfind.cc
flower/vector.cc
lily/include/audio-column.hh
lily/include/audio-item.hh
lily/include/audio-score.hh
lily/include/audio-staff.hh
lily/include/axes.hh
lily/include/axis-group.hh
lily/include/bar-column-grav.hh
lily/include/bar-column.hh
lily/include/bar-grav.hh
lily/include/bar-number-grav.hh
lily/include/beam.hh
lily/include/boxes.hh
lily/include/break.hh
lily/include/clef-grav.hh
lily/include/clef-item.hh
lily/include/col-info.hh
lily/include/colhpos.hh
lily/include/collision-grav.hh
lily/include/collision.hh
lily/include/command-request.hh
lily/include/dimen.hh
lily/include/dynamic-grav.hh
lily/include/elem-group-item.hh
lily/include/elem-group.hh
lily/include/engraver-group.hh
lily/include/engraver.hh
lily/include/general-script-def.hh
lily/include/global-performers.hh
lily/include/global-translator.hh
lily/include/grouping.hh
lily/include/head-column.hh
lily/include/head-grav.hh
lily/include/horizontal-align-item.hh
lily/include/horizontal-group-item.hh
lily/include/ineq-constrained-qp.hh
lily/include/input-translator.hh
lily/include/item.hh
lily/include/key-grav.hh
lily/include/key-item.hh
lily/include/key-performer.hh
lily/include/key.hh
lily/include/keyword.hh
lily/include/leastsquares.hh
lily/include/lily-proto.hh
lily/include/line-group-grav.hh
lily/include/line-spacer.hh
lily/include/linespace.hh
lily/include/local-key-grav.hh
lily/include/local-key-item.hh
lily/include/lookup.hh
lily/include/lyric-engraver.hh
lily/include/lyric-performer.hh
lily/include/main.hh
lily/include/meter-grav.hh
lily/include/meter-performer.hh
lily/include/meter.hh
lily/include/midi-def.hh
lily/include/midi-item.hh
lily/include/midi-stream.hh
lily/include/midi-walker.hh
lily/include/misc.hh
lily/include/molecule.hh
lily/include/music-iterator.hh
lily/include/music-list.hh
lily/include/music.hh
lily/include/musical-request.hh
lily/include/my-lily-parser.hh
lily/include/note-column-grav.hh
lily/include/note-column.hh
lily/include/note-head.hh
lily/include/note-performer.hh
lily/include/notename-table.hh
lily/include/notename.hh
lily/include/offset.hh
lily/include/p-col.hh
lily/include/p-score.hh
lily/include/paper-def.hh
lily/include/parseconstruct.hh
lily/include/performer-group-performer.hh
lily/include/performer.hh
lily/include/qlp.hh
lily/include/qlpsolve.hh
lily/include/request.hh
lily/include/rest-column.hh
lily/include/score-align-grav.hh
lily/include/score-column.hh
lily/include/score-elem-info.hh
lily/include/score-elem.hh
lily/include/score-grav.hh
lily/include/score-halign-grav.hh
lily/include/score-performer.hh
lily/include/score.hh
lily/include/scoreline.hh
lily/include/script-column.hh
lily/include/script-def.hh
lily/include/script-grav.hh
lily/include/script.hh
lily/include/slur-grav.hh
lily/include/slur.hh
lily/include/span-bar-grav.hh
lily/include/span-bar.hh
lily/include/span-score-bar.hh
lily/include/spanner.hh
lily/include/spring-spacer.hh
lily/include/staff-side.hh
lily/include/staff-sym.hh
lily/include/stem-beam-grav.hh
lily/include/stem.hh
lily/include/super-elem.hh
lily/include/swallow-grav.hh
lily/include/swallow-perf.hh
lily/include/symbol.hh
lily/include/symtable.hh
lily/include/tex-stream.hh
lily/include/tex.hh
lily/include/text-def.hh
lily/include/text-grav.hh
lily/include/text-item.hh
lily/include/text-spanner.hh
lily/include/tie-grav.hh
lily/include/tie.hh
lily/include/time-description.hh
lily/include/timing-grav.hh
lily/include/translator.hh
lily/include/vertical-align-elem.hh
lily/include/vertical-align-grav.hh
lily/include/vertical-align-spanner.hh
lily/include/vertical-group-spanner.hh
lily/include/voice-group-gravs.hh

index 086759193fb57b4152ddbb3331168bd05d2d5c61..eae3c49cea5a999f756af105a364160419382ff4 100644 (file)
@@ -13,93 +13,93 @@ const Real EPS = 1e-7;              // so sue me. Hard coded
 //#define PARANOID
 
 void
-Choleski_decomposition::full_matrix_solve(Vector &out, Vector const &rhs)const
+Choleski_decomposition::full_matrix_solve (Vector &out, Vector const &rhs)const
 {
     int n= rhs.dim();
-    assert(n == L.dim());
+    assert (n == L.dim());
     Vector y;
-    y.set_dimn);
-    out.set_dim(n);
+    y.set_dim (n);
+    out.set_dim (n);
     
     // forward substitution
     for (int i=0; i < n; i++) {
-       Real sum(0.0);
+       Real sum (0.0);
        for (int j=0; j < i; j++)
-           sum += y(j) * L(i,j);
-       y(i) = (rhs(i) - sum)/L(i,i);
+           sum += y (j) * L(i,j);
+       y (i) = (rhs (i) - sum)/L(i,i);
     }
     
     for (int i=0; i < n; i++)
-       y(i) /= D(i);
+       y (i) /= D(i);
 
     // backward subst
-    Vector &x(out);            // using input as return val.
+    Vector &x (out);           // using input as return val.
     for (int i=n-1; i >= 0; i--) {
-       Real sum(0.0);
+       Real sum (0.0);
        for (int j=i+1; j < n; j++)
-           sum += L(j,i)*x(j);
-       x(i) = (y(i) - sum)/L(i,i);
+           sum += L(j,i)*x (j);
+       x (i) = (y (i) - sum)/L(i,i);
     }
 }
 
 void
-Choleski_decomposition::band_matrix_solve(Vector &out, Vector const &rhs)const
+Choleski_decomposition::band_matrix_solve (Vector &out, Vector const &rhs)const
 {
     int n= rhs.dim();
     int b = L.band_i();
-    assert(n == L.dim());
+    assert (n == L.dim());
 
-      out.set_dim(n);
+      out.set_dim (n);
   
     Vector y;
-    y.set_dim(n);
+    y.set_dim (n);
     
     // forward substitution
     for (int i=0; i < n; i++) {
-       Real sum(0.0);
+       Real sum (0.0);
        for (int j= 0 >? i - b; j < i; j++)
-           sum += y(j) * L(i,j);
-       y(i) = (rhs(i) - sum)/L(i,i);
+           sum += y (j) * L(i,j);
+       y (i) = (rhs (i) - sum)/L(i,i);
     }
     for (int i=0; i < n; i++)
-       y(i) /= D(i);
+       y (i) /= D(i);
 
     // backward subst
-    Vector &x(out);            // using input as return val.
+    Vector &x (out);           // using input as return val.
     for (int i=n-1; i >= 0; i--) {
-       Real sum(0.0);
+       Real sum (0.0);
        for (int j=i+1; j <= i + b&&j < n ; j++)
-           sum += L(j,i)*x(j);
-       x(i) = (y(i) - sum)/L(i,i);
+           sum += L(j,i)*x (j);
+       x (i) = (y (i) - sum)/L(i,i);
     }
 }
 
 void
-Choleski_decomposition::solve(Vector &x, Vector const &rhs)const
+Choleski_decomposition::solve (Vector &x, Vector const &rhs)const
 {
     if (L.band_b()) {
-       band_matrix_solve(x,rhs);
+       band_matrix_solve (x,rhs);
     } else
-       full_matrix_solve(x,rhs);
+       full_matrix_solve (x,rhs);
 }
 
 Vector
-Choleski_decomposition::solve(Vector rhs)const
+Choleski_decomposition::solve (Vector rhs)const
 {
     Vector r;
-    solve(r, rhs);
+    solve (r, rhs);
     return r;
 }
 
 void
-Choleski_decomposition::full_matrix_decompose(Matrix const & P)
+Choleski_decomposition::full_matrix_decompose (Matrix const & P)
 {
  
    int n = P.dim();
     L.unit();
     for (int k= 0; k < n; k++) {
        for (int j = 0; j < k; j++){
-           Real sum(0.0);
+           Real sum (0.0);
            for (int l=0; l < j; l++)
                sum += L(k,l)*L(j,l)*D(l);
            L(k,j) = (P(k,j) - sum)/D(j);
@@ -107,7 +107,7 @@ Choleski_decomposition::full_matrix_decompose(Matrix const & P)
        Real sum=0.0;
        
        for (int l=0; l < k; l++)
-           sum += sqr(L(k,l))*D(l);
+           sum += sqr (L(k,l))*D(l);
        Real d = P(k,k) - sum;
        D(k) = d;
     }
@@ -115,7 +115,7 @@ Choleski_decomposition::full_matrix_decompose(Matrix const & P)
 }
 
 void
-Choleski_decomposition::band_matrix_decompose(Matrix const &P)
+Choleski_decomposition::band_matrix_decompose (Matrix const &P)
 {
     int n = P.dim();
     int b = P.band_i();
@@ -123,7 +123,7 @@ Choleski_decomposition::band_matrix_decompose(Matrix const &P)
     
     for (int i= 0; i < n; i++) {
        for (int j = 0 >? i - b; j < i; j++){
-           Real sum(0.0);
+           Real sum (0.0);
            for (int l=0 >? i - b; l < j; l++)
                sum += L(i,l)*L(j,l)*D(l);
            L(i,j) = (P(i,j) - sum)/D(j);
@@ -131,12 +131,12 @@ Choleski_decomposition::band_matrix_decompose(Matrix const &P)
        Real sum=0.0;
        
        for (int l=0 >? i - b; l < i; l++)
-           sum += sqr(L(i,l))*D(l);
+           sum += sqr (L(i,l))*D(l);
        Real d = P(i,i) - sum;
        D(i) = d;
     }
     L.try_set_band();
-    assert ( L.band_i() == P.band_i());
+    assert ( L.band_i() == P.band_i ());
 }
 
 
@@ -146,20 +146,20 @@ Choleski_decomposition::band_matrix_decompose(Matrix const &P)
   Standard matrix algorithm.
    */
 
-Choleski_decomposition::Choleski_decomposition(Matrix const & P)
-   : L(P.dim()), D(P.dim())
+Choleski_decomposition::Choleski_decomposition (Matrix const & P)
+   : L(P.dim()), D(P.dim ())
 { 
 #ifdef PARANOID
-    assert((P-P.transposed()).norm()/P.norm() < EPS);
+    assert ((P-P.transposed()).norm ()/P.norm () < EPS);
 #endif
     if  (P.band_b()) 
-       band_matrix_decompose(P);
+       band_matrix_decompose (P);
     else
-       full_matrix_decompose(P);
+       full_matrix_decompose (P);
  
 
 #ifdef PARANOID
-    assert((original()-P).norm() / P.norm() < EPS);
+    assert ((original()-P).norm () / P.norm () < EPS);
 #endif
 }
 
@@ -167,7 +167,7 @@ Matrix
 Choleski_decomposition::original() const
 {
     Matrix T(L.dim());
-    T.set_diag(D);
+    T.set_diag (D);
     return L*T*L.transposed();
 }
 
@@ -175,20 +175,20 @@ Matrix
 Choleski_decomposition::inverse() const
 {
     int n=L.dim();
-    Matrix invm(n);
-    Vector e_i(n);
-    Vector inv(n);
+    Matrix invm (n);
+    Vector e_i (n);
+    Vector inv (n);
     for (int i = 0; i < n; i++) {
-       e_i.set_unit(i);
-       solve(inv, e_i);
+       e_i.set_unit (i);
+       solve (inv, e_i);
        for (int j = 0 ; j<n; j++)
-           invm(i,j) = inv(j);
+           invm (i,j) = inv (j);
     }
     
 #ifdef PARANOID
     Matrix I1(n), I2(original());
     I1.unit();
-    assert((I1-I2*invm).norm()/I2.norm() < EPS);
+    assert ((I1-I2*invm).norm()/I2.norm () < EPS);
 #endif
     
     return invm;
index 0dad79c91ff91cd57184b2b227e8589b281bfad5..b324f200397266f6499cd586924c81ef3f2599d6 100644 (file)
@@ -12,7 +12,7 @@ Data_file::gobble_white()
        if (eof()) 
            break;
 
-    data_unget(c);
+    data_unget (c);
 }
 
 String
@@ -24,9 +24,9 @@ Data_file::get_word()
        {
        char    c  = data_get();
        
-       if (isspace(c) || eof()) 
+       if (isspace (c) || eof()) 
            {
-           data_unget(c);
+           data_unget (c);
            break;
            }
        
@@ -37,7 +37,7 @@ Data_file::get_word()
 
            while ((c  = data_get()) != '\"')
                if (eof())
-                   error("EOF in a string");           
+                   error ("EOF in a string");          
                else
                    s += c;
            
@@ -59,7 +59,7 @@ Data_file::data_get() {
     char c =  get(); 
     if (!rawmode && c == '#') // gobble comment
        {       
-       while ((c = get()) != '\n' && !eof()) 
+       while ((c = get()) != '\n' && !eof ()) 
            ;
            return '\n';
        }    
@@ -73,7 +73,7 @@ String Data_file::get_line()
     char c; 
     String s;
 
-    while ((c  = data_get()) != '\n' && !eof())
+    while ((c  = data_get()) != '\n' && !eof ())
        s += c;
     return s;  
 }
@@ -85,8 +85,8 @@ Data_file::gobble_leading_white()
     // eat blank lines.
     while (!eof()) {
        char c = data_get();                
-       if (!isspace(c)) {
-           data_unget(c);
+       if (!isspace (c)) {
+           data_unget (c);
            break;
        }
     }
index fc812423e5649e2f873b31286badba15de29311e..92ed98920712e4bf971e62db8cf0bb2e098d4fe0 100644 (file)
@@ -47,18 +47,18 @@ Diagonal_storage::band_size_i()const
 }
 
 void
-Diagonal_storage::set_band_size(int s)
+Diagonal_storage::set_band_size (int s)
 {
-    asserts>=0);
-    Full_storage f(dim(), 2*s+1);
+    assert (s>=0);
+    Full_storage f (dim(), 2*s+1);
     for (int i=0; i < dim(); i++) {
        int k=-s;
        for ( ;  k < -band_size_i(); k++)
-           f.elem(i,k + s) = 0.0;
+           f.elem (i,k + s) = 0.0;
        for ( ; k <=  band_size_i()&& k<=s ; k++)
-           f.elem(i, k + s) = band_.elem(i,k+ band_size_i());
-       for; k <= s; k++)
-           f.elem(i, k + s) =0.0;
+           f.elem (i, k + s) = band_.elem (i,k+ band_size_i());
+       for (; k <= s; k++)
+           f.elem (i, k + s) =0.0;
     }
 
     band_ = f;
@@ -70,31 +70,31 @@ Diagonal_storage::set_band_size(int s)
   any takers?
   */
 void
-Diagonal_storage::insert_row(int )
+Diagonal_storage::insert_row (int)
 {
-    assert(false);
+    assert (false);
 }
 
 void
-Diagonal_storage::delete_row(int )
+Diagonal_storage::delete_row (int)
 {
-    assert(false);
+    assert (false);
 }
 
 void
-Diagonal_storage::resize(int,int)
+Diagonal_storage::resize (int,int)
 {
 }
 
 void
-Diagonal_storage::resize(int)
+Diagonal_storage::resize (int)
 {
 }
 
 void
-Diagonal_storage::delete_column(int )
+Diagonal_storage::delete_column (int)
 {
-    assert(false);
+    assert (false);
 }
     
 Diagonal_storage::~Diagonal_storage()
@@ -103,26 +103,26 @@ Diagonal_storage::~Diagonal_storage()
 
 
 bool
-Diagonal_storage::band_elt_b(int i,int j)const
+Diagonal_storage::band_elt_b (int i,int j)const
 {
-    return abs(i-j) <= band_size_i();
+    return abs (i-j) <= band_size_i();
 }
 
 void
-Diagonal_storage::assert_valid(int i,int j )const
+Diagonal_storage::assert_valid (int i,int j)const
 {
-    assert( band_elt_b(i,j) );
-    assert( i >=0 && j >=0 && i < dim() && j < dim());
+    assert (band_elt_b (i,j));
+    assert (i >=0 && j >=0 && i < dim() && j < dim ());
 }
 
 
 void
-Diagonal_storage::resize_dim(int d)
+Diagonal_storage::resize_dim (int d)
 {
-    Full_storage f(d, 2*band_size_i()+1);
+    Full_storage f (d, 2*band_size_i()+1);
     for (int i=0; i < d && i < dim(); i++) {
        for ( int k=0;  k < 2*band_size_i(); k++)
-           f.elem(i,k) = elem(i,k);
+           f.elem (i,k) = elem (i,k);
     }
 
     band_ = f;
@@ -131,37 +131,37 @@ Diagonal_storage::resize_dim(int d)
 
 
 bool
-Diagonal_storage::mult_ok(int i,int )const
+Diagonal_storage::mult_ok (int i,int)const
 {
     return i < dim();
 }
 
 void
-Diagonal_storage::mult_next(int &i, int &j)const
+Diagonal_storage::mult_next (int &i, int &j)const
 {
     j++;
-    if ( j < i - band_size_i() 
+    if ( j < i - band_size_i()) 
        j = i- band_size_i();
-    if ( j > i + band_size_i() || j >= dim() ) {
+    if ( j > i + band_size_i() || j >= dim ()) {
        i++;
        j = 0 >? i - band_size_i(); 
     }
 }
 
 bool
-Diagonal_storage::trans_ok(int ,int j)const
+Diagonal_storage::trans_ok (int ,int j)const
 {
     return j < dim();
 }
 
 void
-Diagonal_storage::trans_next(int &i, int& j)const
+Diagonal_storage::trans_next (int &i, int& j)const
 {
     i++;
     if ( i < j - band_size_i())
        i = j-band_size_i();
     
-    if ( i >= dim() || i > j + band_size_i() ) {
+    if ( i >= dim() || i > j + band_size_i ()) {
        j++;
        i = 0 >? j - band_size_i(); 
     }
@@ -170,26 +170,26 @@ Diagonal_storage::trans_next(int &i, int& j)const
 static Real nul_entry=0.0;
 
 Real 
-Diagonal_storage::elem(int i, int j)const
+Diagonal_storage::elem (int i, int j)const
 {
-    if (abs ( i-j ) > band_size_i())
+    if (abs ( i-j) > band_size_i())
        return 0;
     else
-       return band_.elem(i, j - i +band_size_i());
+       return band_.elem (i, j - i +band_size_i());
 }
 
 Real &
-Diagonal_storage::elem(int i, int j)
+Diagonal_storage::elem (int i, int j)
 {
     /*
       if this fails, the previous call fucked up
       */
-    assert(!nul_entry);
+    assert (!nul_entry);
 
-    if (abs ( i-j ) > band_size_i())  
+    if (abs ( i-j) > band_size_i())  
        return nul_entry;
     else
-       return band_.elem(i, j - i + band_size_i());
+       return band_.elem (i, j - i + band_size_i());
 }
 
 /*
@@ -197,10 +197,10 @@ Diagonal_storage::elem(int i, int j)
  */
 
 bool
-Diagonal_storage::try_right_multiply(Matrix_storage*dest,
+Diagonal_storage::try_right_multiply (Matrix_storage*dest,
                                     const Matrix_storage*right)const
 {
-    if ( right->name() != Diagonal_storage::static_name() 
+    if ( right->name() != Diagonal_storage::static_name ()
        return false;
     
     const Diagonal_storage*  right_diag = (Diagonal_storage const*)right;
@@ -216,8 +216,8 @@ Diagonal_storage::try_right_multiply(Matrix_storage*dest,
            int relk =  startk + band_size_i() -i;
            Real sum =0.0;
            for ( int k = startk; k <= stopk; k++)
-               sum += band_.elem(i, relk++) * right_diag->elem(k, j);
-           dest->elem(i, j) = sum;
+               sum += band_.elem (i, relk++) * right_diag->elem (k, j);
+           dest->elem (i, j) = sum;
            
        }
     }
@@ -227,13 +227,13 @@ Diagonal_storage::try_right_multiply(Matrix_storage*dest,
 IMPLEMENT_IS_TYPE_B1(Diagonal_storage, Matrix_storage);
 
 
-Diagonal_storage::Diagonal_storage(Matrix_storage*stor_l, int band_i)
+Diagonal_storage::Diagonal_storage (Matrix_storage*stor_l, int band_i)
 {
-    set_band_size(band_i);
-    resize_dim(stor_l->dim());
+    set_band_size (band_i);
+    resize_dim (stor_l->dim());
 
-    for ( int i=0,j=0; mult_ok(i,j); mult_next(i,j))
-       band_.elem(i, j + band_i -i ) = stor_l->elem(i,j);
+    for ( int i=0,j=0; mult_ok (i,j); mult_next (i,j))
+       band_.elem (i, j + band_i -i) = stor_l->elem (i,j);
 }
 
 void
index a08f4563819bfd67a9be069d44bbedb662ad1a9a..2c55688011c804ea4265abed04789fa0a491b58d 100644 (file)
@@ -30,15 +30,15 @@ Directed_graph_node::get_out_edge_arr()const
 /**
   Should not copy deps automatically
  */
-Directed_graph_node::Directed_graph_node(Directed_graph_node const&)
+Directed_graph_node::Directed_graph_node (Directed_graph_node const&)
 {
 }
 
 void
-Directed_graph_node::copy_edges_out(Directed_graph_node const &s)
+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]);
+    for (int i=0; i < s.edge_out_l_arr_.size(); i++)
+       add (s.edge_out_l_arr_[i]);
 }
 
 void
@@ -46,37 +46,37 @@ Directed_graph_node::OK() const
 { 
 #ifndef NDEBUG
     for (int i=0; i < edge_out_l_arr_.size(); i++) {
-       assert(edge_out_l_arr_[i]->
-              edge_in_l_arr_.find_l(this));
+       assert (edge_out_l_arr_[i]->
+              edge_in_l_arr_.find_l (this));
     }
     for (int i=0; i < edge_in_l_arr_.size(); i++)
-       assert(edge_in_l_arr_[i]->contains_b( this));
+       assert (edge_in_l_arr_[i]->contains_b (this));
 #endif
 }
 
 bool
-Directed_graph_node::contains_b(const Directed_graph_node *d)const
+Directed_graph_node::contains_b (const Directed_graph_node *d)const
 {
-    return edge_out_l_arr_.find_l((Directed_graph_node*)d);
+    return edge_out_l_arr_.find_l ((Directed_graph_node*)d);
 }
     
 void
-Directed_graph_node::remove_edge_out_idx(int i)
+Directed_graph_node::remove_edge_out_idx (int i)
 {
     PARANOID_OK();
-    Directed_graph_node * d_l = edge_out_l_arr_.get(i);
+    Directed_graph_node * d_l = edge_out_l_arr_.get (i);
 
-    int j = d_l->edge_in_l_arr_.find_i(this);
-    assert(j>=0);
-    d_l->edge_in_l_arr_.unordered_del(j);
+    int j = d_l->edge_in_l_arr_.find_i (this);
+    assert (j>=0);
+    d_l->edge_in_l_arr_.unordered_del (j);
     PARANOID_OK();
 }
 
 void
-Directed_graph_node::remove_edge_in(Directed_graph_node *d_l)
+Directed_graph_node::remove_edge_in (Directed_graph_node *d_l)
 {
     PARANOID_OK();
-    d_l->remove_edge_out(this);
+    d_l->remove_edge_out (this);
     PARANOID_OK();
 }
  
@@ -84,9 +84,9 @@ void
 Directed_graph_node::remove_edge_out (Directed_graph_node *d_l)
 {
     PARANOID_OK();
-    for (int i=0; i < edge_out_l_arr_.size(); ) {
+    for (int i=0; i < edge_out_l_arr_.size();) {
        if (edge_out_l_arr_[i]== d_l)
-           remove_edge_out_idx(i);
+           remove_edge_out_idx (i);
        else
            i++;
     }
@@ -95,14 +95,14 @@ Directed_graph_node::remove_edge_out (Directed_graph_node *d_l)
 bool
 Directed_graph_node::linked_b()const
 {
-    return edge_out_l_arr_.size() || edge_in_l_arr_.size();
+    return edge_out_l_arr_.size() || edge_in_l_arr_.size ();
 }
 
 void
 Directed_graph_node::junk_links()
 {
-    edge_in_l_arr_.set_size(0);
-    edge_out_l_arr_.set_size(0);
+    edge_in_l_arr_.set_size (0);
+    edge_out_l_arr_.set_size (0);
 }
 
 
@@ -113,14 +113,14 @@ Directed_graph_node::unlink()
        PARANOID_OK();
 
        Link_array<Directed_graph_node> t = edge_out_l_arr_;
-       t.concat(edge_in_l_arr_);
+       t.concat (edge_in_l_arr_);
 #endif
 
-       while ( edge_out_l_arr_.size() )
-           remove_edge_out_idx(0);
+       while ( edge_out_l_arr_.size())
+           remove_edge_out_idx (0);
        
-       while (edge_in_l_arr_.size() )
-           remove_edge_in(edge_in_l_arr_[0]);
+       while (edge_in_l_arr_.size())
+           remove_edge_in (edge_in_l_arr_[0]);
 
 #ifdef PARANOID
        for (int i =0; i < t.size(); i++)
@@ -130,18 +130,18 @@ Directed_graph_node::unlink()
 
 Directed_graph_node::~Directed_graph_node()
 {
-    assert(!linked_b());
+    assert (!linked_b());
 }
 
     
 void
-Directed_graph_node::add(Directed_graph_node* dep_l)
+Directed_graph_node::add (Directed_graph_node* dep_l)
 {
     PARANOID_OK();
     if (!dep_l)
        return ;
-    dep_l->edge_in_l_arr_.push(this);
-    edge_out_l_arr_.push(dep_l);
+    dep_l->edge_in_l_arr_.push (this);
+    edge_out_l_arr_.push (dep_l);
     PARANOID_OK();
 }
     
index ce0a51d36385413ce6bcf7a0947cd5339e56606d..f6d1d48867faf0090bac8093052c83bd4c356cd0 100644 (file)
@@ -21,40 +21,40 @@ const INDTAB = 2;
   should use Regexp library.
   */
 static String
-strip_pretty(String pretty_str)
+strip_pretty (String pretty_str)
 {
-    int i = pretty_str.index_i('(');
+    int i = pretty_str.index_i ('(');
     if (i>=0)
-       pretty_str = pretty_str.left_str(i);
+       pretty_str = pretty_str.left_str (i);
     
-    int l = pretty_str.index_last_i(' '); // strip until last ' '
+    int l = pretty_str.index_last_i (' '); // strip until last ' '
     if (l>=0)
-       pretty_str = pretty_str.nomid_str(0,l+1);
+       pretty_str = pretty_str.nomid_str (0,l+1);
     return pretty_str;
 }
 
 static String
-strip_member(String pret)
+strip_member (String pret)
 {
-    int l=pret.index_last_i(':')-1;
+    int l=pret.index_last_i (':')-1;
     if (l>=0)
-       pret = pret.left_str(l );
+       pret = pret.left_str (l);
     return pret;
 }
 
 Dstream&
-Dstream::identify_as(String name)
+Dstream::identify_as (String name)
 {
     if (!os_l_)
        return *this;
     
-    String mem(strip_pretty(name));
-    String cl(strip_member(mem));
+    String mem (strip_pretty (name));
+    String cl (strip_member (mem));
     String idx = cl;
     
-    if (silent_assoc_p_->elt_b(mem))
+    if (silent_assoc_p_->elt_b (mem))
        idx  = mem;
-    else if (silent_assoc_p_->elt_b(cl))
+    else if (silent_assoc_p_->elt_b (cl))
        idx = cl;
     else {
        (*silent_assoc_p_)[idx] = false;
@@ -69,9 +69,9 @@ Dstream::identify_as(String name)
 }
 
 bool
-Dstream::silence(String s)
+Dstream::silence (String s)
 {
-    if (!silent_assoc_p_->elt_b(s))
+    if (!silent_assoc_p_->elt_b (s))
        return false;
     return (*silent_assoc_p_)[s];
 }
@@ -79,32 +79,32 @@ Dstream::silence(String s)
 Dstream &
 Dstream::operator<<(String s)
 {
-    output(s);
+    output (s);
     return *this;
 }
 
 Dstream &
 Dstream::operator<<(void const *v_l)
 {
-    output(String_convert::pointer_str(v_l));
+    output (String_convert::pointer_str (v_l));
     return *this;
 }
 
 Dstream &
 Dstream::operator<<(char const *ch_l)
 {
-    output(ch_l);
+    output (ch_l);
     return *this;
 }
 
 void
-Dstream::output(String s)
+Dstream::output (String s)
 {
     if (local_silence_b_|| !os_l_)
        return ;
     
     for (char const *cp = s  ; *cp; cp++)
-       switch(*cp) {
+       switch (*cp) {
            case '{':
            case '[':
            case '(': indent_level_i_ += INDTAB;
@@ -131,7 +131,7 @@ Dstream::output(String s)
 }
 
 
-Dstream::Dstream(ostream *r, char const * cfg_nm )
+Dstream::Dstream (ostream *r, char const * cfg_nm)
 {
     os_l_ = r;
     silent_assoc_p_ = new Assoc<String,bool>;
@@ -141,19 +141,19 @@ 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);
+    Text_db cfg (fn);
     while (! cfg.eof()){            
-        Text_record  r(  cfg++);
+        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]));
+        (*silent_assoc_p_)[r[0]] = (bool)(int)(Scalar (r[1]));
     }
 
 }
@@ -162,13 +162,13 @@ Dstream::Dstream(ostream *r, char const * cfg_nm )
 Dstream::~Dstream()
 {    
     delete silent_assoc_p_;
-    assert(!indent_level_i_) ;
+    assert (!indent_level_i_) ;
 }
 
 void
 Dstream::clear_silence() 
 {
-    for (Assoc_iter<String, bool> i(*silent_assoc_p_); i.ok(); i++) {
+    for (Assoc_iter<String, bool> i (*silent_assoc_p_); i.ok(); i++) {
        i.val() = 0;
     }
 }
index fd3784558808b15a6a4db328950db5a6a562d3e1..84cfd803d32aafaf4eda8f6b17394ee33d6ee506 100644 (file)
@@ -11,6 +11,6 @@ char const *
 flower_version_sz()
 {
     static char v[1024];
-    sprintf(v, s, build);
+    sprintf (v, s, build);
     return v;
 }
index fd0d9f550be4a1c9b341e002bd404ef8492087eb..34dcdad1b8ceb1bed7e181dbf5bd2fedc43ecc0d 100644 (file)
@@ -12,7 +12,7 @@
 void
 Full_storage::operator=(Full_storage const &fs)
 {
-    resize(fs.height_i_, fs.width_i_);
+    resize (fs.height_i_, fs.width_i_);
     OK();
     fs.OK();
     for (int i=0; i<height_i_; i++)
@@ -26,9 +26,9 @@ Full_storage::OK() const
 {
 #ifndef NDEBUG
 
-    assert(max_height_i_ >= height_i_ && max_width_i_ >= width_i_);
-    assert(height_i_ >= 0 && width_i_ >= 0);
-    assert(els_p_p_||!max_height_i_);
+    assert (max_height_i_ >= height_i_ && max_width_i_ >= width_i_);
+    assert (height_i_ >= 0 && width_i_ >= 0);
+    assert (els_p_p_||!max_height_i_);
 #endif
 }
 
@@ -44,24 +44,24 @@ Full_storage::~Full_storage()
 
 void
 
-Full_storage::resize(int rows, int cols)
+Full_storage::resize (int rows, int cols)
 {
     OK();
-    resize_cols(rows);
-    resize_rows(cols);
+    resize_cols (rows);
+    resize_rows (cols);
 }
 
 
 
 bool
-Full_storage::mult_ok(int i, int ) const
+Full_storage::mult_ok (int i, int) const
 {
     return i < height_i_;
 }
 
 
 bool
-Full_storage::trans_ok(int , int j) const
+Full_storage::trans_ok (int , int j) const
 {
        return j < width_i_;
 } 
@@ -69,9 +69,9 @@ Full_storage::trans_ok(int , int j) const
 
 
 void
-Full_storage::trans_next(int &i, int &j) const
+Full_storage::trans_next (int &i, int &j) const
 {
-    assert(trans_ok(i,j));
+    assert (trans_ok (i,j));
     i++;
     if (i >= height_i_) {
        i=0;
@@ -81,9 +81,9 @@ Full_storage::trans_next(int &i, int &j) const
 
 
 void
-Full_storage::mult_next(int &i, int &j) const
+Full_storage::mult_next (int &i, int &j) const
 {
-    assert(mult_ok(i,j));
+    assert (mult_ok (i,j));
     j++;
     if (j >= width_i_) {
        j=0;
@@ -93,9 +93,9 @@ Full_storage::mult_next(int &i, int &j) const
 
 
 void
-Full_storage::delete_column(int k)
+Full_storage::delete_column (int k)
 {
-    assert(0 <= k &&k<width_i_);    
+    assert (0 <= k &&k<width_i_);    
     for (int i=0; i< height_i_ ; i++)
        for (int j=k+1; j <width_i_; j++)
            els_p_p_[i][j-1]=els_p_p_[i][j];
@@ -104,9 +104,9 @@ Full_storage::delete_column(int k)
 
 
 void
-Full_storage::delete_row(int k)
+Full_storage::delete_row (int k)
 {
-    assert(0 <= k &&k<height_i_);
+    assert (0 <= k &&k<height_i_);
     for (int i=k+1; i < height_i_ ; i++)
        for (int j=0; j < width_i_; j++)
            els_p_p_[i-1][j]=els_p_p_[i][j];
@@ -116,10 +116,10 @@ Full_storage::delete_row(int k)
 
 
 void
-Full_storage::insert_row(int k)
+Full_storage::insert_row (int k)
 {
-    assert(0 <= k&& k <=height_i_);
-    resize_cols(height_i_+1);
+    assert (0 <= k&& k <=height_i_);
+    resize_cols (height_i_+1);
     for (int i=height_i_-1; i > k ; i--)
        for (int j=0; j <width_i_; j++)
            els_p_p_[i][j]=els_p_p_[i-1][j];
@@ -127,19 +127,19 @@ Full_storage::insert_row(int k)
 }
 
 bool
-Full_storage::try_right_multiply(Matrix_storage * dest, Matrix_storage const * right)const
+Full_storage::try_right_multiply (Matrix_storage * dest, Matrix_storage const * right)const
 {
-    if (dest->name() != Full_storage::static_name() ||
-       right->name() != Full_storage::static_name())
+    if (dest->name() != Full_storage::static_name () ||
+       right->name() != Full_storage::static_name ())
        return false;
 
     Full_storage *d_l = (Full_storage*)dest;
     Full_storage *r_l = (Full_storage*)right;
     
-    d_l->set_size(height_i_, r_l->width_i_);
+    d_l->set_size (height_i_, r_l->width_i_);
     for (int i=0; i < d_l->height_i_; i++)
        for (int j = 0; j < d_l->width_i_; j++) {
-           Real &r(d_l->els_p_p_[i][j]);
+           Real &r (d_l->els_p_p_[i][j]);
            r=0.0;
            for (int k = 0; k < width_i_; k++)
                r += els_p_p_[i][k] * r_l->els_p_p_[k][j];
@@ -151,7 +151,7 @@ Full_storage::try_right_multiply(Matrix_storage * dest, Matrix_storage const * r
 }
 IMPLEMENT_IS_TYPE_B1(Full_storage,Matrix_storage);
 void
-Full_storage::resize_cols(int newh)
+Full_storage::resize_cols (int newh)
 {
     if (newh <= max_height_i_) {
        height_i_=newh;
@@ -172,20 +172,20 @@ Full_storage::resize_cols(int newh)
 
 
 
-Full_storage::Full_storage(Matrix_storage*m)
+Full_storage::Full_storage (Matrix_storage*m)
 {
-    set_size(m->rows(), m->cols());
+    set_size (m->rows(), m->cols ());
     if ( !m->is_type_b ( Full_storage::static_name()))
        for (int i=0; i<height_i_; i++)
            for (int j=0; j<width_i_; j++)
                els_p_p_[i][j]=0.0;
-    for (int i,j=0; m->mult_ok(i,j); m->mult_next(i,j))
-       els_p_p_[i][j] = m->elem(i,j);
+    for (int i,j=0; m->mult_ok (i,j); m->mult_next (i,j))
+       els_p_p_[i][j] = m->elem (i,j);
 }
 
 
 void
-Full_storage::resize_rows(int neww)
+Full_storage::resize_rows (int neww)
 {
     if (neww <= max_width_i_) {
        width_i_=neww;
index 3664b8245f8f3075f8a52a34c90b533e9c3ddd5a..51ae3ea4d25b50d6869eec423bbca0467abba2e3 100644 (file)
@@ -17,12 +17,12 @@ protected:
     int idx_;
     Array<T> &arr_;
 public:
-    ACursor(ACursor const& s) 
+    ACursor (ACursor const& s) 
        :arr_(s.arr_)
     {
        idx_ = s.idx_;
     }
-    ACursor(Array<T> const &arr)
+    ACursor (Array<T> const &arr)
        arr_((Array<T>&)arr)
     {
        idx_ =0;
@@ -36,7 +36,7 @@ public:
        idx_ ++;
        return t;
     }
-    bool ok() { return idx_ >=0 && idx_ < arr_.size(); }
+    bool ok() { return idx_ >=0 && idx_ < arr_.size (); }
 };
 
 
@@ -44,8 +44,8 @@ template<class T>
 class PACursor : public ACursor<T*>
 {
 public:
-    PACursor(Link_array<T> l)
-       : ACursor(l)
+    PACursor (Link_array<T> l)
+       : ACursor (l)
     {
     }
     T* ptr() { return arr_[idx_]; }
index 34b88df22d005f302072a3bb2d470daecb44cd0c..9157ad0ab74e25152e497f73a79e66532a9ede51 100644 (file)
@@ -15,12 +15,12 @@ struct Assoc_iter {
     int i;
     Assoc<K,V> &assoc_;
     /// we don't want to be bothered by const correctness
-    Assoc_iter(const Assoc<K,V> &a) :
+    Assoc_iter (const Assoc<K,V> &a) :
        assoc_((Assoc<K,V> &)a)
     {  
-       i= next(0);
+       i= next (0);
     }
-    int next(int j) {
+    int next (int j) {
        while (j < assoc_.arr.size() && assoc_.arr[j].free)
            j++;
        return j;
@@ -29,9 +29,9 @@ struct Assoc_iter {
        return i < assoc_.arr.size();
     }
     void OK()const {
-       assert(!ok() || !assoc_.arr[i].free);
+       assert (!ok() || !assoc_.arr[i].free);
     }
-    void operator++(int) { i++; i = next(i); }
+    void operator++(int) { i++; i = next (i); }
     K key() { return assoc_.arr[i].key; }
     V &val() { return assoc_.arr[i].val; }    
 };
index 0d9cbc9a4387f45cc74a14bdc1cb4a0fcb46e687..92a7c8ee108602dc83beaf995404b1f899ca0eca 100644 (file)
@@ -26,19 +26,19 @@ struct Assoc {
 
     /* ************** */
     
-    int find(K key) const {
+    int find (K key) const {
        for (int i = 0; i < arr.size(); i++) {
            if (!arr[i].free && key == arr[i].key)
                return i;
        }
        return -1;
     }
-    int find_creat(K key) {
+    int find_creat (K key) {
        int free = -1;
        for (int i = 0; i < arr.size(); i++) {
            if (key == arr[i].key) {            
                return i;
-           } else if (arr[i].free ) {
+           } else if (arr[i].free) {
                free = i;
            }
        }
@@ -51,35 +51,35 @@ struct Assoc {
        Assoc_ent_<K,V> ae;
        ae.free = false;
        ae.key = key;
-       arr.push(ae);
+       arr.push (ae);
        return arr.size() -1;
     }
 public:
-    bool elt_b(K key) const {
-       return find(key) >= 0;
+    bool elt_b (K key) const {
+       return find (key) >= 0;
     }
-    void del(K key) {
-       assert(elt_b(key));
-       int i= find(key);
+    void del (K key) {
+       assert (elt_b (key));
+       int i= find (key);
        arr[i].free = true;
     }
     void
-    add(K key, V val) {
-       int i = find_creat(key);
+    add (K key, V val) {
+       int i = find_creat (key);
        arr[i].val = val;
     }
-    V& elem(K key) {
-       return arr[find_creat(key)].val;
+    V& elem (K key) {
+       return arr[find_creat (key)].val;
        }
     V& operator[](K key) {
-       return elem(key);
+       return elem (key);
     }
     V const & operator[](K key) const {
-       return elem(key);
+       return elem (key);
     }
-    V const & elem(K key) const { 
-       assert(elt_b(key));
-       return arr[find(key)].val;
+    V const & elem (K key) const { 
+       assert (elt_b (key));
+       return arr[find (key)].val;
     }
 };
 
index abd19ee67635a42476b06dca6944d9691a2d55d3..dd21237550c8a2a96f463c43171043bad8e864c2 100644 (file)
@@ -9,7 +9,7 @@
 
     #P# is split  into
 
-    LD transpose(L)
+    LD transpose (L)
     */
 struct Choleski_decomposition {
 
@@ -24,12 +24,12 @@ struct Choleski_decomposition {
     P needs to be symmetric positive definite
     */
     
-    Choleski_decomposition(Matrix const &P);
+    Choleski_decomposition (Matrix const &P);
 
     /**
     solve Px = rhs
     */
-    Vector solve(Vector rhs) const;
+    Vector solve (Vector rhs) const;
     void solve (Vector &dest, Vector const &rhs)const;
     Vector operator * (Vector rhs) const { return solve (rhs); }
   /**
@@ -41,10 +41,10 @@ struct Choleski_decomposition {
     */
     Matrix original() const;
 private:
-    void full_matrix_solve(Vector &,Vector const&)const;
-    void band_matrix_solve(Vector &, Vector const&)const;
-    void full_matrix_decompose(Matrix const & P);
-    void band_matrix_decompose(Matrix const &P);
+    void full_matrix_solve (Vector &,Vector const&)const;
+    void band_matrix_solve (Vector &, Vector const&)const;
+    void full_matrix_decompose (Matrix const & P);
+    void band_matrix_decompose (Matrix const &P);
         
 };
 #endif
index 203ba014e7cb89fbed70b41355d498354c2624a6..ef69ce5162cb29ca8213633636df0cc392c84909 100644 (file)
@@ -6,48 +6,48 @@
 #ifndef COMPARE_HH
 #define COMPARE_HH
 
-#define one_operator(type, function, op) \
+#define ONE_OPERATOR(type, function, op) \
 inline bool \
 operator op (type t1, type t2) {\
-    return function(t1, t2) op 0;\
+    return function (t1, t2) op 0;\
 }\
 
-#define gpp_minmax_operator(type, op, opp) \
+#define GPP_MINMAX_OPERATOR(type, op, opp) \
 inline type \
-operator op(type t1, type t2)\
+operator op (type t1, type t2)\
 {\
      return (t1 opp t2) ? t1 :  t2;\
 }\
 
 
 #if defined (__GNUG__) && ! defined (__STRICT_ANSI__)
-#define gpp_minmax(type, prefix)\
-       prefix gpp_minmax_operator(type, <?, <)\
-       prefix gpp_minmax_operator(type, >?, >)
+#define GPP_MINMAX(type, prefix)\
+       prefix GPP_MINMAX_OPERATOR(type, <?, <)\
+       prefix GPP_MINMAX_OPERATOR(type, >?, >)
 #else
-#define gpp_minmax(type, prefix)
+#define GPP_MINMAX(type, prefix)
 #endif
 
 /**  handy notations for a signed comparison. 
     make the operators{<,<=,==,>=,>} and the MAX and MIN of two.
     Please fill a & in the type argument if necessary.    
     */
-#define template_instantiate_compare(type, function, prefix) \
-prefix one_operator(type, function, >)\
-prefix one_operator(type, function, >=)\
-prefix one_operator(type, function, ==)\
-prefix one_operator(type, function, !=)\
-prefix one_operator(type, function, <)\
-prefix one_operator(type, function, <=)\
-gpp_minmax(type, prefix)\
-prefix inline type max(type t1, type t2) {  return (t1 > t2 )? t1 : t2; }\
-prefix inline type min(type t1, type t2) {  return (t1 < t2 )? t1 : t2; }\
+#define TEMPLATE_INSTANTIATE_COMPARE(type, function, prefix) \
+prefix ONE_OPERATOR(type, function, >)\
+prefix ONE_OPERATOR(type, function, >=)\
+prefix ONE_OPERATOR(type, function, ==)\
+prefix ONE_OPERATOR(type, function, !=)\
+prefix ONE_OPERATOR(type, function, <)\
+prefix ONE_OPERATOR(type, function, <=)\
+GPP_MINMAX(type, prefix)\
+prefix inline type max (type t1, type t2) {  return (t1 > t2)? t1 : t2; }\
+prefix inline type min (type t1, type t2) {  return (t1 < t2)? t1 : t2; }\
   \
 prefix  bool operator<(type t1, type t2) /* stupid fix to allow ; */
 
 
     
-#define instantiate_compare(type, func) template_instantiate_compare(type,func, )
+#define INSTANTIATE_COMPARE(type, func) TEMPLATE_INSTANTIATE_COMPARE(type,func,)
      
 
      
index 05a3e897c4aac5553d787bec045290c590bf8c70..2e205ba33063c85b2a0cfd7b224594a1ce83b764 100644 (file)
@@ -20,19 +20,19 @@ class Cursor
  public:
     /** create cursor, set at top. The const part isn't true, actually, #list#
       surely isn't const, but I get tired of the warning messages.  */
-    Cursor( const List<T>& list, Link<T>* pointer = 0 );
+    Cursor (const List<T>& list, Link<T>* pointer = 0);
     /**
       Create an invalid cursor (pointing to nothing, associated with   no list.)
      */
     Cursor();
-    Cursor( const Cursor<T>& cursor );
+    Cursor (const Cursor<T>& cursor);
 
     T& thing();
 
     /// return current T
     T& operator *() { return thing(); }
     operator T() { return thing(); }
-    Cursor<T> operator =( const Cursor<T>& c );
+    Cursor<T> operator =( const Cursor<T>& c);
 
     /// make cursor with #no# items back
     Cursor<T> operator -( int no) const;
@@ -47,10 +47,10 @@ class Cursor
     /// move one up.
     void previous();
     /// return current and move one down
-    Cursor<T> operator ++( int );
+    Cursor<T> operator ++( int);
     
     /// return current and move one up
-    Cursor<T> operator --( int ); 
+    Cursor<T> operator --( int); 
 
     /// point to link?
     bool ok()const;
@@ -72,7 +72,7 @@ class Cursor
       cursor points to same object, cursor.next() is newly added
       object.
       */
-    void add( T const & thing );
+    void add (T const & thing);
 
     /**  put (copy) before me in List. 
       analogously to editor. ok() interpreted as at begin of
@@ -86,7 +86,7 @@ class Cursor
       is newly inserted object.
       */
     
-    void insert( T const & thing );
+    void insert (T const & thing);
     ///
     void backspace();
 
@@ -96,7 +96,7 @@ class Cursor
     /// access the list this came from
     List<T>& list() const ;
     Link<T>* pointer();
-    static   int compare(Cursor<T> a,Cursor<T>b) { return a-b; }
+    static   int compare (Cursor<T> a,Cursor<T>b) { return a-b; }
 private:
     List<T>& list_;
     Link<T>* pointer_;
@@ -109,7 +109,7 @@ private:
 #include "compare.hh"
 
 
-template_instantiate_compare(Cursor<T>, Cursor<T>::compare, template<class T>);
+TEMPLATE_INSTANTIATE_COMPARE(Cursor<T>, Cursor<T>::compare, template<class T>);
 
 #include "pcursor.hh"
 #include "list.hh"
index 6a2ae6c538c7344c1d0877426763df36a8b5f57d..d0b2439af41d61b23d9d917eee687dd8d10a14e6 100644 (file)
@@ -17,7 +17,7 @@
 // untested
 template<class T>
 inline
-Cursor<T>::Cursor( )
+Cursor<T>::Cursor()
  :   list_(*(List<T> *)0)      // ugh
 {
     pointer_ = 0;
@@ -26,10 +26,10 @@ Cursor<T>::Cursor( )
 
 template<class T>
 inline
-Cursor<T>::Cursor( const List<T>& list, Link<T>* pointer ) : 
-    list_((List<T>&) list )
+Cursor<T>::Cursor (const List<T>& list, Link<T>* pointer) : 
+    list_((List<T>&) list)
 {
-    if ( list.size() )
+    if ( list.size())
         pointer_ = pointer ? pointer : list.top_;
     else
         pointer_ = pointer;
@@ -37,8 +37,8 @@ Cursor<T>::Cursor( const List<T>& list, Link<T>* pointer ) :
 
 template<class T>
 inline
-Cursor<T>::Cursor( const Cursor<T>& cursor ) :
-    list_( cursor.list_ )
+Cursor<T>::Cursor (const Cursor<T>& cursor) :
+    list_( cursor.list_)
 {
     pointer_ = cursor.pointer_;
 }
@@ -47,31 +47,31 @@ template<class T>
 inline T&
 Cursor<T>::thing()
 {
-    assert( pointer_ );
+    assert (pointer_);
     return pointer_->thing();
 }
 
 template<class T>
 Cursor<T>
-Cursor<T>::operator =( const Cursor<T>& c )
+Cursor<T>::operator =( const Cursor<T>& c)
 {   
-    assert( &list_ == &c.list_ );
+    assert (&list_ == &c.list_);
     pointer_ = c.pointer_;
     return *this;
 }
 
 template<class T>
 inline void
-Cursor<T>::add( const T& th )
+Cursor<T>::add (const T& th)
 {
-    list_.add( th, *this );
+    list_.add (th, *this);
 }
 
 template<class T>
 inline void
-Cursor<T>::insert( const T& th )
+Cursor<T>::insert (const T& th)
 {
-    list_.insert( th, *this );
+    list_.insert (th, *this);
 }
 
 template<class T>
@@ -92,33 +92,33 @@ template<class T>
 inline bool
 Cursor<T>::backward()const
 {
-    return ( pointer_ != 0 );
+    return ( pointer_ != 0);
 }
 
 template<class T>
 inline bool
 Cursor<T>::forward()const
 {
-    return ( pointer_ != 0 );
+    return ( pointer_ != 0);
 }
 
 template<class T>
 inline bool
 Cursor<T>::ok()const
 {
-    return ( pointer_ != 0 );
+    return ( pointer_ != 0);
 }
 template<class T>
 inline void
 Cursor<T>::next() 
 {
-    assert( pointer_ );
+    assert (pointer_);
     pointer_ = pointer_->next();
 }
 
 template<class T>
 inline Cursor<T> 
-Cursor<T>::operator ++( int )    
+Cursor<T>::operator ++( int)    
 {
     Cursor<T> r (*this);
     next();
@@ -129,13 +129,13 @@ template<class T>
 inline void
 Cursor<T>::previous() 
 {
-    assert( pointer_ );
+    assert (pointer_);
     pointer_ = pointer_->previous();
 }
 
 template<class T>
 inline Cursor<T>
-Cursor<T>::operator --( int )
+Cursor<T>::operator --( int)
 {
     Cursor<T> r (*this);
     previous();
index 3be73fe5d23383966333c10f80852f5ad069b23e..18f1fbb42aac75a993387d0941b878dfbc4792cf 100644 (file)
@@ -8,27 +8,27 @@ template<class T>
  void
 Cursor<T>::backspace()
 {
-    Cursor<T> c(*this);
-    if ( c.ok() )
+    Cursor<T> c (*this);
+    if ( c.ok())
        c--;        
-    list_.remove( *this );
+    list_.remove (*this);
 }
 
 template<class T>
  void
 Cursor<T>::del()
 {
-    Cursor<T> c(*this);
-    if ( c.ok() )
+    Cursor<T> c (*this);
+    if ( c.ok())
        c++;
-    list_.remove( *this );    
+    list_.remove (*this);    
     *this = c;
 }
 
 
 template<class T>
 Cursor<T> 
-Cursor<T>::operator -=( int j )    
+Cursor<T>::operator -=( int j)    
 {
     while (j--)
        (*this)--;
@@ -36,7 +36,7 @@ Cursor<T>::operator -=( int j )
 }
 template<class T>
 Cursor<T> 
-Cursor<T>::operator +=( int j )    
+Cursor<T>::operator +=( int j)    
 {
     while (j++)
        (*this)++;
@@ -45,7 +45,7 @@ Cursor<T>::operator +=( int j )
 
 template<class T>
 Cursor<T> 
-Cursor<T>::operator +( int i ) const    
+Cursor<T>::operator +( int i) const    
 {
     Cursor<T> r = *this;
 
@@ -60,7 +60,7 @@ Cursor<T>::operator +( int i ) const
 
 template<class T>
 Cursor<T>
-Cursor<T>::operator -( int i ) const
+Cursor<T>::operator -( int i) const
 {
     Cursor<T> r = *this;
     if (i<0)
@@ -79,11 +79,11 @@ template<class T>
 int
 Cursor<T>::operator-(Cursor<T> rhs) const
 {
-    assert(rhs.list == list);
+    assert (rhs.list == list);
     int dif = 0;
 
     // search from *this on further up (positive difference)
-    Cursor<T> c(*this);
+    Cursor<T> c (*this);
     while (c.ok() && c.pointer_ != rhs.pointer_) {
        c--;
        dif++;
@@ -99,10 +99,10 @@ Cursor<T>::operator-(Cursor<T> rhs) const
        dif --;
        c++;
     }
-    assert(c.ok());
+    assert (c.ok());
 
 gotcha:
-    assert((*this - dif).pointer_ == c.pointer_);
+    assert ((*this - dif).pointer_ == c.pointer_);
     return dif;
 }
 
index dae9e5634758763cd9e791faf13f8c2a1b8f96f6..fa75f69922f328b3c997b595ccbc561a6d8adc5c 100644 (file)
@@ -24,8 +24,8 @@ class Data_file : private Text_stream
     Text_stream::get_name;    
 
     char data_get();    
-    void data_unget(char c) {
-       unget(c);
+    void data_unget (char c) {
+       unget (c);
     }
 
     /// read line, eat #\n#
@@ -39,7 +39,7 @@ class Data_file : private Text_stream
 
     /// gobble empty stuff before first field.
     void gobble_leading_white();
-    Data_file(String s) : Text_stream(s) {
+    Data_file (String s) : Text_stream (s) {
        //*mlog << "(" << s << flush;   
        rawmode=  false;        
     }
@@ -48,12 +48,12 @@ class Data_file : private Text_stream
        //      *mlog << ")"<<flush;    
     }    
 
-    warning(String s) {
-       message("warning: " + s);
+    warning (String s) {
+       message ("warning: " + s);
     }
-    error(String s){
-       message(s);
-       exit(1);    
+    error (String s){
+       message (s);
+       exit (1);    
     }
 };
 #endif // DATAFILE_HH
index f4515edfb1fd1317ce50f67fa940a057e294c193..9ac2be679d93e93ceb2e7e253841d329ced02027 100644 (file)
 
   @invariant
   
-  Diagonal_storage(i,j) == band_(i, j-i + band_size_i())
+  Diagonal_storage (i,j) == band_(i, j-i + band_size_i())
   
-  band_.cols() == 2 * band_size_i() + 1
+  band_.cols() == 2 * band_size_i () + 1
   
  */
 class Diagonal_storage : public Matrix_storage {
     Full_storage band_;
 
 public:
-     void set_band_size(int b);
+     void set_band_size (int b);
    int band_size_i()const;
     
-    void assert_valid(int i, int j) const;
-    bool band_elt_b(int,int )const;
-    void resize_dim(int);
+    void assert_valid (int i, int j) const;
+    bool band_elt_b (int,int)const;
+    void resize_dim (int);
     
-    virtual void resize_rows(int d) { resize_dim (d); }
-    virtual void resize_cols(int d) { resize_dim(d); }
+    virtual void resize_rows (int d) { resize_dim (d); }
+    virtual void resize_cols (int d) { resize_dim (d); }
     virtual int dim() const;
 
     virtual int rows() const ;
     virtual int cols() const ;
     
     
-    virtual void resize(int i, int j);
-    virtual void resize(int i);
+    virtual void resize (int i, int j);
+    virtual void resize (int i);
     
-    virtual Real& elem(int i,int j);
-    virtual Real elem(int i, int j) const;
-    Diagonal_storage(Matrix_storage* , int band_i);
+    virtual Real& elem (int i,int j);
+    virtual Real elem (int i, int j) const;
+    Diagonal_storage (Matrix_storage* , int band_i);
     Diagonal_storage();
     void OK() const;
     
-    virtual void insert_row(int k);
-    virtual void delete_row(int k);
-    virtual void delete_column(int k);
+    virtual void insert_row (int k);
+    virtual void delete_row (int k);
+    virtual void delete_column (int k);
     
     ~Diagonal_storage();
-    virtual bool mult_ok(int i, int j)const;
-    virtual void mult_next(int &i, int &j) const ;
-    virtual bool trans_ok(int i, int j) const;
-    virtual void trans_next(int &i, int &j) const;
+    virtual bool mult_ok (int i, int j)const;
+    virtual void mult_next (int &i, int &j) const ;
+    virtual bool trans_ok (int i, int j) const;
+    virtual void trans_next (int &i, int &j) const;
     DECLARE_VIRTUAL_COPY_CONS(Diagonal_storage, Matrix_storage);
     DECLARE_MY_RUNTIME_TYPEINFO;
-    virtual bool try_right_multiply(Matrix_storage * dest, Matrix_storage const *)const;
+    virtual bool try_right_multiply (Matrix_storage * dest, Matrix_storage const *)const;
 };
 #endif // DIAGONAL_STORAGE_HH
index 73f8a926e5da2294fa1092951ed63adc264c80f6..caa065abecea23346e7cd3ccb326b47594eeb5c4 100644 (file)
@@ -24,17 +24,17 @@ public:
     
     /** remove i-th edge_out (and exactly one ref to me in the edge_out)
       */
-    void remove_edge_out_idx(int i);
-    void copy_edges_out(Directed_graph_node const&);
+    void remove_edge_out_idx (int i);
+    void copy_edges_out (Directed_graph_node const&);
     bool linked_b() const;
     void unlink();
     void junk_links();
-    void add(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;
+    void add (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;
 
-    Directed_graph_node(Directed_graph_node const &);
+    Directed_graph_node (Directed_graph_node const &);
     void OK()const;
     Directed_graph_node();
 
index 19fd8acab26592fa55bf62a846582c9481391af1..4d14ae34ec01558a13f9fbb8ef5e16cb050503a5 100644 (file)
@@ -23,7 +23,7 @@ struct Assoc;
    One can turn on and off specific messages using the Assoc silent.
    This can be done automatically:
 
-   #define DEBUG  dstream_.identify_as(__PRETTY_FUNCTION__) 
+   #define DEBUG  dstream_.identify_as (__PRETTY_FUNCTION__) 
 
    DEBUG << "a message\n";
    
@@ -38,18 +38,18 @@ class Dstream
     int indent_level_i_;
     bool local_silence_b_;
     String current_classname_str_;
-    void output(String s);
+    void output (String s);
     Assoc<String, bool> *silent_assoc_p_;
 public:
     void clear_silence();
-    bool silence(String);
+    bool silence (String);
     
     /**
       if rcfile == 0, then do not read any rc file.
       */
-    Dstream(ostream *r, char const * rcfile);
+    Dstream (ostream *r, char const * rcfile);
     virtual ~Dstream();
-    Dstream &identify_as(String s);
+    Dstream &identify_as (String s);
 
 /** Output a string via the Dstream. This is the only output
  interface. It delegates all conversion to String class.  */
index a617c6f3795dd32bf9fc37895f9655f10b1afef2..de19d3063024900d980d9ea76162e370265a001a 100644 (file)
 extern Dstream *flower_dstream;
 extern bool flower_check_debug;
 #ifdef NPRINT
-#define        fdebug if ( 0 ) *flower_dstream
+#define        fdebug if ( 0) *flower_dstream
 #else
 #define fdebug if (flower_check_debug) \
-       flower_dstream->identify_as(__PRETTY_FUNCTION__)
+       flower_dstream->identify_as (__PRETTY_FUNCTION__)
 #endif
-void set_flower_debug(Dstream&ds, bool);
+void set_flower_debug (Dstream&ds, bool);
 
 #endif // FLOWER_DEBUG_HH
index 1dfb96e8fa04bf16beabebe31e3773ca986fda1a..0d17df412ff1cfba180b81cd37b35ea551e5b2a8 100644 (file)
@@ -28,41 +28,41 @@ class Full_storage : public Matrix_storage
     void
     init() ;
      
-    bool valid(int i, int j) const ; 
+    bool valid (int i, int j) const ; 
 
-    void resize_rows(int);
-    void resize_cols(int);
+    void resize_rows (int);
+    void resize_cols (int);
 
 public:
     virtual int rows() const;
     virtual int cols() const ;
     
     
-    virtual void resize(int i, int j);
-    virtual void resize(int i);
-    virtual Real& elem(int i,int j);
-    virtual Real elem(int i, int j)const ;
+    virtual void resize (int i, int j);
+    virtual void resize (int i);
+    virtual Real& elem (int i,int j);
+    virtual Real elem (int i, int j)const ;
     int dim()const;
-    Full_storage(Matrix_storage*);
+    Full_storage (Matrix_storage*);
     Full_storage();
-    Full_storage(int i, int j);
-    Full_storage(Full_storage const&);
-    Full_storage(int i);
+    Full_storage (int i, int j);
+    Full_storage (Full_storage const&);
+    Full_storage (int i);
     void OK() const;
     void operator=(Full_storage const &);
     
-    virtual void insert_row(int k);
-    virtual void delete_row(int k);
-    virtual void delete_column(int k);
+    virtual void insert_row (int k);
+    virtual void delete_row (int k);
+    virtual void delete_column (int k);
     
     ~Full_storage();
-    virtual bool mult_ok(int i, int j)const;
-    virtual void mult_next(int &i, int &j) const ;
-    virtual bool trans_ok(int i, int j) const;
-    virtual void trans_next(int &i, int &j) const;
+    virtual bool mult_ok (int i, int j)const;
+    virtual void mult_next (int &i, int &j) const ;
+    virtual bool trans_ok (int i, int j) const;
+    virtual void trans_next (int &i, int &j) const;
     DECLARE_VIRTUAL_COPY_CONS(Full_storage,Matrix_storage);
     DECLARE_MY_RUNTIME_TYPEINFO;
-    virtual bool try_right_multiply(Matrix_storage * dest, Matrix_storage const * )const;
+    virtual bool try_right_multiply (Matrix_storage * dest, Matrix_storage const *)const;
 };
 
 #endif // FULL_STORAGE_HH
index 06bcc9d70c519168df0ec0f5bf57cfa6ecf5096a..d71dbe07e775acfba6b1178f7862ec51ac11d211 100644 (file)
@@ -18,7 +18,7 @@ Full_storage::init()
     height_i_=width_i_=max_height_i_=max_width_i_=0;
 }
 INLINE bool
-Full_storage::valid(int i, int j)const
+Full_storage::valid (int i, int j)const
 {
     return (i>=0 && i < height_i_)
        && (j < width_i_ && j >=0);
@@ -26,22 +26,22 @@ Full_storage::valid(int i, int j)const
 
 
 INLINE
-Full_storage::Full_storage(Full_storage const&s)
+Full_storage::Full_storage (Full_storage const&s)
 {
     init();
     (*this) = s;
 }
 
 INLINE Real& 
-Full_storage::elem(int i,int j)
+Full_storage::elem (int i,int j)
 {
-    assert(valid(i,j));
+    assert (valid (i,j));
     return els_p_p_[i][j];
 }
 
 INLINE Real
-Full_storage::elem(int i, int j) const {
-    assert(valid(i,j));
+Full_storage::elem (int i, int j) const {
+    assert (valid (i,j));
     return els_p_p_[i][j];
 }
 
@@ -64,28 +64,28 @@ Full_storage::cols() const
 INLINE int
 Full_storage::dim()const
 {
-    assert (rows()==cols());
+    assert (rows()==cols ());
     return rows();
 }
 
 INLINE void
-Full_storage::resize(int i)
+Full_storage::resize (int i)
 {
-    resize(i,i);
+    resize (i,i);
 }
 
 INLINE   
-Full_storage::Full_storage(int i,int j)
+Full_storage::Full_storage (int i,int j)
 {
     init();
-    set_size(i,j);
+    set_size (i,j);
 }
 
 INLINE 
-Full_storage::Full_storage(int i)
+Full_storage::Full_storage (int i)
 {
     init();
-    set_size(i);
+    set_size (i);
 }
  
 INLINE
index 26328bd26b27f10b2ef4561826b0c19a159ac1aa..4176325b15d75bfb2869e59687a6f3ec9cdff479 100644 (file)
@@ -17,7 +17,7 @@ class Handle {
        refs = 0;
     }
     /// point to new object. 
-    void up(T *t, int *r) {
+    void up (T *t, int *r) {
        if (!r) {
            refs = new int;
            *refs = 1;
@@ -29,23 +29,23 @@ class Handle {
     }
     /// POST: *refs == 1
     void copy() {
-       if(*refs != 1){
-           T * newobj = new T(*obj );
+       if (*refs != 1){
+           T * newobj = new T(*obj);
            down();
-           up(newobj);
+           up (newobj);
        }
     }
-    Handle(Handle const &src) {
-       up(src.obj, src.refs);
+    Handle (Handle const &src) {
+       up (src.obj, src.refs);
     }
-    Handle(T & o) {
+    Handle (T & o) {
        up (&o);
     }
     void operator=(Handle const& src) {
        if (this == &src)
            return;
        down();
-       up(src.o, src.refs);
+       up (src.o, src.refs);
     }
     operator T const &() {
        return *obj;
index 74e6ff202c7ed09e4051bc7594a3d941a707ccf6..65b092d1d53d4c0637742da335d8fed8159d8aa8 100644 (file)
       (it does save quite some disk space, though)
  */
 
-#define iterator(set)          typeof((set).top())
-#define iterator_bot(set)              typeof((set).bottom())
+#define iterator(set)          typeof ((set).top())
+#define iterator_bot(set)              typeof ((set).bottom())
 
-#define iter(init, var)                typeof(init) var(init)
+#define iter(init, var)                typeof (init) var (init)
 
 // should use top()
-#define iter_top(set,var)      iterator(set) var(set)
-#define iter_bot(set,var)      iterator(set) var(set.bottom())
+#define iter_top(set,var)      iterator (set) var (set)
+#define iter_bot(set,var)      iterator (set) var (set.bottom())
 
 #endif // ITERATE_HH
index 89b0196bf28e61dd94722694ec35b2c99738ec92..b8a2e19049a1b02f5118b2e2b076000c43c9d26a 100644 (file)
@@ -14,7 +14,7 @@ struct Long_option_init {
     char const * longname;
     char        shortname;
 
-    void printon(ostream &errorout)const ;
+    void printon (ostream &errorout)const ;
 };
 
 
@@ -72,7 +72,7 @@ public:
     bool ok() const;
 
     /// report an error and abort
-    void report(Errorcod c);
+    void report (Errorcod c);
 
 
     /// return an integer (with err. detect)
@@ -85,10 +85,10 @@ public:
        if #os# is null, then do not report nor abort, just set #error#
       */
        
-    void seterror(ostream *os);
+    void seterror (ostream *os);
 
     /// construct: pass arguments and option info.
-    Getopt_long(int c,  char **v, Long_option_init *lo);
+    Getopt_long (int c,  char **v, Long_option_init *lo);
 
     /**  get the next option. 
       @return pointer to next option found.
index 96f3df00e1fbb088bc0d88bbc15e246ae395b3cc..3f94a03a0e40aca04a242ad663b0929e2e59f127 100644 (file)
 #include "fproto.hh"
 #include "config.hh"
 
-char* strnlwrchar* start_l ,int n);
-char* strnuprchar* start_l, int n);
+char* strnlwr (char* start_l ,int n);
+char* strnupr (char* start_l, int n);
 
 #if !HAVE_MEMMEM               // GNU extension.
-char *memmem(Byte const * haystack, int haystack_len,
+char *memmem (Byte const * haystack, int haystack_len,
             Byte const *needle, int needle_len);
 #endif HAVE_MEMMEM
 
 #if !HAVE_SNPRINTF             // GNU extension.
 int snprintf (char *str, size_t n,
-             char const *format, ... );
+             char const *format, ...);
 #endif
 
 
-Byte *memrchr(Byte const * p, int n, char c);
-Byte *strrev( Byte* byte_l, int length_i );
+Byte *memrchr (Byte const * p, int n, char c);
+Byte *strrev (Byte* byte_l, int length_i);
 
 
 #endif // LIBC_EXTENSION_HH
index 218a0f8e55b8a988709a98b279ece6bbc022e53a..5fce0ac91514f47b9acb0be789e3993065d8a5a4 100644 (file)
@@ -12,21 +12,21 @@ class Link
 {
 //    friend class Cursor<T>;
 public:    
-    Link( T const & thing );
+    Link (T const & thing);
     
     Link<T>* previous();
     Link<T>* next();
 
     /// put new Link item after me in list
-    void add( T const & thing );
+    void add (T const & thing);
     /// put new Link item before me in list
-    void insert( T const & thing );    
-    void remove(List<T> &l);
+    void insert (T const & thing);     
+    void remove (List<T> &l);
     
     T& thing();
     void OK() const;
 private:    
-    Link( Link<T>* previous, Link<T>* next, T const & thing );
+    Link (Link<T>* previous, Link<T>* next, T const & thing);
 
     T thing_;
     Link<T>* previous_;
index 3926d6bc2ae3db95737315ee414e283d7fd6c9c9..68b87a73fc23d26d6d041958c4b8ba047205799a 100644 (file)
@@ -9,26 +9,26 @@ Link<T>::OK() const
 {
 #ifndef NDEBUG
     if (previous_) {
-       assert(previous_->next_ == this);
+       assert (previous_->next_ == this);
     }
     if (next_) {
-       assert(next_->previous_ == this);
+       assert (next_->previous_ == this);
     }
 #endif    
 }
 
 template<class T>
 inline
-Link<T>::Link( const T& thing ) : 
-    thing_( thing )
+Link<T>::Link (const T& thing) : 
+    thing_( thing)
 {
     previous_ = next_ = 0;
 }
 
 template<class T>
 inline
-Link<T>::Link( Link<T>* previous, Link<T>* next, const T& thing ) : 
-    thing_( thing )
+Link<T>::Link (Link<T>* previous, Link<T>* next, const T& thing) : 
+    thing_( thing)
 {
     previous_ = previous;
     next_ = next;
@@ -53,23 +53,23 @@ Link<T>::previous()
 template<class T>
 inline
 void
-Link<T>::add( const T& thing )
+Link<T>::add (const T& thing)
 {
     
-    Link<T>* l = new Link<T>( this, next_, thing );
-    if ( next_ )
+    Link<T>* l = new Link<T>( this, next_, thing);
+    if ( next_)
         next_->previous_ = l;
     next_ = l;
 }
 
 template<class T>
 inline void
-Link<T>::insert( const T& thing )
+Link<T>::insert (const T& thing)
 {
-    //    Link<T>* l = new Link<T>( next_, this, thing );
+    //    Link<T>* l = new Link<T>( next_, this, thing);
                                // bugfix hwn 16/9/96
-    Link<T>* l = new Link<T>( previous_, this, thing );
-    if ( previous_ )
+    Link<T>* l = new Link<T>( previous_, this, thing);
+    if ( previous_)
         previous_->next_ = l;
     previous_ = l;
 }
@@ -79,14 +79,14 @@ Link<T>::insert( const T& thing )
     */
 template<class T>
 inline void
-Link<T>::remove(List<T> &l)
+Link<T>::remove (List<T> &l)
 {
-    if ( previous_ 
+    if ( previous_) 
         previous_->next_ = next_;
     else 
        l.top_ = next_;
 
-    if ( next_ )
+    if ( next_)
         next_->previous_ = previous_;
     else
        l.bottom_ = previous_;
index fcc5e70712598d114968135b55f2f87299b4cd5c..f1ddb48e69d38eecc41dfa3f6ad8b60054b10e22 100644 (file)
@@ -19,8 +19,8 @@ template<class T> class Link;
  
    {\bf note:} 
    retrieving "invalid" cursors, i.e. 
-   #top()/bottom()# from empty list, #find()# without success,
-    results in a nonvalid Cursor ( #!ok()# )
+   #top()/bottom ()# from empty list, #find ()# without success,
+    results in a nonvalid Cursor ( #!ok()#)
 
 
     INVARIANTEN!
@@ -30,7 +30,7 @@ template<class T>
 class List
 {
  public:
-    List(List const&src);
+    List (List const&src);
 
     /// construct empty list                
     List();    
@@ -48,7 +48,7 @@ class List
     friend class Cursor<T>;
     friend class Link<T>;
 
-    void concatenate(List<T> const &s);
+    void concatenate (List<T> const &s);
     
     /**  make *this empty. 
 
@@ -60,10 +60,10 @@ class List
       */
      void set_empty();
   
-    void add( T const & thing, Cursor<T> &after_me );
+    void add (T const & thing, Cursor<T> &after_me);
 
     /// put thing before #before_me#
-    void insert( T const & thing, Cursor<T> &before_me );
+    void insert (T const & thing, Cursor<T> &before_me);
 
     /** Remove link pointed to by me. Destructor of contents called
       (nop for pointers)
@@ -74,7 +74,7 @@ class List
 
       WARNING: do not use #me# after calling
       */
-    void remove( Cursor<T> me );
+    void remove (Cursor<T> me);
    
 
     /* ************** */
index df0687b7c8b5b28e71cfd47ad96fbbd64b7caf8e..83ec3aa7961f9e8fdac1dae585be4563bf834b48 100644 (file)
@@ -20,11 +20,11 @@ List<T>::set_empty()
 
 template<class T>
 inline void
-List<T>::remove( Cursor<T> me )
+List<T>::remove (Cursor<T> me)
 {
-    if ( me.ok() ){
+    if ( me.ok()){
        Link<T> *lp = me.pointer();     
-       lp->remove(*this);
+       lp->remove (*this);
        delete lp;
         size_--;
     }
@@ -41,7 +41,7 @@ template<class T>
 inline Cursor<T>
 List<T>::top()const
 {
-    return Cursor<T>( *this, top_ );
+    return Cursor<T>( *this, top_);
 }
 
 
@@ -49,7 +49,7 @@ template<class T>
 inline Cursor<T>
 List<T>::bottom()const
 {
-    return Cursor<T>( *this, bottom_ );
+    return Cursor<T>( *this, bottom_);
 }
 
 
index a5971b268808ad12478f75ee1c3a7169503754d6..662cdddc895bf1068e5be133cd741e9187f0e560 100644 (file)
@@ -47,14 +47,14 @@ public:
       PRE
       i >=0, j>=0
     */
-    virtual void set_size(int rows, int cols) ;
+    virtual void set_size (int rows, int cols) ;
 
  
     /**set the size to square dimen. contents lost
       PRE
       i>=0
     */
-    virtual void set_size(int i) ;
+    virtual void set_size (int i) ;
      /**set the size to i.
 
       keep contents. If enlarged contents unspecified
@@ -63,7 +63,7 @@ public:
       i>=0, j>=0
     
     */
-    virtual void resize(int rows, int cols ) = 0;
+    virtual void resize (int rows, int cols) = 0;
  
   /**    
     set the size to square dimen. contents kept
@@ -72,7 +72,7 @@ public:
     PRE
     i>=0  
     */
-    virtual void resize(int i) = 0;
+    virtual void resize (int i) = 0;
   
     
     /**
@@ -82,13 +82,13 @@ public:
     in the 0-part of a sparse matrix.
     */
 
-    virtual Real& elem(int i,int j) = 0;
+    virtual Real& elem (int i,int j) = 0;
 
     /// access a element, no modify
-    virtual Real elem(int i, int j) const = 0;
+    virtual Real elem (int i, int j) const = 0;
 
-    virtual Array<Real> row(int i) const ;
-    virtual Array<Real> column(int j) const;
+    virtual Array<Real> row (int i) const ;
+    virtual Array<Real> column (int j) const;
 
     
     /**
@@ -97,7 +97,7 @@ public:
 
       0 <= k <= rows()
     */
-    virtual void insert_row(int k)=0;
+    virtual void insert_row (int k)=0;
 
     
       /**
@@ -106,8 +106,8 @@ public:
       PRE
       0 <= k < rows();
     */
-    virtual void delete_row(int k)=0;
-        virtual void delete_column(int k)=0;
+    virtual void delete_row (int k)=0;
+        virtual void delete_column (int k)=0;
     virtual ~Matrix_storage() { }
     virtual Matrix_storage *clone()const=0;
 
@@ -116,12 +116,12 @@ public:
     /**
       at end of matrix?. when doing loop
 
-      for(i=0; i<h; i++)
-        for(j=0; j<w; j++)
+      for (i=0; i<h; i++)
+        for (j=0; j<w; j++)
           ..
 
     */
-    virtual bool mult_ok(int i, int j) const=0;
+    virtual bool mult_ok (int i, int j) const=0;
 
     /**
       walk through matrix (regular multiply).
@@ -129,30 +129,30 @@ public:
       this will make sparse matrix implementation easy.
     
       PRE
-      mult_ok(i,j)
+      mult_ok (i,j)
      */
-    virtual void mult_next(int &i, int &j) const  = 0;
+    virtual void mult_next (int &i, int &j) const  = 0;
 
     /**
       valid matrix entry. return false if at end of row
     */
-    virtual bool trans_ok(int i, int j) const=0;
+    virtual bool trans_ok (int i, int j) const=0;
 
     /**
       walk through matrix (transposed multiply).
       Get next i (for column j)
     
       PRE
-      ver_ok(i,j)
+      ver_ok (i,j)
      */
 
-    virtual void trans_next(int &i, int &j) const  = 0;
+    virtual void trans_next (int &i, int &j) const  = 0;
     
     /// generate a "Full_storage" matrix    
-    static Matrix_storage *get_full(int n, int m);
-    static void set_band(Matrix_storage*&, int band);
-    static void set_full(Matrix_storage*&);
-    virtual bool try_right_multiply(Matrix_storage *dest, 
+    static Matrix_storage *get_full (int n, int m);
+    static void set_band (Matrix_storage*&, int band);
+    static void set_full (Matrix_storage*&);
+    virtual bool try_right_multiply (Matrix_storage *dest, 
                                    const Matrix_storage *fact)const ;
     /**
       RTTI.
@@ -160,13 +160,13 @@ public:
     DECLARE_MY_RUNTIME_TYPEINFO;
 
     
-    static Matrix_storage* get_product_result(Matrix_storage *left, 
+    static Matrix_storage* get_product_result (Matrix_storage *left, 
                                              Matrix_storage *right);
     
     
-    static void set_addition_result(
+    static void set_addition_result (
        Matrix_storage *&dat, Matrix_storage *right);
-    static void set_product_result(
+    static void set_product_result (
        Matrix_storage*&dest, Matrix_storage*left, Matrix_storage*right);
 };
 
index b6e084efdafb7fe8abe345abdd0003daec4960ef..c2545a072dd6aa99353a0166a4365b72ef3ed967 100644 (file)
@@ -28,12 +28,12 @@ class Matrix {
 
 protected:
     Matrix_storage *dat;
-    void set(Matrix_storage*);
-    Matrix(Matrix_storage*);
+    void set (Matrix_storage*);
+    Matrix (Matrix_storage*);
 public:
     void OK() const { dat->OK(); }
-    int cols() const { return dat->cols(); }
-    int rows() const { return dat->rows(); }
+    int cols() const { return dat->cols (); }
+    int rows() const { return dat->rows (); }
 
     /**  return the size of a matrix. 
       PRE
@@ -54,14 +54,14 @@ public:
     ~Matrix() { delete dat; }
 
     /// set entries to r 
-    void fill(Real r);
+    void fill (Real r);
 
     /// set diagonal to d
-    void set_diag(Real d);
+    void set_diag (Real d);
 
-    void set_diag(Vector d);
+    void set_diag (Vector d);
     /// set unit matrix
-    void unit() { set_diag(1.0); }
+    void unit() { set_diag (1.0); }
 
     void operator+=(Matrix const &m);
     void operator-=(Matrix const &m);    
@@ -72,48 +72,48 @@ public:
       add a row to the matrix before  row k
 
       PRE
-      v.dim() == cols()
+      v.dim() == cols ()
       0 <= k <= rows()
     */
-    void insert_row(Vector v,int k);
+    void insert_row (Vector v,int k);
     /** . 
       delete a row from this matrix.
 
       PRE
       0 <= k < rows();
     */
-    void delete_row(int k) { dat->delete_row(k); }
-    void delete_column(int k) { dat->delete_column(k); }
+    void delete_row (int k) { dat->delete_row (k); }
+    void delete_column (int k) { dat->delete_column (k); }
 
     /**
       square n matrix, initialised to null
     */
-    Matrix(int n);
+    Matrix (int n);
    
     /**
       n x m matrix, init to 0
     */
-    Matrix(int n, int m);
-    Matrix(Matrix const &m);
+    Matrix (int n, int m);
+    Matrix (Matrix const &m);
 
     /// dyadic product: v * w.transpose
-    Matrix(Vector v, Vector w);
+    Matrix (Vector v, Vector w);
     void operator=(Matrix const &m);
 
     /// access an element
-    Real operator()(int i,int j) const { return dat->elem(i,j); }
+    Real operator()(int i,int j) const { return dat->elem (i,j); }
 
     /// access an element
-    Real &operator()(int i, int j) { return dat->elem(i,j); }
+    Real &operator()(int i, int j) { return dat->elem (i,j); }
 
     /// Matrix multiply with vec (from right)
     Vector operator *(Vector const &v) const;
 
     /// set this to m1*m2.
-    void set_product(Matrix const &m1, Matrix const &m2);
+    void set_product (Matrix const &m1, Matrix const &m2);
 
 
-    Vector left_multiply(Vector const &) const;
+    Vector left_multiply (Vector const &) const;
     
     Matrix operator-() const;
     
@@ -128,24 +128,24 @@ public:
       PRE
       0 <= c1,c2 < cols()
     */
-    void swap_columns(int c1, int c2);
+    void swap_columns (int c1, int c2);
 
     /**  swap. 
       PRE
       0 <= c1,c2 < rows()
     */
-    void swap_rows(int c1, int c2);
+    void swap_rows (int c1, int c2);
 
 
-    Vector row(int ) const;
-    Vector col(int) const;
+    Vector row (int) const;
+    Vector col (int) const;
 
     operator String() const;
     void print() const;
 };
 
 inline Vector
-operator *(Vector &v, Matrix const & m) { return m.left_multiply(v); }
+operator *(Vector &v, Matrix const & m) { return m.left_multiply (v); }
 Matrix operator *(Matrix const & m1,Matrix const &m2);
 Matrix operator /(Matrix const &m1,Real a);
 inline Matrix operator -(Matrix m1,const Matrix m2)
index 61c69495c22ac1db08d7993db13bc943c75fc968..054288b809a81d5a6bf70dc33ed509eef5ffda61 100644 (file)
@@ -21,7 +21,7 @@
 template<class T>
 class Link_array : public Array<T*>
 {
-    static default_compare(T *const& p1, T  *const&p2) {
+    static default_compare (T *const& p1, T  *const&p2) {
        /* can't do p1 -p2, since T might be an incomplete type */
        if (p1 < p2)
            return -1 ;
@@ -30,48 +30,48 @@ class Link_array : public Array<T*>
        return 0;
     }
 public:
-    void substitute(T *old, T*new_l)
+    void substitute (T *old, T*new_l)
     {
        int i;
-       while ((i = find_i(old)) >=0) 
+       while ((i = find_i (old)) >=0) 
            if (new_l)
-               elem(i) =new_l;
+               elem (i) =new_l;
            else
-               del(i);
+               del (i);
     }
-    void unordered_substitute(T* old, T * new_l)
+    void unordered_substitute (T* old, T * new_l)
     {
        int i;
-       while ((i = find_i(old)) >=0) 
+       while ((i = find_i (old)) >=0) 
            if (new_l)
-               elem(i) =new_l;
+               elem (i) =new_l;
            else {
-               unordered_del( i );
+               unordered_del (i);
            }
     
     }
     void default_sort() {
-       sort(default_compare);
+       sort (default_compare);
     }
     void uniq() {
        Link_array<T> l_arr;
        for (int i=0; i < size(); i++) 
-           if (!i || elem(i-1) != elem(i))
-               l_arr.push(elem(i)); 
+           if (!i || elem (i-1) != elem (i))
+               l_arr.push (elem (i)); 
        *this = l_arr;
     }
 
     int find_i (T const * t) const {
        for (int i=0; i < size(); i++)
-           if (elem(i) == t)
+           if (elem (i) == t)
                return i;
        return -1;
     }
-    T *find_l(T const *t)const
+    T *find_l (T const *t)const
     {
-       int i = find_i(t);
+       int i = find_i (t);
        if (i >= 0)
-           return elem(i);
+           return elem (i);
        else
            return 0;
     }
index d41dc2ba1cc6bd89f1f2d545529c95f4a878cab9..81a8cb1038902a0d18ec8a495a866fe16d43b181 100644 (file)
@@ -27,11 +27,11 @@ class File_path : private Array<String>
 {
 public:
     /// locate a file in the search path
-    String find(String nm)const;
+    String find (String nm)const;
 
     /// add to end of path.
     Array<String>::push;
-    void add(String str) { push(str); }
+    void add (String str) { push (str); }
 };
 
 /** split a path into its components.
@@ -41,6 +41,6 @@ public:
   @return
   String &drive, String &dirs, String &filebase, String &extension
  */
-void split_path(String path, String &drive, String &dirs, String &filebase, String &extension);
+void split_path (String path, String &drive, String &dirs, String &filebase, String &extension);
 
 #endif
index 6c9ceff0d77207846dd9e28f3300f5953db085bd..5aa63d1d8f89cbf92d2dc383442f3c3d78d9ba60 100644 (file)
@@ -34,38 +34,38 @@ public:
        return p;
     }
     T remove_prev_p() {
-       assert( ok() );
+       assert (ok());
        (*this)--;
        return remove_p();
     }
     
-    Link_list<T> &list() { return (Link_list<T>&)Cursor<void*>::list(); }
+    Link_list<T> &list() { return (Link_list<T>&)Cursor<void*>::list (); }
     PCursor<T> operator++(int) { return Cursor<void*>::operator++(0);}
     PCursor<T> operator--(int) { return Cursor<void*>::operator--(0); }
     PCursor<T> operator+=(int i) { return Cursor<void*>::operator+=(i);}
     PCursor<T> operator-=(int i) { return Cursor<void*>::operator-=(i); }    
     PCursor<T> operator -(int no) const { return Cursor<void*>::operator-(no);}
     int operator -(PCursor<T> op) const { return Cursor<void*>::operator-(op);}
-    PCursor<T> operator +( int no) const {return Cursor<void*>::operator+(no);}    PCursor(const Link_list<T> & l) : Cursor<void*> (l) {}
+    PCursor<T> operator +( int no) const {return Cursor<void*>::operator+(no);}    PCursor (const Link_list<T> & l) : Cursor<void*> (l) {}
     PCursor() : Cursor<void*> () {}
-    PCursor( const Cursor<void*>& cursor ) : Cursor<void*>(cursor) { }
+    PCursor (const Cursor<void*>& cursor) : Cursor<void*>(cursor) { }
     void* vptr() const { return *((Cursor<void*> &) *this); }
 
     // should return T& ?
-    T ptr() const { return (T) vptr(); }
+    T ptr() const { return (T) vptr (); }
     T operator ->() const { return  ptr(); }
     operator T() { return ptr(); }
     T operator *() { return ptr(); }
-    void add(T const & p ) { Cursor<void*>::add((void*) p); }
-    void insert(T const & p ) { Cursor<void*>::insert((void*) p);}    
-    static int compare(PCursor<T> a,PCursor<T>b) {
-       return Cursor<void*>::compare(a,b);
+    void add (T const & p) { Cursor<void*>::add ((void*) p); }
+    void insert (T const & p) { Cursor<void*>::insert ((void*) p);}    
+    static int compare (PCursor<T> a,PCursor<T>b) {
+       return Cursor<void*>::compare (a,b);
     }
 };
 
 
 
 #include "compare.hh"
-template_instantiate_compare(PCursor<T>, PCursor<T>::compare, template<class T>);
+TEMPLATE_INSTANTIATE_COMPARE(PCursor<T>, PCursor<T>::compare, template<class T>);
 
 #endif
index ffb01bcfe8032d87aba37d6476401e055f1c1e70..e8de3d5da163c0616d23c72684f3862abdd25fa8 100644 (file)
@@ -4,12 +4,12 @@ template<class T>
 void
 PCursor<T>::junk()
 {
-#if !defined(NDEBUG) && defined(PARANOID)
+#if !defined (NDEBUG) && defined (PARANOID)
     list().OK();
 #endif
 
     delete ptr();
-#if !defined(NDEBUG)&&defined(PARANOID)
+#if !defined (NDEBUG)&&defined (PARANOID)
     thing() = 0;
     list().OK();
 #endif
index af27832f00cbd4d0e51f2b30bf7b2f9c5dec42e4..f052e47368e67db1a214e5591a2150f172dc020a 100644 (file)
@@ -28,8 +28,8 @@ class Link_list : public List<void *>
     PCursor<T> bottom() const {
        return PCursor<T> (List<void*>::bottom());
     }
-    PCursor<T> find(T) const;
-    void concatenate(Link_list<T> const &s) { List<void*>::concatenate(s); }
+    PCursor<T> find (T) const;
+    void concatenate (Link_list<T> const &s) { List<void*>::concatenate (s); }
 
     Link_list() {}
 };
@@ -55,19 +55,19 @@ class Pointer_list : public Link_list<T> {
     
 public:
     void junk();
-    Pointer_list(Pointer_list const &) { set_empty(); }
+    Pointer_list (Pointer_list const &) { set_empty(); }
     Pointer_list() { }
-    ~Pointer_list() { junk(); }
+    ~Pointer_list() { junk (); }
 };
 
 #define Pointer_list__copy(T, to, from, op)   \
   for (PCursor<T> _pc_(from); _pc_.ok(); _pc_++)\
-      to.bottom().add(_pc_->op)\
+      to.bottom().add (_pc_->op)\
   \
 
 
 template<class T>
-void PL_copy(Pointer_list<T*> &dst,Pointer_list<T*> const&src);
+void PL_copy (Pointer_list<T*> &dst,Pointer_list<T*> const&src);
 
 
 
index 80ce1ba198c58aa7c7d93d88f3ec43153cfbed93..f4a3713761c4325abadc53755a912dab260b07a3 100644 (file)
@@ -9,12 +9,12 @@
 
 template<class T>
 void
-PL_copy(Pointer_list<T*> &to, Pointer_list<T*> const&src)
+PL_copy (Pointer_list<T*> &to, Pointer_list<T*> const&src)
 {
-    for (PCursor<T*> pc(src); pc.ok(); pc++) {
+    for (PCursor<T*> pc (src); pc.ok(); pc++) {
        T *q = pc;
        T *p=new T(*q) ; 
-       to.bottom().add(p);
+       to.bottom().add (p);
     }
 }
 
index 58f8e198b0537e4aae014ed1314972dee3723bbe..cc8097c3600da122acc9d0352741cf13a35e4416 100644 (file)
@@ -23,7 +23,7 @@ class P {
     /**
       Set contents to a copy of #t_l#
      */
-    void copy(T const*t_l);
+    void copy (T const*t_l);
     T* t_p;
 
     /**
@@ -63,7 +63,7 @@ public:
     //P(T *p) { t_p = p; }
     
     T *operator ->() { return t_p; }
-    operator T * () {  return t_p; }
+    operator T *() {  return t_p; }
     const T *operator ->() const { return t_p ; }
     T &operator *() { return *t_p; }
     T const  &operator *() const { return *t_p; }
index 80cadfd23a72efc7c9445a2512b7f1e5f2a733d0..c35f92c4970bcdef9eda19c1af0ab27745ea4a45 100644 (file)
@@ -21,7 +21,7 @@ P<T>::copy_p()const
 template<class T>
 inline
 void
-P<T>::copy(T const *l_C)
+P<T>::copy (T const *l_C)
 {
     t_p = l_C ? new T(*l_C) : 0;
 }
@@ -48,7 +48,7 @@ P<T> &
 P<T>::operator =(P const&s)
 {
     junk();
-    copy(s.t_p);
+    copy (s.t_p);
     return *this;
 }
 
@@ -61,7 +61,7 @@ P<T>::~P() {
 template<class T>
 inline
 void
-P<T>::set_p(T * np) 
+P<T>::set_p (T * np) 
 {
     if (np == t_p)
        return;
@@ -74,13 +74,13 @@ P<T>::set_p(T * np)
 template<class T>
 inline
 void
-P<T>::set_l(T const * l_C) 
+P<T>::set_l (T const * l_C) 
 {
     if (t_p == l_C)
        return;
     
     junk();
-    copy(l_C);
+    copy (l_C);
 }
 
 
index 846b870089b750910dfdabda6a25766594ecb76d..5f4a97fb4792c1d8bd660fbc822cfa310c403272 100644 (file)
@@ -21,7 +21,7 @@ struct PQueue_ent
 
 template<class K, class T>
 int compare (PQueue_ent<K,T> const &e1 , PQueue_ent<K,T> const &e2) {
-    return compare(e1.key , e2.key);
+    return compare (e1.key , e2.key);
 }
 
 /**
@@ -35,10 +35,10 @@ int compare (PQueue_ent<K,T> const &e1 , PQueue_ent<K,T> const &e2) {
 template<class T>
 class PQueue {
     Array<T> heap_arr_;
-    T &elt(int i) {
+    T &elt (int i) {
        return heap_arr_[i-1];
     }
-    T const&elt(int i) const {
+    T const&elt (int i) const {
        return heap_arr_[i-1];
     }
 public:
@@ -52,25 +52,25 @@ public:
     {
 #ifndef NDEBUG
        for (int i =2; i <= size(); i++)
-           assert(compare (elt(i/2), elt(i)) <= 0);
+           assert (compare (elt (i/2), elt (i)) <= 0);
 #endif
     }
-    T front () const { return elt(1); }
-    int size() const { return heap_arr_.size(); }
-    void insert(T v) {
-       heap_arr_.push(v);
+    T front() const { return elt (1); }
+    int size() const { return heap_arr_.size (); }
+    void insert (T v) {
+       heap_arr_.push (v);
        int i = heap_arr_.size();
        int j = i / 2 ;
        while (j) {
-           if (compare(elt(j), v) > 0) {
-               elt(i) = elt(j);        
+           if (compare (elt (j), v) > 0) {
+               elt (i) = elt (j);      
                i = j;
                j = i/2;
            } else {
                break;
            }
        }
-       elt(i) = v;
+       elt (i) = v;
        OK();
     }
     T max() const {
@@ -78,23 +78,23 @@ public:
        T max_t;
        return max_t;
     }
-    void delmin( ) {
-       assert(size());
+    void delmin() {
+       assert (size());
        T last = heap_arr_.top();
        
        int mini=2;
        int lasti=1;
 
-       while ( mini < size() ) {
-           if (compare(elt(mini + 1), elt(mini)) <0)
+       while ( mini < size()) {
+           if (compare (elt (mini + 1), elt (mini)) <0)
                mini++;
-           if (compare(last,elt(mini) ) < 0)
+           if (compare (last,elt (mini)) < 0)
                break;
-           elt(lasti) = elt(mini);
+           elt (lasti) = elt (mini);
            lasti = mini;
            mini *= 2;
        }
-       elt(lasti) = last;
+       elt (lasti) = last;
        heap_arr_.pop();
        OK();
     }
index 8b12766240da2791c3523ef346c8591a88fc4b0e..59949bd860cf483bc3d0adcb3bb933b17cddbb73 100644 (file)
 template<class K>
 struct Priorities :    Array<K>
 {
-    void insert(K k) 
+    void insert (K k) 
     {
        int i=0;
        for (; i < size(); i++) {
-           if(elem(i) == k)
+           if (elem (i) == k)
                return;
-           if (elem(i) > k )
+           if (elem (i) > k)
                break;
        }
-       Array<K>::insert(k, i);
+       Array<K>::insert (k, i);
     }
 };
 #endif // PRIORITIES_HH
index d3b68f726fba9d0c5c584721a55313c19a015b20..51426dd063588be8cb74f33f15813f345928f3b3 100644 (file)
@@ -12,6 +12,6 @@
 #include <Rational.h>
 
 /// print a Rational. To be called from the  debugger
-void print_rat(Rational const&);
+void print_rat (Rational const&);
 
 #endif // RATIONAL_HH
index 457b82f967f13c278c72aca8402b05c2fd715ca4..2e8b160a22d02e71f0cbdc8c07e8515d07ef273d 100644 (file)
@@ -20,9 +20,9 @@ typedef double Real;
 const Real infinity_f = HUGE_VAL;
 
 inline Real
-distance(Real x,Real y)
+distance (Real x,Real y)
 {
-    return abs(x-y);
+    return abs (x-y);
 }
 
 #endif
index 08897ce50c6c3549e539547a35059daf3e2a8be5..d081b56fe68a4d9107a48d53f3bd5bb06d869122 100644 (file)
 /// Perl -like scalar type.
 struct Scalar : public String {
     
-    Scalar(Real r) : String(r) {}
-    Scalar(int i) : String(i) {}
-    Scalar(char c) : String(c) {}
-    Scalar(char const *c) : String(c) {}    
-    Scalar(String s ):String(s) {}
-    Scalar(Rational );
+    Scalar (Real r) : String (r) {}
+    Scalar (int i) : String (i) {}
+    Scalar (char c) : String (c) {}
+    Scalar (char const *c) : String (c) {}    
+    Scalar (String s):String (s) {}
+    Scalar (Rational);
     operator Rational();
     Scalar() {}
     bool isnum();
index c79a6621baf1a2926fedcfcdc159eb3e0cf75776..d4440b1c26277249658caaa544cbafd9ccfad168 100644 (file)
@@ -28,7 +28,7 @@ friend class String_handle;
     String_data();
 
     /// init from src. Conservative allocation.
-    String_data(String_data const &src); 
+    String_data (String_data const &src); 
     
     ~String_data();
 
@@ -36,13 +36,13 @@ friend class String_handle;
       @param j, maximum stringlength_i_.    
       contents thrown away.
     */
-    void setmax(int j);
+    void setmax (int j);
     
     /** POST: maxlen >= j.
       @param j, maximum stringlength_i_.
       contents are kept if it grows.
       */
-    void remax(int j);
+    void remax (int j);
 
     /// check if writeable.
     void OKW();
@@ -54,14 +54,14 @@ friend class String_handle;
     void tighten();
 
     // assignment.
-    void set( Byte const* byte_C, int length_i );
+    void set (Byte const* byte_C, int length_i);
 
-    void set( char const* ch_C );
+    void set (char const* ch_C);
     
     /// concatenation.
-    void append( Byte const* byte_C, int length_i );
+    void append (Byte const* byte_C, int length_i);
 
-    void operator += ( char const* ch_C );
+    void operator += ( char const* ch_C);
 
     char const* ch_C() const; 
 
@@ -72,7 +72,7 @@ friend class String_handle;
     // idem, non const
     Byte* byte_l();
 
-    void trunc(int j);
+    void trunc (int j);
 
     /** access element. not really safe. Can alter length_i_ without
       #String_data# knowing it.  */
index 5a3bb390efaee9344db51ea725817217020e4c28..2a285db24f8fff7e762441836eb5a7cf066e8a57 100644 (file)
@@ -26,9 +26,9 @@ String_data::OKW()
 INLINE void 
 String_data::OK() 
 {
-    assert(maxlen >= length_i_);
-    assert(bool(data_byte_p_));
-    assert(references >= 1);
+    assert (maxlen >= length_i_);
+    assert (bool (data_byte_p_));
+    assert (references >= 1);
 }
 
 
@@ -43,23 +43,23 @@ String_data::String_data()
 }
 
 INLINE
-String_data::String_data(String_data const &src) 
+String_data::String_data (String_data const &src) 
 {
     references=0;      
     maxlen = length_i_ = src.length_i_;                
     data_byte_p_ = new Byte[maxlen+1]; // should calc GNU 8byte overhead.      
-    memcpy( data_byte_p_, src.data_byte_p_, length_i_ + 1 );   
+    memcpy (data_byte_p_, src.data_byte_p_, length_i_ + 1);    
 }
 
 INLINE
 String_data::~String_data() 
 {
-    assert(references == 0);
+    assert (references == 0);
     delete[] data_byte_p_;
 }
 
 INLINE void 
-String_data::setmax(int j) 
+String_data::setmax (int j) 
 {      
     OKW();
     if (j > maxlen) {
@@ -82,12 +82,12 @@ String_data::setmax(int j)
        define change authority
 */
 INLINE void 
-String_data::remax(int j) 
+String_data::remax (int j) 
 {
     OKW();
     if (j > maxlen) {
        Byte *p = new Byte[j + 1];      
-       memcpy( p, data_byte_p_, ( maxlen <? length_i_ ) + 1 );     
+       memcpy (p, data_byte_p_, ( maxlen <? length_i_) + 1 );      
        maxlen = j;
        delete[] data_byte_p_;
        data_byte_p_ = p;
@@ -99,51 +99,51 @@ String_data::tighten()
 { // should be dec'd const
     maxlen = length_i_;
     Byte *p = new Byte[maxlen + 1];        
-    memcpy( p, data_byte_p_, length_i_ + 1 );      
+    memcpy (p, data_byte_p_, length_i_ + 1);       
     delete[] data_byte_p_;
     data_byte_p_ = p;          
 }
 // assignment.
 INLINE void 
-String_data::set( Byte const* byte_C, int length_i 
+String_data::set (Byte const* byte_C, int length_i
 {
     OKW();
 
-    assertbyte_C && byte_C != data_byte_p_);
+    assert (byte_C && byte_C != data_byte_p_);
 
     length_i_ = length_i;
-    remax( length_i_ );     // copies too
-    memcpy( data_byte_p_, byte_C, length_i_ );
+    remax (length_i_);     // copies too
+    memcpy (data_byte_p_, byte_C, length_i_);
     data_byte_p_[ length_i_ ] = 0;
 }
 
 INLINE
 void 
-String_data::set( char const* ch_C 
+String_data::set (char const* ch_C
 {
-    set( (Byte const*)ch_C, strlen( ch_C ) );
+    set ((Byte const*)ch_C, strlen (ch_C) );
 }
 
 
 /// concatenation.
 INLINE void 
-String_data::append( Byte const* byte_C, int length_i 
+String_data::append (Byte const* byte_C, int length_i
 {
     OK();
     OKW();
     int old_i = length_i_;
     
     length_i_ += length_i;
-    remax( length_i_ );
-    memcpy( data_byte_p_ + old_i, byte_C, length_i );  
+    remax (length_i_);
+    memcpy (data_byte_p_ + old_i, byte_C, length_i);   
     data_byte_p_[ length_i_ ] = 0;
 }
 
 INLINE
 void 
-String_data::operator += ( char const* ch_C 
+String_data::operator += ( char const* ch_C) 
 {
-    append( (Byte const*)ch_C, strlen( ch_C ) );
+    append ((Byte const*)ch_C, strlen (ch_C) );
 }
 
 
@@ -175,10 +175,10 @@ String_data::byte_l()
 
 INLINE
 void 
-String_data::trunc(int j) 
+String_data::trunc (int j) 
 {
     OKW(); 
-    assert(j >= 0 && j <= length_i_);
+    assert (j >= 0 && j <= length_i_);
     data_byte_p_[j] = 0;
     length_i_ = j;
 }
@@ -186,21 +186,21 @@ String_data::trunc(int j)
 INLINE bool
 String_data::is_binary_bo()const
 {
-//    return !memchr(data_byte_p_, length_i_, 0);
-    return ( (int)strlen( (char const*)data_byte_p_ ) != length_i_ );
+//    return !memchr (data_byte_p_, length_i_, 0);
+    return ( (int)strlen ((char const*)data_byte_p_) != length_i_ );
 }
 
 INLINE Byte&
 String_data::operator [](int j) 
 {
-    assert(j >= 0 && j <= length_i_);
+    assert (j >= 0 && j <= length_i_);
     return data_byte_p_[j] ; 
 }
 
 INLINE Byte 
 String_data::operator [](int j) const 
 {
-    assert(j >= 0 && j <= length_i_);
+    assert (j >= 0 && j <= length_i_);
     return data_byte_p_[j]; 
 }
 
index a18fcc28ed48f94d54f7fe1647dc04df95c8435a..c6e73ada103bb000eacfe76e6f1847daf7c80a70 100644 (file)
@@ -26,7 +26,7 @@ class String_handle {
     void down();
 
     /// increase ref count
-    void up(String_data *d);
+    void up (String_data *d);
     
     /** make sure data has only one reference.      
        POST: data->references == 1
@@ -36,7 +36,7 @@ class String_handle {
 public:
     String_handle();
     ~String_handle();
-    String_handle(String_handle const & src);
+    String_handle (String_handle const & src);
 
     Byte const* byte_C() const;
     char const* ch_C() const;
@@ -51,10 +51,10 @@ public:
        don't use this for loops. Use byte_C()
        */
     Byte &operator[](int j);
-    void append( Byte const* byte_C, int length_i );
-    void set( Byte const* byte_C, int length_i );
+    void append (Byte const* byte_C, int length_i);
+    void set (Byte const* byte_C, int length_i);
     void operator = (char const *p);
-    void trunc(int j);
+    void trunc (int j);
     int length_i() const;
 };
 
index 63b2ab379d20d4caf5b84820384363d7e7b7a7fe..e398e0a4ed575cd4f70f907fad4d162c8d7ebde5 100644 (file)
@@ -24,7 +24,7 @@ String_handle::down()
 
 /// increase ref count
 INLINE void 
-String_handle::up(String_data *d) 
+String_handle::up (String_data *d) 
 { 
     data=d; data->references ++; 
 }
@@ -33,16 +33,16 @@ INLINE void
 String_handle::copy() 
 {
     if (data->references !=1){
-       String_data *newdata = new String_data(*data);
+       String_data *newdata = new String_data (*data);
        down();
-       up(newdata);
+       up (newdata);
     }
 }
 
 INLINE
 String_handle::String_handle() 
 {
-    up(new String_data);
+    up (new String_data);
 }
 
 INLINE
@@ -52,9 +52,9 @@ String_handle::~String_handle()
 }    
 
 INLINE
-String_handle::String_handle(String_handle const & src) 
+String_handle::String_handle (String_handle const & src) 
 {      
-    up(src.data);
+    up (src.data);
 }
 
 INLINE Byte* 
@@ -89,7 +89,7 @@ String_handle::operator =(String_handle const &src)
     if (this == &src)
        return;
     down();
-    up(src.data);
+    up (src.data);
 }
 
 INLINE void 
@@ -116,30 +116,30 @@ String_handle::operator[](int j)
 }
 
 INLINE void 
-String_handle::append( Byte const* byte_C, int length_i 
+String_handle::append (Byte const* byte_C, int length_i
 {
     copy();
-    data->append( byte_C, length_i );
+    data->append (byte_C, length_i);
 }
                           
 INLINE void 
-String_handle::set( Byte const* byte_C, int length_i 
+String_handle::set (Byte const* byte_C, int length_i
 {
     copy();
-    data->set( byte_C, length_i );
+    data->set (byte_C, length_i);
 }
                           
 INLINE void 
 String_handle::operator = (char const *p) 
 {
     copy();
-    data->set( p );
+    data->set (p);
 }
                           
 INLINE void 
-String_handle::trunc(int j) 
+String_handle::trunc (int j) 
 {
-    copy(); data->trunc(j); 
+    copy(); data->trunc (j); 
 }
 
 INLINE int 
index 0e0b9fb4dd05d08baf0f5bb910e273867f8effad..3d8981faf0a99826441444d3f691fa6a2f778357 100644 (file)
@@ -62,19 +62,19 @@ public:
     /** init to empty string. This is needed because other
       constructors are provided.*/
     String() {  }                  
-    String(Rational);
+    String (Rational);
 
     /// String s = "abc";
-    String( char const* source ); 
-    String( Byte const* byte_C, int length_i ); 
+    String (char const* source); 
+    String (Byte const* byte_C, int length_i); 
     
     /// "ccccc"
-    String( char c, int n = 1 );
+    String (char c, int n = 1);
 
-    Stringint i , char const *fmt=0);
+    String (int i , char const *fmt=0);
     String ( double f , char const* fmt =0);
     /// 'true' or 'false'
-    String(bool );
+    String (bool);
 
     ///  return a "new"-ed copy of contents
     Byte* copy_byte_p() const; //  return a "new"-ed copy of contents
@@ -85,24 +85,24 @@ public:
     Byte* byte_l();
 
     /// deprecated; use ch_C()
-    operator char const* () const { return ch_C(); }
+    operator char const*() const { return ch_C(); }
     
-    String &operator =( String const & source );
+    String &operator =( String const & source);
 
     /// concatenate s
     void operator += (char const* s) { strh_ += s; }
     void operator += (String s);
 
-    void append(String);
-    void prepend(String);
+    void append (String);
+    void prepend (String);
 
-    char operator []( int n ) const { return strh_[n]; }
+    char operator []( int n) const { return strh_[n]; }
 
     /// return n leftmost chars
-    String left_str( int n ) const;
+    String left_str (int n) const;
 
     /// return n rightmost chars
-    String right_str( int n ) const;
+    String right_str (int n) const;
 
     /// return uppercase of *this
     String upper_str() const;
@@ -115,28 +115,28 @@ public:
 
 
     /// return a piece starting at index_i (first char = index_i 0), length n
-    String mid_str(int index_i, int n ) const;
+    String mid_str (int index_i, int n) const;
 
     /// cut out a middle piece, return remainder
-    String nomid_str(int index_i, int n ) const;
+    String nomid_str (int index_i, int n) const;
 
     /// signed comparison,  analogous to memcmp;
-    static int compare_i(String const & s1,const  String& s2);
+    static int compare_i (String const & s1,const  String& s2);
        
     /// index of rightmost c 
-    int index_last_ichar c) const;
+    int index_last_i (char c) const;
 
     /// index of rightmost element of string 
-    int index_last_i( char const* string ) const;
+    int index_last_i (char const* string) const;
 
-    int index_i(char c ) const;
-    int index_i(String ) const;
-    int index_any_i(String ) const;
+    int index_i (char c) const;
+    int index_i (String) const;
+    int index_any_i (String) const;
 
     void to_upper();
     void to_lower();
     /// provide Stream output
-    void print_on(ostream& os) const;
+    void print_on (ostream& os) const;
 
     /// the length of the string
     int length_i() const;
@@ -155,21 +155,21 @@ public:
 
 #include "compare.hh"
 
-instantiate_compare(String const &, String::compare_i);
+INSTANTIATE_COMPARE(String const &, String::compare_i);
 
 // because char const* also has an operator ==, this is for safety:
 inline bool operator==(String s1, char const* s2){
-    return s1 == String(s2);
+    return s1 == String (s2);
 }
 inline bool operator==(char const* s1, String s2)
 {
-    return String(s1)==s2;
+    return String (s1)==s2;
 }
-inline bool operator!=(String s1, char const* s2  ) {
-    return s1!=String(s2);
+inline bool operator!=(String s1, char const* s2 ) {
+    return s1!=String (s2);
 }
 inline bool operator!=(char const* s1,String s2) {
-    return String(s2) !=s1;
+    return String (s2) !=s1;
 }
 
 
@@ -181,13 +181,10 @@ operator  + (String s1, String  s2)
 }
 
 inline ostream &
-operator << ( ostream& os, String d )
+operator << ( ostream& os, String d)
 {
-    d.print_on(os);
+    d.print_on (os);
     return os;
 }
 
-
-// String quoteString(String message, String quote);
-
 #endif
index 3535a84f8f42de1f0b1ffefe45e93017702fe232..ab3e9c82b515ef24250ce250a73c2278fb83dd87 100644 (file)
@@ -14,14 +14,14 @@ public:
     Text_record() { } // needed because of other ctor
 
     /// report an error in this line.
-    message(String s) {
+    message (String s) {
        cerr << '\n'<< filename << ": "<< line_no << s << "\n";
     }         
     String operator[](int j) {
        return Array<String>::operator[](j);
     }
 
-    Text_record(Array<String> s, String fn, int j) : Array<String>(s) { 
+    Text_record (Array<String> s, String fn, int j) : Array<String>(s) { 
        filename = fn; line_no = j; 
     }
     Array<String>::size;           
@@ -38,7 +38,7 @@ public:
     /// get a line with records
     Text_record    get_record();
 
-    Text_db(String fn):Data_file(fn) { }
+    Text_db (String fn):Data_file (fn) { }
     Data_file::error;
     bool eof();
 
index 437f8698c7f8262cd00e29cf46c99e4747b8faff..c921ebc2d35b4d603ab00f6d03284c34dc9baf61 100644 (file)
@@ -26,17 +26,17 @@ class Text_stream
     String name;
     
  public:
-    Text_stream(String fn);
+    Text_stream (String fn);
     String get_name() { return name; }
     bool eof() {
-       return feof(f);
+       return feof (f);
     }
     bool eol() {
        return (peek() == '\n');
     }
     char peek() {
        char c = get();
-       unget(c);
+       unget (c);
        return c;
     }
     int line(){
@@ -47,7 +47,7 @@ class Text_stream
        char c;
        
        if (pushback.empty())
-           c = getc(f);        
+           c = getc (f);       
        else 
            c = pushback.pop();
 
@@ -55,20 +55,20 @@ class Text_stream
            line_no++;
        return c;       
     }
-    void unget(char c) {
+    void unget (char c) {
        if (c =='\n')
            line_no--;
-       pushback.push(c);
+       pushback.push (c);
     }
-    ~Text_stream (){
+    ~Text_stream(){
        if (!eof()) 
            cerr <<__FUNCTION__<< ": closing unended file";
     
-       fclose(f);
+       fclose (f);
     }
 
     /// GNU format message.
-    void message(String s); 
+    void message (String s); 
 };
 
 #endif
index fbaa51e7318f57e186962f209d48cc918eacf656..94a3e9f667bc73d22f3b62615adf6d451f7777ec 100644 (file)
@@ -7,16 +7,16 @@
     Union find, a standard algorithm:
 
     Union_find represents an undirected graph of N points. You can
-    connect two points using #connect()#. #find(i)# finds a uniquely
+    connect two points using #connect()#. #find (i)# finds a uniquely
     determined representant of the equivalence class of points
     connected to #i#.
     
     */
 struct Union_find {    
-    void connect(int i, int j);
-    int find(int i);
-    bool equiv(int i, int j) { return find(i) == find(j); }
-    Union_find(int sz);
+    void connect (int i, int j);
+    int find (int i);
+    bool equiv (int i, int j) { return find (i) == find (j); }
+    Union_find (int sz);
 
 private:
     Array<int> classes;
index 6f0e18aedca6dfc2c9c300291e73e5e822b1100b..60b72d299a2c5527666c081d29873a282f5b65f1 100644 (file)
@@ -10,7 +10,7 @@
 
 /// copy a bare (C-)array from #src# to #dest# sized  #count#
 template<class T>
-inline void arrcpy(T*dest, T*src, int count) {
+inline void arrcpy (T*dest, T*src, int count) {
     for (int i=0; i < count ; i++)
        *dest++ = *src++;
 }
@@ -42,10 +42,10 @@ protected:
     T *thearray;
 
     /// stretch or shrink  array.
-    void remax(int newmax) {    
+    void remax (int newmax) {   
        T* newarr = new T[newmax];
        size_ = (newmax < size_) ? newmax : size_;
-       arrcpy(newarr, thearray, size_);
+       arrcpy (newarr, thearray, size_);
        
        delete[] thearray;
        thearray = newarr;
@@ -56,8 +56,8 @@ protected:
 public:
     /// check invariants
     void OK() const {
-       assert(max >= size_ && size_ >=0);
-       if (max) assert(thearray);
+       assert (max >= size_ && size_ >=0);
+       if (max) assert (thearray);
     }
     /** report the size_.
       @see {setsize_}
@@ -73,8 +73,8 @@ public:
     /** set the size_ to #s#.
       POST: size() == s.
     Warning: contents are unspecified */
-    void set_size(int s) {
-       if (s >= max) remax(s);
+    void set_size (int s) {
+       if (s >= max) remax (s);
        size_ = s;    
     }
     
@@ -83,44 +83,44 @@ public:
     /// return a  "new"ed copy of array 
     T* copy_array() const {
        T* Tarray = new T[size_];
-       arrcpy(Tarray, thearray, size_);
+       arrcpy (Tarray, thearray, size_);
        return Tarray;
     }
     // depracated
-    operator T* () const {
+    operator T*() const {
        return copy_array();    
     }
     void operator=(Array const & src) {
        set_size (src.size_);
-       arrcpy(thearray,src.thearray, size_);
+       arrcpy (thearray,src.thearray, size_);
     }
-    Array(Array const & src) {
+    Array (Array const & src) {
        thearray = src.copy_array();
        max = size_ = src.size_;        
     }
 
     /// tighten array size_.
-    void precompute () { remax(size_); }
+    void precompute() { remax (size_); }
     
 
     /// access element
     T &operator[] (int i)  {
-       return elem(i);
+       return elem (i);
     }
     /// access element
     T const & operator[] (int i) const {
-       return elem(i);
+       return elem (i);
     }
     /// access element
-    T &elemint i) const {
-       assert(i >=0&&i<size_);
+    T &elem (int i) const {
+       assert (i >=0&&i<size_);
        return ((T*)thearray)[i];       
     }
 
     /// add to the end of array
-    void push(T x) {
+    void push (T x) {
        if (size_ == max)
-           remax(2*max + 1);
+           remax (2*max + 1);
 
        // T::operator=(T &) is called here. Safe to use with automatic
        // vars
@@ -128,13 +128,13 @@ public:
     }
     /// remove and return last entry 
     T pop() {
-       assert(!empty());
-       T l = top(0);
-       set_size(size()-1);
+       assert (!empty());
+       T l = top (0);
+       set_size (size()-1);
        return l;
     }
     /// access last entry
-    T& top(int j=0) {
+    T& top (int j=0) {
        return (*this)[size_-j-1];
     }
      /// return last entry
@@ -144,14 +144,14 @@ public:
 
 
     void swap (int i,int j) {
-       T t((*this)[i]);
+       T t ((*this)[i]);
        (*this)[i]=(*this)[j];
        (*this)[j]=t;
     }
     bool empty() const { return !size_; }
-    void insert(T k, int j) {
-       assert(j >=0 && j<= size_);
-       set_size(size_+1);
+    void insert (T k, int j) {
+       assert (j >=0 && j<= size_);
+       set_size (size_+1);
        for (int i=size_-1; i > j; i--)
            thearray[i] = thearray[i-1];
        thearray[j] = k;
@@ -159,56 +159,56 @@ public:
     /**
       remove  i-th element, and return it.
      */
-    T get(int i) {
-       T t = elem(i);
+    T get (int i) {
+       T t = elem (i);
        del (i);
        return t;
     }
-    void unordered_del(int i)
+    void unordered_del (int i)
     {
-       elem(i) = top();
-       set_size(size() -1);
+       elem (i) = top();
+       set_size (size() -1);
     }
-    void del(int i) {
-       assert(i >=0&& i < size_);
-       arrcpy(thearray+i, thearray+i+1, size_-i-1);
+    void del (int i) {
+       assert (i >=0&& i < size_);
+       arrcpy (thearray+i, thearray+i+1, size_-i-1);
        size_--;
     }
     // quicksort.
     void sort (int (*compare)( T const&,T const&),
-              int lower = -1, int upper = -1 ) {
+              int lower = -1, int upper = -1) {
        if (lower < 0) {
            lower = 0 ;
            upper = size()-1;
        }
        if (lower >= upper)
            return;
-       swap(lower, (lower+upper)/2);
+       swap (lower, (lower+upper)/2);
        int last = lower;
        for (int i= lower +1; i <= upper; i++)
-           if (compare(thearray[i], thearray[lower]) < 0 )
-               swap++last,i);
-       swap(lower, last);
-       sort(compare, lower, last-1);
-       sort(compare, last+1, upper);
+           if (compare (thearray[i], thearray[lower]) < 0)
+               swap (++last,i);
+       swap (lower, last);
+       sort (compare, lower, last-1);
+       sort (compare, last+1, upper);
     }
-    void concat(Array<T> const &src) {
+    void concat (Array<T> const &src) {
        int s = size_;
-       set_size(size_ + src.size_);
-       arrcpy(thearray+s,src.thearray, src.size_);     
+       set_size (size_ + src.size_);
+       arrcpy (thearray+s,src.thearray, src.size_);    
     }
-    Array<T> slice(int lower, int upper) {
-       assert(lower >= 0 && lower <=upper&& upper <= size_);
+    Array<T> slice (int lower, int upper) {
+       assert (lower >= 0 && lower <=upper&& upper <= size_);
        Array<T> r;
        int s =upper-lower;
-       r.set_size(s);
-       arrcpy(r.thearray, thearray  + lower, s);
+       r.set_size (s);
+       arrcpy (r.thearray, thearray  + lower, s);
        return r;
     }
     void reverse() {
        int h = size_/2;
        for (int i =0,j = size_-1; i < h; i++,j--)
-           swap(i,j);
+           swap (i,j);
     }
 };
 
index 7f7573534498fdd125edccaf5a2dcaa51ece4187..2d2772336b10eb7d25e24e6a45be2cca4ce81800 100644 (file)
@@ -15,31 +15,31 @@ class Vector  {
     Array<Real> dat;
 public:
     void OK() const { dat.OK();}
-    int dim() const { return dat.size(); }
+    int dim() const { return dat.size (); }
     Vector() { }
-    Vector(Array<Real> d );
-    Vector(Vector const &n);
-    Vector(int n) {
-       dat.set_size(n);
-       fill(0);
+    Vector (Array<Real> d);
+    Vector (Vector const &n);
+    Vector (int n) {
+       dat.set_size (n);
+       fill (0);
     }
-    void set_dim(int i)
+    void set_dim (int i)
     {
-       dat.set_size(i);
+       dat.set_size (i);
     }
        
-    void insert(Real v, int i) {
-       dat.insert(v,i);
+    void insert (Real v, int i) {
+       dat.insert (v,i);
     }
-    void del(int i) { dat.del(i); }
+    void del (int i) { dat.del (i); }
     operator String() const;
-    void fill(Real r) {
+    void fill (Real r) {
        for (int i=0; i < dim(); i++)
            dat[i] =r;
     }
 
     void operator +=(Vector v) {
-       assert(v.dim() == dim());
+       assert (v.dim() == dim ());
        for (int i=0; i < dim(); i++)
            dat[i] += v.dat[i];
     }
@@ -54,32 +54,32 @@ public:
     }
 
     void operator -=(Vector v) {
-       assert(v.dim() == dim());
+       assert (v.dim() == dim ());
        for (int i=0; i < dim(); i++)
-           dat[i] -= v(i);     
+           dat[i] -= v (i);    
     }
 
     Real &operator()(int i) { return dat[i]; }
     Real operator()(int i) const { return dat[i]; }
-    Real elem(int i) { return dat[i]; }
+    Real elem (int i) { return dat[i]; }
     Real operator *(Vector v) const {
        Real ip=0;
-       assert(v.dim() == dim());
+       assert (v.dim() == dim ());
        for (int i=0; i < dim(); i++)
-           ip += dat[i] *v(i);
+           ip += dat[i] *v (i);
        return ip;
     }
     Vector operator-() const;
     Real norm() {
-       return sqrt(norm_sq() );
+       return sqrt (norm_sq());
     }
     Real norm_sq() {
        return ((*this) * (*this));
     }
-    operator Array<Real> () { return dat; }
+    operator Array<Real>() { return dat; }
     void print() const;
     /// set to j-th element of unit-base
-    void set_unit(int j) ;
+    void set_unit (int j) ;
 };
 
 inline Vector
index ceb12694e3ca0a8c832c8c6e10e504ab8045fd3f..e56496605d199bf526f0b037d53e9f87a920ac49 100644 (file)
 
 /** a macro to 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++
+  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(); } \
+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()
 
 #define IMPLEMENT_STATIC_NAME(c)\
@@ -38,22 +38,22 @@ int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out()
     
 #define IMPLEMENT_IS_TYPE_B(D)                                                            \
     IMPLEMENT_STATIC_NAME(D)\
-  bool D::static_is_type_b(const char *s)                                         \
+  bool D::static_is_type_b (const char *s)                                        \
 {                                                                                 \
     return s == static_name();                                                    \
 }                                                                                 
                                                                                   
 #define IMPLEMENT_IS_TYPE_B1(D,B)                                                 \
        IMPLEMENT_STATIC_NAME(D)\
-  bool D::static_is_type_b(const char *s)                                                 \
+  bool D::static_is_type_b (const char *s)                                                \
 {                                                                                 \
-    return s == static_name() || B::static_is_type_b(s);                                  \
+    return s == static_name() || B::static_is_type_b (s);                                 \
 }                                                                                 
 #define IMPLEMENT_IS_TYPE_B2(D, BA, BB)                                                   \
        IMPLEMENT_STATIC_NAME(D)\
-  bool D::static_is_type_b(const char *s)                                                 \
+  bool D::static_is_type_b (const char *s)                                                \
 {                                                                                 \
-    return s == static_name() || BA::static_is_type_b(s) || BB::static_is_type_b(s); \
+    return s == static_name() || BA::static_is_type_b (s) || BB::static_is_type_b (s); \
 }
 
 #endif 
index afffc2f4b2e2eb7a6b0b276f1e889c7a098d36c1..7ab4eb122b67299b09ef66edab0edb631bed641f 100644 (file)
@@ -13,8 +13,8 @@ Getopt_long::argument_to_i()
 {
     long l;
     if (!optional_argument_ch_C_ 
-       || sscanf(optional_argument_ch_C_, "%ld", &l) != 1)
-       report(E_ILLEGALARG);
+       || sscanf (optional_argument_ch_C_, "%ld", &l) != 1)
+       report (E_ILLEGALARG);
     
     return l;
 }
@@ -23,23 +23,23 @@ const Long_option_init *
 Getopt_long::parselong()
 {
     char const *optnm = arg_value_ch_a_a_[array_index_i_] + 2 ;
-    assert(*optnm);
+    assert (*optnm);
     
-    char const *endopt = strchr(optnm, '=');
-    int searchlen  = (endopt) ? endopt - optnm : strlen(optnm);
+    char const *endopt = strchr (optnm, '=');
+    int searchlen  = (endopt) ? endopt - optnm : strlen (optnm);
     
     found_option_l_=0;
     for (int i=0; i< table_len_i_; i++) {
        char const *ln = option_a_[i].longname;
 
-       if (ln && !strncmp(ln, optnm, searchlen)) {
+       if (ln && !strncmp (ln, optnm, searchlen)) {
            found_option_l_ = option_a_+i;
            break;
        }
     }  
 
     if (!found_option_l_) {
-       report(E_UNKNOWNOPTION);
+       report (E_UNKNOWNOPTION);
        return 0;
     }
     array_index_i_++;
@@ -54,12 +54,12 @@ Getopt_long::parselong()
            array_index_i_++;
        }
        if (!optional_argument_ch_C_)
-           report(E_ARGEXPECT);
+           report (E_ARGEXPECT);
 
     } else {
        optional_argument_ch_C_ = 0;
        if (endopt)
-           report(E_NOARGEXPECT);
+           report (E_NOARGEXPECT);
     }
     
     return found_option_l_;
@@ -67,7 +67,7 @@ Getopt_long::parselong()
 
 
 void
-Long_option_init::printon(ostream &errorout)const
+Long_option_init::printon (ostream &errorout)const
 {
     if (shortname)     
        errorout <<"-" << shortname;
@@ -79,7 +79,7 @@ Long_option_init::printon(ostream &errorout)const
 
 // report an error, GNU style.
 void
-Getopt_long::report(Errorcod c)
+Getopt_long::report (Errorcod c)
 {
     error_ = c;
     if (!error_ostream_l_)
@@ -89,7 +89,7 @@ Getopt_long::report(Errorcod c)
     switch (c) {
     case E_ARGEXPECT:
        *error_ostream_l_<< "option ";
-       found_option_l_->printon(*error_ostream_l_);
+       found_option_l_->printon (*error_ostream_l_);
        *error_ostream_l_ << "requires an argument"<<endl;
        break;
     case  E_NOARGEXPECT:
@@ -107,12 +107,12 @@ Getopt_long::report(Errorcod c)
        break;
     case E_ILLEGALARG:
        *error_ostream_l_ << "illegal argument `" << optional_argument_ch_C_ << "\'to option ";
-       found_option_l_->printon(*error_ostream_l_);
+       found_option_l_->printon (*error_ostream_l_);
        *error_ostream_l_ << '\n';
     default:
-       assert(false);
+       assert (false);
     }
-    exit(2); 
+    exit (2); 
 }
     
 const Long_option_init *
@@ -120,7 +120,7 @@ Getopt_long::parseshort()
 {
     char c=arg_value_ch_a_a_[array_index_i_][argument_index_i_];
     found_option_l_=0;
-    assert(c);
+    assert (c);
     
     for (int i=0; i < table_len_i_; i++)
        if (option_a_[i].shortname == c) {
@@ -129,7 +129,7 @@ Getopt_long::parseshort()
        }
 
     if (!found_option_l_){
-       report(E_UNKNOWNOPTION);
+       report (E_UNKNOWNOPTION);
        return 0;
     }
 
@@ -148,7 +148,7 @@ Getopt_long::parseshort()
        array_index_i_ ++;
     }
     if (!optional_argument_ch_C_) {
-       report(E_ARGEXPECT);
+       report (E_ARGEXPECT);
     }
     
     return found_option_l_;
@@ -171,7 +171,7 @@ Getopt_long::operator()()
        return 0;
 
     if (argument_C[1] == '-') {// what to do with "command  --  bla"
-       if ( argument_C[2] )
+       if ( argument_C[2])
            return parselong();
        else
            return 0;
@@ -185,7 +185,7 @@ Getopt_long::operator()()
     }
 }
 
-Getopt_long::Getopt_long(int c, char  **v, Long_option_init *lo)
+Getopt_long::Getopt_long (int c, char  **v, Long_option_init *lo)
 {
     option_a_ = lo;
     error_ostream_l_ = &cerr;
index 6e9a9b77a6eaa2f726a703d7b4294cfbb92cf674..c786a51efe456b41bf4e4406293cdbc11ce8f0bc 100644 (file)
 
 
 char* 
-strnlwrchar* start_l ,int n)
+strnlwr (char* start_l ,int n)
 {
     char * p = start_l + n;
     while ( --p >= start_l) {
-       *p = tolower( *p );    /* a macro on some compilers */
+       *p = tolower (*p);    /* a macro on some compilers */
     }
     return start_l;
 }
 
 char* 
-strnuprchar* start_l, int n)
+strnupr (char* start_l, int n)
 {
     char * p = start_l + n;
     while ( --p >= start_l) {
-       *p = toupper( *p );    /* a macro on some compilers */
+       *p = toupper (*p);    /* a macro on some compilers */
     }
     return start_l;
 }
@@ -39,7 +39,7 @@ strnupr( char* start_l, int n)
   */
 
 char *
-memmem(Byte const * haystack, int haystack_len,
+memmem (Byte const * haystack, int haystack_len,
        Byte const *needle,int needle_len)
 {
     Byte const * end_haystack = haystack + haystack_len - needle_len;
@@ -65,7 +65,7 @@ memmem(Byte const * haystack, int haystack_len,
 #endif
 
 Byte *
-memrchr(Byte const * p, int n, char c)
+memrchr (Byte const * p, int n, char c)
 {
     const    Byte * q = p+n;
     while (q > p) {
@@ -78,7 +78,7 @@ memrchr(Byte const * p, int n, char c)
 
 template<class T>
 inline void
-my_swap(T &t1, T &t2, T &tmp)
+my_swap (T &t1, T &t2, T &tmp)
 {
     tmp = t1;
     t1 = t2;
@@ -86,27 +86,27 @@ my_swap(T &t1, T &t2, T &tmp)
 }
 
 Byte*
-strrev( Byte* byte_l, int length_i )
+strrev (Byte* byte_l, int length_i)
 {
   Byte tmp_byte;
   
   Byte* left_l = byte_l;
   Byte* right_l = byte_l + length_i;
 
-  while ( right_l > left_l ) {
-      my_swap(*right_l-- , *left_l++ , tmp_byte);
+  while ( right_l > left_l) {
+      my_swap (*right_l-- , *left_l++ , tmp_byte);
   }
   return byte_l;
 }
 
 #if ! HAVE_SNPRINTF
 int snprintf ( char *str, size_t,
-              char const *format, ... )
+              char const *format, ...)
 {
     va_list ap;
-    va_start(ap, format);
-    int i = vsprintf(str, format, ap);
-    va_end(ap);
+    va_start (ap, format);
+    int i = vsprintf (str, format, ap);
+    va_end (ap);
     return i;
 }
 #endif
index 099a05beb9351fc2ef915fb903531313a7fc2aff..7126c1378ef9721b5f2cb72dbd6567cb663edf5f 100644 (file)
@@ -17,10 +17,10 @@ Matrix::operator String() const
     String s;
 #ifndef NPRINT
     Matrix_storage const * stor_c_l = dat;
-    s=String("matrix { (")  + dat->name() + ")\n";
+    s=String ("matrix { (")  + dat->name() + ")\n";
     for (int i=0; i< rows(); i++){
        for (int j = 0; j < cols(); j++) {
-           s+= String(stor_c_l->elem(i,j), "%6f ");
+           s+= String (stor_c_l->elem (i,j), "%6f ");
        }
        s+="\n";
     }
@@ -44,7 +44,7 @@ Vector::operator String() const
 #ifndef NPRINT
     s="vector [";
     for (int i=0; i < dim(); i++) {
-       s += String(dat[i], "%6f") + String(' ');
+       s += String (dat[i], "%6f") + String (' ');
     }
     s+="]";
 #endif
index 54deb7d673145f66f8bf7a518ed608e756f00cbc..5ebc0e9072010dbc4187052136c532ae4e84c185 100644 (file)
 #include "diagonal-storage.hh"
 
 void
-Matrix_storage::set_addition_result(Matrix_storage *&dat, Matrix_storage *right)
+Matrix_storage::set_addition_result (Matrix_storage *&dat, Matrix_storage *right)
 {
-    if (dat && dat->name() == Diagonal_storage::static_name() 
-        && right->name() == Diagonal_storage::static_name()) {
+    if (dat && dat->name() == Diagonal_storage::static_name () 
+        && right->name() == Diagonal_storage::static_name ()) {
        Diagonal_storage *L = (Diagonal_storage*)dat;
        Diagonal_storage* R = (Diagonal_storage*) right;
 
-       if ( R->band_size_i() > L->band_size_i()) { 
-           L->set_band_size(R->band_size_i());
+       if ( R->band_size_i() > L->band_size_i ()) { 
+           L->set_band_size (R->band_size_i());
        }
            return ;
     }
-    if  (!dat || !dat->is_type_b(Full_storage::static_name() )) {
+    if  (!dat || !dat->is_type_b (Full_storage::static_name())) {
 
-       Matrix_storage *new_stor = (dat)? new Full_storage(dat) : 
-           new Full_storage( right->rows(), right->cols());
+       Matrix_storage *new_stor = (dat)? new Full_storage (dat) : 
+           new Full_storage (right->rows(), right->cols ());
        delete dat;
        dat = new_stor;
     }
 }
 
 Matrix_storage*
-Matrix_storage::get_product_result(Matrix_storage*left, Matrix_storage*right)
+Matrix_storage::get_product_result (Matrix_storage*left, Matrix_storage*right)
 {
     Matrix_storage* dest =0;
-    set_product_result(dest, left,right);
+    set_product_result (dest, left,right);
     return dest;
 }
     
@@ -44,96 +44,96 @@ Matrix_storage::get_product_result(Matrix_storage*left, Matrix_storage*right)
   hairy
  */
 void
-Matrix_storage::set_product_result(Matrix_storage*&dest, 
+Matrix_storage::set_product_result (Matrix_storage*&dest, 
                           Matrix_storage*left, Matrix_storage*right)
 {
-    if ( left->name() == Diagonal_storage::static_name() 
-        && right->name() == Diagonal_storage::static_name()) {
+    if ( left->name() == Diagonal_storage::static_name () 
+        && right->name() == Diagonal_storage::static_name ()) {
        Diagonal_storage *L = (Diagonal_storage*)left;
        Diagonal_storage* R = (Diagonal_storage*) right;
 
-       if  (L->band_size_i() + R->band_size_i() < L->dim()/2 ) {
-           if (dest ->name() != Diagonal_storage::static_name()){
+       if  (L->band_size_i() + R->band_size_i () < L->dim ()/2) {
+           if (dest ->name() != Diagonal_storage::static_name ()){
                delete dest;
                dest = new Diagonal_storage;
            }
         
-           dest->set_size(L->dim());
+           dest->set_size (L->dim());
            return;
        }
     }
 
-    if ( dest && dest->name() == Full_storage::static_name()) {
-       dest->set_size(left->rows(), right->cols());
+    if ( dest && dest->name() == Full_storage::static_name ()) {
+       dest->set_size (left->rows(), right->cols ());
     } else {
        delete dest;
-       dest = new Full_storage( left->rows(), right->cols());
+       dest = new Full_storage (left->rows(), right->cols ());
     }
 }
 
 IMPLEMENT_IS_TYPE_B(Matrix_storage);
 
 Matrix_storage *
-Matrix_storage::get_full(int n, int m)
+Matrix_storage::get_full (int n, int m)
 {
-    return new Full_storage(n,m);
+    return new Full_storage (n,m);
 }
 
 
 
  bool
-Matrix_storage::try_right_multiply(Matrix_storage *, 
+Matrix_storage::try_right_multiply (Matrix_storage *, 
                                   const Matrix_storage *)const
 {
     return false;
 }
 
 Array<Real>
-Matrix_storage::row(int n) const
+Matrix_storage::row (int n) const
 {
     Array<Real> r;
     for (int j = 0; j < cols(); j++)
-       r.push(elem(n,j));
+       r.push (elem (n,j));
     return r;
 }
 
 Array<Real>
-Matrix_storage::column(int n) const
+Matrix_storage::column (int n) const
 {
     Array<Real> r;
     for (int i = 0; i < rows(); i++)
-       r.push(elem(i,n));
+       r.push (elem (i,n));
     return r;
 }
 
 void
-Matrix_storage::set_size(int rows, int cols)
+Matrix_storage::set_size (int rows, int cols)
 {
         
-    resize(rows,cols);
+    resize (rows,cols);
 }
        
 void
-Matrix_storage::set_size(int rows)
+Matrix_storage::set_size (int rows)
 {
         
-       resize(rows);
+       resize (rows);
 }
        
 
 void
-Matrix_storage::set_band(Matrix_storage *&mat, int b)
+Matrix_storage::set_band (Matrix_storage *&mat, int b)
 {
-    Matrix_storage* ns = new Diagonal_storage(mat, b);
+    Matrix_storage* ns = new Diagonal_storage (mat, b);
     delete mat;
     mat=ns;
 }
        
 
 void
-Matrix_storage::set_full(Matrix_storage *&mat)
+Matrix_storage::set_full (Matrix_storage *&mat)
 {
-    Matrix_storage* ns = new Full_storage(mat);
+    Matrix_storage* ns = new Full_storage (mat);
     delete mat;
     mat=ns;
 }
index 7e1854827b223149729514389bb4d261e13f5833..fdb6085f7cd7d733d44b3072273008cf51067d32 100644 (file)
 bool
 Matrix::band_b()const
 {
-    return dat->is_type_bDiagonal_storage::static_name());
+    return dat->is_type_b (Diagonal_storage::static_name());
 }
 
 void
 Matrix::set_full() const
 {
-    if ( dat->name() != Full_storage::static_name()) {
-       Matrix_storage::set_full( ((Matrix*)this)->dat );
+    if ( dat->name() != Full_storage::static_name ()) {
+       Matrix_storage::set_full (((Matrix*)this)->dat);
     }
 }
 
@@ -35,65 +35,65 @@ Matrix::try_set_band()const
        return;
     // it only looks constant
     Matrix*self  = (Matrix*)this;
-    Matrix_storage::set_band(self->dat,b);
+    Matrix_storage::set_band (self->dat,b);
 }
 
 Real
 Matrix::norm() const
 {
     Real r =0.0;
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))
-       r += sqr(dat->elem(i,j));
-    return sqrt(r);
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j))
+       r += sqr (dat->elem (i,j));
+    return sqrt (r);
 }
 
 void
-Matrix::fill(Real r)
+Matrix::fill (Real r)
 {
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))
-       dat->elem(i,j)=r;
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j))
+       dat->elem (i,j)=r;
 }
 
 void
-Matrix::set_diag(Real r)
+Matrix::set_diag (Real r)
 {
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))   
-       dat->elem(i,j)=(i==j) ? r: 0.0;
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j))         
+       dat->elem (i,j)=(i==j) ? r: 0.0;
 }
 
 void
-Matrix::set_diag(Vector d)
+Matrix::set_diag (Vector d)
 {
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))   
-       dat->elem(i,j)=(i==j) ? d(i): 0.0;
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j))         
+       dat->elem (i,j)=(i==j) ? d (i): 0.0;
 }
 
 void
 Matrix::operator+=(Matrix const &m)
 {
-    Matrix_storage::set_addition_result(dat, m.dat);
-    assert(m.cols() == cols());
-    assert(m.rows() == rows());
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))
-       dat->elem(i,j) += m(i,j);
+    Matrix_storage::set_addition_result (dat, m.dat);
+    assert (m.cols() == cols ());
+    assert (m.rows() == rows ());
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j))
+       dat->elem (i,j) += m (i,j);
 }
  
 void
 Matrix::operator-=(Matrix const &m)
 {
-    Matrix_storage::set_addition_result(dat, m.dat);
-    assert(m.cols() == cols());
-    assert(m.rows() == rows());
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))
-       dat->elem(i,j) -= m(i,j);
+    Matrix_storage::set_addition_result (dat, m.dat);
+    assert (m.cols() == cols ());
+    assert (m.rows() == rows ());
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j))
+       dat->elem (i,j) -= m (i,j);
 }
 
 
 void
 Matrix::operator*=(Real a)
 {
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))
-       dat->elem(i,j) *= a;
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j))
+       dat->elem (i,j) *= a;
 }
 
 void
@@ -108,17 +108,17 @@ Matrix::operator=(Matrix const &m)
 int
 Matrix::band_i()const
 {
-    if ( band_b() ) {
+    if ( band_b()) {
        Diagonal_storage const * diag = (Diagonal_storage*) dat;
        return diag->band_size_i();
     }
     int starty = dim();
-    while (starty >= 0 ) {
-       for ( int i = starty, j = 0; i < dim(); i++, j++ )
-           if (dat->elem( i,j ))
+    while (starty >= 0) {
+       for ( int i = starty, j = 0; i < dim(); i++, j++)
+           if (dat->elem (i,j))
                goto gotcha;
        for ( int i=0, j = starty; j < dim(); i++,j++)
-           if (dat->elem(i,j))
+           if (dat->elem (i,j))
                goto gotcha;
        starty --;
     }
@@ -126,7 +126,7 @@ gotcha:
     return  starty;
 }
     
-Matrix::Matrix(Matrix const &m)
+Matrix::Matrix (Matrix const &m)
 {
     m.OK();
     
@@ -134,78 +134,78 @@ Matrix::Matrix(Matrix const &m)
 }
 
 
-Matrix::Matrix(int n, int m)
+Matrix::Matrix (int n, int m)
 {
-    dat = Matrix_storage::get_full(n,m);
-    fill(0);
+    dat = Matrix_storage::get_full (n,m);
+    fill (0);
 }
 
-Matrix::Matrix(Matrix_storage*stor_p)
+Matrix::Matrix (Matrix_storage*stor_p)
 {
     dat = stor_p;
 }
 
-Matrix::Matrix(int n)
+Matrix::Matrix (int n)
 {
-    dat = Matrix_storage::get_full(n,n);
-    fill(0);
+    dat = Matrix_storage::get_full (n,n);
+    fill (0);
 }
 
-Matrix::Matrix(Vector v, Vector w)
+Matrix::Matrix (Vector v, Vector w)
 {   
-    dat = Matrix_storage::get_full(v.dim(), w.dim());
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))
-       dat->elem(i,j)=v(i)*w(j);
+    dat = Matrix_storage::get_full (v.dim(), w.dim ());
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j))
+       dat->elem (i,j)=v (i)*w (j);
 }
 
 
 Vector
-Matrix::row(int k) const
+Matrix::row (int k) const
 {
     int n=cols();
 
     
-    Vector v(n);
-    for(int i=0; i < n; i++)
-       v(i)=dat->elem(k,i);
+    Vector v (n);
+    for (int i=0; i < n; i++)
+       v (i)=dat->elem (k,i);
 
     return v;
 }
 
 Vector
-Matrix::col(int k) const
+Matrix::col (int k) const
 {
     int n=rows();
-    Vector v(n);
-    for(int i=0; i < n; i++)
-       v(i)=dat->elem(i,k);
+    Vector v (n);
+    for (int i=0; i < n; i++)
+       v (i)=dat->elem (i,k);
     return v;
 }
 
 Vector
-Matrix::left_multiply(Vector const & v) const
+Matrix::left_multiply (Vector const & v) const
 {
-     Vector dest(v.dim());
-    assert(dat->cols()==v.dim());
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))
-       dest(i)+= dat->elem(j,i)*v(j);
+     Vector dest (v.dim());
+    assert (dat->cols()==v.dim ());
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j))
+       dest (i)+= dat->elem (j,i)*v (j);
     return dest;
 }
 
 Vector
 Matrix::operator *(Vector const & v) const
 {
-    Vector dest(rows());
-    assert(dat->cols()==v.dim());
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j))
-       dest(i)+= dat->elem(i,j)*v(j);
+    Vector dest (rows());
+    assert (dat->cols()==v.dim ());
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j))
+       dest (i)+= dat->elem (i,j)*v (j);
     return dest;
 }
 
 Matrix
 operator /(Matrix const& m1,Real a)
 {
-    Matrix m(m1);
+    Matrix m (m1);
     m /= a;
     return  m;
 }
@@ -217,12 +217,12 @@ void
 Matrix::transpose()            // delegate to storage?
 {
 #if 1
-    for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j)) {
+    for (int i=0, j=0; dat->mult_ok (i,j); dat->mult_next (i,j)) {
        if (i >= j)
            continue;
-       Real r=dat->elem(i,j);
-       dat->elem(i,j) = dat->elem(j,i);
-       dat->elem(j,i)=r;
+       Real r=dat->elem (i,j);
+       dat->elem (i,j) = dat->elem (j,i);
+       dat->elem (j,i)=r;
     }
 #endif
 }
@@ -231,7 +231,7 @@ Matrix
 Matrix::operator-() const
 {
     OK();
-    Matrix m(*this);
+    Matrix m (*this);
     m*=-1.0;    
     return m;
 }
@@ -239,7 +239,7 @@ Matrix::operator-() const
 Matrix
 Matrix::transposed() const
 {
-    Matrix m(*this);
+    Matrix m (*this);
     m.transpose();
     return m;
 }
@@ -247,62 +247,62 @@ Matrix::transposed() const
 Matrix
 operator *(Matrix const &m1, Matrix const &m2)
 {
-    Matrix result(Matrix_storage::get_product_result(m1.dat, m2.dat));
+    Matrix result (Matrix_storage::get_product_result (m1.dat, m2.dat));
 
-    result.set_product(m1,m2);
+    result.set_product (m1,m2);
     return result;
 }
 
 void
-Matrix::set_product(Matrix const &m1, Matrix const &m2)
+Matrix::set_product (Matrix const &m1, Matrix const &m2)
 {
-    assert(m1.cols()==m2.rows());
-    assert(cols()==m2.cols() && rows()==m1.rows());
+    assert (m1.cols()==m2.rows ());
+    assert (cols()==m2.cols () && rows ()==m1.rows ());
     
-    if (m1.dat->try_right_multiply(dat, m2.dat))
+    if (m1.dat->try_right_multiply (dat, m2.dat))
        return; 
     
-    for (int i=0, j=0; dat->mult_ok(i,j);
-        dat->mult_next(i,j)) {
+    for (int i=0, j=0; dat->mult_ok (i,j);
+        dat->mult_next (i,j)) {
        Real r=0.0;
        for (int k = 0; k < m1.cols(); k++)
            r += m1(i,k)*m2(k,j);
-       dat->elem(i,j)=r;
+       dat->elem (i,j)=r;
     }
 }
 
 void
-Matrix::insert_row(Vector v, int k)
+Matrix::insert_row (Vector v, int k)
 {
     int c = cols();
-    assert(v.dim()==cols());
-    dat->insert_row(k);
+    assert (v.dim()==cols ());
+    dat->insert_row (k);
     for (int j=0; j < c; j++)
-       dat->elem(k,j)=v(j);
+       dat->elem (k,j)=v (j);
 }
 
 
 void
-Matrix::swap_columns(int c1, int c2)
+Matrix::swap_columns (int c1, int c2)
 {
-    assert(c1>=0&& c1 < cols()&&c2 < cols() && c2 >=0);
+    assert (c1>=0&& c1 < cols()&&c2 < cols () && c2 >=0);
     int r = rows();
     for (int i=0; i< r; i++) {
-       Real r=dat->elem(i,c1);
-       dat->elem(i,c1) = dat->elem(i,c2);
-       dat->elem(i,c2)=r;
+       Real r=dat->elem (i,c1);
+       dat->elem (i,c1) = dat->elem (i,c2);
+       dat->elem (i,c2)=r;
     }
 }
 
 void
-Matrix::swap_rows(int c1, int c2)
+Matrix::swap_rows (int c1, int c2)
 {
-    assert(c1>=0&& c1 < rows()&&c2 < rows() && c2 >=0);
+    assert (c1>=0&& c1 < rows()&&c2 < rows () && c2 >=0);
     int c = cols();
     for (int i=0; i< c; i++) {
-       Real r=dat->elem(c1,i);
-       dat->elem(c1,i) = dat->elem(c2,i);
-       dat->elem(c2,i)=r;
+       Real r=dat->elem (c1,i);
+       dat->elem (c1,i) = dat->elem (c2,i);
+       dat->elem (c2,i)=r;
     }
 }
 
@@ -310,7 +310,7 @@ Matrix::swap_rows(int c1, int c2)
 int
 Matrix::dim() const
 {
-    assert(cols() == rows());
+    assert (cols() == rows ());
     return rows();
 }
 
index b1056c2430ad8f5004ccb24c01c0de72d6c779be..5b36be916cbbb29e617ec28424fccf6b2d60e4c4 100644 (file)
@@ -10,9 +10,9 @@
 #include "string.hh"
 
 void
-print_rat(Rational const &m)
+print_rat (Rational const &m)
 {
-    cout << String(m) << flush;
+    cout << String (m) << flush;
 }
     
 
index da86835063c1c8e67f161fbbf9a7eed67486ace0..1a5e54ec27c3104af75f087dfe656b436653ca3c 100644 (file)
@@ -2,22 +2,22 @@
 #include <stdio.h>
 #include "scalar.hh"
 
-Scalar::Scalar(Rational r)
-    :String(r)
+Scalar::Scalar (Rational r)
+    :String (r)
 {
 
 }
 
 Scalar::operator Rational()
 {
-    int p = index_i('/');
+    int p = index_i ('/');
     if (p == -1)
-       return int(*this);
+       return int (*this);
     
-    String s2 = right_str(len()-p-1);
-    String s1 = left_str(p);
+    String s2 = right_str (len()-p-1);
+    String s1 = left_str (p);
 
-    return Rational(s1.value_i(), s2.value_i());
+    return Rational (s1.value_i(), s2.value_i ());
 }
 
 bool
@@ -26,7 +26,7 @@ Scalar::isnum()
     int conv = false;
     if (len()) {
        long l =0;
-       conv = sscanf(strh_.ch_C(), "%ld", &l);
+       conv = sscanf (strh_.ch_C(), "%ld", &l);
     }
     return len() && conv;
 }
index d1a9fe05750a58d83c453cbc5666c6837fcc6ab3..2f5ab5bfa366fc1026a77b3d2ac4c3ed1a7e477d 100644 (file)
 static const int STRING_BUFFER_LEN=1024;
 
 String
-String_convert::bin2hex_str( String bin_str )
+String_convert::bin2hex_str (String bin_str)
 {
     String str;
     Byte const* byte_C = bin_str.byte_C();
-    for ( int i = 0; i < bin_str.length_i(); i++ ) {
-       str += (char)nibble2hex_byte( *byte_C >> 4 );
-       str += (char)nibble2hex_byte( *byte_C++ );
+    for ( int i = 0; i < bin_str.length_i(); i++) {
+       str += (char)nibble2hex_byte (*byte_C >> 4);
+       str += (char)nibble2hex_byte (*byte_C++);
     }
     return str;
 }
 
 int
-String_convert::bin2_i( String bin_str )
+String_convert::bin2_i (String bin_str)
 {
-    assert( bin_str.length_i() <= 4 );
+    assert (bin_str.length_i() <= 4);
 
     int result_i = 0;
-    for ( int i = 0; i < bin_str.length_i(); i++ ) {
+    for ( int i = 0; i < bin_str.length_i(); i++) {
        result_i <<= 8;
        result_i += (Byte)bin_str[ i ];
     }
@@ -51,76 +51,76 @@ String_convert::bin2_i( String bin_str )
 
 // breendet imp from String
 int
-String_convert::dec2_i( String dec_str )
+String_convert::dec2_i (String dec_str)
 {
-    if ( !dec_str.length_i() )
+    if ( !dec_str.length_i())
        return 0;
 
     long l = 0;
-    int conv = sscanf( dec_str.ch_C(), "%ld", &l );
-    assert( conv );
+    int conv = sscanf (dec_str.ch_C(), "%ld", &l);
+    assert (conv);
 
     return (int)l;
 }
 
 String
-String_convert::i64_strI64 i64, char const* fmt)
+String_convert::i64_str (I64 i64, char const* fmt)
 {
     char buffer[STRING_BUFFER_LEN];
-    snprintf(buffer, STRING_BUFFER_LEN,
-            (fmt ? fmt : "%Ld"), i64 );     // assume radix 10
-    return String(buffer);
+    snprintf (buffer, STRING_BUFFER_LEN,
+            (fmt ? fmt : "%Ld"), i64);     // assume radix 10
+    return String (buffer);
 
 }
 // breendet imp from String
 double
-String_convert::dec2_f( String dec_str )
+String_convert::dec2_f (String dec_str)
 {
-    if ( !dec_str.length_i() )
+    if ( !dec_str.length_i())
        return 0;
     double d = 0;
-    int conv = sscanf( dec_str.ch_C(), "%lf", &d );
-    assert( conv );
+    int conv = sscanf (dec_str.ch_C(), "%lf", &d);
+    assert (conv);
     return d;
 }
 
 int
-String_convert::hex2bin_i( String hex_str, String& bin_str_r )
+String_convert::hex2bin_i (String hex_str, String& bin_str_r)
 {
-    if ( hex_str.length_i() % 2 )
+    if ( hex_str.length_i() % 2)
         hex_str = "0" + hex_str;
 
     bin_str_r = "";
     Byte const* byte_C= hex_str.byte_C();
     int i = 0;
-    while ( i < hex_str.length_i() ) {   
-        int high_i = hex2nibble_i( *byte_C++ );
-        int low_i = hex2nibble_i( *byte_C++ );
-        if ( high_i < 0 || low_i < 0 )
+    while ( i < hex_str.length_i()) {   
+        int high_i = hex2nibble_i (*byte_C++);
+        int low_i = hex2nibble_i (*byte_C++);
+        if ( high_i < 0 || low_i < 0)
             return 1; // illegal char
-        bin_str_r += String( (char)( high_i << 4 | low_i ), 1 );
+        bin_str_r += String ((char)( high_i << 4 | low_i), 1 );
         i += 2;
     }
     return 0;
 }
 
 String 
-String_convert::hex2bin_str( String hex_str )
+String_convert::hex2bin_str (String hex_str)
 {
     String str;
 //  silly, asserts should alway be "on"!
-//    assert( !hex2bin_i( hex_str, str ) );
-    int error_i = hex2bin_i( hex_str, str );
-    assert( !error_i );
+//    assert (!hex2bin_i (hex_str, str) );
+    int error_i = hex2bin_i (hex_str, str);
+    assert (!error_i);
     return str;
 }
 
 int 
-String_convert::hex2nibble_i( Byte byte )
+String_convert::hex2nibble_i (Byte byte)
 {
-    if ( byte >= '0' && byte <= '9' )
+    if ( byte >= '0' && byte <= '9')
         return byte - '0';
-    if ( byte >= 'A' && byte <= 'F' )
+    if ( byte >= 'A' && byte <= 'F')
         return byte - 'A' + 10;
     if ( byte >= 'a' && byte <= 'f')
         return byte - 'a' + 10;
@@ -129,57 +129,57 @@ String_convert::hex2nibble_i( Byte byte )
 
 // stupido.  Should use int_str()
 String 
-String_convert::i2dec_str( int i, int length_i, char ch )
+String_convert::i2dec_str (int i, int length_i, char ch)
 {
     char fill_ch = ch;
     if ( fill_ch)
         fill_ch = '0';
 
     // ugh
-    String dec_str( i );
+    String dec_str (i);
     
     // ugh
-    return String( fill_ch, length_i - dec_str.length_i() ) + dec_str;
+    return String (fill_ch, length_i - dec_str.length_i()) + dec_str;
 }
 
 
 // stupido.  Should use int_str()
 String 
-String_convert::u2hex_str( unsigned u, int length_i, char fill_ch )
+String_convert::u2hex_str (unsigned u, int length_i, char fill_ch)
 {
     String str;
-    if ( !u )
+    if ( !u)
        str = "0";
 
 #if 1 // both go...
-    while ( u ) {
-       str = String( (char)( ( u % 16 )["0123456789abcdef"] ) ) + str;
+    while ( u) {
+       str = String ((char)( ( u % 16)["0123456789abcdef"] ) ) + str;
        u /= 16;
     }
 #else
-    str += int_str( u, "%x" ); // hmm. %lx vs. %x -> portability?
+    str += int_str (u, "%x");  // hmm. %lx vs. %x -> portability?
 #endif
 
-    str = String( fill_ch, length_i - str.length_i() ) + str;
-    while ( ( str.length_i() > length_i ) &&  ( str[ 0 ] == 'f' ) )
-       str = str.mid_str( 2, INT_MAX );
+    str = String (fill_ch, length_i - str.length_i()) + str;
+    while ( ( str.length_i() > length_i) &&  ( str[ 0 ] == 'f' ) )
+       str = str.mid_str (2, INT_MAX);
 
     return str;
 }
 
 String 
-String_convert::i2hex_str( int i, int length_i, char fill_ch )
+String_convert::i2hex_str (int i, int length_i, char fill_ch)
 {
-    return u2hex_str( (unsigned)i, length_i, fill_ch );
+    return u2hex_str ((unsigned)i, length_i, fill_ch);
 }
 
 Byte
-String_convert::nibble2hex_byte( Byte byte )
+String_convert::nibble2hex_byte (Byte byte)
 {
-    if ( ( byte & 0x0f ) <= 9 )
-       return ( byte & 0x0f ) + '0';
+    if ( ( byte & 0x0f) <= 9 )
+       return ( byte & 0x0f) + '0';
     else
-       return ( byte & 0x0f ) - 10 + 'a';
+       return ( byte & 0x0f) - 10 + 'a';
 }
 /**
   Convert an integer to a string
@@ -188,12 +188,12 @@ String_convert::nibble2hex_byte( Byte byte )
   #fmt# is a printf style format, default assumes "%d" as format. 
   */
 String
-String_convert::int_str(int i, char const* fmt)
+String_convert::int_str (int i, char const* fmt)
 {
     char buffer[STRING_BUFFER_LEN];
-    snprintf(buffer, STRING_BUFFER_LEN,
-            (fmt ? fmt : "%d"), i );     // assume radix 10
-    return String(buffer);
+    snprintf (buffer, STRING_BUFFER_LEN,
+            (fmt ? fmt : "%d"), i);     // assume radix 10
+    return String (buffer);
 }
 
 /**
@@ -202,12 +202,12 @@ String_convert::int_str(int i, char const* fmt)
   @param #fmt# is a printf style format, default assumes "%lf" as format
  */
 String
-String_convert::double_str(double f, char const* fmt)
+String_convert::double_str (double f, char const* fmt)
 {
     char buf[STRING_BUFFER_LEN]; 
 
-    snprintf(buf, STRING_BUFFER_LEN, fmt ? fmt : "%f", f);
-    return String(buf);
+    snprintf (buf, STRING_BUFFER_LEN, fmt ? fmt : "%f", f);
+    return String (buf);
 }
 
 /**
@@ -217,25 +217,25 @@ String_convert::double_str(double f, char const* fmt)
     #n# is a repetition count, default value is 1
  */
 String
-String_convert::char_str(char c, int n)
+String_convert::char_str (char c, int n)
 {
     n = n >= 0 ? n : 0;
     char* ch_p = new char[ n ];
-    memset( ch_p, c, n );
-    String s((Byte*)ch_p, n);
+    memset (ch_p, c, n);
+    String s ((Byte*)ch_p, n);
     delete ch_p;
     return s;
 }
 
 String
-String_convert::rational_str(Rational r)
+String_convert::rational_str (Rational r)
 {
-    char * n = Itoa(r.numerator()); // LEAK????
+    char * n = Itoa (r.numerator()); // LEAK????
     
     String s = n;
     if (r.denominator() != 1) {
-       char * d = Itoa(r.denominator());
-       s +=  String( '/' ) + String(d);
+       char * d = Itoa (r.denominator());
+       s +=  String ('/') + String (d);
        //delete d;
     }
 /*    delete n;
@@ -244,9 +244,9 @@ String_convert::rational_str(Rational r)
 }
 
 String
-String_convert::pointer_str(void const *l)
+String_convert::pointer_str (void const *l)
 {
     char buffer[STRING_BUFFER_LEN];
-    snprintf(buffer, STRING_BUFFER_LEN, "%p", l );     // assume radix 10
-    return String(buffer);
+    snprintf (buffer, STRING_BUFFER_LEN, "%p", l);     // assume radix 10
+    return String (buffer);
 }
index d66951c93158e20c9238727308c88f6d7bb504ae..1bd236114ca75b97857a6c0094c50e585d5def0c 100644 (file)
@@ -17,7 +17,7 @@
 #include "string-convert.hh"
 
 #ifdef STRING_DEBUG
-void* mymemmove( void* dest, void const* src, size_t n );
+void* mymemmove (void* dest, void const* src, size_t n);
 #define memmove mymemmove
 #endif
 
@@ -27,16 +27,16 @@ String::copy_byte_p() const
 {
     Byte const* src = strh_.byte_C();
     Byte* dest = new Byte[strh_.length_i() + 1];
-    memcpy( dest, src, strh_.length_i() + 1 );
+    memcpy (dest, src, strh_.length_i() + 1);
     return dest;    
 }
 void
-String::print_on(ostream& os) const
+String::print_on (ostream& os) const
 {
     if (!strh_.is_binary_bo())
         os << ch_C();
     else
-       for ( int i = 0; i < length_i(); i++ )
+       for ( int i = 0; i < length_i(); i++)
            os << (Byte)(*this)[ i ];
 }
 \f
@@ -44,24 +44,24 @@ String::print_on(ostream& os) const
   copying, constructing.
  */
 String&
-String::operator = (String const&source )
+String::operator = (String const&source)
 {
     strh_ = source.strh_;
     return *this;
 }
 
 
-String::String(Rational r)
+String::String (Rational r)
 {
-    *this = String_convert::rational_str(r);
+    *this = String_convert::rational_str (r);
 }
 
 String::String (double f, char const* fmt)
 {
-    *this= String_convert::double_str(f,fmt);
+    *this= String_convert::double_str (f,fmt);
 }
 
-String::String( char c,  int n )
+String::String (char c,  int n)
 {
     *this = String_convert::char_str (c,n);
 }
@@ -70,40 +70,40 @@ String::String( char c,  int n )
   @see
   String_convert::int_str
  */
-String::String(int i, char const * format )
+String::String (int i, char const * format)
 {
-    *this = String_convert::int_str(i,format);
+    *this = String_convert::int_str (i,format);
 }
 
 String::String (bool b)
 {
-    *this = (char const* ) (b ? "true" : "false");
+    *this = (char const*) (b ? "true" : "false");
 }
 
-String::String( char const* source )
+String::String (char const* source)
 {   
-    assert(source);    
+    assert (source);    
     strh_ = source;    
 }
 
-String::String( Byte const* byte_l, int length_i )
+String::String (Byte const* byte_l, int length_i)
 {   
-    strh_.set( byte_l, length_i );    
+    strh_.set (byte_l, length_i);    
 }
 \f
 void
-String::append(String s)
+String::append (String s)
 {
-    strh_.append( s.byte_C(), s.length_i() );
+    strh_.append (s.byte_C(), s.length_i());
 }
 void
 String::operator +=(String s)
 {
-    append(s);
+    append (s);
 }
 
 void
-String::prepend(String s)
+String::prepend (String s)
 {
     s += *this;
     *this = s;
@@ -143,50 +143,50 @@ String::ch_l()
   Do a signed comparison,  analogous to memcmp;
  */
 int
-String::compare_i(String const& s1, String const& s2 
+String::compare_i (String const& s1, String const& s2
 {
     Byte const* p1 = s1.byte_C();
     Byte const* p2 = s2.byte_C();
-    if ( p1 == p2 )
+    if ( p1 == p2)
        return 0;
 
     int i1 = s1.length_i();
     int i2 = s2.length_i();
 
-    int result=  memcmp( p1, p2, i1 <? i2 );
+    int result=  memcmp (p1, p2, i1 <? i2);
     return result ? result : i1-i2;
 }
 
 \f
 int
-String::index_last_i( char const c ) const
+String::index_last_i (char const c) const
 {
-    if ( !length_i() 
+    if ( !length_i()) 
        return -1;
 
     char const* me = strh_.ch_C();
-    char const* p = memrchr(me, length_i(), c );
-    if ( p )
+    char const* p = memrchr (me, length_i(), c);
+    if ( p)
        return p - me;
     return -1;
 }
 
 int
-String::index_last_i( char const* string ) const // UGK!
+String::index_last_i (char const* string) const // UGK!
 {
-    assert(false);             // broken
-    int length = strlen( string ); // ugrh
-    if ( !length_i() || !length 
+    assert (false);            // broken
+    int length = strlen (string); // ugrh
+    if ( !length_i() || !length) 
        return -1;
     
-    int next_i = index_i( string );
-    if ( next_i == -1 )
+    int next_i = index_i (string);
+    if ( next_i == -1)
        return -1;
     
     int index_i = 0;
-    while( next_i >= 0 ) {
+    while (next_i >= 0) {
        index_i += next_i;
-       next_i = right_str( length_i() - index_i - length ).index_i( string );
+       next_i = right_str (length_i() - index_i - length).index_i (string );
     }
     return index_i;
 }
@@ -197,14 +197,14 @@ String::index_last_i( char const* string ) const // UGK!
   the index of the leftmost character #c# (0 <= return < length_i()),
   or   -1 if not found. 
 
-  ? should return length_i()?, as in string.left_str(index_i(delimiter))
+  ? should return length_i()?, as in string.left_str (index_i (delimiter))
 */
 int
-String::index_i(char c ) const
+String::index_i (char c) const
 {
     char const* me = strh_.ch_C();
-    char const* p = (char const *) memchrme,c,  length_i());
-    if ( p )
+    char const* p = (char const *) memchr (me,c,  length_i());
+    if ( p)
        return p - me;
     return -1;
 }
@@ -216,13 +216,13 @@ String::index_i(char c ) const
   index of leftmost occurrence of #searchfor#
  */
 int
-String::index_i( String searchfor ) const
+String::index_i (String searchfor) const
 {
     char const* me = strh_.ch_C();
-    char const* p = (char const *) memmem(
-       me, length_i(), searchfor.ch_C(), searchfor.length_i());
+    char const* p = (char const *) memmem (
+       me, length_i(), searchfor.ch_C(), searchfor.length_i ());
     
-    if ( p )
+    if ( p)
        return p - me;
     else
        return -1;
@@ -234,15 +234,15 @@ String::index_i( String searchfor ) const
   the index of the leftmost occurance of an element of #set#
   */
 int
-String::index_any_i( String set ) const
+String::index_any_i (String set) const
 {
     int n = length_i();
-    if ( !n )
+    if ( !n)
        return -1;
 
     void const * me_l = (void const *) strh_.ch_C();
     for (int i=0; i  < set.length_i(); i++) {
-       char * found=(char*) memchr(me_l, set[i], n  );
+       char * found=(char*) memchr (me_l, set[i], n );
        if (found) {
            return found - me_l;
        }
@@ -251,7 +251,7 @@ String::index_any_i( String set ) const
 }
 \f
 String
-String::left_str( int n ) const
+String::left_str (int n) const
 {
     if (n >= length_i())
        return *this;
@@ -261,12 +261,12 @@ String::left_str( int n ) const
         return retval;
     
     retval = *this;
-    retval.strh_.trunc(n);
+    retval.strh_.trunc (n);
     return retval;
 }
 
 String
-String::right_str( int n ) const
+String::right_str (int n) const
 {
     if (n > length_i())
        return *this;
@@ -274,14 +274,14 @@ String::right_str( int n ) const
     if ( n < 1)
         return "";
     
-    return String( strh_.byte_C() + length_i() - n, n ); 
+    return String (strh_.byte_C() + length_i() - n, n); 
 }
 
 
 String
-String::nomid_str( int index_i, int n ) const
+String::nomid_str (int index_i, int n) const
 {
-    if ( index_i < 0 ) {
+    if ( index_i < 0) {
        n += index_i;
        index_i = 0;
     }
@@ -289,28 +289,28 @@ String::nomid_str( int index_i, int n ) const
        return *this;
     
     return
-       left_str( index_i )   +
-       right_str( length_i() - index_i - n ) ;
+       left_str (index_i)   +
+       right_str (length_i() - index_i - n) ;
 }
 
 /*
   proposal: change to "cut()"
  */
 String
-String::mid_str( int index_i, int n ) const
+String::mid_str (int index_i, int n) const
 {
     if (index_i <0) {
        n += index_i;
        index_i=0;
     }
     
-    if ( !length_i() || ( index_i < 0 ) || ( index_i >= length_i() ) || ( n < 1 ) )
+    if ( !length_i() || ( index_i < 0) || ( index_i >= length_i () ) || ( n < 1 ) )
        return String();
 
-    if ( ( n > length_i() ) ||  ( index_i + n > length_i() ) )
+    if ( ( n > length_i()) ||  ( index_i + n > length_i () ) )
        n = length_i() - index_i;
 
-    return String( byte_C() + index_i, n );
+    return String (byte_C() + index_i, n);
 }
 \f
 String
@@ -324,14 +324,14 @@ void
 String::to_upper()
 {
     char *s = (char*)strh_.byte_l();
-    strnuprs ,length_i());
+    strnupr (s ,length_i());
 }
 
 void
 String::to_lower()
 {
     char* s = strh_.ch_l();
-    strnlwr(s,length_i());    
+    strnlwr (s,length_i());    
 }
 
 
@@ -346,20 +346,20 @@ String
 String::reversed_str() const
 {
     String str = *this;
-    strrev( str.byte_l(), str.length_i() );
+    strrev (str.byte_l(), str.length_i ());
     return str;    
 }
 
 int
 String::value_i() const
 {
-    return String_convert::dec2_i( *this );
+    return String_convert::dec2_i (*this);
 }
 
 double
 String::value_f() const
 {
-    return String_convert::dec2_f( *this );
+    return String_convert::dec2_f (*this);
 }
 
 
index 0bbde77c99a5397bc1d942c6945ad6696c564083..b415de36e2e865c746f53ff9310bbf61f883d570 100644 (file)
@@ -13,11 +13,11 @@ ctors()
 {
     cout << "constructors"<<endl;
 
-    String str( "hai" );
+    String str ("hai");
     String def;
-    String fromi(10);
-    String fromc('c');
-    String fromf(1.32e-2, "%g");
+    String fromi (10);
+    String fromc ('c');
+    String fromf (1.32e-2, "%g");
 
     cout << str << endl;
     cout << def << endl;
@@ -30,11 +30,11 @@ void
 cmp()
 {
     Array<String> a;
-    a.push("abcd");
-    a.push("zxy");
-    a.push("abc");
-    a.push("");
-    a.sort(String::compare_i);
+    a.push ("abcd");
+    a.push ("zxy");
+    a.push ("abc");
+    a.push ("");
+    a.sort (String::compare_i);
     cout << "compares: "<<endl;
     for (int i=0; i < a.size(); i++)
        cout << a[i] << endl;
@@ -50,12 +50,12 @@ searching()
     String cstr =c;
     String set = "bar";
     cout << "hay = \"" << hay << "\" len="<< hay.length_i()<<endl;
-    cout << "index_i('"<< c<<"') " << c << "= " << hay.index_i(c) <<endl;
-    cout << "last_index_i('"<< c<<"') " << c << "= " << hay.index_last_i(c) <<endl;    
-//    cout << "last index of cstr " << c << ": " << hay.index_last_i(cstr) <<endl;    
-//    cout << "index_last_i(\""<<set<<"\"): " << hay.index_last_i(set) <<endl;
-    cout << "index_i(\""<<set<<"\"): " << hay.index_i(set) <<endl;    
-    cout << "index_any(\"" << set << "\"): " << cstr << ": " << hay.index_any_i(cstr) <<endl;
+    cout << "index_i ('"<< c<<"') " << c << "= " << hay.index_i (c) <<endl;
+    cout << "last_index_i ('"<< c<<"') " << c << "= " << hay.index_last_i (c) <<endl;    
+//    cout << "last index of cstr " << c << ": " << hay.index_last_i (cstr) <<endl;    
+//    cout << "index_last_i (\""<<set<<"\"): " << hay.index_last_i (set) <<endl;
+    cout << "index_i (\""<<set<<"\"): " << hay.index_i (set) <<endl;    
+    cout << "index_any (\"" << set << "\"): " << cstr << ": " << hay.index_any_i (cstr) <<endl;
 
     
     
@@ -65,15 +65,15 @@ searching()
 void
 kutenpeer()
 {
-    String str( "hai" );
+    String str ("hai");
     for (int i=-1; i < str.length_i()+2; i++) {
-       cout<<" left_str(" << i<<"): " << str.left_str( i ) << endl;
-       cout<<" right_str( "<<i<<"): " << str.right_str( i ) << endl;
+       cout<<" left_str (" << i<<"): " << str.left_str (i) << endl;
+       cout<<" right_str ("<<i<<"): " << str.right_str (i) << endl;
     }
     str = "blonde haren";
     cout << str<<endl;
-    cout << "mid(2,6)="<<str.mid_str(2,3)<<endl;
-    cout << "nomid(2,6)="<<str.nomid_str(2,3)<<endl;
+    cout << "mid (2,6)="<<str.mid_str (2,3)<<endl;
+    cout << "nomid (2,6)="<<str.nomid_str (2,3)<<endl;
 }
 
 int 
@@ -83,35 +83,35 @@ main()
     cmp();
     searching();
     kutenpeer();
-    String str( "hai" );
+    String str ("hai");
     cout <<  str << endl;
     cout << "left" << endl;
     str += " daar";
     cout << str << endl;
 
-    str = String( "Hallo" ) + " daaR" + '!';
+    str = String ("Hallo") + " daaR" + '!';
     cout << str << endl;
 
-    cout << "up: " << str.upper_str() << " down: " << str.lower_str()<<endl;
+    cout << "up: " << str.upper_str() << " down: " << str.lower_str ()<<endl;
     
-    if ( str == String( "" ) )
+    if ( str == String ("") )
         cout << str << " is empty" << endl;
     else
        cout << str << " is not empty"<<endl;
 
     
     String fn = "";
-    if ( fn == "" )
+    if ( fn == "")
         cout << fn << " is empty" << endl;
     else
-       assert(false);
+       assert (false);
     
     fn = "";
     fn += "";
     delete fn.copy_byte_p();
     delete str.copy_byte_p();
 
-    cout << String_convert::bin2hex_str( String( (char)0xff ) ) << endl;
+    cout << String_convert::bin2hex_str (String ((char)0xff) ) << endl;
 }
 
 #endif STRING_TEST
index d73e4f14d374930e3479c2d30bd43c1030832eff..d1db31b1606df025f6eed01048ebc47ec19d4082 100644 (file)
@@ -10,9 +10,9 @@
 #include <sys/types.h>
 #include <memory.h>
 void* 
-mymemmove( void* dest, void const* src, size_t n )
+mymemmove (void* dest, void const* src, size_t n)
 {
-       return memcpy( dest, src, n ); // wohltempererit: 69006
+       return memcpy (dest, src, n); // wohltempererit: 69006
 }
 #define memmove mymemmove
 #endif
index ebfc992ff2d961a498dfc509a08412c655815b94..3624d46ff72dc9ca85cff093267712cc1d4a1531 100644 (file)
@@ -28,20 +28,20 @@ Text_db::get_record()
    while (1) {
        String s;
        Array<String> fields;
-       assert(!eof());
+       assert (!eof());
        
        while ((s = get_word()) != "")
            {
-           fields.push(s);     
+           fields.push (s);    
            gobble_white();
            }
             
 
        if (get_line() != "")
-           assert(false);
+           assert (false);
       
        assert (fields.size());
-       return Text_record(fields, get_name(), line());
+       return Text_record (fields, get_name(), line ());
    }
 }
 
index a2d3e4b1199acae862debead233556f62ff9f3db..a8eb695ea22840383cbb47c0aed61d5dc6b7e2e2 100644 (file)
@@ -1,6 +1,6 @@
 #include "text-stream.hh"
 
-Text_stream::Text_stream(String fn)
+Text_stream::Text_stream (String fn)
 {
     ios::sync_with_stdio();
     if (fn == "") 
@@ -12,20 +12,20 @@ Text_stream::Text_stream(String fn)
        else 
            {
            name = fn;      
-           f = fopen(fn, "r");
+           f = fopen (fn, "r");
            }
        
        if (!f) {
            cerr <<__FUNCTION__<< ": can't open `" << fn << "'\n";
-           exit(1);
+           exit (1);
        }
 
        line_no = 1;
     }
 
 void
-Text_stream::message(String s)
+Text_stream::message (String s)
 {
-    cerr << "\n"<<get_name() << ": " << line()<<": "<<s<<endl;
+    cerr << "\n"<<get_name() << ": " << line ()<<": "<<s<<endl;
 }
 
index e7b0831dd1f36acef4416340ae192e87793b454e..1108f1459a9be2e7bb00a15aaf076dbdf1e06e2f 100644 (file)
@@ -3,9 +3,9 @@
     see a book on data structures
     */
 
-Union_find::Union_find(int n)
+Union_find::Union_find (int n)
 {
-    classes.set_size(n);
+    classes.set_size (n);
 
     for (int i=0; i < n; i++) {
        classes[i] = i;
@@ -13,7 +13,7 @@ Union_find::Union_find(int n)
 }
 
 int
-Union_find::find(int i)
+Union_find::find (int i)
 {
     int rep = i;
     while (classes[rep] != rep)
@@ -27,9 +27,9 @@ Union_find::find(int i)
 }
 
 void
-Union_find::connect(int i, int j)
+Union_find::connect (int i, int j)
 {
-    i = find(i);
-    j = find(j);
+    i = find (i);
+    j = find (j);
     classes[i] = j;    
 }
index 5cb2666e79254e2eb10f635f583cb4c0757f8872..ebe2a729d632cf5136e9f6436c14d17b86fd1d26 100644 (file)
@@ -1,25 +1,25 @@
 #include "vector.hh"
-Vector::Vector(Array<Real> d)
-       : dat(d)
+Vector::Vector (Array<Real> d)
+       : dat (d)
 {
  
 }
-Vector::Vector(Vector const &n)
-    : dat(n.dat)
+Vector::Vector (Vector const &n)
+    : dat (n.dat)
 {
 }    
 
 Vector
 Vector::operator-() const
 {
-    Vector v(*this);
+    Vector v (*this);
     v*=-1;
     return v;
 }
 
 void
-Vector::set_unit(int j)
+Vector::set_unit (int j)
 {
-    fill(0.0);
+    fill (0.0);
     dat[j] = 1.0;
 }
index c3d353615e86065414f686e90c226c73abdde5b1..b5f09403f87449591729a277ddfad90dbee6b81d 100644 (file)
@@ -19,9 +19,9 @@
 
 class Audio_column { 
 public:
-    Audio_column( Moment at_mom );
+    Audio_column (Moment at_mom);
 
-    void add( Audio_item* i_l );
+    void add (Audio_item* i_l);
     Moment at_mom() const;
     void print() const;
 
@@ -29,7 +29,7 @@ public:
     Audio_score * audio_score_l_;
 
 private:
-    Audio_column( Audio_column const& );
+    Audio_column (Audio_column const&);
 
     Moment at_mom_;
 };
index 1b0a4fccf9bf4947e2302d5f2a3ef3e932a85cf0..61c24d3a49174def679eb9bb8627ead08a9328b2 100644 (file)
@@ -23,7 +23,7 @@
   virtual CSound_item* score_item_p() = 0;
  */
 struct Audio_item : public Audio_element {
-    Audio_item( Request* req_l );
+    Audio_item (Request* req_l);
 
     /// Create a midi-item from myself.
     virtual Midi_item* midi_item_p() = 0;
@@ -34,24 +34,24 @@ struct Audio_item : public Audio_element {
     DECLARE_MY_RUNTIME_TYPEINFO;
     
 private:
-    Audio_item( Audio_item const& );
-    Audio_item& operator=( Audio_item const& );
+    Audio_item (Audio_item const&);
+    Audio_item& operator=( Audio_item const&);
 };
 
 struct Audio_key : public Audio_item {
-    Audio_key( Request* req_l );
+    Audio_key (Request* req_l);
 
     virtual Midi_item* midi_item_p();
 };
 
 struct Audio_instrument : public Audio_item {
-    Audio_instrument( String instrument_str );
+    Audio_instrument (String instrument_str);
     virtual Midi_item* midi_item_p();
     String str_;
 };
                                       
 struct Audio_note : public Audio_item {
-    Audio_note( Request* req_l );
+    Audio_note (Request* req_l);
     virtual Midi_item* midi_item_p();
 };
 
@@ -61,7 +61,7 @@ struct Audio_text : Audio_item {
        MARKER, CUE_POINT
     };
 
-    Audio_text( Audio_text::Type type, String text_str );
+    Audio_text (Audio_text::Type type, String text_str);
     virtual Midi_item* midi_item_p();
 
     Type type_;
@@ -69,14 +69,14 @@ struct Audio_text : Audio_item {
 };
 
 struct Audio_tempo : Audio_item {
-    Audio_tempo( int per_minute_4_i );
+    Audio_tempo (int per_minute_4_i);
     virtual Midi_item* midi_item_p();
 
     int per_minute_4_i_;
 };
 
 struct Audio_meter : Audio_item {
-    Audio_meter( Request* req_l );
+    Audio_meter (Request* req_l);
     virtual Midi_item* midi_item_p();
 };
 
index 407a7b412d3f09a077cef837b043e98592698008..5fad1355f2ea8c600b7b6742f2bd17b91febd8ee 100644 (file)
 
 class Audio_score {
 public:
-    Audio_score( Score* l );
+    Audio_score (Score* l);
 
-    void add( Audio_column* );
-    void add_staff( Audio_staff* l );
-    void add(Audio_element*p);
+    void add (Audio_column*);
+    void add_staff (Audio_staff* l);
+    void add (Audio_element*p);
 
     
-    void output( Midi_stream& midi_stream_r );
-    void output_header_track( Midi_stream& midi_stream_r );
+    void output (Midi_stream& midi_stream_r);
+    void output_header_track (Midi_stream& midi_stream_r);
 
     void print() const;
     void process();
index 7e91d7fd0ba906e4964b0f7f591a650d80324c7b..430c5f2c8acbbe1286b5b901d8bcdc6a007e130a 100644 (file)
@@ -13,8 +13,8 @@
 #include "audio-element.hh"
 
 struct Audio_staff : public Audio_element {
-    void addAudio_item*  l);
-    void output( Midi_stream& midi_stream_r, int track_i );
+    void add (Audio_item*  l);
+    void output (Midi_stream& midi_stream_r, int track_i);
 
     Link_list<Audio_item*> audio_item_l_list_;
     DECLARE_MY_RUNTIME_TYPEINFO;
index 7dfe8fbf7a0a6ea766bfd8cff1374bf867af34a0..a9dbb3c5e16a552cb34eb6aae9e3ba6199fc1d41 100644 (file)
@@ -19,6 +19,6 @@ enum Axis {
 
 class String;
 
-String axis_name_str(Axis);
+String axis_name_str (Axis);
 
 #endif // AXES_HH
index bdf758cb4288de571199773e2019c026c5e8e161..92d0cd88062a2c90f46d0b77ef07ad12045f9601 100644 (file)
@@ -21,15 +21,15 @@ axis-group.hh -- declare Axis_group_administration, Axis_group_element
 struct Axis_group_administration {
     Link_array<Score_elem> elem_l_arr_;
     
-    Interval extent(Axis)const;
+    Interval extent (Axis)const;
     void print() const ;
-    Axis_group_administration(Axis_group_administration const&);
+    Axis_group_administration (Axis_group_administration const&);
     Axis_group_administration(){}
-    void remove_all(Axis a1,Axis a2);
+    void remove_all (Axis a1,Axis a2);
     
-    bool contains_b(Score_elem const *)const;
-    void add_element(Score_elem*, Axis_group_element*, Axis a1, Axis a2);
-    void remove_element(Score_elem*, Axis a1, Axis a2);
+    bool contains_b (Score_elem const *)const;
+    void add_element (Score_elem*, Axis_group_element*, Axis a1, Axis a2);
+    void remove_element (Score_elem*, Axis a1, Axis a2);
 };
 
 /** 
@@ -45,9 +45,9 @@ protected:
 
 public:
     virtual void remove_all()=0;
-    virtual void add_element(Score_elem*)=0;
-    virtual void remove_element(Score_elem*)=0;
-    virtual bool contains_b(Score_elem const *)const;
+    virtual void add_element (Score_elem*)=0;
+    virtual void remove_element (Score_elem*)=0;
+    virtual bool contains_b (Score_elem const *)const;
     DECLARE_MY_RUNTIME_TYPEINFO;
 };
 #endif // Axis_group_administration_HH
index 70b7bcf63ad931082c748d6153a1e7de83522a97..d7d8ba2c43cd4701bb95efe4c3e34b76d2cc7fe1 100644 (file)
@@ -20,7 +20,7 @@ class Bar_column_engraver :public Engraver {
     Bar *bar_l_;
     
 protected:
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
 public:
index 7c7fb426adb738d759d2357ae77b427e0039d2b6..43fac9672dea776e123878d93e12fb3b8c2a162d 100644 (file)
@@ -20,10 +20,10 @@ class Bar_column : public Script_column {
 
 public:
     Bar_column();
-    void set_barBar*);
+    void set_bar (Bar*);
 protected:
     SCORE_ELEM_CLONE(Bar_column);
-    void do_substitute_dependency(Score_elem*,Score_elem*);
+    void do_substitute_dependency (Score_elem*,Score_elem*);
     DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
index f159d2973ae0771e3f719664374bc192ff8f2e3a..bb7cfb061babf2845a27df488d117a7d28675829 100644 (file)
@@ -23,7 +23,7 @@ public:
 
      
 protected:
-    virtual bool do_try_request(Request *req_l);
+    virtual bool do_try_request (Request *req_l);
     virtual void do_process_requests();
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
index 287706b6ee4f4bd032e5aaa39532067feb656e93..ad1956648a997bf1f0dc8aadd2df9fd9bf69e28f 100644 (file)
@@ -20,7 +20,7 @@ class Bar_number_grav : public Engraver {
     int number_i_;
 protected:
 
-    void acknowledge_element(Score_elem_info);
+    void acknowledge_element (Score_elem_info);
     void do_pre_move_processing();
 public:
     Bar_number_grav();
index 1e6a36fe1513c25531c5421090741424f9c0eb06..48b4f9bb4cbfa62e33897064e7d1c03d64730383 100644 (file)
@@ -26,9 +26,9 @@ public:
     /* *************** */
     DECLARE_MY_RUNTIME_TYPEINFO;
     Beam();
-    void add(Stem*);
+    void add (Stem*);
 
-    void set_grouping(Rhythmic_grouping def, Rhythmic_grouping current);
+    void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current);
     void set_stemlens();
     SCORE_ELEM_CLONE(Beam);
 protected:
@@ -37,12 +37,12 @@ protected:
     virtual void set_default_dir();
     virtual void do_pre_processing();
     virtual void do_post_processing();
-    virtual void do_substitute_dependent(Score_elem*, Score_elem*);
+    virtual void do_substitute_dependent (Score_elem*, Score_elem*);
 
     virtual void do_print() const;
 
 private:
-    Molecule stem_beams(Stem *here, Stem *next, Stem *prev)const;
+    Molecule stem_beams (Stem *here, Stem *next, Stem *prev)const;
     void solve_slope();
     Molecule*brew_molecule_p()const;
 };
index 8161a84518ccd43b342a4ec3f236bd034c579ba7..36db4b88ba2b707e9583cdd6567885a4eb0ad2c4 100644 (file)
@@ -18,22 +18,22 @@ struct Box {
     Interval &y(){ return interval_a_[Y_AXIS]; }
     Interval x()const{ return interval_a_[X_AXIS]; }
     Interval y()const{return interval_a_[Y_AXIS]; }
-    Interval operator[](Axis a ) {
+    Interval operator[](Axis a) {
        return interval_a_[a];
     }
     
-    void translate(Offset o) {
-       x().translate(o.x());
-       y().translate(o.y());
+    void translate (Offset o) {
+       x().translate (o.x ());
+       y().translate (o.y ());
     }
 
     /// smallest box enclosing #b#
-    void unite(Box b) {
-       x().unite(b.x());
-       y().unite(b.y());
+    void unite (Box b) {
+       x().unite (b.x ());
+       y().unite (b.y ());
     }
     Box();
-    Box(Interval ix, Interval iy);
+    Box (Interval ix, Interval iy);
 };
 
 
index 0a9fafe68cf461118b4b6fcc84545a80d2304797..000ef3ec92d1c5aa091d047bfeeb826b325b4df0 100644 (file)
@@ -23,7 +23,7 @@ struct Col_stats
     int cols_i_;
 
     Col_stats(); 
-    void add(Line_of_cols const&l);
+    void add (Line_of_cols const&l);
     String str()const;
 };
 
@@ -47,16 +47,16 @@ protected:
     
 
     /// helper: solve for the columns in #curline#.
-    void solve_line(Col_hpositions*) const;
+    void solve_line (Col_hpositions*) const;
 
     /// helper: approximate the energyv
-    void approximate_solve_line(Col_hpositions*) const;
+    void approximate_solve_line (Col_hpositions*) const;
 
     /// does curline fit on the paper?    
-    bool feasible(Line_of_cols)const;
+    bool feasible (Line_of_cols)const;
     
 
-    Line_spacer* generate_spacing_problem(Line_of_cols)const;
+    Line_spacer* generate_spacing_problem (Line_of_cols)const;
 
     virtual Array<Col_hpositions> do_solve()const=0;
     void print_stats()const;
@@ -69,7 +69,7 @@ public:
     Line_spacer* (*get_line_spacer)();
     
     Break_algorithm();
-    void set_pscore(Paper_score*);
+    void set_pscore (Paper_score*);
 
     /// check if the spacing/breaking problem is well-stated
     void problem_OK()const;
index 2f974eeadb0f6b9569c4519f89cd94b7161fb6b9..624e7bdf2046d8a14800ddd0c1392892a0857d8c 100644 (file)
@@ -16,17 +16,17 @@ class Clef_engraver : public  Engraver {
     Clef_item *clef_p_;
     Clef_change_req * clef_req_l_;
     void create_clef();
-    void read_req(Clef_change_req*);
-    bool set_type(String);
+    void read_req (Clef_change_req*);
+    bool set_type (String);
 protected:
      virtual void do_process_requests();
-    virtual void fill_staff_info(Staff_info&);
+    virtual void fill_staff_info (Staff_info&);
     virtual void do_pre_move_processing();
     virtual void do_removal_processing();
     virtual void do_creation_processing();
     virtual void do_post_move_processing();
-    virtual bool do_try_request(Request*);
-    virtual void acknowledge_element(Score_elem_info);
+    virtual bool do_try_request (Request*);
+    virtual void acknowledge_element (Score_elem_info);
 public:
     int c0_position_i_;
     String clef_type_str_;
index face7e818deb9d5f6d5dd246881288a438d4bccd..ad8a674242d04a252a9313b56b3b449d4f9e8db7 100644 (file)
@@ -30,8 +30,8 @@ public:
     DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Clef_item);
     Clef_item();
-    void read(Clef_engraver const&);
-    void read(String);
+    void read (Clef_engraver const&);
+    void read (String);
 };
 
 #endif // CLEFITEM_HH
index 985df3b69d84e10d00df09ba9b6e4220e41aa71e..36a2f73f721fa3d06a8b8ede55fec088ee228eb8 100644 (file)
@@ -24,7 +24,7 @@ struct Colinfo {
     bool ugh_b_;               
     /* *************** */
     Colinfo();
-    Colinfo(PCol *,Real const *);
+    Colinfo (PCol *,Real const *);
 
     void print() const;
     bool fixed() const { return fixpos_p_.get_C();}
index a8891ea0046c73ccdec794619863bc78fdbdc1e3..3f198f2ca11330e1088bbe5399820d58e8ffdfd6 100644 (file)
@@ -30,7 +30,7 @@ struct Col_hpositions {
       constraints.  should always work */
     void stupid_solution();
     Col_hpositions();
-    void addPCol*c);
+    void add (PCol*c);
     void print() const;
 };
 
index be3880de62eb211583a53557d7b7e3515f2bed9a..b04d9fe7465d31ede17e54b302dc3d3e81109aea 100644 (file)
@@ -16,7 +16,7 @@ class Collision_engraver : public Engraver {
     Collision* col_p_;
 
 protected:
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
     virtual void do_pre_move_processing();
 public:
     Collision_engraver();
index 162c5fe38597d1c0c40a6265861e0a84e486f0e0..6ab5db3fad20db9ca5b41ff6b083921b772fa774 100644 (file)
@@ -22,7 +22,7 @@
 */
 class Collision : public Horizontal_vertical_group_item {
 protected:
-    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
     virtual void do_pre_processing();
 public:
     Link_array<Note_column> clash_l_arr_;
index 5d173ca9f9250ad9d9535ae1b03d14f703312cf0..1a78f14d758b8a5917032eea588ab794b2b0b2c3 100644 (file)
@@ -65,16 +65,16 @@ public:
 
     Tempo_req();
     REQUESTMETHODS(Tempo_req, tempo);
-    bool do_equal_b(Request *)const;
+    bool do_equal_b (Request *)const;
 };
 
 class Partial_measure_req  : public Timing_req  {
 public:
     Moment duration_;
 
-    Partial_measure_req(Moment);
+    Partial_measure_req (Moment);
     REQUESTMETHODS(Partial_measure_req, partial);
-    bool do_equal_b(Request*)const;
+    bool do_equal_b (Request*)const;
 };
 
 /**
@@ -85,8 +85,8 @@ public:
     int beats_i_, one_beat_i_;
 
     Meter_change_req();
-    void set(int,int);
-    bool do_equal_b(Request*)const;
+    void set (int,int);
+    bool do_equal_b (Request*)const;
     REQUESTMETHODS(Meter_change_req, meterchange);
 };
 
@@ -95,15 +95,15 @@ class Cadenza_req  : public Timing_req  {
 public:
     /// turn on?
     bool on_b_;
-    bool do_equal_b(Request*)const;
-    Cadenza_req(bool);
+    bool do_equal_b (Request*)const;
+    Cadenza_req (bool);
     REQUESTMETHODS(Cadenza_req,cadenza);
 };
 
 /// check if we're at start of a  measure.
 class Barcheck_req  : public Timing_req  {
 public:
-    bool do_equal_b(Request *)const;
+    bool do_equal_b (Request *)const;
     REQUESTMETHODS(Barcheck_req,barcheck);
 };
 
@@ -111,7 +111,7 @@ class Measure_grouping_req : public Timing_req  {
 public:
     Array<int> beat_i_arr_;
     Array<Moment> elt_length_arr_;
-    bool do_equal_b(Request *)const;
+    bool do_equal_b (Request *)const;
     REQUESTMETHODS(Measure_grouping_req, measuregrouping);
 };
 
@@ -120,8 +120,8 @@ public:
 class Bar_req  : public Command_req  {
 public:
     String type_str_;
-    Bar_req(String);
-    bool do_equal_b(Request*)const;
+    Bar_req (String);
+    bool do_equal_b (Request*)const;
 
     REQUESTMETHODS(Bar_req,bar);
 };
@@ -148,7 +148,7 @@ public:
     /// don't ignore the  octaves in #melodic_p_arr_#?
     bool multi_octave_b_;
     Key_change_req();
-    Key_change_req(Key_change_req const&);
+    Key_change_req (Key_change_req const&);
     ~Key_change_req();
     REQUESTMETHODS(Key_change_req, keychange);
 
@@ -160,7 +160,7 @@ public:
     /// return number of sharps in key
     int sharps_i();
 
-    void transpose(Melodic_req const & d) const;
+    void transpose (Melodic_req const & d) const;
     /// is minor key?
     int minor_b();
 };
@@ -168,7 +168,7 @@ public:
 class Clef_change_req  : public Command_req  {
 public:
     String clef_str_;
-    Clef_change_req(String);
+    Clef_change_req (String);
     REQUESTMETHODS(Clef_change_req, clefchange);
 };
 
index 71b0036b72b3e99ce030e690829a9adc2e4217ac..ac8267f18711f7ab90fb073cf65e8c83ceda1515 100644 (file)
@@ -14,8 +14,8 @@ const Real PT_TO_PT =1.0;
 #define CM  *CM_TO_PT
 #define INCH *INCH_TO_PT
 
-Real parse_dimen(String);
-String print_dimen(Real);
-Real convert_dimen(Real, String);
+Real parse_dimen (String);
+String print_dimen (Real);
+Real convert_dimen (Real, String);
 #endif
 
index 389a4684663eb7ea33de2d51846b9f42d676ca92..26556edf9dfd356df0993240d0396013509f6703 100644 (file)
@@ -25,12 +25,12 @@ public:
     ~Dynamic_engraver();
     DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    virtual void acknowledge_element(Score_elem_info);
-    virtual bool do_try_request(Request *req_l);
+    virtual void acknowledge_element (Score_elem_info);
+    virtual bool do_try_request (Request *req_l);
     virtual void do_process_requests();
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
-    virtual void set_feature(Feature);
+    virtual void set_feature (Feature);
 };
 
 #endif // DYNAMIC_GRAV_HH
index b1248cc99095cd077c59646630387250d03e4e41..8e0fcd515442b399340972e953dfd3bd64adbb8d 100644 (file)
 class Horizontal_vertical_group_item  : public Axis_group_item, public Horizontal_vertical_group_element {
 protected:
     virtual void do_print() const;
-    virtual void remove_all() { Horizontal_vertical_group_element::remove_all(); }
+    virtual void remove_all() { Horizontal_vertical_group_element::remove_all (); }
 public:
-    virtual void add_element(Score_elem*e) { Horizontal_vertical_group_element::add_element(e); }
-    virtual void remove_element(Score_elem*e) { Horizontal_vertical_group_element::remove_element(e); }
+    virtual void add_element (Score_elem*e) { Horizontal_vertical_group_element::add_element (e); }
+    virtual void remove_element (Score_elem*e) { Horizontal_vertical_group_element::remove_element (e); }
 
     DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Horizontal_vertical_group_item);
index baf3010c09b2c41a1a044a44e05f1dc105dcc28f..61ad7519f309e65f4c57d1418f46ee14d10e0b20 100644 (file)
@@ -26,8 +26,8 @@ protected:
 
 public:
     DECLARE_MY_RUNTIME_TYPEINFO;
-    virtual void add_element(Score_elem*);
-    virtual void remove_element(Score_elem*);
+    virtual void add_element (Score_elem*);
+    virtual void remove_element (Score_elem*);
 
 };
 /**
@@ -39,8 +39,8 @@ protected:
     virtual void remove_all();
 
 public:
-    virtual void add_element(Score_elem*);
-    virtual void remove_element(Score_elem*);
+    virtual void add_element (Score_elem*);
+    virtual void remove_element (Score_elem*);
     DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
@@ -54,8 +54,8 @@ class Horizontal_vertical_group_element : public Vertical_group_element,
 protected:
     virtual void remove_all();
 public:
-    virtual void add_element(Score_elem*);
-    virtual void remove_element(Score_elem*);
+    virtual void add_element (Score_elem*);
+    virtual void remove_element (Score_elem*);
     
     DECLARE_MY_RUNTIME_TYPEINFO;    
 };
index 2e3e4941bd164414a9468edb5564493403f5d9f7..03e26c9610ab20ef96f6a57d75a4ede38c94671b 100644 (file)
@@ -33,7 +33,7 @@ protected:
     virtual void do_print()const;
     virtual bool removable_b()const;
 public:
-    Engraver*get_simple_engraver(char const*typeinfo)const;
+    Engraver*get_simple_engraver (char const*typeinfo)const;
     virtual void print() const ;
 
     Input_translator * itrans_l_;
@@ -49,7 +49,7 @@ public:
       Pre:
       #grav_l# is in #grav_list_#
      */
-    virtual void terminate_engraver(Engraver * grav_l);
+    virtual void terminate_engraver (Engraver * grav_l);
     
     
     DECLARE_MY_RUNTIME_TYPEINFO;
@@ -57,31 +57,31 @@ public:
     /**
       Remove #grav_l# from the list, and return it.
      */
-    virtual Engraver * remove_engraver_p(Engraver*grav_l);
-    virtual void set_feature(Feature i);
+    virtual Engraver * remove_engraver_p (Engraver*grav_l);
+    virtual void set_feature (Feature i);
     virtual void sync_features();
 
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
     virtual void do_removal_processing();
-    virtual bool do_try_request(Request*);
-    virtual bool try_request(Request*);
+    virtual bool do_try_request (Request*);
+    virtual bool try_request (Request*);
     virtual void do_process_requests();
 
     virtual Staff_info get_staff_info()const;
     
-    virtual Engraver_group_engraver * find_engraver_l(String name,String id);
+    virtual Engraver_group_engraver * find_engraver_l (String name,String id);
     virtual void do_announces();    
-    virtual void announce_element(Score_elem_info);
-    virtual void add(Engraver* grav_p);
-    virtual bool contains_b(Engraver*)const;
+    virtual void announce_element (Score_elem_info);
+    virtual void add (Engraver* grav_p);
+    virtual bool contains_b (Engraver*)const;
 
-    virtual Translator* find_get_translator_l(String name, String id);
+    virtual Translator* find_get_translator_l (String name, String id);
     virtual Translator * get_default_interpreter();
     /**
       Go up in the tree. default: choose next parent
      */
-    Translator * ancestor_l(int l=1);
+    Translator * ancestor_l (int l=1);
     int depth_i() const;
 };
 
index 60b8b95ca1975a93f7b1dc94286357fa3b8bc91d..a7507044370ec7cdbe5c33521371d00c61806432 100644 (file)
@@ -31,7 +31,7 @@ class Engraver {
     /**
       You cannot copy a Engraver
      */
-    Engraver(const Engraver&){}
+    Engraver (const Engraver&){}
 
     enum { 
        VIRGIN,
@@ -61,13 +61,13 @@ protected:
     virtual void do_post_move_processing(){}
    
 
-    virtual void do_creation_processing () {}
+    virtual void do_creation_processing() {}
     virtual void do_removal_processing() {}
 
     /**
       Invoke walker method to typeset element. Default: pass on to daddy.
       */
-    virtual void typeset_element(Score_elem*elem_p);
+    virtual void typeset_element (Score_elem*elem_p);
     
      /**
       take note of item/spanner
@@ -75,31 +75,31 @@ protected:
 
       Default: ignore the info
       */
-    virtual void acknowledge_element(Score_elem_info) {}
+    virtual void acknowledge_element (Score_elem_info) {}
     /**
       Announce element. Default: pass on to daddy. Utility
       */
-    virtual void announce_element(Score_elem_info);
+    virtual void announce_element (Score_elem_info);
     /**
-      Set Feature of the engraver(s). Default: ignore Feature.
+      Set Feature of the engraver (s). Default: ignore Feature.
      */
-    virtual void set_feature(Feature){}
+    virtual void set_feature (Feature){}
     /**
       ask daddy for a feature
      */
-    virtual Scalar get_feature(String type_str);
+    virtual Scalar get_feature (String type_str);
     /**
       Does this equal or contain a certain engraver?
      */
 
     virtual void sync_features() {}
    
-    virtual bool contains_b(Engraver*grav_l)const;
+    virtual bool contains_b (Engraver*grav_l)const;
     /**
       Get information on the staff. Default: ask daddy.
       */
     virtual Staff_info get_staff_info()const;
-    virtual void fill_staff_info(Staff_info&);
+    virtual void fill_staff_info (Staff_info&);
 
 
     virtual void do_print()const;  
@@ -107,7 +107,7 @@ protected:
          @see{try_request}
          Default: always return false
       */
-    virtual bool do_try_request(Request *req_l);
+    virtual bool do_try_request (Request *req_l);
 public:
     void pre_move_processing();
     void process_requests();
@@ -120,7 +120,7 @@ public:
       true: request swallowed. Don't try to put the request elsewhere.
 
       */
-    bool try_request(Request*);
+    bool try_request (Request*);
     bool is_bottom_engraver() const;
 
     void post_move_processing();
@@ -139,17 +139,17 @@ public:
  */
 #define ADD_THIS_ENGRAVER(c)                           \
 struct c ## init {                                     \
-    static Engraver * globalctor (){           \
+    static Engraver * globalctor(){            \
        return new c;                                   \
     }                                                  \
-    c ## init () {                                     \
-       add_engraver(c::static_name(), globalctor);     \
+    c ## init() {                                      \
+       add_engraver (c::static_name(), globalctor);    \
                                                        \
     }                                                  \
 } _ ## c ## init;
 
 typedef Engraver*(*Grav_ctor)(void);
-void add_engraver(String s, Grav_ctor f);
+void add_engraver (String s, Grav_ctor f);
 
 #endif // ENGRAVER_HH
 
index c384d4fa104be5ab64bfc9157737af2e9f180663..4f927b2dfd73a5a5a1d8f6858ff0426dc01b6ca7 100644 (file)
@@ -25,12 +25,12 @@ public:
     virtual int rel_stem_dir_i()const;
     virtual int priority_i()const;
     virtual bool inside_b()const;
-    virtual Atom get_atom(Paper_def* p, int dir_i_)const;
-    bool equal_b(General_script_def const&)const;
+    virtual Atom get_atom (Paper_def* p, int dir_i_)const;
+    bool equal_b (General_script_def const&)const;
     virtual ~General_script_def() {}
     
 protected:
-    virtual bool do_equal_b(General_script_def const *)const;
+    virtual bool do_equal_b (General_script_def const *)const;
     virtual void do_print()const;
 };
 
index b3e65743d97ca8a1cde4f3d1039e8ec1190a3783..0ed76e4c54bf6aff98041f586545fd49a3c8f57e 100644 (file)
 /**
   A macro to automate administration of performers
  */
-#define ADD_THIS_PERFORMER( c ) \
+#define ADD_THIS_PERFORMER( c) \
 struct c ## init { \
-    static Performer* globalctor () \
+    static Performer* globalctor() \
     { \
        return new c;\
     } \
-    c ## init () \
+    c ## init() \
     { \
-       add_Performer( c::static_name(), globalctor ); \
+       add_Performer (c::static_name(), globalctor); \
     } \
 } _ ## c ## init;
 
 // typedef Performer*(*Perf_ctor)(void); c++ ?
 typedef Performer*(*Perf_ctor)();
-void add_Performer(String s, Perf_ctor f);
+void add_Performer (String s, Perf_ctor f);
 
 #endif // GLOBAL_PERFORMER_HH 
index 112392a670a1380ef3ec4b495d92cae3f03104b7..25f596871445738b2fd693469012cdd2cd19c244 100644 (file)
@@ -21,11 +21,11 @@ public:
     
     Global_translator();
     int moments_left_i()const;
-    void modify_next(Moment&);
-    void add_moment_to_process(Moment);
+    void modify_next (Moment&);
+    void add_moment_to_process (Moment);
 
-    virtual void set_score(Score*);
-    virtual void prepare(Moment);
+    virtual void set_score (Score*);
+    virtual void prepare (Moment);
     virtual void process() {}
     virtual void finish() {}
     virtual void start() {}
@@ -35,7 +35,7 @@ protected:
     
     virtual Global_translator *global_l() { return this; }
     virtual int depth_i() const;
-    virtual Translator *ancestor_l(int);
+    virtual Translator *ancestor_l (int);
 };
 
 
index 583f5d452984f8279ba5c2fb7a45d71c5e9be8dd..13fcbd790a09eefd323940fca2e664ab17d24b15 100644 (file)
@@ -23,39 +23,39 @@ struct Rhythmic_grouping {
     Array<MInterval> intervals();
     MInterval interval()const;
     Moment length() const;
-    void intersect(MInterval);
+    void intersect (MInterval);
     
     void operator=(Rhythmic_grouping const&);
-    Rhythmic_grouping(Rhythmic_grouping const&);
-    Rhythmic_grouping(MInterval, int n=1);
+    Rhythmic_grouping (Rhythmic_grouping const&);
+    Rhythmic_grouping (MInterval, int n=1);
     Rhythmic_grouping();
-    Rhythmic_grouping(Array<Rhythmic_grouping*>);
+    Rhythmic_grouping (Array<Rhythmic_grouping*>);
     ~Rhythmic_grouping();
 
-    void add_child(Moment start, Moment len);
-    bool child_fit_b(Moment start);
-    void split(Rhythmic_grouping r);
-    void split(Array<MInterval>);
-    void split(int n);
+    void add_child (Moment start, Moment len);
+    bool child_fit_b (Moment start);
+    void split (Rhythmic_grouping r);
+    void split (Array<MInterval>);
+    void split (int n);
 
     void print() const;
     void OK() const;
 
-    Array<int> generate_beams(Array<int>, int&);
+    Array<int> generate_beams (Array<int>, int&);
 
     /** multiply self to span #i#.
       In implementation, this isn't really const, but conceptually it is.
       */
-    void extend(MInterval i) const;
-    void translate(Moment);
+    void extend (MInterval i) const;
+    void translate (Moment);
 private:
     void init();
     void junk();
-    void copy(Rhythmic_grouping const&);
+    void copy (Rhythmic_grouping const&);
 };
 
 
-Rhythmic_grouping parse_grouping(Array<int> beat_i_arr, Array<Moment> elt_length_arr);
+Rhythmic_grouping parse_grouping (Array<int> beat_i_arr, Array<Moment> elt_length_arr);
 
 
 #endif
index f95733201b155bb06d60ec5916ef44020792f12f..57c560b18b6eee3f8a7dccb112821785d47fd1f9 100644 (file)
@@ -29,9 +29,9 @@ public:
     int dir_i_;
     Stem* stem_l_;
 
-    void add(Note_head*);
-    virtual void add(Script*s);
-    virtual void set(Stem*);
+    void add (Note_head*);
+    virtual void add (Script*s);
+    virtual void set (Stem*);
     Head_column();
     DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
@@ -39,6 +39,6 @@ protected:
 
     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_elem*,Score_elem*);
 };
 #endif // HEAD_COLUMN_HH
index 57711a27be418f219c2a0ecbd5160c7ac7a8aa92..fdbbe7064c45cf8f95066bf932b67e9243302149 100644 (file)
@@ -20,7 +20,7 @@ public:
     Note_head_engraver();
     DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    virtual bool do_try_request(Request *req_l) ;
+    virtual bool do_try_request (Request *req_l) ;
     virtual void do_process_requests();
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
index d66a85a99f616000c821cb8c21036179b2efd8bd..c1d6313657eb56478599daf8c4a129ddecfcfb1a 100644 (file)
@@ -17,7 +17,7 @@
 
   
 
-  TODO: insert(order, elem)
+  TODO: insert (order, elem)
   */
 class Horizontal_align_item :  public Item {
 protected:
@@ -34,16 +34,16 @@ public:
         
     DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Horizontal_align_item);
-    void add(Item*, int p);
+    void add (Item*, int p);
     void OK()const;
     Horizontal_align_item();
 protected:
     
-    virtual void do_substitute_dependency(Score_elem * , Score_elem *);
+    virtual void do_substitute_dependency (Score_elem * , Score_elem *);
     /// do calculations before determining horizontal spacing
     virtual void do_pre_processing();
     virtual void do_print()const;
     virtual Interval do_width()const;
-    bool contains_b(Item*)const;
+    bool contains_b (Item*)const;
 };
 #endif // HORIZONTAL_ALIGN_ITEM_HH
index f1fc8b3c9c6ab11f46ba0dc584c9944b1d69b35f..b9045a4bdb5e520e551e2af3229ad0e79fde65e1 100644 (file)
 
 class Horizontal_group_item : public Axis_group_item, public Horizontal_group_element {
 protected:
-    virtual void remove_all() { Horizontal_group_element::remove_all(); }
+    virtual void remove_all() { Horizontal_group_element::remove_all (); }
     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); }
+    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);
   
index d3cab9322c2c7b85039a127032b179f9f6f6c324..7e28fd7a82f2d29f70c858df106671b2cbd6c905 100644 (file)
@@ -29,13 +29,13 @@ public:
     /**
       use a KKT method to assert optimality of sol
       */
-    void assert_solution(Vector sol) const;
+    void assert_solution (Vector sol) const;
     /// solve the problem using a projected gradient method
-    Vector constraint_solve(Vector)const;
+    Vector constraint_solve (Vector)const;
     /**
       Solve it. First try it the easy way.
      */
-    Vector solve(Vector start) const;
+    Vector solve (Vector start) const;
     
     /**
       @return the number of variables in the problem
@@ -51,20 +51,20 @@ public:
         c*vars >= r
 
       PRE
-      c.dim() == dim();
+      c.dim() == dim ();
        
       */
-    void add_inequality_cons(Vector c, double r);
+    void add_inequality_cons (Vector c, double r);
     
     /** set up matrices to go with the problem. */
-    Ineq_constrained_qp(int novars);
+    Ineq_constrained_qp (int novars);
     
     /**
     evaluate the quadratic function for input #v#
     */
-    Real eval(Vector v);
+    Real eval (Vector v);
 
-    void eliminate_var(int idx, Real value);
+    void eliminate_var (int idx, Real value);
     void OK()const;
     void print() const;
 
index 49f44bec01b0eb64bc4fd9f2dfc2a2b06f2af40c..14a35e507c29625e9540a383763c9b109f5bf472 100644 (file)
@@ -19,7 +19,7 @@
 
 struct Input_translator_list : public Pointer_list<Input_translator*> 
 {
-    Input_translator_list(Input_translator_list const &);
+    Input_translator_list (Input_translator_list const &);
     Input_translator_list(){}
     ~Input_translator_list(){}
 };
@@ -35,18 +35,18 @@ public:
     String type_str_;
     String default_id_str_;
 
-    void add(Input_translator *);
-    bool is_name_b(String);
+    void add (Input_translator *);
+    bool is_name_b (String);
     bool accept_req_b();
-    bool accepts_b(String);
+    bool accepts_b (String);
     void print() const;
     Engraver_group_engraver * get_group_engraver_p();
     Performer_group_performer * get_group_performer_p();
     Input_translator * get_default_itrans_l();
-    Input_translator * recursive_find(String nm);
-    Input_translator * find_itrans_l(String nm);    
+    Input_translator * recursive_find (String nm);
+    Input_translator * find_itrans_l (String nm);    
 };
-Engraver* get_engraver_p(String);
-Performer* get_performer_p(String);
+Engraver* get_engraver_p (String);
+Performer* get_performer_p (String);
 
 #endif // Input_translator_HH
index 0768c5885ebc2a49e6c64a6d754dd105151c1448..e465931074c1f035117ef801161023e504e3cb07 100644 (file)
@@ -35,8 +35,8 @@ public:
     int break_status_i_;
     /// nobreak = 0, pre = -1, post = 1
     int break_status_i()const;
-    Item * find_prebroken_piece(PCol*)const;
-    Item * find_prebroken_piece(Line_of_score*)const;    
+    Item * find_prebroken_piece (PCol*)const;
+    Item * find_prebroken_piece (Line_of_score*)const;    
 
     virtual Item *item() { return this; }
     Item();
index 51a978e592bf8512bcfbc9f3c8f269e100b897ce..f60243fc8f0ec6ed56f3b1926a6b4c012a59a416 100644 (file)
@@ -18,7 +18,7 @@
  */
 class Key_engraver : public Engraver {
     void create_key();
-    void read_req(Key_change_req * r);
+    void read_req (Key_change_req * r);
 
 public:
     Key key_;
@@ -29,11 +29,11 @@ public:
     bool change_key_b_;
     
 protected:
-    virtual bool do_try_request(Request *req_l);
+    virtual bool do_try_request (Request *req_l);
     virtual void do_process_requests();
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
 public:
     Key_engraver();
     DECLARE_MY_RUNTIME_TYPEINFO;
index b980e3ff0fce06473f685434c1c0bc63f36c9608..84d1ac709fe6a2562ccc44bf53fd7c5c6499d3aa 100644 (file)
@@ -22,10 +22,10 @@ struct Key_item : Item {
     DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Key_item);
 
-    Key_item(int cposition);
-    void add(int pitch, int acc);
-    void read(const Key_engraver&);
-    void set_c_position(int);
+    Key_item (int cposition);
+    void add (int pitch, int acc);
+    void read (const Key_engraver&);
+    void set_c_position (int);
 protected:
     virtual void do_pre_processing();
     Molecule* brew_molecule_p()const;
index 6b1cba48f8b2b9c8104ae8ef1c87e96004d34ad6..f459ea9353060d5bf577ab4c7c2853876c3a5d89 100644 (file)
@@ -20,7 +20,7 @@ public:
 
 protected:
     void do_print() const;
-    virtual bool do_try_request( Request* req_l );
+    virtual bool do_try_request (Request* req_l);
     virtual void process_requests();
 
 private:
index d3d34a01ae7fdad3a08411bb270ae65cbc718353..10c5779455d6573dff75f297bd8ca802ad200556 100644 (file)
@@ -17,8 +17,8 @@ public:
     Array<int> accidental_i_arr_;
  
     Octave_key();
-    void set(int i, int acc);
-    int acc(int i)const { return accidental_i_arr_[i]; }
+    void set (int i, int acc);
+    int acc (int i)const { return accidental_i_arr_[i]; }
 };
 
 /// administration of accidentals
@@ -30,9 +30,9 @@ class Key
 public:
     bool multi_octave_b_;
     
-    Octave_key&oct(int);
-    void set(int name, int acc);
-    void set(int oct, int name, int acc);
+    Octave_key&oct (int);
+    void set (int name, int acc);
+    void set (int oct, int name, int acc);
     Key();
 };
 
index a38935b398fdc260f207a35550cf2e4c42d0e317..4b40a979fcfc85a1f0bf986bcca23593721ab05a 100644 (file)
@@ -18,8 +18,8 @@ struct Keyword_table
 {
     Keyword_ent *table;
     int     maxkey;
-    Keyword_table(Keyword_ent *);
-    int     lookup(char const *s) const;
+    Keyword_table (Keyword_ent *);
+    int     lookup (char const *s) const;
 };
 
 
index 2e5c970fe5399626f79cea20862a1a7061ca6fee..c813f36bc465a2a03b89348a954e5e854e25f62c 100644 (file)
@@ -15,7 +15,7 @@
   */
 struct Least_squares {
     Array<Offset> input;
-    void minimise(Real &coef, Real &offset);
+    void minimise (Real &coef, Real &offset);
     void OK() const;
 };
 
index 468a656abb8a47d1214bf29befa2dee6e6d487c4..5e42f95f1e06f9ee52202f7031178403a3b485b0 100644 (file)
 #define LILY_PROTO_HH
 #include "proto.hh"
 
-struct My_lily_lexer;
+
 struct Absolute_dynamic_req;
+struct Axis_group_element;
+struct Axis_group;
 struct Translator;
+struct Audio_element;
+struct Audio_column;
+struct Audio_item;
+struct Audio_key;
+struct Audio_meter;
+struct Audio_note;
+struct Audio_note_off;
+struct Audio_score;
+struct Audio_staff;
+struct Audio_tempo;
 struct Atom;
 struct Bar;
+struct Bar_column_engraver;
+struct Bar_column;
 struct Bar_engraver;
 struct Bar_req;
 struct Barcheck_req;
@@ -31,6 +45,7 @@ struct Chord;
 struct Clef_change_req;
 struct Clef_item;
 struct Clef_engraver;
+struct Clef_performer;
 struct Col_hpositions;
 struct Chord;
 struct Colinfo;
@@ -42,7 +57,9 @@ struct Complex_music;
 struct Cresc_req;
 struct Crescendo ;
 struct Decresc_req;
+
 struct Directional_spanner;
+struct Disallow_break_req;
 struct Durational_req;
 struct Dynamic;
 struct Dynamic_req;
@@ -53,26 +70,29 @@ struct General_script_def;
 struct Global_translator;
 struct Group_change_req;
 struct Group_feature_req;
+struct Head_column;
 struct Horizontal_align_item;
-struct Horizontal_group;
+struct Horizontal_group_element;
 struct Horizontal_group_item;
 struct Horizontal_vertical_group;
 struct Idealspacing;
 struct Identifier;
 struct Interpreter;
 struct Input_file;
-struct Input_engraver;
 struct Input_score;
+struct Input_translator;
 struct Item;
 struct Key;
 struct Key_change_req;
 struct Key_item;
 struct Key_engraver;
+struct Key_performer;
 struct Keyword;
 struct Keyword_table;
 struct Lily_stream;
 struct Line_of_score;
 struct Line_of_staff;
+struct Line_spacer;
 struct Linestaff;
 struct Local_key;
 struct Local_key_item;
@@ -80,20 +100,28 @@ struct Local_key_engraver;
 struct Lookup;
 struct Lyric_item;
 struct Lyric_req;
+struct My_lily_lexer;
 struct Measure_grouping_req;
 struct Melodic_req;
 struct Meter;
 struct Meter_change_req;
 struct Meter_engraver;
+struct Meter_performer;
 struct Midi_def;
 struct Midi_duration;
 struct Midi_header;
 struct Midi_item;
+struct Midi_key;
+struct Midi_meter;
+struct Midi_note;
+struct Midi_note_event;
+struct Midi_note_off;
 struct Midi_output;
-struct Midi_pitch;
 struct Midi_score;
 struct Midi_stream;
+struct Midi_tempo;
 struct Midi_track;
+struct Midi_walker;
 struct Mixed_qp;
 struct Molecule;
 struct Music_general_chord;
@@ -105,14 +133,16 @@ struct Music_list;
 struct My_lily_parser;
 struct Note_column;
 struct Note_column_engraver;
+struct Note_performer;
 struct Note_req;
 struct Note_head;
 struct Note_head_engraver;
 struct Notename_table;
 struct Offset;
 struct Output;
+struct Performer;
 struct PCol;
-struct PScore;
+struct Paper_score;
 struct Paper_def;
 struct Partial_measure_req;
 struct Plet;
@@ -120,6 +150,8 @@ struct Pulk_voice;
 struct Pulk_voices;
 struct Rational;
 struct Engraver_group_engraver;
+struct Performer;
+struct Performer_group_performer;
 struct Request;
 struct Request_column;
 struct Engraver;
@@ -135,6 +167,7 @@ struct Score;
 struct Score_column;
 struct Score_elem;
 struct Score_elem_info;
+struct Score_performer;
 struct Script;
 struct Script_column;
 struct Script_def;
@@ -149,6 +182,8 @@ struct Spacing_req ;
 struct Span_dynamic_req;
 struct Span_req;
 struct Spanner;
+struct Spring_spacer;
+struct Staff_performer;
 struct Staff_side;
 struct Staff_symbol;
 struct Stem;
@@ -161,6 +196,7 @@ struct Symtable;
 struct Symtables;
 struct Super_elem;
 struct Terminate_voice_req;
+struct Tempo_req;
 struct Tex_stream;
 struct Text_def;
 struct Text_gob;
@@ -174,13 +210,14 @@ struct Time_description;
 struct Timing_req;
 struct Vertical_brace;
 struct Vertical_spanner;
-struct Vertical_group;
+struct Vertical_group_element;
 struct Vertical_align_spanner;
 struct Vertical_align_engraver;
 struct Vertical_align_element;
 struct Voice;
-struct Voice_element;
+struct Request_chord;
 struct Voice_group_engravers;
+struct Voice_group_performer;
 struct Voice_list;
 struct Voice_engravers;
 struct Voicegroup;
index 2c3393806fcb527ad5925bbadf09b671c7484512..65e35726dfc6fb8615fcbbfd51ac612d990705da 100644 (file)
@@ -21,7 +21,7 @@ class Line_group_engraver : public Engraver{
 protected:
     virtual void do_creation_processing();
     virtual void do_removal_processing();
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
 
 public:
     DECLARE_MY_RUNTIME_TYPEINFO;
index 96ef38d42f9dc7f059b1100a8efbc3ca8a71d7cb..f6f6cfe5c767bd476b73aa39483b6ac7728ce2a5 100644 (file)
@@ -31,17 +31,17 @@ public:
     
     /** solve the spacing problem
       */
-    virtual void solve(Col_hpositions *) const=0;
+    virtual void solve (Col_hpositions *) 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 (Col_hpositions *) 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.  */
-    virtual void add_column(PCol  *, bool fixed=false, Real fixpos=0.0)=0;
+    virtual void add_column (PCol  *, bool fixed=false, Real fixpos=0.0)=0;
 
     /**
       can the posed problem be solved?
@@ -51,7 +51,7 @@ public:
       prepare() was called
       
      */
-    virtual bool check_constraints(Vector v) const=0;
+    virtual bool check_constraints (Vector v) const=0;
 
     /**
       generate a solution which can't fail
index 60e52bed6ceeb87fc0070d0caa2780d945af227c..415a5376bef8297dbc927f6bde82cfc24d5284ba 100644 (file)
@@ -46,9 +46,9 @@ class Spacing_problem {
     Array<Colinfo> loose_col_arr_;
     
     /// mark column #i# as being loose.
-    void loosen_column(int i);
+    void loosen_column (int i);
     /// the index of #c# in #cols#
-    int col_id(PCol const *c) const;
+    int col_id (PCol const *c) const;
 
     /// generate an (nonoptimal) solution
     Vector find_initial_solution() const;
@@ -57,17 +57,17 @@ class Spacing_problem {
     bool check_feasible() const;
 
     /// does #this# contain the column #w#? 
-    bool contains(PCol const *w);
+    bool contains (PCol const *w);
 
     /// make the energy function
-    void make_matrices(Matrix &quad, Vector &lin,Real&) const;
+    void make_matrices (Matrix &quad, Vector &lin,Real&) const;
 
     /// generate the LP constraints
-    void make_constraints(Mixed_qp& lp) const;
+    void make_constraints (Mixed_qp& lp) const;
 
 
     void handle_loose_cols();
-    void position_loose_cols(Vector &) const;
+    void position_loose_cols (Vector &) const;
    /**
        add a idealspacing to the problem.
       
@@ -75,13 +75,13 @@ class Spacing_problem {
     since they can be "summed" if the columns to which #i# refers are
     not in this problem, the spacing is ignored.
     */
-    void add_ideal(Idealspacing const *i);
-    void print_ideal(Idealspacing const *)const; 
+    void add_ideal (Idealspacing const *i);
+    void print_ideal (Idealspacing const *)const; 
     Vector try_initial_solution() const;
     void calcideal();
 
-    Score_column* scol_l(int);
-    void connect(int i,int j, Real,Real);
+    Score_column* scol_l (int);
+    void connect (int i,int j, Real,Real);
 public:
     static Line_spacer *constructor() {
        return new Line_spacer;
@@ -89,13 +89,13 @@ public:
     Array<PCol*> error_pcol_l_arr() const;
 
     virtual   Array<Real> solve() const;
-    virtual  void add_column(PCol  *, bool fixed=false, Real fixpos=0.0);
+    virtual  void add_column (PCol  *, bool fixed=false, Real fixpos=0.0);
  
 
     virtual Vector default_solution() contains { 
        return try_initial_solution() ; 
     }
-    virtual   bool check_constraints(Vector v) const;
+    virtual   bool check_constraints (Vector v) const;
     virtual    void OK() const;
     virtual    void print() const;
     virtual    void prepare();
index 05300996343b449ddbb6e59831bd23d10ac4eb1d..e060dc61883d52abb6e3381d84198bf98fc54345 100644 (file)
@@ -21,7 +21,7 @@ struct Local_key_engraver : Engraver {
     Link_array<Item > tied_l_arr_;
     /* *************** */
     virtual void do_process_requests();
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
     virtual void do_pre_move_processing();
     Local_key_engraver();
     DECLARE_MY_RUNTIME_TYPEINFO;
index 7316df60e7ca674efeefdef29575113a32c23c60..467f331201dfb3ea82a62cbb0c0d53436a2f961c 100644 (file)
@@ -13,7 +13,7 @@ struct Local_acc {
     int name_i_;
     int accidental_i_;
     int octave_i_;
-    static int compare(Local_acc&, Local_acc&);
+    static int compare (Local_acc&, Local_acc&);
 };
 
 /**
@@ -36,13 +36,13 @@ public:
 
 
     
-    Local_key_item(int c0position);
-    void add_support(Item*);
-    void add(int oct, int pitch, int acc);
-    void add(Melodic_req*);
+    Local_key_item (int c0position);
+    void add_support (Item*);
+    void add (int oct, int pitch, int acc);
+    void add (Melodic_req*);
 protected:
     virtual void do_pre_processing();    
-    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
     virtual Molecule* brew_molecule_p()const;
 };
 #endif // LOCALKEYITEM_HH
index d5e0d07fd4eeb65e770b451c2376274ea7e8ab85..46155bded379665843b126cbff469388075495a2 100644 (file)
@@ -19,45 +19,45 @@ struct Lookup {
     Symtables *symtables_;
     String texsetting;
     /* *************** */
-    void add(String, Symtable*);
+    void add (String, Symtable*);
     void print()const;
 
-    Symbol linestaff(int n, Real w)const;
-    Symbol fill(Box b)const;
-    Symbol beam_element(int,int,Real=0)const;
+    Symbol linestaff (int n, Real w)const;
+    Symbol fill (Box b)const;
+    Symbol beam_element (int,int,Real=0)const;
 
     /// round slope to closest TeXslope
-    Symbol beam(Real&,Real)const;
+    Symbol beam (Real&,Real)const;
 
     /**
       pos == 3 : 3 lines above staff (extending below note)
 
       pos == -3: below staff
       */
-    Symbol streepjes(int pos)const;
+    Symbol streepjes (int pos)const;
 
-    Symbol vbrace(Real &dy) const;
-    Symbol meter(Array<Scalar>)const;
-    Symbol stem(Real y1_pos, Real y2_pos)const;
-    Symbol rule_symbol(Real height, Real width)const;
-    Symbol accidental(int)const;
-    Symbol ball(int)const;
-    Symbol flag(int)const;
-    Symbol rest(int, bool outside)const;
-    Symbol clef(String)const;
-    Symbol bar(String, Real height)const;
+    Symbol vbrace (Real &dy) const;
+    Symbol meter (Array<Scalar>)const;
+    Symbol stem (Real y1_pos, Real y2_pos)const;
+    Symbol rule_symbol (Real height, Real width)const;
+    Symbol accidental (int)const;
+    Symbol ball (int)const;
+    Symbol flag (int)const;
+    Symbol rest (int, bool outside)const;
+    Symbol clef (String)const;
+    Symbol bar (String, Real height)const;
     
-    Symbol dots(int)const;
-    Symbol slur(int dy, Real &dx, int dir)const;
-    Symbol half_slur(int dy, Real &dx, int dir, int xpart)const;
-    Symbol half_slur_middlepart(Real &dx, int dir)const;
-    Symbol big_slur(int dy, Real &dx, int dir)const;
-    Symbol text(String style, String text, int align = 1)const;
-    Symbol script(String idx)const;
-    Symbol hairpin(Real & width, bool decresc)const;
-    Symbol dynamic(String)const;
+    Symbol dots (int)const;
+    Symbol slur (int dy, Real &dx, int dir)const;
+    Symbol half_slur (int dy, Real &dx, int dir, int xpart)const;
+    Symbol half_slur_middlepart (Real &dx, int dir)const;
+    Symbol big_slur (int dy, Real &dx, int dir)const;
+    Symbol text (String style, String text, int align = 1)const;
+    Symbol script (String idx)const;
+    Symbol hairpin (Real & width, bool decresc)const;
+    Symbol dynamic (String)const;
     Lookup();
-    Lookup(Lookup const &);
+    Lookup (Lookup const &);
     ~Lookup();
 };
 
index 8e18c8ed6a65e64e6097a595933d1b8c4abaaee2..632e9c571e53158c741ee7dbeaaa16cc6b7b7f27 100644 (file)
@@ -19,7 +19,7 @@ class Lyric_engraver : public Engraver {
     Text_item *lyric_item_p_;
 protected:
     virtual void do_pre_move_processing();
-    virtual bool do_try_request(Request*);
+    virtual bool do_try_request (Request*);
     virtual void do_process_requests();
     virtual void do_post_move_processing();
 public:
index c0321c2839e0e51ddb7cee68e0b43e6929755454..f03c4faaf0460ad39ac28d46c57460d258952514 100644 (file)
@@ -22,7 +22,7 @@ public:
 
 protected:
     void do_print() const;
-    virtual bool do_try_request( Request* req_l );
+    virtual bool do_try_request (Request* req_l);
     virtual void process_requests();
 
 private:
index 0c461a36d6c7ac1d8fb6c08da20bf062d7825218..79ac1e878ed5ba56155188ff116c8a895fd8468f 100644 (file)
@@ -3,12 +3,12 @@
 #include "lily-proto.hh"
 
 void debug_init();
-void set_debug(bool);
+void set_debug (bool);
 void do_scores();
-void add_score(Score* s);
-void set_default_output(String s);
+void add_score (Score* s);
+void set_default_output (String s);
 Input_score* current_iscore_l();
-String find_file(String);
+String find_file (String);
 String get_version_str();
 extern Sources* source_l_g;
 extern bool only_midi;
index d1085f63fe2f9a06a975e2baab27715fe4e3031d..9c1d72d820f4d8719979adb795919d1dabcd618b 100644 (file)
@@ -24,8 +24,8 @@ public:
     Meter_change_req * meter_req_l_;
     Meter * meter_p_;
  
-    virtual void fill_staff_info(Staff_info&);
-    virtual bool do_try_request(Request *req_l);
+    virtual void fill_staff_info (Staff_info&);
+    virtual bool do_try_request (Request *req_l);
     virtual void do_process_requests();
     virtual void do_pre_move_processing();
     virtual void do_creation_processing();
index 3d972c10e8ee09c65d5e2e367f432da8de4ae2c0..51edbad020db58ea0e558c7d6bcdf2ed59d2c4ed 100644 (file)
@@ -20,7 +20,7 @@ public:
 
 protected:
     void do_print() const;
-    virtual bool do_try_request( Request* req_l );
+    virtual bool do_try_request (Request* req_l);
     virtual void process_requests();
 
 private:
index eb5f2b128efab3b88940531eb48130b69c2eb542..8347b3fa2d98befc3a1815dd65a955ac27d948bb 100644 (file)
@@ -22,7 +22,7 @@ class Meter: public Item {
 protected:
     Molecule*brew_molecule_p() const;
 public:
-    Meter(Array<Scalar> args) ;
+    Meter (Array<Scalar> args) ;
     DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Meter);
 };
index 89a7543567fa92f5123eb0db11eb067e2e3b24fc..bb96d961e897f50cc4aee9b1f7faaf61eae8ef62 100644 (file)
@@ -32,15 +32,15 @@ struct Midi_def {
     Real whole_seconds_f_;
 
     Midi_def();
-    Midi_def( Midi_def const& midi_c_r );
+    Midi_def (Midi_def const& midi_c_r);
     ~Midi_def();
 
-    Real duration_to_seconds_f(Moment);
+    Real duration_to_seconds_f (Moment);
     Global_translator* get_global_translator_p() const;
-    int get_tempo_i( Moment moment );
+    int get_tempo_i (Moment moment);
     void print() const;
-    void set( Input_translator* itrans_p );
-    void set_tempo( Moment moment, int count_per_minute_i );
+    void set (Input_translator* itrans_p);
+    void set_tempo (Moment moment, int count_per_minute_i);
 };
 
 #endif // MIDI_DEF_HH
index 4906f27ba865678dad30e26c1e803fdbb7571c1c..c422e04db8d655094a37aa95b24405c5407bab1d 100644 (file)
  */
 struct Midi_item {
     DECLARE_MY_RUNTIME_TYPEINFO;
-    Midi_item( Audio_item* audio_item_l ); 
-    static String i2varint_str( int i );
-    void output( Midi_stream* midi_stream_l ) const;
+    Midi_item (Audio_item* audio_item_l); 
+    static String i2varint_str (int i);
+    void output (Midi_stream* midi_stream_l) const;
     virtual String str() const = 0;
 
     Audio_item* audio_item_l_;
     int channel_i_;
 
 private:
-    Midi_item( Midi_item const& );
-    Midi_item& operator =( Midi_item const& );
+    Midi_item (Midi_item const&);
+    Midi_item& operator =( Midi_item const&);
 };
 
 /**
@@ -39,8 +39,8 @@ struct Midi_chunk : Midi_item {
     DECLARE_MY_RUNTIME_TYPEINFO;
     Midi_chunk();
 
-    void add( String str );
-    void set( String header_str, String data_str, String footer_str );
+    void add (String str);
+    void set (String header_str, String data_str, String footer_str);
     virtual String str() const;
 
 private:
@@ -51,7 +51,7 @@ private:
 
 struct Midi_duration : public Midi_item {
     DECLARE_MY_RUNTIME_TYPEINFO;
-    Midi_duration( Real seconds_f );
+    Midi_duration (Real seconds_f);
 
     virtual String str() const;
     Real seconds_f_;
@@ -60,7 +60,7 @@ struct Midi_duration : public Midi_item {
 struct Midi_header : Midi_chunk {
     DECLARE_MY_RUNTIME_TYPEINFO;
 
-    Midi_header( int format_i, int tracks_i, int clocks_per_4_i );
+    Midi_header (int format_i, int tracks_i, int clocks_per_4_i);
 
 };
 
@@ -69,7 +69,7 @@ struct Midi_header : Midi_chunk {
  */
 struct Midi_instrument : public Midi_item {
     DECLARE_MY_RUNTIME_TYPEINFO;
-    Midi_instrument( int channel_i, String instrument_str );
+    Midi_instrument (int channel_i, String instrument_str);
 
     virtual String str() const;
     String instrument_str_;
@@ -78,7 +78,7 @@ struct Midi_instrument : public Midi_item {
 
 struct Midi_key : public Midi_item {
     DECLARE_MY_RUNTIME_TYPEINFO;
-    Midi_key( Audio_item* audio_item_l );
+    Midi_key (Audio_item* audio_item_l);
        
     virtual String str() const;
 };
@@ -86,7 +86,7 @@ struct Midi_key : public Midi_item {
 struct Midi_meter : Midi_item {
 
     DECLARE_MY_RUNTIME_TYPEINFO;
-    Midi_meter( Audio_item* audio_item_l ); 
+    Midi_meter (Audio_item* audio_item_l); 
   
     virtual String str() const;
     int clocks_per_1_i_;
@@ -97,7 +97,7 @@ struct Midi_meter : Midi_item {
  */
 struct Midi_note : public Midi_item {
     DECLARE_MY_RUNTIME_TYPEINFO;
-    Midi_note( Audio_item* audio_item_l ); 
+    Midi_note (Audio_item* audio_item_l); 
 
     Moment duration() const;
     int pitch_i() const;
@@ -112,7 +112,7 @@ struct Midi_note : public Midi_item {
  */
 struct Midi_note_off : public Midi_item {
     DECLARE_MY_RUNTIME_TYPEINFO;
-    Midi_note_off( Midi_note* midi_note_l ); 
+    Midi_note_off (Midi_note* midi_note_l); 
 
     int pitch_i() const;
     virtual String str() const;
@@ -127,8 +127,8 @@ struct Midi_text : Midi_item {
        TEXT = 1, COPYRIGHT, TRACK_NAME, INSTRUMENT_NAME, LYRIC, 
        MARKER, CUE_POINT
     };
-    Midi_text( Midi_text::Type type, String text_str );
-    Midi_text( Audio_item* audio_item_l );
+    Midi_text (Midi_text::Type type, String text_str);
+    Midi_text (Audio_item* audio_item_l);
     
     virtual String str() const;
 
@@ -138,8 +138,8 @@ struct Midi_text : Midi_item {
 
 struct Midi_tempo : Midi_item {
     DECLARE_MY_RUNTIME_TYPEINFO;
-    Midi_tempo( int per_minute_4_i );
-    Midi_tempo( Audio_item* audio_item_l ); 
+    Midi_tempo (int per_minute_4_i);
+    Midi_tempo (Audio_item* audio_item_l); 
   
     virtual String str() const;
 
@@ -152,8 +152,8 @@ struct Midi_track : Midi_chunk {
     
     Midi_track();
 
-    void add( int delta_time_i, String event );
-    void add( Moment delta_time_moment, Midi_item* mitem_l );
+    void add (int delta_time_i, String event);
+    void add (Moment delta_time_moment, Midi_item* mitem_l);
 };
 
 #endif // MIDI_ITEM_HH
index 9fded298d5e0274ddc234614c3d54721ddb6cb12..87e8ec5d27c4cf6ad78cb08e5bc1629785f6e5fa 100644 (file)
 
 /// Midi outputfile
 struct Midi_stream {
-    Midi_stream( String filename_str );
+    Midi_stream (String filename_str);
     ~Midi_stream();
 
-    Midi_stream& operator <<( String str );
-    Midi_stream& operator <<( Midi_item const& mitem_c_r );
-    Midi_stream& operator <<( int i );
+    Midi_stream& operator <<( String str);
+    Midi_stream& operator <<( Midi_item const& mitem_c_r);
+    Midi_stream& operator <<( int i);
 
     void open();
 
index a9ce619a09d79721e96d1e2fed0a084537ea02d9..313e21af3d5284050b45b73f066577506b187eb3 100644 (file)
@@ -21,7 +21,7 @@ struct Midi_note_event : PQueue_ent<Moment, Midi_note_off*>
     Midi_note_event();
 };
 
-int compare(Midi_note_event const& left, Midi_note_event const& right );
+int compare (Midi_note_event const& left, Midi_note_event const& right);
 
 /**
   walk audio and output midi
@@ -29,15 +29,15 @@ int compare(Midi_note_event const& left, Midi_note_event const& right );
 class Midi_walker : public PCursor<Audio_item*> 
 {
 public:
-    Midi_walker( Audio_staff* audio_staff_l, Midi_track* midi_track_l );
+    Midi_walker (Audio_staff* audio_staff_l, Midi_track* midi_track_l);
     ~Midi_walker();
 
     void process();
 
 private:
-    void do_start_note( Midi_note* note_l );
-    void do_stop_notes( Moment now_mom );
-    void output_event( Moment now_mom, Midi_item* l );
+    void do_start_note (Midi_note* note_l);
+    void do_stop_notes (Moment now_mom);
+    void output_event (Moment now_mom, Midi_item* l);
 
     Midi_track* track_l_;
     PQueue<Midi_note_event> stop_note_queue;
index 8ba5e10b78c53e5291b79a79160198105514228a..0e8c148ef061c34d672c76e763cbe5055dd7e772 100644 (file)
@@ -7,20 +7,20 @@
 #include "scalar.hh"
 #include "grouping.hh"
 
-Moment wholes(int dur, int dots);
+Moment wholes (int dur, int dots);
 double log_2(double x) ;
 int intlog2(int d);
 inline int
-abs(int i){
+abs (int i){
     return (i < 0)?-i:i;
 }
 inline int
-sign(int i) {
+sign (int i) {
     if (i<0) return -1;
     else if (i) return 1;
     else return 0;
 }
 
-Interval itemlist_width(const Array<Item*> &its);
+Interval itemlist_width (const Array<Item*> &its);
 
 #endif
index d1057bebf0d6a317219fbeddb8452148ebfa658b..b031688e21d8b2729b5f800cfa3c628561377481 100644 (file)
@@ -14,22 +14,22 @@ struct Molecule {
     /* *************** */
     
     Molecule() { }
-    Molecule(Atom const &a) { add(a) ;}
+    Molecule (Atom const &a) { add (a) ;}
 
-    void add_right(const Molecule &m);
-    void add_left(const Molecule &m);
-    void add_top(const Molecule &m);
-    void add_bottom(const Molecule &m);
-    void add(Molecule const &m);
-    void translate(Offset);
-    void translate(Real,Axis);
-    void add(Atom const & a) ;
+    void add_right (const Molecule &m);
+    void add_left (const Molecule &m);
+    void add_top (const Molecule &m);
+    void add_bottom (const Molecule &m);
+    void add (Molecule const &m);
+    void translate (Offset);
+    void translate (Real,Axis);
+    void add (Atom const & a) ;
     /// how big is #this#? 
     Box extent() const;
 
     String TeX_string() const;
 
-    Molecule(const Molecule&s);
+    Molecule (const Molecule&s);
     void print() const;
 private:
     void operator=(const Molecule&);
index c38340706e8fa053970c4fb8b89355b035b41046..636fc659c9111a3d87a8eba96d9638b1462320e2 100644 (file)
 
 class Music_iterator {
    Array<Translator *>report_to_l_arr_;
-   void push_translator(Translator*);
+   void push_translator (Translator*);
     void pop_translator();
 protected:
     bool first_b_;
     virtual void do_print()const;
     
     virtual Translator * get_req_translator_l();
-    Music_iterator* get_iterator_p(Music*)const;
-    void set_translator(Translator*);
+    Music_iterator* get_iterator_p (Music*)const;
+    void set_translator (Translator*);
     Music_iterator *daddy_iter_l_;
     
 public:
     Translator *report_to_l()const;
     DECLARE_MY_RUNTIME_TYPEINFO;
  
-    static Music_iterator* static_get_iterator_p(Music*,Translator*);
+    static Music_iterator* static_get_iterator_p (Music*,Translator*);
     Music_iterator();
     
-    virtual void process_and_next(Moment until);
+    virtual void process_and_next (Moment until);
     virtual Moment next_moment()const;
     virtual bool ok()const;
     virtual ~Music_iterator();
@@ -50,12 +50,12 @@ class Chord_iterator : public Music_iterator
     Pointer_list<Music_iterator*> children_p_list_;
 public:
     ~Chord_iterator();
-    Chord_iterator(Chord const*);
+    Chord_iterator (Chord const*);
     DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
     virtual void do_print()const;
     virtual void construct_children();
-    virtual void process_and_next(Moment);
+    virtual void process_and_next (Moment);
     virtual Moment next_moment()const;
     virtual bool ok()const;
 };
@@ -65,11 +65,11 @@ class Request_chord_iterator : public Music_iterator {
     Moment elt_duration_;
     bool last_b_;
 public:
-    Request_chord_iterator(Request_chord*);
+    Request_chord_iterator (Request_chord*);
     DECLARE_MY_RUNTIME_TYPEINFO;
 
 protected:
-    virtual void process_and_next(Moment);
+    virtual void process_and_next (Moment);
     virtual Moment next_moment()const;
     virtual void construct_children();
     virtual bool ok()const;
@@ -87,13 +87,13 @@ class Voice_iterator :  private PCursor<Music*>, public Music_iterator
     void set_voice_translator();
     
 public:
-    Voice_iterator(Voice const*);
+    Voice_iterator (Voice const*);
     DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
     virtual void do_print()const;
     virtual void construct_children();
     ~Voice_iterator();    
-    virtual void process_and_next(Moment);
+    virtual void process_and_next (Moment);
     virtual Moment next_moment()const;
     virtual bool ok()const;
 };
index bcae7cff83d37dc37ccf52258a6ab1b7ea6a5fff..2ce9625999c963c0890d1f6e03ec1aadb5dfcebd 100644 (file)
@@ -22,12 +22,12 @@ class Music_list : public Music {
 public:
     int multi_level_i_;
   
-    Music_list(Music_list const&);    
+    Music_list (Music_list const&);    
     Music_list();
     DECLARE_MY_RUNTIME_TYPEINFO;
     VIRTUAL_COPY_CONS(Music_list,Music);
-    virtual void add(Music*);
-    virtual void transpose(Melodic_req const *);
+    virtual void add (Music*);
+    virtual void transpose (Melodic_req const *);
     
     Pointer_list<Music*> music_p_list_;
 protected:
@@ -44,7 +44,7 @@ public:
     Chord();
     DECLARE_MY_RUNTIME_TYPEINFO;
     VIRTUAL_COPY_CONS(Chord,Music);
-    virtual void translate(Moment dt);
+    virtual void translate (Moment dt);
     virtual MInterval time_int()const;
 };
 
@@ -70,7 +70,7 @@ public:
     Voice();
     DECLARE_MY_RUNTIME_TYPEINFO;
     VIRTUAL_COPY_CONS(Voice, Music);
-    virtual void translate(Moment dt);
+    virtual void translate (Moment dt);
     virtual MInterval time_int()const;
 };
 
index 63ce4b8799d1b4cb8c078086c74ae349daa6f2a7..5aec401462e5f8e8ef7f008d1a3edec941a579eb 100644 (file)
@@ -45,8 +45,8 @@ public:
     virtual MInterval time_int()const;
     virtual ~Music(){}
     void print() const;
-    virtual void transpose(Melodic_req const *);
-    virtual void translate(Moment dt);
+    virtual void transpose (Melodic_req const *);
+    virtual void translate (Moment dt);
     VIRTUAL_COPY_CONS(Music,Music);
     DECLARE_MY_RUNTIME_TYPEINFO;
     Music();
index 6152be77825b0351eff9169d3b418be504c146ab..2346d1625ce86c65acbb35a7849bd663b8ac3ce2 100644 (file)
@@ -50,11 +50,11 @@ public:
     Duration duration_;
     
     /* *************** */
-    void set_duration(Duration);
-    bool do_equal_b(Request*)const;
+    void set_duration (Duration);
+    bool do_equal_b (Request*)const;
     virtual Moment duration() const;
     Rhythmic_req();
-    static int compare(Rhythmic_req const&,Rhythmic_req const&);
+    static int compare (Rhythmic_req const&,Rhythmic_req const&);
     REQUESTMETHODS(Rhythmic_req, rhythmic);
 };
 
@@ -86,9 +86,9 @@ public:
     Text_def *tdef_p_;
 
     /* *************** */
-    Text_req(int d, Text_def*);
+    Text_req (int d, Text_def*);
     ~Text_req();
-    Text_req(Text_req const&);
+    Text_req (Text_req const&);
 
     REQUESTMETHODS(Text_req,text);
 };
@@ -98,7 +98,7 @@ public:
   */
 class Lyric_req  : public  Rhythmic_req, public Text_req  {
 public:
-    Lyric_req(Text_def* t_p);
+    Lyric_req (Text_def* t_p);
     REQUESTMETHODS(Lyric_req, lreq_l);
 };
 
@@ -117,12 +117,12 @@ struct Melodic_req :virtual Musical_req
     int height()const;
 
     /// transpose. #delta# is relative to central c.
-    void transpose(Melodic_req const &delta);
+    void transpose (Melodic_req const &delta);
     /// return pitch from central c (in halfnotes)
     int pitch()const; 
     Melodic_req();
-    bool do_equal_b(Request*)const;
-    static int compare(    Melodic_req const&,Melodic_req const&);
+    bool do_equal_b (Request*)const;
+    static int compare (Melodic_req const&,Melodic_req const&);
     REQUESTMETHODS(Melodic_req,melodic);
 };
 
@@ -133,8 +133,8 @@ public:
     /// force/supress printing of accidental.
     bool forceacc_b_;
     Note_req();
-    bool do_equal_b(Request*)const;
-    Rhythmic_req* rhythmic() { return Rhythmic_req::rhythmic(); }
+    bool do_equal_b (Request*)const;
+    Rhythmic_req* rhythmic() { return Rhythmic_req::rhythmic (); }
     REQUESTMETHODS(Note_req, note);
  };
 
@@ -168,7 +168,7 @@ public:
     enum {
        NOSPAN, START, STOP
     } spantype ;
-    bool do_equal_b(Request*)const;
+    bool do_equal_b (Request*)const;
     REQUESTMETHODS(Span_req,span);
 
     Span_req();
@@ -214,7 +214,7 @@ public:
     enum Loudness {
        FFF, FF, F, MF, MP, P, PP, PPP
     };
-    static String loudness_str(Loudness);
+    static String loudness_str (Loudness);
     REQUESTMETHODS(Dynamic_req, dynamic);
 };
 
index e606a0f4b3dfb58c4f355d6af08582f810c1d64e..8869ccb5143f8e1f8b431189e74cf3f77c9a9cfa 100644 (file)
@@ -25,16 +25,16 @@ class My_lily_parser {
     Array<Input> define_spot_array_;
     String init_str_;
 
-    void add_requestsChord*v);
+    void add_requests (Chord*v);
 
-    Chord * get_note_element(Note_req * ,Duration *);
-    Chord* get_rest_element(String,Duration *);
-    Chord* get_word_element(Text_def*, Duration*);
+    Chord * get_note_element (Note_req * ,Duration *);
+    Chord* get_rest_element (String,Duration *);
+    Chord* get_word_element (Text_def*, Duration*);
 
-    void set_last_duration(Duration const *);
-    void set_default_duration(Duration const *);
-    void set_duration_mode(String s);
-    friend int yyparsevoid*);
+    void set_last_duration (Duration const *);
+    void set_default_duration (Duration const *);
+    void set_duration_mode (String s);
+    friend int yyparse (void*);
 public:
     int default_octave_i_;
     Duration default_duration_;
@@ -51,7 +51,7 @@ public:
     My_lily_lexer * lexer_p_;
  
     Moment plet_mom();
-    void add_notename(String, Melodic_req* req_p);
+    void add_notename (String, Melodic_req* req_p);
     Input here_input()const;
     void remember_spot();
     Input pop_spot();
@@ -59,21 +59,21 @@ public:
     Paper_def*default_paper();
     Midi_def*default_midi();
     void do_yyparse();
-    void parser_error(String);
+    void parser_error (String);
     void clear_notenames();
 
-    Request* get_parens_request(char c);
+    Request* get_parens_request (char c);
     
     void set_debug();
-    void set_yydebug(bool);
+    void set_yydebug (bool);
     void print_declarations();
     bool ignore_version_b_;
 public:
     void do_init_file();
     void parse_file ( String init_str, String file_str);
-    My_lily_parser(Sources * sources_l);
+    My_lily_parser (Sources * sources_l);
     ~My_lily_parser();
-    void set_version_check(bool ignore);
+    void set_version_check (bool ignore);
 };
 
 #endif // MY_LILY_PARSER_HH
index 43ebda4432c4cec3422ca874d0ea3ad48d6742e3..43784776f9cae929c884131bf319c7151258d07a 100644 (file)
@@ -24,10 +24,10 @@ class Note_column_engraver :public Engraver {
     int dir_i_;
     
 
-    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);
+    virtual void set_feature (Feature);
+    virtual void acknowledge_element (Score_elem_info);
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
 public:
index 2e297e88a4b8517370ebdebf3f0c344258b0dbaa..3ee218ec125f2261857fcc04f0b95d0662c54762 100644 (file)
@@ -14,7 +14,7 @@
 #include "head-column.hh"
 
 /** a struct for treating a group of noteheads (noteheads, stem
-  (chord) and scripts ) as a single entity.  */
+  (chord) and scripts) as a single entity.  */
 class Note_column : public Head_column {
 protected:
     virtual void do_pre_processing();
@@ -26,7 +26,7 @@ public:
         
     DECLARE_MY_RUNTIME_TYPEINFO;
     Note_column();
-    virtual void set(Stem *);
+    virtual void set (Stem *);
     void sort();
 };
 
index 14cd2491a803b449cdff3c545eaf33d7014748e9..6fab4812b5595d455cf9ef522863a546742a389b 100644 (file)
@@ -37,14 +37,14 @@ public:
     
     /* *************** */
     
-    void set_rhythmic(Rhythmic_req *);
+    void set_rhythmic (Rhythmic_req *);
 
     /**
       position of top line (5 linestaff: 8)
       */
-    Note_head(int staff_size);
+    Note_head (int staff_size);
     void set_dots();
-    static int compare(Note_head * const &a, Note_head *const &b) ;
+    static int compare (Note_head * const &a, Note_head *const &b) ;
 protected:
     virtual    void do_print()const;
     virtual void do_pre_processing();
index 0fb8aecbd43fab4ae98831306d1ca4fe7b1f0b2d..436b78bb2ac8d4350e900419e331106341821404 100644 (file)
@@ -22,7 +22,7 @@ public:
 protected:
     virtual void process_requests();
 
-    virtual bool do_try_request( Request *req_l ) ;
+    virtual bool do_try_request (Request *req_l) ;
     virtual void do_print() const;
 
 private:
index 082dda366b42a0721d14ccfcef81aaa4bca3675c..5e083a6d7c2217128c9254471622c15cc78dde04 100644 (file)
@@ -17,8 +17,8 @@
 
 class Notename_table :   Assoc<String, P<Melodic_req> >{
 public:
-    void add(String, Melodic_req*);
-    Melodic_req*get_l(String);
+    void add (String, Melodic_req*);
+    Melodic_req*get_l (String);
 };
   
 #endif // NOTENAME_TABLE_HH
index e0125e1a0bcea1e5db97ca67a4414a09040ce943..426f7e45649c085d4bb7873f6924a4456cb6a2af 100644 (file)
 struct Notename_tab {
     String notetab[7*5];
     
-    void set(int l, int s, String nm);
-    void lookup(int &large, int &small, String s);
+    void set (int l, int s, String nm);
+    void lookup (int &large, int &small, String s);
 };
 
-void set_notename_tab(Notename_tab*n);
-void lookup_notename(int &large, int &small, String s);
+void set_notename_tab (Notename_tab*n);
+void lookup_notename (int &large, int &small, String s);
 
 
 #endif // NOTENAME_HH
index 00bc73e0e29032e2813403b2c4381f4554d3853f..b4ed5478aca191551e681eacec20046790d8edc9 100644 (file)
@@ -28,11 +28,11 @@ struct Offset {
     }
     
     Offset operator+=(Offset o) {
-       x()+=o.x();
-       y()+=o.y();
+       x()+=o.x ();
+       y()+=o.y ();
        return *this;
     }
-    Offset(Real ix , Real iy) {
+    Offset (Real ix , Real iy) {
        x()=ix;
        y()=iy;
     }
index d66921dc8717c13030f91270db13759eea399a38..797fde9584ee671e33b0b019b3ebb7d11e4e44a6 100644 (file)
@@ -60,7 +60,7 @@ public:
     bool breakpoint_b() const;
     void clean_breakable_items();
     
-    void add(Item *i);
+    void add (Item *i);
 
     /// Can this be broken? true eg. for bars. 
     bool breakable_b()const;
@@ -75,8 +75,8 @@ public:
 
       @return < 0 if c1 < c2.
     */
-    static int compare(const PCol &c1, const PCol &c2);
-    void set_rank(int);
+    static int compare (const PCol &c1, const PCol &c2);
+    void set_rank (int);
 
     void OK() const;
     void set_breakable();
@@ -89,12 +89,12 @@ private:
       -1 is uninitialised.
      */
     int rank_i_;
-    PCol(PCol const&){}
+    PCol (PCol const&){}
 };
 
 
 #include "compare.hh"
-instantiate_compare(PCol &, PCol::compare);
+INSTANTIATE_COMPARE(PCol &, PCol::compare);
      
 
 #endif
index 12ba8c77ad047455297cc3b8c198d18224702cc8..7c497cd919d07e27f5d9b0570159a5e7b40b1fad 100644 (file)
@@ -41,33 +41,33 @@ public:
     /* *************** */
     /* CONSTRUCTION */
     
-    Paper_score(Paper_def*);
+    Paper_score (Paper_def*);
     /// add a line to the broken stuff. Positions given in #config#
-    void set_breaking(Array<Col_hpositions> const &);
+    void set_breaking (Array<Col_hpositions> const &);
 
     /** add an item.
        add the item in specified containers. If breakstatus is set
        properly, add it to the {pre,post}break of the pcol.
        */
-    void typeset_item(Item *item_p,  PCol *pcol_l);
+    void typeset_item (Item *item_p,  PCol *pcol_l);
 
     /// add to bottom of pcols
-    void add(PCol*);
+    void add (PCol*);
 
     /**
       @return argument as a cursor of the list
       */
-    PCursor<PCol *> find_col(PCol const *)const;
+    PCursor<PCol *> find_col (PCol const *)const;
 
-    Link_array<PCol> col_range(PCol *left_l, PCol *right_l) const;
-    Link_array<PCol> breakable_col_range(PCol*,PCol*) const;
-    Link_array<PCol> broken_col_range(PCol*,PCol*) const;
+    Link_array<PCol> col_range (PCol *left_l, PCol *right_l) const;
+    Link_array<PCol> breakable_col_range (PCol*,PCol*) const;
+    Link_array<PCol> broken_col_range (PCol*,PCol*) const;
     
     /* MAIN ROUTINES */
     void process();
 
     /// last deed of this struct
-    void output(Tex_stream &ts);
+    void output (Tex_stream &ts);
 
     /* UTILITY ROUTINES */
 
@@ -76,10 +76,10 @@ public:
     void OK()const;
     void print() const;
     ~Paper_score();
-    void typeset_element(Score_elem*);
-    void typeset_broken_spanner(Spanner*);
+    void typeset_element (Score_elem*);
+    void typeset_broken_spanner (Spanner*);
     /// add a Spanner
-    void typeset_unbroken_spanner(Spanner*);
+    void typeset_unbroken_spanner (Spanner*);
  
     
 private:
index 44fc05e12a2b96545161e5c439a7aadd48c368c6..cb75f8437f683a3a08e7ae1432f0b06bd3cf999a 100644 (file)
@@ -43,15 +43,15 @@ public:
     
     
     /* *************** */
-    void set_var(String, Real);
+    void set_var (String, Real);
     Real get_var (String)const;
     void reinit();
     Paper_def();
-    void set(Lookup*);
-    void set (Input_translator * );
+    void set (Lookup*);
+    void set (Input_translator *);
     Global_translator * get_global_translator_p()const;
     ~Paper_def();
-    Paper_def(Paper_def const&);
+    Paper_def (Paper_def const&);
     /// The distance between beams
     Real interbeam_f()const;
     /**
@@ -77,7 +77,7 @@ public:
     /** convert a duration to an idealspacing
       influence using the geometric_ and  parameters.
       */
-    Real duration_to_dist(Moment);
+    Real duration_to_dist (Moment);
 };
 
 #endif // Paper_def_HH
index 205971988089f0c6ddbc592bcc7694b46d44842c..1bcf0cc4f7419b928bd9386bb8daa8cc79feb60a 100644 (file)
@@ -9,13 +9,13 @@
 
 #include "lily-proto.hh"
 
-String * get_scriptdef(char c);
-Request* get_script_req(char);
-Request*get_script_req(int d , Script_def*def);
-Request*get_text_req(int d , Text_def*def);
-Request* get_stemdir_req(int);
-Request*get_grouping_req(Array<int> i_arr);
-Request* get_hshift_req(int);
+String * get_scriptdef (char c);
+Request* get_script_req (char);
+Request*get_script_req (int d , Script_def*def);
+Request*get_text_req (int d , Text_def*def);
+Request* get_stemdir_req (int);
+Request*get_grouping_req (Array<int> i_arr);
+Request* get_hshift_req (int);
 
 #endif // PARSECONSTRUCT_HH
 
index 4c57fc7af84f08de274b88b8890b89b0e9f268d7..5c640cc6365a5133fee89cce747325a0b1ae0b59 100644 (file)
@@ -23,18 +23,18 @@ public:
     DECLARE_MY_RUNTIME_TYPEINFO;
     Input_translator* itrans_l_;
 
-    virtual void add( Performer* perf_p );
-    virtual bool do_try_request( Request* req_l );
+    virtual void add (Performer* perf_p);
+    virtual bool do_try_request (Request* req_l);
     virtual void print() const;
-    virtual bool try_request(Request* r);
+    virtual bool try_request (Request* r);
     
 
 protected:
     virtual ~Performer_group_performer();
-    virtual Translator* find_get_translator_l( String name, String id );
+    virtual Translator* find_get_translator_l (String name, String id);
     virtual Translator* get_default_interpreter();
 
-    Translator * ancestor_l( int l = 1 );
+    Translator * ancestor_l (int l = 1);
     virtual int depth_i() const;
 
     virtual void process_requests();
@@ -42,7 +42,7 @@ protected:
     virtual void do_creation_processing();
 
     bool is_bottom_performer_b() const;
-    virtual Performer_group_performer* find_performer_l( String name, String id );
+    virtual Performer_group_performer* find_performer_l (String name, String id);
     virtual void do_print()const;
 
 private:
index 0126c7b231d7c3bd4db3d364dd2da06f4b06cc28..8e9553f08f28bd2680bed280562bbfaa2fd06499 100644 (file)
@@ -30,17 +30,17 @@ public:
     void print() const;
     virtual void process_requests();
 
-    virtual bool try_request( Request* req_l );
+    virtual bool try_request (Request* req_l);
 
     virtual void do_removal_processing();
     void creation_processing();
 
 protected:
     virtual void do_creation_processing();
-    virtual bool do_try_request(Request*);
+    virtual bool do_try_request (Request*);
     virtual int get_tempo_i() const;
     virtual void do_print() const;
-    virtual void play( Audio_element * elem_p  );
+    virtual void play (Audio_element * elem_p );
 };
 
 #include "global-performers.hh"
index defcd3ee63fcbcb1ab90774f936ab9ee73c57c1a..e40b34ff0710b1191029ad05eacd6289030d1948 100644 (file)
@@ -23,12 +23,12 @@ class Mixed_qp :public Ineq_constrained_qp {
     Array<int> eq_cons;
     Array<Real> eq_consrhs;
 public:
-    Mixed_qp(int n);
+    Mixed_qp (int n);
     void OK() const;
     void print() const;
 
-    Vector solve(Vector start) const;
-    void add_fixed_var(int i , Real value);
+    Vector solve (Vector start) const;
+    void add_fixed_var (int i , Real value);
     
 
     /**
@@ -37,8 +37,8 @@ public:
         c*vars == r
 
       PRE
-      c.dim()==dim();
+      c.dim()==dim ();
      */
-    void add_equality_cons(Vector c, double r);
+    void add_equality_cons (Vector c, double r);
 };
 #endif
index 56b84e2e16f9ed215cfb1b554f7632bc8db7f222..3ef601188a110a3ab0140288448b6123ada5a0cf 100644 (file)
@@ -37,8 +37,8 @@ class Active_constraints {
 public:
     String status()const;
     
-    Vector vec(int k) const { return opt->cons[k]; }
-    Real rhs(int k) const { return opt->consrhs[k]; }
+    Vector vec (int k) const { return opt->cons[k]; }
+    Real rhs (int k) const { return opt->consrhs[k]; }
     
 
     /** drop constraint. drop constraint k from the active set. k is the index of the
@@ -52,18 +52,18 @@ public:
     add constraint j to the active set j is the index of the
     constraint in #inactive#   
     */
-    void add(int j);
+    void add (int j);
 
     /// exchange in and out.
-    void exchange(int in, int out) { add(in); drop (out); }
+    void exchange (int in, int out) { add (in); drop (out); }
     
 
-    Vector find_active_optimum(Vector g);
+    Vector find_active_optimum (Vector g);
 
     /// get lagrange multipliers.
-    Vector get_lagrange(Vector v);
+    Vector get_lagrange (Vector v);
 
-    Active_constraints(Ineq_constrained_qp const *op);
+    Active_constraints (Ineq_constrained_qp const *op);
     /** construct: no constraints active, n vars. Put the equalities
      into the constraints.  */
 
@@ -79,13 +79,13 @@ class Inactive_iter {
     int j;
     Active_constraints const* ac;
 public:
-    Inactive_iter(Active_constraints const &c) { ac=&c; j=0; }
+    Inactive_iter (Active_constraints const &c) { ac=&c; j=0; }
     int idx() const { return j; }
     void operator ++(int) { j++; }
     int constraint_id() const { return ac->inactive[j]; }
-    Vector vec() const { return ac->vec(constraint_id()); }
-    Real rhs() const { return ac->rhs(constraint_id()); }
-    bool ok() const { return j < ac->inactive.size(); }
+    Vector vec() const { return ac->vec (constraint_id ()); }
+    Real rhs() const { return ac->rhs (constraint_id ()); }
+    bool ok() const { return j < ac->inactive.size (); }
 };
 
 #endif // QLPSOLVE_HH
index 07e480137eb3929efe2671dff3e12305eab48be3..3dc1eb9ba22d06171611b95b7fbd73a715a52fc0 100644 (file)
@@ -33,7 +33,7 @@ public:
     VIRTUAL_COPY_CONS(Request,Music);
     
     virtual MInterval time_int() const;
-    virtual void transpose(Melodic_req const &){}
+    virtual void transpose (Melodic_req const &){}
     virtual Moment duration() const { return 0; }
 
     /*  accessors for children
@@ -46,9 +46,9 @@ public:
     virtual Blank_req * blank() { return 0; }
     virtual Musical_req *musical() { return 0; }
     virtual Command_req * command() { return 0; }
-    bool equal_b(Request*) const;
+    bool equal_b (Request*) const;
 protected:
-    virtual bool do_equal_b(Request*) const;
+    virtual bool do_equal_b (Request*) const;
     virtual void do_print()const;
 };
 
@@ -69,12 +69,12 @@ public:
     General_script_def *scriptdef_p_;
 
     /* *************** */
-    bool do_equal_b(Request*)const;
+    bool do_equal_b (Request*)const;
 
     Script_req();
     REQUESTMETHODS(Script_req,script);
     ~Script_req();
-    Script_req(Script_req const&);
+    Script_req (Script_req const&);
 };
 
     
index 6dfdaf16c9635b9fe4ace311f3a44b66c9b427a2..61fafc5bda48dba23c5b2f297309e7762cf2e669 100644 (file)
@@ -18,7 +18,7 @@
 class Rest_column : public Head_column {
 public:
     DECLARE_MY_RUNTIME_TYPEINFO;
-    void translate_heads(int dy);
+    void translate_heads (int dy);
 };
 
 #endif // REST_COLUMN_HH
index 718137ecfa2cb4b7c9fffdf575a7aa109d3849d4..dc6eae2b65237417b348a2567676702da4d92eeb 100644 (file)
@@ -25,7 +25,7 @@ public:
     Score_align_engraver();
     DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
     virtual void do_pre_move_processing();
 };
 #endif // SCORE_ALIGN_GRAV_HH
index e108bc82132c8393cabf4e33146b4f869c0803fa..0e19baa4611fa24048483e12280aa5d4e54e5d99 100644 (file)
@@ -38,8 +38,8 @@ public:
     /* *************** */
 
     Moment when() {  return when_; }
-    Score_column(Moment when);       
-    void add_duration(Moment );
+    Score_column (Moment when);       
+    void add_duration (Moment);
     void preprocess();
     bool musical_b() { return musical_b_; }
     void print() const;
index 4e6b609ff26d43fbb4aa740bb2b0573f332aa0f1..17b8172ee6f42aa2a72d4877fb608984d6d18092 100644 (file)
@@ -23,7 +23,7 @@ struct Score_elem_info {
     Array<Engraver*> origin_grav_l_arr_;
 
     /* *** */
-    Score_elem_info(Score_elem*, Request*);
+    Score_elem_info (Score_elem*, Request*);
     Score_elem_info();
 };
 
index 82a6fbfe3d7a64dff7e54ab8ea70ad5cb22b2c9d..7e7259f6a25320b1fb9549e0c6b4232b56852c9b 100644 (file)
@@ -53,8 +53,8 @@ class Score_elem : private Directed_graph_node {
     
     Status status_;
 
-    Score_elem* dependency(int) const;
-    Score_elem* dependent(int) const;
+    Score_elem* dependency (int) const;
+    Score_elem* dependent (int) const;
     int dependent_size() const;
     int dependency_size() const;
 public:
@@ -70,9 +70,9 @@ public:
     Paper_score *pscore_l_;    
     Axis_group_element * axis_group_l_a_[2];
 
-    Score_elem(Score_elem const&);
-    virtual String TeX_string () const ;
-    String TeX_string_without_offset(Offset)const;
+    Score_elem (Score_elem const&);
+    virtual String TeX_string() const ;
+    String TeX_string_without_offset (Offset)const;
     virtual void print() const;
     
     Paper_def *paper() const;
@@ -81,7 +81,7 @@ public:
     Score_elem();
     DECLARE_MY_RUNTIME_TYPEINFO;    
     
-    Interval extent(Axis)const;
+    Interval extent (Axis)const;
     Interval width() const;
     Interval height() const;
     Status status() const;
@@ -89,16 +89,16 @@ public:
      /**
       translate the symbol. The symbol does not have to be created yet. 
       */
-    void translate(Offset);
+    void translate (Offset);
     /**
       translate in one direction
      */
     
-    void translate(Real, Axis);
-    Real relative_coordinate(Axis_group_element*, Axis)const;
+    void translate (Real, Axis);
+    Real relative_coordinate (Axis_group_element*, Axis)const;
     Offset absolute_offset()const;
-    Real absolute_coordinate(Axis)const;
-    Axis_group_element*common_group(Score_elem const* s, Axis a)const;
+    Real absolute_coordinate (Axis)const;
+    Axis_group_element*common_group (Score_elem const* s, Axis a)const;
 
     void add_processing();
     void OK() const;
@@ -114,13 +114,13 @@ public:
      */
     void unlink();
     void unlink_all();
-    void substitute_dependency(Score_elem*,Score_elem*);
-    void remove_dependency(Score_elem*);
+    void substitute_dependency (Score_elem*,Score_elem*);
+    void remove_dependency (Score_elem*);
     /**
       add a dependency. It may be the 0 pointer, in which case, it is ignored.
      */
-    void add_dependency(Score_elem* );    
-    void copy_dependencies(Score_elem const&);
+    void add_dependency (Score_elem*);    
+    void copy_dependencies (Score_elem const&);
     /**
       junk the dependency array. Don't do derived stuff.
      */
@@ -158,8 +158,8 @@ protected:
     /// do calculations after determining horizontal spacing
     virtual void do_post_processing();
     
-    virtual void do_substitute_dependency(Score_elem * , Score_elem *);
-    virtual void do_substitute_dependent(Score_elem *, Score_elem *);
+    virtual void do_substitute_dependency (Score_elem * , Score_elem *);
+    virtual void do_substitute_dependent (Score_elem *, Score_elem *);
     virtual void do_break_processing();
     virtual void handle_broken_dependencies();
     virtual void handle_prebroken_dependencies();
index 39941cda65ba05c1c88e42f9101eb9e9350812e1..5cb3936bb5118ef03211ac643c2a0db201420cc0 100644 (file)
@@ -31,7 +31,7 @@ class Score_engraver :
     Score_column* musical_column_l_;
     
     friend class Score;
-    void set_columns(Score_column*,Score_column*);
+    void set_columns (Score_column*,Score_column*);
     void typeset_all();
     
 public:
@@ -41,22 +41,22 @@ public:
 
 protected:   
     /* Global_translator interface */
-    virtual void set_score(Score * score_l);
-    virtual void prepare(Moment);
+    virtual void set_score (Score * score_l);
+    virtual void prepare (Moment);
     virtual void finish();
     virtual void process();
-    virtual int depth_i() const { return Global_translator::depth_i();}
-    virtual Translator* ancestor_l(int l) { return Global_translator::ancestor_l(l);}
+    virtual int depth_i() const { return Global_translator::depth_i ();}
+    virtual Translator* ancestor_l (int l) { return Global_translator::ancestor_l (l);}
 
 protected:
     /* Engraver_group_engraver interface */
     virtual Staff_info get_staff_info()const;
-    virtual bool do_try_request(Request*);
+    virtual bool do_try_request (Request*);
     virtual void do_creation_processing();
     virtual void do_removal_processing();
-    virtual void announce_element(Score_elem_info);
+    virtual void announce_element (Score_elem_info);
     virtual void do_announces();
-    virtual void typeset_element(Score_elem*elem_p);
+    virtual void typeset_element (Score_elem*elem_p);
     virtual Paper_def * paper() const;
     virtual void do_pre_move_processing();
 };
index bfbc22f140889fb4e652bd16b6d08c4e0114f898..330cd310e24dca2515103af086ed100d5487deff 100644 (file)
@@ -16,7 +16,7 @@ public:
     DECLARE_MY_RUNTIME_TYPEINFO;
     Score_horizontal_align_engraver();
 protected:
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
     virtual void do_pre_move_processing();
 };
 #endif // SCORE_HALIGN_GRAV_HH
index b0b584e72a0bc937c3981502b0ac4f57b49f922a..1a56148425cb3c971313ece2bd041ecfa007628e 100644 (file)
@@ -23,19 +23,19 @@ public:
     ~Score_performer();
 
 protected:
-    virtual Translator* ancestor_l(int l);
+    virtual Translator* ancestor_l (int l);
     virtual int depth_i() const;
 
     virtual void finish();
-    virtual void prepare(Moment mom);
+    virtual void prepare (Moment mom);
     virtual void process();
-    virtual void set_score(Score* score_l);
+    virtual void set_score (Score* score_l);
     virtual void start();
     virtual int get_tempo_i() const;
-    virtual void play(Audio_element* p);
+    virtual void play (Audio_element* p);
 
 private:
-    void header(Midi_stream&);
+    void header (Midi_stream&);
 
     Moment now_mom_;
     Audio_column* audio_column_l_;
index 058fb173b0eb4fce16018a6f1049a7d595f3fbda..e99e448a056b4cb9211855d8244c4db18eff3803 100644 (file)
@@ -35,24 +35,24 @@ public:
 
     /// construction
     Score();
-    Score(Score const&);
+    Score (Score const&);
     ~Score();    
 
     /// do everything except outputting to file
     void process();
     
     /// output to file
-    void output(String fn);
+    void output (String fn);
 
     ///
-    void set(Midi_def* midi_p);
+    void set (Midi_def* midi_p);
     ///
-    void set(Paper_def* midi_p);
+    void set (Paper_def* midi_p);
 
     void print() const;
 
 private:
-    void run_translator(Global_translator*);
+    void run_translator (Global_translator*);
     void midi_output();
     void paper_output();
 
@@ -63,7 +63,7 @@ private:
     void paper();
 
     // utils:
-    PCursor<Score_column*> create_cols(Moment, PCursor<Score_column*> &last);
+    PCursor<Score_column*> create_cols (Moment, PCursor<Score_column*> &last);
 
     /**
       make the pcol_l_ fields of each Score_column point to the correct PCol,
index abde4af7a2a46105df1d99dccfa945d2c5f8df8d..9b9cf7d33f5f275c85c581eb49cd8b4527101f28 100644 (file)
@@ -20,16 +20,16 @@ public:
     DECLARE_MY_RUNTIME_TYPEINFO;
     Line_of_score();
     
-    void add(Score_elem *);
+    void add (Score_elem *);
 
     /// is #c# contained in #*this#?
-    bool contains_b(PCol const *c)const;
+    bool contains_b (PCol const *c)const;
     
     Link_array<Line_of_score> get_lines()const;
-    void set_breaking(Array<Col_hpositions> const&);
+    void set_breaking (Array<Col_hpositions> const&);
 
 protected:
-    virtual void break_into_pieces(bool);
+    virtual void break_into_pieces (bool);
     virtual Interval do_width()const;
     virtual void do_print() const;
     SCORE_ELEM_CLONE(Line_of_score);
index b3d73aac9520c4efdedc7ba93dc876245e330964..e5b83984b78e7ca10c6916c4e74c7639307288a9 100644 (file)
 #include "elem-group-item.hh"
 
 /** a struct for treating a group of noteheads (noteheads, stem
-  (chord) and scripts ) as a single entity.  */
+  (chord) and scripts) as a single entity.  */
 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_elem*, Score_elem*);
     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 *);
-    void add_support(Item*);
+    virtual void add (Script *);
+    void add_support (Item*);
 };
 
 #endif // SCRIPT_COLUMN_HH
index 65898a0549a91f963f668b1163f755c508947391..1dd72b7ec7eeec4df0d00c8443e57eea98e1ee3e 100644 (file)
@@ -34,13 +34,13 @@ public:
     virtual int rel_stem_dir_i()const;
     virtual int priority_i()const;
     virtual bool inside_b()const;
-    virtual Atom get_atom(Paper_def* p, int dir_i_)const;
+    virtual Atom get_atom (Paper_def* p, int dir_i_)const;
     DECLARE_MY_RUNTIME_TYPEINFO;
 
-    virtual bool do_equal_b(General_script_def const *)const;
+    virtual bool do_equal_b (General_script_def const *)const;
     virtual void do_print() const;
     Script_def();
-    void set_from_input(String, bool, int, int ,bool,int );
+    void set_from_input (String, bool, int, int ,bool,int);
 protected:
     VIRTUAL_COPY_CONS(Script_def,General_script_def);
 
index ce72d40deff7b96861431c2ad61af576abe07132..522fe5838ad3f438c81ec03e104c981bd244b80b 100644 (file)
@@ -19,7 +19,7 @@ public:
     DECLARE_MY_RUNTIME_TYPEINFO;
     Script_engraver();
 protected:
-    virtual bool do_try_request(Request*);
+    virtual bool do_try_request (Request*);
     virtual void do_process_requests();
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
index bd7a5cc08636ddec8ee50337adadc039fc7c7b9c..c15eae63302a084a5df6a7274a9b48ce21ca06ab 100644 (file)
@@ -19,7 +19,7 @@ class Script : public Item, public Staff_side {
 
 protected:
     Molecule *brew_molecule_p()const;
-    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
     virtual void do_print() const;
     virtual Interval symbol_height()const;
     virtual void do_pre_processing();
@@ -31,9 +31,9 @@ private:
 public:
     General_script_def *specs_l_;
     
-    static int compare(Script  *const&, Script *const&) ;
+    static int compare (Script  *const&, Script *const&) ;
     Script();
-    void set_stem(Stem*);
+    void set_stem (Stem*);
     DECLARE_MY_RUNTIME_TYPEINFO;
 
 };
index 277a846b7f8a78cf0f2b37123e31b596d0527539..35b2ca0df3c3b46797a4467952e57471d35ce822 100644 (file)
@@ -19,10 +19,10 @@ class Slur_engraver :public Engraver {
     /* *************** */
 protected:
     virtual ~Slur_engraver();
-    virtual bool do_try_request(Request*);
-    virtual void set_feature(Feature);
+    virtual bool do_try_request (Request*);
+    virtual void set_feature (Feature);
     virtual void do_process_requests();
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
 public:
index af44eb1d73148b3141648d75b44b4a3e33189b1c..083c073e75562f1dfc55f1fa0002486bfcda9c59 100644 (file)
 class Slur : public Bow {
 public:
     Link_array<Note_column> encompass_arr_;
-    void add(Note_column*);
+    void add (Note_column*);
 protected:
     virtual void set_default_dir();
     virtual void do_post_processing();
-    virtual void do_substitute_dependency(Score_elem*, Score_elem*);
+    virtual void do_substitute_dependency (Score_elem*, Score_elem*);
     virtual void do_pre_processing();
     SCORE_ELEM_CLONE(Slur);
     DECLARE_MY_RUNTIME_TYPEINFO;
index 03a63aaece2c4cede931bf504d3d93a8198f3715..eda25e6ffa9b34fac773043c9036ac95f29484c4 100644 (file)
@@ -29,7 +29,7 @@ public:
     Span_bar_engraver();
 protected:
     
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
     virtual void do_pre_move_processing();
     virtual Span_bar* get_span_bar_p()const;
 };
index 724caa3b9f52d52572069b28189b5bdc543f3821..644d9de0b4a6fbcaba3cb75e841d993b57959d75 100644 (file)
@@ -20,16 +20,16 @@ public:
     Span_bar();
     DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Span_bar);
-    void add(Bar* );
-    void setVertical_align_element *);
+    void add (Bar*);
+    void set (Vertical_align_element *);
 
 protected:
     virtual Interval do_width()const;
     virtual void do_pre_processing();
     
-    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
     virtual Molecule * brew_molecule_p()const;
-    virtual Symbol get_bar_sym(Real dy) const;
+    virtual Symbol get_bar_sym (Real dy) const;
 };
 
 #endif // SPAN_BAR_HH
index 675a6ec7a550516c403c899685e7a35eb9b25db7..ace2c84dc9848d45883d06e9219fd7d7567e61c0 100644 (file)
@@ -32,7 +32,7 @@ public:
     SCORE_ELEM_CLONE(Piano_brace);
 protected:
     virtual Interval do_width()const;
-    virtual Symbol get_bar_sym(Real) const;
+    virtual Symbol get_bar_sym (Real) const;
 };
 
 #endif // SPAN_SCORE_BAR_HH
index 79e1bd4cfdb90d76d299232d8c9236038242ff61..1152be157b5320dddd94591407f6917342d4c3f3 100644 (file)
@@ -39,7 +39,7 @@ public:
     virtual Spanner* spanner() { return this; }    
     Spanner();
     bool broken_b() const;
-    Spanner* find_broken_piece(Line_of_score*)const;
+    Spanner* find_broken_piece (Line_of_score*)const;
 protected:
     void set_my_columns();
     SCORE_ELEM_CLONE(Spanner);
@@ -47,7 +47,7 @@ protected:
     /**
       this is virtual; for instance, Line_of_score overrides it.
      */
-    virtual void break_into_pieces(bool);
+    virtual void break_into_pieces (bool);
 
     Link_array<Spanner> broken_into_l_arr_;
        
index 0a38a2e25539d34c1a6cff9f87d806685e6f01cf..27985d8e9ec09ebbe21d527efe76aa2105400013 100644 (file)
@@ -48,9 +48,9 @@ class Spring_spacer : public Line_spacer {
     Array<Colinfo> loose_col_arr_;
     
     /// mark column #i# as being loose.
-    void loosen_column(int i);
+    void loosen_column (int i);
     /// the index of #c# in #cols#
-    int col_id(PCol const *c) const;
+    int col_id (PCol const *c) const;
 
     /// generate an (nonoptimal) solution
     Vector find_initial_solution() const;
@@ -59,17 +59,17 @@ class Spring_spacer : public Line_spacer {
     bool check_feasible() const;
 
     /// does #this# contain the column #w#? 
-    bool contains(PCol const *w);
+    bool contains (PCol const *w);
 
     /// make the energy function
-    void make_matrices(Matrix &quad, Vector &lin,Real&) const;
+    void make_matrices (Matrix &quad, Vector &lin,Real&) const;
 
     /// generate the LP constraints
-    void make_constraints(Mixed_qp& lp) const;
+    void make_constraints (Mixed_qp& lp) const;
 
 
     void handle_loose_cols();
-    void position_loose_cols(Vector &) const;
+    void position_loose_cols (Vector &) const;
    /**
        add a idealspacing to the problem.
       
@@ -77,24 +77,24 @@ class Spring_spacer : public Line_spacer {
     since they can be "summed" if the columns to which #i# refers are
     not in this problem, the spacing is ignored.
     */
-    void add_ideal(Idealspacing const *i);
+    void add_ideal (Idealspacing const *i);
     Vector try_initial_solution() const;
     void calc_idealspacing();
-    void set_fixed_cols(Mixed_qp&)const;
+    void set_fixed_cols (Mixed_qp&)const;
 
-    Score_column* scol_l(int);
-    void connect(int i,int j, Real,Real);
+    Score_column* scol_l (int);
+    void connect (int i,int j, Real,Real);
     Line_of_cols error_pcol_l_arr()const;
 public:
     static Line_spacer *constructor();
 
-    virtual void solve(Col_hpositions*) const;
-    virtual void lower_bound_solution(Col_hpositions*) const;
-    virtual void add_column(PCol  *, bool fixed=false, Real fixpos=0.0);
+    virtual void solve (Col_hpositions*) const;
+    virtual void lower_bound_solution (Col_hpositions*) const;
+    virtual void add_column (PCol  *, bool fixed=false, Real fixpos=0.0);
  
 
     virtual Vector default_solution() const;
-    virtual bool check_constraints(Vector v) const;
+    virtual bool check_constraints (Vector v) const;
     virtual void OK() const;
     virtual void print() const;
     virtual void prepare();
index 73f174f1052e5ecf430362d5b6c47b76258f0515..7e7a75ea0254693ed113e245aec94a54957f0e9d 100644 (file)
@@ -37,15 +37,15 @@ public:
 
     int pos_i_;
 
-    void set_staffsym(Staff_symbol *  );
+    void set_staffsym (Staff_symbol * );
   
     Staff_side();
-    void add_support(Score_elem*);
+    void add_support (Score_elem*);
     DECLARE_MY_RUNTIME_TYPEINFO;
     
 protected:
     virtual Interval symbol_height() const;
-    virtual void do_substitute_dependency(Score_elem *, Score_elem*);
+    virtual void do_substitute_dependency (Score_elem *, Score_elem*);
     virtual void do_post_processing();
 };
 #endif // STAFF_SIDE_HH
index 513e0e2f3588a87e67dea6e71a6a254c1f638722..705d92b0e5d57caf41318b0e02ffb03eb6251426 100644 (file)
@@ -22,9 +22,9 @@ class Staff_symbol : public Spanner
 public:
 
 
-    void set_extent(PCol* p1, PCol* p2);
+    void set_extent (PCol* p1, PCol* p2);
     DECLARE_MY_RUNTIME_TYPEINFO;
-    Staff_symbol(int lines);
+    Staff_symbol (int lines);
     Real inter_note_f()const;
     int steps_i()const;
 protected:
index d4a8749f09abea31d10b415588785189fee10979..c7fe5ff4e80742d8a479345d283107905d7aa62e 100644 (file)
@@ -30,10 +30,10 @@ public:
 
 protected:
     ~Stem_beam_engraver();
-    virtual void set_feature(Feature dir_i_);
-    virtual bool do_try_request(Request*);
+    virtual void set_feature (Feature dir_i_);
+    virtual bool do_try_request (Request*);
     virtual void do_process_requests();
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
 };
index 46228d089a5ed1717ff01bd982b36af2e0fd09c2..3ea7c356087c38556025cfab24e77424c2cb72a7 100644 (file)
@@ -65,17 +65,17 @@ public:
 
     
     /* *************** */
-    Stem(int staff_size_i);
+    Stem (int staff_size_i);
     
     /// ensure that this Stem also encompasses the Notehead #n#
-    void add(Note_head*n);
+    void add (Note_head*n);
 
     DECLARE_MY_RUNTIME_TYPEINFO;
 
     Real hpos_f()const;
     
     void do_print() const;
-    void set_stemend(Real);
+    void set_stemend (Real);
     int get_default_dir();
     int get_center_distance_from_top();
     int get_center_distance_from_bottom();
@@ -94,7 +94,7 @@ public:
     int max_head_i() const;
     int min_head_i() const;
 protected:
-    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
     virtual void do_pre_processing();
     virtual Interval do_width() const;
     Molecule* brew_molecule_p() const;
index c6b7360e05a5338d673e680f57f136466ef25fa3..eb12e833a19942486327933ec80c2461a17cf426 100644 (file)
@@ -18,11 +18,11 @@ class Super_elem : public Score_elem {
 public:
     Link_array<Line_of_score> lines_arr_;
     Line_of_score * line_of_score_l_;
-    void add_broken_line(Line_of_score*);
+    void add_broken_line (Line_of_score*);
     Super_elem();
     virtual String TeX_string()const;
 protected:
-    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
     virtual void handle_broken_dependencies();
 
     virtual void do_add_processing();
index 9a0601a913dfce3b1b29badfafc520f72abcd89e..159f10707c80a3ad226ae6a3f5fa14c535156726 100644 (file)
@@ -18,8 +18,8 @@
  */
 class Swallow_engraver : public Engraver {
 protected:
-    bool acceptable_request_b(Request*) const;
-    bool do_try_request(Request*) ;
+    bool acceptable_request_b (Request*) const;
+    bool do_try_request (Request*) ;
 public:
     DECLARE_MY_RUNTIME_TYPEINFO;
 };
index a2e4a15a490649992b75fb5435aaa61729290f22..9e7218aa88c3cb720580662c19229882b9e1ab39 100644 (file)
@@ -16,7 +16,7 @@ class Swallow_performer : public Performer {
 public:
     DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    virtual bool do_try_request (Request* ) { return true; }
+    virtual bool do_try_request (Request*) { return true; }
 };
 
 #endif // SWALLOW_PERF_HH
index 3e2eafc7d3ab592a262a669f4d1d47fc386e4af9..f099fc657baa3ab2878f228e725b9fe2b14f921a 100644 (file)
@@ -30,15 +30,15 @@ struct Atom {
 
     /* *************** */
     
-    void translate(Offset o) {
+    void translate (Offset o) {
        off_ += o;
     }
-    void translate(Real r,Axis a){
+    void translate (Real r,Axis a){
        off_[a] += r;
     }
     /// how big is #this#?
     Box extent() const;
-    Atom(Symbol s);
+    Atom (Symbol s);
 
     void print() const;
 
index 5f902c4913c89118334527592b2c6c7a4533aa63..43a21aa50126fc214d0d9b125037f9498babca41 100644 (file)
@@ -10,7 +10,7 @@
 struct  Symtable : public Assoc<String, Symbol> {
     String id_str;
     
-    Symbol lookup(String)const;
+    Symbol lookup (String)const;
     void print()const;
 };
 
@@ -20,8 +20,8 @@ struct Symtables : private Assoc<String, Symtable*> {
     Symtable* operator()(String s);
     ~Symtables();
     Symtables();
-    Symtables(Symtables const&);
-    void add(String, Symtable*);
+    Symtables (Symtables const&);
+    void add (String, Symtable*);
     void print()const;
 };
 
index 5f0477a51acde09d6409abf84dd68e9a2b64f086..e8011bb3ee7ade21bc723a8b3049b02140b5facc 100644 (file)
@@ -20,7 +20,7 @@ public:
     int line_len_i_;
     
     /// open a file for writing
-    Tex_stream(String filename);
+    Tex_stream (String filename);
     void header();
     /// delegate conversion to string class.
     Tex_stream &operator<<(String);
@@ -28,6 +28,6 @@ public:
     /// close the file
     ~Tex_stream();
 private:
-    Tex_stream(Tex_stream const&);
+    Tex_stream (Tex_stream const&);
 };
 #endif
index 386c9b29ddc5e2486da5737f4eac276b8c0e40ef..80850cafa98ac824c2d6d4f9d6ae3aa9f3c92a17 100644 (file)
   this function provides a simple macro mechanism:
 
   if source == "tex%bla%", then
-  substitute_args(source, {"X","Y"})  == "texXblaY"
+  substitute_args (source, {"X","Y"})  == "texXblaY"
   */
 String
-substitute_args(String source, Array<String> args);
+substitute_args (String source, Array<String> args);
 
 /// parameter substitution in TeX_strings
 String
-substitute_args(String source, Array<Scalar> args);
+substitute_args (String source, Array<Scalar> args);
 
 /// #h# is in points
-String vstrut(Real h);
+String vstrut (Real h);
 
 
 #endif
index 3f7d4332460d4caff2bf8e07c5797bb99941eeeb..3f13add20511664f9e11c7050220da09411d67ae 100644 (file)
@@ -14,7 +14,7 @@
 
 class Text_def : public General_script_def {
 protected:
-    virtual Atom get_atom(Paper_def* p, int dir_i_)const;
+    virtual Atom get_atom (Paper_def* p, int dir_i_)const;
     DECLARE_MY_RUNTIME_TYPEINFO;
     VIRTUAL_COPY_CONS(Text_def,General_script_def);
 public:
@@ -30,10 +30,10 @@ public:
     
     virtual void do_print() const;
     virtual ~Text_def() {};
-    virtual bool do_equal_b(const General_script_def*)const;
+    virtual bool do_equal_b (const General_script_def*)const;
     Text_def();
     virtual void print() const;
-    Interval width(Paper_def*) const;
+    Interval width (Paper_def*) const;
 };
 
 #endif // TEXT_DEF_HH
index 4f3b3f23a5bc13ad719e3a231fba5e9f52c47a14..80540bae26a2d1f7deb36938767560fa9a8fe055 100644 (file)
@@ -15,12 +15,12 @@ class Text_engraver : public Engraver{
     int dir_i_;
     /* *************** */
 protected:
-    virtual void set_feature(Feature );
-    virtual bool do_try_request(Request*);
+    virtual void set_feature (Feature);
+    virtual bool do_try_request (Request*);
     virtual void do_process_requests();
     virtual void do_pre_move_processing();
     virtual void do_post_move_processing();
-    virtual void acknowledge_element(Score_elem_info);
+    virtual void acknowledge_element (Score_elem_info);
 public:
     Text_engraver();
     DECLARE_MY_RUNTIME_TYPEINFO;
index 0019a5f8e0da5e42c7e395bc05c7726d491e2f53..45436405401352897085df8b73715e42120e5a75 100644 (file)
@@ -15,7 +15,7 @@
   print a fixed width text above or below the staff.
  */
 class Text_item : public Item ,public Staff_side{
-    void init(Text_def* tdef_l); 
+    void init (Text_def* tdef_l); 
  
 public:
 
@@ -24,7 +24,7 @@ public:
     
     /* ***************/
 
-    Text_item(General_script_def*,int dir=0);
+    Text_item (General_script_def*,int dir=0);
     virtual ~Text_item();
     DECLARE_MY_RUNTIME_TYPEINFO;
 
index ff06829345fedc82b1b777ba45a52ce34316135e..3bed16878765acc811c9ce3feda54dc0a66e83fb 100644 (file)
@@ -20,13 +20,13 @@ public:
     Offset text_off_;
     DECLARE_MY_RUNTIME_TYPEINFO;
 
-    void set_support(Directional_spanner*);
+    void set_support (Directional_spanner*);
     Text_spanner();
-    Text_spanner(Text_spanner const&);
+    Text_spanner (Text_spanner const&);
 protected:
     SCORE_ELEM_CLONE(Text_spanner);
     ~Text_spanner();
-    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
     virtual void do_pre_processing();
     virtual void do_post_processing();
     virtual Interval height() const ;
index 8a07a27b7502ba238b5835ec236d03ef1889ad3c..63f472e3d8295ce70c4d648d919ba30c6d0292f6 100644 (file)
@@ -24,14 +24,14 @@ class Tie_engraver : public Engraver {
     
 protected:
     virtual ~Tie_engraver();
-    virtual void acknowledge_element(Score_elem_info);
-    virtual bool do_try_request(Request*);
-    virtual bool acceptable_request_b(Request*);
+    virtual void acknowledge_element (Score_elem_info);
+    virtual bool do_try_request (Request*);
+    virtual bool acceptable_request_b (Request*);
     virtual void sync_features();
     virtual void do_process_requests();
     virtual void do_post_move_processing();
     virtual void do_pre_move_processing();
-    virtual void set_feature(Feature);
+    virtual void set_feature (Feature);
 public:
     Tie_engraver();
     DECLARE_MY_RUNTIME_TYPEINFO;
index 9d8c35496b33af124608319fabaacd3249f11086..fde107fb8120966a88aa3fb873e7c4067ce9bc7a 100644 (file)
@@ -19,13 +19,13 @@ class Tie : public Bow {
     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_elem*,Score_elem*);
     
 public:
     bool same_pitch_b_;
     Note_head * left_head_l_;
     Note_head * right_head_l_;
-    void set_head(int, Note_head*head_l);
+    void set_head (int, Note_head*head_l);
 
     Tie();
     DECLARE_MY_RUNTIME_TYPEINFO;
index a7ace609f1452b3032813405fcbff6683d70e794..cbc25ded74e413c8b5528b4acb36cd8e503d8244 100644 (file)
@@ -34,29 +34,29 @@ struct Time_description {
     int bars_i_;
 
     /* *************** */
-    void set_cadenza(bool);
+    void set_cadenza (bool);
     void OK() const;
     Time_description();
-    void add(Moment dt);
+    void add (Moment dt);
     bool allow_meter_change_b();
     String str()const;
     void print() const;
-    void setpartial(Moment p);
-    String try_set_partial_str(Moment)const;
+    void setpartial (Moment p);
+    String try_set_partial_str (Moment)const;
     Moment barleft()const;
     Moment next_bar_moment()const;
-    void set_meter(int,int);
+    void set_meter (int,int);
     static int compare (const Time_description&, const Time_description&);
 };
 
 #include "compare.hh"
 
 
-instantiate_compare(Time_description&,Time_description::compare);
+INSTANTIATE_COMPARE(Time_description&,Time_description::compare);
 
 
 void
-process_timing_reqs(Time_description &time_, 
+process_timing_reqs (Time_description &time_, 
                    Rhythmic_grouping *default_grouping,
                    Array<Timing_req*> const& timing_req_l_arr);
 #endif // Time_description_HH
index 96abc5c865367ce086fd4fbb34658a04e0aa13bb..d65a831689318395bf22530cf1af5d1e8877dbd0 100644 (file)
@@ -25,8 +25,8 @@ class Timing_engraver : public Engraver
     
     Link_array<Timing_req> timing_req_l_arr_;
  
-    virtual void fill_staff_info(Staff_info&);
-    virtual bool do_try_request(Request *req_l);
+    virtual void fill_staff_info (Staff_info&);
+    virtual bool do_try_request (Request *req_l);
     virtual void do_process_requests();
     virtual void do_pre_move_processing();
     virtual void do_creation_processing();
index 772b666ff5cef2ca9b2ded392d351fe161d441cc..17088c668fed2625a991bbf5a4772a0b6e0ff9b4 100644 (file)
@@ -26,9 +26,9 @@ public:
     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 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();
index 0fc0029b5bdc6ab01ebd12ced7091bd363a28499..3683b304ba94d6c8f57c3ebae49100e9cd7cc47b 100644 (file)
 class Vertical_align_element : virtual public Score_elem {
     Link_array<Score_elem> elem_l_arr_;
 public:
-    void add(Score_elem*);
-    bool contains_b(Score_elem const*)const;
+    void add (Score_elem*);
+    bool contains_b (Score_elem const*)const;
     Vertical_align_element();
     DECLARE_MY_RUNTIME_TYPEINFO;
 protected:
-    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
     virtual void do_post_processing() ;
 };
 #endif // VERTICAL_ALIGN_ITEM_HH
index 4df768bcdc56cff007acce6c5a4c5dd393989d85..685073e242c7432f4f917146ea9a96ea2b534515 100644 (file)
@@ -19,7 +19,7 @@ public:
     DECLARE_MY_RUNTIME_TYPEINFO;
     Vertical_align_engraver();
 protected:
-   virtual void acknowledge_element(Score_elem_info);
+   virtual void acknowledge_element (Score_elem_info);
    virtual void do_creation_processing();
    virtual void do_removal_processing();
 };
index fefe52a302bdc30475d5c2d93d4f7adcf5f905fd..489586505f4fcee7e407876fdaca91ae6734a954 100644 (file)
@@ -18,7 +18,7 @@ class Vertical_align_spanner : public Vertical_align_element, public Spanner
 public:
     DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Vertical_align_spanner);
-    virtual void do_print() const { Vertical_align_element::do_print() ; }
+    virtual void do_print() const { Vertical_align_element::do_print () ; }
     
 };
 #endif // VERTICAL_ALIGN_SPANNER_HH
index ab90bdb6b657cab7a39543ad0e2038e1ef21dfec..ee08375d6ecbce87b58dab1bea8501c8241d6657 100644 (file)
@@ -19,11 +19,11 @@ class Vertical_group_spanner : public Axis_group_spanner, public Vertical_group_
 {
 protected:
     SCORE_ELEM_CLONE(Vertical_group_spanner);
-    virtual void remove_all() { Vertical_group_element::remove_all(); }
+    virtual void remove_all() { Vertical_group_element::remove_all (); }
 public:
     DECLARE_MY_RUNTIME_TYPEINFO;
-    virtual void add_element(Score_elem*e) { Vertical_group_element::add_element(e); }
-    virtual void remove_element(Score_elem*e) { Vertical_group_element::remove_element(e); }
+    virtual void add_element (Score_elem*e) { Vertical_group_element::add_element (e); }
+    virtual void remove_element (Score_elem*e) { Vertical_group_element::remove_element (e); }
   
 };
 
index 843f2d571e3a36d7961ac374392c77b689a61b3a..38f57d574db6085b927b5292d1a03426541176ce 100644 (file)
@@ -13,7 +13,7 @@
 #include "engraver-group.hh"
 
 /**
-  A group of voices which share certain characteristics (such as beams. ).
+  A group of voices which share certain characteristics (such as beams.).
  */
 class Voice_group_engravers  : public Engraver_group_engraver {
     Moment termination_mom_;
@@ -21,13 +21,13 @@ class Voice_group_engravers  : public Engraver_group_engraver {
 
 protected:
     virtual void do_print() const;
-    virtual Scalar get_feature(String);
-    virtual bool do_try_request(Request*);
+    virtual Scalar get_feature (String);
+    virtual bool do_try_request (Request*);
 public:
     
     
     DECLARE_MY_RUNTIME_TYPEINFO;
-    static bool static_acceptable_request_b(Request*);
+    static bool static_acceptable_request_b (Request*);
     Voice_group_engravers();
 };
 #endif // VOICEGROUPGRAVS_HH