mirror of
https://github.com/rfivet/uemacs.git
synced 2024-09-30 01:05:54 -04:00
Insure flook compile without warning when ENVFUN is 0.
This commit is contained in:
parent
d266ec4b2a
commit
669b7396d4
7
flook.c
7
flook.c
@ -76,15 +76,15 @@ boolean fexist( const char *fname)
|
|||||||
*/
|
*/
|
||||||
char *flook( const char *fname, int hflag)
|
char *flook( const char *fname, int hflag)
|
||||||
{
|
{
|
||||||
char *home; /* path to home directory */
|
|
||||||
char *path; /* environmental PATH variable */
|
|
||||||
char *sp; /* pointer into path spec */
|
|
||||||
int i; /* index */
|
int i; /* index */
|
||||||
static char fspec[NSTRING]; /* full path spec to search */
|
static char fspec[NSTRING]; /* full path spec to search */
|
||||||
|
|
||||||
#if ENVFUNC
|
#if ENVFUNC
|
||||||
|
char *path; /* environmental PATH variable */
|
||||||
|
|
||||||
if (hflag) {
|
if (hflag) {
|
||||||
|
char *home; /* path to home directory */
|
||||||
|
|
||||||
home = getenv("HOME");
|
home = getenv("HOME");
|
||||||
if (home != NULL) {
|
if (home != NULL) {
|
||||||
/* build home dir file spec */
|
/* build home dir file spec */
|
||||||
@ -109,6 +109,7 @@ char *flook( const char *fname, int hflag)
|
|||||||
path = getenv("PATH");
|
path = getenv("PATH");
|
||||||
if (path != NULL)
|
if (path != NULL)
|
||||||
while (*path) {
|
while (*path) {
|
||||||
|
char *sp; /* pointer into path spec */
|
||||||
|
|
||||||
/* build next possible file spec */
|
/* build next possible file spec */
|
||||||
sp = fspec;
|
sp = fspec;
|
||||||
|
Loading…
Reference in New Issue
Block a user