]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.1.12 release/0.1.12
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 2 Sep 1997 22:54:34 +0000 (00:54 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 2 Sep 1997 22:54:34 +0000 (00:54 +0200)
54 files changed:
Documentation/gnu-music.pod
Documentation/index.pod
Documentation/mutopia.pod
Documentation/other-packages.pod
NEWS
TODO
VERSION
flower/NEWS
flower/VERSION
flower/include/assoc.hh
flower/include/choleski.hh
flower/include/cursor.hh
flower/include/data-file.hh
flower/include/diagonal-storage.hh
flower/include/directed-graph.hh
flower/include/full-storage.hh
flower/include/full-storage.icc
flower/include/interval.hh
flower/include/lgetopt.hh
flower/include/list.hh
flower/include/list.icc
flower/include/matrix.hh
flower/include/pcursor.hh
flower/include/plist.hh
flower/include/string-data.icc
flower/include/string-handle.icc
flower/include/string.hh
flower/include/text-stream.hh
init/paper16.ly
input/gallina.tex
input/kortjakje.ly
lily/VERSION
lily/axis-group.cc
lily/header.cc
lily/include/header.hh
lily/include/lookup.hh
lily/include/main.hh
lily/lily-version.cc
lily/main.cc
lily/my-lily-parser.cc
lily/score.cc
lily/scores.cc
lily/slur.cc
lily/tex-slur.cc
lily/tie.cc
lily/version.cc
make/lilypond.lsm
make/lilypond.lsm.in
make/lilypond.spec
make/lilypond.spec.in
mi2mu/midi-parser.cc
tex/eglerdefs.tex
tex/lilyponddefs.tex
tex/taupindefs.tex

index 3398e283bcbb7baab2503442099754e85112bc33..ae733b26673750dfb5d36beee68885dfbd2a4652 100644 (file)
@@ -147,10 +147,6 @@ automatic accompaniment, etc.
 
 =back
 
-=head1 PLAN
-
-
-
 =head1 PROGRAMS
 
 =over 4
index 29ec80b6a3ef29902dd3b553cf1ee0733b4e8636..f1b1603b7e903cffcf849871c058a5245ba8118b 100644 (file)
@@ -98,6 +98,9 @@ The lilypond logo (medium size, format: .gif)
 
 =head2 Documentation: manpages, manuals
 
+
+=over 4
+
 =item *
 <a href=tex_manuals.html
 >
index b4736649965bb952c04a394161b593904c5cc74d..783d5bd74a48ec52446aec93f814e1567cd495a7 100644 (file)
@@ -7,8 +7,7 @@ Mutopia project - manifesto
 Random ranting about the Mutopia project, aka "Music To the People." 
 
 This is the ultimate goal which I want to accomplish using LilyPond
-and mudela. This project is still vapourware, so don't ask questions
-unless you want to put in effort into The GNU Music project,
+and mudela. 
 
 =head1 WHY
 
@@ -36,3 +35,27 @@ call The Mutopia Project.
 
 
 
+
+=head1 STATUS
+
+This project is still in its vapourware stage, so don't ask questions
+unless you want to put in effort into The GNU Music project.
+
+Just as an aside, the LilyPond package includes the following music:
+
+=over 4
+
+=item *
+
+J.S. Bach, Das Wohltemperierte Clavier I: C major Prelude & Fugue, C
+minor fugue.  Solo cello suites: suite II, menuetto (alto version).
+
+=item * 
+
+F. Schubert, St\"andchen (Serenade) "Leise flehen meine Lieder"
+
+=item * 
+
+Tarquinio Merula, La Gallina a 2 violini
+
+=back
index 62382678432bc401e4c514a1a0a9488f3556ec2b..7850eb4316d88b9b51172e744b35a9f49a673449 100644 (file)
@@ -40,11 +40,21 @@ A TROFF preprocessor by Eric Foxley
 
 A Preprocessor for MusiXTeX by Don Simons
 
-=item Musi*TeX, http://www.gmd.de/Misc/Music/
+=item Musictex, http://www.gmd.de/Misc/Music/
 
-MusixTeX is a macro package for TeX to typeset polyphonic or
-instrumental music by Daniel Taupin, Ross Mitchell and Andreas
-Egler. It includes a full-featured set of fonts.
+MusicTeX is a macro package for TeX to typeset polyphonic or
+instrumental music.  It is originally written by Daniel Taupin, Ross
+Mitchell and Andreas Egler. 
+
+It includes a full-featured set of fonts.
+
+=item MusiXTeX, http://www.gmd.de/Misc/Music/
+
+Daniel Taupin's branch of MusicTeX.
+
+=item OpusTeX, http://www.inf.ethz.ch/department/Department.html/achermann/opustex
+
+Andreas Egler's branch of MusicTeX.
 
 =item ABC2MTeX, http://www.gre.ac.uk/~c.walshaw/abc
 
@@ -61,6 +71,7 @@ available on request. (?)
 A TeX macro package for typesetting single-staff music by Angelika
 Schofer & Andrea Steinbach. With some fonts
 
+
 =head2 Free (zero cents)
 
 =item Calliope, http://www.cl.cam.ac.uk/users/wfc/
@@ -96,11 +107,6 @@ Notation/engraving on Acorn machines.
 
 =item Personal Composer
 
-=item MusE
-
-A-R Music Engraving, by A-R Editions, Inc. Professional engraving on
-Sun boxen.
-
 =item Mozart, http://www.mozart.co.uk/
 
 A shareware windows package  
@@ -113,6 +119,11 @@ A shareware windows package
 
 =head2 Unknown
 
+=item MusE
+
+A-R Music Engraving, by A-R Editions, Inc. Professional engraving on
+Sun boxen.
+
 =item MusiCopy, ? 
 
 A project at Ohio State university, which was discontinued in 1987.
diff --git a/NEWS b/NEWS
index b7e1b5bba14bb0e5c7aa24a41b9ee992fd55b70f..d86ec1c927d7c25f6a427dafd62a17fcb58b68ed 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,12 @@
+pl 12
+       - bf: don't redefine tex primitives like \textfont and  \mathfont
+       - nicer broken slurs (?)
+       - bf: error status upon parse error
+       - robustness in Lookup::*slur
+       - bf: mi2mu: warn if 0-length string in midi-file
+       - output id-footer
+********
+sep 1
 
 pl 11
        - forms for Musical vocabulary 
diff --git a/TODO b/TODO
index ff14045e1e4a85bf89aa85bb4769988d1ab54f6b..12aee1d8b043efd8601b9aba7ee7f656ee5196cd 100644 (file)
--- a/TODO
+++ b/TODO
@@ -6,6 +6,9 @@ done, or is an idea that I want to think about
 Most of the items are marked in the code as well, with full explanation. 
 grep for TODO and ugh/ugr
 
+
+       * move to OpusTeX fonts
+
        * check out egcs
        
        * give Items/Spanners access to unbroken originals      
@@ -382,15 +385,12 @@ IDEAS
 
        * Klavarskribo?
 
-       * return status on exit
-
        * lyrics in chords still fuck up.
 
        *
        - rewire acknowledge_element() logic with a process_acknowledged()
        - construct Stem upon receiving Notehead. Junk Stem_req
 
-
        * pushgroup/popgroup
 
        * whole head on ledger line
diff --git a/VERSION b/VERSION
index 3747f21228c658688daeb3b1523e6e55c19c71b0..1ae5036c7daa8cd6db33d05c759c08bb49071ed3 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 1
-TOPLEVEL_PATCH_LEVEL = 11
+TOPLEVEL_PATCH_LEVEL = 12
 
 # use to send patches, always empty for released version:
 TOPLEVEL_MY_PATCH_LEVEL = 
index d26a6f344b58837f55e59f7f61f3d4e7ed1d7135..803bfd6dbe594d96b9bbfe6550c1d04ea80219a6 100644 (file)
@@ -1,3 +1,7 @@
+pl 28
+       - String::bool ()
+       - GNU indentation.
+
 pl 27
        - naming: macros are MACROS
 
index 2d9d483b196d927d556979f9106ad4f26434dc89..da049c7e3ce08c50392011a1bae57291b64c4284 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 1
 MINOR_VERSION = 1
-PATCH_LEVEL = 27
+PATCH_LEVEL = 28
 # use to send patches, always empty for released version:
 MY_PATCH_LEVEL = # include separator: "-1" or ".a"
 #
index 92a7c8ee108602dc83beaf995404b1f899ca0eca..2ca31125cf7cd96b526dc88b90c99a73775803cb 100644 (file)
@@ -9,9 +9,9 @@
  */
 template<class K, class V>
 struct Assoc_ent_ {
-    bool free;
-    K key;
-    V val;
+  bool free;
+  K key;
+  V val;
 };
 
 
@@ -22,65 +22,65 @@ struct Assoc_ent_ {
  */
 template<class K, class V>
 struct Assoc {
-    Array< Assoc_ent_<K,V> > arr;
+  Array< Assoc_ent_<K,V> > arr;
 
-    /* ************** */
+  /* ************** */
     
-    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 (K key) const {
+    for (int i = 0; i < arr.size(); i++) {
+      if (!arr[i].free && key == arr[i].key)
+       return i;
     }
-    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) {
-               free = i;
-           }
-       }
-       if (free >= 0){
-           arr[free].free = false;
-           arr[free].key = key;
-           return free;
-       }
-
-       Assoc_ent_<K,V> ae;
-       ae.free = false;
-       ae.key = key;
-       arr.push (ae);
-       return arr.size() -1;
-    }
-public:
-    bool elt_b (K key) const {
-       return find (key) >= 0;
-    }
-    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);
-       arr[i].val = val;
+    return -1;
+  }
+  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) {
+       free = i;
+      }
     }
-    V& elem (K key) {
-       return arr[find_creat (key)].val;
-       }
-    V& operator[](K key) {
-       return elem (key);
-    }
-    V const & operator[](K key) const {
-       return elem (key);
-    }
-    V const & elem (K key) const { 
-       assert (elt_b (key));
-       return arr[find (key)].val;
+    if (free >= 0){
+      arr[free].free = false;
+      arr[free].key = key;
+      return free;
     }
+
+    Assoc_ent_<K,V> ae;
+    ae.free = false;
+    ae.key = key;
+    arr.push (ae);
+    return arr.size() -1;
+  }
+public:
+  bool elt_b (K key) const {
+    return find (key) >= 0;
+  }
+  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);
+    arr[i].val = val;
+  }
+  V& elem (K key) {
+    return arr[find_creat (key)].val;
+  }
+  V& operator[](K key) {
+    return elem (key);
+  }
+  V const & operator[](K key) const {
+    return elem (key);
+  }
+  V const & elem (K key) const { 
+    assert (elt_b (key));
+    return arr[find (key)].val;
+  }
 };
 
 #endif
index a1c3a8c47e172b718d0bb9053e9a6cdf8ac1e9ad..f4b5e2981499438255bd4b0cd5613ff82bfdd012 100644 (file)
     */
 struct Choleski_decomposition {
 
-    /// lower triangle of Choleski decomposition
-    Matrix L;
+  /// lower triangle of Choleski decomposition
+  Matrix L;
 
-    /// diagonal 
-    Vector D;
+  /// diagonal 
+  Vector D;
 
-    /** Create decomposition of P. 
+  /** Create decomposition of P. 
     PRE
     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;
-    void solve (Vector &dest, Vector const &rhs) const;
-    Vector operator * (Vector rhs) const { return solve (rhs); }
+  Vector solve (Vector rhs) const;
+  void solve (Vector &dest, Vector const &rhs) const;
+  Vector operator * (Vector rhs) const { return solve (rhs); }
   /**
     return the inverse of the matrix P.
     */
-    Matrix inverse() const;
-    /**
+  Matrix inverse() const;
+  /**
     return P,  calc'ed from L and D
     */
-    Matrix original() const;
+  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 4abefd3dea5f5eac5654846f8f2a8636cc6b48ba..f19f3ac62b723810dfe9db3cd0924648e8ebaa04 100644 (file)
@@ -17,89 +17,89 @@ template<class T> class List;
 template<class T>
 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);
-    /**
-      Create an invalid cursor (pointing to nothing, associated with   no list.)
-     */
-    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);
-
-    /// make cursor with #no# items back
-    Cursor<T> operator -( int no) const;
-
-    /// make cursor with #no# items further
-    Cursor<T> operator +( int no) const;
-    int operator -(Cursor<T> op) const;
-    Cursor<T> operator -=(int);
-    Cursor<T> operator +=(int);
-    /// move one down
-    void next();
-    /// move one up.
-    void previous();
-    /// return current and move one down
-    Cursor<T> operator ++( int);
+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);
+  /**
+    Create an invalid cursor (pointing to nothing, associated with   no list.)
+    */
+  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);
+
+  /// make cursor with #no# items back
+  Cursor<T> operator -( int no) const;
+
+  /// make cursor with #no# items further
+  Cursor<T> operator +( int no) const;
+  int operator -(Cursor<T> op) const;
+  Cursor<T> operator -=(int);
+  Cursor<T> operator +=(int);
+  /// move one down
+  void next();
+  /// move one up.
+  void previous();
+  /// return current and move one down
+  Cursor<T> operator ++( int);
     
-    /// return current and move one up
-    Cursor<T> operator --( int); 
+  /// return current and move one up
+  Cursor<T> operator --( int); 
 
-    /// point to link?
-    bool ok() const;
+  /// point to link?
+  bool ok() const;
 
-    /// ++ items left?
-    bool forward() const;              
+  /// ++ items left?
+  bool forward() const;                
 
-    /// -- items left?
-    bool backward() const;
+  /// -- items left?
+  bool backward() const;
 
-    /**  put (copy) after me in List. 
-      analogously to editor. ok() interpreted as at end
-      of line.
+  /**  put (copy) after me in List. 
+    analogously to editor. ok() interpreted as at end
+    of line.
 
-      PRE: !ok, POST: added to bottom()
+    PRE: !ok, POST: added to bottom()
 
-      PRE: ok, POST: added after me
+    PRE: ok, POST: added after me
 
-      cursor points to same object, cursor.next() is newly added
-      object.
-      */
-    void add (T const & thing);
+    cursor points to same object, cursor.next() is newly added
+    object.
+    */
+  void add (T const & thing);
 
-    /**  put (copy) before me in List. 
-      analogously to editor. ok() interpreted as at begin of
-      line.
+  /**  put (copy) before me in List. 
+    analogously to editor. ok() interpreted as at begin of
+    line.
       
-      PRE: !ok, POST: add to top()
+    PRE: !ok, POST: add to top()
 
-      PRE: ok, POST: add before me
+    PRE: ok, POST: add before me
 
-      cursor points to same object, cursor.previous()
-      is newly inserted object.
-      */
+    cursor points to same object, cursor.previous()
+    is newly inserted object.
+    */
     
-    void insert (T const & thing);
-    ///
-    void backspace();
+  void insert (T const & thing);
+  ///
+  void backspace();
 
-    /// 
-    void del();
+  /// 
+  void del();
     
-    /// 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; }
+  /// 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; }
 private:
-    List<T>& list_;
-    Link<T>* pointer_;
+  List<T>& list_;
+  Link<T>* pointer_;
 };
 
 
index fa75f69922f328b3c997b595ccbc561a6d8adc5c..93cd3f2bc5714a2b7f80b60c848a366940b8ee51 100644 (file)
 class Data_file : private Text_stream
 {
     
- public:
-    bool rawmode;
+public:
+  bool rawmode;
 
-    Text_stream::line;    
-    Text_stream::eof;
-    Text_stream::get_name;    
+  Text_stream::line;    
+  Text_stream::eof;
+  Text_stream::get_name;    
 
-    char data_get();    
-    void data_unget (char c) {
-       unget (c);
-    }
+  char data_get();    
+  void data_unget (char c) {
+    unget (c);
+  }
 
-    /// read line, eat #\n#
-    String get_line();
+  /// read line, eat #\n#
+  String get_line();
     
-    /// read a word till next space, leave space. Also does quotes
-    String get_word();
-
-    /// gobble horizontal white stuff.
-    void gobble_white();
-
-    /// gobble empty stuff before first field.
-    void gobble_leading_white();
-    Data_file (String s) : Text_stream (s) {
-       //*mlog << "(" << s << flush;   
-       rawmode=  false;        
-    }
-
-    ~Data_file()  {
-       //      *mlog << ")"<<flush;    
-    }    
-
-    warning (String s) {
-       message ("warning: " + s);
-    }
-    error (String s){
-       message (s);
-       exit (1);    
-    }
+  /// read a word till next space, leave space. Also does quotes
+  String get_word();
+
+  /// gobble horizontal white stuff.
+  void gobble_white();
+
+  /// gobble empty stuff before first field.
+  void gobble_leading_white();
+  Data_file (String s) : Text_stream (s) {
+    //*mlog << "(" << s << flush;      
+    rawmode=  false;   
+  }
+
+  ~Data_file()  {
+    // *mlog << ")"<<flush;    
+  }    
+
+  warning (String s) {
+    message ("warning: " + s);
+  }
+  error (String s){
+    message (s);
+    exit (1);    
+  }
 };
 #endif // DATAFILE_HH
index f000cf23878fa6c6d65d313fa22cd198bfd9d8c0..f3883e1ca400e0fc718dd4e6cc9affe80d4f9106 100644 (file)
   
  */
 class Diagonal_storage : public Matrix_storage {
-    Full_storage band_;
+  Full_storage band_;
 
 public:
-     void set_band_size (int b);
-   int band_size_i() const;
+  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 int dim() const;
+  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 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);
-    Diagonal_storage();
-    void OK() const;
+  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;
-    DECLARE_VIRTUAL_COPY_CONS(Diagonal_storage, Matrix_storage);
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    virtual bool try_right_multiply (Matrix_storage * dest, Matrix_storage const *) const;
+  ~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;
+  DECLARE_VIRTUAL_COPY_CONS(Diagonal_storage, Matrix_storage);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  virtual bool try_right_multiply (Matrix_storage * dest, Matrix_storage const *) const;
 };
 #endif // DIAGONAL_STORAGE_HH
index f82222158580c06e72301ac727b85d4e9aacbf85..5c9b8bc8b0bbdda256d80a07033cf72087a952d0 100644 (file)
   Class to handle two-sided connections between nodes (the Dependencies)
  */
 class Directed_graph_node {
-    Link_array<Directed_graph_node>edge_out_l_arr_;
-    /// targets
-    Link_array<Directed_graph_node> edge_in_l_arr_;
+  Link_array<Directed_graph_node>edge_out_l_arr_;
+  /// targets
+  Link_array<Directed_graph_node> edge_in_l_arr_;
     
 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&);
-    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;
-
-    Directed_graph_node (Directed_graph_node const &);
-    void OK() const;
-    Directed_graph_node();
-
-    ~Directed_graph_node();
+  /** 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&);
+  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;
+
+  Directed_graph_node (Directed_graph_node const &);
+  void OK() const;
+  Directed_graph_node();
+
+  ~Directed_graph_node();
     
-    /**
-     ensure that no edge_out exists doubly.
-     */
-    void uniq();
-    Link_array<Directed_graph_node> const& get_out_edge_arr() const;
-    Link_array<Directed_graph_node> const& get_in_edge_arr() const;
+  /**
+    ensure that no edge_out exists doubly.
+    */
+  void uniq();
+  Link_array<Directed_graph_node> const& get_out_edge_arr() const;
+  Link_array<Directed_graph_node> const& get_in_edge_arr() const;
 };
 
 #endif // DEPENDENCY_HH
index 50eb0e0109979b9c0e6678d4e2ae991ec53d69b1..45750029168186b4b844bd2e43ea2f9715ec83f3 100644 (file)
 /// simplest matrix storage. refer to its baseclass for the doco.
 class Full_storage : public Matrix_storage
 {
-    /// height, width
-    int height_i_,width_i_;
-    /// maxima.
-    int max_height_i_, max_width_i_;
+  /// height, width
+  int height_i_,width_i_;
+  /// maxima.
+  int max_height_i_, max_width_i_;
     
     /// the storage
-    Real** els_p_p_;
+  Real** els_p_p_;
 
-    void
-    init() ;
+  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 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 ;
-    int dim() const;
-    Full_storage (Matrix_storage*);
-    Full_storage();
-    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 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();
+  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;
-    DECLARE_VIRTUAL_COPY_CONS(Full_storage,Matrix_storage);
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    virtual bool try_right_multiply (Matrix_storage * dest, Matrix_storage const *) const;
+  ~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;
+  DECLARE_VIRTUAL_COPY_CONS(Full_storage,Matrix_storage);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  virtual bool try_right_multiply (Matrix_storage * dest, Matrix_storage const *) const;
 };
 
 #endif // FULL_STORAGE_HH
index c919bf1ac904abe1b75f2b40f6bb43c6ac135136..a8ad166711c53e39a65d1f089489a3bf65373eb1 100644 (file)
@@ -21,7 +21,7 @@ INLINE bool
 Full_storage::valid (int i, int j) const
 {
   return (i>=0 && i < height_i_)
-       && (j < width_i_ && j >=0);
+    && (j < width_i_ && j >=0);
 }
 
 
index 865a7915749049af429f0b535ef1e1e9bb4e35f7..2fd76090a327ec3187352016d1c7fc94718ed6dd 100644 (file)
   */
 template<class T>
 struct Interval_t {
-    T left, right;
+  T left, right;
 
-    /* ************** */
+  /* ************** */
     
-    static T infinity() ;
+  static T infinity() ;
     
-    T center() { return (left + right) / T(2);}
-    void translate (T t) {
-       left += t;
-       right += t;
+  T center() { return (left + right) / T(2);}
+  void translate (T t) {
+    left += t;
+    right += t;
+  }
+  T& idx (int j) {
+    if (j==-1)
+      return left;
+    else if (j==1)
+      return right;
+    else
+      assert (false);
+    return left;               
+  }
+  T& operator[](int j) {
+    return idx (j);
+  }
+  T operator[](int j) const {
+    return ((Interval_t<T> *)this)->idx (j);
+  }
+  T &max() { return right;}
+  T max() const { return right;}
+  T min() const{ return left; }
+  T &min(){ return left; }
+  /**
+    PRE
+    *this and h are comparable
+    */
+  void unite (Interval_t<T> h);
+  void intersect (Interval_t<T> h);
+
+  T length() const;
+  void set_empty() ;
+  bool empty_b() const { return left > right; }
+  bool contains_b (Interval_t<T> const&) const;
+  Interval_t() {
+    set_empty();
+  }
+  Interval_t (T m, T M) {
+    left =m;
+    right = M;
+  }
+  Interval_t<T> &operator += (T r) {
+    left += r;
+    right +=r;
+    return *this;
+  }
+  Interval_t<T> &operator *=(T r) {
+    left *= r;
+    right *= r;
+    if (r < T(0)) {
+      T t = left;
+      left = right;
+      right = t;
     }
-    T& idx (int j) {
-       if (j==-1)
-           return left;
-       else if (j==1)
-           return right;
-       else
-           assert (false);
-       return left;            
-    }
-    T& operator[](int j) {
-       return idx (j);
-    }
-    T operator[](int j) const {
-       return ((Interval_t<T> *)this)->idx (j);
-    }
-    T &max() { return right;}
-    T max() const { return right;}
-    T min() const{ return left; }
-    T &min(){ return left; }
-    /**
-      PRE
-      *this and h are comparable
-      */
-    void unite (Interval_t<T> h);
-    void intersect (Interval_t<T> h);
-
-    T length() const;
-    void set_empty() ;
-    bool empty_b() const { return left > right; }
-    bool contains_b (Interval_t<T> const&) const;
-    Interval_t() {
-       set_empty();
-    }
-    Interval_t (T m, T M) {
-       left =m;
-       right = M;
-    }
-    Interval_t<T> &operator += (T r) {
-       left += r;
-       right +=r;
-       return *this;
-    }
-    Interval_t<T> &operator *=(T r) {
-       left *= r;
-       right *= r;
-       if (r < T(0)) {
-           T t = left;
-           left = right;
-           right = t;
-       }
-       return *this;
-    }
-    String str() const;    
-    bool elt_b (T r);
+    return *this;
+  }
+  String str() const;    
+  bool elt_b (T r);
 };
 
 
@@ -106,8 +106,8 @@ template<class T>
 inline Interval_t<T>
 intersection (Interval_t<T> a, Interval_t<T> const&b)
 {
-    a.intersect (b);
-    return a;
+  a.intersect (b);
+  return a;
     
 }
 
@@ -115,28 +115,28 @@ template<class T>
 inline
 Interval_t<T> operator +(T a,Interval_t<T> i)
 {
-    i += a;
-    return i;
+  i += a;
+  return i;
 }
 
 template<class T>
 inline
 Interval_t<T> operator +(Interval_t<T> i,T a){
-    return a+i;
+  return a+i;
 }
 
 template<class T>
 inline
 Interval_t<T> operator *(T a,Interval_t<T> i)
 {
-    i *= a;
-    return i;
+  i *= a;
+  return i;
 }
 
 template<class T>
 inline
 Interval_t<T> operator *(Interval_t<T> i,T a){
-    return a*i;
+  return a*i;
 }
 
 typedef Interval_t<Real> Interval;
index 9341d1dcaf528dddc64c8702f28c44a9b221f5a0..fe779c39fcfb696966bac43c1a4da268dd4d83ac 100644 (file)
@@ -10,11 +10,11 @@ class ostream;
   a struct this for initialising the commandline options.
  */
 struct Long_option_init {
-    bool take_arg;
-    char const * longname;
-    char        shortname;
+  bool take_arg;
+  char const * longname;
+  char        shortname;
 
-    void printon (ostream &errorout) const ;
+  void printon (ostream &errorout) const ;
 };
 
 
@@ -29,74 +29,74 @@ struct Long_option_init {
   */
 class Getopt_long {
 
-    /// the option info.
-    const Long_option_init *option_a_;
-    int table_len_i_;
+  /// the option info.
+  const Long_option_init *option_a_;
+  int table_len_i_;
     
-    /// if doing short option, arg_value_ch_a_a_[optind][optindind] is processed next.
-    int argument_index_i_;
+  /// if doing short option, arg_value_ch_a_a_[optind][optindind] is processed next.
+  int argument_index_i_;
 
-    /// the option found
-    const Long_option_init *found_option_l_;
+  /// the option found
+  const Long_option_init *found_option_l_;
 
 
 public: 
-    /** errorcodes: no error, argument expected, no argument expected,
-      unknown option, illegal argument (eg. int expected).  */
-    enum Errorcod { E_NOERROR = 0, E_ARGEXPECT, E_NOARGEXPECT, E_UNKNOWNOPTION,
-               E_ILLEGALARG } ;
+  /** errorcodes: no error, argument expected, no argument expected,
+    unknown option, illegal argument (eg. int expected).  */
+  enum Errorcod { E_NOERROR = 0, E_ARGEXPECT, E_NOARGEXPECT, E_UNKNOWNOPTION,
+                 E_ILLEGALARG } ;
 
-    /// argument. Set to 0 if not present
-    char const * optional_argument_ch_C_;
+  /// argument. Set to 0 if not present
+  char const * optional_argument_ch_C_;
 
-    /// current error status
-    Errorcod error_;
+  /// current error status
+  Errorcod error_;
 
-    /// arg_value_ch_a_a_[array_index_i_] will be processed next.
-    int array_index_i_;
+  /// arg_value_ch_a_a_[array_index_i_] will be processed next.
+  int array_index_i_;
 
-    /// the arguments
-    char **arg_value_ch_a_a_;
+  /// the arguments
+  char **arg_value_ch_a_a_;
 
-    /// the arg. count
-    int argument_count_i_;
+  /// the arg. count
+  int argument_count_i_;
 
-    ostream *error_ostream_l_;
+  ostream *error_ostream_l_;
 
 public:
-    /// get ready for processing next error.
-    void next();
-    const Long_option_init *parselong();
-    const Long_option_init *parseshort();
-    void OK() const;
-    bool ok() const;
+  /// get ready for processing next error.
+  void next();
+  const Long_option_init *parselong();
+  const Long_option_init *parseshort();
+  void OK() const;
+  bool ok() const;
 
-    /// report an error and abort
-    void report (Errorcod c);
+  /// report an error and abort
+  void report (Errorcod c);
 
 
-    /// return an integer (with err. detect)
-    long argument_to_i();
+  /// return an integer (with err. detect)
+  long argument_to_i();
  
     
-    /**
-      What to do with  errors. 
-       report messages on  #*os#, and abort.
-       if #os# is null, then do not report nor abort, just set #error#
-      */
+  /**
+    What to do with  errors. 
+    report messages on  #*os#, and abort.
+    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);
+  /// construct: pass arguments and option info.
+  Getopt_long (int c,  char **v, Long_option_init *lo);
 
-    /**  get the next option. 
-      @return pointer to next option found.
-      0 if error occurred, or next argument is no option.
-      */
-    const Long_option_init *operator()();
+  /**  get the next option. 
+    @return pointer to next option found.
+    0 if error occurred, or next argument is no option.
+    */
+  const Long_option_init *operator()();
 
-    char const *current_arg();
-    char const * get_next_arg();
+  char const *current_arg();
+  char const * get_next_arg();
 };
 #endif
index f1ddb48e69d38eecc41dfa3f6ad8b60054b10e22..0f6ae90ca2b3206e77f3d8fdaef680dc5188017e 100644 (file)
@@ -29,59 +29,59 @@ template<class T> class Link;
 template<class T>
 class List
 {
- public:
-    List (List const&src);
+public:
+  List (List const&src);
 
-    /// construct empty list                
-    List();    
-    virtual ~List();
+  /// construct empty list                
+  List();    
+  virtual ~List();
        
-    int size() const;
+  int size() const;
 
-    Cursor<T> bottom() const;  // const sucks.
-    Cursor<T> top() const;
+  Cursor<T> bottom() const;    // const sucks.
+  Cursor<T> top() const;
 
-    void OK() const;           // check list
-    void junk_links();
+  void OK() const;             // check list
+  void junk_links();
     
- protected:
-    friend class Cursor<T>;
-    friend class Link<T>;
+protected:
+  friend class Cursor<T>;
+  friend class Link<T>;
 
-    void concatenate (List<T> const &s);
+  void concatenate (List<T> const &s);
     
-    /**  make *this empty. 
+  /**  make *this empty. 
 
-      POST:
-      size == 0
+    POST:
+    size == 0
       
-      WARNING:
-      contents lost, and not deleted.
-      */
-     void set_empty();
+    WARNING:
+    contents lost, and not deleted.
+    */
+  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);
+  /// put thing before #before_me#
+  void insert (T const & thing, Cursor<T> &before_me);
 
-    /** Remove link pointed to by me. Destructor of contents called
-      (nop for pointers)
+  /** Remove link pointed to by me. Destructor of contents called
+    (nop for pointers)
 
-      POST
-      none;
+    POST
+    none;
 
 
-      WARNING: do not use #me# after calling
-      */
-    void remove (Cursor<T> me);
+    WARNING: do not use #me# after calling
+    */
+  void remove (Cursor<T> me);
    
 
-    /* ************** */
+  /* ************** */
     
-    int size_;
-    Link<T>* top_;
-    Link<T>* bottom_;
+  int size_;
+  Link<T>* top_;
+  Link<T>* bottom_;
 };
 
 #include "list.icc"
index f77a2018361d3f407aa3a4877c4d9bf16bba494d..7612137e202198c2e2cc4aa5e2b42be17751cee5 100644 (file)
@@ -24,9 +24,9 @@ List<T>::remove (Cursor<T> me)
 {
   if ( me.ok())
     {
-       Link<T> *lp = me.pointer();     
-       lp->remove (*this);
-       delete lp;
+      Link<T> *lp = me.pointer();      
+      lp->remove (*this);
+      delete lp;
       size_--;
     }
 }
index c87613c454bf35ce0be69d194b9febf77b358569..6b5f773b2f56e48f1d0260f4025b8825ae00fc23 100644 (file)
 
 
 class Matrix {
-    friend Matrix operator *(Matrix const &m1, Matrix const &m2);
+  friend Matrix operator *(Matrix const &m1, Matrix const &m2);
 
 protected:
-    Matrix_storage *dat;
-    void set (Matrix_storage*);
-    Matrix (Matrix_storage*);
+  Matrix_storage *dat;
+  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 (); }
+  void OK() const { dat->OK(); }
+  int cols() const { return dat->cols (); }
+  int rows() const { return dat->rows (); }
 
-    /**  return the size of a matrix. 
-      PRE
-      the matrix needs to be square.
+  /**  return the size of a matrix. 
+    PRE
+    the matrix needs to be square.
     */
-    int dim() const;
+  int dim() const;
      
-    /**
-      the band size of the matrix.
-      @ret
-
-      0 <= band_i() <= dim
-      */
-    int band_i() const;
-    bool band_b() const;
-    void set_full() const;
-    void try_set_band() const;
-    ~Matrix() { delete dat; }
-
-    /// set entries to r 
-    void fill (Real r);
-
-    /// set diagonal to d
-    void set_diag (Real d);
-
-    void set_diag (Vector d);
-    /// set unit matrix
-    void unit() { set_diag (1.0); }
-
-    void operator+=(Matrix const &m);
-    void operator-=(Matrix const &m);    
-    void operator*=(Real a);
-    void operator/=(Real a) { (*this) *= 1/a; }
+  /**
+    the band size of the matrix.
+    @ret
+
+    0 <= band_i() <= dim
+    */
+  int band_i() const;
+  bool band_b() const;
+  void set_full() const;
+  void try_set_band() const;
+  ~Matrix() { delete dat; }
+
+  /// set entries to r 
+  void fill (Real r);
+
+  /// set diagonal to d
+  void set_diag (Real d);
+
+  void set_diag (Vector d);
+  /// set unit matrix
+  void unit() { set_diag (1.0); }
+
+  void operator+=(Matrix const &m);
+  void operator-=(Matrix const &m);    
+  void operator*=(Real a);
+  void operator/=(Real a) { (*this) *= 1/a; }
     
-    /**  add a row. 
-      add a row to the matrix before  row k
+  /**  add a row. 
+    add a row to the matrix before  row k
 
-      PRE
-      v.dim() == cols ()
-      0 <= k <= rows()
+    PRE
+    v.dim() == cols ()
+    0 <= k <= rows()
     */
-    void insert_row (Vector v,int k);
-    /** . 
-      delete a row from this matrix.
+  void insert_row (Vector v,int k);
+  /** . 
+    delete a row from this matrix.
 
-      PRE
-      0 <= k < rows();
+    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
+  /**
+    square n matrix, initialised to null
     */
-    Matrix (int n);
+  Matrix (int n);
    
-    /**
-      n x m matrix, init to 0
+  /**
+    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);
-    void operator=(Matrix const &m);
+  /// dyadic product: v * w.transpose
+  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); }
+  /// access an element
+  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); }
+  /// access an element
+  Real &operator()(int i, int j) { return dat->elem (i,j); }
 
-    /// Matrix multiply with vec (from right)
-    Vector operator *(Vector const &v) const;
+  /// 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);
+  /// set this to m1*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;
+  Matrix operator-() const;
     
-    /// transpose this.
-    void transpose();
+  /// transpose this.
+  void transpose();
     
-    /// return a transposed copy.
-    Matrix transposed() const ;
+  /// return a transposed copy.
+  Matrix transposed() const ;
 
-    Real norm() const;
-    /**  swap. 
-      PRE
-      0 <= c1,c2 < cols()
+  Real norm() const;
+  /**  swap. 
+    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()
+  /**  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;
+  operator String() const;
+  void print() const;
 };
 
 inline Vector
@@ -150,12 +150,12 @@ Matrix operator *(Matrix const & m1,Matrix const &m2);
 Matrix operator /(Matrix const &m1,Real a);
 inline Matrix operator -(Matrix m1,const Matrix m2)
 {
-    m1 -= m2;
-    return m1;
+  m1 -= m2;
+  return m1;
 }
 inline Matrix operator +(Matrix m1,const Matrix m2)
 {
-    m1 += m2;
-    return m1;
+  m1 += m2;
+  return m1;
 }
 #endif
index 5aa63d1d8f89cbf92d2dc383442f3c3d78d9ba60..e338a0935356ff4b6b589c360540eefa3f44b27b 100644 (file)
  */
 template<class T>
 class PCursor : private Cursor<void *> {
-    friend class Pointer_list<T>;
+  friend class Pointer_list<T>;
 
-    /// delete contents
-    void junk();
+  /// delete contents
+  void junk();
 public:
-    Cursor<void*>::ok;
-    Cursor<void*>::del;
-    Cursor<void*>::backspace;
-    Cursor<void*>::next;
-    Cursor<void*>::previous;
+  Cursor<void*>::ok;
+  Cursor<void*>::del;
+  Cursor<void*>::backspace;
+  Cursor<void*>::next;
+  Cursor<void*>::previous;
 
-    T remove_p() {
-       T p = ptr();
-       Cursor<void*>::del();
-       return p;
-    }
-    T remove_prev_p() {
-       assert (ok());
-       (*this)--;
-       return remove_p();
-    }
+  T remove_p() {
+    T p = ptr();
+    Cursor<void*>::del();
+    return p;
+  }
+  T remove_prev_p() {
+    assert (ok());
+    (*this)--;
+    return remove_p();
+  }
     
-    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() : Cursor<void*> () {}
-    PCursor (const Cursor<void*>& cursor) : Cursor<void*>(cursor) { }
-    void* vptr() const { return *((Cursor<void*> &) *this); }
+  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() : Cursor<void*> () {}
+  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 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);
-    }
+  // should return T& ?
+  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);
+  }
 };
 
 
index f052e47368e67db1a214e5591a2150f172dc020a..f30c98ca5af0d0b3ab888e453372c4710aab1f36 100644 (file)
 template<class T>
 class Link_list : public List<void *>
 {
- public:
-    PCursor<T> top() const{
-       return PCursor<T> (List<void*>::top());
-    }
-    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); }
-
-    Link_list() {}
+public:
+  PCursor<T> top() const{
+    return PCursor<T> (List<void*>::top());
+  }
+  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); }
+
+  Link_list() {}
 };
 
 /**   
@@ -54,16 +54,16 @@ template<class T>
 class Pointer_list : public Link_list<T> {
     
 public:
-    void junk();
-    Pointer_list (Pointer_list const &) { set_empty(); }
-    Pointer_list() { }
-    ~Pointer_list() { junk (); }
+  void junk();
+  Pointer_list (Pointer_list const &) { set_empty(); }
+  Pointer_list() { }
+  ~Pointer_list() { junk (); }
 };
 
 #define Pointer_list__copy(T, to, from, op)   \
-  for (PCursor<T> _pc_(from); _pc_.ok(); _pc_++)\
-      to.bottom().add (_pc_->op)\
-  \
+for (PCursor<T> _pc_(from); _pc_.ok(); _pc_++)\
+to.bottom().add (_pc_->op)\
+\
 
 
 template<class T>
index c2225782d7b9fa5217115425b4af4634f926862b..599d25312d6049dbc28d7df38453bbabb3d1bea9 100644 (file)
@@ -64,12 +64,12 @@ String_data::setmax (int j)
   OKW();
   if (j > maxlen) 
     {
-       delete data_byte_p_;
-       maxlen = j;
-       data_byte_p_ = new Byte[maxlen + 1];
+      delete data_byte_p_;
+      maxlen = j;
+      data_byte_p_ = new Byte[maxlen + 1];
   
-       data_byte_p_[0] = 0;
-       length_i_ = 0;
+      data_byte_p_[0] = 0;
+      length_i_ = 0;
     }
 }
 
@@ -88,11 +88,11 @@ String_data::remax (int j)
   OKW();
   if (j > maxlen) 
     {
-       Byte *p = new Byte[j + 1];      
-       memcpy (p, data_byte_p_, ( maxlen <? length_i_) + 1 );      
-       maxlen = j;
-       delete[] data_byte_p_;
-       data_byte_p_ = p;
+      Byte *p = new Byte[j + 1];       
+      memcpy (p, data_byte_p_, ( maxlen <? length_i_) + 1 );       
+      maxlen = j;
+      delete[] data_byte_p_;
+      data_byte_p_ = p;
     }
 }
 
@@ -188,7 +188,7 @@ String_data::trunc (int j)
 INLINE bool
 String_data::is_binary_bo() const
 {
-//    return !memchr (data_byte_p_, length_i_, 0);
+  //    return !memchr (data_byte_p_, length_i_, 0);
   return ( (int)strlen ((char const*)data_byte_p_) != length_i_ );
 }
 
index 0f97839d825c0f42b34dd520f464ce3461d8e62c..51db730a22eb8e93e17997a3978c03ffb79689c3 100644 (file)
@@ -34,9 +34,9 @@ String_handle::copy()
 {
   if (data->references !=1)
     {
-       String_data *newdata = new String_data (*data);
-       down();
-       up (newdata);
+      String_data *newdata = new String_data (*data);
+      down();
+      up (newdata);
     }
 }
 
@@ -88,7 +88,7 @@ INLINE void
 String_handle::operator =(String_handle const &src) 
 {
   if (this == &src)
-       return;
+    return;
   down();
   up (src.data);
 }
index 3d8981faf0a99826441444d3f691fa6a2f778357..7682fa0bfbd7b2403db41c87c4ca6e7cb65b6569 100644 (file)
 class String
 {
 protected:
-    String_handle strh_; 
+  String_handle strh_; 
 
-    bool null_terminated();
+  bool null_terminated();
     
 public:
 
-    /** init to empty string. This is needed because other
-      constructors are provided.*/
-    String() {  }                  
-    String (Rational);
+  /** init to empty string. This is needed because other
+    constructors are provided.*/
+  String() {  }                  
+  String (Rational);
 
-    /// String s = "abc";
-    String (char const* source); 
-    String (Byte const* byte_C, int length_i); 
+  /// String s = "abc";
+  String (char const* source); 
+  String (Byte const* byte_C, int length_i); 
     
-    /// "ccccc"
-    String (char c, int n = 1);
+  /// "ccccc"
+  String (char c, int n = 1);
 
-    String (int i , char const *fmt=0);
-    String ( double f , char const* fmt =0);
-    /// 'true' or 'false'
-    String (bool);
+  String (int i , char const *fmt=0);
+  String ( double f , char const* fmt =0);
+  /// 'true' or 'false'
+  String (bool);
 
-    ///  return a "new"-ed copy of contents
-    Byte* copy_byte_p() const; //  return a "new"-ed copy of contents
+  ///  return a "new"-ed copy of contents
+  Byte* copy_byte_p() const; //  return a "new"-ed copy of contents
 
-    char const* ch_C() const;
-    Byte const* byte_C() const;
-    char* ch_l();
-    Byte* byte_l();
+  char const* ch_C() const;
+  Byte const* byte_C() const;
+  char* ch_l();
+  Byte* byte_l();
 
-    /// deprecated; use ch_C()
-    operator char const*() const { return ch_C(); }
+  /// deprecated; use 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);
+  /// concatenate s
+  void operator += (char const* s) { strh_ += s; }
+  void operator += (String s);
 
-    void append (String);
-    void prepend (String);
+  operator bool () 
+  {
+    return length_i (); 
+  }
+  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;
+  /// return n leftmost chars
+  String left_str (int n) const;
 
-    /// return n rightmost chars
-    String right_str (int n) const;
+  /// return n rightmost chars
+  String right_str (int n) const;
 
-    /// return uppercase of *this
-    String upper_str() const;
+  /// return uppercase of *this
+  String upper_str() const;
 
-    /// return lowercase of *this
-    String lower_str() const;
+  /// return lowercase of *this
+  String lower_str() const;
 
-    /// return the "esrever" of *this
-    String reversed_str() const;
+  /// return the "esrever" of *this
+  String reversed_str() const;
 
 
-    /// return a piece starting at index_i (first char = index_i 0), length n
-    String mid_str (int index_i, int n) const;
+  /// return a piece starting at index_i (first char = index_i 0), length n
+  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;
+  /// cut out a middle piece, return remainder
+  String nomid_str (int index_i, int n) const;
 
-    /// signed comparison,  analogous to memcmp;
-    static int compare_i (String const & s1,const  String& s2);
+  /// signed comparison,  analogous to memcmp;
+  static int compare_i (String const & s1,const  String& s2);
        
-    /// index of rightmost c 
-    int index_last_i (char c) const;
+  /// index of rightmost c 
+  int index_last_i (char c) const;
 
-    /// index of rightmost element of string 
-    int index_last_i (char const* string) const;
+  /// index of rightmost element of string 
+  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 to_upper();
+  void to_lower();
+  /// provide Stream output
+  void print_on (ostream& os) const;
 
-    /// the length of the string
-    int length_i() const;
+  /// the length of the string
+  int length_i() const;
 
-    // ***** depreciated
-    int len() const {
-       return length_i();
-    }
+  // ***** depreciated
+  int len() const {
+    return length_i();
+  }
 
-    /// convert to an integer
-    int value_i() const;
+  /// convert to an integer
+  int value_i() const;
 
-    /// convert to a double
-    double value_f() const;
+  /// convert to a double
+  double value_f() const;
 };
 
 #include "compare.hh"
@@ -159,32 +163,32 @@ 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);
+  return s1!=String (s2);
 }
 inline bool operator!=(char const* s1,String s2) {
-    return String (s2) !=s1;
+  return String (s2) !=s1;
 }
 
 
 inline String
 operator  + (String s1, String  s2)
 {
-    s1 += s2;
-    return s1;
+  s1 += s2;
+  return s1;
 }
 
 inline ostream &
 operator << ( ostream& os, String d)
 {
-    d.print_on (os);
-    return os;
+  d.print_on (os);
+  return os;
 }
 
 #endif
index c921ebc2d35b4d603ab00f6d03284c34dc9baf61..02d16885b12fc0629df4f45e04ae096b493009fe 100644 (file)
 
 class Text_stream
 {
-    int line_no;
+  int line_no;
 
-    // could just have used streams. 
-    FILE *f;  
-    Array<char> pushback;
-    String name;
+  // could just have used streams. 
+  FILE *f;  
+  Array<char> pushback;
+  String name;
     
- public:
-    Text_stream (String fn);
-    String get_name() { return name; }
-    bool eof() {
-       return feof (f);
-    }
-    bool eol() {
-       return (peek() == '\n');
-    }
-    char peek() {
-       char c = get();
-       unget (c);
-       return c;
-    }
-    int line(){
-       return line_no;
-    }
+public:
+  Text_stream (String fn);
+  String get_name() { return name; }
+  bool eof() {
+    return feof (f);
+  }
+  bool eol() {
+    return (peek() == '\n');
+  }
+  char peek() {
+    char c = get();
+    unget (c);
+    return c;
+  }
+  int line(){
+    return line_no;
+  }
 
-    char    get() {
-       char c;
+  char    get() {
+    char c;
        
-       if (pushback.empty())
-           c = getc (f);       
-       else 
-           c = pushback.pop();
+    if (pushback.empty())
+      c = getc (f);    
+    else 
+      c = pushback.pop();
 
-       if (c =='\n')
-           line_no++;
-       return c;       
-    }
-    void unget (char c) {
-       if (c =='\n')
-           line_no--;
-       pushback.push (c);
-    }
-    ~Text_stream(){
-       if (!eof()) 
-           cerr <<__FUNCTION__<< ": closing unended file";
+    if (c =='\n')
+      line_no++;
+    return c;  
+  }
+  void unget (char c) {
+    if (c =='\n')
+      line_no--;
+    pushback.push (c);
+  }
+  ~Text_stream(){
+    if (!eof()) 
+      cerr <<__FUNCTION__<< ": closing unended file";
     
-       fclose (f);
-    }
+    fclose (f);
+  }
 
-    /// GNU format message.
-    void message (String s); 
+  /// GNU format message.
+  void message (String s); 
 };
 
 #endif
index 9a6f98aeccb30f3b83983ad8260c5c2e29670c47..a69105a29a59cedb398936a762f06497fbe03c35 100644 (file)
@@ -12,7 +12,7 @@ paper_sixteen = \paper {
        wholewidth = 4.8\pt;
        unitspace = 22.\pt;
        %geometric = 1.414;
-       %basicspace = 4.\pt;
+       basicspace = 4.\pt;
 
        geometric = 0.;
        arithmetic_basicspace = 2.;
index db760e425b94a0d2c4ee27491f78168c5ecce4f4..c04c51db0d92decd6936fb2914d15e55d34947c7 100644 (file)
@@ -7,12 +7,12 @@
 \addtolength{\oddsidemargin}{-1cm}
 \addtolength{\topmargin}{-1cm}
 \setlength{\textwidth}{15cm}
-\begin{document}
 \input lilyponddefs
 \input titledefs
+\begin{document}
 
 \title{La Gallina a 2 violini \\ 
-  \normalsize from \textit{Canzoni overo Sonate Concertate 
+\normalsize from \textit{Canzoni overo Sonate Concertate 
    libro terzo, opera duodecima}, 1637}
 \composer{Tarquinio Merula (1594/95-1665)}
 %\instrument{M\"a\ss ig} % heu
index 6c580c2467a0da6dc120437606a77444e65ccc5c..acba0091eb2d72a9ad9445e70ea9bb841aa14c6b 100644 (file)
@@ -4,8 +4,8 @@ filename                kortjakje.ly
 title          Ah,  vous dirais-je, maman (variations)
 description             bare bones version. (written down from memory :-)
 composers              Mozart, KV 265
-entered-by             HWN
-copyright              PD
+enteredby              HWN
+copyright              public domain
 }
 %{
 Tested Features: example file with comments
index 7ce3b25fba45817016afc781083b8857de531bcd..4d5a2603a52ea8e648a08b54b0e0d47ba3d7674b 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 1
-PATCH_LEVEL = 11
+PATCH_LEVEL = 12
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index ac5a334e318e3bd54336f38a3ab57f713c6212d6..74edd84529afb1dfcb4d3eb62f74975eaf548def 100644 (file)
@@ -12,8 +12,7 @@
 
 /** don't copy anything: an element can only be in one
   Axis_group_element at one time.  */
-Axis_group_administration::Axis_group_administration (
-                                                     Axis_group_administration const&)
+Axis_group_administration::Axis_group_administration (Axis_group_administration const&)
 {
 }
 
index f2a54aab2d97018ad4bf239e238d6545df69acfc..b64be42fee46848b951b6a52b1fb2898ec898210 100644 (file)
@@ -14,6 +14,9 @@ String
 Header::TeX_string() const
 {
   String s;
+
+  s+= "\\def\\LilyIdString{"  + lily_id_str_ + "}";
+  
   for (Assoc_iter<String, String> i(*this); i.ok(); i++) 
     {
       s += "\\def\\mudela" + i.key() + "{" + i.val() + "}";
index d5919b0de5e8cfbb4711d98bd130bf783a5c53f8..62ee98ddf4c5c90d0503dc43f5eb5330220f11d6 100644 (file)
@@ -16,6 +16,7 @@
 
 struct Header : Assoc<String, String>
 {
+  String lily_id_str_;
   String TeX_string() const;
 };
 
index ce55ce46575e2f5b75874edb5671a789091bd961..c9af80091c01cae44ee4bedfcbead1a4cc29d224 100644 (file)
@@ -12,6 +12,7 @@
 #include "symbol.hh"
 #include "fproto.hh"
 #include "scalar.hh"
+#include "direction.hh"
 
 /// intuitive interface to symbol table
 struct Lookup {
@@ -48,10 +49,10 @@ struct Lookup {
     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 slur (int dy, Real &dx, Direction dir) const;
+    Symbol half_slur (int dy, Real &dx, Direction dir, int xpart) const;
+    Symbol half_slur_middlepart (Real &dx, Direction dir) const;
+    Symbol big_slur (int dy, Real &dx, Direction dir) const;
     Symbol text (String style, String text, int align = 1) const;
     Symbol script (String idx) const;
     Symbol hairpin (Real & width, bool decresc) const;
index 79ac1e878ed5ba56155188ff116c8a895fd8468f..75fc6a1e5483e2175315fb647d334746c93681e5 100644 (file)
@@ -1,3 +1,10 @@
+/*
+  main.hh -- declare global entry points
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
 #ifndef MAIN_HH
 #define MAIN_HH
 #include "lily-proto.hh"
@@ -10,6 +17,7 @@ void set_default_output (String s);
 Input_score* current_iscore_l();
 String find_file (String);
 String get_version_str();
+String get_version_number_str();
 extern Sources* source_l_g;
 extern bool only_midi;
 extern int exit_status_i_;
index 68a6b49037351430abc3162cca94ccea9a83038b..df773fa7ccdb93c51859c6523348dc4023c84112 100644 (file)
@@ -1,12 +1,20 @@
 #include "version.hh"
 #include <stdio.h>
 
-static char *s = "GNU LilyPond " MAJOR_VERSION "." MINOR_VERSION "."  PATCH_LEVEL MY_PATCH_LEVEL " #%d";
+
+#define VERSION_SZ  MAJOR_VERSION "." MINOR_VERSION "."  PATCH_LEVEL MY_PATCH_LEVEL
+static char *s = "GNU LilyPond " VERSION_SZ " #%d";
 
 static const int build=
 #include ".build"
 ;
 
+char const *
+lily_version_number_sz()
+{
+  return VERSION_SZ;
+}
+
 char const * 
 lily_version_sz()
 {
index 8c68dd1bc06c9da1f4bb0a9bbcc94c18ad228eea..259f95f6517fb5041d16535f522b34b9be4d731f 100644 (file)
@@ -43,34 +43,34 @@ void
 usage()
 {
   cout <<
-       "Usage: lilypond [options] [mudela-file]\n"
-       "Typeset and or produce midi output from mudela-file or stdin\n"
-       "\n"
-       "Options:\n"
-       "  -d, --debug            enable debugging output\n"
-      "  -I, --include=DIR      add DIR to search path\n"
-       "  -i, --init=FILE        use FILE as init file\n"
-       "  -h, --help             this help\n"
-       "  -w, --warranty         show warranty and copyright\n"
-       "  -o, --output=FILE      set FILE as default output\n"
-       "  -M, --midi             produce midi output only\n"
-       "  -V, --ignore-version   ignore mudela version\n"
-       "\n"
-       "GNU LilyPond was compiled with the following settings:\n"
+    "Usage: lilypond [options] [mudela-file]\n"
+    "Typeset and or produce midi output from mudela-file or stdin\n"
+    "\n"
+    "Options:\n"
+    "  -d, --debug            enable debugging output\n"
+    "  -I, --include=DIR      add DIR to search path\n"
+    "  -i, --init=FILE        use FILE as init file\n"
+    "  -h, --help             this help\n"
+    "  -w, --warranty         show warranty and copyright\n"
+    "  -o, --output=FILE      set FILE as default output\n"
+    "  -M, --midi             produce midi output only\n"
+    "  -V, --ignore-version   ignore mudela version\n"
+    "\n"
+    "GNU LilyPond was compiled with the following settings:\n"
 #ifdef NDEBUG
-       "NDEBUG "       
+    "NDEBUG "  
 #endif
 #ifdef NPRINT
-       "NPRINT "
+    "NPRINT "
 #endif
 #ifdef STRING_UTILS_INLINED
-       "STRING_UTILS_INLINED "
+    "STRING_UTILS_INLINED "
 #endif
-       "datadir= " DIR_DATADIR 
+    "datadir= " DIR_DATADIR 
 
-       "\n";
+    "\n";
        
-       ;
+  ;
   
   
 }
@@ -79,25 +79,25 @@ void
 notice()
 {
   cout <<
-       "\n"
-       "GNU LilyPond -- The GNU Project music typesetter.\n"
-       "Copyright 1996,97 by\n"
-       "  Han-Wen Nienhuys <hanwen@stack.nl>\n"
-       "  Jan Nieuwenhuizen <jan@digicash.com>\n"
-       "\n"
-       "    This program is free software; you can redistribute it and/or\n"
-       "modify it under the terms of the GNU General Public License version 2\n"
-       "as published by the Free Software Foundation.\n"
-       "\n"
-       "    This program is distributed in the hope that it will be useful,\n"
-       "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-       "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n"
-       "General Public License for more details.\n"
-       "\n"
-       "    You should have received a copy (refer to the file COPYING) of the\n"
-       "GNU General Public License along with this program; if not, write to\n"
-       "the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,\n"
-       "USA.\n";
+    "\n"
+    "GNU LilyPond -- The GNU Project music typesetter.\n"
+    "Copyright 1996,97 by\n"
+    "  Han-Wen Nienhuys <hanwen@stack.nl>\n"
+    "  Jan Nieuwenhuizen <jan@digicash.com>\n"
+    "\n"
+    "    This program is free software; you can redistribute it and/or\n"
+    "modify it under the terms of the GNU General Public License version 2\n"
+    "as published by the Free Software Foundation.\n"
+    "\n"
+    "    This program is distributed in the hope that it will be useful,\n"
+    "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+    "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n"
+    "General Public License for more details.\n"
+    "\n"
+    "    You should have received a copy (refer to the file COPYING) of the\n"
+    "GNU General Public License along with this program; if not, write to\n"
+    "the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,\n"
+    "USA.\n";
 }
 
 
@@ -108,23 +108,24 @@ do_one_file (String init_str, String file_str)
 {
   if (init_str != "" && "" == path.find (init_str)) 
     {
-       error ("Can not find `" + init_str +"\'");
-       return ;
+      error ("Can not find `" + init_str +"\'");
+      return ;
     }
   if (file_str!= "" && path.find (file_str) == "") 
     {
-       error ("Can not find `" + file_str + "'");
-       return ;
+      error ("Can not find `" + file_str + "'");
+      return ;
     }
   
   Sources sources;
   source_l_g = &sources; 
   source_l_g->set_path (&path);
   {
-       My_lily_parser parser (source_l_g);
-       parser.set_version_check (version_ignore_b_);
-       parser.parse_file (init_str, file_str);
-    }
+    My_lily_parser parser (source_l_g);
+    parser.set_version_check (version_ignore_b_);
+    parser.parse_file (init_str, file_str);
+    exit_status_i_ |= parser.error_level_i_;
+  }
   do_scores();
   source_l_g = 0;
 }
@@ -139,7 +140,7 @@ main (int argc, char **argv)
   char const * env_l=getenv ("LILYINCLUDE");
   if (env_l) 
     {
-       path.add (env_l);
+      path.add (env_l);
     }
   path.add ("");
   path.add (String (DIR_DATADIR) + "/init/");
@@ -152,52 +153,52 @@ main (int argc, char **argv)
   
   while (Long_option_init const * opt = oparser()) 
     {
-       switch (opt->shortname)
-         {
+      switch (opt->shortname)
+       {
        case 'o':
-           set_default_output (oparser.optional_argument_ch_C_);
-           break;
+         set_default_output (oparser.optional_argument_ch_C_);
+         break;
        case 'w':
-           notice();
-           exit (0);
-           break;
+         notice();
+         exit (0);
+         break;
        case 'I':
-           path.push (oparser.optional_argument_ch_C_);
-           break;
+         path.push (oparser.optional_argument_ch_C_);
+         break;
        case 'i':
-           init_str = oparser.optional_argument_ch_C_;
-           break;
+         init_str = oparser.optional_argument_ch_C_;
+         break;
        case 'h':
-           usage();
-           exit (0);
-           break;
+         usage();
+         exit (0);
+         break;
        case 'V':
-           version_ignore_b_ = true;
-           break;
+         version_ignore_b_ = true;
+         break;
        case 'd':
-           set_debug (true);
-           break;
+         set_debug (true);
+         break;
        case 'M':
-           only_midi = true;
-           break;
+         only_midi = true;
+         break;
        default:
-           assert (false);
-           break;
-         }
+         assert (false);
+         break;
+       }
     }
 
   int p=0;
   const char *arg ;
   while ((arg= oparser.get_next_arg())) 
     {
-       String f (arg);
-       destill_inname (f);
-       do_one_file (init_str,f);
-       p++;
+      String f (arg);
+      destill_inname (f);
+      do_one_file (init_str,f);
+      p++;
     }
   if (!p) 
     {
-       do_one_file (init_str, "");     
+      do_one_file (init_str, "");      
     }
 
   return exit_status_i_;
@@ -208,18 +209,18 @@ void
 destill_inname (String &name_str_r)
 {
   if (name_str_r.length_i())
-      {
+    {
       if (name_str_r[ 0 ] != '-') 
-           {
-           String a,b,c,d;
-           split_path (name_str_r,a,b,c,d);
-
-           // add extension if not present.
-           if (d == "") 
-               d = ".ly";
-           name_str_r = a+b+c+d;
-             }
-         }
-       else name_str_r = "";   
+       {
+         String a,b,c,d;
+         split_path (name_str_r,a,b,c,d);
+
+         // add extension if not present.
+         if (d == "") 
+           d = ".ly";
+         name_str_r = a+b+c+d;
+       }
+    }
+  else name_str_r = "";   
 }
 
index 0b1121190a80b5f57b14ad5d9076cd606c0c9d17..1f4d430f1795b241496bf621a3e816113afa15f1 100644 (file)
@@ -76,7 +76,10 @@ My_lily_parser::parse_file (String init, String s)
 
   
   if (!define_spot_array_.empty())
-    warning ("Braces don't match.");
+    {
+      warning ("Braces don't match.");
+      error_level_i_ = 1;
+    }
 }
 
 My_lily_parser::~My_lily_parser()
index 04ed82576876e348ab067782c9fcc74b74b80d1c..3da46e2c235f9e9318aa47616e0f0bbde2a93d25 100644 (file)
@@ -10,7 +10,6 @@
 #include "debug.hh"
 #include "music-output-def.hh"
 #include "music-output.hh"
-#include "main.hh"
 #include "source.hh"
 #include "source-file.hh"
 #include "music-iterator.hh"
index a1cb0830a1e403d70072b8f3f6df00490407249d..3886a7715d536b035b92a56d92a79734a737169b 100644 (file)
 #include "score.hh"
 #include "string.hh"
 #include "paper-def.hh"
+#include "header.hh"
 #include "debug.hh"
+#include "parray.hh"
 
-static Array<Score*> score_array_global;
+static Link_array<Score> global_score_array;
 String default_out_fn = "lelie";
 
 void
 do_scores()
 {
-  for (int i=0; i < score_array_global.size(); i++) 
+  for (int i=0; i < global_score_array.size(); i++) 
     {
-       Score *&is_p = score_array_global[i];
-       
-       
+       Score *&is_p = global_score_array[i];
+       if (is_p->header_p_)
+         is_p->header_p_->lily_id_str_ = "Lily was here, " + 
+           get_version_number_str();
        if (is_p->errorlevel_i_) 
          {
            is_p->warning ("Score contains errors. Will not process it. ");
@@ -37,13 +40,13 @@ do_scores()
        is_p =0;
 
     }
-  score_array_global.clear();
+  global_score_array.clear();
 }
 
 void
 add_score (Score * s)
 {
-  score_array_global.push (s);
+  global_score_array.push (s);
 }
 
 void
index 87dea00618ae29386171ec4c19e56771beb5e24f..a4349ab750a06095055957dd57408138b2813f7a 100644 (file)
@@ -87,9 +87,17 @@ Slur::do_post_processing()
   extrema[RIGHT] = encompass_arr_.top();
 
   Direction d=LEFT;
+  Real nw_f = paper()->note_width ();
+  while ((d *= -1) != LEFT);
   do 
     {
-      if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_) 
+      if  (extrema[d] != spanned_drul_[d]) 
+       {
+         dx_f_drul_[d] = -d 
+           *(spanned_drul_[d]->width ().length ()/nw_f -0.5);
+       }
+      else if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_) 
        pos_i_drul_[d] = (int)rint (extrema[d]->stem_l_->height()[dir_]/inter_f);
       else 
        pos_i_drul_[d] = (int)rint (extrema[d]->head_positions_interval()[dir_]);
index 3463d38494eb53dc3b6dd1236342513de5a05e62..30d06d3d32609ffa421d2d7a77751355f822bea5 100644 (file)
 #include "paper-def.hh"
 
 
-
-static
-char direction_char (int y_sign)
+static char
+direction_char (Direction y_sign)
 {
   char c='#';
   switch (y_sign)
     {
-    case -1:
+    case DOWN:
       c = 'd';
       break;
-    case 0:
+    case CENTER:
       c = 'h';
       break;
-    case 1:
+    case UP:
       c = 'u';
       break;
     default:
@@ -38,12 +37,14 @@ char direction_char (int y_sign)
 }
 
 Symbol
-Lookup::half_slur_middlepart (Real &dx, int dir) const
+Lookup::half_slur_middlepart (Real &dx, Direction dir) const
 {
-  if (dx >= 400 PT) {// todo
-    WARN<<"halfslur too large" <<print_dimen (dx)<< "shrinking (ugh)\n";
-    dx = 400 PT;
-  }
+  // todo
+  if (dx >= 400 PT)
+    {
+      WARN<<"halfslur too large" <<print_dimen (dx)<< "shrinking (ugh)\n";
+      dx = 400 PT;
+    }
   int widx = int (floor (dx / 4.0));
   dx = widx * 4.0;
   if (widx) widx --;
@@ -58,7 +59,7 @@ Lookup::half_slur_middlepart (Real &dx, int dir) const
   s.dim.x() = Interval (0,dx);
 
   String f =  String ("\\hslurchar");
-  f += direction_char (0);
+  f += direction_char (CENTER);
 
   int idx = widx;
   if (dir < 0)
@@ -74,8 +75,9 @@ Lookup::half_slur_middlepart (Real &dx, int dir) const
 
   return s;
 }
+
 Symbol
-Lookup::half_slur (int dy, Real &dx, int dir, int xpart) const
+Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const
 {
   Real orig_dx = dx;
   if (!xpart)
@@ -127,10 +129,16 @@ Lookup::half_slur (int dy, Real &dx, int dir, int xpart) const
 }
 
 Symbol
-Lookup::slur (int dy , Real &dx, int dir) const
+Lookup::slur (int dy , Real &dx, Direction dir) const
 {
-  assert (dx >=0 && abs (dir) <= 1);
-  int y_sign = sign (dy);
+  
+  assert (abs (dir) <= 1);
+  if  (dx < 0)
+    {
+      warning ("Negative slur/tie length: " + print_dimen (dx));
+      dx = 4.0 PT;
+    }
+  Direction y_sign = (Direction) sign (dy);
 
   bool large = abs (dy) > 8;
 
@@ -201,9 +209,14 @@ Lookup::slur (int dy , Real &dx, int dir) const
 }
 
 Symbol
-Lookup::big_slur (int dy , Real &dx, int dir) const
+Lookup::big_slur (int dy , Real &dx, Direction dir) const
 {
-  assert (dx >= 24 PT);
+  if (dx < 24 PT) 
+    {
+      warning ("big_slur too small " + print_dimen (dx) + " (stretching)");
+      dx = 24 PT;
+    }
+  
   Real slur_extra =abs (dy)  /2.0 + 2; 
   int l_dy = int (Real (dy)/2 + slur_extra*dir);
   int r_dy =  dy - l_dy;
index 190618869bdfcb7f9fdfbeb2606c08253c554061..b5863193cf5d81727494e6167cd43432a2222dfd 100644 (file)
@@ -31,10 +31,9 @@ Tie::Tie()
 void
 Tie::set_default_dir()
 {
-  int m= (head_l_drul_[LEFT]->position_i_ + head_l_drul_[RIGHT]->position_i_) /2 ;
+  int m= (head_l_drul_[LEFT]->position_i_ + head_l_drul_[RIGHT]->position_i_) /2;
   dir_ =  (m < 5)? DOWN : UP;  // UGH
 }
-  
 
 void
 Tie::do_add_processing()
@@ -47,6 +46,7 @@ Tie::do_add_processing()
 void
 Tie::do_post_processing()
 {
+  Real nw_f = paper()->note_width ();
   assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]);
 
   Direction d = LEFT;
@@ -64,17 +64,16 @@ Tie::do_post_processing()
          pos_i_drul_[d] += 2*dir_;
          dx_f_drul_[d] += d * 0.25;
        }
-      else
+      else if (head_l_drul_[d])
        dx_f_drul_[d] += d*0.5;
+      else
+       {
+         pos_i_drul_[d] = pos_i_drul_[(Direction) -d];
+         dx_f_drul_[d] = -d 
+           *(spanned_drul_[d]->width ().length ()/nw_f -0.5);
+       }
     }
   while ((d *= -1) != LEFT);
-
-  do 
-    {
-      if (!head_l_drul_[d])
-       pos_i_drul_[d] = pos_i_drul_[(Direction)-d];
-    } 
-  while ((d *= -1) != LEFT);
 }
 
 
@@ -89,6 +88,4 @@ Tie::do_substitute_dependency (Score_elem*o, Score_elem*n)
     head_l_drul_[RIGHT] = new_l;
 }
 
-
-
 IMPLEMENT_IS_TYPE_B1(Tie,Bow);
index c219dfcd616d33b6d0a5197c92beda6a6d113cd9..205e259b25598c7361d50c893f7e3f8939239599 100644 (file)
@@ -2,7 +2,8 @@
 
 #include "string.hh"
 
-extern char const * lily_version_sz();
+char const * lily_version_sz();
+char const * lily_version_number_sz();
 
 String 
 get_version_str()
@@ -12,3 +13,9 @@ get_version_str()
   s+=flower_version_sz();
    return s;
 }
+
+String
+get_version_number_str()
+{
+  return lily_version_number_sz();
+}
index c5943874c70e8b22855523dcff29d1773a4557c9..3d5f8bf8850489fa4d6a5f50f937d67d43cc90a4 100644 (file)
@@ -1,21 +1,21 @@
 Begin3
 Title: LilyPond
-Version: 0.1.11
-Entered-date: 30AUG97
-Description:   GNU LilyPond is a program which converts music
-               definition files into visual or auditive output: it can
-               typeset formatted sheet music to a TeX file and and
-               (mechanical) performances to MIDI files. Features
-               include multiple staffs, meters, clefs, keys, lyrics,
-               versatile input-language, cadenzas beams, slurs,
-               triplets.
+Version: 0.1.12
+Entered-date: 03SEP97
+Description:   LilyPond is the GNU Project music typesetter. This
+               program converts music definition files into
+               visual or auditive output: it can typeset formatted
+               sheet music to a TeX file and and (mechanical)
+               performances to MIDI files. Features include multiple
+               staffs, meters, clefs, keys, lyrics, versatile
+               input-language, cadenzas beams, slurs, triplets.
 Keywords: music typesetting midi notation
 Author: hanwen@stack.nl (Han-Wen Nienhuys)
        jan@digicash.com (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps
-       340k lilypond-0.1.11.tar.gz 
+       395k lilypond-0.1.12.tar.gz 
 Original-site: pcnov095.win.tue.nl /pub/lilypond/
-       340k lilypond-0.1.11.tar.gz 
+       395k lilypond-0.1.12.tar.gz 
 Copying-policy: GPL
 End
index aa442688fec5a3118a023258e6977edf47b6ebb7..db93b2c2fa554df5c8a0cec2ade6e2a2036908a0 100644 (file)
@@ -2,20 +2,20 @@ Begin3
 Title: LilyPond
 Version: @TOPLEVEL_VERSION@
 Entered-date: @DATE@
-Description:   GNU LilyPond is a program which converts music
-               definition files into visual or auditive output: it can
-               typeset formatted sheet music to a TeX file and and
-               (mechanical) performances to MIDI files. Features
-               include multiple staffs, meters, clefs, keys, lyrics,
-               versatile input-language, cadenzas beams, slurs,
-               triplets.
+Description:   LilyPond is the GNU Project music typesetter. This
+               program converts music definition files into
+               visual or auditive output: it can typeset formatted
+               sheet music to a TeX file and and (mechanical)
+               performances to MIDI files. Features include multiple
+               staffs, meters, clefs, keys, lyrics, versatile
+               input-language, cadenzas beams, slurs, triplets.
 Keywords: music typesetting midi notation
 Author: hanwen@stack.nl (Han-Wen Nienhuys)
        jan@digicash.com (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps
-       340k lilypond-@TOPLEVEL_VERSION@.tar.gz 
+       395k lilypond-@TOPLEVEL_VERSION@.tar.gz 
 Original-site: pcnov095.win.tue.nl /pub/lilypond/
-       340k lilypond-@TOPLEVEL_VERSION@.tar.gz 
+       395k lilypond-@TOPLEVEL_VERSION@.tar.gz 
 Copying-policy: GPL
 End
index d9993b4a8778baeabd4d53d7986e7300a9b5531e..2d43580ecfc0b7cb6da8856dc216ea469aaee179 100644 (file)
@@ -1,21 +1,21 @@
 Name: lilypond
-Version: 0.1.11
+Version: 0.1.12
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.11.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.12.tar.gz
 Summary: A preprocessor to make TeX typeset music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
 Icon: lelie_icon.gif
 Buildroot: /tmp/lilypond-install
 
-%description
-GNU LilyPond which converts music definition files into visual or
-audio output: it can typeset formatted sheet music to a TeX file and
-and (mechanical) performances to MIDI files. Features include multiple
-staffs meters, clefs, keys, lyrics, versatile input-language, cadenzas
-beams, slurs, triplets.
+%description 
+LilyPond is the GNU Project music typesetter. This program converts
+music definition files into visual or auditive output: it can typeset
+formatted sheet music to a TeX file and and (mechanical) performances
+to MIDI files. Features include multiple staffs, meters, clefs, keys,
+lyrics, versatile input-language, cadenzas beams, slurs, triplets.
 
 %prep
 %setup
@@ -29,7 +29,7 @@ make -C Documentation gifs
 make prefix="$RPM_BUILD_ROOT/usr" install
 %files
 %doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/internals.text Documentation/out/language.text Documentation/out/lilypond.text Documentation/out/links.text Documentation/out/literature.text Documentation/out/mi2mu.text Documentation/out/mudela-book.text Documentation/out/mutopia.text Documentation/out/other-packages.text BUGS TODO NEWS DEDICATION ANNOUNCE README 
-%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/fugue1.ly input/gallina.ly input/gallina.tex input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/prelude1.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen-16.ly input/standchen-16.tex input/standchen-20.ly input/standchen-20.tex input/standchen-part.ly input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wohltemperirt.ly Documentation/mudela-course.doc Documentation/mudela-man.doc 
+%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/fugue1.ly input/gallina.ly input/gallina.tex input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/prelude1.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen-16.tex input/standchen-20.tex input/standchen.ly input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wohltemperirt.ly Documentation/mudela-course.doc Documentation/mudela-man.doc 
 %doc Documentation/out/lelie_logo.gif
 /usr/bin/convert-mudela
 /usr/bin/mudela-book
index 92cb6510b10bd0e16d6a9660dc7462f89ac85215..2f04d5d6a537746b641200179d960ce5a81a14ec 100644 (file)
@@ -10,12 +10,12 @@ Packager: Han-Wen Nienhuys <hanwen@stack.nl>
 Icon: lelie_icon.gif
 Buildroot: /tmp/lilypond-install
 
-%description
-GNU LilyPond which converts music definition files into visual or
-audio output: it can typeset formatted sheet music to a TeX file and
-and (mechanical) performances to MIDI files. Features include multiple
-staffs meters, clefs, keys, lyrics, versatile input-language, cadenzas
-beams, slurs, triplets.
+%description 
+LilyPond is the GNU Project music typesetter. This program converts
+music definition files into visual or auditive output: it can typeset
+formatted sheet music to a TeX file and and (mechanical) performances
+to MIDI files. Features include multiple staffs, meters, clefs, keys,
+lyrics, versatile input-language, cadenzas beams, slurs, triplets.
 
 %prep
 %setup
index d5e67277766020314b79a06477fea241cc8898bb..7eb350dbdc3b7d6d3b1b972023c46d8cf65becf7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  midi-parser.cc -- implement 
+  midi-parser.cc -- implement Midi_parser[_info]
 
   source file of the GNU LilyPond music typesetter
 
@@ -59,7 +59,10 @@ Midi_parser::get_u (int n)
 String
 Midi_parser::get_str (int n)
 {
-  assert (n > 0);
+  assert (n >= 0);
+  if (!n) 
+    warning ("Zero length string encountered");
+  
   Byte const* p = forward_byte_L (n);
   return String (p, n);
 }
index ad2bf20aae3b142ff9b0b1834a84110de86eaa38..76a3e3156118024ee6cd39d67c8d42fb9242230d 100644 (file)
@@ -4,7 +4,7 @@
 
 
 \def\musixtwentyfonts{
-  \font\textfont=cmr10
+  \font\normaltextfont=cmr10
         \font\meterfont=cmbx12
         \font\slurufont=oslu20
         \font\slurdfont=osld20
         \font\musicdraw=opussps
         \font\italicfont=cmti10
         \font\dynfont=cmbxti10 scaled \magstep1
-        \font\mathfont=cmsy10
+        \font\musicmathfont=cmsy10
 }
 
 
 \def\musixsixteenfonts{
-        \font\textfont=cmr8
+        \font\normaltextfont=cmr8
         \font\meterfont=cmbx12
         \font\italicfont=cmti8
         \font\slurufont=oslu16
         \font\musicfnt=opus16
         \font\dynfont=cmbxti12
         \font\musicdraw=opussps
-        \font\mathfont=cmsy8
+        \font\musicmathfont=cmsy8
 }
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % provide interface to musixtex fonts 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mdef\quartball{26}
-\mdef\halfball{27}
-\mdef\wholeball{28}
-\mdef\halfrest{13}
-\mdef\wholerest{12}
-\mdef\quartrest{14}
-\mdef\eighthrest{15}
-\mdef\sixteenthrest{16}
-\mdef\thirtysecondrest{17}
-\mdef\sixtyfourthrest{18}
-%\mdef\hundredtwentyeighthrest{67}
-\mdef\sharp{93}
-\mdef\flat{91}
-\mdef\natural{95}
-\mdef\sharpsharp{94}
-\mdef\flatflat{92}
+\musicdef\quartball{26}
+\musicdef\halfball{27}
+\musicdef\wholeball{28}
+\musicdef\halfrest{13}
+\musicdef\wholerest{12}
+\musicdef\quartrest{14}
+\musicdef\eighthrest{15}
+\musicdef\sixteenthrest{16}
+\musicdef\thirtysecondrest{17}
+\musicdef\sixtyfourthrest{18}
+%\musicdef\hundredtwentyeighthrest{67}
+\musicdef\sharp{93}
+\musicdef\flat{91}
+\musicdef\natural{95}
+\musicdef\sharpsharp{94}
+\musicdef\flatflat{92}
 
-\mdef\singledot{'00}
-\mdef\doubledot{'01}
-\mdef\tripledot{'02}
-\mdef\mussepline{155}
+\musicdef\singledot{'00}
+\musicdef\doubledot{'01}
+\musicdef\tripledot{'02}
+\musicdef\mussepline{155}
 
-\mdef\violinclef{65}
-\mdef\bassclef{67}
-\mdef\altoclef{69}
-\mdef\cviolinclef{66}
-\mdef\cbassclef{68}
-\mdef\caltoclef{70}
+\musicdef\violinclef{65}
+\musicdef\bassclef{67}
+\musicdef\altoclef{69}
+\musicdef\cviolinclef{66}
+\musicdef\cbassclef{68}
+\musicdef\caltoclef{70}
 
-\mdef\deighthflag{32}
-\mdef\dsixteenthflag{46}
-\mdef\dthirtysecondflag{47}
-\mdef\dsixtyfourthflag{48}
-\mdef\dhundredtwentyeighthflag{49}
+\musicdef\deighthflag{32}
+\musicdef\dsixteenthflag{46}
+\musicdef\dthirtysecondflag{47}
+\musicdef\dsixtyfourthflag{48}
+\musicdef\dhundredtwentyeighthflag{49}
 
 % pointing up
-\mdef\ueighthflag{40}
-\mdef\usixteenthflag{41}
-\mdef\uthirtysecondflag{42}
-\mdef\usixtyfourthflag{43}
-\mdef\uhundredtwentyeighthflag{44}
+\musicdef\ueighthflag{40}
+\musicdef\usixteenthflag{41}
+\musicdef\uthirtysecondflag{42}
+\musicdef\usixtyfourthflag{43}
+\musicdef\uhundredtwentyeighthflag{44}
 
 \maccentdef\repeatcolon{55}{2/1}
 \def\eighthflag{\topalign{\ueighthflag}}
 \maccentdef\fermata{80}{-1/1}
 \maccentdef\ifermata{81}{1/1}
 
-\mdef\spicato{28}
-\mdef\ispicato{29}
-\mdef\upbow{23}
-\mdef\downbow{22}
+\musicdef\spicato{28}
+\musicdef\ispicato{29}
+\musicdef\upbow{23}
+\musicdef\downbow{22}
index 9057314d73f2eea95a37159b26accf5a649de5fb..189c512b48ddef4a98201d2cee398fe1cb9b8b26 100644 (file)
 \fi
 \SkipLilydefs
 
+\ifundefined{mudelacopyright}
+        \def\mudelacopyright{\copyright\ \number\year}
+\fi
+\ifundefined{LilyIdString}
+        \def\LilyIdString{Lily was here}
+\fi
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % macros to shorten other definitions
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\mdef#1#2{\def#1{\mchar{#2}}}
-\def\mchar#1{\musicfnt\char#1}
+\def\musicdef#1#2{\def#1{\musicchar{#2}}}
+\def\musicchar#1{\musicfnt\char#1}
 \def\rationalmultiply#1*#2/#3{\multiply #1 by #2 \divide #1 by #3}
 
 
 \def\maccentraise#1#2{\dimen0=\noteheight
         \rationalmultiply\dimen0*#2%
         \raise\dimen0\hbox{#1}}
-\def\maccentdef#1#2#3{\def#1{\maccentraise{\mchar{#2}}{#3}}}
+\def\maccentdef#1#2#3{\def#1{\maccentraise{\musicchar{#2}}{#3}}}
 \def\vertcenter#1{\vbox to 0pt{\vss #1\vss}}
 
-\def\mathdef#1#2{\def#1{\mathchar{#2}}}
-\def\mathchar#1{\mathfont\char#1}
+\def\musicmathdef#1#2{\def#1{\musicmathchar{#2}}}
+\def\musicmathchar#1{\musicmathfont\char#1}
 
 \def\topalign#1{\vbox to 0pt{#1\vss}}
 \def\botalign#1{\vbox to 0pt{\vss #1}}
 
 \input taupindefs
 
-\mathdef\cup{91} % \cup
-\mathdef\wedge{94} % \wedge
-\mathdef\striepke{0} % heu?
+\musicmathdef\cup{91} % \cup
+\musicmathdef\wedge{94} % \wedge
+\musicmathdef\striepke{0} % heu?
 
 %% custom characters --- this should go: add to (meta!) font
 % \def\myheel{\kern-.5ex\vbox{\cup}\kern-.5ex}
 \def\crescendosym#1{\count0=84\advance\count0 by #1\musicdraw\char\count0}
 \def\decrescendosym#1{\count0=116\advance\count0 by #1\musicdraw\char\count0}
 \def\rulesym#1#2{\vrule height #1 width #2}
-\def\settext#1{\textfont #1}
+\def\settext#1{\normaltextfont #1}
 \def\setitalic#1{\italicfont #1}
 \def\setdynamic#1{\dynfont #1}
 
 \def\unknown{{\bf u}}
 
 \def\postheader{}
+\ifundefined{documentclass}
+        \footline={\ifnum\pageno=1
+        {\smalltextfont\mudelacopyright\hfil \LilyIdString
+        }\else{\hfil\the\pageno\hfil}\fi
+}\else
+        %% FIXME
+        \def\ps@plain{
+                \renewcommand{\@oddhead}{}%
+                \renewcommand{\@evenfoot}{}%
+                \renewcommand{\@evenhead}{}%
+                \renewcommand{\@oddfoot}{\ifnum\thepage=1
+        {\hfil \LilyIdString
+        }\else{foo\hfil\the\pageno\hfil}\fi}}
+\fi
index d671a2a27a80697c576abe435e0767ec81fcc2c0..dd13f537c13d320ab1e49ee1866792b5091ad3ac 100644 (file)
@@ -1,6 +1,7 @@
 
 \def\musixtwentyfonts{
-  \font\textfont=cmr10
+        \font\normaltextfont=cmr10 %\textfont is a primitive
+        \font\smalltextfont=cmr8
         \font\meterfont=cmbx12
         \font\slurufont=xslu20
         \font\slurdfont=xsld20
         \font\musicdraw=musixsps
         \font\italicfont=cmti10
         \font\dynfont=cmbxti10 scaled \magstep1
-        \font\mathfont=cmsy10
+        \font\musicmathfont=cmsy10
 }
 
 
 \def\musixsixteenfonts{
-        \font\textfont=cmr8
+        \font\normaltextfont=cmr8 %\textfont is a primitive
+        \font\smalltextfont=cmr6
         \font\meterfont=cmbx12
         \font\italicfont=cmti8
         \font\slurufont=xslu16
         \font\musicfnt=musix16
         \font\dynfont=cmbxti10
         \font\musicdraw=musixsps
-        \font\mathfont=cmsy8
+        \font\musicmathfont=cmsy8
 }
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % provide interface to musixtex fonts 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mdef\quartball{'007}
-\mdef\halfball{'010}
-\mdef\wholeball{'011}
-\mdef\breveball{'040}
-\mdef\halfrest{'074}
-\mdef\wholerest{'075}
-\mdef\breverest{'072}
+\musicdef\quartball{'007}
+\musicdef\halfball{'010}
+\musicdef\wholeball{'011}
+\musicdef\breveball{'040}
+\musicdef\halfrest{'074}
+\musicdef\wholerest{'075}
+\musicdef\breverest{'072}
 %% hmm
-\mdef\outsidehalfrest{10}
-\mdef\outsidewholerest{11}
-\mdef\quartrest{62}
-\mdef\eighthrest{63}
-\mdef\sixteenthrest{64}
-\mdef\thirtysecondrest{65}
-\mdef\sixtyfourthrest{66}
-\mdef\hundredtwentyeighthrest{67}
-\mdef\sharp{52}
-\mdef\flat{50}
-\mdef\natural{54}
-\mdef\sharpsharp{53}
-\mdef\flatflat{51}
+\musicdef\outsidehalfrest{10}
+\musicdef\outsidewholerest{11}
+\musicdef\quartrest{62}
+\musicdef\eighthrest{63}
+\musicdef\sixteenthrest{64}
+\musicdef\thirtysecondrest{65}
+\musicdef\sixtyfourthrest{66}
+\musicdef\hundredtwentyeighthrest{67}
+\musicdef\sharp{52}
+\musicdef\flat{50}
+\musicdef\natural{54}
+\musicdef\sharpsharp{53}
+\musicdef\flatflat{51}
 
-\mdef\singledot{'00}
-\mdef\doubledot{'01}
-\mdef\tripledot{'02}
-\mdef\mussepline{155}
+\musicdef\singledot{'00}
+\musicdef\doubledot{'01}
+\musicdef\tripledot{'02}
+\musicdef\mussepline{155}
 
-\mdef\violinclef{71}
-\mdef\bassclef{73}
-\mdef\altoclef{75}
-\mdef\cviolinclef{72}
-\mdef\cbassclef{74}
-\mdef\caltoclef{76}
+\musicdef\violinclef{71}
+\musicdef\bassclef{73}
+\musicdef\altoclef{75}
+\musicdef\cviolinclef{72}
+\musicdef\cbassclef{74}
+\musicdef\caltoclef{76}
 
-\mdef\deighthflag{45}
-\mdef\dsixteenthflag{46}
-\mdef\dthirtysecondflag{47}
-\mdef\dsixtyfourthflag{48}
-\mdef\dhundredtwentyeighthflag{49}
+\musicdef\deighthflag{45}
+\musicdef\dsixteenthflag{46}
+\musicdef\dthirtysecondflag{47}
+\musicdef\dsixtyfourthflag{48}
+\musicdef\dhundredtwentyeighthflag{49}
 
 % pointing up
-\mdef\ueighthflag{40}
-\mdef\usixteenthflag{41}
-\mdef\uthirtysecondflag{42}
-\mdef\usixtyfourthflag{43}
-\mdef\uhundredtwentyeighthflag{44}
+\musicdef\ueighthflag{40}
+\musicdef\usixteenthflag{41}
+\musicdef\uthirtysecondflag{42}
+\musicdef\usixtyfourthflag{43}
+\musicdef\uhundredtwentyeighthflag{44}
 
 \maccentdef\repeatcolon{55}{2/1}
 \def\eighthflag{\topalign{\ueighthflag}}
 \def\ldoubledot{\kern-\notewidth\doubledot}
 \def\ltripledot{\kern-\notewidth\tripledot}
 
-\mdef\turn{67}
+\musicdef\turn{67}
 \maccentdef\sforzato{30}{-3/2}
 \maccentdef\marcato{20}{-1/1}
 \maccentdef\imarcato{21}{1/1}
 \maccentdef\fermata{80}{-1/1}
 \maccentdef\ifermata{81}{1/1}
 
-\mdef\spicato{28}
-\mdef\ispicato{29}
-\mdef\upbow{23}
-\mdef\downbow{22}
+\musicdef\spicato{28}
+\musicdef\ispicato{29}
+\musicdef\upbow{23}
+\musicdef\downbow{22}
 
 \def\tr{{\it tr}}