=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/Attic/list.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/make/Attic/list.h 1996/06/26 05:36:34 1.2 +++ src/usr.bin/make/Attic/list.h 1996/11/30 21:08:58 1.3 @@ -1,5 +1,5 @@ -/* $OpenBSD: list.h,v 1.2 1996/06/26 05:36:34 deraadt Exp $ */ -/* $NetBSD: list.h,v 1.4 1995/06/14 15:19:28 christos Exp $ */ +/* $OpenBSD: list.h,v 1.3 1996/11/30 21:08:58 millert Exp $ */ +/* $NetBSD: list.h,v 1.5 1996/11/06 17:59:11 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: @(#)list.h 5.3 (Berkeley) 6/1/90 + * from: @(#)list.h 8.1 (Berkeley) 6/6/93 */ /* @@ -63,39 +63,39 @@ * to a list as a whole, the user keeps a pointer to the header; that * header is initialized by a call to List_Init(), which creates an empty * list given a pointer to a List_Links structure (described below). - * + * * The links are contained in a two-element structure called List_Links. * A list joins List_Links records (that is, each List_Links structure * points to other List_Links structures), but if the List_Links is the * first field within a larger structure, then the larger structures are * effectively linked together as follows: - * + * * header * (List_Links) first elt. second elt. - * ----------------- ----------------- ----------------- + * ----------------- ----------------- ----------------- * ..-> | nextPtr | ----> | List_Links | ----> | List_Links |----.. - * | - - - - - - - | | | | | + * | - - - - - - - | | | | | * ..-- | prevPtr | <---- | | <---- | |<---.. * ----------------- - --- --- --- - - --- --- --- - - * | rest of | | rest of | - * | structure | | structure | + * | rest of | | rest of | + * | structure | | structure | * | | | | - * | ... | | ... | - * ----------------- ----------------- - * + * | ... | | ... | + * ----------------- ----------------- + * * It is possible to link structures through List_Links fields that are * not at the beginning of the larger structure, but it is then necessary * to perform pointer arithmetic to find the beginning of the larger * structure, given a pointer to some point within it. - * + * * A typical structure might be something like: - * + * * typedef struct { * List_Links links; * char ch; * integer flags; * } EditChar; - * + * * Before an element is inserted in a list for the first time, it must * be initialized by calling the macro List_InitElement(). */ @@ -132,7 +132,7 @@ #define List_InitElement(elementPtr) \ (elementPtr)->prevPtr = (List_Links *) NIL; \ (elementPtr)->nextPtr = (List_Links *) NIL; - + /* * Macros for stepping through or selecting parts of lists */ @@ -145,10 +145,10 @@ * Macro to loop through a list and perform an operation on each member. * * Usage: LIST_FORALL(headerPtr, itemPtr) { - * / * + * / * * * operation on itemPtr, which points to successive members * * of the list - * * + * * * * It may be appropriate to first assign * * foobarPtr = (Foobar *) itemPtr; * * to refer to the entire Foobar structure. @@ -282,7 +282,7 @@ * LIST_ATFRONT(headerPtr) -- insert at front of list * LIST_ATREAR(headerPtr) -- insert at end of list * - * For example, + * For example, * * List_Insert(itemPtr, LIST_AFTER(otherPtr)); *