upgraded to the latest NetBSD version
[unix-history] / usr / src / usr.bin / make / lst.lib / lstAtEnd.c
... / ...
CommitLineData
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
12static char sccsid[] = "@(#)lstAtEnd.c 8.2 (Berkeley) %G%";
13#endif /* not lint */
14
15/*-
16 * LstAtEnd.c --
17 * Add a node at the end of the list
18 */
19
20#include "lstInt.h"
21
22/*-
23 *-----------------------------------------------------------------------
24 * Lst_AtEnd --
25 * Add a node to the end of the given list
26 *
27 * Results:
28 * SUCCESS if life is good.
29 *
30 * Side Effects:
31 * A new ListNode is created and added to the list.
32 *
33 *-----------------------------------------------------------------------
34 */
35ReturnStatus
36Lst_AtEnd (l, d)
37 Lst l; /* List to which to add the datum */
38 ClientData d; /* Datum to add */
39{
40 register LstNode end;
41
42 end = Lst_Last (l);
43 return (Lst_Append (l, end, d));
44}