140412Sbostic /*
240412Sbostic  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
340412Sbostic  * All rights reserved.
440412Sbostic  *
540412Sbostic  * This code is derived from software contributed to Berkeley by
640412Sbostic  * Adam de Boor.
740412Sbostic  *
8*42741Sbostic  * %sccs.include.redist.c%
940412Sbostic  */
1040412Sbostic 
1140412Sbostic #ifndef lint
12*42741Sbostic static char sccsid[] = "@(#)lstClose.c	5.3 (Berkeley) 06/01/90";
1340412Sbostic #endif /* not lint */
1440412Sbostic 
1540411Sbostic /*-
1640411Sbostic  * LstClose.c --
1740411Sbostic  *	Close a list for sequential access.
1840411Sbostic  *	The sequential functions access the list in a slightly different way.
1940411Sbostic  *	CurPtr points to their idea of the current node in the list and they
2040411Sbostic  *	access the list based on it. Because the list is circular, Lst_Next
2140411Sbostic  *	and Lst_Prev will go around the list forever. Lst_IsAtEnd must be
2240411Sbostic  *	used to determine when to stop.
2340411Sbostic  */
2440411Sbostic 
2540411Sbostic #include	"lstInt.h"
2640411Sbostic 
2740411Sbostic /*-
2840411Sbostic  *-----------------------------------------------------------------------
2940411Sbostic  * Lst_Close --
3040411Sbostic  *	Close a list which was opened for sequential access.
3140411Sbostic  *
3240411Sbostic  * Results:
3340411Sbostic  *	None.
3440411Sbostic  *
3540411Sbostic  * Side Effects:
3640411Sbostic  *	The list is closed.
3740411Sbostic  *
3840411Sbostic  *-----------------------------------------------------------------------
3940411Sbostic  */
4040411Sbostic void
4140411Sbostic Lst_Close (l)
4240411Sbostic     Lst	    l;	  	/* The list to close */
4340411Sbostic {
4440411Sbostic     register List 	list = (List) l;
4540411Sbostic 
4640411Sbostic     if (LstValid(l) == TRUE) {
4740411Sbostic 	list->isOpen = FALSE;
4840411Sbostic 	list->atEnd = Unknown;
4940411Sbostic     }
5040411Sbostic }
5140411Sbostic 
52