=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/suff.c,v retrieving revision 1.30 retrieving revision 1.31 diff -c -r1.30 -r1.31 *** src/usr.bin/make/suff.c 2000/06/17 14:43:36 1.30 --- src/usr.bin/make/suff.c 2000/06/23 16:15:50 1.31 *************** *** 1,4 **** ! /* $OpenBSD: suff.c,v 1.30 2000/06/17 14:43:36 espie Exp $ */ /* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: suff.c,v 1.31 2000/06/23 16:15:50 espie Exp $ */ /* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */ /* *************** *** 43,49 **** #if 0 static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94"; #else ! static char rcsid[] = "$OpenBSD: suff.c,v 1.30 2000/06/17 14:43:36 espie Exp $"; #endif #endif /* not lint */ --- 43,49 ---- #if 0 static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94"; #else ! static char rcsid[] = "$OpenBSD: suff.c,v 1.31 2000/06/23 16:15:50 espie Exp $"; #endif #endif /* not lint */ *************** *** 411,421 **** LstNode ln; /* current element in l we're examining */ Suff *s2 = NULL; /* the suffix descriptor in this element */ ! if (Lst_Open (l) == FAILURE) { ! return; ! } ! while ((ln = Lst_Next (l)) != NULL) { ! s2 = (Suff *) Lst_Datum (ln); if (s2->sNum >= s->sNum) { break; } --- 411,419 ---- LstNode ln; /* current element in l we're examining */ Suff *s2 = NULL; /* the suffix descriptor in this element */ ! Lst_Open(l); ! while ((ln = Lst_Next(l)) != NULL) { ! s2 = (Suff *)Lst_Datum(ln); if (s2->sNum >= s->sNum) { break; } *************** *** 534,540 **** } return (FALSE); } ! src = (Suff *) Lst_Datum (srcLn); str2 = str + src->nameLen; if (*str2 == '\0') { single = src; --- 532,538 ---- } return (FALSE); } ! src = (Suff *)Lst_Datum(srcLn); str2 = str + src->nameLen; if (*str2 == '\0') { single = src; *************** *** 611,617 **** * free the commands themselves, because a given command can be * attached to several different transformations. */ ! gn = (GNode *) Lst_Datum (ln); Lst_Destroy(&gn->commands, NOFREE); Lst_Destroy(&gn->children, NOFREE); Lst_Init(&gn->commands); --- 609,615 ---- * free the commands themselves, because a given command can be * attached to several different transformations. */ ! gn = (GNode *)Lst_Datum(ln); Lst_Destroy(&gn->commands, NOFREE); Lst_Destroy(&gn->children, NOFREE); Lst_Init(&gn->commands); *************** *** 850,863 **** LIST inIncludes; /* Cumulative .INCLUDES path */ LIST inLibs; /* Cumulative .LIBS path */ ! if (Lst_Open(&sufflist) == FAILURE) ! return; Lst_Init(&inIncludes); Lst_Init(&inLibs); while ((ln = Lst_Next(&sufflist)) != NULL) { ! s = (Suff *) Lst_Datum (ln); if (!Lst_IsEmpty(&s->searchPath)) { #ifdef INCLUDES if (s->flags & SUFF_INCLUDE) { --- 848,860 ---- LIST inIncludes; /* Cumulative .INCLUDES path */ LIST inLibs; /* Cumulative .LIBS path */ ! Lst_Open(&sufflist); Lst_Init(&inIncludes); Lst_Init(&inLibs); while ((ln = Lst_Next(&sufflist)) != NULL) { ! s = (Suff *)Lst_Datum(ln); if (!Lst_IsEmpty(&s->searchPath)) { #ifdef INCLUDES if (s->flags & SUFF_INCLUDE) { *************** *** 911,917 **** ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname); if (ln != NULL) { ! s = (Suff *) Lst_Datum (ln); s->flags |= SUFF_INCLUDE; } } --- 908,914 ---- ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname); if (ln != NULL) { ! s = (Suff *)Lst_Datum(ln); s->flags |= SUFF_INCLUDE; } } *************** *** 941,947 **** ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname); if (ln != NULL) { ! s = (Suff *) Lst_Datum (ln); s->flags |= SUFF_LIBRARY; } } --- 938,944 ---- ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname); if (ln != NULL) { ! s = (Suff *)Lst_Datum(ln); s->flags |= SUFF_LIBRARY; } } *************** *** 1057,1065 **** Src *s; int t = 0; ! if (Lst_Open (l) == FAILURE) { ! return 0; ! } #ifdef DEBUG_SRC printf("cleaning %lx: ", (unsigned long) l); Lst_Every(l, PrintAddr); --- 1054,1060 ---- Src *s; int t = 0; ! Lst_Open(l); #ifdef DEBUG_SRC printf("cleaning %lx: ", (unsigned long) l); Lst_Every(l, PrintAddr); *************** *** 1068,1074 **** while ((ln = Lst_Next (l)) != NULL) { ! s = (Src *) Lst_Datum (ln); if (s->children == 0) { free(s->file); if (!s->parent) --- 1063,1069 ---- while ((ln = Lst_Next (l)) != NULL) { ! s = (Src *)Lst_Datum(ln); if (s->children == 0) { free(s->file); if (!s->parent) *************** *** 1197,1207 **** char *cp; t = targ->node; ! (void) Lst_Open(&t->children); prefLen = strlen (targ->pref); while ((ln = Lst_Next(&t->children)) != NULL) { ! s = (GNode *)Lst_Datum (ln); cp = strrchr (s->name, '/'); if (cp == (char *)NULL) { --- 1192,1202 ---- char *cp; t = targ->node; ! Lst_Open(&t->children); prefLen = strlen (targ->pref); while ((ln = Lst_Next(&t->children)) != NULL) { ! s = (GNode *)Lst_Datum(ln); cp = strrchr (s->name, '/'); if (cp == (char *)NULL) { *************** *** 1222,1228 **** * * XXX: Handle multi-stage transformations here, too. */ ! suff = (Suff *)Lst_Datum (ln); if (Lst_Member(&suff->parents, targ->suff) != NULL) { --- 1217,1223 ---- * * XXX: Handle multi-stage transformations here, too. */ ! suff = (Suff *)Lst_Datum(ln); if (Lst_Member(&suff->parents, targ->suff) != NULL) { *************** *** 1517,1523 **** * sGn gets the target in its iParents list, however, as that * will be sufficient to get the .IMPSRC variable set for tGn */ ! for (ln=Lst_First(&sGn->cohorts); ln != NULL; ln=Lst_Succ(ln)) { gn = (GNode *)Lst_Datum(ln); if (Lst_Member(&tGn->children, gn) == NULL) { --- 1512,1518 ---- * sGn gets the target in its iParents list, however, as that * will be sufficient to get the .IMPSRC variable set for tGn */ ! for (ln=Lst_First(&sGn->cohorts); ln != NULL; ln=Lst_Adv(ln)) { gn = (GNode *)Lst_Datum(ln); if (Lst_Member(&tGn->children, gn) == NULL) { *************** *** 2148,2154 **** ln = Lst_Find(&sufflist, SuffSuffHasNameP, LIBSUFF); if (ln != NULL) { ! gn->suffix = s = (Suff *) Lst_Datum (ln); Arch_FindLib(gn, &s->searchPath); } else { gn->suffix = NULL; --- 2143,2149 ---- ln = Lst_Find(&sufflist, SuffSuffHasNameP, LIBSUFF); if (ln != NULL) { ! gn->suffix = s = (Suff *)Lst_Datum(ln); Arch_FindLib(gn, &s->searchPath); } else { gn->suffix = NULL;