dir.h revision 69531
150477Speter/*
2139749Simp * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
3196008Smjacob * Copyright (c) 1988, 1989 by Adam de Boor
4167403Smjacob * Copyright (c) 1989 by Berkeley Softworks
5167403Smjacob * All rights reserved.
6167403Smjacob *
7167403Smjacob * This code is derived from software contributed to Berkeley by
8167403Smjacob * Adam de Boor.
9167403Smjacob *
10167403Smjacob * Redistribution and use in source and binary forms, with or without
11167403Smjacob * modification, are permitted provided that the following conditions
12167403Smjacob * are met:
13167403Smjacob * 1. Redistributions of source code must retain the above copyright
14167403Smjacob *    notice, this list of conditions and the following disclaimer.
15167403Smjacob * 2. Redistributions in binary form must reproduce the above copyright
16167403Smjacob *    notice, this list of conditions and the following disclaimer in the
17167403Smjacob *    documentation and/or other materials provided with the distribution.
18167403Smjacob * 3. All advertising materials mentioning features or use of this software
19167403Smjacob *    must display the following acknowledgement:
20167403Smjacob *	This product includes software developed by the University of
21167403Smjacob *	California, Berkeley and its contributors.
22167403Smjacob * 4. Neither the name of the University nor the names of its contributors
23167403Smjacob *    may be used to endorse or promote products derived from this software
24167403Smjacob *    without specific prior written permission.
25167403Smjacob *
26167403Smjacob * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27196008Smjacob * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28167403Smjacob * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29167403Smjacob * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
3035388Smjacob * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3135388Smjacob * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3235388Smjacob * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3335388Smjacob * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3435388Smjacob * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3535388Smjacob * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3635388Smjacob * SUCH DAMAGE.
3735388Smjacob *
3835388Smjacob *	from: @(#)dir.h	8.1 (Berkeley) 6/6/93
3935388Smjacob * $FreeBSD: head/usr.bin/make/dir.h 69531 2000-12-02 20:24:42Z will $
4035388Smjacob */
4135388Smjacob
4235388Smjacob/* dir.h --
4335388Smjacob */
4435388Smjacob
4535388Smjacob#ifndef	_DIR
4635388Smjacob#define	_DIR
4735388Smjacob
4835388Smjacobtypedef struct Path {
4935388Smjacob    char         *name;	    	/* Name of directory */
5035388Smjacob    int	    	  refCount; 	/* Number of paths with this directory */
5135388Smjacob    int		  hits;	    	/* the number of times a file in this
5235388Smjacob				 * directory has been found */
5335388Smjacob    Hash_Table    files;    	/* Hash table of files in directory */
5435388Smjacob} Path;
5546967Smjacob
5646967Smjacobvoid Dir_Init __P((void));
5746967Smjacobvoid Dir_End __P((void));
5846967SmjacobBoolean Dir_HasWildcards __P((char *));
5946967Smjacobvoid Dir_Expand __P((char *, Lst, Lst));
6046967Smjacobchar *Dir_FindFile __P((char *, Lst));
6146967Smjacobint Dir_MTime __P((GNode *));
6246967Smjacobvoid Dir_AddDir __P((Lst, char *));
6335388Smjacobchar *Dir_MakeFlags __P((char *, Lst));
6435388Smjacobvoid Dir_ClearPath __P((Lst));
6544819Smjacobvoid Dir_Concat __P((Lst, Lst));
6635388Smjacobvoid Dir_PrintDirectories __P((void));
6744819Smjacobvoid Dir_PrintPath __P((Lst));
6844819Smjacobvoid Dir_Destroy __P((void *));
6982689Smjacobvoid * Dir_CopyDir __P((void *));
70163899Smjacob
7135388Smjacob#endif /* _DIR */
7235388Smjacob