/*ident "@(#)List:incl/List.c 3.1" */ /****************************************************************************** * * C++ Standard Components, Release 3.0. * * Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc. * Copyright (c) 1988, 1989, 1990 ATYPE&T. All Rights Reserved. * * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System * Laboratories, Inc. The copyright notice above does not evidence * any actual or intended publication of such source code. * ******************************************************************************/ #include #include #include ostream& operator<<(ostream& oo, const List& ll) { int first = 1; oo << "( "; Const_listiter l(ll); while (!l.at_end()) { if (!first) oo << ", "; first = 0; oo << *(l.next()); } oo << " )"; return oo; } #ifndef __GNUG__ ostream& List::print(ostream& oo) const { int first = 1; oo << "( "; Const_listiter l(*this); while (!l.at_end()) { if (!first) oo << ", "; first = 0; oo << *(l.next()); } oo << " )"; return oo; } #endif ostream& operator<<(ostream& oo, const List_of_p& ll) { int first = 1; oo << "( "; Const_list_of_piter l(ll); while (!l.at_end()) { if (!first) oo << ", "; first = 0; oo << *(l.next()); } oo << " )"; return oo; } #ifndef __GNUG__ ostream& List_of_p::print(ostream& oo) const { int first = 1; oo << "( "; Const_list_of_piter l(*this); while (!l.at_end()) { if (!first) oo << ", "; first = 0; oo << *(l.next()); } oo << " )"; return oo; } #endif