VirtualBox

Ignore:
Timestamp:
Nov 26, 2002 9:24:54 PM (22 years ago)
Author:
bird
Message:

Import of RELENG_4_7_0_RELEASE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/FREEBSD/src/kmk/lst.lib/lstDupl.c

    r9 r24  
    3434 * SUCH DAMAGE.
    3535 *
    36  * @(#)lstDupl.c        8.1 (Berkeley) 6/6/93
     36 * $FreeBSD: src/usr.bin/make/lst.lib/lstDupl.c,v 1.7 1999/08/28 01:03:49 peter Exp $
    3737 */
    3838
    3939#ifndef lint
    40 #include <sys/cdefs.h>
    41 __FBSDID("$FreeBSD: src/usr.bin/make/lst.lib/lstDupl.c,v 1.12 2002/10/09 02:00:22 jmallett Exp $");
     40static char sccsid[] = "@(#)lstDupl.c   8.1 (Berkeley) 6/6/93";
    4241#endif /* not lint */
    4342
     
    5352 *-----------------------------------------------------------------------
    5453 * Lst_Duplicate --
    55  *      Duplicate an entire list. If a function to copy a void * is
     54 *      Duplicate an entire list. If a function to copy a ClientData is
    5655 *      given, the individual client elements will be duplicated as well.
    5756 *
    5857 * Results:
    59  *      The new Lst structure or NULL if failure.
     58 *      The new Lst structure or NILLST if failure.
    6059 *
    6160 * Side Effects:
     
    6665Lst_Duplicate (l, copyProc)
    6766    Lst           l;             /* the list to duplicate */
    68     /* A function to duplicate each void * */
    69     void *        (*copyProc)(void *);
     67    /* A function to duplicate each ClientData */
     68    ClientData    (*copyProc) __P((ClientData));
    7069{
    7170    register Lst        nl;
     
    7473
    7574    if (!LstValid (l)) {
    76         return (NULL);
     75        return (NILLST);
    7776    }
    7877
    7978    nl = Lst_Init (list->isCirc);
    80     if (nl == NULL) {
    81         return (NULL);
     79    if (nl == NILLST) {
     80        return (NILLST);
    8281    }
    8382
    8483    ln = list->firstPtr;
    85     while (ln != NULL) {
     84    while (ln != NilListNode) {
    8685        if (copyProc != NOCOPY) {
    8786            if (Lst_AtEnd (nl, (*copyProc) (ln->datum)) == FAILURE) {
    88                 return (NULL);
     87                return (NILLST);
    8988            }
    9089        } else if (Lst_AtEnd (nl, ln->datum) == FAILURE) {
    91             return (NULL);
     90            return (NILLST);
    9291        }
    9392
    9493        if (list->isCirc && ln == list->lastPtr) {
    95             ln = NULL;
     94            ln = NilListNode;
    9695        } else {
    9796            ln = ln->nextPtr;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette