=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/str.c,v retrieving revision 1.12 retrieving revision 1.13 diff -c -r1.12 -r1.13 *** src/usr.bin/make/str.c 2000/06/23 16:41:53 1.12 --- src/usr.bin/make/str.c 2000/07/17 22:57:37 1.13 *************** *** 1,4 **** ! /* $OpenBSD: str.c,v 1.12 2000/06/23 16:41:53 espie Exp $ */ /* $NetBSD: str.c,v 1.13 1996/11/06 17:59:23 christos Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: str.c,v 1.13 2000/07/17 22:57:37 espie Exp $ */ /* $NetBSD: str.c,v 1.13 1996/11/06 17:59:23 christos Exp $ */ /*- *************** *** 43,49 **** #if 0 static char sccsid[] = "@(#)str.c 5.8 (Berkeley) 6/1/90"; #else ! static char rcsid[] = "$OpenBSD: str.c,v 1.12 2000/06/23 16:41:53 espie Exp $"; #endif #endif /* not lint */ --- 43,49 ---- #if 0 static char sccsid[] = "@(#)str.c 5.8 (Berkeley) 6/1/90"; #else ! static char rcsid[] = "$OpenBSD: str.c,v 1.13 2000/07/17 22:57:37 espie Exp $"; #endif #endif /* not lint */ *************** *** 97,111 **** */ char ** brk_string(str, store_argc, expand, buffer) ! register char *str; int *store_argc; Boolean expand; char **buffer; { register int argc, ch; ! register char inquote, *p, *start, *t; ! int len; ! int argmax = 50, curlen = 0; char **argv = (char **)emalloc((argmax + 1) * sizeof(char *)); /* skip leading space chars. */ --- 97,114 ---- */ char ** brk_string(str, store_argc, expand, buffer) ! const char *str; int *store_argc; Boolean expand; char **buffer; { register int argc, ch; ! char inquote; ! const char *p; ! char *start, *t; ! size_t len; ! int argmax = 50; ! size_t curlen = 0; char **argv = (char **)emalloc((argmax + 1) * sizeof(char *)); /* skip leading space chars. */ *************** *** 228,235 **** */ int Str_Match(string, pattern) ! register char *string; /* String */ ! register char *pattern; /* Pattern */ { char c2; --- 231,238 ---- */ int Str_Match(string, pattern) ! const char *string; /* String */ ! const char *pattern; /* Pattern */ { char c2; *************** *** 325,345 **** * Results: * Returns the beginning position of a match or null. The number * of characters matched is returned in len. - * - * Side Effects: - * None - * *----------------------------------------------------------------------- */ ! char * Str_SYSVMatch(word, pattern, len) ! char *word; /* Word to examine */ ! char *pattern; /* Pattern to examine against */ ! int *len; /* Number of characters to substitute */ { ! char *p = pattern; ! char *w = word; ! char *m; if (*p == '\0') { /* Null pattern is the whole string */ --- 328,344 ---- * Results: * Returns the beginning position of a match or null. The number * of characters matched is returned in len. *----------------------------------------------------------------------- */ ! const char * Str_SYSVMatch(word, pattern, len) ! const char *word; /* Word to examine */ ! const char *pattern; /* Pattern to examine against */ ! size_t *len; /* Number of characters to substitute */ { ! const char *p = pattern; ! const char *w = word; ! const char *m; if (*p == '\0') { /* Null pattern is the whole string */ *************** *** 383,404 **** * If the pattern does not contain a '%' prepend len characters * from src. * - * Results: - * None - * * Side Effects: * Places result on buf - * *----------------------------------------------------------------------- */ void Str_SYSVSubst(buf, pat, src, len) Buffer buf; ! char *pat; ! char *src; ! int len; { ! char *m; if ((m = strchr(pat, '%')) != NULL) { /* Copy the prefix */ --- 382,399 ---- * If the pattern does not contain a '%' prepend len characters * from src. * * Side Effects: * Places result on buf *----------------------------------------------------------------------- */ void Str_SYSVSubst(buf, pat, src, len) Buffer buf; ! const char *pat; ! const char *src; ! size_t len; { ! const char *m; if ((m = strchr(pat, '%')) != NULL) { /* Copy the prefix */