140412Sbostic /*
262085Sbostic  * Copyright (c) 1988, 1989, 1990, 1993
362085Sbostic  *	The Regents of the University of California.  All rights reserved.
440411Sbostic  *
540412Sbostic  * This code is derived from software contributed to Berkeley by
640412Sbostic  * Adam de Boor.
740411Sbostic  *
842741Sbostic  * %sccs.include.redist.c%
940411Sbostic  */
1040412Sbostic 
1140411Sbostic #ifndef lint
12*69094Schristos static char sccsid[] = "@(#)lstAtEnd.c	8.2 (Berkeley) 04/28/95";
1340412Sbostic #endif /* not lint */
1440411Sbostic 
1540412Sbostic /*-
1640412Sbostic  * LstAtEnd.c --
1740412Sbostic  *	Add a node at the end of the list
1840412Sbostic  */
1940412Sbostic 
2040411Sbostic #include	"lstInt.h"
2140411Sbostic 
2240411Sbostic /*-
2340411Sbostic  *-----------------------------------------------------------------------
2440411Sbostic  * Lst_AtEnd --
2540411Sbostic  *	Add a node to the end of the given list
2640411Sbostic  *
2740411Sbostic  * Results:
2840411Sbostic  *	SUCCESS if life is good.
2940411Sbostic  *
3040411Sbostic  * Side Effects:
3140411Sbostic  *	A new ListNode is created and added to the list.
3240411Sbostic  *
3340411Sbostic  *-----------------------------------------------------------------------
3440411Sbostic  */
3540411Sbostic ReturnStatus
Lst_AtEnd(l,d)3640411Sbostic Lst_AtEnd (l, d)
3740411Sbostic     Lst		l;	/* List to which to add the datum */
3840411Sbostic     ClientData	d;	/* Datum to add */
3940411Sbostic {
4040411Sbostic     register LstNode	end;
4140411Sbostic 
4240411Sbostic     end = Lst_Last (l);
4340411Sbostic     return (Lst_Append (l, end, d));
4440411Sbostic }
45