summaryrefslogtreecommitdiff
path: root/usr.bin/make/str.c
diff options
context:
space:
mode:
authorJuli Mallett <jmallett@FreeBSD.org>2002-10-09 03:42:10 +0000
committerJuli Mallett <jmallett@FreeBSD.org>2002-10-09 03:42:10 +0000
commit4526ed6ffb47e16844e942555ad0fab102401734 (patch)
tree01c9d3cf78c3c46802e6e4ca2a65cce497a23515 /usr.bin/make/str.c
parent48bfcddd94bb965c037931abe94df44e96cf8340 (diff)
Notes
Diffstat (limited to 'usr.bin/make/str.c')
-rw-r--r--usr.bin/make/str.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c
index 8ff10dfc1422..af5a23930bcf 100644
--- a/usr.bin/make/str.c
+++ b/usr.bin/make/str.c
@@ -52,7 +52,7 @@ static int argmax, curlen;
*
*/
void
-str_init()
+str_init(void)
{
char *p1;
argv = (char **)emalloc(((argmax = 50) + 1) * sizeof(char *));
@@ -66,7 +66,7 @@ str_init()
*
*/
void
-str_end()
+str_end(void)
{
if (argv) {
if (argv[0])
@@ -86,9 +86,7 @@ str_end()
* the resulting string in allocated space.
*/
char *
-str_concat(s1, s2, flags)
- char *s1, *s2;
- int flags;
+str_concat(char *s1, char *s2, int flags)
{
int len1, len2;
char *result;
@@ -134,10 +132,7 @@ str_concat(s1, s2, flags)
* the first word is always the value of the .MAKE variable.
*/
char **
-brk_string(str, store_argc, expand)
- char *str;
- int *store_argc;
- Boolean expand;
+brk_string(char *str, int *store_argc, Boolean expand)
{
int argc, ch;
char inquote, *p, *start, *t;
@@ -266,11 +261,11 @@ done: argv[argc] = (char *)NULL;
* character-for-character basis with no wildcards or special characters.
*
* Side effects: None.
+ *
+ * XXX should be strstr(3).
*/
char *
-Str_FindSubstring(string, substring)
- char *string; /* String to search. */
- char *substring; /* Substring to find in string */
+Str_FindSubstring(char *string, char *substring)
{
char *a, *b;
@@ -307,9 +302,7 @@ Str_FindSubstring(string, substring)
* Side effects: None.
*/
int
-Str_Match(string, pattern)
- char *string; /* String */
- char *pattern; /* Pattern */
+Str_Match(char *string, char *pattern)
{
char c2;
@@ -412,10 +405,7 @@ thisCharOK: ++pattern;
*-----------------------------------------------------------------------
*/
char *
-Str_SYSVMatch(word, pattern, len)
- char *word; /* Word to examine */
- char *pattern; /* Pattern to examine against */
- int *len; /* Number of characters to substitute */
+Str_SYSVMatch(char *word, char *pattern, int *len)
{
char *p = pattern;
char *w = word;
@@ -478,11 +468,7 @@ Str_SYSVMatch(word, pattern, len)
*-----------------------------------------------------------------------
*/
void
-Str_SYSVSubst(buf, pat, src, len)
- Buffer buf;
- char *pat;
- char *src;
- int len;
+Str_SYSVSubst(Buffer buf, char *pat, char *src, int len)
{
char *m;