diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2001-05-03 13:41:28 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2001-05-03 13:41:28 +0000 |
commit | 32d5cfe8f4f4bd9647d36fc0f609479f02311103 (patch) | |
tree | 06bd5d3e7a2a46bf77a1da707955bfdc16acf068 /usr.bin/make/dir.h | |
parent | a50fea6f0032902e640160d4c42a8c9ce003fc2d (diff) |
Synch with my current work.
Numerous changes:
- generate can build several tables
- style cleanup
- statistics code
- use variable names throughout (struct Name)
- recursive variables everywhere
- faster parser (pass buffer along instead of allocating multiple copies)
- correct parser. Handles comments everywhere, and ; correctly
- more string intervals
- simplified dir.c, less recursion.
- extended for loops
- sinclude()
- finished removing extra junk from Lst_*
- handles ${@D} and friends in a simpler way
- cleaned up and modular VarModifiers handling.
- recognizes some gnu Makefile usages and errors out about them.
Additionally, some extra functionality is defined by FEATURES. The set of
functionalities is currently hardcoded to OpenBSD defaults, but this may
include support for some NetBSD extensions, like ODE modifiers.
Backed by miod@ and millert@, who finally got sick of my endless patches...
Diffstat (limited to 'usr.bin/make/dir.h')
-rw-r--r-- | usr.bin/make/dir.h | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/usr.bin/make/dir.h b/usr.bin/make/dir.h index b1ea1b511a2..f7f595f052e 100644 --- a/usr.bin/make/dir.h +++ b/usr.bin/make/dir.h @@ -1,5 +1,6 @@ -/* $OpenBSD: dir.h,v 1.13 2001/03/02 16:57:26 espie Exp $ */ -/* $NetBSD: dir.h,v 1.4 1996/11/06 17:59:05 christos Exp $ */ +/* $OpenPackages$ */ +/* $OpenBSD: dir.h,v 1.14 2001/05/03 13:41:04 espie Exp $ */ +/* $NetBSD: dir.h,v 1.4 1996/11/06 17:59:05 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -38,37 +39,37 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: @(#)dir.h 8.1 (Berkeley) 6/6/93 + * from: @(#)dir.h 8.1 (Berkeley) 6/6/93 */ /* dir.h -- */ -#ifndef _DIR -#define _DIR +#ifndef DIR_H +#define DIR_H typedef struct Path_ { - int refCount; /* Number of paths with this directory */ - int hits; /* the number of times a file in this + int refCount; /* Number of paths with this directory */ + int hits; /* the number of times a file in this * directory has been found */ - struct ohash files; /* Hash table of files in directory */ - char name[1]; /* Name of directory */ + struct ohash files; /* Hash table of files in directory */ + char name[1]; /* Name of directory */ } Path; -extern void Dir_Init __P((void)); -extern void Dir_End __P((void)); -extern Boolean Dir_HasWildcards __P((const char *)); -extern void Dir_Expand __P((char *, Lst, Lst)); -extern char *Dir_FindFile __P((char *, Lst)); -extern TIMESTAMP Dir_MTime __P((GNode *)); -extern void Dir_AddDir __P((Lst, const char *, const char *)); -extern char *Dir_MakeFlags __P((char *, Lst)); -extern void Dir_ClearPath __P((Lst)); -extern void Dir_Concat __P((Lst, Lst)); -extern void Dir_PrintDirectories __P((void)); -extern void Dir_PrintPath __P((Lst)); -extern void Dir_Destroy __P((void *)); -extern void *Dir_CopyDir __P((void *)); -extern int set_times __P((const char *)); +extern void Dir_Init(void); +extern void Dir_End(void); +extern Boolean Dir_HasWildcards(const char *); +extern void Dir_Expand(const char *, Lst, Lst); +extern char *Dir_FindFilei(const char *, const char *, Lst); +#define Dir_FindFile(n, e) Dir_FindFilei(n, strchr(n, '\0'), e) +extern TIMESTAMP Dir_MTime(GNode *); +extern void Dir_AddDir(Lst, const char *, const char *); +extern char *Dir_MakeFlags(const char *, Lst); +extern void Dir_Concat(Lst, Lst); +extern void Dir_PrintDirectories(void); +extern void Dir_PrintPath(Lst); +extern void Dir_Destroy(void *); +extern void *Dir_CopyDir(void *); +extern int set_times(const char *); -#endif /* _DIR */ +#endif /* DIR_H */ |