2 cons.hh -- declare LISP like datatypes
4 source file of the GNU LilyPond music typesetter
6 (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
37 class Killing_cons : public Cons<T>
40 Killing_cons (T *t, Cons<T> *p)
44 virtual ~Killing_cons ();
48 /// remove the link pointed to by *p.
50 Cons<T> *remove_cons (Cons<T> **pp)
65 Cons_list () { init_list (); }
66 void init_list () {head_ =0; tail_ = &head_; }
67 void append (Cons<T> *c)
72 tail_ = &(*tail_)->next_;
74 Cons<T> *remove_cons (Cons<T> **pp)
76 if (&(*pp)->next_ == tail_)
79 return ::remove_cons (pp);
86 ~Cons_list () { junk (); }
91 void copy_killing_cons_list (Cons_list<T>&, Cons<T> *src);
94 clone_killing_cons_list (Cons_list<T>&, Cons<T> *src);
96 template<class T> int cons_list_size_i (Cons<T> *l)