source file of the GNU LilyPond music typesetter
- (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
{
public:
Killing_cons (T *t, Cons<T> *p)
- : Cons<T>( t,p)
+ : Cons<T> ( t,p)
{
}
virtual ~Killing_cons ();
return knip;
}
-template<class T> int cons_list_size_i (Cons<T> *l)
+template<class T> int cons_list_size (Cons<T> *l)
{
int i=0;
- while (l)
+ while (l)
{
l = l->next_;
i++;
Invariants:
- (*tail_) is either the head_ pointer, or a next_ pointer from the list.
+ (*tail_) is either the head_ pointer, or a next_ pointer from the list.
**tail_ == NULL
*/
assert (!c->next_);
*nil_pointer_address_ = c;
while (*nil_pointer_address_)
- nil_pointer_address_ = &(*nil_pointer_address_)->next_;
+ nil_pointer_address_ = & (*nil_pointer_address_)->next_;
}
/**
PRE: *pp should either be the head_ pointer, or the next_ pointer
*/
Cons<T> *remove_cons (Cons<T> **pp)
{
- if (&(*pp)->next_ == nil_pointer_address_)
+ if (& (*pp)->next_ == nil_pointer_address_)
nil_pointer_address_ = pp;
return ::remove_cons (pp);
void truncate (int i)
{
Cons<T> **p = &head_;
- for (; *p && i; p = &((*p)->next_))
+ for (; *p && i; p = & ((*p)->next_))
{
i--;
}
{
junk ();
}
- int size_i ()
+ int size ()
{
- return cons_list_size_i (head_);
+ return cons_list_size (head_);
}
};