version 1.15, 2009/10/27 23:59:50 |
version 1.16, 2010/05/31 14:01:49 |
|
|
(void)puts(prog); |
(void)puts(prog); |
return (1); |
return (1); |
} else { |
} else { |
(void)printf("%s: Command not found.\n", prog); |
warnx("%s: Command not found.", prog); |
return (0); |
return (0); |
} |
} |
} |
} |
|
|
if ((path = strdup(path)) == NULL) |
if ((path = strdup(path)) == NULL) |
errx(1, "Can't allocate memory."); |
err(1, "strdup"); |
pathcpy = path; |
pathcpy = path; |
|
|
proglen = strlen(prog); |
proglen = strlen(prog); |
|
|
|
|
/* whereis(1) is silent on failure. */ |
/* whereis(1) is silent on failure. */ |
if (!rval && progmode != PROG_WHEREIS) |
if (!rval && progmode != PROG_WHEREIS) |
(void)printf("%s: Command not found.\n", prog); |
warnx("%s: Command not found.", prog); |
return (rval); |
return (rval); |
} |
} |
|
|