[BACK]Return to which.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / which

Diff for /src/usr.bin/which/which.c between version 1.19 and 1.20

version 1.19, 2014/05/20 01:25:23 version 1.20, 2015/01/16 06:40:14
Line 16 
Line 16 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
   
 #include <sys/param.h>  
 #include <sys/stat.h>  #include <sys/stat.h>
 #include <sys/sysctl.h>  #include <sys/sysctl.h>
   
Line 28 
Line 27 
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
   #include <limits.h>
   
 #define PROG_WHICH      1  #define PROG_WHICH      1
 #define PROG_WHEREIS    2  #define PROG_WHEREIS    2
Line 94 
Line 94 
 int  int
 findprog(char *prog, char *path, int progmode, int allmatches)  findprog(char *prog, char *path, int progmode, int allmatches)
 {  {
         char *p, filename[MAXPATHLEN];          char *p, filename[PATH_MAX];
         int proglen, plen, rval = 0;          int proglen, plen, rval = 0;
         struct stat sbuf;          struct stat sbuf;
         char *pathcpy;          char *pathcpy;

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20