version 1.3, 1995/12/17 13:42:02 |
version 1.4, 1996/02/22 22:24:51 |
|
|
/* $NetBSD: parse.c,v 1.18 1995/12/16 05:03:13 christos Exp $ */ |
/* $NetBSD: parse.c,v 1.19 1996/02/07 23:04:04 thorpej Exp $ */ |
|
|
/* |
/* |
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California. |
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California. |
|
|
#if 0 |
#if 0 |
static char sccsid[] = "@(#)parse.c 5.18 (Berkeley) 2/19/91"; |
static char sccsid[] = "@(#)parse.c 5.18 (Berkeley) 2/19/91"; |
#else |
#else |
static char rcsid[] = "$NetBSD: parse.c,v 1.18 1995/12/16 05:03:13 christos Exp $"; |
static char rcsid[] = "$NetBSD: parse.c,v 1.19 1996/02/07 23:04:04 thorpej Exp $"; |
#endif |
#endif |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
|
|
* leading path components and call Dir_FindFile to see if |
* leading path components and call Dir_FindFile to see if |
* we can locate the beast. |
* we can locate the beast. |
*/ |
*/ |
char *prefEnd; |
char *prefEnd, *Fname; |
|
|
prefEnd = strrchr (fname, '/'); |
/* Make a temporary copy of this, to be safe. */ |
|
Fname = strdup(fname); |
|
|
|
prefEnd = strrchr (Fname, '/'); |
if (prefEnd != (char *)NULL) { |
if (prefEnd != (char *)NULL) { |
char *newName; |
char *newName; |
|
|
|
|
if (file[0] == '/') |
if (file[0] == '/') |
newName = strdup(file); |
newName = strdup(file); |
else |
else |
newName = str_concat (fname, file, STR_ADDSLASH); |
newName = str_concat (Fname, file, STR_ADDSLASH); |
fullname = Dir_FindFile (newName, parseIncPath); |
fullname = Dir_FindFile (newName, parseIncPath); |
if (fullname == (char *)NULL) { |
if (fullname == (char *)NULL) { |
fullname = Dir_FindFile(newName, dirSearchPath); |
fullname = Dir_FindFile(newName, dirSearchPath); |
|
|
} else { |
} else { |
fullname = (char *)NULL; |
fullname = (char *)NULL; |
} |
} |
|
free (Fname); |
} else { |
} else { |
fullname = (char *)NULL; |
fullname = (char *)NULL; |
} |
} |