fullname = Dir_FindFile(file, sysIncPath);
fullname = Dir_FindFile(file, &sysIncPath);
ParseDoInclude (file)    char          *file;	/* file specification */{    char          *fullname;	/* full pathname of file */    IFile         *oldFile;	/* state associated with current file */    char          endc;	    	/* the character which ends the file spec */    char          *cp;		/* current position in file spec */    Boolean 	  isSystem; 	/* TRUE if makefile is a system makefile */    /*     * Skip to delimiter character so we know where to look     */    while ((*file == ' ') || (*file == '\t')) {	file++;    }    if ((*file != '"') && (*file != '<')) {	Parse_Error (PARSE_FATAL,	    ".include filename must be delimited by '\"' or '<'");	return;    }    /*     * Set the search path on which to find the include file based on the     * characters which bracket its name. Angle-brackets imply it's     * a system Makefile while double-quotes imply it's a user makefile     */    if (*file == '<') {	isSystem = TRUE;	endc = '>';    } else {	isSystem = FALSE;	endc = '"';    }    /*     * Skip to matching delimiter     */    for (cp = ++file; *cp && *cp != endc; cp++) {	continue;    }    if (*cp != endc) {	Parse_Error (PARSE_FATAL,		     "Unclosed %cinclude filename. '%c' expected",		     '.', endc);	return;    }    *cp = '\0';    /*     * Substitute for any variables in the file name before trying to     * find the thing.     */    file = Var_Subst(file, VAR_CMD, FALSE);    /*     * Now we know the file's name and its search path, we attempt to     * find the durn thing. A return of NULL indicates the file don't     * exist.     */    if (!isSystem) {	/*	 * Include files contained in double-quotes are first searched for	 * relative to the including file's location. We don't want to	 * cd there, of course, so we just tack on the old file's	 * leading path components and call Dir_FindFile to see if	 * we can locate the beast.	 */	char	  *prefEnd, *Fname;	/* Make a temporary copy of this, to be safe. */	Fname = estrdup(fname);	prefEnd = strrchr (Fname, '/');	if (prefEnd != (char *)NULL) {	    char  	*newName;	    *prefEnd = '\0';	    if (file[0] == '/')		newName = estrdup(file);	    else		newName = str_concat (Fname, file, STR_ADDSLASH);	    fullname = Dir_FindFile (newName, parseIncPath);	    if (fullname == (char *)NULL) {		fullname = Dir_FindFile(newName, dirSearchPath);	    }	    free (newName);	    *prefEnd = '/';	} else {	    fullname = (char *)NULL;	}	free (Fname);    } else {	fullname = (char *)NULL;    }    if (fullname == (char *)NULL) {	/*	 * System makefile or makefile wasn't found in same directory as	 * included makefile. Search for it first on the -I search path,	 * then on the .PATH search path, if not found in a -I directory.	 * XXX: Suffix specific?	 */	fullname = Dir_FindFile (file, parseIncPath);	if (fullname == (char *)NULL) {	    fullname = Dir_FindFile(file, dirSearchPath);	}    }    if (fullname == (char *)NULL) {	/*	 * Still haven't found the makefile. Look for it on the system	 * path as a last resort.	 */	fullname = Dir_FindFile(file, sysIncPath);    }    if (fullname == (char *) NULL) {	*cp = endc;	Parse_Error (PARSE_FATAL, "Could not find %s", file);	return;    }    free(file);    /*     * Once we find the absolute path to the file, we get to save all the     * state from the current file before we can start reading this     * include file. The state is stored in an IFile structure which     * is placed on a list with other IFile structures. The list makes     * a very nice stack to track how we got here...     */    oldFile = (IFile *) emalloc (sizeof (IFile));    oldFile->fname = fname;    oldFile->F = curFILE;    oldFile->p = curPTR;    oldFile->lineno = lineno;    Lst_AtFront(includes, oldFile);    /*     * Once the previous state has been saved, we can get down to reading     * the new file. We set up the name of the file to be the absolute     * name of the include file so error messages refer to the right     * place. Naturally enough, we start reading at line number 0.     */    fname = fullname;#ifdef CLEANUP    Lst_AtEnd(fileNames, fname);#endif    lineno = 0;    curFILE = fopen (fullname, "r");    curPTR = NULL;    if (curFILE == (FILE * ) NULL) {	Parse_Error (PARSE_FATAL, "Cannot open %s", fullname);	/*	 * Pop to previous file	 */	(void) ParseEOF(0);    }}