diff options
author | harti <harti@FreeBSD.org> | 2005-03-22 12:59:02 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-03-22 12:59:02 +0000 |
commit | d8c301673b2cda97fd07bd1fe23085d583809c75 (patch) | |
tree | e05b9444cc3016eb1a2e372cacac5b305365a10f /usr.bin/make/dir.c | |
parent | bdf00a2e379d73c3148b68c1315bd15d97fa8b7d (diff) | |
download | FreeBSD-src-d8c301673b2cda97fd07bd1fe23085d583809c75.zip FreeBSD-src-d8c301673b2cda97fd07bd1fe23085d583809c75.tar.gz |
Style: <space><tab> -> <tab>
Diffstat (limited to 'usr.bin/make/dir.c')
-rw-r--r-- | usr.bin/make/dir.c | 67 |
1 files changed, 33 insertions, 34 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c index 18afa42..fb6aa9d 100644 --- a/usr.bin/make/dir.c +++ b/usr.bin/make/dir.c @@ -49,35 +49,35 @@ __FBSDID("$FreeBSD$"); * implicit sources. * * The interface for this module is: - * Dir_Init Initialize the module. + * Dir_Init Initialize the module. * - * Dir_HasWildcards Returns TRUE if the name given it needs to - * be wildcard-expanded. + * Dir_HasWildcards Returns TRUE if the name given it needs to + * be wildcard-expanded. * - * Dir_Expand Given a pattern and a path, return a Lst of names - * which match the pattern on the search path. + * Dir_Expand Given a pattern and a path, return a Lst of names + * which match the pattern on the search path. * - * Dir_FindFile Searches for a file on a given search path. - * If it exists, the entire path is returned. - * Otherwise NULL is returned. + * Dir_FindFile Searches for a file on a given search path. + * If it exists, the entire path is returned. + * Otherwise NULL is returned. * - * Dir_MTime Return the modification time of a node. The file - * is searched for along the default search path. - * The path and mtime fields of the node are filled - * in. + * Dir_MTime Return the modification time of a node. The file + * is searched for along the default search path. + * The path and mtime fields of the node are filled in. * - * Dir_AddDir Add a directory to a search path. + * Dir_AddDir Add a directory to a search path. * - * Dir_MakeFlags Given a search path and a command flag, create - * a string with each of the directories in the path - * preceded by the command flag and all of them - * separated by a space. + * Dir_MakeFlags Given a search path and a command flag, create + * a string with each of the directories in the path + * preceded by the command flag and all of them + * separated by a space. * - * Dir_Destroy Destroy an element of a search path. Frees up all - * things that can be freed for the element as long - * as the element is no longer referenced by any other - * search path. - * Dir_ClearPath Resets a search path to the empty list. + * Dir_Destroy Destroy an element of a search path. Frees up all + * things that can be freed for the element as long + * as the element is no longer referenced by any other + * search path. + * + * Dir_ClearPath Resets a search path to the empty list. * * For debugging: * Dir_PrintDirectories Print stats about the directory cache. @@ -174,11 +174,10 @@ __FBSDID("$FreeBSD$"); */ typedef struct Dir { - char *name; /* Name of directory */ - int refCount; /* Number of paths with this directory */ - int hits; /* Number of times a file in this dirextory has - * been found */ - Hash_Table files; /* Hash table of files in directory */ + char *name; /* Name of directory */ + int refCount; /* No. of paths with this directory */ + int hits; /* No. of times a file has been found here */ + Hash_Table files; /* Hash table of files in directory */ } Dir; @@ -305,7 +304,7 @@ Dir_HasWildcards(const char *name) /*- *----------------------------------------------------------------------- * DirMatchFiles -- - * Given a pattern and a Dir structure, see if any files + * Given a pattern and a Dir structure, see if any files * match the pattern and add their names to the 'expansions' list if * any do. This is incomplete -- it doesn't take care of patterns like * src / *src / *.c properly (just *.c on any of the directories), but it @@ -322,9 +321,9 @@ Dir_HasWildcards(const char *name) static int DirMatchFiles(const char *pattern, const Dir *p, Lst *expansions) { - Hash_Search search; /* Index into the directory's table */ - Hash_Entry *entry; /* Current entry in the table */ - Boolean isDot; /* TRUE if the directory being searched is . */ + Hash_Search search; /* Index into the directory's table */ + Hash_Entry *entry; /* Current entry in the table */ + Boolean isDot; /* TRUE if the directory being searched is . */ isDot = (*p->name == '.' && p->name[1] == '\0'); @@ -376,7 +375,7 @@ DirExpandCurly(const char *word, const char *brace, Lst *path, Lst *expansions) 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 */ - int otherLen; /* The length of the other pieces of the expansion + int otherLen; /* The length of the other pieces of the expansion * (chars before and after the clause in 'word') */ char *cp2; /* Pointer for checking for wildcards in * expansion before calling Dir_Expand */ @@ -882,14 +881,14 @@ Dir_FindFile(char *name, Lst *path) int Dir_MTime(GNode *gn) { - char *fullName; /* the full pathname of name */ + char *fullName; /* the full pathname of name */ struct stat stb; /* buffer for finding the mod time */ Hash_Entry *entry; if (gn->type & OP_ARCHV) return (Arch_MTime(gn)); - else if (gn->path == NULL) + else if (gn->path == NULL) fullName = Dir_FindFile(gn->name, &dirSearchPath); else fullName = gn->path; |