diff options
author | harti <harti@FreeBSD.org> | 2004-12-06 15:20:12 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2004-12-06 15:20:12 +0000 |
commit | 885c50507df63c3bc97a7c11bcb5b36954aea50c (patch) | |
tree | 92a0217818248978ef3b661124daf5f52dd0c850 /usr.bin/make/dir.c | |
parent | 930ad3d9dccfb6cee0f223e316f4dd24c3404251 (diff) | |
download | FreeBSD-src-885c50507df63c3bc97a7c11bcb5b36954aea50c.zip FreeBSD-src-885c50507df63c3bc97a7c11bcb5b36954aea50c.tar.gz |
Some constification which doesn't require code rewrites.
Diffstat (limited to 'usr.bin/make/dir.c')
-rw-r--r-- | usr.bin/make/dir.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c index f039046..54576dd 100644 --- a/usr.bin/make/dir.c +++ b/usr.bin/make/dir.c @@ -190,9 +190,6 @@ static Path *dot; /* contents of current directory */ static Hash_Table mtimes; static int DirFindName(void *, void *); -static int DirMatchFiles(char *, Path *, Lst); -static void DirExpandCurly(char *, char *, Lst, Lst); -static void DirExpandInt(char *, Lst, Lst); static int DirPrintWord(void *, void *); static int DirPrintDir(void *, void *); @@ -305,9 +302,9 @@ DirFindName(void *p, void *dname) *----------------------------------------------------------------------- */ Boolean -Dir_HasWildcards(char *name) +Dir_HasWildcards(const char *name) { - char *cp; + const char *cp; int wild = 0, brace = 0, bracket = 0; for (cp = name; *cp; cp++) { @@ -355,7 +352,7 @@ Dir_HasWildcards(char *name) *----------------------------------------------------------------------- */ static int -DirMatchFiles(char *pattern, Path *p, Lst expansions) +DirMatchFiles(const char *pattern, const Path *p, Lst expansions) { Hash_Search search; /* Index into the directory's table */ Hash_Entry *entry; /* Current entry in the table */ @@ -403,11 +400,11 @@ DirMatchFiles(char *pattern, Path *p, Lst expansions) *----------------------------------------------------------------------- */ static void -DirExpandCurly(char *word, char *brace, Lst path, Lst expansions) +DirExpandCurly(const char *word, const char *brace, Lst path, Lst expansions) { - char *end; /* Character after the closing brace */ - char *cp; /* Current position in brace clause */ - char *start; /* Start of current piece of brace clause */ + const char *end; /* Character after the closing brace */ + const char *cp; /* Current position in brace clause */ + const char *start; /* Start of current piece of brace clause */ int bracelevel; /* Number of braces we've seen. If we see a right brace * when this is 0, we've hit the end of the clause. */ char *file; /* Current expansion */ @@ -490,7 +487,6 @@ DirExpandCurly(char *word, char *brace, Lst path, Lst expansions) } } - /*- *----------------------------------------------------------------------- * DirExpandInt -- @@ -508,7 +504,7 @@ DirExpandCurly(char *word, char *brace, Lst path, Lst expansions) *----------------------------------------------------------------------- */ static void -DirExpandInt(char *word, Lst path, Lst expansions) +DirExpandInt(const char *word, Lst path, Lst expansions) { LstNode ln; /* Current node */ Path *p; /* Directory in the node */ |