summaryrefslogtreecommitdiff
path: root/usr.bin/make/str.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-11-11 11:35:18 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-11-11 11:35:18 +0000
commit6bbddc87206dc710e0a1eed2c5a5860575a4c099 (patch)
tree5e9cf17c9daef0f6ddec46de1dba73495ac6c63d /usr.bin/make/str.c
parent0c4c42a4181f159602f546a970a388daedba6228 (diff)
Kill Str_FindSubString, it's strstr.
Diffstat (limited to 'usr.bin/make/str.c')
-rw-r--r--usr.bin/make/str.c42
1 files changed, 2 insertions, 40 deletions
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c
index 2d2eece77bc..fe78543d41a 100644
--- a/usr.bin/make/str.c
+++ b/usr.bin/make/str.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: str.c,v 1.7 1998/12/05 00:06:29 espie Exp $ */
+/* $OpenBSD: str.c,v 1.8 1999/11/11 11:35:17 espie Exp $ */
/* $NetBSD: str.c,v 1.13 1996/11/06 17:59:23 christos Exp $ */
/*-
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)str.c 5.8 (Berkeley) 6/1/90";
#else
-static char rcsid[] = "$OpenBSD: str.c,v 1.7 1998/12/05 00:06:29 espie Exp $";
+static char rcsid[] = "$OpenBSD: str.c,v 1.8 1999/11/11 11:35:17 espie Exp $";
#endif
#endif /* not lint */
@@ -226,44 +226,6 @@ done: argv[argc] = (char *)NULL;
}
/*
- * Str_FindSubstring -- See if a string contains a particular substring.
- *
- * Results: If string contains substring, the return value is the location of
- * the first matching instance of substring in string. If string doesn't
- * contain substring, the return value is NULL. Matching is done on an exact
- * character-for-character basis with no wildcards or special characters.
- *
- * Side effects: None.
- */
-char *
-Str_FindSubstring(string, substring)
- register char *string; /* String to search. */
- char *substring; /* Substring to find in string */
-{
- register char *a, *b;
-
- /*
- * First scan quickly through the two strings looking for a single-
- * character match. When it's found, then compare the rest of the
- * substring.
- */
-
- for (b = substring; *string != 0; string += 1) {
- if (*string != *b)
- continue;
- a = string;
- for (;;) {
- if (*b == 0)
- return(string);
- if (*a++ != *b++)
- break;
- }
- b = substring;
- }
- return((char *) NULL);
-}
-
-/*
* Str_Match --
*
* See if a particular string matches a particular pattern.