=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/suff.c,v retrieving revision 1.20 retrieving revision 1.21 diff -c -r1.20 -r1.21 *** src/usr.bin/make/suff.c 1999/12/18 21:58:07 1.20 --- src/usr.bin/make/suff.c 1999/12/19 00:04:25 1.21 *************** *** 1,4 **** ! /* $OpenBSD: suff.c,v 1.20 1999/12/18 21:58:07 espie Exp $ */ /* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: suff.c,v 1.21 1999/12/19 00:04:25 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.20 1999/12/18 21:58:07 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.21 1999/12/19 00:04:25 espie Exp $"; #endif #endif /* not lint */ *************** *** 536,545 **** */ for (;;) { if (srcLn == NULL) { ! srcLn = Lst_Find(sufflist, (ClientData)str, SuffSuffIsPrefix); } else { ! srcLn = Lst_FindFrom (sufflist, Lst_Succ(srcLn), (ClientData)str, ! SuffSuffIsPrefix); } if (srcLn == NULL) { /* --- 536,545 ---- */ for (;;) { if (srcLn == NULL) { ! srcLn = Lst_Find(sufflist, SuffSuffIsPrefix, (ClientData)str); } else { ! srcLn = Lst_FindFrom(Lst_Succ(srcLn), ! SuffSuffIsPrefix, (ClientData)str); } if (srcLn == NULL) { /* *************** *** 567,573 **** single = src; singleLn = srcLn; } else { ! targLn = Lst_Find(sufflist, (ClientData)str2, SuffSuffHasNameP); if (targLn != NULL) { *srcPtr = src; *targPtr = (Suff *)Lst_Datum(targLn); --- 567,573 ---- single = src; singleLn = srcLn; } else { ! targLn = Lst_Find(sufflist, SuffSuffHasNameP, (ClientData)str2); if (targLn != NULL) { *srcPtr = src; *targPtr = (Suff *)Lst_Datum(targLn); *************** *** 623,629 **** *t; /* target suffix */ LstNode ln; /* Node for existing transformation */ ! ln = Lst_Find (transforms, (ClientData)line, SuffGNHasNameP); if (ln == NULL) { /* * Make a new graph node for the transformation. It will be filled in --- 623,629 ---- *t; /* target suffix */ LstNode ln; /* Node for existing transformation */ ! ln = Lst_Find(transforms, SuffGNHasNameP, (ClientData)line); if (ln == NULL) { /* * Make a new graph node for the transformation. It will be filled in *************** *** 755,761 **** */ cp = SuffStrIsPrefix(s->name, transform->name); if (cp != (char *)NULL) { ! ln = Lst_Find(sufflist, (ClientData)cp, SuffSuffHasNameP); if (ln != NULL) { /* * Found target. Link in and return, since it can't be anything --- 755,761 ---- */ cp = SuffStrIsPrefix(s->name, transform->name); if (cp != (char *)NULL) { ! ln = Lst_Find(sufflist, SuffSuffHasNameP, (ClientData)cp); if (ln != NULL) { /* * Found target. Link in and return, since it can't be anything *************** *** 777,783 **** * Null-terminate the source suffix in order to find it. */ cp[1] = '\0'; ! ln = Lst_Find(sufflist, (ClientData)transform->name, SuffSuffHasNameP); /* * Replace the start of the target suffix */ --- 777,783 ---- * Null-terminate the source suffix in order to find it. */ cp[1] = '\0'; ! ln = Lst_Find(sufflist, SuffSuffHasNameP, (ClientData)transform->name); /* * Replace the start of the target suffix */ *************** *** 815,821 **** Suff *s; /* new suffix descriptor */ LstNode ln; ! ln = Lst_Find (sufflist, (ClientData)str, SuffSuffHasNameP); if (ln == NULL) { s = (Suff *) emalloc (sizeof (Suff)); --- 815,821 ---- Suff *s; /* new suffix descriptor */ LstNode ln; ! ln = Lst_Find(sufflist, SuffSuffHasNameP, (ClientData)str); if (ln == NULL) { s = (Suff *) emalloc (sizeof (Suff)); *************** *** 858,864 **** LstNode ln; Suff *s; ! ln = Lst_Find (sufflist, (ClientData)sname, SuffSuffHasNameP); if (ln == NULL) { return (NULL); } else { --- 858,864 ---- LstNode ln; Suff *s; ! ln = Lst_Find(sufflist, SuffSuffHasNameP, (ClientData)sname); if (ln == NULL) { return (NULL); } else { *************** *** 954,960 **** LstNode ln; Suff *s; ! ln = Lst_Find (sufflist, (ClientData)sname, SuffSuffHasNameP); if (ln != NULL) { s = (Suff *) Lst_Datum (ln); s->flags |= SUFF_INCLUDE; --- 954,960 ---- LstNode ln; Suff *s; ! ln = Lst_Find(sufflist, SuffSuffHasNameP, (ClientData)sname); if (ln != NULL) { s = (Suff *) Lst_Datum (ln); s->flags |= SUFF_INCLUDE; *************** *** 984,990 **** LstNode ln; Suff *s; ! ln = Lst_Find (sufflist, (ClientData)sname, SuffSuffHasNameP); if (ln != NULL) { s = (Suff *) Lst_Datum (ln); s->flags |= SUFF_LIBRARY; --- 984,990 ---- LstNode ln; Suff *s; ! ln = Lst_Find(sufflist, SuffSuffHasNameP, (ClientData)sname); if (ln != NULL) { s = (Suff *) Lst_Datum (ln); s->flags |= SUFF_LIBRARY; *************** *** 1266,1273 **** * The node matches the prefix ok, see if it has a known * suffix. */ ! ln = Lst_Find (sufflist, (ClientData)&cp[prefLen], ! SuffSuffHasNameP); if (ln != NULL) { /* * It even has a known suffix, see if there's a transformation --- 1266,1273 ---- * The node matches the prefix ok, see if it has a known * suffix. */ ! ln = Lst_Find(sufflist, SuffSuffHasNameP, ! (ClientData)&cp[prefLen]); if (ln != NULL) { /* * It even has a known suffix, see if there's a transformation *************** *** 1482,1488 **** * Else use the default system search path. */ cp = cgn->name + strlen(cgn->name); ! ln = Lst_Find(sufflist, (ClientData)cp, SuffSuffIsSuffixP); if (DEBUG(SUFF)) { printf("Wildcard expanding \"%s\"...", cgn->name); --- 1482,1488 ---- * Else use the default system search path. */ cp = cgn->name + strlen(cgn->name); ! ln = Lst_Find(sufflist, SuffSuffIsSuffixP, (ClientData)cp); if (DEBUG(SUFF)) { printf("Wildcard expanding \"%s\"...", cgn->name); *************** *** 1611,1617 **** * Locate the transformation rule itself */ tname = str_concat(s->name, t->name, 0); ! ln = Lst_Find(transforms, (ClientData)tname, SuffGNHasNameP); free(tname); if (ln == NULL) { --- 1611,1617 ---- * Locate the transformation rule itself */ tname = str_concat(s->name, t->name, 0); ! ln = Lst_Find(transforms, SuffGNHasNameP, (ClientData)tname); free(tname); if (ln == NULL) { *************** *** 1758,1764 **** /* * Use first matching suffix... */ ! ln = Lst_Find(ms->parents, eoarch, SuffSuffIsSuffixP); if (ln != NULL) { /* --- 1758,1764 ---- /* * Use first matching suffix... */ ! ln = Lst_Find(ms->parents, SuffSuffIsSuffixP, eoarch); if (ln != NULL) { /* *************** *** 1860,1866 **** /* * Look for next possible suffix... */ ! ln = Lst_FindFrom(sufflist, ln, eoname, SuffSuffIsSuffixP); if (ln != NULL) { int prefLen; /* Length of the prefix */ --- 1860,1866 ---- /* * Look for next possible suffix... */ ! ln = Lst_FindFrom(ln, SuffSuffIsSuffixP, eoname); if (ln != NULL) { int prefLen; /* Length of the prefix */ *************** *** 2249,2255 **** LstNode ln; Suff *s; ! ln = Lst_Find (sufflist, (ClientData)LIBSUFF, SuffSuffHasNameP); if (gn->suffix) gn->suffix->refCount--; if (ln != NULL) { --- 2249,2255 ---- LstNode ln; Suff *s; ! ln = Lst_Find(sufflist, SuffSuffHasNameP, (ClientData)LIBSUFF); if (gn->suffix) gn->suffix->refCount--; if (ln != NULL) { *************** *** 2295,2301 **** Suff *s; LstNode ln; ! ln = Lst_Find(sufflist, (ClientData)name, SuffSuffHasNameP); if (ln != NULL) { s = (Suff *)Lst_Datum(ln); if (suffNull != (Suff *)NULL) { --- 2295,2301 ---- Suff *s; LstNode ln; ! ln = Lst_Find(sufflist, SuffSuffHasNameP, (ClientData)name); if (ln != NULL) { s = (Suff *)Lst_Datum(ln); if (suffNull != (Suff *)NULL) {