1 /*
2  * Copyright (c) 1988, 1989, 1990, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Adam de Boor.
7  *
8  * %sccs.include.redist.c%
9  */
10 
11 #ifndef lint
12 static char sccsid[] = "@(#)lstClose.c	8.2 (Berkeley) 04/28/95";
13 #endif /* not lint */
14 
15 /*-
16  * LstClose.c --
17  *	Close a list for sequential access.
18  *	The sequential functions access the list in a slightly different way.
19  *	CurPtr points to their idea of the current node in the list and they
20  *	access the list based on it. Because the list is circular, Lst_Next
21  *	and Lst_Prev will go around the list forever. Lst_IsAtEnd must be
22  *	used to determine when to stop.
23  */
24 
25 #include	"lstInt.h"
26 
27 /*-
28  *-----------------------------------------------------------------------
29  * Lst_Close --
30  *	Close a list which was opened for sequential access.
31  *
32  * Results:
33  *	None.
34  *
35  * Side Effects:
36  *	The list is closed.
37  *
38  *-----------------------------------------------------------------------
39  */
40 void
41 Lst_Close (l)
42     Lst	    l;	  	/* The list to close */
43 {
44     register List 	list = (List) l;
45 
46     if (LstValid(l) == TRUE) {
47 	list->isOpen = FALSE;
48 	list->atEnd = Unknown;
49     }
50 }
51 
52